(save-selected-window
(select-window window)
(goto-char (point-min))
- (re-search-forward (concat "^ ?[0-9]+: \\("
- (regexp-quote chnl) "\\)\\( "
- (regexp-quote liece-channel-unread-character)
- "\\|\\)$") nil t)
- (set-window-point window (match-beginning 1))
- (when liece-highlight-mode
- (let ((overlay (make-overlay (point) (match-end 1))))
- (liece-map-overlays
- (lambda (ovl)
- (if (overlay-get ovl 'liece-channel)
- (delete-overlay ovl))))
- (overlay-put overlay 'face 'underline)
- (overlay-put overlay 'liece-channel t)))))))
+ (when (re-search-forward (concat "^ ?[0-9]+: \\("
+ (regexp-quote chnl) "\\)\\( "
+ (regexp-quote liece-channel-unread-character)
+ "\\|\\)$") nil t)
+ (set-window-point window (match-beginning 1))
+ (when liece-highlight-mode
+ (let ((overlay (make-overlay (point) (match-end 1))))
+ (liece-map-overlays
+ (lambda (ovl)
+ (if (overlay-get ovl 'liece-channel)
+ (delete-overlay ovl))))
+ (overlay-put overlay 'face 'underline)
+ (overlay-put overlay 'liece-channel t))))))))
(provide 'liece-channel)