+2003-05-12 Yoichi NAKAYAMA <yoichi@geiin.org>
+
+ * acap.el, elmo-imap4.el, elmo-nntp.el, elmo-util.el, pldap.el:
+ `message' and `error' take format string.
+
2003-04-10 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
* elmo-pipe.el (elmo-folder-clear): Implemented clear copied-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))
(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)
(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)
(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))
(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)
(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
(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."
(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
(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)
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)))
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.
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)
+2003-05-12 Yoichi NAKAYAMA <yoichi@geiin.org>
+
+ * 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 <yoichi@geiin.org>
* wl-folder (wl-folder-insert-entity): Display a message,
"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
(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)
)
;;
(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
(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))))))
(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
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
(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)
(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)
(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)
))
)))
(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)
(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."
(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."
msgid
(read-from-minibuffer "NNTP Server: ")))
(t
- (message errmsg)
+ (message "%s" errmsg)
nil)))
((or (eq wl-summary-search-via-nntp 'force)
(and
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)
(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