diff options
| author | Dmitry Gutov | 2020-08-27 00:54:28 +0300 |
|---|---|---|
| committer | Dmitry Gutov | 2020-08-27 00:56:16 +0300 |
| commit | c601211e0d2f5174b5e748115a785d583235fe6e (patch) | |
| tree | 5ca94a76e59da01c9053c79f553520ed601506fe | |
| parent | 7f6dba00edcccd6510185108a5c4bbb010393230 (diff) | |
| download | emacs-c601211e0d2f5174b5e748115a785d583235fe6e.tar.gz emacs-c601211e0d2f5174b5e748115a785d583235fe6e.zip | |
Unbreak dired-do-find-regexp in Emacs 26
* lisp/progmodes/xref.el (xref--show-xrefs):
Support the old convention (bug#42967).
| -rw-r--r-- | lisp/progmodes/xref.el | 10 |
1 files changed, 10 insertions, 0 deletions
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'." | |||
| 963 | 963 | ||
| 964 | (defun xref--show-xrefs (fetcher display-action) | 964 | (defun xref--show-xrefs (fetcher display-action) |
| 965 | (xref--push-markers) | 965 | (xref--push-markers) |
| 966 | (unless (functionp fetcher) | ||
| 967 | ;; Old convention. | ||
| 968 | (let ((xrefs fetcher)) | ||
| 969 | (setq fetcher | ||
| 970 | (lambda () | ||
| 971 | (if (eq xrefs 'called-already) | ||
| 972 | (user-error "Refresh is not supported") | ||
| 973 | (prog1 | ||
| 974 | xrefs | ||
| 975 | (setq xrefs 'called-already))))))) | ||
| 966 | (funcall xref-show-xrefs-function fetcher | 976 | (funcall xref-show-xrefs-function fetcher |
| 967 | `((window . ,(selected-window)) | 977 | `((window . ,(selected-window)) |
| 968 | (display-action . ,display-action)))) | 978 | (display-action . ,display-action)))) |