From d96f22c383bd8b03cda543e3dfeb719490d3832f Mon Sep 17 00:00:00 2001 From: okazaki Date: Sat, 24 Feb 2001 20:08:46 +0000 Subject: [PATCH] * wl-highlight.el (wl-highlight-summary-displaying): Optimize; Eliminate redundant `save-excursion'. (wl-highlight-summary-current-line): Ditto. * wl-highlight.el (wl-highlight-summary-current-line): Avoid accessing match data when `looking-at' failed. --- wl/wl-highlight.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/wl/wl-highlight.el b/wl/wl-highlight.el index ec8b5a1..2a93f9f 100644 --- a/wl/wl-highlight.el +++ b/wl/wl-highlight.el @@ -748,9 +748,10 @@ (wl-delete-all-overlays) (let (bol eol ov) (save-excursion + (end-of-line) + (setq eol (point)) (beginning-of-line) (setq bol (point)) - (save-excursion (end-of-line) (setq eol (point))) (setq ov (make-overlay bol eol)) (overlay-put ov 'face 'wl-highlight-summary-displaying-face) (overlay-put ov 'evaporate t) @@ -839,14 +840,16 @@ wl-highlight-thread-indent-string-regexp "\\)[[<]")) fregexp fsymbol bol eol matched thread-top looked-at) + (end-of-line) + (setq eol (point)) (beginning-of-line) (setq bol (point)) - (save-excursion (end-of-line) (setq eol (point))) (if smark (setq status-mark smark) (setq looked-at (looking-at sregexp)) - (setq status-mark (buffer-substring (match-beginning 2) - (match-end 2)))) + (when looked-at + (setq status-mark (buffer-substring (match-beginning 2) + (match-end 2))))) (when temp-too (unless looked-at (setq looked-at (looking-at sregexp))) -- 1.7.10.4