4538 |
(read-variable "Set variable: "))) |
(read-variable "Set variable: "))) |
4539 |
(minibuffer-help-form '(describe-variable var)) |
(minibuffer-help-form '(describe-variable var)) |
4540 |
(prop (get var 'variable-interactive)) |
(prop (get var 'variable-interactive)) |
4541 |
(prompt (format "Set %s%s to value: " var |
(obsolete (car (get var 'byte-obsolete-variable))) |
4542 |
|
(prompt (format "Set %s %s to value: " var |
4543 |
(cond ((local-variable-p var) |
(cond ((local-variable-p var) |
4544 |
" (buffer-local)") |
"(buffer-local)") |
4545 |
((or current-prefix-arg |
((or current-prefix-arg |
4546 |
(local-variable-if-set-p var)) |
(local-variable-if-set-p var)) |
4547 |
" buffer-locally") |
"buffer-locally") |
4548 |
(t " globally")))) |
(t "globally")))) |
4549 |
(val (if prop |
(val (progn |
4550 |
;; Use VAR's `variable-interactive' property |
(when obsolete |
4551 |
;; as an interactive spec for prompting. |
(message (concat "`%S' is obsolete; " |
4552 |
(call-interactively `(lambda (arg) |
(if (symbolp obsolete) "use `%S' instead" "%s")) |
4553 |
(interactive ,prop) |
var obsolete) |
4554 |
arg)) |
(sit-for 3)) |
4555 |
(read |
(if prop |
4556 |
(read-string prompt nil |
;; Use VAR's `variable-interactive' property |
4557 |
'set-variable-value-history))))) |
;; as an interactive spec for prompting. |
4558 |
|
(call-interactively `(lambda (arg) |
4559 |
|
(interactive ,prop) |
4560 |
|
arg)) |
4561 |
|
(read |
4562 |
|
(read-string prompt nil |
4563 |
|
'set-variable-value-history)))))) |
4564 |
(list var val current-prefix-arg))) |
(list var val current-prefix-arg))) |
4565 |
|
|
4566 |
(and (custom-variable-p variable) |
(and (custom-variable-p variable) |