From: yamaoka Date: Fri, 14 Sep 2001 00:25:27 +0000 (+0000) Subject: * utils/bbdb-wl.el (bbdb-wl-extract-field-value-internal): Enclose the X-Git-Tag: wl-2_7_4~12 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=03c2f9a9bbb0de184b2cec0535dfc257d0c9c3ba;p=elisp%2Fwanderlust.git * utils/bbdb-wl.el (bbdb-wl-extract-field-value-internal): Enclose the function definition with `eval-and-compile'. (bbdb-wl-pop-up-bbdb-buffer): Use `bbdb-display-layout' and `bbdb-pop-up-display-layout' instead of the macro `bbdb-pop-up-elided-display' for the development version of BBDB. (bbdb-get-addresses-headers): Define it before it is referred to. * elmo/acap.el (acap-read-passphrase): Always autoload ange-ftp for both compile-time and run-time to avoid byte-compile warning. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index a1ef94d..aec5371 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,8 @@ +2001-09-14 Katsumi Yamaoka + + * acap.el (acap-read-passphrase): Always autoload ange-ftp for + both compile-time and run-time to avoid byte-compile warning. + 2001-09-13 Kenichi OKADA * elmo-nntp.el (elmo-nntp-post): Fix for `elmo-nntp-default-stream-type'. @@ -124,7 +129,7 @@ * elmo-version.el (elmo-version): Up to 2.7.2. - * elmo.el (elmo-generic-folder-append-messages): Make + * elmo.el (elmo-generic-folder-append-messages): Make fetch-strategy with `use-cache'. * elmo-dop.el (elmo-dop-queue-method-name-alist): New variable. @@ -559,7 +564,7 @@ * elmo.el (elmo-message-fetch): Define. (elmo-message-fetch-with-cache-process): New generic method. (elmo-message-fetch-internal): New generic method. - (elmo-folder-synchronize): + (elmo-folder-synchronize): * elmo-archive.el (elmo-message-fetch-internal): Define. (elmo-message-fetch): Eliminated. diff --git a/elmo/acap.el b/elmo/acap.el index 497ce95..b2f4173 100644 --- a/elmo/acap.el +++ b/elmo/acap.el @@ -26,8 +26,8 @@ ;;; Commentary: ;; ;; acap.el is an elisp library providing an interface for talking to -;; ACAP (RFC2244) servers. -;; +;; ACAP (RFC2244) servers. +;; ;; This is a transcript of short interactive session for demonstration ;; purposes. @@ -160,6 +160,9 @@ Valid states are `closed', `initial', `auth'.") (defvar acap-passphrase-alist nil) +(eval-and-compile + (autoload 'ange-ftp-read-passwd "ange-ftp")) + (defun acap-read-passphrase (prompt) "Prompt is not used." (or acap-passphrase @@ -170,7 +173,6 @@ Valid states are `closed', `initial', `auth'.") (read-passwd prompt) (if (load "passwd" t) (read-passwd prompt) - (autoload 'ange-ftp-read-passwd "ange-ftp") (ange-ftp-read-passwd prompt)))))) ;;; Debug. @@ -208,7 +210,7 @@ Valid states are `closed', `initial', `auth'.") (delq (assoc key acap-passphrase-alist) acap-passphrase-alist)))) -;;; Open, Close +;;; Open, Close (defun acap-open (server &optional user auth port type) (let* ((user (or user acap-default-user)) (buffer (get-buffer-create (concat " *acap on " user " at " server))) @@ -370,7 +372,7 @@ ENTRIES is a store-entry list." (replace-match "\\\\\\\\")) (goto-char beg) (while (re-search-forward "\"" nil t) - (replace-match "\\\\\"")) + (replace-match "\\\\\"")) (goto-char beg) (insert "\"") (goto-char (point-max)) @@ -536,11 +538,11 @@ ENTRIES is a store-entry list." (< acap-reached-tag tag)) (or (and (not (memq (process-status process) '(open run))) (sit-for 1)) - (let ((len (/ (point-max) 1024)) + (let ((len (/ (point-max) 1024)) message-log-max) - (unless (< len 10) - (message "acap read: %dk" len)) - (accept-process-output process 1)))) + (unless (< len 10) + (message "acap read: %dk" len)) + (accept-process-output process 1)))) (message "") acap-response)) diff --git a/utils/ChangeLog b/utils/ChangeLog index cb996fe..6033947 100644 --- a/utils/ChangeLog +++ b/utils/ChangeLog @@ -1,3 +1,12 @@ +2001-09-14 Katsumi Yamaoka + + * bbdb-wl.el (bbdb-wl-extract-field-value-internal): Enclose the + function definition with `eval-and-compile'. + (bbdb-wl-pop-up-bbdb-buffer): Use `bbdb-display-layout' and + `bbdb-pop-up-display-layout' instead of the macro + `bbdb-pop-up-elided-display' for the development version of BBDB. + (bbdb-get-addresses-headers): Define it before it is referred to. + 2001-09-11 Yuuichi Teranishi * bbdb-wl.el (bbdb-wl-exit): Use `bbdb-offer-save' instead of diff --git a/utils/bbdb-wl.el b/utils/bbdb-wl.el index 0bfc457..45e758f 100644 --- a/utils/bbdb-wl.el +++ b/utils/bbdb-wl.el @@ -8,7 +8,7 @@ ;;; Commentary: ;; ;; Insert the following lines in your ~/.wl -;; +;; ;; (require 'bbdb-wl) ;; (bbdb-wl-setup) @@ -26,8 +26,7 @@ (require 'wl-address) (require 'bbdb-com) (defvar bbdb-pop-up-elided-display nil)) -;; (or (fboundp 'bbdb-wl-extract-field-value-internal) -;; (defun bbdb-wl-extract-field-value-internal (field)))) + (require 'bbdb) (defvar bbdb-wl-get-update-record-hook nil) @@ -132,6 +131,18 @@ from-str) string))) +(if (not (boundp 'bbdb-get-addresses-from-headers)) + (defvar bbdb-get-addresses-from-headers + '("From" "Resent-From" "Reply-To"))) + +(if (not (boundp 'bbdb-get-addresses-to-headers)) + (defvar bbdb-get-addresses-to-headers + '("Resent-To" "Resent-CC" "To" "CC" "BCC"))) + +(if (not (boundp 'bbdb-get-addresses-headers)) + (defvar bbdb-get-addresses-headers + (append bbdb-get-addresses-from-headers bbdb-get-addresses-to-headers))) + (defun bbdb-wl-get-addresses (&optional only-first-address) "Return real name and email address of sender respectively recipients. If an address matches `bbdb-user-mail-names' it will be ignored. @@ -260,18 +271,6 @@ of the BBDB record corresponding to the sender of this message." (bbdb-record-edit-property record nil t) (bbdb-record-edit-notes record t)))) -(if (not (boundp 'bbdb-get-addresses-from-headers)) - (defvar bbdb-get-addresses-from-headers - '("From" "Resent-From" "Reply-To"))) - -(if (not (boundp 'bbdb-get-addresses-to-headers)) - (defvar bbdb-get-addresses-to-headers - '("Resent-To" "Resent-CC" "To" "CC" "BCC"))) - -(if (not (boundp 'bbdb-get-addresses-headers)) - (defvar bbdb-get-addresses-headers - (append bbdb-get-addresses-from-headers bbdb-get-addresses-to-headers))) - (defun bbdb-wl-show-records (&optional headers) "Display the contents of the BBDB for the sender of this message. This buffer will be in `bbdb-mode', with associated keybindings." @@ -279,10 +278,10 @@ This buffer will be in `bbdb-mode', with associated keybindings." (wl-summary-set-message-buffer-or-redisplay) (set-buffer (wl-message-get-original-buffer)) (let ((bbdb-get-addresses-headers (or headers bbdb-get-addresses-headers)) - (bbdb-update-records-mode 'annotating) - (bbdb-message-cache nil) - (bbdb-user-mail-names nil) - records bbdb-win) + (bbdb-update-records-mode 'annotating) + (bbdb-message-cache nil) + (bbdb-user-mail-names nil) + records bbdb-win) (setq records (bbdb-wl-update-records t)) (if records (progn @@ -307,12 +306,12 @@ with two prefix arguments show all records. This buffer will be in `bbdb-mode', with associated keybindings." (interactive "p") (cond ((= 4 show-recipients) - (bbdb-wl-show-all-recipients)) - ((= 16 show-recipients) - (bbdb-wl-show-records)) - (t - (if (null (bbdb-wl-show-records bbdb-get-addresses-from-headers)) - (bbdb-wl-show-all-recipients))))) + (bbdb-wl-show-all-recipients)) + ((= 16 show-recipients) + (bbdb-wl-show-records)) + (t + (if (null (bbdb-wl-show-records bbdb-get-addresses-from-headers)) + (bbdb-wl-show-all-recipients))))) (defun bbdb-wl-pop-up-bbdb-buffer (&optional offer-to-create) "Make the *BBDB* buffer be displayed along with the WL window(s), @@ -347,11 +346,18 @@ displaying the record corresponding to the sender of the current message." (let ((bbdb-gag-messages t) (bbdb-use-pop-up nil) (bbdb-electric-p nil)) - (let ((records (static-if (fboundp 'bbdb-update-records) - (bbdb-wl-update-records offer-to-create) - (bbdb-wl-update-record offer-to-create))) - (bbdb-elided-display (bbdb-pop-up-elided-display)) - (b (current-buffer))) + (let* ((records (static-if (fboundp 'bbdb-update-records) + (bbdb-wl-update-records offer-to-create) + (bbdb-wl-update-record offer-to-create))) + ;; BBDB versions v2.33 and later. + (bbdb-display-layout + (cond ((boundp 'bbdb-pop-up-display-layout) + (symbol-value 'bbdb-pop-up-display-layout)) + ((boundp 'bbdb-pop-up-elided-display) + (symbol-value 'bbdb-pop-up-elided-display)))) + ;; BBDB versions prior to v2.33, + (bbdb-elided-display bbdb-display-layout) + (b (current-buffer))) (bbdb-display-records (if (listp records) records (list records))) (set-buffer b) @@ -364,27 +370,28 @@ displaying the record corresponding to the sender of the current message." ;;; @ bbdb-extract-field-value -- stolen from tm-bbdb. ;;; -(and (not (fboundp 'bbdb-wl-extract-field-value-internal)) -;;; (not (fboundp 'PLEASE_REPLACE_WITH_SEMI-BASED_MIME-BBDB)) ;; mime-bbdb - (progn - (if (and (string< bbdb-version "1.58") - ;; (not (fboundp 'bbdb-extract-field-value) ; defined as autoload - (not (fboundp 'bbdb-header-start))) - (load "bbdb-hooks") - (require 'bbdb-hooks)) - (fset 'bbdb-wl-extract-field-value-internal - (cond - ((fboundp 'tm:bbdb-extract-field-value) - (symbol-function 'tm:bbdb-extract-field-value)) - (t (symbol-function 'bbdb-extract-field-value)))) - (defun bbdb-extract-field-value (field) - (let ((value (bbdb-wl-extract-field-value-internal field))) - (with-temp-buffer ; to keep raw buffer unibyte. - (elmo-set-buffer-multibyte - default-enable-multibyte-characters) - (and value - (eword-decode-string value))))) - )) +(eval-and-compile + (if (fboundp 'bbdb-wl-extract-field-value-internal) +;;(if (fboundp 'PLEASE_REPLACE_WITH_SEMI-BASED_MIME-BBDB)) ;; mime-bbdb + nil + (if (and (string< bbdb-version "1.58") + ;;(not (fboundp 'bbdb-extract-field-value) ;; defined as autoload + (not (fboundp 'bbdb-header-start))) + (load "bbdb-hooks") + (require 'bbdb-hooks)) + (fset 'bbdb-wl-extract-field-value-internal + (cond + ((fboundp 'tm:bbdb-extract-field-value) + (symbol-function 'tm:bbdb-extract-field-value)) + (t (symbol-function 'bbdb-extract-field-value)))) + (defun bbdb-extract-field-value (field) + (let ((value (bbdb-wl-extract-field-value-internal field))) + (with-temp-buffer ; to keep raw buffer unibyte. + (elmo-set-buffer-multibyte + default-enable-multibyte-characters) + (and value + (eword-decode-string value))))) + )) (provide 'bbdb-wl)