commit 5ad8a9ce57b6c076428286c3d25968b449ab6fd3
parent 34328c639ed7aad371a3f57209acad2a5bb66401
Author: StrawberryTea <look@strawberrytea.xyz>
Date: Wed, 19 Feb 2025 22:28:00 -0500
fix: Improve variable setting logic in helpful.el
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/helpful.el b/helpful.el
@@ -606,7 +606,9 @@ overrides that to include previously opened buffers."
(let* ((sym (button-get button 'symbol))
(buf (button-get button 'buffer))
(sym-value (helpful--sym-value sym buf))
- (set-func (symbol-name helpful-set-variable-function))
+ (set-func (if (local-variable-p sym buf)
+ "setq"
+ (symbol-name helpful-set-variable-function)))
;; Inspired by `counsel-read-setq-expression'.
(expr
(minibuffer-with-setup-hook