From 47570699e45fc013ac0a14138e9f6be9f60a5bca Mon Sep 17 00:00:00 2001 From: Deepak Goel Date: Sun, 18 Sep 2005 12:48:32 +0000 Subject: [PATCH] message format spec fixes, commit 14, this should be final commit --- lisp/mh-e/ChangeLog | 21 +++++++++++++++++++++ lisp/mh-e/mh-alias.el | 2 +- lisp/mh-e/mh-e.el | 14 +++++++------- lisp/mh-e/mh-index.el | 2 +- lisp/mh-e/mh-junk.el | 20 ++++++++++---------- lisp/mh-e/mh-mime.el | 2 +- lisp/mh-e/mh-print.el | 14 +++++++------- 7 files changed, 48 insertions(+), 27 deletions(-) diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog index 28cc6c2a6d0..b1c0dd236f5 100644 --- a/lisp/mh-e/ChangeLog +++ b/lisp/mh-e/ChangeLog @@ -1,3 +1,24 @@ +2005-09-18 D Goel + + + * mh-alias.el (mh-alias-ali): Fix `message' call: first arg + should be a format spec. + + * mh-print.el (mh-ps-spool-buffer, mh-ps-spool-a-msg) + (mh-ps-print-msg, mh-ps-print-msg-show): Ditto. + + * mh-mime.el (mh-toggle-mh-decode-mime-flag): Ditto. + + * mh-index.el (mh-index-sequenced-messages): Ditto. + + + * mh-e.el (mh-refile-or-write-again, mh-page-msg): Ditto. + + * mh-junk.el (mh-junk-blacklist, mh-junk-whitelist) + (mh-spamassassin-blacklist, mh-spamassassin-whitelist): Ditto. + + + 2005-08-15 Dan Nicolaescu * mh-customize.el: Do not use face-alias compatibility for diff --git a/lisp/mh-e/mh-alias.el b/lisp/mh-e/mh-alias.el index ceec6e6556d..ba429f24b9f 100644 --- a/lisp/mh-e/mh-alias.el +++ b/lisp/mh-e/mh-alias.el @@ -251,7 +251,7 @@ ali returns the string unchanged if not defined. The same is done here." (if (looking-at "^$") (delete-backward-char 1)) (buffer-substring (point-min)(point-max))) (error (progn - (message (error-message-string err)) + (message "%s" (error-message-string err)) alias)))) (defun mh-alias-expand (alias) diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el index 3d917c16935..c0f47537c97 100644 --- a/lisp/mh-e/mh-e.el +++ b/lisp/mh-e/mh-e.el @@ -734,7 +734,7 @@ If INTERACTIVE-FLAG is non-nil then the function was called interactively." (apply 'mh-write-msg-to-file msg (cdr mh-last-destination))) (mh-next-msg interactive-flag) (format "Destination: %s" (cdr mh-last-destination))))) - (message output))) + (message "%s" output))) (defun mh-quit () "Quit the current MH-E folder. @@ -778,12 +778,12 @@ bottom of the current message." (if (mh-in-show-buffer (mh-show-buffer) (pos-visible-in-window-p (point-max))) (progn - (message (format - "End of message (Type %s to read %s undeleted message)" - (single-key-description last-input-event) - (if (equal mh-next-direction 'backward) - "previous" - "next"))) + (message + "End of message (Type %s to read %s undeleted message)" + (single-key-description last-input-event) + (if (equal mh-next-direction 'backward) + "previous" + "next")) (setq mh-page-to-next-msg-flag t)) (scroll-other-window arg))) (mh-show))) diff --git a/lisp/mh-e/mh-index.el b/lisp/mh-e/mh-index.el index 28cb0b44fd4..3fef04418f5 100644 --- a/lisp/mh-e/mh-index.el +++ b/lisp/mh-e/mh-index.el @@ -1325,7 +1325,7 @@ space-separated list of folders, or nothing to search all folders." mh-index-sequence-search-flag t mh-index-previous-search (list folders sequence)) (mh-index-write-data) - (when (stringp message) (message message)))) + (when (stringp message) (message "%s" message)))) ;;;###mh-autoload (defun mh-index-new-messages (folders) diff --git a/lisp/mh-e/mh-junk.el b/lisp/mh-e/mh-junk.el index a20117d8582..b78d85410c7 100644 --- a/lisp/mh-e/mh-junk.el +++ b/lisp/mh-e/mh-junk.el @@ -63,9 +63,9 @@ For more information about using your particular spam fighting program, see: (substring mh-junk-disposition 1))) (t (concat "+" mh-junk-disposition))))) (mh-iterate-on-range msg range - (message (format "Blacklisting message %d..." msg)) + (message "Blacklisting message %d..." msg) (funcall (symbol-function blacklist-func) msg) - (message (format "Blacklisting message %d...done" msg)) + (message "Blacklisting message %d...done" msg) (if (not (memq msg mh-seen-list)) (setq mh-seen-list (cons msg mh-seen-list))) (if dest @@ -87,9 +87,9 @@ The `mh-junk-program' option specifies the spam program in use." (unless whitelist-func (error "Customize `mh-junk-program' appropriately")) (mh-iterate-on-range msg range - (message (format "Whitelisting message %d..." msg)) + (message "Whitelisting message %d..." msg) (funcall (symbol-function whitelist-func) msg) - (message (format "Whitelisting message %d...done" msg)) + (message "Whitelisting message %d...done" msg) (mh-refile-a-msg nil (intern mh-inbox))) (mh-next-msg))) @@ -179,7 +179,7 @@ done by adding the following to your crontab: (msg-file (mh-msg-filename msg mh-current-folder)) (sender)) (save-excursion - (message (format "Reporting message %d..." msg)) + (message "Reporting message %d..." msg) (mh-truncate-log-buffer) (call-process mh-spamassassin-executable msg-file mh-log-buffer nil ;;"--report" "--remove-from-whitelist" @@ -188,7 +188,7 @@ done by adding the following to your crontab: (message "Recategorizing this message as spam...") (call-process mh-sa-learn-executable msg-file mh-log-buffer nil "--single" "--spam" "--local" "--no-rebuild")) - (message (format "Blacklisting message %d..." msg)) + (message "Blacklisting message %d..." msg) (set-buffer (get-buffer-create mh-temp-buffer)) (erase-buffer) (call-process (expand-file-name mh-scan-prog mh-progs) @@ -200,8 +200,8 @@ done by adding the following to your crontab: (progn (setq sender (match-string 0)) (mh-spamassassin-add-rule "blacklist_from" sender) - (message (format "Blacklisting message %d...done" msg))) - (message (format "Blacklisting message %d...not done (from my address)" msg)))))) + (message "Blacklisting message %d...done" msg)) + (message "Blacklisting message %d...not done (from my address)" msg))))) (defun mh-spamassassin-whitelist (msg) "Whitelist MSG with SpamAssassin. @@ -230,14 +230,14 @@ See `mh-spamassassin-blacklist' for more information." (message "Recategorizing this message as ham...") (call-process mh-sa-learn-executable msg-file mh-temp-buffer nil "--single" "--ham" "--local --no-rebuild")) - (message (format "Whitelisting message %d..." msg)) + (message "Whitelisting message %d..." msg) (setq from (car (mh-funcall-if-exists ietf-drums-parse-address (mh-get-header-field "From:")))) (kill-buffer nil) (unless (or (null from) (equal from "")) (mh-spamassassin-add-rule "whitelist_from" from)) - (message (format "Whitelisting message %d...done" msg))))) + (message "Whitelisting message %d...done" msg)))) (defun mh-spamassassin-add-rule (rule body) "Add a new rule to `~/.spamassassin/user_prefs'. diff --git a/lisp/mh-e/mh-mime.el b/lisp/mh-e/mh-mime.el index 3e5068c7bdc..980942a0f47 100644 --- a/lisp/mh-e/mh-mime.el +++ b/lisp/mh-e/mh-mime.el @@ -858,7 +858,7 @@ If message has been encoded for transfer take that into account." (interactive) (setq mh-decode-mime-flag (not mh-decode-mime-flag)) (mh-show nil t) - (message (format "(setq mh-decode-mime-flag %s)" mh-decode-mime-flag))) + (message "(setq mh-decode-mime-flag %s)" mh-decode-mime-flag)) ;;;###mh-autoload (defun mh-decode-message-header () diff --git a/lisp/mh-e/mh-print.el b/lisp/mh-e/mh-print.el index 814c5e42174..6b2e8a3474e 100644 --- a/lisp/mh-e/mh-print.el +++ b/lisp/mh-e/mh-print.el @@ -64,7 +64,7 @@ Sensible choices are the functions `ps-spool-buffer' and ;; XXX - Default print buffer is bogus (defun mh-ps-spool-buffer (buffer) "Send BUFFER to printer queue." - (message (format "mh-ps-spool-buffer %s" buffer)) + (message "mh-ps-spool-buffer %s" buffer) (save-excursion (set-buffer buffer) (let ((ps-print-color-p mh-ps-print-color-option) @@ -85,8 +85,8 @@ Sensible choices are the functions `ps-spool-buffer' and "Print MSG. First the message is decoded in BUFFER before the results are sent to the printer." - (message (format "mh-ps-spool-a-msg msg %s buffer %s" - msg buffer)) + (message "mh-ps-spool-a-msg msg %s buffer %s" + msg buffer) (let ((mh-show-buffer mh-show-buffer) (folder mh-current-folder) ;; The following is commented out because @@ -113,8 +113,8 @@ printer." Check the documentation of `mh-interactive-range' to see how RANGE is read in interactive use." (interactive (list (mh-interactive-range "Print"))) - (message (format "mh-ps-print-msg range %s keys %s" - range (this-command-keys))) + (message "mh-ps-print-msg range %s keys %s" + range (this-command-keys)) (mh-iterate-on-range msg range (let ((buffer (get-buffer-create mh-temp-buffer))) (unwind-protect @@ -152,8 +152,8 @@ interactive use." (defun mh-ps-print-msg-show (file) "Print current show buffer to FILE." (interactive (list (mh-ps-print-preprint current-prefix-arg))) - (message (format "mh-ps-print-msg-show file %s keys %s mh-show-buffer %s" - file (this-command-keys) mh-show-buffer)) + (message "mh-ps-print-msg-show file %s keys %s mh-show-buffer %s" + file (this-command-keys mh-show-buffer)) (let ((msg (mh-get-msg-num t)) (folder mh-current-folder) (show-buffer mh-show-buffer) -- 2.39.5