From: Juri Linkov Date: Fri, 21 Oct 2005 08:48:04 +0000 (+0000) Subject: (tags-table-mode): New function. X-Git-Tag: emacs-pretest-22.0.90~6436 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0f518b6bd9d257e6cdc422da9c24e471f43166e0;p=emacs.git (tags-table-mode): New function. (tags-verify-table): Replace initialize-new-tags-table with tags-table-mode. --- 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 @@ -273,6 +273,14 @@ One argument, the tag info returned by `snarf-tag-function'.") ;; Value is t if we have found a valid tags table buffer. (run-hook-with-args-until-success 'tags-table-format-functions)) +;;;###autoload +(defun tags-table-mode () + "Major mode for tags table file buffers." + (interactive) + (setq major-mode 'tags-table-mode) + (setq mode-name "Tags Table") + (initialize-new-tags-table)) + ;;;###autoload (defun visit-tags-table (file &optional local) "Tell tags commands to use tags table file FILE. @@ -415,7 +423,7 @@ Returns non-nil iff it is a valid table." ;; having changed since we last used it. (let (win) (set-buffer (get-file-buffer file)) - (setq win (or verify-tags-table-function (initialize-new-tags-table))) + (setq win (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 @@ -434,7 +442,7 @@ Returns non-nil iff it is a valid table." (and verify-tags-table-function (funcall verify-tags-table-function)) (revert-buffer t t) - (initialize-new-tags-table))) + (tags-table-mode))) (and (file-exists-p file) (progn (set-buffer (find-file-noselect file)) @@ -446,7 +454,7 @@ Returns non-nil iff it is a valid table." (setcar tail buffer-file-name)) (if (eq file tags-file-name) (setq tags-file-name buffer-file-name)))) - (initialize-new-tags-table))))) + (tags-table-mode))))) ;; 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