# HG changeset patch # User Richard M. Stallman # Date 895636498 0 # Node ID 7c92848a9d80a2f366174f8ccb1925c71c998e0e # Parent f5e5d69e44c70fc6297e1d6a70e9bdc0bcc0f803 (set-variable): Offer variable at point as default. diff -r f5e5d69e44c7 -r 7c92848a9d80 lisp/simple.el --- 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))