diff options
author | Miles Bader <miles@gnu.org> | 2005-07-07 12:43:14 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2005-07-07 12:43:14 +0000 |
commit | d3e4babdd1267fb5690a17949196640a47c6f159 (patch) | |
tree | 968a42dfa187e492f9ce188aaf669d0cebf4bfe2 /lisp/simple.el | |
parent | eeb88b27e1dbd3f412aa684d44e4a784f6e536a2 (diff) | |
parent | a5717394ea6fbd7ea179c362646f4495f88245cb (diff) | |
download | emacs-d3e4babdd1267fb5690a17949196640a47c6f159.tar.gz |
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-68
Merge from emacs--cvs-trunk--0
Patches applied:
* emacs--cvs-trunk--0 (patch 459-473)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 86-87)
- Update from CVS
Diffstat (limited to 'lisp/simple.el')
-rw-r--r-- | lisp/simple.el | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index 3f9b4788373..3536253e120 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -21,8 +21,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Commentary: @@ -4538,22 +4538,29 @@ With a prefix argument, set VARIABLE to VALUE buffer-locally." (read-variable "Set variable: "))) (minibuffer-help-form '(describe-variable var)) (prop (get var 'variable-interactive)) - (prompt (format "Set %s%s to value: " var + (obsolete (car (get var 'byte-obsolete-variable))) + (prompt (format "Set %s %s to value: " var (cond ((local-variable-p var) - " (buffer-local)") + "(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. - (call-interactively `(lambda (arg) - (interactive ,prop) - arg)) - (read - (read-string prompt nil - 'set-variable-value-history))))) + "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. + (call-interactively `(lambda (arg) + (interactive ,prop) + arg)) + (read + (read-string prompt nil + 'set-variable-value-history)))))) (list var val current-prefix-arg))) (and (custom-variable-p variable) |