Skip to content

Commit

Permalink
remove: open the buffer in other window in helpful
Browse files Browse the repository at this point in the history
delete advice from helpful--navigate
  • Loading branch information
seagle0128 committed Nov 5, 2024
1 parent f518685 commit c7ef825
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions lisp/init-elisp.el
Original file line number Diff line number Diff line change
Expand Up @@ -237,19 +237,7 @@ Lisp function does not specify a special indentation."
(button-type-put
var-bt 'action
(lambda (button)
(helpful-variable (button-get button 'apropos-symbol)))))))
:config
(with-no-warnings
;; Open the buffer in other window
(defun my-helpful--navigate (button)
"Navigate to the path this BUTTON represents."
(find-file-other-window (substring-no-properties (button-get button 'path)))
;; We use `get-text-property' to work around an Emacs 25 bug:
;; http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=f7c4bad17d83297ee9a1b57552b1944020f23aea
(-when-let (pos (get-text-property button 'position
(marker-buffer button)))
(helpful--goto-char-widen pos)))
(advice-add #'helpful--navigate :override #'my-helpful--navigate)))
(helpful-variable (button-get button 'apropos-symbol))))))))

;; Integrate Ert-runner
(use-package overseer
Expand Down

0 comments on commit c7ef825

Please sign in to comment.