[Top][All Lists]

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

Re: file-name-shadow-mode

From: Luc Teirlinck
Subject: Re: file-name-shadow-mode
Date: Sat, 19 Mar 2005 20:14:41 -0600 (CST)

Stefan Monnier wrote:

   > Apparently, this gives no compiler warnings (I checked), even though the
   > function uses the mode variable, which is, in the new version, not
   > yet defcustomed.

   I'd be surprised if it doesn't introduce spurious warnings at
   various places.

I indeed did not look closely enough (it did not produce warnings for
file-name-shadow-mode during bootstrapping).  This problem could be
easily circumvented by a compiler defvar for the mode variable at the
beginning of the define-minor-mode expansion.  Otherwise, setting
:initialize to something else but `custom-initialize-default' is
probably not going to work for minor modes defined with
`define-minor-mode'.  (It definitely does not work with the current
code.)  One would then have to enable such minor modes in startup.el.
The best way to do that would probably be with
`custom-reevaluate-setting', since that way any changes to the
defcustom automatically take effect in startup.el too.



reply via email to

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