diff lisp/mh-e/mh-utils.el @ 67246:bce5c0d2041c

* mh-comp.el (mh-letter-mode): Use mh-highlight-citation-style instead of mh-highlight-citation-p. (mh-letter-toggle-header-field-display): "Ellipsed" isn't a word, I think, so use "truncated". * mh-customize.el (mh-folder, mh-folder-faces): Group's manual section is Folders, not Organizing. Parent of mh-folder-faces is mh-folder, not mh-show. (mh-speed): Rename to mh-speedbar for consistency with mh-toolbar. (mh-thread): New group that corresponds with manual's Threading chapter. (mh-letter-faces): Group's manual section is Editing Drafts, not Sending Mail. (mh-sortm-args): New customization variable that used to be a defvar. (mh-index-new-messages-folders, mh-index-ticked-messages-folders): Move from mh-index group to mh-folders group. (mh-alias-local-users-prefix, mh-large-folder) (mh-recursive-folders-flag, mh-before-quit-hook) (mh-folder-mode-hook, mh-kill-folder-suppress-prompt-hook) (mh-quit-hook, mh-refile-msg-hook): Move from mh-show group to mh-folder group. (mh-highlight-citation-style): Rename from mh-highlight-citation-p. Sync docstrings with manual. (mh-mhl-format-file): Rename from mhl-formfile. Sync docstrings with manual. (mh-show-threads-flag): Move from mh-show group to mh-thread group. (mh-find-path-hook): Move from mh-show group to mh-e group. (mh-folder-updated-hook): Add to mh-folder group. (mh-forward-hook): Move from mh-folder to mh-sending-mail group. (mh-unseen-updated-hook): Move from mh-show to mh-sequences group. (mh-bury-show-buffer-flag, mh-clean-message-header-flag) (mh-decode-mime-flag, mh-display-buttons-for-alternatives-flag) (mh-display-buttons-for-inline-parts-flag) (mh-do-not-confirm-flag, mh-fetch-x-image-url) (mh-graphical-smileys-flag, mh-graphical-emphasis-flag) (mh-invisible-header-fields-default, mh-invisible-header-fields) (mh-lpr-command-format, mh-max-inline-image-height) (mh-max-inline-image-width) (mh-mime-save-parts-default-directory, mh-print-background-flag) (mh-show-maximum-size, mh-show-use-goto-addr-flag) (mh-show-use-xface-flag, mh-store-default-directory) (mh-summary-height, mh-delete-msg-hook (mh-show-hook, mh-show-mode-hook): Sync docstrings with manual. * mh-e.el (mh-scan-format-mh, mh-scan-good-msg-regexp) (mh-scan-deleted-msg-regexp, mh-scan-refiled-msg-regexp) (mh-scan-cur-msg-number-regexp, mh-scan-subject-regexp): Use non-fontification instead of non-fontifying. (mh-header-display): Use mh-mhl-format-file instead of mhl-formfile. Sync docstrings with manual. (mh-next-undeleted-msg, mh-previous-undeleted-msg): Rename arg to count. Sync docstrings with manual. (mh-refile-or-write-again): Use output from mh-write-msg-to-file so that message doesn't change when using this command. Sync docstrings with manual. (mh-page-msg, mh-previous-page): Rename arg to lines. Sync docstrings with manual. (mh-write-msg-to-file): Rename msg to message. Rename no-headers to no-header. Sync docstrings with manual. (mh-ps-print-map): Delete keybindings for deleted commands mh-ps-print-toggle-mime and mh-ps-print-msg-show. (mh-help-messages): Updated printing help. (mh-delete-msg, mh-delete-msg-no-motion, mh-first-msg) (mh-last-msg, mh-previous-unread-msg, mh-next-button) (mh-prev-button, mh-folder-toggle-mime-part) (mh-folder-inline-mime-part, mh-folder-save-mime-part) (mh-next-unread-msg, mh-toggle-mime-buttons): Sync docstrings with manual. * mh-funcs.el (mh-sortm-args): Now a customization option and in mh-customize.el. (mh-pipe-msg): Rename include-headers to include-header. Sync docstrings with manual. (mh-burst-digest, mh-page-digest, mh-page-digest-backwards) (mh-store-msg): Sync docstrings with manual. * mh-mime.el (mh-mime-save-parts): Rename arg to prompt. Sync docstrings with manual. (mh-toggle-mh-decode-mime-flag): Use English in message, not Lisp. Sync docstrings with manual. (mh-mm-display-part, mh-mm-inline-message): Use mh-highlight-citation-style instead of mh-highlight-citation-p. (mh-press-button): Sync docstrings with manual. (mh-display-with-external-viewer): Fix default output in minibuffer. Sync docstrings with manual. * mh-print.el: (mh-ps-print-mime, mh-ps-print-toggle-mime): Deleted. (mh-ps-print-color-option): Incorporate docstring from ps-print-color-p. (mh-ps-spool-buffer): Remove unused code. Fix indent. Slimline docstring. (mh-ps-spool-msg): Slimline docstring. Rename from mh-ps-spool-a-msg. Rewrote to use existing show buffer when available. (mh-ps-print-range): Extract method from common code in mh-ps-print-msg and mh-ps-print-msg-file. (mh-ps-print-preprint): Clean docstring. Use filename "mh-%s". (mh-ps-print-msg-show): Delete. Can use either mh-ps-print-msg-show or mh-ps-print-msg-show to same effect with new code in mh-ps-spool-msg. (mh-print-msg): Use mh-mhl-format-file instead of mhl-formfile. Sync docstrings with manual. (mh-ps-print-msg, mh-ps-print-msg-file) (mh-ps-print-toggle-faces, mh-ps-print-toggle-color): Sync docstrings with manual. * mh-utils.el (mh-show-ps-print-msg-show) (mh-show-ps-print-toggle-mime): Delete. (mh-show-ps-print-map): Updated accordingly. (mh-show-mode): Use mh-highlight-citation-style instead of mh-highlight-citation-p. (mh-show-xface, mh-display-msg): Use mh-mhl-format-file instead of mhl-formfile. (mh-show): Use mh-mhl-format-file instead of mhl-formfile. Sync docstrings with manual. (mh-show-font-lock-fontify-region, mh-modify, mh-goto-msg): Sync docstrings with manual.
author Bill Wohler <wohler@newt.com>
date Fri, 02 Dec 2005 05:54:33 +0000
parents 7cc22b3f2300
children b0b7c2e3fc84
line wrap: on
line diff
--- a/lisp/mh-e/mh-utils.el	Fri Dec 02 04:55:39 2005 +0000
+++ b/lisp/mh-e/mh-utils.el	Fri Dec 02 05:54:33 2005 +0000
@@ -1,4 +1,4 @@
-;;; mh-utils.el --- MH-E code needed for both sending and reading
+\;;; mh-utils.el --- MH-E code needed for both sending and reading
 
 ;; Copyright (C) 1993, 1995, 1997,
 ;;  2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
@@ -414,10 +414,11 @@
 
 (defun mh-show-font-lock-fontify-region (beg end loudly)
   "Limit font-lock in `mh-show-mode' to the header.
-Used when `mh-highlight-citation-p' is set to \"'gnus\", leaving the body to
-be dealt with by gnus highlighting. The region between BEG and END is given
-over to be fontified and LOUDLY controls if a user sees a message about the
-fontification operation."
+
+Used when the option `mh-highlight-citation-style' is set to \"Gnus\", leaving
+the body to be dealt with by Gnus highlighting. The region between BEG and END
+is given over to be fontified and LOUDLY controls if a user sees a message
+about the fontification operation."
   (let ((header-end (mh-mail-header-end)))
     (cond
      ((and (< beg header-end)(< end header-end))
@@ -874,12 +875,10 @@
 (mh-defun-show-buffer mh-show-index-sequenced-messages
                       mh-index-sequenced-messages)
 (mh-defun-show-buffer mh-show-catchup mh-catchup)
-(mh-defun-show-buffer mh-show-ps-print-toggle-mime mh-ps-print-toggle-mime)
 (mh-defun-show-buffer mh-show-ps-print-toggle-color mh-ps-print-toggle-color)
 (mh-defun-show-buffer mh-show-ps-print-toggle-faces mh-ps-print-toggle-faces)
 (mh-defun-show-buffer mh-show-ps-print-msg-file mh-ps-print-msg-file)
 (mh-defun-show-buffer mh-show-ps-print-msg mh-ps-print-msg)
-(mh-defun-show-buffer mh-show-ps-print-msg-show mh-ps-print-msg-show)
 (mh-defun-show-buffer mh-show-toggle-mime-buttons mh-toggle-mime-buttons)
 (mh-defun-show-buffer mh-show-display-with-external-viewer
                       mh-display-with-external-viewer)
@@ -962,14 +961,11 @@
 
 (gnus-define-keys (mh-show-ps-print-map "P" mh-show-mode-map)
   "?"	mh-prefix-help
-  "A"	mh-show-ps-print-toggle-mime
   "C"	mh-show-ps-print-toggle-color
   "F"	mh-show-ps-print-toggle-faces
-  "M"	mh-show-ps-print-toggle-mime
   "f"	mh-show-ps-print-msg-file
   "l"   mh-show-print-msg
-  "p"	mh-show-ps-print-msg
-  "s"	mh-show-ps-print-msg-show)
+  "p"	mh-show-ps-print-msg)
 
 (gnus-define-keys (mh-show-thread-map "T" mh-show-mode-map)
   "?"    mh-prefix-help
@@ -1110,9 +1106,9 @@
   (make-local-variable 'font-lock-defaults)
   ;;(set (make-local-variable 'font-lock-support-mode) nil)
   (cond
-   ((equal mh-highlight-citation-p 'font-lock)
+   ((equal mh-highlight-citation-style 'font-lock)
     (setq font-lock-defaults '(mh-show-font-lock-keywords-with-cite t)))
-   ((equal mh-highlight-citation-p 'gnus)
+   ((equal mh-highlight-citation-style 'gnus)
     (setq font-lock-defaults '((mh-show-font-lock-keywords)
                                t nil nil nil
                                (font-lock-fontify-region-function
@@ -1258,7 +1254,7 @@
 (defun mh-show-xface ()
   "Display X-Face."
   (when (and window-system mh-show-use-xface-flag
-             (or mh-decode-mime-flag mhl-formfile
+             (or mh-decode-mime-flag mh-mhl-format-file
                  mh-clean-message-header-flag))
     (funcall mh-show-xface-function)))
 
@@ -1560,24 +1556,24 @@
   (if mh-showing-mode (mh-show msg)))
 
 (defun mh-show (&optional message redisplay-flag)
-  "Show message at cursor.
-If optional argument MESSAGE is non-nil, display that message instead.
-Force a two-window display with the folder window on top (size given by the
-variable `mh-summary-height') and the show buffer below it.
-If the message is already visible, display the start of the message.
+  "Display message\\<mh-folder-mode-map>.
+
+If the message under the cursor is already displayed, this command scrolls to
+the beginning of the message. MH-E normally hides a lot of the superfluous
+header fields that mailers add to a message, but if you wish to see all of
+them, use the command \\[mh-header-display].
 
-If REDISPLAY-FLAG is non-nil, the default when called interactively, the
-message is redisplayed even if the show buffer was already displaying the
-correct message.
+From a program, optional argument MESSAGE can be used to display an
+alternative message. The optional argument REDISPLAY-FLAG forces the redisplay
+of the message even if the show buffer was already displaying the correct
+message.
 
-Display of the message is controlled by setting the variables
-`mh-clean-message-header-flag' and `mhl-formfile'.  The default behavior is
-to scroll uninteresting headers off the top of the window.
-Type \"\\[mh-header-display]\" to see the message with all its headers."
+See the \"mh-show\" customization group for a litany of options that control
+what displayed messages look like."
   (interactive (list nil t))
   (when (or redisplay-flag
             (and mh-showing-with-headers
-                 (or mhl-formfile mh-clean-message-header-flag)))
+                 (or mh-mhl-format-file mh-clean-message-header-flag)))
     (mh-invalidate-show-buffer))
   (mh-show-msg message))
 
@@ -1639,13 +1635,14 @@
     (run-hooks 'mh-show-hook)))
 
 (defun mh-modify (&optional message)
-  "Edit message at cursor.
-If optional argument MESSAGE is non-nil, edit that message instead.
-Force a two-window display with the folder window on top (size given by the
-value of the variable `mh-summary-height') and the message editing buffer below
-it.
+  "Edit message.
 
-The message is displayed in raw form."
+There are times when you need to edit a message. For example, you may need to
+fix a broken Content-Type header field. You can do this with this command. It
+displays the raw message in an editable buffer. When you are done editing,
+save and kill the buffer as you would any other.
+
+From a program, edit MESSAGE instead if it is non-nil."
   (interactive)
   (let* ((message (or message (mh-get-msg-num t)))
          (msg-filename (mh-msg-filename message))
@@ -1700,7 +1697,7 @@
     (unless (mh-buffer-data)
       (setf (mh-buffer-data) (mh-make-buffer-data)))
     ;; Bind variables in folder buffer in case they are local
-    (let ((formfile mhl-formfile)
+    (let ((formfile mh-mhl-format-file)
           (clean-message-header mh-clean-message-header-flag)
           (invisible-headers mh-invisible-header-fields-compiled)
           (visible-headers nil)
@@ -1849,11 +1846,15 @@
               (mh-thread-update-scan-line-map msg notation offset)))))))
 
 (defun mh-goto-msg (number &optional no-error-if-no-message dont-show)
-  "Position the cursor at message NUMBER.
-Optional non-nil second argument NO-ERROR-IF-NO-MESSAGE means return nil
-instead of signaling an error if message does not exist; in this case, the
-cursor is positioned near where the message would have been.
-Non-nil third argument DONT-SHOW means not to show the message."
+  "Go to a message\\<mh-folder-mode-map>.
+
+You can enter the message NUMBER either before or after typing
+\\[mh-goto-msg]. In the latter case, Emacs prompts you.
+
+In a program, optional non-nil second argument NO-ERROR-IF-NO-MESSAGE means
+return nil instead of signaling an error if message does not exist\; in this
+case, the cursor is positioned near where the message would have been. Non-nil
+third argument DONT-SHOW means not to show the message."
   (interactive "NGo to message: ")
   (setq number (prefix-numeric-value number))
   (let ((point (point))