From: hmurata Date: Sun, 20 Jan 2002 01:12:16 +0000 (+0000) Subject: * elmo.el (elmo-folder-search-fast): Moved upwards rather than it X-Git-Tag: wl-2_9_6~32 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=842dea909d3eebe2b7a61a565e9af83679d9f679;p=elisp%2Fwanderlust.git * elmo.el (elmo-folder-search-fast): Moved upwards rather than it was used. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 158c72c..94478c3 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,8 @@ +2002-01-20 Hiroya Murata + + * elmo.el (elmo-folder-search-fast): Moved upwards rather than it + was used. + 2002-01-19 Yoichi NAKAYAMA * elmo-util.el (elmo-save-buffer): The first argument of message diff --git a/elmo/elmo.el b/elmo/elmo.el index 080a74e..3bada74 100644 --- a/elmo/elmo.el +++ b/elmo/elmo.el @@ -709,6 +709,24 @@ Return a cons cell of (NUMBER-CROSSPOSTS . NEW-MARK-ALIST).") (elmo-folder-send folder 'elmo-folder-rename-internal new-folder) (elmo-msgdb-rename-path folder new-folder))) +(defsubst elmo-folder-search-fast (folder condition numbers) + (when (and numbers + (vectorp condition) + (member (elmo-filter-key condition) '("first" "last"))) + (let ((len (length numbers)) + (lastp (string= (elmo-filter-key condition) "last")) + (value (string-to-number (elmo-filter-value condition)))) + (when (eq (elmo-filter-type condition) 'unmatch) + (setq lastp (not lastp) + value (- len value))) + (if lastp + (nthcdr (max (- len value) 0) numbers) + (when (> value 0) + (let ((last (nthcdr (1- value) numbers))) + (when last + (setcdr last nil)) + numbers)))))) + (luna-define-method elmo-folder-search ((folder elmo-folder) condition &optional numbers) @@ -741,24 +759,6 @@ Return a cons cell of (NUMBER-CROSSPOSTS . NEW-MARK-ALIST).") (elmo-progress-clear 'elmo-folder-search)) (nreverse matched))))) -(defsubst elmo-folder-search-fast (folder condition numbers) - (when (and numbers - (vectorp condition) - (member (elmo-filter-key condition) '("first" "last"))) - (let ((len (length numbers)) - (lastp (string= (elmo-filter-key condition) "last")) - (value (string-to-number (elmo-filter-value condition)))) - (when (eq (elmo-filter-type condition) 'unmatch) - (setq lastp (not lastp) - value (- len value))) - (if lastp - (nthcdr (max (- len value) 0) numbers) - (when (> value 0) - (let ((last (nthcdr (1- value) numbers))) - (when last - (setcdr last nil)) - numbers)))))) - (luna-define-method elmo-message-match-condition ((folder elmo-folder) number condition numbers)