From 5ea2e03ce4add953f300ba076dc36e55bdd3b54a Mon Sep 17 00:00:00 2001 From: teranisi Date: Wed, 28 Feb 2001 07:36:26 +0000 Subject: [PATCH] * wl-summary.el (wl-summary-prefetch-msg): Use `elmo-msgdb-overview-get-entity' instead of `assoc'. * wl-vars.el: Define *-func as obsolete variable using `elmo-define-obsolete-variable'. * wl-message.el (wl-message-buffer-prefetch-threshold): Eliminated. (wl-message-buffer-prefetch): Use `elmo-message-fetch-threshold' instead of `wl-message-buffer-prefetch-threshold'. * elmo-util.el (elmo-resque-obsolete-variable): Use defvaralias if defined. * mmimap.el (toplevel): Require 'mime-parse and 'static. (mmimap-parse-parameters-from-list): Define as alias for `mime-decode-parameter-plist' if it is defined as function. (mmimap-make-mime-entity): Added argument `number'. (initialize-instance): Set `number' argument of mmimap-make-mime-entity as 0. (mime-imap-entity-header-string): Arrange node-id for rfc2060 section. --- elmo/ChangeLog | 11 +++++++++++ elmo/elmo-util.el | 4 +++- elmo/mmimap.el | 51 +++++++++++++++++++++++++++++++++------------------ wl/ChangeLog | 10 ++++++++++ wl/wl-message.el | 6 ++---- wl/wl-summary.el | 4 ++-- wl/wl-vars.el | 28 ++++++++++++++++++++++++++++ 7 files changed, 89 insertions(+), 25 deletions(-) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index d6d3b40..7d447a3 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,5 +1,16 @@ 2001-02-28 Yuuichi Teranishi + * elmo-util.el (elmo-resque-obsolete-variable): Use defvaralias if + defined. + + * mmimap.el (toplevel): Require 'mime-parse and 'static. + (mmimap-parse-parameters-from-list): Define as alias for + `mime-decode-parameter-plist' if it is defined as function. + (mmimap-make-mime-entity): Added argument `number'. + (initialize-instance): Set `number' argument of mmimap-make-mime-entity + as 0. + (mime-imap-entity-header-string): Arrange node-id for rfc2060 section. + * elmo.el (elmo-folder-have-subfolder-p): New generic function. * elmo-mark.el (elmo-folder-have-subfolder-p): Define. diff --git a/elmo/elmo-util.el b/elmo/elmo-util.el index 0164292..827336d 100644 --- a/elmo/elmo-util.el +++ b/elmo/elmo-util.el @@ -1684,7 +1684,9 @@ Definition is stored in `elmo-obsolete-variable-alist'." "Resque obsolete variable OBSOLETE as VAR. If `elmo-obsolete-variable-show-warnings' is non-nil, show warning message." (when (boundp obsolete) - (set var (symbol-value obsolete)) + (static-if (fboundp 'defvaralias) + (defvaralias obsolete var) + (set var (symbol-value obsolete))) (if elmo-obsolete-variable-show-warnings (elmo-warning (format "%s is obsolete. Use %s instead." (symbol-name obsolete) diff --git a/elmo/mmimap.el b/elmo/mmimap.el index e945fd1..ff607e5 100644 --- a/elmo/mmimap.el +++ b/elmo/mmimap.el @@ -31,6 +31,8 @@ (require 'mmgeneric) (require 'mime) (require 'pces) +(require 'static) +(require 'mime-parse) (eval-and-compile (luna-define-class mime-imap-entity (mime-entity) @@ -64,17 +66,20 @@ SECTION is a section string which is defined in RFC2060.") (reverse node-id) ".")))) -(defun mmimap-parse-parameters-from-list (attrlist) - "Parse parameters from ATTRLIST." - (let (ret-val) - (while attrlist - (setq ret-val (append ret-val - (list (cons (downcase (car attrlist)) - (car (cdr attrlist)))))) - (setq attrlist (cdr (cdr attrlist)))) - ret-val)) - -(defun mmimap-make-mime-entity (bodystructure class location node-id parent) +(static-if (fboundp 'mime-decode-parameter-plist) + (defalias 'mmimap-parse-parameters-from-list 'mime-decode-parameter-plist) + (defun mmimap-parse-parameters-from-list (attrlist) + "Parse parameters from ATTRLIST." + (let (ret-val) + (while attrlist + (setq ret-val (append ret-val + (list (cons (downcase (car attrlist)) + (car (cdr attrlist)))))) + (setq attrlist (cdr (cdr attrlist)))) + ret-val))) + +(defun mmimap-make-mime-entity (bodystructure class location node-id number + parent) "Analyze parsed IMAP4 BODYSTRUCTURE response and make MIME entity. CLASS, LOCATION, NODE-ID, PARENT are set to the returned entity." (cond @@ -87,7 +92,10 @@ CLASS, LOCATION, NODE-ID, PARENT are set to the returned entity." :new t :parent parent :location location - :node-id node-id)) + :node-id (if (eq number 0) + node-id + (nconc (list number) node-id)) + )) (while (and (setq curp (car bodystructure)) (listp curp)) (setq children @@ -95,7 +103,10 @@ CLASS, LOCATION, NODE-ID, PARENT are set to the returned entity." (list (mmimap-make-mime-entity curp class location - (nconc (list num) node-id) + (if (eq number 0) + node-id + (nconc (list number) node-id)) + num entity)))) (setq num (+ num 1)) (setq bodystructure (cdr bodystructure))) @@ -128,6 +139,7 @@ CLASS, LOCATION, NODE-ID, PARENT are set to the returned entity." (setq content-type (append content-type (mmimap-parse-parameters-from-list (nth 2 bodystructure))))) + (setq node-id (nconc (list number) node-id)) (setq entity (luna-make-entity class @@ -148,7 +160,7 @@ CLASS, LOCATION, NODE-ID, PARENT are set to the returned entity." entity (list (mmimap-make-mime-entity (nth 8 bodystructure) class - location node-id + location node-id 0 entity)))) entity)))) @@ -162,13 +174,12 @@ CLASS, LOCATION, NODE-ID, PARENT are set to the returned entity." (mime-entity-location-internal entity)) (luna-class-name entity) (mime-entity-location-internal entity) - nil nil))) + nil 0 nil))) ;;; @ entity ;; (luna-define-method mime-insert-entity ((entity mime-imap-entity)) - ;; Root entity. (if (mime-root-entity-p entity) (progn (insert (mime-imap-entity-header-string entity)) @@ -235,9 +246,13 @@ CLASS, LOCATION, NODE-ID, PARENT are set to the returned entity." entity (mime-imap-location-section-body (mime-entity-location-internal entity) - (if (mime-entity-node-id-internal entity) + (if (if (eq (car (mime-entity-node-id-internal entity)) 0) + (cdr (mime-entity-node-id-internal entity)) + (mime-entity-node-id-internal entity)) (concat (mmimap-entity-section - (mime-entity-node-id-internal entity)) + (if (eq (car (mime-entity-node-id-internal entity)) 0) + (cdr (mime-entity-node-id-internal entity)) + (mime-entity-node-id-internal entity))) ".HEADER") "HEADER"))))) diff --git a/wl/ChangeLog b/wl/ChangeLog index b6ff05b..bfff74b 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,5 +1,15 @@ 2001-02-28 Yuuichi Teranishi + * wl-summary.el (wl-summary-prefetch-msg): Use + `elmo-msgdb-overview-get-entity' instead of `assoc'. + + * wl-vars.el: Define *-func as obsolete variable using + `elmo-define-obsolete-variable'. + + * wl-message.el (wl-message-buffer-prefetch-threshold): Eliminated. + (wl-message-buffer-prefetch): Use `elmo-message-fetch-threshold' + instead of `wl-message-buffer-prefetch-threshold'. + * wl-summary.el (wl-summary-buffer-message-redisplay-func): Removed. * wl-vars.el (wl-cache-prefetch-get-next-func): Ditto. diff --git a/wl/wl-message.el b/wl/wl-message.el index c8800f7..98c6eda 100644 --- a/wl/wl-message.el +++ b/wl/wl-message.el @@ -54,8 +54,6 @@ (defvar wl-message-buffer-prefetch-debug t) -(defvar wl-message-buffer-prefetch-threshold - 30000) (defvar wl-message-buffer nil) ; message buffer. @@ -524,9 +522,9 @@ Returns non-nil if bottom of message." (when (or (elmo-message-file-p folder number) (not (and (integerp size) - wl-message-buffer-prefetch-threshold + elmo-message-fetch-threshold (>= size - wl-message-buffer-prefetch-threshold)))) + elmo-message-fetch-threshold)))) ;;(not (elmo-file-cache-exists-p message-id))))) (when wl-message-buffer-prefetch-debug (setq time1 (current-time)) diff --git a/wl/wl-summary.el b/wl/wl-summary.el index a610f4a..28aaa08 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -1244,8 +1244,8 @@ If ARG is non-nil, checking is omitted." (mark-alist (elmo-msgdb-get-mark-alist msgdb)) (number-alist (elmo-msgdb-get-number-alist msgdb)) (message-id (cdr (assq number number-alist))) - (ov (assoc message-id - (elmo-msgdb-get-overview msgdb))) + (ov (elmo-msgdb-overview-get-entity + message-id (elmo-msgdb-get-overview msgdb))) (entity ov) (size (elmo-msgdb-overview-entity-get-size ov)) (inhibit-read-only t) diff --git a/wl/wl-vars.el b/wl/wl-vars.el index db2b110..bd5bc77 100644 --- a/wl/wl-vars.el +++ b/wl/wl-vars.el @@ -2210,6 +2210,34 @@ a symbol `bitmap', `xbm' or `xpm' in order to force the image format." (defvar wl-plugged-port-indent 4) (defvar wl-plugged-queue-status-column 25) +;; Obsolete variables. +(elmo-define-obsolete-variable 'wl-summary-from-func + 'wl-summary-from-function) +(elmo-define-obsolete-variable 'wl-summary-subject-func + 'wl-summary-subject-function) +(elmo-define-obsolete-variable 'wl-summary-subject-filter-func + 'wl-summary-subject-filter-function) +(elmo-define-obsolete-variable 'wl-draft-send-func + 'wl-draft-send-function) +(elmo-define-obsolete-variable 'wl-draft-send-news-func + 'wl-draft-send-news-function) +(elmo-define-obsolete-variable 'wl-draft-send-mail-func + 'wl-draft-send-mail-function) +(elmo-define-obsolete-variable 'wl-print-buffer-func + 'wl-print-buffer-function) +(elmo-define-obsolete-variable 'wl-ps-print-buffer-func + 'wl-ps-print-buffer-function) +(elmo-define-obsolete-variable 'wl-generate-mailer-string-func + 'wl-generate-mailer-string-function) +(elmo-define-obsolete-variable 'wl-highlight-x-face-func + 'wl-highlight-x-face-function) +(elmo-define-obsolete-variable 'wl-fldmgr-sort-func + 'wl-fldmgr-sort-function) +(elmo-define-obsolete-variable 'wl-expire-archive-get-folder-func + 'wl-expire-archive-get-folder-function) +(elmo-define-obsolete-variable 'wl-highlight-signature-search-func + 'wl-highlight-signature-search-function) + (require 'product) (product-provide (provide 'wl-vars) (require 'wl-version)) -- 1.7.10.4