From: yamaoka Date: Mon, 16 Oct 2000 02:28:44 +0000 (+0000) Subject: (wl-highlight-message-add-buttons-to-header): Enclose with `save-excursion'. X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7571537fbae922d2c44fde9e2b652fea3e2bb327;p=elisp%2Fwanderlust.git (wl-highlight-message-add-buttons-to-header): Enclose with `save-excursion'. ;; Patch from MOTOKI-san. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index 601b973..89d71c3 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,8 @@ +2000-10-16 Akihiro MOTOKI + + * wl-highlight.el (wl-highlight-message-add-buttons-to-header): + Enclose with `save-excursion'. + 2000-10-16 TAKAHASHI Kaoru * wl-version.el (wl-version): Remove interactive. diff --git a/wl/wl-highlight.el b/wl/wl-highlight.el index 003fdbe..b3e105b 100644 --- a/wl/wl-highlight.el +++ b/wl/wl-highlight.el @@ -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))