changeset 61363:eebed65dbe97

(Info-mode): Add `Info-kill-buffer' to `kill-buffer-hook' locally instead of adding it to the global hook. (Info-kill-buffer): Move up.
author Juri Linkov <juri@jurta.org>
date Thu, 07 Apr 2005 15:16:01 +0000
parents 0c7ec8f85244
children 41156582073a
files lisp/info.el
diffstat 1 files changed, 8 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/info.el	Thu Apr 07 15:15:38 2005 +0000
+++ b/lisp/info.el	Thu Apr 07 15:16:01 2005 +0000
@@ -3240,6 +3240,7 @@
   (setq line-move-ignore-invisible t)
   (make-local-variable 'desktop-save-buffer)
   (setq desktop-save-buffer 'Info-desktop-buffer-misc-data)
+  (add-hook 'kill-buffer-hook 'Info-kill-buffer nil t)
   (add-hook 'clone-buffer-hook 'Info-clone-buffer-hook nil t)
   (add-hook 'change-major-mode-hook 'font-lock-defontify nil t)
   (add-hook 'isearch-mode-hook 'Info-isearch-start nil t)
@@ -3254,6 +3255,13 @@
   (Info-set-mode-line)
   (run-hooks 'Info-mode-hook))
 
+;; When an Info buffer is killed, make sure the associated tags buffer
+;; is killed too.
+(defun Info-kill-buffer ()
+  (and (eq major-mode 'Info-mode)
+       Info-tag-table-buffer
+       (kill-buffer Info-tag-table-buffer)))
+
 (defun Info-clone-buffer-hook ()
   (when (bufferp Info-tag-table-buffer)
     (setq Info-tag-table-buffer
@@ -3887,16 +3895,6 @@
 
       (set-buffer-modified-p nil))))
 
-
-;; When an Info buffer is killed, make sure the associated tags buffer
-;; is killed too.
-(defun Info-kill-buffer ()
-  (and (eq major-mode 'Info-mode)
-       Info-tag-table-buffer
-       (kill-buffer Info-tag-table-buffer)))
-
-(add-hook 'kill-buffer-hook 'Info-kill-buffer)
-
 ;;; Speedbar support:
 ;; These functions permit speedbar to display the "tags" in the
 ;; current info node.