Mercurial > emacs
diff lisp/simple.el @ 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 | 632fc074e4d7 |
children | 23e2e03f2bf6 |
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))