Open hlissner opened 4 years ago
I looked at the latest code and if there is a buffer local value, then the "Global value" will never be displayed:
@Wilfred Is there any particular reason for this?
Code to reproduce:
(progn
(defvar foo '(1))
(put 'foo 'standard-value (list (list 'quote '(2))))
(setq-local foo '(3))
(describe-variable 'foo)
(helpful-variable 'foo))
See #311 for a possible fix.
When I invoke
M-x helpful-variable
on any hook variable with a buffer-local value, helpful displays its buffer-local value, but no "Global Value" button to toggle its global value.I find changing this line
https://github.com/Wilfred/helpful/blob/c0662aa07266fe204f4e6d72ccaa6af089400556/helpful.el#L2190
To
fixes the issue for me, but introduces another: once you toggle the global value of a hook, both "Buffer values" and "Global values" buttons disappear. No way to return to the buffer-local value without invoking helpful-variable from scratch.
Tested on Emacs 26.3 and 27.0.91 in vanilla and Doom Emacs, with the latest commit of helpful (c0662aa07266fe204f4e6d72ccaa6af089400556).