From: yoichi Date: Mon, 12 May 2003 13:55:14 +0000 (+0000) Subject: `message' and `error' take format string. X-Git-Tag: merged-trunk-to-elmo-mark-18~25 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1cd38ff71e9246d17a04722dd20625a9ecb8a9ef;p=elisp%2Fwanderlust.git `message' and `error' take format string. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index b33dbdd..930d6b2 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,8 @@ +2003-05-12 Yoichi NAKAYAMA + + * acap.el, elmo-imap4.el, elmo-nntp.el, elmo-util.el, pldap.el: + `message' and `error' take format string. + 2003-04-10 Hiroya Murata * elmo-pipe.el (elmo-folder-clear): Implemented clear copied-list. diff --git a/elmo/acap.el b/elmo/acap.el index 4948740..df0dbe4 100644 --- a/elmo/acap.el +++ b/elmo/acap.el @@ -550,7 +550,8 @@ ENTRIES is a store-entry list." (when (acap-response-bye-p acap-response) (if acap-logging-out (setq acap-response nil) - (error (prog1 (acap-response-bye-message acap-response) + (error "%s" + (prog1 (acap-response-bye-message acap-response) (setq acap-response nil))))) (or (and (not (memq (process-status process) '(open run))) (sit-for 1)) @@ -814,8 +815,8 @@ ENTRIES is a store-entry list." (acap-forward) (acap-parse-return-data-list))))) (ALERT ;(cons 'alert (acap-parse-resp-body)) - (message (nth 1 (acap-parse-resp-body)))) - ((BYE Bye bye) + (message "%s" (nth 1 (acap-parse-resp-body)))) + ((BYE Bye bye) (cons 'bye (acap-parse-resp-body))) (CHANGE (cons 'change (list (acap-parse-quoted) @@ -837,7 +838,7 @@ ENTRIES is a store-entry list." (NO (cons 'stat-no (acap-parse-resp-body))) (BAD ;(cons 'stat-bad (acap-parse-resp-body)) ;; XXX cyrus-sml-acap does not return tagged bad response? - (error (nth 1 (acap-parse-resp-body)))))) + (error "%s" (nth 1 (acap-parse-resp-body)))))) ((integerp token) ;; tagged response. (setq tag token) diff --git a/elmo/elmo-imap4.el b/elmo/elmo-imap4.el index a33a241..e53f14c 100644 --- a/elmo/elmo-imap4.el +++ b/elmo/elmo-imap4.el @@ -354,7 +354,7 @@ TAG is the tag of the command" (elmo-imap4-response-bye-p elmo-imap4-current-response) (when (elmo-imap4-response-garbage-p elmo-imap4-current-response) - (message "Garbage response: %s" + (message "Garbage response: %s" (elmo-imap4-response-value elmo-imap4-current-response 'garbage)) @@ -696,9 +696,9 @@ Returns response value if selecting folder succeed. " (elmo-imap4-response-bye-p response)) (elmo-imap4-process-bye session) (unless no-error - (error (or - (elmo-imap4-response-error-text response) - (format "Select %s failed" mailbox))))))) + (error "%s" + (or (elmo-imap4-response-error-text response) + (format "Select %s failed" mailbox))))))) (and result response)))) (defun elmo-imap4-check-validity (spec validity-file) @@ -2385,9 +2385,9 @@ If optional argument REMOVE is non-nil, remove FLAG." (elmo-imap4-session-set-current-mailbox-internal session nil) (if (elmo-imap4-response-bye-p response) (elmo-imap4-process-bye session) - (error (or - (elmo-imap4-response-error-text response) - (format "Select %s failed" mailbox))))) + (error "%s" + (or (elmo-imap4-response-error-text response) + (format "Select %s failed" mailbox))))) (message "Selecting %s...done" (elmo-folder-name-internal folder)) (elmo-folder-set-msgdb-internal diff --git a/elmo/elmo-nntp.el b/elmo/elmo-nntp.el index 7ec2c2f..980db9c 100644 --- a/elmo/elmo-nntp.el +++ b/elmo/elmo-nntp.el @@ -1048,7 +1048,7 @@ Don't cache if nil.") (if (not (string-match "^2" (setq response (elmo-nntp-read-raw-response session)))) - (error (concat "NNTP error: " response)))))) + (error "NNTP error: %s" response))))) (defsubst elmo-nntp-send-data-line (session line) "Send LINE to SESSION." diff --git a/elmo/elmo-util.el b/elmo/elmo-util.el index 9fab0b4..59fb3f8 100644 --- a/elmo/elmo-util.el +++ b/elmo/elmo-util.el @@ -765,7 +765,7 @@ the directory becomes empty after deletion." (defun elmo-list-diff (list1 list2 &optional mes) (if mes - (message mes)) + (message "%s" mes)) (let ((clist1 (copy-sequence list1)) (clist2 (copy-sequence list2))) (while list2 @@ -775,7 +775,7 @@ the directory becomes empty after deletion." (setq clist2 (delq (car list1) clist2)) (setq list1 (cdr list1))) (if mes - (message (concat mes "done"))) + (message "%sdone" mes)) (list clist1 clist2))) (defun elmo-list-bigger-diff (list1 list2 &optional mes) diff --git a/elmo/pldap.el b/elmo/pldap.el index e8b944b..1d6d65f 100644 --- a/elmo/pldap.el +++ b/elmo/pldap.el @@ -509,12 +509,12 @@ DN is the distinguished name of the entry to delete." nil (current-buffer) t (append arglist (list dn)))) - (if (integerp ret) - (if (not (zerop ret)) - (error (car (split-string (buffer-string) "\n")))) - (if (and (setq ret (buffer-string)); Nemacs - (string-match "ldap_delete:" ret)) - (error (car (split-string ret "\n")))))))) + (cond ((integerp ret) + (or (zerop ret) + (error "%s" (car (split-string (buffer-string) "\n"))))) + ((and (setq ret (buffer-string)); Nemacs + (string-match "ldap_delete:" ret)) + (error "%s" (car (split-string ret "\n")))))))) (defmacro ldap/ldif-insert-field (attr value) (` (if (not (ldap/ldif-safe-string-p (, value))) @@ -567,12 +567,12 @@ or `replace'. ATTR is the LDAP attribute type to modify." ldap-modify-program t t nil arglist)) - (if (integerp ret) - (if (not (zerop ret)) - (error (car (split-string (buffer-string) "\n")))) - (if (and (setq ret (buffer-string)); Nemacs - (string-match "ldap_modify:" ret)) - (error (car (split-string ret "\n")))))))) + (cond ((integerp ret) + (or (zerop ret) + (error "%s" (car (split-string (buffer-string) "\n"))))) + ((and (setq ret (buffer-string)); Nemacs + (string-match "ldap_modify:" ret)) + (error "%s" (car (split-string ret "\n")))))))) (defun ldap-add (ldap dn entry) "Add an entry to an LDAP directory. @@ -607,12 +607,12 @@ containing attribute/value string pairs." ldap-add-program t t nil arglist)) - (if (integerp ret) - (if (not (zerop ret)) - (error (car (split-string (buffer-string) "\n")))) - (if (and (setq ret (buffer-string)) ; Nemacs - (string-match "ldap_add:" ret)) - (error (car (split-string ret "\n")))))))) + (cond ((integerp ret) + (or (zerop ret) + (error "%s" (car (split-string (buffer-string) "\n"))))) + ((and (setq ret (buffer-string)) ; Nemacs + (string-match "ldap_add:" ret)) + (error "%s" (car (split-string ret "\n")))))))) (defun ldap-search-basic (ldap filter base scope &optional attrs attrsonly withdn verbose) diff --git a/wl/ChangeLog b/wl/ChangeLog index 1a7920b..d2e1ff7 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,8 @@ +2003-05-12 Yoichi NAKAYAMA + + * wl-draft.el, wl-expire.el, wl-mime.el, wl-summary.el, wl-util.el + : `message' and `error' take format string. + 2003-05-11 Yoichi NAKAYAMA * wl-folder (wl-folder-insert-entity): Display a message, diff --git a/wl/wl-draft.el b/wl/wl-draft.el index f9ed725..fd8b66f 100644 --- a/wl/wl-draft.el +++ b/wl/wl-draft.el @@ -1149,7 +1149,7 @@ If FORCE-MSGID, insert message-id regardless of `wl-insert-message-id'." "Send the message in the current buffer. Not modified the header fields." (let (delimline mime-bcc) (if (and wl-draft-verbose-send mes-string) - (message mes-string)) + (message "%s" mes-string)) ;; get fcc folders. (setq delimline (wl-draft-get-header-delimiter t)) (unless wl-draft-fcc-list @@ -1207,10 +1207,11 @@ If FORCE-MSGID, insert message-id regardless of `wl-insert-message-id'." (setq wl-draft-verbose-msg (format "Sending%s and Queuing%s..." sent-via unplugged-via)) - (message (concat wl-draft-verbose-msg "done"))) + (message "%sdone" wl-draft-verbose-msg)) (if mes-string - (message (concat mes-string - (if sent-via "done" "failed"))))))))) + (message "%s%s" + mes-string + (if sent-via "done" "failed")))))))) (not wl-sent-message-modified)) ;; return value (defun wl-draft-raw-send (&optional kill-when-done force-pre-hook mes-string) @@ -1313,7 +1314,7 @@ If KILL-WHEN-DONE is non-nil, current draft buffer is killed" ) ;; (if wl-draft-verbose-send - (message (or mes-string "Sending..."))) + (message "%s" (or mes-string "Sending..."))) (funcall wl-draft-send-function editing-buffer kill-when-done) ;; Now perform actions on successful sending. (while mail-send-actions @@ -1323,9 +1324,10 @@ If KILL-WHEN-DONE is non-nil, current draft buffer is killed" (error)) (setq mail-send-actions (cdr mail-send-actions))) (if wl-draft-verbose-send - (message (concat (or wl-draft-verbose-msg - mes-string "Sending...") - "done")))) + (message "%sdone" + (or wl-draft-verbose-msg + mes-string + "Sending...")))) ;; kill sending buffer, anyway. (and (buffer-live-p sending-buffer) (kill-buffer sending-buffer)))))) diff --git a/wl/wl-expire.el b/wl/wl-expire.el index 740d635..1f2f3f5 100644 --- a/wl/wl-expire.el +++ b/wl/wl-expire.el @@ -115,8 +115,8 @@ (wl-expire-append-log (elmo-folder-name-internal folder) delete-list nil 'delete) - (message "%s" (concat mess "done"))) - (error (concat mess "failed!"))))) + (message "%sdone" mess)) + (error "%sfailed!" mess)))) (cons delete-list (length delete-list))) (defun wl-expire-refile (folder refile-list msgdb dst-folder @@ -157,8 +157,8 @@ refile-list (elmo-folder-name-internal dst-folder) (if copy 'copy 'move)) - (message "%s" (concat mess "done"))) - (error (concat mess "failed!")))))) + (message "%sdone" mess)) + (error "%sfailed!" mess))))) (cons refile-list (length refile-list)))) (defun wl-expire-refile-with-copy-reserve-msg @@ -233,8 +233,8 @@ If REFILE-LIST includes reserve mark message, so copy." (elmo-folder-name-internal dst-folder) (length refile-list)))) (if ret-val - (message (concat mes "done")) - (error (concat mes "failed!"))))) + (message "%sdone" mes) + (error "%sfailed!" mes)))) (cons refile-list copy-len)))) (defun wl-expire-archive-get-folder (src-folder &optional fmt dst-folder-arg) @@ -591,11 +591,11 @@ ex. +ml/wl/1999_11/, +ml/wl/1999_12/." (wl-expire-delete-reserve-marked-msgs-from-list hide-list (elmo-msgdb-get-mark-alist msgdb)))) (let ((mess (format "Hiding %s msgs..." (length hide-list)))) - (message mess) + (message "%s" mess) (elmo-msgdb-delete-msgs (elmo-folder-msgdb folder) hide-list) (elmo-msgdb-append-to-killed-list folder hide-list) (elmo-folder-commit folder) - (message (concat mess "done")) + (message "%sdone" mess) (cons hide-list (length hide-list)))) (defsubst wl-expire-folder-p (entity) diff --git a/wl/wl-mime.el b/wl/wl-mime.el index 37afaf2..379352c 100644 --- a/wl/wl-mime.el +++ b/wl/wl-mime.el @@ -133,9 +133,8 @@ It calls following-method selected from variable (if (functionp f) (funcall f new-buf) (message - (format - "Sorry, following method for %s is not implemented yet." - mode)) + "Sorry, following method for %s is not implemented yet." + mode) )) ))) @@ -192,7 +191,7 @@ It calls following-method selected from variable (when wl-highlight-body-too (wl-highlight-body)) (run-hooks 'wl-draft-preview-message-hook)) - (message recipients-message))) + (message "%s" recipients-message))) (defalias 'wl-draft-caesar-region 'mule-caesar-region) diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 4d9b294..65562fc 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -1941,7 +1941,7 @@ If ARG is non-nil, checking is omitted." (while diffs (wl-summary-mark-as-unread (car diffs) 'no-server) (setq diffs (cdr diffs))) - (if (interactive-p) (message mes))))) + (if (interactive-p) (message "%s" mes))))) (defun wl-summary-sync-update (&optional unset-cursor sync-all no-check) "Update the summary view to the newest folder status." @@ -3109,14 +3109,13 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (wl-summary-toggle-disp-msg 'off) (setq wl-message-buffer nil)) (set-buffer-modified-p nil) - (message (concat "Executing...done" - (if (> refile-failures 0) - (format " (%d refiling failed)" refile-failures) - "") - (if (> copy-failures 0) - (format " (%d copying failed)" copy-failures) - "") - ".")))))) + (message "Executing...done%s%s" + (if (> refile-failures 0) + (format " (%d refiling failed)" refile-failures) + "") + (if (> copy-failures 0) + (format " (%d copying failed)" copy-failures) + "")))))) (defun wl-summary-erase (&optional number) "Erase message actually, without moving it to trash." @@ -4739,7 +4738,7 @@ Return t if message exists." msgid (read-from-minibuffer "NNTP Server: "))) (t - (message errmsg) + (message "%s" errmsg) nil))) ((or (eq wl-summary-search-via-nntp 'force) (and @@ -4748,7 +4747,7 @@ Return t if message exists." wl-summary-search-via-nntp)) (wl-summary-jump-to-msg-by-message-id-via-nntp msgid)) (t - (message errmsg) + (message "%s" errmsg) nil)))))) (defun wl-summary-jump-to-msg-by-message-id-via-nntp (&optional id server-spec) diff --git a/wl/wl-util.el b/wl/wl-util.el index 9f8714b..6f86ff3 100644 --- a/wl/wl-util.el +++ b/wl/wl-util.el @@ -154,7 +154,7 @@ If HACK-ADDRESSES is t, then the strings are considered to be mail addresses, (cmd (if (featurep 'xemacs) (event-to-character last-command-event) (string-to-char (format "%s" (this-command-keys)))))) - (message mes-string) + (message "%s" mes-string) (setq key (car (setq keve (wl-read-event-char)))) (if (or (equal key ?\ ) (and cmd