[Top][All Lists]

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

Re: cl-defgeneric vs random funcall in project.el

From: Stefan Monnier
Subject: Re: cl-defgeneric vs random funcall in project.el
Date: Tue, 28 Jul 2015 19:57:44 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

> The alternative (which is more feasible now) is to use the context
> specializer, like:
> (cl-defmethod project-search-path (_project &context (major-mode (eql
> emacs-lisp-mode))))

FWIW, this sucks because this method won't be used in modes derived from

> It's also undocumented yet, and the method dispatch priority between it and
> method implementation dispatching on the first argument is also unclear now.

The priority of &context is lower than the first argument.
The priority between different &context can't be relied upon.

> And it'll need a separate declaration for each deriving mode (such as
> lisp-interaction-mode).



reply via email to

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