Unbreak dired-do-find-regexp in Emacs 26

* lisp/progmodes/xref.el (xref--show-xrefs):
Support the old convention (bug#42967).
This commit is contained in:
Dmitry Gutov 2020-08-27 00:54:28 +03:00
parent 7f6dba00ed
commit c601211e0d

View file

@ -963,6 +963,16 @@ Accepts the same arguments as `xref-show-xrefs-function'."
(defun xref--show-xrefs (fetcher display-action)
(xref--push-markers)
(unless (functionp fetcher)
;; Old convention.
(let ((xrefs fetcher))
(setq fetcher
(lambda ()
(if (eq xrefs 'called-already)
(user-error "Refresh is not supported")
(prog1
xrefs
(setq xrefs 'called-already)))))))
(funcall xref-show-xrefs-function fetcher
`((window . ,(selected-window))
(display-action . ,display-action))))