Update {ivy,helm}-xref for Emacs 27

More variables to set!
This commit is contained in:
Henrik Lissner 2020-04-24 15:12:33 -04:00
parent 2389332b90
commit ecdeb489f8
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -136,12 +136,17 @@ Dictionary.app behind the scenes to get definitions.")
(use-package! ivy-xref (use-package! ivy-xref
:when (featurep! :completion ivy) :when (featurep! :completion ivy)
:config :config
(setq xref-show-xrefs-function #'ivy-xref-show-xrefs) (set-popup-rule! "^\\*xref\\*$" :ignore t)
(set-popup-rule! "^\\*xref\\*$" :ignore t)) ;; xref initialization is different in Emacs 27 - there are two different
;; variables which can be set rather than just one
(when EMACS27+
(setq xref-show-definitions-function #'ivy-xref-show-defs))
;; Necessary in Emacs <27. In Emacs 27 it will affect all xref-based
;; commands other than xref-find-definitions too (eg project-find-regexp)
(setq xref-show-xrefs-function #'ivy-xref-show-xrefs))
(use-package! helm-xref (use-package! helm-xref
:when (featurep! :completion helm) :when (featurep! :completion helm)))
:config (setq xref-show-xrefs-function (if EMACS27+ #'helm-xref-show-xrefs-27 #'helm-xref-show-xrefs))))
;; ;;