Commit 47570699 authored by Deepak Goel's avatar Deepak Goel
Browse files

message format spec fixes, commit 14, this should be final commit

parent c4fbd740
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
......
......@@ -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)
......
......@@ -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)))
......
......@@ -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)
......
......@@ -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'.
......
......@@ -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 ()
......
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment