Wilfred / helpful

A better Emacs *help* buffer
1.1k stars 62 forks source link

Treatment of local/global values #312

Open haji-ali opened 1 year ago

haji-ali commented 1 year ago

While writing #311, I noticed that helpful calls the function local-variable-if-set-p without a second argument which means that it defaults to the current buffer (being the helpful buffer in most cases) even when helpful--associated-buffer is non-nil. Is this intentional?

Also, there are several places where symbol-value is called without with-current-buffer even when helpful--associated-buffer is non-nil. For example, in https://github.com/Wilfred/helpful/blob/94c25337b2de2f9da60914a7c0c6cca9584c0231/helpful.el#L2199-L2205

The test if the local value is different will be against the value in the current buffer (the helpful buffer) rather than the associated buffer. So the original value will not be shown even if it is changed in the local buffer.