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).
(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))
((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
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)))
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)))
(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)))
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)))
(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)
(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
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)))
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>
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))
(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)
(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))
(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"
(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
((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 "))))))
".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))
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 ())
(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
(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))))))
'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."
((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
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)
(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))
(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))
\f
((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)
(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."
(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)
(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))
(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)
((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))