changeset 8963:286aacffb920

(rmail-mode-kill-summary): New function. (rmail-variables): Put that on kill-buffer-hook locally.
author Richard M. Stallman <rms@gnu.org>
date Wed, 21 Sep 1994 06:33:22 +0000
parents 722763fed8ce
children 5882c2fedd98
files lisp/mail/rmail.el
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/rmail.el	Wed Sep 21 06:25:26 1994 +0000
+++ b/lisp/mail/rmail.el	Wed Sep 21 06:33:22 1994 +0000
@@ -522,6 +522,9 @@
 ;; Rmail mode is suitable only for specially formatted data.
 (put 'rmail-mode 'mode-class 'special)
 
+(defun rmail-mode-kill-summary ()
+  (if rmail-summary-buffer (kill-buffer rmail-summary-buffer)))
+
 ;;;###autoload
 (defun rmail-mode ()
   "Rmail Mode is used by \\<rmail-mode-map>\\[rmail] for editing Rmail files.
@@ -615,6 +618,8 @@
   (setq rmail-overlay-list nil)
   (make-local-variable 'version-control)
   (setq version-control 'never)
+  (make-local-variable 'kill-buffer-hook)
+  (add-hook 'kill-buffer-hook 'rmail-mode-kill-summary)
   (make-local-variable 'file-precious-flag)
   (setq file-precious-flag t)
   (make-local-variable 'rmail-message-vector)