+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.
(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))