commit 98f5f20e201453040e82102603ed1f1ce6699a67 parent 2565d0425297567ab176ab55670c7d0d108b1cb9 Author: Wilfred Hughes <me@wilfred.me.uk> Date: Fri, 21 Sep 2018 01:23:22 +0100 Ensure we don't quote keywords or nil in variable assignment prompt Diffstat:
| M | CHANGELOG.md | | | 3 | +++ |
| M | helpful.el | | | 5 | ++++- |
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -6,6 +6,9 @@ slower. Fixed an issue with Remacs compatibility. +Fixed an issue with the prompt when setting variables whose current +value was nil or a keyword. + # v0.13 Buffer-local variables are now highlighted, and it's possible to see diff --git a/helpful.el b/helpful.el @@ -544,7 +544,10 @@ overrides that to include previously opened buffers." (read-from-minibuffer "Eval: " (format - (if (or (symbolp sym-value) (consp sym-value)) + (if (or (consp sym-value) + (and (symbolp sym-value) + (not (null sym-value)) + (not (keywordp sym-value)))) "(setq %s '%S)" "(setq %s %S)") sym sym-value)