diff options
| author | Juri Linkov | 2005-10-21 08:55:12 +0000 |
|---|---|---|
| committer | Juri Linkov | 2005-10-21 08:55:12 +0000 |
| commit | 7fd0ef0d7ea2115ca8a91f7090f4384a588df605 (patch) | |
| tree | b037c91e7342cf5628b2009c8186014cd1dd6abe /lisp/simple.el | |
| parent | 08150aa07e70fa16fe75a8764ffc053ec3224621 (diff) | |
| download | emacs-7fd0ef0d7ea2115ca8a91f7090f4384a588df605.tar.gz emacs-7fd0ef0d7ea2115ca8a91f7090f4384a588df605.zip | |
(set-variable): Use user-variable-p instead of symbolp.
Add the old variable value as 4th default-value arg of read-string.
Diffstat (limited to 'lisp/simple.el')
| -rw-r--r-- | lisp/simple.el | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index 8f98b1cc907..efe1559cb4d 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -4572,10 +4572,10 @@ in the definition is used to check that VALUE is valid. | |||
| 4572 | With a prefix argument, set VARIABLE to VALUE buffer-locally." | 4572 | With a prefix argument, set VARIABLE to VALUE buffer-locally." |
| 4573 | (interactive | 4573 | (interactive |
| 4574 | (let* ((default-var (variable-at-point)) | 4574 | (let* ((default-var (variable-at-point)) |
| 4575 | (var (if (symbolp default-var) | 4575 | (var (if (user-variable-p default-var) |
| 4576 | (read-variable (format "Set variable (default %s): " default-var) | 4576 | (read-variable (format "Set variable (default %s): " default-var) |
| 4577 | default-var) | 4577 | default-var) |
| 4578 | (read-variable "Set variable: "))) | 4578 | (read-variable "Set variable: "))) |
| 4579 | (minibuffer-help-form '(describe-variable var)) | 4579 | (minibuffer-help-form '(describe-variable var)) |
| 4580 | (prop (get var 'variable-interactive)) | 4580 | (prop (get var 'variable-interactive)) |
| 4581 | (obsolete (car (get var 'byte-obsolete-variable))) | 4581 | (obsolete (car (get var 'byte-obsolete-variable))) |
| @@ -4600,7 +4600,8 @@ With a prefix argument, set VARIABLE to VALUE buffer-locally." | |||
| 4600 | arg)) | 4600 | arg)) |
| 4601 | (read | 4601 | (read |
| 4602 | (read-string prompt nil | 4602 | (read-string prompt nil |
| 4603 | 'set-variable-value-history)))))) | 4603 | 'set-variable-value-history |
| 4604 | (format "%S" (symbol-value var)))))))) | ||
| 4604 | (list var val current-prefix-arg))) | 4605 | (list var val current-prefix-arg))) |
| 4605 | 4606 | ||
| 4606 | (and (custom-variable-p variable) | 4607 | (and (custom-variable-p variable) |