From 18704c2b813f8799087ae9ace22ccab2c922c51c Mon Sep 17 00:00:00 2001 From: hmurata Date: Sun, 12 Dec 2004 08:17:54 +0000 Subject: [PATCH] * wl-message.el (wl-message-display-internal): Does not put wl-message-display-type property on message buffer. (wl-message-buffer-display-type): New function. * wl-mime.el (wl-draft-yank-current-message-entity): Use it. * wl-summary.el (wl-summary-mode): Use `dolist' to add `wl-summary-buffer-detach'. (wl-summary-message-display-type): Use `wl-summary-buffer-display-type'. --- wl/ChangeLog | 13 +++++++++++++ wl/wl-message.el | 8 +++++--- wl/wl-mime.el | 6 ++---- wl/wl-summary.el | 10 ++++------ 4 files changed, 24 insertions(+), 13 deletions(-) diff --git a/wl/ChangeLog b/wl/ChangeLog index db35023..e6ce7cb 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,16 @@ +2004-12-12 Hiroya Murata + + * wl-message.el (wl-message-display-internal): Does not put + wl-message-display-type property on message buffer. + (wl-message-buffer-display-type): New function. + + * wl-mime.el (wl-draft-yank-current-message-entity): Use it. + + * wl-summary.el (wl-summary-mode): Use `dolist' to add + `wl-summary-buffer-detach'. + (wl-summary-message-display-type): Use + `wl-summary-buffer-display-type'. + 2004-12-12 Yuuichi Teranishi * wl-summary.el (wl-summary-mode): Set kill-buffer-hook as diff --git a/wl/wl-message.el b/wl/wl-message.el index 4d1f553..1592ddc 100644 --- a/wl/wl-message.el +++ b/wl/wl-message.el @@ -441,6 +441,11 @@ Returns non-nil if bottom of message." (defun wl-message-display-all-header-p (display-type) (eq (wl-message-display-type-property display-type :header) 'all)) +(defun wl-message-buffer-display-type (&optional message-buffer) + (if message-buffer + (with-current-buffer message-buffer + wl-message-buffer-cur-display-type) + wl-message-buffer-cur-display-type)) (defun wl-message-redisplay (folder number display-type &optional force-reload) (let* ((default-mime-charset wl-mime-charset) @@ -598,9 +603,6 @@ Returns non-nil if bottom of message." (wl-message-define-keymap)) (let (buffer-read-only) (wl-highlight-message (point-min) (point-max) t))))) - (let (buffer-read-only) - (put-text-property (point-min) (point-max) - 'wl-message-display-type display-type)) (run-hooks 'wl-message-display-internal-hook) (setq buffer-read-only t)))) diff --git a/wl/wl-mime.el b/wl/wl-mime.el index ed2e0a9..1606ee0 100644 --- a/wl/wl-mime.el +++ b/wl/wl-mime.el @@ -70,11 +70,9 @@ has Non-nil value\)" ((wl-region-exists-p) (wl-mime-preview-follow-current-region)) ((not (wl-message-mime-analysis-p - (get-text-property (point-min) - 'wl-message-display-type))) + (wl-message-buffer-display-type))) (wl-mime-preview-follow-no-mime - (get-text-property (point-min) - 'wl-message-display-type))) + (wl-message-buffer-display-type))) (t (mime-preview-follow-current-entity))))) (error "No message.")))) diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 4aef469..8cee114 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -919,10 +919,9 @@ Entering Folder mode calls the value of `wl-summary-mode-hook'." (add-hook hook function nil t))) (add-hook 'window-size-change-functions #'wl-summary-after-resize-function)) - (make-local-hook 'change-major-mode-hook) - (add-hook 'change-major-mode-hook #'wl-summary-buffer-detach nil t) - (make-local-hook 'kill-buffer-hook) - (add-hook 'kill-buffer-hook #'wl-summary-buffer-detach nil t) + (dolist (hook '(change-major-mode-hook kill-buffer-hook)) + (make-local-hook hook) + (add-hook hook #'wl-summary-buffer-detach nil t)) ;; This hook may contain the function `wl-setup-summary' for reasons ;; of system internal to accord facilities for the Emacs variants. (run-hooks 'wl-summary-mode-hook)) @@ -4402,8 +4401,7 @@ Use function list is `wl-summary-write-current-folder-functions'." wl-summary-buffer-current-msg (wl-summary-message-number) (= (wl-summary-message-number) wl-summary-buffer-current-msg)) - (with-current-buffer wl-message-buffer - wl-message-buffer-cur-display-type))) + (wl-message-buffer-display-type wl-message-buffer))) (defun wl-summary-buffer-display-mime-mode () (or (wl-message-display-type-property (wl-summary-message-display-type) -- 1.7.10.4