aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2005-10-21 08:48:04 +0000
committerJuri Linkov2005-10-21 08:48:04 +0000
commit0f518b6bd9d257e6cdc422da9c24e471f43166e0 (patch)
tree42700f4c3eab6c0651a806394544898a6e12364b
parentbb9404d64bbd1774a87b6effc11c4b667c2e18d6 (diff)
downloademacs-0f518b6bd9d257e6cdc422da9c24e471f43166e0.tar.gz
emacs-0f518b6bd9d257e6cdc422da9c24e471f43166e0.zip
(tags-table-mode): New function.
(tags-verify-table): Replace initialize-new-tags-table with tags-table-mode.
-rw-r--r--lisp/progmodes/etags.el14
1 files changed, 11 insertions, 3 deletions
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el
index ac2cc23048a..d9f4698ecf7 100644
--- a/lisp/progmodes/etags.el
+++ b/lisp/progmodes/etags.el
@@ -274,6 +274,14 @@ One argument, the tag info returned by `snarf-tag-function'.")
274 (run-hook-with-args-until-success 'tags-table-format-functions)) 274 (run-hook-with-args-until-success 'tags-table-format-functions))
275 275
276;;;###autoload 276;;;###autoload
277(defun tags-table-mode ()
278 "Major mode for tags table file buffers."
279 (interactive)
280 (setq major-mode 'tags-table-mode)
281 (setq mode-name "Tags Table")
282 (initialize-new-tags-table))
283
284;;;###autoload
277(defun visit-tags-table (file &optional local) 285(defun visit-tags-table (file &optional local)
278 "Tell tags commands to use tags table file FILE. 286 "Tell tags commands to use tags table file FILE.
279FILE should be the name of a file created with the `etags' program. 287FILE should be the name of a file created with the `etags' program.
@@ -415,7 +423,7 @@ Returns non-nil iff it is a valid table."
415 ;; having changed since we last used it. 423 ;; having changed since we last used it.
416 (let (win) 424 (let (win)
417 (set-buffer (get-file-buffer file)) 425 (set-buffer (get-file-buffer file))
418 (setq win (or verify-tags-table-function (initialize-new-tags-table))) 426 (setq win (or verify-tags-table-function (tags-table-mode)))
419 (if (or (verify-visited-file-modtime (current-buffer)) 427 (if (or (verify-visited-file-modtime (current-buffer))
420 ;; Decide whether to revert the file. 428 ;; Decide whether to revert the file.
421 ;; revert-without-query can say to revert 429 ;; revert-without-query can say to revert
@@ -434,7 +442,7 @@ Returns non-nil iff it is a valid table."
434 (and verify-tags-table-function 442 (and verify-tags-table-function
435 (funcall verify-tags-table-function)) 443 (funcall verify-tags-table-function))
436 (revert-buffer t t) 444 (revert-buffer t t)
437 (initialize-new-tags-table))) 445 (tags-table-mode)))
438 (and (file-exists-p file) 446 (and (file-exists-p file)
439 (progn 447 (progn
440 (set-buffer (find-file-noselect file)) 448 (set-buffer (find-file-noselect file))
@@ -446,7 +454,7 @@ Returns non-nil iff it is a valid table."
446 (setcar tail buffer-file-name)) 454 (setcar tail buffer-file-name))
447 (if (eq file tags-file-name) 455 (if (eq file tags-file-name)
448 (setq tags-file-name buffer-file-name)))) 456 (setq tags-file-name buffer-file-name))))
449 (initialize-new-tags-table))))) 457 (tags-table-mode)))))
450 458
451;; Subroutine of visit-tags-table-buffer. Search the current tags tables 459;; Subroutine of visit-tags-table-buffer. Search the current tags tables
452;; for one that has tags for THIS-FILE (or that includes a table that 460;; for one that has tags for THIS-FILE (or that includes a table that