From: Sam Steingold Date: Fri, 24 Nov 2017 19:25:41 +0000 (-0500) Subject: Fix last patch: ensure the return value of tags-verify-table. X-Git-Tag: emacs-27.0.90~6130 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=74b5103511dd41dbc0eda5ee848131eed6debc9a;p=emacs.git Fix last patch: ensure the return value of tags-verify-table. * lisp/progmodes/etags.el (tags-verify-table): Since `(tags-table-mode)' always return nil now that it is a derived mode, call `verify-tags-table-function' explicitly. --- diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index 50a9f8190db..9b21ee67ed1 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el @@ -436,25 +436,25 @@ Returns non-nil if it is a valid table." (progn (set-buffer (get-file-buffer file)) (or verify-tags-table-function (tags-table-mode)) - (if (or (verify-visited-file-modtime (current-buffer)) - ;; Decide whether to revert the file. - ;; revert-without-query can say to revert - ;; or the user can say to revert. - (not (or (let ((tail revert-without-query) - (found nil)) - (while tail - (if (string-match (car tail) buffer-file-name) - (setq found t)) - (setq tail (cdr tail))) - found) - tags-revert-without-query - (yes-or-no-p - (format "Tags file %s has changed, read new contents? " - file))))) - (and verify-tags-table-function - (funcall verify-tags-table-function)) + (unless (or (verify-visited-file-modtime (current-buffer)) + ;; Decide whether to revert the file. + ;; revert-without-query can say to revert + ;; or the user can say to revert. + (not (or (let ((tail revert-without-query) + (found nil)) + (while tail + (if (string-match (car tail) buffer-file-name) + (setq found t)) + (setq tail (cdr tail))) + found) + tags-revert-without-query + (yes-or-no-p + (format "Tags file %s has changed, read new contents? " + file))))) (revert-buffer t t) - (tags-table-mode))) + (tags-table-mode)) + (and verify-tags-table-function + (funcall verify-tags-table-function))) (when (file-exists-p file) (let* ((buf (find-file-noselect file)) (newfile (buffer-file-name buf))) @@ -467,7 +467,9 @@ Returns non-nil if it is a valid table." ;; Only change buffer now that we're done using potentially ;; buffer-local variables. (set-buffer buf) - (tags-table-mode))))) + (tags-table-mode) + (and verify-tags-table-function + (funcall verify-tags-table-function)))))) ;; Subroutine of visit-tags-table-buffer. Search the current tags tables ;; for one that has tags for THIS-FILE (or that includes a table that