Fix dump jump local advice

Targeting https://github.com/hlissner/doom-emacs/issues/227
This commit is contained in:
Amos Bird 2017-10-16 02:05:05 -05:00 committed by GitHub
parent 8fc1c46dca
commit 1f87eb4a5c

View file

@ -36,11 +36,10 @@ Tries xref and falls back to `dumb-jump', then rg/ag, then
((and (fboundp 'dumb-jump-go)
;; dumb-jump doesn't tell us if it succeeded or not
(let (successful)
(cl-letf (((symbol-function 'dumb-jump-result-follow)
`(lambda (result &optional use-tooltip proj)
(setq successful t)
(,(symbol-function 'dumb-jump-result-follow)
result use-tooltip proj))))
(flet ((old-dumb-jump-result-follow (result &optional use-tooltip proj) (dumb-jump-result-follow result use-tooltip proj))
(dumb-jump-result-follow (result &optional use-tooltip proj)
(setq successful t)
(old-dumb-jump-result-follow result use-tooltip proj)))
(if other-window
(dumb-jump-go-other-window)
(dumb-jump-go))