Merge pull request #5251 from iyefrat/emacs27

Remove remaining `Emacs27+` checks
This commit is contained in:
Henrik Lissner 2021-07-10 10:29:07 -04:00 committed by GitHub
commit b886b9a635
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 24 additions and 54 deletions

View file

@ -165,13 +165,8 @@ Dictionary.app behind the scenes to get definitions.")
:when (featurep! :completion ivy)
:config
(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)
(setq xref-show-definitions-function #'ivy-xref-show-defs
xref-show-xrefs-function #'ivy-xref-show-xrefs)
;; HACK Fix #4386: `ivy-xref-show-xrefs' calls `fetcher' twice, which has
;; side effects that breaks in some cases (i.e. on `dired-do-find-regexp').