* wl-highlight.el (wl-highlight-headers): Added argument `for-draft'.
authorteranisi <teranisi>
Thu, 26 Oct 2000 02:23:24 +0000 (02:23 +0000)
committerteranisi <teranisi>
Thu, 26 Oct 2000 02:23:24 +0000 (02:23 +0000)
* wl-draft.el (wl-draft-yank-from-mail-reply-buffer):
Set `for-draft' argument of wl-highlight-headers.
(wl-draft): Ditto.
(wl-draft-reedit): Ditto.
(wl-user-agent-compose-internal): Ditto.

wl/ChangeLog
wl/wl-draft.el
wl/wl-highlight.el

index f8f6013..a8c0220 100644 (file)
@@ -1,3 +1,13 @@
+2000-10-26  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * wl-highlight.el (wl-highlight-headers): Added argument `for-draft'.
+
+       * wl-draft.el (wl-draft-yank-from-mail-reply-buffer):
+       Set `for-draft' argument of wl-highlight-headers.
+       (wl-draft): Ditto.
+       (wl-draft-reedit): Ditto.
+       (wl-user-agent-compose-internal): Ditto.
+
 2000-10-24   Daiki Ueno <ueno@unixuser.org>
 
        * wl-message.el (wl-message-add-button): Use overlay.
index 0a617c0..9d79497 100644 (file)
@@ -478,8 +478,7 @@ the `wl-smtp-features' variable."
     (run-hooks 'wl-draft-cited-hook)
     (and wl-draft-add-references
         (if (wl-draft-add-references)
-            (let (wl-highlight-x-face-func)
-              (wl-highlight-headers))))
+            (wl-highlight-headers 'for-draft)))
     (if wl-highlight-body-too
        (wl-highlight-body-region beg (point-max)))))
 
@@ -1415,8 +1414,7 @@ If optional argument is non-nil, current draft buffer is killed"
                   nil t))
     (wl-draft-editor-mode)
     (wl-draft-overload-functions)
-    (let (wl-highlight-x-face-func)
-      (wl-highlight-headers))
+    (wl-highlight-headers 'for-draft)
     (goto-char (point-min))
     (if (interactive-p)
        (run-hooks 'wl-mail-setup-hook))
@@ -1506,8 +1504,7 @@ If optional argument is non-nil, current draft buffer is killed"
                  nil t)
     (wl-draft-overload-functions)
     (wl-draft-editor-mode)
-    (let (wl-highlight-x-face-func)
-      (wl-highlight-headers))
+    (wl-highlight-headers 'for-draft)
     (run-hooks 'wl-draft-reedit-hook)
     (goto-char (point-max))
     buf-name
@@ -2013,8 +2010,7 @@ been implemented yet.  Partial support for SWITCH-FUNCTION now supported."
              t)
            (setq headers (cdr headers))))
        ;; highlight headers (from wl-draft in wl-draft.el)
-       (let (wl-highlight-x-face-func)
-         (wl-highlight-headers))
+       (wl-highlight-headers 'for-draft)
        ;; insert body
        (if (wl-string-match-assoc "body" wl-user-agent-headers-and-body-alist
                                   'ignore-case)
index cfc59d0..f8a5b9e 100644 (file)
@@ -1018,15 +1018,16 @@ interpreted as cited text.)"
                (forward-line 1))
              (message "Highlighting...done")))))))
 
-(defun wl-highlight-headers ()
+(defun wl-highlight-headers (&optional for-draft)
   (let ((beg (point-min))
        (end (or (save-excursion (re-search-forward "^$" nil t)
                                 (point))
                 (point-max))))
     (wl-highlight-message beg end nil)
-    (wl-highlight-message-add-buttons-to-header beg end)
-    (and wl-highlight-x-face-func
-        (funcall wl-highlight-x-face-func beg end))
+    (unless for-draft
+      (wl-highlight-message-add-buttons-to-header beg end)
+      (and wl-highlight-x-face-func
+          (funcall wl-highlight-x-face-func beg end)))
     (run-hooks 'wl-highlight-headers-hook)))
 
 (defun wl-highlight-message-add-buttons-to-header (start end)