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 (read-variable "Set variable: "))
+ (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))))
(minibuffer-help-form
'(funcall myhelp))
(myhelp