(wl-highlight-message-add-buttons-to-header): Enclose with `save-excursion'.
authoryamaoka <yamaoka>
Mon, 16 Oct 2000 02:28:44 +0000 (02:28 +0000)
committeryamaoka <yamaoka>
Mon, 16 Oct 2000 02:28:44 +0000 (02:28 +0000)
;; Patch from MOTOKI-san.

wl/ChangeLog
wl/wl-highlight.el

index 601b973..89d71c3 100644 (file)
@@ -1,3 +1,8 @@
+2000-10-16  Akihiro MOTOKI  <motoki@da.jp.nec.com>
+
+       * wl-highlight.el (wl-highlight-message-add-buttons-to-header):
+       Enclose with `save-excursion'.
+
 2000-10-16  TAKAHASHI Kaoru  <kaoru@kaisei.org>
 
        * wl-version.el (wl-version): Remove interactive.
index 003fdbe..b3e105b 100644 (file)
@@ -1030,28 +1030,29 @@ interpreted as cited text.)"
     (run-hooks 'wl-highlight-headers-hook)))
 
 (defun wl-highlight-message-add-buttons-to-header (start end)
-  (save-restriction
-    (narrow-to-region start end)
-    (let ((case-fold-search t)
-         (alist wl-highlight-message-header-button-alist)
-         entry)
-      (while alist
-       (setq entry (car alist)
-             alist (cdr alist))
-       (goto-char (point-min))
-       (while (re-search-forward (car entry) nil t)
-         (setq start (match-beginning 0)
-               end (if (re-search-forward "^[^ \t]" nil t)
-                       (match-beginning 0)
-                     (point-max)))
-         (goto-char start)
-         (while (re-search-forward (nth 1 entry) end t)
-           (goto-char (match-end 0))
-           (wl-message-add-button
-            (match-beginning (nth 2 entry))
-            (match-end (nth 2 entry))
-            (nth 3 entry) (match-string (nth 4 entry))))
-         (goto-char end))))))
+  (save-excursion
+    (save-restriction
+      (narrow-to-region start end)
+      (let ((case-fold-search t)
+           (alist wl-highlight-message-header-button-alist)
+           entry)
+       (while alist
+         (setq entry (car alist)
+               alist (cdr alist))
+         (goto-char (point-min))
+         (while (re-search-forward (car entry) nil t)
+           (setq start (match-beginning 0)
+                 end (if (re-search-forward "^[^ \t]" nil t)
+                         (match-beginning 0)
+                       (point-max)))
+           (goto-char start)
+           (while (re-search-forward (nth 1 entry) end t)
+             (goto-char (match-end 0))
+             (wl-message-add-button
+              (match-beginning (nth 2 entry))
+              (match-end (nth 2 entry))
+              (nth 3 entry) (match-string (nth 4 entry))))
+           (goto-char end)))))))
 
 (defun wl-highlight-body-all ()
   (wl-highlight-message (point-min) (point-max) t t))