]> git.eshelyaron.com Git - emacs.git/commitdiff
(set-variable): Use user-variable-p. Clean up.
authorErik Naggum <erik@naggum.no>
Fri, 28 Mar 1997 02:33:07 +0000 (02:33 +0000)
committerErik Naggum <erik@naggum.no>
Fri, 28 Mar 1997 02:33:07 +0000 (02:33 +0000)
lisp/simple.el

index 3b7913ff75359c1115fc4ef93641b3c56e98c114..a25c33447c577ad088721b6e25a65f9a0f0a4c1d 100644 (file)
@@ -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