From: Dmitry Gutov Date: Wed, 26 Aug 2020 21:54:28 +0000 (+0300) Subject: Unbreak dired-do-find-regexp in Emacs 26 X-Git-Tag: emacs-28.0.90~6373 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c601211e0d2f5174b5e748115a785d583235fe6e;p=emacs.git Unbreak dired-do-find-regexp in Emacs 26 * lisp/progmodes/xref.el (xref--show-xrefs): Support the old convention (bug#42967). --- 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))))