emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Generalizing find-definition


From: Stephen Leake
Subject: Re: Generalizing find-definition
Date: Wed, 10 Dec 2014 11:00:15 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.94 (windows-nt)

Dmitry Gutov <address@hidden> writes:

> Stephen Leake <address@hidden> writes:
>
>> This package does not force anyone to know EIEIO; the package API is all
>> plain functions.
>
> The API mandates that `xref-backend-function' returns an instance of a
> class derived from xref-backend-class.  

Ah, right; I forgot about that.

On the other hand, the required code is three lines:

(defclass xref-ada-backend (xref-backend-class) ())
(defvar xref--ada-backend (make-instance 'xref-ada-backend))
(defun xref-ada-backend-function () xref--ada-backend)

xref could provide a macro that does this.

Everything else in a major-mode backend can be non-EIEIO.

>> But people can use the classes if they want to; I intend to in ada-mode.
>
> I don't see why this can't happen with a plain-function implementation.

Perhaps I've misunderstood what you are proposing.

I have the impression you are proposing to entirely delete EIEIO from xref.

What are you proposing?

-- 
-- Stephe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]