Skip to content

Commit 5ad8a9c

Browse files
LemonBreezesWilfred
authored andcommitted
fix: Improve variable setting logic in helpful.el
1 parent 34328c6 commit 5ad8a9c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

helpful.el

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,9 @@ overrides that to include previously opened buffers."
606606
(let* ((sym (button-get button 'symbol))
607607
(buf (button-get button 'buffer))
608608
(sym-value (helpful--sym-value sym buf))
609-
(set-func (symbol-name helpful-set-variable-function))
609+
(set-func (if (local-variable-p sym buf)
610+
"setq"
611+
(symbol-name helpful-set-variable-function)))
610612
;; Inspired by `counsel-read-setq-expression'.
611613
(expr
612614
(minibuffer-with-setup-hook

0 commit comments

Comments
 (0)