diff options
author | Johan Claesson <[email protected]> | 2017-08-26 12:02:34 +0200 |
---|---|---|
committer | Johan Claesson <[email protected]> | 2017-09-05 22:38:36 +0200 |
commit | ba25346f6e5aec1399cb8b97209e8cc127b8e8eb (patch) | |
tree | 66e28327ccc5e6260739df2994f25b543498bcf7 /lib/tools/emacs/erlang.el | |
parent | 15867bb63d1d4109780652c5b3580870857b27b9 (diff) | |
download | otp-ba25346f6e5aec1399cb8b97209e8cc127b8e8eb.tar.gz otp-ba25346f6e5aec1399cb8b97209e8cc127b8e8eb.tar.bz2 otp-ba25346f6e5aec1399cb8b97209e8cc127b8e8eb.zip |
Emacs: Update erlang-xref-find-definitions-module for Emacs 26
The number of arguments to visit-tags-table-buffer have
increased in Emacs 26.
Diffstat (limited to 'lib/tools/emacs/erlang.el')
-rw-r--r-- | lib/tools/emacs/erlang.el | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/tools/emacs/erlang.el b/lib/tools/emacs/erlang.el index f3c3a6bae1..63ad21b138 100644 --- a/lib/tools/emacs/erlang.el +++ b/lib/tools/emacs/erlang.el @@ -5008,9 +5008,10 @@ considered first when it is time to jump to the definition.") (and (fboundp 'xref-make) (fboundp 'xref-make-file-location) (let* ((first-time t) + (cbuf (current-buffer)) xrefs matching-files) (save-excursion - (while (visit-tags-table-buffer (not first-time)) + (while (erlang-visit-tags-table-buffer (not first-time) cbuf) (setq first-time nil) (let ((files (tags-table-files))) (while files @@ -5026,6 +5027,10 @@ considered first when it is time to jump to the definition.") (setq files (cdr files)))))) (nreverse xrefs)))) +(defun erlang-visit-tags-table-buffer (cont cbuf) + (if (< emacs-major-version 26) + (visit-tags-table-buffer cont) + (visit-tags-table-buffer cont cbuf))) (defun erlang-xref-find-definitions-module-tag (module tag |