Commit f9c53c97 authored by Bill Wohler's avatar Bill Wohler
Browse files

* 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.
parent 078cb314
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).
......
......@@ -571,7 +571,7 @@ filing messages."
(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))
......
......@@ -1818,7 +1818,7 @@ Any match found replaces the text from BEGIN to END."
((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
......
......@@ -1041,7 +1041,7 @@ Throw an error if user tries to turn on
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 @@ anything but t when `mh-adaptive-cmd-note-flag' is on. Otherwise,
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)))
......
......@@ -904,8 +904,7 @@ called interactively."
(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 @@ This command can be given a prefix argument COUNT to specify how
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 @@ once when he kept statistics on his mail usage."
(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 @@ be refiled."
(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 @@ This command can be given a prefix argument COUNT to specify how
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 @@ columns contain the message number, and the column for notations
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.
......
;;; 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 @@ character \":\", then it must have a special handler defined in
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))
......
......@@ -1168,7 +1168,7 @@ SEARCH-REGEXP-LIST is used to search."
(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 @@ is used to search."
(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 @@ used to search."
(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 @@ is used to search."
(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
......
......@@ -127,13 +127,13 @@ finally GNU mailutils."
((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 "))))))
......
......@@ -505,7 +505,7 @@ a prefix argument NOCONFIRM."
".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 @@ MESSAGE number."
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 @@ IDENTITY is optionally the default-user-id to use."
(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 @@ parsed and then displayed."
(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))))))
......
......@@ -143,7 +143,7 @@ configuration and is used when the search folder is dismissed."
'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 @@ COMPONENT is the component to search."
((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
......
......@@ -284,7 +284,7 @@ When you want to widen the view to all your messages again, use
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 @@ use."
(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 @@ containing the current message."
(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 @@ should be replaced with:
((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 @@ children."
(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."
......
......@@ -1582,7 +1582,7 @@ The argument CHANGE is ignored."
(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 @@ used in searching."
(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 mark after inserted text."
(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 @@ Set mark after inserted text."
((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))
......
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