[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, 19 Nov 2014 18:15:54 -0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.94 (windows-nt) |
Stefan Monnier <address@hidden> writes:
>>> +(defvar find-definition-function nil
>>> +(defvar find-definition-identifier-function nil
>> These variables will be set by the major mode, so they should be
>> buffer-local; use defvar-local.
>
> Bad idea: if the major modes set those with `setq' rather than with
> `setq-local', they'll end up setting the global value if the `setq'
> happens to be run before loading find-definition.el (which is quite
> possible since find-definition.el will typically be loaded via an
> autoload rather than via a `require').
This _should_ be caught by a byte-compiler warning
("find-definition-function not known"). So I'm ok with requiring major
modes to either have "(require find-definition)" or use setq-local.
--
-- Stephe
- Re: Generalizing find-definition, (continued)
Re: Generalizing find-definition, Jorgen Schaefer, 2014/11/17
Re: Generalizing find-definition, Helmut Eller, 2014/11/18
Re: Generalizing find-definition, Stefan Monnier, 2014/11/19
Re: Generalizing find-definition, Ivan Shmakov, 2014/11/19
Re: Generalizing find-definition, Stefan Monnier, 2014/11/19
Re: Generalizing find-definition,
Stephen Leake <=
Re: Generalizing find-definition, Stefan Monnier, 2014/11/19
Re: Generalizing find-definition, Stefan Monnier, 2014/11/18
Re: Generalizing find-definition, Stephen Leake, 2014/11/19
Re: Generalizing find-definition, Stefan Monnier, 2014/11/19
Re: Generalizing find-definition, Jorgen Schaefer, 2014/11/20
Re: Generalizing find-definition, Helmut Eller, 2014/11/20
Re: Generalizing find-definition, Jorgen Schaefer, 2014/11/20
Re: Generalizing find-definition, Helmut Eller, 2014/11/20
Re: Generalizing find-definition, Stefan Monnier, 2014/11/20
Re: Generalizing find-definition, Jorgen Schaefer, 2014/11/20