Wilfred / helpful

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

fix nil pos when building button for vars #331

Closed wyuenho closed 1 year ago

wyuenho commented 1 year ago

The button link for variables probably have been broken forever. On Emacs 29, when M-x helpful-variable RET vc-directory-exclusion-list, the find-variable-noselect call will call down to find-function-search-for-symbol, and then when trying to string-match 'defvar, an error complaining about 'defvar is not a string will be thrown and pos will always be set to nil, which mean clicking on the "defined in vc-hooks.el.gz" link will only send the user to the top of the file and not the line defining the variable. This PR fixes this issues.

Wilfred commented 1 year ago

Yikes, that's pretty subtle. Thanks!

wyuenho commented 1 year ago

That condition-case certainly didn't make discovering this issue easier ;)