On 6/28/05, Richard M. Stallman <[EMAIL PROTECTED]> wrote: > I don't like that idea. The command should accept *all* names, > whether obsolete or not. But it would be nice to inform the user in > the echo area that the name is obsolete, and give the new name if any.
With the installed changes for `user-variable-p' and the attached patch, `set-variable' now: - allows setting aliases of user options - does *not* filter out obsolete variables - shows a 3-seconds warning when the variable (alias or not) being set is obsolete; the warning includes the CURRENT-NAME information from `make-variable-obsolete' - does not show a warning for aliases (I don't think it's necessary to single out aliases if they aren't obsolete, and when they are, they already produce a warning) -- /L/e/k/t/u Index: lisp/simple.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/simple.el,v retrieving revision 1.734 diff -c -2 -b -r1.734 simple.el *** lisp/simple.el 24 Jun 2005 21:11:58 -0000 1.734 --- lisp/simple.el 29 Jun 2005 00:50:03 -0000 *************** *** 4539,4550 **** (minibuffer-help-form '(describe-variable var)) (prop (get var 'variable-interactive)) ! (prompt (format "Set %s%s to value: " var (cond ((local-variable-p var) ! " (buffer-local)") ((or current-prefix-arg (local-variable-if-set-p var)) ! " buffer-locally") ! (t " globally")))) ! (val (if prop ;; Use VAR's `variable-interactive' property ;; as an interactive spec for prompting. --- 4539,4557 ---- (minibuffer-help-form '(describe-variable var)) (prop (get var 'variable-interactive)) ! (obsolete (car (get var 'byte-obsolete-variable))) ! (prompt (format "Set %s %s to value: " var (cond ((local-variable-p var) ! "(buffer-local)") ((or current-prefix-arg (local-variable-if-set-p var)) ! "buffer-locally") ! (t "globally")))) ! (val (progn ! (when obsolete ! (message (concat "`%S' is obsolete; " ! (if (symbolp obsolete) "use `%S' instead" "%s")) ! var obsolete) ! (sit-for 3)) ! (if prop ;; Use VAR's `variable-interactive' property ;; as an interactive spec for prompting. *************** *** 4554,4558 **** (read (read-string prompt nil ! 'set-variable-value-history))))) (list var val current-prefix-arg))) --- 4561,4565 ---- (read (read-string prompt nil ! 'set-variable-value-history)))))) (list var val current-prefix-arg))) _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel