* lisp/progmodes/etags.el (tags-table-mode): Define using
`define-derived-mode', inheriting from `special-mode'.
Not only the buffer is now read-only, but you can bury it with "q".
(select-tags-table-mode): No need to set `buffer-read-only'
explicitly, `special-mode' takes care of that.
* lisp/vc/log-edit.el (log-edit-show-files): Use `special-mode'
instead of setting `buffer-read-only' explicitly.
(run-hook-with-args-until-success 'tags-table-format-functions))
;;;###autoload
-(defun tags-table-mode ()
+(define-derived-mode tags-table-mode special-mode "Tags Table"
"Major mode for tags table file buffers."
- (interactive)
- (setq major-mode 'tags-table-mode ;FIXME: Use define-derived-mode.
- mode-name "Tags Table"
- buffer-undo-list t)
+ (setq buffer-undo-list t)
(initialize-new-tags-table))
;;;###autoload
(define-derived-mode select-tags-table-mode special-mode "Select Tags Table"
"Major mode for choosing a current tags table among those already loaded."
- (setq buffer-read-only t))
+ )
(defun select-tags-table-select (button)
"Select the tags table named on this line."
(setq buffer-read-only nil)
(erase-buffer)
(cvs-insert-strings files)
- (setq buffer-read-only t)
+ (special-mode)
(goto-char (point-min))
(save-selected-window
(cvs-pop-to-buffer-same-frame buf)