emacs-devel
[Top][All Lists]
Advanced

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

Re: Documentation not clear for the Lisp function set-variable


From: Juri Linkov
Subject: Re: Documentation not clear for the Lisp function set-variable
Date: Mon, 27 Jun 2005 02:23:38 +0300
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

> How about this doc string?
>
> (defun set-variable (var val &optional make-local)
>   "Set VARIABLE to VALUE.  VALUE is a Lisp object.
> VARIABLE should be a user option variable name, a Lisp variable
> meant to be customized by users.  You should enter VALUE in Lisp syntax,
> so if you want VALUE to be a string, you must surround it with doublequotes.
> VALUE is used literally, not evaluated.
>
> If VARIABLE has a `variable-interactive' property, that is used as if
> it were the arg to `interactive' (which see) to interactively read VALUE.
>
> If VARIABLE has been defined with `defcustom', then the type information
> in the definition is used to check that VALUE is valid.
>
> With a prefix argument, set VARIABLE to VALUE buffer-locally."

There is one problem with `set-variable'.  When called interactively
it doesn't accept aliased user options.  For example,

    M-x set-variable RET messages-buffer-max-lines RET

reports that there are no matches, whereas `messages-buffer-max-lines'
is a valid alias for `message-log-max'.  IMO, `set-variable' should
accept an alias when it is not marked as obsolete.

-- 
Juri Linkov
http://www.jurta.org/emacs/





reply via email to

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