[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Documentation not clear for the Lisp function set-variable
From: |
Stefan Monnier |
Subject: |
Re: Documentation not clear for the Lisp function set-variable |
Date: |
Tue, 28 Jun 2005 12:09:01 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
> - Is there a consensus whether obsolete aliases should be shown or
> not? In a recent message Juri proposed that obsolete aliases were not
> shown by default, but could be set anyway. Currently `set-variable'
> does not accept unknown variable names (to prevent the user setting
> misspelled variables, I suppose). Doing what Juri proposes would mean
> either changing that, or modifying `read-variable' to check after the
> fact whether a given symbol is an obsolete alias or not; all that for
> no clear added benefit, and with the added inconvenience that the user
> will end typing more if he really wants to set an obsolete alias and
> not the current variable the alias points to.
I think we should use the complete-in-turn thingy so that completion first
tries to complete without obsolete vars and only if that fails then it tries
to complete with obsolete vars.
> - It is OK for `user-variable-p' to return nil for alias loops
> instead of signaling an error?
Looks fine to me. If it's an alias loop, it's not a user-variable.
> - Should `set-variable' give warnings for all aliases, for obsolete
> aliases only? Should o it for obsolete variables even if they aren't
> aliases?
I recommend not to classify cases as "alias" and "obsolete alias"
but as "alias" and "obsolete" where this latter case can be an alias
or not. Setting an obsolete var should be discouraged, whether it's aliased
to some other var or not.
> - What's the right moment to give the warning? Before setting the
> value or after it?
If you want a warning for aliases, it should come after, in the same way as
the display of shortcuts after M-x foobar RET.
As for warnings of obsoleteness, I would argue to put them before (with
a (sit-for 1)), since we want to send a clear message that they should not
use this variable any more.
Stefan
- Re: Documentation not clear for the Lisp function set-variable, (continued)
- Re: Documentation not clear for the Lisp function set-variable, Eli Zaretskii, 2005/06/27
- Re: Documentation not clear for the Lisp function set-variable, Luc Teirlinck, 2005/06/27
- Re: Documentation not clear for the Lisp function set-variable, Juanma Barranquero, 2005/06/27
- Re: Documentation not clear for the Lisp function set-variable, Eli Zaretskii, 2005/06/27
- Re: Documentation not clear for the Lisp function set-variable, Juanma Barranquero, 2005/06/28
- Re: Documentation not clear for the Lisp function set-variable, Richard M. Stallman, 2005/06/28
- Re: Documentation not clear for the Lisp function set-variable, Juanma Barranquero, 2005/06/28
- Re: Documentation not clear for the Lisp function set-variable, Juanma Barranquero, 2005/06/28
- Re: Documentation not clear for the Lisp function set-variable,
Stefan Monnier <=
- Re: Documentation not clear for the Lisp function set-variable, Juanma Barranquero, 2005/06/28
- Re: Documentation not clear for the Lisp function set-variable, Stefan Monnier, 2005/06/29
- Re: Documentation not clear for the Lisp function set-variable, Juanma Barranquero, 2005/06/29
- Re: Documentation not clear for the Lisp function set-variable, Richard M. Stallman, 2005/06/29
- Re: Documentation not clear for the Lisp function set-variable, Richard M. Stallman, 2005/06/27