changeset 65595:8e711c68e4ff

message format spec fixes, commit 14, this should be final commit
author Deepak Goel <deego@gnufans.org>
date Sun, 18 Sep 2005 12:48:32 +0000
parents edc6523dab8b
children e188ae94d98b
files lisp/mh-e/ChangeLog lisp/mh-e/mh-alias.el lisp/mh-e/mh-e.el lisp/mh-e/mh-index.el lisp/mh-e/mh-junk.el lisp/mh-e/mh-mime.el lisp/mh-e/mh-print.el
diffstat 7 files changed, 48 insertions(+), 27 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mh-e/ChangeLog	Sun Sep 18 12:45:54 2005 +0000
+++ b/lisp/mh-e/ChangeLog	Sun Sep 18 12:48:32 2005 +0000
@@ -1,3 +1,24 @@
+2005-09-18  D Goel  <deego@gnufans.org>
+
+
+	* 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  <dann@ics.uci.edu>
 
 	* mh-customize.el: Do not use face-alias compatibility for
--- a/lisp/mh-e/mh-alias.el	Sun Sep 18 12:45:54 2005 +0000
+++ b/lisp/mh-e/mh-alias.el	Sun Sep 18 12:48:32 2005 +0000
@@ -251,7 +251,7 @@
         (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)
--- a/lisp/mh-e/mh-e.el	Sun Sep 18 12:45:54 2005 +0000
+++ b/lisp/mh-e/mh-e.el	Sun Sep 18 12:48:32 2005 +0000
@@ -734,7 +734,7 @@
                    (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 @@
         (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)))
--- a/lisp/mh-e/mh-index.el	Sun Sep 18 12:45:54 2005 +0000
+++ b/lisp/mh-e/mh-index.el	Sun Sep 18 12:48:32 2005 +0000
@@ -1325,7 +1325,7 @@
           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)
--- a/lisp/mh-e/mh-junk.el	Sun Sep 18 12:45:54 2005 +0000
+++ b/lisp/mh-e/mh-junk.el	Sun Sep 18 12:48:32 2005 +0000
@@ -63,9 +63,9 @@
                                (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 @@
     (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 @@
         (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 @@
           (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 @@
           (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 @@
         (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'.
--- a/lisp/mh-e/mh-mime.el	Sun Sep 18 12:45:54 2005 +0000
+++ b/lisp/mh-e/mh-mime.el	Sun Sep 18 12:48:32 2005 +0000
@@ -858,7 +858,7 @@
   (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 ()
--- a/lisp/mh-e/mh-print.el	Sun Sep 18 12:45:54 2005 +0000
+++ b/lisp/mh-e/mh-print.el	Sun Sep 18 12:48:32 2005 +0000
@@ -64,7 +64,7 @@
 ;; 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 @@
   "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 @@
 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 @@
 (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)