* wl-highlight.el (wl-highlight-summary-displaying): Optimize;
authorokazaki <okazaki>
Sat, 24 Feb 2001 20:08:46 +0000 (20:08 +0000)
committerokazaki <okazaki>
Sat, 24 Feb 2001 20:08:46 +0000 (20:08 +0000)
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

index ec8b5a1..2a93f9f 100644 (file)
   (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)
                    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)))