[Top][All Lists]

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

Re: doc elisp intro cross reference fixes

From: Luc Teirlinck
Subject: Re: doc elisp intro cross reference fixes
Date: Wed, 26 Nov 2003 17:49:02 -0600 (CST)

Stefan Monnier wrote (in response to a quote from Per Abrahamsen):

   > It is an entirely different interface.
   >   (defalias 'set-variable 'customize-set-variable)
   > or 
   >   (defalias 'set-variable 'customize-set-value)
   > would make sense though.  The difference is that the first uses the
   > :set function, the later doesn't.


Indeed which one?  These are two very different alternatives Per is
proposing.  From previous posts I would guess that you mean:

Indeed:  (defalias 'set-variable 'customize-set-variable)

Note that if you mean this literally, this is a non-trivial change in
as far as prefix arguments are concerned.  Right now, C-u set-variable
will set the buffer-local value.  After the defalias, it will set the
global value and prompt for a comment.  On the other hand,
customize-set-variable already accepts *-variables without defcustom.

   Indeed.  We'd just need to make (defvar a b "*c") equivalent
   to (defcustom a b "c").

You make this sound a lot simpler than it would be.  This will have to
be handled individually and very carefully for each *-defvar, a huge
amount of work.  If an author decided to use a *-defvar instead of a
defcustom, there probably is a good reason why he decided not to use a
defcustom.  For instance, default-enable-multibyte-characters has a
*-defvar.  You do not want to turn this into a defcustom, because it
would duplicate the defcustom for enable-multibyte-characters, which
also sets the default value.  That would be extremely confusing to the
Custom user.  Not only would blindly turning a *-defvar into a
defcustom be dangerous, it is impossible.  You will have to decide on
a :group, a :type and so on.



reply via email to

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