changeset 22157:7c92848a9d80

(set-variable): Offer variable at point as default.
author Richard M. Stallman <rms@gnu.org>
date Wed, 20 May 1998 03:54:58 +0000
parents f5e5d69e44c7
children aca5c8cb2c04
files lisp/simple.el
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/simple.el	Wed May 20 03:01:19 1998 +0000
+++ b/lisp/simple.el	Wed May 20 03:54:58 1998 +0000
@@ -3549,7 +3549,12 @@
 
 If VARIABLE has been defined with `defcustom', then the type information
 in the definition is used to check that VALUE is valid."
-  (interactive (let* ((var (read-variable "Set variable: "))
+  (interactive
+   (let* ((default-var (variable-at-point))
+          (var (if (symbolp default-var)
+                   (read-variable (format "Set variable (default %s): " default-var)
+                                  default-var)
+                 (read-variable "Set variable: ")))
 		      (minibuffer-help-form '(describe-variable var))
 		      (prop (get var 'variable-interactive))
 		      (prompt (format "Set %s to value: " var))