From fe6b0d0f4768932a04442504a19f184893403436 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Fri, 14 Feb 2003 01:28:38 +0000 Subject: [PATCH] * wl-xmas.el (wl-xmas-highlight-folder-group-line): Use `map-extents' instead of `extent-at' repeatedly. (wl-highlight-folder-current-line): Ditto. * wl-highlight.el: Remove useless dummy functions. --- wl/ChangeLog | 8 ++++++++ wl/wl-highlight.el | 9 ++------- wl/wl-xmas.el | 33 +++++++++++++++++---------------- 3 files changed, 27 insertions(+), 23 deletions(-) diff --git a/wl/ChangeLog b/wl/ChangeLog index bc5810b..5a4d194 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,11 @@ +2003-02-14 Katsumi Yamaoka + + * wl-xmas.el (wl-xmas-highlight-folder-group-line): Use + `map-extents' instead of `extent-at' repeatedly. + (wl-highlight-folder-current-line): Ditto. + + * wl-highlight.el: Remove useless dummy functions. + 2003-01-29 Yoichi NAKAYAMA * wl-news.el.in (wl-news-previous-version-save): Bind diff --git a/wl/wl-highlight.el b/wl/wl-highlight.el index eb31e03..bdc7e24 100644 --- a/wl/wl-highlight.el +++ b/wl/wl-highlight.el @@ -1,6 +1,7 @@ ;;; wl-highlight.el --- Hilight modules for Wanderlust. -;; Copyright (C) 1998,1999,2000 Yuuichi Teranishi +;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 +;; Yuuichi Teranishi ;; Author: Yuuichi Teranishi ;; Keywords: mail, net news @@ -42,12 +43,6 @@ (require 'wl-e21)) (t (require 'wl-mule))) - (defun-maybe extent-begin-glyph (a)) - (defun-maybe delete-extent (a)) - (defun-maybe make-extent (a b)) - (defun-maybe set-extent-begin-glyph (a b)) - (defun-maybe set-extent-end-glyph (a b)) - (defun-maybe extent-at (a b c d e)) (defun-maybe wl-dnd-set-drop-target (a b)) (defun-maybe wl-dnd-set-drag-starter (a b))) diff --git a/wl/wl-xmas.el b/wl/wl-xmas.el index 6667d89..fe699ae 100644 --- a/wl/wl-xmas.el +++ b/wl/wl-xmas.el @@ -1,7 +1,8 @@ ;;; wl-xmas.el --- Wanderlust modules for XEmacsen. -;; Copyright (C) 1998,1999,2000 Yuuichi Teranishi -;; Copyright (C) 2000 Katsumi Yamaoka +;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 +;; Yuuichi Teranishi +;; Copyright (C) 2000, 2001, 2002, 2003 Katsumi Yamaoka ;; Author: Yuuichi Teranishi ;; Katsumi Yamaoka @@ -201,13 +202,13 @@ (defsubst wl-xmas-highlight-folder-group-line (glyph text-face numbers) (let ((start (match-beginning 1)) (end (match-end 1))) - (let (extent) - (while (and (setq extent (extent-at start nil nil extent 'at)) - (not (and (eq start (extent-start-position extent)) - (eq end (extent-end-position extent)) - (extent-end-glyph extent))))) - (unless extent - (setq extent (make-extent start end))) + (let ((extent (or (map-extents + (lambda (extent maparg) + (and (eq start (extent-start-position extent)) + (eq end (extent-end-position extent)) + extent)) + nil start start nil nil 'end-glyph) + (make-extent start end)))) (set-extent-properties extent `(end-open t start-closed t invisible t)) (set-extent-end-glyph extent @@ -266,13 +267,13 @@ (get-text-property (point) 'wl-folder-entity-id))) (looking-at "[ \t]+\\([^ \t]+\\)")) (let ((start (match-beginning 1))) - (let (extent) - (while (and (setq extent (extent-at start nil nil extent 'at)) - (not (and (eq start (extent-start-position extent)) - (eq start (extent-end-position extent)) - (extent-begin-glyph extent))))) - (unless extent - (setq extent (make-extent start start))) + (let ((extent (or (map-extents + (lambda (extent maparg) + (and (eq start (extent-start-position extent)) + (eq start (extent-end-position extent)) + extent)) + nil start start nil nil 'begin-glyph) + (make-extent start start)))) (let (type) (set-extent-begin-glyph extent -- 1.7.10.4