From: yamaoka Date: Fri, 14 Feb 2003 01:28:20 +0000 (+0000) Subject: * wl-xmas.el (wl-xmas-highlight-folder-group-line): Use `map-extents' instead X-Git-Tag: merged-trunk-to-elmo-mark-15~19 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9559e1d9f769adc046c76f905334e19b5f28cb14;p=elisp%2Fwanderlust.git * 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. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index 06feec7..0835c56 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-02-14 Yoichi NAKAYAMA * wl-folder.el (wl-folder-buffer-group-p): Rewritten. diff --git a/wl/wl-highlight.el b/wl/wl-highlight.el index 0eda7dd..399befc 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 a7f03ff..652184f 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 @@ -268,13 +269,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