aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorSam Steingold2017-11-24 14:25:41 -0500
committerSam Steingold2017-11-24 14:25:56 -0500
commit74b5103511dd41dbc0eda5ee848131eed6debc9a (patch)
tree14f718da6db5b83fc23df8c7da698d2e41a64062 /lisp
parenta45a33097fc9f748a96226d6ebc2c872445348b0 (diff)
downloademacs-74b5103511dd41dbc0eda5ee848131eed6debc9a.tar.gz
emacs-74b5103511dd41dbc0eda5ee848131eed6debc9a.zip
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.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/progmodes/etags.el40
1 files changed, 21 insertions, 19 deletions
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."
436 (progn 436 (progn
437 (set-buffer (get-file-buffer file)) 437 (set-buffer (get-file-buffer file))
438 (or verify-tags-table-function (tags-table-mode)) 438 (or verify-tags-table-function (tags-table-mode))
439 (if (or (verify-visited-file-modtime (current-buffer)) 439 (unless (or (verify-visited-file-modtime (current-buffer))
440 ;; Decide whether to revert the file. 440 ;; Decide whether to revert the file.
441 ;; revert-without-query can say to revert 441 ;; revert-without-query can say to revert
442 ;; or the user can say to revert. 442 ;; or the user can say to revert.
443 (not (or (let ((tail revert-without-query) 443 (not (or (let ((tail revert-without-query)
444 (found nil)) 444 (found nil))
445 (while tail 445 (while tail
446 (if (string-match (car tail) buffer-file-name) 446 (if (string-match (car tail) buffer-file-name)
447 (setq found t)) 447 (setq found t))
448 (setq tail (cdr tail))) 448 (setq tail (cdr tail)))
449 found) 449 found)
450 tags-revert-without-query 450 tags-revert-without-query
451 (yes-or-no-p 451 (yes-or-no-p
452 (format "Tags file %s has changed, read new contents? " 452 (format "Tags file %s has changed, read new contents? "
453 file))))) 453 file)))))
454 (and verify-tags-table-function
455 (funcall verify-tags-table-function))
456 (revert-buffer t t) 454 (revert-buffer t t)
457 (tags-table-mode))) 455 (tags-table-mode))
456 (and verify-tags-table-function
457 (funcall verify-tags-table-function)))
458 (when (file-exists-p file) 458 (when (file-exists-p file)
459 (let* ((buf (find-file-noselect file)) 459 (let* ((buf (find-file-noselect file))
460 (newfile (buffer-file-name buf))) 460 (newfile (buffer-file-name buf)))
@@ -467,7 +467,9 @@ Returns non-nil if it is a valid table."
467 ;; Only change buffer now that we're done using potentially 467 ;; Only change buffer now that we're done using potentially
468 ;; buffer-local variables. 468 ;; buffer-local variables.
469 (set-buffer buf) 469 (set-buffer buf)
470 (tags-table-mode))))) 470 (tags-table-mode)
471 (and verify-tags-table-function
472 (funcall verify-tags-table-function))))))
471 473
472;; Subroutine of visit-tags-table-buffer. Search the current tags tables 474;; Subroutine of visit-tags-table-buffer. Search the current tags tables
473;; for one that has tags for THIS-FILE (or that includes a table that 475;; for one that has tags for THIS-FILE (or that includes a table that