* wl-message.el (wl-message-display-internal): Does not put
authorhmurata <hmurata>
Sun, 12 Dec 2004 08:17:54 +0000 (08:17 +0000)
committerhmurata <hmurata>
Sun, 12 Dec 2004 08:17:54 +0000 (08:17 +0000)
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
wl/wl-message.el
wl/wl-mime.el
wl/wl-summary.el

index db35023..e6ce7cb 100644 (file)
@@ -1,3 +1,16 @@
+2004-12-12  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * 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  <teranisi@gohome.org>
 
        * wl-summary.el (wl-summary-mode): Set kill-buffer-hook as
index 4d1f553..1592ddc 100644 (file)
@@ -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))))
 
index ed2e0a9..1606ee0 100644 (file)
@@ -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."))))
index 4aef469..8cee114 100644 (file)
@@ -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)