changeset 68013:bbc0e52abce5

* mh-alias.el (mh-alias-add-alias): Grand message and error string unification. Use single sentence if possible by using semicolon. Don't end message with punctuation. Don't need format with message. Quote messages as in docstrings: use `' around symbols, \" for option choices. Don't use quotes around %s. * mh-comp.el (mh-complete-word): Ditto. * mh-customize.el (mh-adaptive-cmd-note-flag-check) (mh-scan-format-file-check): Ditto. * mh-e.el (mh-refile-or-write-again, mh-previous-unread-msg) (mh-delete-a-msg, mh-refile-a-msg, mh-next-unread-msg) (mh-msg-num-width-to-column): Ditto. * mh-identity.el (mh-identity-field-handler): Ditto. * mh-index.el (mh-mairix-execute-search) (mh-swish-execute-search, mh-swish++-execute-search) (mh-namazu-execute-search): Ditto. * mh-init.el (mh-variant-set): Ditto. * mh-mime.el (mh-mh-to-mime-undo, mh-mml-forward-message) (mh-secure-message, mh-mime-display): Ditto. * mh-pick.el (mh-search-folder, mh-pick-construct-regexp): Ditto. * mh-seq.el (mh-narrow-to-seq, mh-put-msg-in-seq, mh-read-seq) (mh-read-range, mh-thread-container-subject): Ditto. * mh-utils.el (mh-x-image-scale-and-display) (mh-prompt-for-folder, mh-handle-process-error) (mh-list-to-string-1): Ditto.
author Bill Wohler <wohler@newt.com>
date Wed, 04 Jan 2006 02:08:12 +0000
parents 256cc87e0619
children 82d5232a099c
files lisp/mh-e/ChangeLog lisp/mh-e/mh-alias.el lisp/mh-e/mh-comp.el lisp/mh-e/mh-customize.el lisp/mh-e/mh-e.el lisp/mh-e/mh-identity.el lisp/mh-e/mh-index.el lisp/mh-e/mh-init.el lisp/mh-e/mh-mime.el lisp/mh-e/mh-pick.el lisp/mh-e/mh-seq.el lisp/mh-e/mh-utils.el
diffstat 12 files changed, 72 insertions(+), 38 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mh-e/ChangeLog	Wed Jan 04 01:03:20 2006 +0000
+++ b/lisp/mh-e/ChangeLog	Wed Jan 04 02:08:12 2006 +0000
@@ -1,5 +1,40 @@
 2006-01-03  Bill Wohler  <wohler@newt.com>
 
+	* mh-alias.el (mh-alias-add-alias): Grand message and error string
+	unification. Use single sentence if possible by using semicolon.
+	Don't end message with punctuation. Don't need format with
+	message. Quote messages as in docstrings: use `' around symbols,
+	\" for option choices. Don't use quotes around %s.
+	
+	* mh-comp.el (mh-complete-word): Ditto.
+
+	* mh-customize.el (mh-adaptive-cmd-note-flag-check)
+	(mh-scan-format-file-check): Ditto.
+
+	* mh-e.el (mh-refile-or-write-again, mh-previous-unread-msg)
+	(mh-delete-a-msg, mh-refile-a-msg, mh-next-unread-msg)
+	(mh-msg-num-width-to-column): Ditto.
+
+	* mh-identity.el (mh-identity-field-handler): Ditto.
+
+	* mh-index.el (mh-mairix-execute-search)
+	(mh-swish-execute-search, mh-swish++-execute-search)
+	(mh-namazu-execute-search): Ditto.
+
+	* mh-init.el (mh-variant-set): Ditto.
+
+	* mh-mime.el (mh-mh-to-mime-undo, mh-mml-forward-message)
+	(mh-secure-message, mh-mime-display): Ditto.
+
+	* mh-pick.el (mh-search-folder, mh-pick-construct-regexp): Ditto.
+
+	* mh-seq.el (mh-narrow-to-seq, mh-put-msg-in-seq, mh-read-seq)
+	(mh-read-range, mh-thread-container-subject): Ditto.
+
+	* mh-utils.el (mh-x-image-scale-and-display)
+	(mh-prompt-for-folder, mh-handle-process-error)
+	(mh-list-to-string-1): Ditto.
+
 	* mh-comp.el (mh-reply): Use standard default notation in
 	prompts (closes SF #1275933).
 
--- a/lisp/mh-e/mh-alias.el	Wed Jan 04 01:03:20 2006 +0000
+++ b/lisp/mh-e/mh-alias.el	Wed Jan 04 02:08:12 2006 +0000
@@ -571,7 +571,7 @@
     (cond
      ((and (equal alias address-alias)
            (equal address alias-address))
-      (message "Already defined as: %s" alias-address))
+      (message "Already defined as %s" alias-address))
      (address-alias
       (if (y-or-n-p (format "Address has alias %s; set new one? "
                             address-alias))
--- a/lisp/mh-e/mh-comp.el	Wed Jan 04 01:03:20 2006 +0000
+++ b/lisp/mh-e/mh-comp.el	Wed Jan 04 02:08:12 2006 +0000
@@ -1818,7 +1818,7 @@
           ((null completion)
            (ignore-errors
              (kill-buffer completions-buffer))
-           (message "No completion for `%s'" word))
+           (message "No completion for %s" word))
           ((stringp completion)
            (if (equal word completion)
                (with-output-to-temp-buffer completions-buffer
--- a/lisp/mh-e/mh-customize.el	Wed Jan 04 01:03:20 2006 +0000
+++ b/lisp/mh-e/mh-customize.el	Wed Jan 04 02:08:12 2006 +0000
@@ -1041,7 +1041,7 @@
 Otherwise, set SYMBOL to VALUE."
   (if (and value
            (not (eq mh-scan-format-file t)))
-      (error "%s %s" "Can't turn on unless mh-scan-format-file"
+      (error "%s %s" "Can't turn on unless `mh-scan-format-file'"
              "is set to \"Use MH-E scan Format\"")
     (set-default symbol value)))
 
@@ -1052,7 +1052,7 @@
 set SYMBOL to VALUE."
   (if (and (not (eq value t))
            (eq mh-adaptive-cmd-note-flag t))
-      (error "%s %s" "You must turn off mh-adaptive-cmd-note-flag"
+      (error "%s %s" "You must turn off `mh-adaptive-cmd-note-flag'"
              "unless you use \"Use MH-E scan Format\"")
     (set-default symbol value)))
 
--- a/lisp/mh-e/mh-e.el	Wed Jan 04 01:03:20 2006 +0000
+++ b/lisp/mh-e/mh-e.el	Wed Jan 04 02:08:12 2006 +0000
@@ -904,8 +904,7 @@
       (error "No previous refile or write"))
   (cond ((eq (car mh-last-destination) 'refile)
          (mh-refile-msg range (cdr mh-last-destination))
-         (message "%s" (format "Destination folder: %s"
-                               (cdr mh-last-destination))))
+         (message "Destination folder: %s" (cdr mh-last-destination)))
         (t
          (mh-iterate-on-range msg range
            (apply 'mh-write-msg-to-file msg (cdr mh-last-destination)))
@@ -1005,7 +1004,7 @@
 many unread messages to skip."
   (interactive "p")
   (unless (> count 0)
-    (error "The function mh-previous-unread-msg expects positive argument"))
+    (error "The function `mh-previous-unread-msg' expects positive argument"))
   (setq count (1- count))
   (let ((unread-sequence (cdr (assoc mh-unseen-seq mh-seq-list)))
         (cur-msg (mh-get-msg-num nil)))
@@ -1527,7 +1526,7 @@
       (beginning-of-line)
       (setq message (mh-get-msg-num t)))
     (if (looking-at mh-scan-refiled-msg-regexp)
-        (error "Message %d is refiled.  Undo refile before deleting" message))
+        (error "Message %d is refiled;  undo refile before deleting" message))
     (if (looking-at mh-scan-deleted-msg-regexp)
         nil
       (mh-set-folder-modified-p t)
@@ -1547,10 +1546,10 @@
       (beginning-of-line)
       (setq message (mh-get-msg-num t)))
     (cond ((looking-at mh-scan-deleted-msg-regexp)
-           (error "Message %d is deleted.  Undo delete before moving" message))
+           (error "Message %d is deleted; undo delete before moving" message))
           ((looking-at mh-scan-refiled-msg-regexp)
            (if (y-or-n-p
-                (format "Message %d already refiled.  Copy to %s as well? "
+                (format "Message %d already refiled; copy to %s as well? "
                         message folder))
                (mh-exec-cmd "refile" (mh-get-msg-num t) "-link"
                             "-src" mh-current-folder
@@ -1581,7 +1580,7 @@
 many unread messages to skip."
   (interactive "p")
   (unless (> count 0)
-    (error "The function mh-next-unread-msg expects positive argument"))
+    (error "The function `mh-next-unread-msg' expects positive argument"))
   (setq count (1- count))
   (let ((unread-sequence (reverse (cdr (assoc mh-unseen-seq mh-seq-list))))
         (cur-msg (mh-get-msg-num nil)))
@@ -1989,8 +1988,8 @@
 comes after that."
   (if (eq mh-scan-format-file t)
       (max (1+ width) 2)
-    (error "%s %s" "Can't call mh-msg-num-width-to-column"
-           "when mh-scan-format-file is not t")))
+    (error "%s %s" "Can't call `mh-msg-num-width-to-column' when"
+           "`mh-scan-format-file' is not set to \"Use MH-E scan Format\"")))
 
 (defun mh-set-cmd-note (column)
   "Set `mh-cmd-note' to COLUMN.
--- a/lisp/mh-e/mh-identity.el	Wed Jan 04 01:03:20 2006 +0000
+++ b/lisp/mh-e/mh-identity.el	Wed Jan 04 02:08:12 2006 +0000
@@ -1,6 +1,6 @@
 ;;; mh-identity.el --- Multiple identify support for MH-E.
 
-;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Peter S. Galbraith <psg@debian.org>
 ;; Maintainer: Bill Wohler <wohler@newt.com>
@@ -127,7 +127,7 @@
 valid header field."
   (or (cdr (mh-assoc-ignore-case field mh-identity-handlers))
       (and (eq (aref field 0) ?:)
-           (error "Field %s - unknown mh-identity-handler" field))
+           (error "Field %s not found in `mh-identity-handlers'" field))
       (cdr (assoc ":default" mh-identity-handlers))
       'mh-identity-handler-default))
 
--- a/lisp/mh-e/mh-index.el	Wed Jan 04 01:03:20 2006 +0000
+++ b/lisp/mh-e/mh-index.el	Wed Jan 04 02:08:12 2006 +0000
@@ -1168,7 +1168,7 @@
   (set-buffer (get-buffer-create mh-index-temp-buffer))
   (erase-buffer)
   (unless mh-mairix-binary
-    (error "Set mh-mairix-binary appropriately"))
+    (error "Set `mh-mairix-binary appropriately'"))
   (apply #'call-process mh-mairix-binary nil '(t nil) nil
          "-r" "-f" (format "%s%s/config" mh-user-path mh-mairix-directory)
          search-regexp-list)
@@ -1446,7 +1446,7 @@
   (set-buffer (get-buffer-create mh-index-temp-buffer))
   (erase-buffer)
   (unless mh-swish-binary
-    (error "Set mh-swish-binary appropriately"))
+    (error "Set `mh-swish-binary' appropriately"))
   (call-process mh-swish-binary nil '(t nil) nil
                 "-w" search-regexp
                 "-f" (format "%s%s/index" mh-user-path mh-swish-directory))
@@ -1535,7 +1535,7 @@
   (set-buffer (get-buffer-create mh-index-temp-buffer))
   (erase-buffer)
   (unless mh-swish++-binary
-    (error "Set mh-swish++-binary appropriately"))
+    (error "Set `mh-swish++-binary' appropriately"))
   (call-process mh-swish++-binary nil '(t nil) nil
                 "-m" "10000"
                 (format "-i%s%s/swish++.index"
@@ -1614,7 +1614,7 @@
     (unless (file-exists-p namazu-index-directory)
       (error "Namazu directory %s not present" namazu-index-directory))
     (unless (executable-find mh-namazu-binary)
-      (error "Set mh-namazu-binary appropriately"))
+      (error "Set `mh-namazu-binary' appropriately"))
     (set-buffer (get-buffer-create mh-index-temp-buffer))
     (erase-buffer)
     (call-process mh-namazu-binary nil '(t nil) nil
--- a/lisp/mh-e/mh-init.el	Wed Jan 04 01:03:20 2006 +0000
+++ b/lisp/mh-e/mh-init.el	Wed Jan 04 02:08:12 2006 +0000
@@ -127,13 +127,13 @@
        ((mh-variant-set-variant 'mu-mh)
         (message "%s installed as MH variant" mh-variant-in-use))
        (t
-        (message "No MH variant found on the system!"))))
+        (message "No MH variant found on the system"))))
      ((member variant valid-list)
       (when (not (mh-variant-set-variant variant))
-        (message "Warning: %s variant not found.  Autodetecting..." variant)
+        (message "Warning: %s variant not found. Autodetecting..." variant)
         (mh-variant-set 'autodetect)))
      (t
-      (message "Unknown variant.  Use %s"
+      (message "Unknown variant; use %s"
                (mapconcat '(lambda (x) (format "%s" (car x)))
                           mh-variants " or "))))))
 
--- a/lisp/mh-e/mh-mime.el	Wed Jan 04 01:03:20 2006 +0000
+++ b/lisp/mh-e/mh-mime.el	Wed Jan 04 02:08:12 2006 +0000
@@ -505,7 +505,7 @@
                                     ".orig")))))
       (setq backup-strings (cdr backup-strings)))
     (or backup-strings
-        (error "Backup file for %s no longer exists!" buffer-file-name))
+        (error "Backup file for %s no longer exists" buffer-file-name))
     (or noconfirm
         (yes-or-no-p (format "Revert buffer from file %s? "
                              backup-file))
@@ -585,7 +585,7 @@
                                       mh-user-path (substring folder 1) msg)
                               "message/rfc822"
                               description)))
-          (t (error "The message number, %s is not a integer!" msg)))))
+          (t (error "The message number, %s, is not a integer" msg)))))
 
 (defvar mh-mml-cryptographic-method-history ())
 
@@ -633,9 +633,9 @@
     (let ((valid-methods (list "pgpmime" "pgp" "smime"))
           (valid-modes (list "sign" "encrypt" "signencrypt" "none")))
       (if (not (member method valid-methods))
-          (error "Method \"%s\" is invalid" method))
+          (error "Method %s is invalid" method))
       (if (not (member mode valid-modes))
-          (error "Mode \"%s\" is invalid" mode))
+          (error "Mode %s is invalid" mode))
       (mml-unsecure-message)
       (if (not (string= mode "none"))
         (save-excursion
@@ -967,7 +967,7 @@
                    (mh-mime-display-part handles))
                   (t (mh-signature-highlight))))
         (error
-         (message "Please report this error. The error message is:\n %s"
+         (message "Please report this error:\n %s"
                   (error-message-string err))
          (delete-region (point-min) (point-max))
          (insert raw-message-data))))))
--- a/lisp/mh-e/mh-pick.el	Wed Jan 04 01:03:20 2006 +0000
+++ b/lisp/mh-e/mh-pick.el	Wed Jan 04 02:08:12 2006 +0000
@@ -143,7 +143,7 @@
                         'mh-previous-window-config window-config)
     (message "%s" (substitute-command-keys
                    (concat "Type \\[mh-do-search] to search messages, "
-                           "\\[mh-help] for help.")))))
+                           "\\[mh-help] for help")))))
 
 (defun mh-make-pick-template ()
   "Initialize the current buffer with a template for a pick pattern."
@@ -335,7 +335,7 @@
         ((eq (car expr) 'not)
          `("-lbrace" "-not" ,@(mh-pick-construct-regexp (cadr expr) component)
            "-rbrace"))
-        (t (error "Unknown operator '%s' seen" (car expr)))))
+        (t (error "Unknown operator %s seen" (car expr)))))
 
 ;; All implementations of pick have special options -cc, -date, -from and
 ;; -subject that allow to search for corresponding components. Any other
--- a/lisp/mh-e/mh-seq.el	Wed Jan 04 01:03:20 2006 +0000
+++ b/lisp/mh-e/mh-seq.el	Wed Jan 04 02:08:12 2006 +0000
@@ -284,7 +284,7 @@
                         mh-show-seq-tool-bar-map))))
              (push 'widen mh-view-ops)))
           (t
-           (error "No messages in sequence \"%s\"" (symbol-name sequence))))))
+           (error "No messages in sequence %s" (symbol-name sequence))))))
 
 ;;;###mh-autoload
 (defun mh-put-msg-in-seq (range sequence)
@@ -304,7 +304,7 @@
   (interactive (list (mh-interactive-range "Add messages from")
                      (mh-read-seq-default "Add to" nil)))
   (unless (mh-valid-seq-p sequence)
-    (error "Can't put message in invalid sequence \"%s\"" sequence))
+    (error "Can't put message in invalid sequence %s" sequence))
   (let* ((internal-seq-flag (mh-internal-seq sequence))
          (original-msgs (mh-seq-msgs (mh-find-seq sequence)))
          (folders (list mh-current-folder))
@@ -432,7 +432,7 @@
                     (t (intern input))))
          (msgs (mh-seq-to-msgs seq)))
     (if (and (null msgs) not-empty)
-        (error "No messages in sequence \"%s\"" seq))
+        (error "No messages in sequence %s" seq))
     seq))
 
 
@@ -549,7 +549,7 @@
           ((assoc (intern input) seq-list)
            (cdr (assoc (intern input) seq-list)))
           ((setq msg-list (mh-translate-range folder input)) msg-list)
-          (t (error "No messages in range \"%s\"" input)))))
+          (t (error "No messages in range %s" input)))))
 
 ;;;###mh-autoload
 (defun mh-translate-range (folder expr)
@@ -1176,7 +1176,7 @@
                           (mh-message-id (mh-container-message kid)))
                  (let ((kid-message (mh-container-message kid)))
                    (return (mh-message-subject kid-message)))))
-             (error "This can't happen!")))))
+             (error "This can't happen")))))
 
 (defun mh-thread-rewind-pruning ()
   "Restore the thread tree to its state before pruning."
--- a/lisp/mh-e/mh-utils.el	Wed Jan 04 01:03:20 2006 +0000
+++ b/lisp/mh-e/mh-utils.el	Wed Jan 04 02:08:12 2006 +0000
@@ -1582,7 +1582,7 @@
       (cond
        ;; Check if we have `convert'
        ((eq mh-x-image-scaling-function 'ignore)
-        (message "The `convert' program is needed to display X-Image-URL")
+        (message "The \"convert\" program is needed to display X-Image-URL")
         (mh-x-image-set-download-state cache-filename 'try-again))
        ;; Scale fetched image
        ((and (funcall mh-x-image-scaling-function temp-file cache-filename)
@@ -2479,7 +2479,7 @@
             (new-file-flag
              (error "Folder %s does not exist" folder-name))
             ((not (file-directory-p (mh-expand-file-name folder-name)))
-             (error "\"%s\" is not a directory"
+             (error "%s is not a directory"
                     (mh-expand-file-name folder-name)))))
     folder-name))
 
@@ -2663,7 +2663,7 @@
         (set-buffer (get-buffer-create mh-log-buffer))
         (mh-truncate-log-buffer)
         (insert error-message)))
-    (error "%s failed, check %s buffer for error message"
+    (error "%s failed, check buffer %s for error message"
            command mh-log-buffer)))
 
 (defun mh-list-to-string (l)
@@ -2684,7 +2684,7 @@
             ((listp (car l))
              (setq new-list (nconc (mh-list-to-string-1 (car l))
                                    new-list)))
-            (t (error "Bad element in mh-list-to-string: %s" (car l))))
+            (t (error "Bad element in `mh-list-to-string': %s" (car l))))
       (setq l (cdr l)))
     new-list))