From c601211e0d2f5174b5e748115a785d583235fe6e Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Thu, 27 Aug 2020 00:54:28 +0300 Subject: [PATCH] Unbreak dired-do-find-regexp in Emacs 26 * lisp/progmodes/xref.el (xref--show-xrefs): Support the old convention (bug#42967). --- lisp/progmodes/xref.el | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index 4da7b4ef301..264c750f019 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -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)))) -- 2.39.2