aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStrawberryTea <look@strawberrytea.xyz>2025-02-19 22:28:00 -0500
committerWilfred Hughes <me@wilfred.me.uk>2025-02-20 00:45:18 -0500
commit5ad8a9ce57b6c076428286c3d25968b449ab6fd3 (patch)
tree4a1ea6c71897dabf46c4cc49d3a825d75f147080
parent34328c639ed7aad371a3f57209acad2a5bb66401 (diff)
fix: Improve variable setting logic in helpful.el
-rw-r--r--helpful.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/helpful.el b/helpful.el
index de41012..b100816 100644
--- 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