From: teranisi Date: Fri, 23 Feb 2001 23:09:18 +0000 (+0000) Subject: * wl-util.el (wl-regexp-opt): New function. X-Git-Tag: wl-2_6-root~83 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a865f1d21f41d6747d8800ec9ca940e98b4c41bd;p=elisp%2Fwanderlust.git * wl-util.el (wl-regexp-opt): New function. * wl-summary.el (wl-summary-delete-messages-on-buffer): Delete number from `wl-summary-buffer-number-list'. (wl-summary-goto-folder-subr): Load msgdb before resuming summary view; Call `wl-summary-rescan' if `wl-summary-cache-use' is nil. (wl-summary-move-spec-alist): Changed default setting. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index b369378..647cecc 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,13 @@ +2001-02-24 Yuuichi Teranishi + + * wl-util.el (wl-regexp-opt): New function. + + * wl-summary.el (wl-summary-delete-messages-on-buffer): Delete + number from `wl-summary-buffer-number-list'. + (wl-summary-goto-folder-subr): Load msgdb before resuming summary view; + Call `wl-summary-rescan' if `wl-summary-cache-use' is nil. + (wl-summary-move-spec-alist): Changed default setting. + 2001-02-23 Yoichi NAKAYAMA * wl-vars.el (wl-biff-notify-hook): New hook. diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 9edb448..9b71bb3 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -1929,7 +1929,8 @@ If ARG is non-nil, checking is omitted." (progn (delete-region (match-beginning 0) (match-end 0)) (delete-char 1) ; delete '\n' - ))) + (setq wl-summary-buffer-number-list + (delq (car msgs) wl-summary-buffer-number-list))))) (when (and deleting-info (> len elmo-display-progress-threshold)) (setq i (1+ i)) @@ -2737,8 +2738,15 @@ If ARG, without confirm." (let ((case-fold-search nil) (inhibit-read-only t) (buffer-read-only nil)) + ;; Load msgdb + (setq wl-summary-buffer-msgdb nil) ; new msgdb + (setq wl-summary-buffer-msgdb + (wl-summary-msgdb-load-async fld)) + (if (null wl-summary-buffer-msgdb) + (setq wl-summary-buffer-msgdb + (elmo-msgdb-load (elmo-string fld)))) (erase-buffer) - ;; resume summary cache + ;; Resume summary view (if wl-summary-cache-use (let* ((dir (elmo-msgdb-expand-path fld)) (cache (expand-file-name wl-summary-cache-file dir)) @@ -2755,14 +2763,12 @@ If ARG, without confirm." (wl-summary-load-file-object view))) (if (eq wl-summary-buffer-view 'thread) (wl-thread-resume-entity fld) - (wl-summary-make-number-list)))) - ;; Load msgdb - (setq wl-summary-buffer-msgdb nil) ; new msgdb - (setq wl-summary-buffer-msgdb - (wl-summary-msgdb-load-async fld)) - (if (null wl-summary-buffer-msgdb) - (setq wl-summary-buffer-msgdb - (elmo-msgdb-load (elmo-string fld)))) + (wl-summary-make-number-list))) + (setq wl-summary-buffer-view + (wl-summary-load-file-object + (expand-file-name wl-summary-view-file + (elmo-msgdb-expand-path fld)))) + (wl-summary-rescan)) (wl-summary-count-unread (elmo-msgdb-get-mark-alist wl-summary-buffer-msgdb)) (wl-summary-update-modeline))) @@ -4483,11 +4489,18 @@ If ARG, exit virtual folder." (elmo-date-get-week year month mday)))) (defvar wl-summary-move-spec-alist - '((new . ((p . "\\(N\\|\\$\\)") - (p . "\\(U\\|!\\)") - (t . nil))) - (unread . ((p . "\\(N\\|\\$\\|U\\|!\\)") - (t . nil))))) + (` ((new . ((t . nil) + (p . (, wl-summary-new-mark)) + (p . (, (wl-regexp-opt + (list wl-summary-unread-uncached-mark + wl-summary-unread-cached-mark)))) + (p . (, (regexp-quote wl-summary-important-mark))))) + (unread . ((t . nil) + (p . (, (wl-regexp-opt + (list wl-summary-new-mark + wl-summary-unread-uncached-mark + wl-summary-unread-cached-mark)))) + (p . (, (regexp-quote wl-summary-important-mark)))))))) (defsubst wl-summary-next-message (num direction hereto) (let ((cur-spec (cdr (assq wl-summary-move-order diff --git a/wl/wl-util.el b/wl/wl-util.el index 0cdb6e3..cd24a30 100644 --- a/wl/wl-util.el +++ b/wl/wl-util.el @@ -878,6 +878,18 @@ This function is imported from Emacs 20.7." notify-minibuf) (setq wl-biff-check-folders-running nil))))) +(if (and (fboundp 'regexp-opt) + (not (featurep 'xemacs))) + (defalias 'wl-regexp-opt 'regexp-opt) + (defun wl-regexp-opt (strings &optional paren) + "Return a regexp to match a string in STRINGS. +Each string should be unique in STRINGS and should not contain any regexps, +quoted or not. If optional PAREN is non-nil, ensure that the returned regexp +is enclosed by at least one regexp grouping construct." + (let ((open-paren (if paren "\\(" "")) (close-paren (if paren "\\)" ""))) + (concat open-paren (mapconcat 'regexp-quote strings "\\|") + close-paren)))) + (require 'product) (product-provide (provide 'wl-util) (require 'wl-version))