feature/lookup: fix xref-backend-identifier error from projectile-find-tag #385

This commit is contained in:
Henrik Lissner 2018-02-03 15:07:18 -05:00
parent 169cd809bc
commit 4ce521e26b
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -91,7 +91,13 @@ properties:
(after! xref
;; By default, `etags--xref-backend' is the default xref backend. No need.
;; We'll set these up ourselves in other modules.
(setq-default xref-backend-functions '(t)))
(setq-default xref-backend-functions '(t))
;; ...however, it breaks `projectile-find-tag', unless we put it back.
(defun +lookup*projectile-find-tag (orig-fn)
(let ((xref-backend-functions '(etags--xref-backend t)))
(funcall orig-fn)))
(advice-add #'projectile-find-tag :around #'+lookup*projectile-find-tag))
(defun +lookup|init-xref-backends ()
"Set `+lookup-current-functions' for the current buffer.