From: okazaki Date: Sat, 24 Feb 2001 20:08:46 +0000 (+0000) Subject: * wl-highlight.el (wl-highlight-summary-displaying): Optimize; X-Git-Tag: wl-2_6-root~80 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=d96f22c383bd8b03cda543e3dfeb719490d3832f;p=elisp%2Fwanderlust.git * 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. --- 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)))