diff lisp/gnus/gnus-art.el @ 111269:3d7a1caabf14

Merge changes made in Gnus trunk. nnimap.el (nnimap-open-connection): Only send AUTHENTICATE PLAIN if LOGINDISABLED is set. gnus.el (gnus-group-startup-message): Move point to the start of the buffer. nndoc.el (nndoc-dissect-buffer): Reverse the order of the articles to reflect the order they're in in the digest. gnus-sum.el (gnus-summary-select-article): Make `C-d' work reliably by checking whether the original article buffer is alive. shr.el (shr-find-fill-point): Don't break lines between punctuation and non-punctuation (like after the apostrophe in "'We"). gnus-cite.el (gnus-article-fill-cited-article): Remove unused `force' parameter. gnus-art.el (gnus-treatment-function-alist): Have gnus-treat-fill-long-lines point to gnus-article-fill-cited-long-lines. gnus-art.el (gnus-treat-fill-long-lines): Change default to fill all text/plain sections. gnus.el: Autoload gnus-article-fill-cited-long-lines. gnus-art.el (gnus-mime-display-alternative): Actually pass the type on to `gnus-treat-article'. gnus-sum.el (gnus-summary-show-article): Add `C-u C-u g' for showing the raw article, and change `C-u g' to show the article without doing treatments. gnus.texi (Paging the Article): Document C-u g/C-u C-u g. gnus-cite.el (gnus-article-foldable-buffer): Refactor out. gnus-cite.el (gnus-article-foldable-buffer): Don't fold regions that have a ragged left edge. gnus-cite.el (gnus-article-foldable-buffer): Skip past the prefix when determining raggedness. gnus-srvr.el, nnir.el: Allow nnir searching for an entire server. gnus-msg.el (gnus-configure-posting-styles): Permit the use of regular expression match and replace in posting styles. gnus-art.el (gnus-treat-article): Only inhibit body washing, and leave the header washing to take place. nnimap.el (nnimap-request-accept-article): Erase buffer before appending for easier debugging. nnimap.el (nnimap-wait-for-connection): Take a regexp. nnimap.el (nnimap-request-accept-article): Wait for the continuation line before sending anything unless we're streaming.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Sun, 31 Oct 2010 22:31:24 +0000
parents 17c2d0830a46
children e8807c0f5742
line wrap: on
line diff
--- a/lisp/gnus/gnus-art.el	Sun Oct 31 15:25:39 2010 -0400
+++ b/lisp/gnus/gnus-art.el	Sun Oct 31 22:31:24 2010 +0000
@@ -1590,7 +1590,7 @@
   :link '(custom-manual "(gnus)Customizing Articles")
   :type gnus-article-treat-custom)
 
-(defcustom gnus-treat-fill-long-lines nil
+(defcustom gnus-treat-fill-long-lines '(typep "text/plain")
   "Fill long lines.
 Valid values are nil, t, `head', `first', `last', an integer or a
 predicate.  See Info node `(gnus)Customizing Articles'."
@@ -1664,7 +1664,7 @@
     (gnus-treat-highlight-signature gnus-article-highlight-signature)
     (gnus-treat-buttonize gnus-article-add-buttons)
     (gnus-treat-fill-article gnus-article-fill-cited-article)
-    (gnus-treat-fill-long-lines gnus-article-fill-long-lines)
+    (gnus-treat-fill-long-lines gnus-article-fill-cited-long-lines)
     (gnus-treat-strip-cr gnus-article-remove-cr)
     (gnus-treat-unsplit-urls gnus-article-unsplit-urls)
     (gnus-treat-date-ut gnus-article-date-ut)
@@ -5704,7 +5704,7 @@
 	  (save-restriction
 	    (article-goto-body)
 	    (narrow-to-region (point) (point-max))
-	    (gnus-treat-article nil 1 1)
+	    (gnus-treat-article nil 1 1 "text/plain")
 	    (widen)))
 	(unless ihandles
 	  ;; Highlight the headers.
@@ -5992,7 +5992,7 @@
 		  (gnus-treat-article
 		   nil (length gnus-article-mime-handle-alist)
 		   (gnus-article-mime-total-parts)
-		   (mm-handle-media-type handle))))))
+		   (mm-handle-media-type preferred))))))
 	  (goto-char (point-max))
 	  (setcdr begend (point-marker)))))
     (when ibegend
@@ -8255,6 +8255,8 @@
 ;;; Treatment top-level handling.
 ;;;
 
+(defvar gnus-inhibit-article-treatments nil)
+
 (defun gnus-treat-article (condition &optional part-number total-parts type)
   (let ((length (- (point-max) (point-min)))
 	(alist gnus-treatment-function-alist)
@@ -8277,6 +8279,8 @@
 	      (symbol-value (car elem))))
       (when (and (or (consp val)
 		     treated-type)
+		 (or (not gnus-inhibit-article-treatments)
+		     (eq condition 'head))
 		 (gnus-treat-predicate val)
 		 (or (not (get (car elem) 'highlight))
 		     highlightp))