diff options
author | Erik Naggum <erik@naggum.no> | 1997-03-28 02:33:07 +0000 |
---|---|---|
committer | Erik Naggum <erik@naggum.no> | 1997-03-28 02:33:07 +0000 |
commit | 5c719fb53aafe0c6b80acf56298105f870eed3fb (patch) | |
tree | 229841b87461af0653b2a2b2aae837711e0ffbdd /lisp/simple.el | |
parent | b0fceac0b7a06f7f0c03b5b62af87fc5d0d58041 (diff) | |
download | emacs-5c719fb53aafe0c6b80acf56298105f870eed3fb.tar.gz |
(set-variable): Use user-variable-p. Clean up.
Diffstat (limited to 'lisp/simple.el')
-rw-r--r-- | lisp/simple.el | 17 |
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 |