From ba25346f6e5aec1399cb8b97209e8cc127b8e8eb Mon Sep 17 00:00:00 2001 From: Johan Claesson Date: Sat, 26 Aug 2017 12:02:34 +0200 Subject: Emacs: Update erlang-xref-find-definitions-module for Emacs 26 The number of arguments to visit-tags-table-buffer have increased in Emacs 26. --- lib/tools/emacs/erlang.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/tools/emacs') 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 -- cgit v1.2.3