summaryrefslogtreecommitdiff
path: root/lisp/simple.el
diff options
context:
space:
mode:
authorErik Naggum <erik@naggum.no>1997-03-28 02:33:07 +0000
committerErik Naggum <erik@naggum.no>1997-03-28 02:33:07 +0000
commit5c719fb53aafe0c6b80acf56298105f870eed3fb (patch)
tree229841b87461af0653b2a2b2aae837711e0ffbdd /lisp/simple.el
parentb0fceac0b7a06f7f0c03b5b62af87fc5d0d58041 (diff)
downloademacs-5c719fb53aafe0c6b80acf56298105f870eed3fb.tar.gz
(set-variable): Use user-variable-p. Clean up.
Diffstat (limited to 'lisp/simple.el')
-rw-r--r--lisp/simple.el17
1 files changed, 8 insertions, 9 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 3b7913ff753..a25c33447c5 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -2979,15 +2979,14 @@ If you want VALUE to be a string, you must surround it with doublequotes.
If VARIABLE has a `variable-interactive' property, that is used as if
it were the arg to `interactive' (which see) to interactively read the value."
(interactive
- (let* ((var (let ((v (variable-at-point))
- (enable-recursive-minibuffers t)
- val)
- (setq val (completing-read (if v
- (format "Set variable (default %s): " v)
- "Set variable: ")
- obarray 'boundp t))
- (if (equal val "")
- v (intern val))))
+ (let* ((v (variable-at-point))
+ (enable-recursive-minibuffers t)
+ (val (completing-read
+ (if v
+ (format "Set variable (default %s): " v)
+ "Set variable: ")
+ obarray 'user-variable-p t))
+ (var (if (equal val "") v (intern val)))
(minibuffer-help-form
'(funcall myhelp))
(myhelp