Synch up with main trunk, and prepare the release 2.12.0.
[elisp/wanderlust.git] / wl / wl-summary.el
index 8fb91af..8cee114 100644 (file)
@@ -919,9 +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)
-  (add-hook 'kill-buffer-hook #'wl-summary-buffer-detach)
+  (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))
@@ -2575,7 +2575,7 @@ If ARG, without confirm."
 (defun wl-summary-default-subject-filter (subject)
   (setq subject (elmo-replace-in-string subject "[ \t]*\\(re\\|was\\)[:>]" ""))
   (setq subject (elmo-replace-in-string subject "[ \t]" ""))
-  (elmo-replace-in-string subject "^\\[.*\\]" ""))
+  (elmo-replace-in-string subject "^\\[[^]]*\\]" ""))
 
 (defun wl-summary-subject-equal (subject1 subject2)
   (string= (funcall wl-summary-subject-filter-function subject1)
@@ -4401,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)
@@ -4441,7 +4440,7 @@ If ARG is numeric number, decode message as following:
        ;; Specify coding-system (doesn't change the MIME mode).
        (setq elmo-mime-display-as-is-coding-system
              (if (and arg
-                      (not (wl-message-mime-analysys-p
+                      (not (wl-message-mime-analysis-p
                             (wl-summary-message-display-type))))
                  (or (read-coding-system "Coding system: ")
                      elmo-mime-display-as-is-coding-system)