From ca73eba743439ed1aad0d0fd6b50d183b32fb3a6 Mon Sep 17 00:00:00 2001 From: hmurata Date: Sun, 7 Nov 2004 15:52:58 +0000 Subject: [PATCH] * wl-summary.el (wl-summary-mimic-kill-buffer): New command. (wl-summary-mode-map): Substitute `wl-summary-mimic-kill-buffer' for `kill-buffer'. --- wl/ChangeLog | 4 ++++ wl/wl-summary.el | 14 ++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/wl/ChangeLog b/wl/ChangeLog index bbe75d4..bf4ddeb 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,5 +1,9 @@ 2004-11-07 Hiroya Murata + * wl-summary.el (wl-summary-mimic-kill-buffer): New command. + (wl-summary-mode-map): Substitute `wl-summary-mimic-kill-buffer' + for `kill-buffer'. + * wl-summary.el (wl-summary-switch-to-clone-buffer): Remove event handler of current buffer from elmo-folder. diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 3a5609c..56ab4b9 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -398,6 +398,11 @@ See also variable `wl-use-petname'." () (setq wl-summary-mode-map (make-keymap)) (suppress-keymap wl-summary-mode-map) + (substitute-key-definition 'kill-buffer + 'wl-summary-mimic-kill-buffer + wl-summary-mode-map + global-map) + ;; basic commands (define-key wl-summary-mode-map " " 'wl-summary-read) (define-key wl-summary-mode-map "." 'wl-summary-redisplay) (define-key wl-summary-mode-map "<" 'wl-summary-display-top) @@ -580,6 +585,15 @@ See also variable `wl-use-petname'." "Menu used in Summary mode." wl-summary-mode-menu-spec)) +(defun wl-summary-mimic-kill-buffer (buffer) + "Kill the current (Summary) buffer with query." + (interactive "bKill buffer: ") + (if (or (not buffer) + (string-equal buffer "") + (string-equal buffer (buffer-name))) + (wl-summary-exit 'force-exit) + (kill-buffer buffer))) + (defsubst wl-summary-message-visible-p (number) "Return non-nil if the message with NUMBER is visible." (or (eq wl-summary-buffer-view 'sequence) -- 1.7.10.4