diff options
| author | Richard M. Stallman | 1998-05-20 03:54:58 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-05-20 03:54:58 +0000 |
| commit | e9dfb72ec11018390e1b00d6bd3c151d82c94f94 (patch) | |
| tree | feec158b3b9dbfe800a66f3d4c4c91d0c67b64c8 | |
| parent | e9cccb71831b509571c1f354bad1c8299cc6d81d (diff) | |
| download | emacs-e9dfb72ec11018390e1b00d6bd3c151d82c94f94.tar.gz emacs-e9dfb72ec11018390e1b00d6bd3c151d82c94f94.zip | |
(set-variable): Offer variable at point as default.
| -rw-r--r-- | lisp/simple.el | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index ae4ce391110..e025788bb70 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -3549,7 +3549,12 @@ it were the arg to `interactive' (which see) to interactively read VALUE. | |||
| 3549 | 3549 | ||
| 3550 | If VARIABLE has been defined with `defcustom', then the type information | 3550 | If VARIABLE has been defined with `defcustom', then the type information |
| 3551 | in the definition is used to check that VALUE is valid." | 3551 | in the definition is used to check that VALUE is valid." |
| 3552 | (interactive (let* ((var (read-variable "Set variable: ")) | 3552 | (interactive |
| 3553 | (let* ((default-var (variable-at-point)) | ||
| 3554 | (var (if (symbolp default-var) | ||
| 3555 | (read-variable (format "Set variable (default %s): " default-var) | ||
| 3556 | default-var) | ||
| 3557 | (read-variable "Set variable: "))) | ||
| 3553 | (minibuffer-help-form '(describe-variable var)) | 3558 | (minibuffer-help-form '(describe-variable var)) |
| 3554 | (prop (get var 'variable-interactive)) | 3559 | (prop (get var 'variable-interactive)) |
| 3555 | (prompt (format "Set %s to value: " var)) | 3560 | (prompt (format "Set %s to value: " var)) |