Synch with Oort Gnus.
[elisp/gnus.git-] / lisp / gnus-sum.el
index bf1cbdd..7846ca6 100644 (file)
@@ -1046,6 +1046,11 @@ that were fetched.  Say, for nnultimate groups."
   :group 'gnus-summary
   :type '(choice boolean regexp))
 
+(defcustom gnus-summary-muttprint-program "muttprint"
+  "Command (and optional arguments) used to run Muttprint."
+  :group 'gnus-summary
+  :type 'string)
+
 ;;; Internal variables
 
 (defvar gnus-summary-display-cache nil)
@@ -1329,7 +1334,7 @@ These variables can be used to set variables in the group parameters
 while still allowing them to affect operations done in other
 buffers. For example:
 
-(setq gnus-newsgroup-variables
+\(setq gnus-newsgroup-variables
      '(message-use-followup-to
        (gnus-visible-headers .
         \"^From:\\\\|^Newsgroups:\\\\|^Subject:\\\\|^Date:\\\\|^To:\")))
@@ -1563,6 +1568,7 @@ increase the score of each group you read."
     gnus-mouse-2 gnus-mouse-pick-article
     "m" gnus-summary-mail-other-window
     "a" gnus-summary-post-news
+    "i" gnus-summary-news-other-window
     "x" gnus-summary-limit-to-unread
     "s" gnus-summary-isearch-article
     "t" gnus-article-toggle-headers
@@ -1812,6 +1818,7 @@ increase the score of each group you read."
     "h" gnus-summary-save-article-folder
     "v" gnus-summary-save-article-vm
     "p" gnus-summary-pipe-output
+    "P" gnus-summary-muttprint
     "s" gnus-soup-add-article)
 
   (gnus-define-keys (gnus-summary-mime-map "K" gnus-summary-mode-map)
@@ -1930,6 +1937,7 @@ increase the score of each group you read."
              ["Save body in file" gnus-summary-save-article-body-file t]
              ["Pipe through a filter" gnus-summary-pipe-output t]
              ["Add to SOUP packet" gnus-soup-add-article t]
+             ["Print with Muttprint" gnus-summary-muttprint t]
              ["Print" gnus-summary-print-article t])
             ("Backend"
              ["Respool article..." gnus-summary-respool-article t]
@@ -2014,7 +2022,7 @@ increase the score of each group you read."
     (easy-menu-define
      gnus-summary-post-menu gnus-summary-mode-map ""
      `("Post"
-       ["Post an article" gnus-summary-post-news
+       ["Send a message (mail or news)" gnus-summary-post-news
        ,@(if (featurep 'xemacs) '(t)
            '(:help "Post an article"))]
        ["Followup" gnus-summary-followup
@@ -2040,6 +2048,7 @@ increase the score of each group you read."
        ["Resend message" gnus-summary-resend-message t]
        ["Send bounced mail" gnus-summary-resend-bounced-mail t]
        ["Send a mail" gnus-summary-mail-other-window t]
+       ["Create a local message" gnus-summary-news-other-window t]
        ["Uuencode and post" gnus-uu-post-news
        ,@(if (featurep 'xemacs) '(t)
            '(:help "Post a uuencoded article"))]
@@ -7958,7 +7967,7 @@ article.  If BACKWARD (the prefix) is non-nil, search backward instead."
 (defun gnus-summary-print-truncate-and-quote (string &optional len)
   "Truncate to LEN and quote all \"(\"'s in STRING."
   (gnus-replace-in-string (if (and len (> (length string) len))
-                             (substring string 0 len) 
+                             (substring string 0 len)
                            string)
                          "[()]" "\\\\\\&"))
 
@@ -7992,11 +8001,11 @@ to save in."
                     (list
                      (concat "("
                              (gnus-summary-print-truncate-and-quote
-                              (mail-header-subject gnus-current-headers) 
+                              (mail-header-subject gnus-current-headers)
                               66) ")")
                      (concat "("
                              (gnus-summary-print-truncate-and-quote
-                              (mail-header-from gnus-current-headers) 
+                              (mail-header-from gnus-current-headers)
                               45) ")")))
                    (ps-right-header
                     (list
@@ -8013,12 +8022,13 @@ to save in."
   (ps-despool filename))
 
 (defun gnus-summary-show-article (&optional arg)
-  "Force re-fetching of the current article.
+  "Force redisplaying of the current article.
 If ARG (the prefix) is a number, show the article with the charset
 defined in `gnus-summary-show-article-charset-alist', or the charset
 input.
 If ARG (the prefix) is non-nil and not a number, show the raw article
-without any article massaging functions being run."
+without any article massaging functions being run.  Normally, the key strokes
+are `C-u g'."
   (interactive "P")
   (cond
    ((numberp arg)
@@ -10056,6 +10066,17 @@ save those articles instead."
   (let ((gnus-default-article-saver 'gnus-summary-save-body-in-file))
     (gnus-summary-save-article arg)))
 
+(defun gnus-summary-muttprint (&optional arg)
+  "Print the current article using Muttprint.
+If N is a positive number, save the N next articles.
+If N is a negative number, save the N previous articles.
+If N is nil and any articles have been marked with the process mark,
+save those articles instead."
+  (interactive "P")
+  (require 'gnus-art)
+  (let ((gnus-default-article-saver 'gnus-summary-pipe-to-muttprint))
+    (gnus-summary-save-article arg t)))
+
 (defun gnus-summary-pipe-message (program)
   "Pipe the current article through PROGRAM."
   (interactive "sProgram: ")