changeset 110060:d575ee440ad4

Merge from mainline.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Mon, 30 Aug 2010 06:49:10 +0000
parents d24d9e523bc4 (current diff) fcae870dab3a (diff)
children b16d23b49c5e
files
diffstat 18 files changed, 451 insertions(+), 52 deletions(-) [+]
line wrap: on
line diff
--- a/doc/misc/ChangeLog	Mon Aug 30 06:09:18 2010 +0000
+++ b/doc/misc/ChangeLog	Mon Aug 30 06:49:10 2010 +0000
@@ -1,3 +1,18 @@
+2010-08-29  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+	* gnus.texi (Drafts): Mention B DEL.
+
+2010-08-29  Tim Landscheidt  <tim@tim-landscheidt.de>  (tiny change)
+
+	* gnus.texi (Delayed Articles): Mention that the Date header is the
+	original one, even if you delay.
+
+2010-08-29  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+	* gnus.texi (Asynchronous Fetching): Document
+	gnus-async-post-fetch-function.
+	(HTML): Made into its own section.
+
 2010-08-26  Michael Albinus  <michael.albinus@gmx.de>
 
 	Sync with Tramp 2.1.19.
--- a/doc/misc/emacs-mime.texi	Mon Aug 30 06:09:18 2010 +0000
+++ b/doc/misc/emacs-mime.texi	Mon Aug 30 06:49:10 2010 +0000
@@ -394,7 +394,7 @@
 @item mm-text-html-renderer
 @vindex mm-text-html-renderer
 This selects the function used to render @acronym{HTML}.  The predefined
-renderers are selected by the symbols @code{w3},
+renderers are selected by the symbols @code{gnus-article-html}, @code{w3},
 @code{w3m}@footnote{See @uref{http://emacs-w3m.namazu.org/} for more
 information about emacs-w3m}, @code{links}, @code{lynx},
 @code{w3m-standalone} or @code{html2text}.  If @code{nil} use an
--- a/doc/misc/gnus.texi	Mon Aug 30 06:09:18 2010 +0000
+++ b/doc/misc/gnus.texi	Mon Aug 30 06:49:10 2010 +0000
@@ -6043,6 +6043,11 @@
 This variable can also be a number.  In that case, center the window at
 the given number of lines from the top.
 
+@item gnus-summary-stop-at-end-of-message
+@vindex gnus-summary-stop-at-end-of-message
+If non-@code{nil}, don't go to the next article when hitting
+@kbd{SPC}, and you're at the end of the article.
+
 @end table
 
 
@@ -6753,6 +6758,12 @@
 Just don't forget to set that up :-)
 @end table
 
+When delaying an article with @kbd{C-c C-j}, Message mode will
+automatically add a @code{"Date"} header with the current time.  In
+many cases you probably want the @code{"Date"} header to reflect the
+time the message is sent instead.  To do this, you have to delete
+@code{Date} from @code{message-draft-headers}.
+
 
 @node Marking Articles
 @section Marking Articles
@@ -8271,6 +8282,16 @@
 preferably be short and sweet to avoid slowing down Gnus too much.
 It's probably a good idea to byte-compile things like this.
 
+@vindex gnus-async-post-fetch-function
+@findex gnus-html-prefetch-images
+After an article has been prefetched, this
+@code{gnus-async-post-fetch-function} will be called.  The buffer will
+be narrowed to the region of the article that was fetched.  A useful
+value would be @code{gnus-html-prefetch-images}, which will prefetch
+and store images referenced in the article, so that you don't have to
+wait for them to be fetched when you read the article.  This is useful
+for @acronym{HTML} messages that have external images.
+
 @vindex gnus-prefetched-article-deletion-strategy
 Articles have to be removed from the asynch buffer sooner or later.  The
 @code{gnus-prefetched-article-deletion-strategy} says when to remove
@@ -12186,6 +12207,7 @@
 @menu
 * Hiding Headers::              Deciding what headers should be displayed.
 * Using MIME::                  Pushing articles through @acronym{MIME} before reading them.
+* HTML::                        Reading @acronym{HTML} messages.
 * Customizing Articles::        Tailoring the look of the articles.
 * Article Keymap::              Keystrokes available in the article buffer.
 * Misc Article::                Other stuff.
@@ -12482,6 +12504,48 @@
 Also @pxref{MIME Commands}.
 
 
+@node HTML
+@section @acronym{HTML}
+@cindex @acronym{HTML}
+
+If you have @code{w3m} installed on your system, Gnus can display
+@acronym{HTML} articles in the article buffer.  There are many Gnus
+add-ons for doing this, using various approaches, but there's one
+(sort of) built-in method that's used by default.
+
+For a complete overview, consult @xref{Display Customization,
+,Display Customization, emacs-mime, The Emacs MIME Manual}.  This
+section only describes the default method.
+
+@table @code
+@item mm-text-html-renderer
+@vindex mm-text-html-renderer
+If set to @code{gnus-article-html}, Gnus will use the built-in method,
+that's based on @code{curl} and @code{w3m}.
+
+@item gnus-html-cache-directory
+@vindex gnus-html-cache-directory
+Gnus will download and cache images according to how
+@code{mm-w3m-safe-url-regexp} is set.  These images will be stored in
+this directory.
+
+@item gnus-html-cache-size
+@vindex gnus-html-cache-size
+When @code{gnus-html-cache-size} bytes have been used in that
+directory, the oldest files will be deleted.  The default is 500MB.
+
+@item gnus-html-frame-width
+@vindex gnus-html-frame-width
+The width to use when rendering HTML.  The default is 70.
+
+@end table
+
+To use this, make sure that you have @code{w3m} and @code{curl}
+installed.  If you have, then Gnus should display @acronym{HTML}
+automatically. 
+
+
+
 @node Customizing Articles
 @section Customizing Articles
 @cindex article customization
@@ -13559,6 +13623,9 @@
 @kbd{D t} (@code{gnus-draft-toggle-sending}) command to mark the message
 as unsendable.  This is a toggling command.
 
+Finally, if you want to delete a draft, use the normal @kbd{B DEL}
+command (@pxref{Mail Group Commands}).
+
 
 @node Rejected Articles
 @section Rejected Articles
--- a/doc/misc/message.texi	Mon Aug 30 06:09:18 2010 +0000
+++ b/doc/misc/message.texi	Mon Aug 30 06:49:10 2010 +0000
@@ -1645,7 +1645,8 @@
 @cindex split large message
 The limitation of messages sent as message/partial.  The lower bound
 of message size in characters, beyond which the message should be sent
-in several parts.  If it is @code{nil}, the size is unlimited.
+in several parts.  If it is @code{nil} (which is the default), the
+size is unlimited.
 
 @end table
 
--- a/lisp/gnus/ChangeLog	Mon Aug 30 06:09:18 2010 +0000
+++ b/lisp/gnus/ChangeLog	Mon Aug 30 06:49:10 2010 +0000
@@ -1,3 +1,75 @@
+2009-02-04  Andreas Schwab  <schwab@suse.de>
+
+	* gnus-score.el (gnus-score-string): Fix regex for matching extra
+	headers and regexp-quote the match if necessary.
+
+2009-03-24  Miles Bader  <miles@gnu.org>
+
+	* smiley.el (smiley-regexp-alist): Don't delete the semicolon before
+	the blinking smiley.
+
+2009-03-24  Simon Josefsson  <simon@josefsson.org>
+
+	* smiley.el (smiley-regexp-alist): Disallow ;;) from being treated as a
+	blink smiley.
+
+2010-08-29  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+	* gnus-start.el (gnus-dribble-read-file): Ensure that the directory
+	where the dribbel file lives exists.
+
+	* message.el (message-send-mail-partially-limit): Change the default to
+	nil, since most people don't want this.
+
+	* mm-url.el (mm-url-decode-entities): Also decode entities like
+	&#x3212.
+
+2009-07-16  Kevin Ryde  <user42@zip.com.au>  (tiny change)
+
+	* gnus-sum.el (gnus-summary-idna-message):
+	* nnrss.el (nnrss-normalize-date, nnrss-discover-feed):
+	Hyperlink urls in docstrings with URL `...'.
+
+2010-08-29  Adam Sjøgren  <asjo@koldfront.dk>
+
+	* gnus-html.el (gnus-html-put-image): Use XEmacs-compatible image
+	functions.
+
+2010-08-29  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+	* gnus-art.el (gnus-article-add-button): Take an optional parameter to
+	say what the mouseover text should be.
+
+	* gnus-html.el (gnus-html-prefetch-images): Use the summary-local
+	version of the mm-w3m-safe-url-regexp variable to only download images
+	in the groups where we want that to happen.
+
+	* gnus-sum.el (gnus-summary-stop-at-end-of-message): New variable.
+
+	* gnus-art.el (gnus-article-beginning-of-window): Make into defun for
+	easier debugging.
+	(gnus-article-beginning-of-window): Add kludge to allow spacing past
+	big pictures in the article buffer.
+
+	* mm-decode.el (mm-text-html-renderer): Default the html renderer to
+	gnus-article-html.
+	(mm-text-html-renderer): gnus-article-html needs curl in addition to
+	w3m.
+
+	* gnus-html.el: Start a new super-simple HTML renderer based on w3m.
+
+2010-08-28  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+	* gnus.el (gnus-valid-select-methods): Remove reference to nngoogle,
+	which doesn't exist.
+
+	* message.el (message-inhibit-ecomplete): New variable to allow some
+	function to inhibit ecomplete address storage.
+	(message-resend): Disable ecomplete message storage when resending
+	messages.
+
+	* nntp.el (nntp-async-kluge): Remove the Emacs 20.3-related kluge.
+
 2010-08-27  Katsumi Yamaoka  <yamaoka@jpl.org>
 
 	* gnus-sum.el (gnus-summary-move-article, gnus-summary-delete-article):
--- a/lisp/gnus/gnus-art.el	Mon Aug 30 06:09:18 2010 +0000
+++ b/lisp/gnus/gnus-art.el	Mon Aug 30 06:49:10 2010 +0000
@@ -6283,18 +6283,22 @@
     (gnus-article-next-page-1 lines)
     nil))
 
-(defmacro gnus-article-beginning-of-window ()
+(defun gnus-article-beginning-of-window ()
   "Move point to the beginning of the window.
 In Emacs, the point is placed at the line number which `scroll-margin'
 specifies."
   (if (featurep 'xemacs)
-      '(move-to-window-line 0)
-    '(move-to-window-line
-      (min (max 0 scroll-margin)
-	   (max 1 (- (window-height)
-		     (if mode-line-format 1 0)
-		     (if header-line-format 1 0)
-		     2))))))
+      (move-to-window-line 0)
+    ;; There is an obscure bug in Emacs that makes it impossible to
+    ;; scroll past big pictures in the article buffer.  Try to fix
+    ;; this by adding a sanity check by counting the lines visible.
+    (when (> (count-lines (window-start) (window-end)) 30)
+      (move-to-window-line
+       (min (max 0 scroll-margin)
+	    (max 1 (- (window-height)
+		      (if mode-line-format 1 0)
+		      (if header-line-format 1 0)
+		      2)))))))
 
 (defun gnus-article-next-page-1 (lines)
   (unless (featurep 'xemacs)
@@ -7899,7 +7903,7 @@
 
 ;;; External functions:
 
-(defun gnus-article-add-button (from to fun &optional data)
+(defun gnus-article-add-button (from to fun &optional data text)
   "Create a button between FROM and TO with callback FUN and data DATA."
   (when gnus-article-button-face
     (gnus-overlay-put (gnus-make-overlay from to nil t)
@@ -7911,6 +7915,7 @@
 	  (list 'gnus-callback fun)
 	  (and data (list 'gnus-data data))))
   (widget-convert-button 'link from to :action 'gnus-widget-press-button
+			 :help-echo (or text "Follow the link")
 			 :button-keymap gnus-widget-button-keymap))
 
 ;;; Internal functions:
--- a/lisp/gnus/gnus-async.el	Mon Aug 30 06:09:18 2010 +0000
+++ b/lisp/gnus/gnus-async.el	Mon Aug 30 06:49:10 2010 +0000
@@ -71,6 +71,13 @@
   :group 'gnus-asynchronous
   :type 'function)
 
+(defcustom gnus-async-post-fetch-function nil
+  "Function called after an article has been prefetched.
+The function will be called narrowed to the region of the article
+that was fetched."
+  :group 'gnus-asynchronous
+  :type 'function)
+
 ;;; Internal variables.
 
 (defvar gnus-async-prefetch-article-buffer " *Async Prefetch Article*")
@@ -227,6 +234,11 @@
     (setq gnus-async-current-prefetch-article nil)
     (when arg
       (gnus-async-set-buffer)
+      (when gnus-async-post-fetch-function
+	(save-excursion
+	  (save-restriction
+	    (narrow-to-region mark (point-max))
+	    (funcall gnus-async-post-fetch-function summary))))
       (gnus-async-with-semaphore
 	(setq
 	 gnus-async-article-alist
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/gnus/gnus-html.el	Mon Aug 30 06:49:10 2010 +0000
@@ -0,0 +1,226 @@
+;;; gnus-html.el --- Quoted-Printable functions
+
+;; Copyright (C) 2010  Free Software Foundation, Inc.
+
+;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
+;; Keywords: html, web
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; The idea is to provide a simple, fast and pretty minimal way to
+;; render HTML (including links and images) in a buffer, based on an
+;; external HTML renderer (i.e., w3m).
+
+;;; Code:
+
+(defcustom gnus-html-cache-directory (nnheader-concat gnus-directory "html-cache/")
+  "Where Gnus will cache images it downloads from the web."
+  :group 'gnus-art
+  :type 'directory)
+
+(defcustom gnus-html-cache-size 500000000
+  "The size of the Gnus image cache."
+  :group 'gnus-art
+  :type 'integer)
+
+(defcustom gnus-html-frame-width 70
+  "What width to use when rendering HTML."
+  :group 'gnus-art
+  :type 'integer)
+
+;;;###autoload
+(defun gnus-article-html (handle)
+  (let ((article-buffer (current-buffer)))
+    (save-restriction
+      (narrow-to-region (point) (point))
+      (save-excursion
+	(mm-with-part handle
+	  (let* ((coding-system-for-read 'utf-8)
+		 (coding-system-for-write 'utf-8)
+		 (default-process-coding-system
+		   (cons coding-system-for-read coding-system-for-write)))
+	    (call-process-region (point-min) (point-max)
+				 "w3m" 
+				 nil article-buffer nil
+				 "-halfdump"
+				 "-no-cookie"
+				 "-O" "UTF-8"
+				 "-o" "ext_halfdump=1"
+				 "-t" (format "%s" tab-width)
+				 "-cols" (format "%s" gnus-html-frame-width)
+				 "-o" "display_image=off"
+				 "-T" "text/html"))))
+      (gnus-html-wash-tags))))
+
+(defun gnus-html-wash-tags ()
+  (let (tag parameters string start end images)
+    (mm-url-decode-entities)
+    (goto-char (point-min))
+    (while (re-search-forward "<\\([^ />]+\\)\\([^>]*\\)>" nil t)
+      (setq tag (match-string 1)
+	    parameters (match-string 2)
+	    start (match-beginning 0))
+      (when (plusp (length parameters))
+	(set-text-properties 0 (1- (length parameters)) nil parameters))
+      (delete-region start (point))
+      (when (search-forward (concat "</" tag ">") nil t)
+	(delete-region (match-beginning 0) (match-end 0)))
+      (setq end (point))
+      (cond
+       ;; Fetch and insert a picture.
+       ((equal tag "img_alt")
+	(when (string-match "src=\"\\([^\"]+\\)" parameters)
+	  (setq parameters (match-string 1 parameters))
+	  (when (or (null mm-w3m-safe-url-regexp)
+		    (string-match mm-w3m-safe-url-regexp parameters))
+	    (let ((file (gnus-html-image-id parameters)))
+	      (if (file-exists-p file)
+		  ;; It's already cached, so just insert it.
+		  (when (gnus-html-put-image file (point))
+		    ;; Delete the ALT text.
+		    (delete-region start end))
+		;; We don't have it, so schedule it for fetching
+		;; asynchronously.
+		(push (list parameters
+			    (set-marker (make-marker) start)
+			    (point-marker))
+		      images))))))
+       ;; Add a link.
+       ((equal tag "a")
+	(when (string-match "href=\"\\([^\"]+\\)" parameters)
+	  (setq parameters (match-string 1 parameters))
+	  (gnus-article-add-button start end
+				   'browse-url parameters
+				   parameters)
+	  (let ((overlay (gnus-make-overlay start end)))
+	    (gnus-overlay-put overlay 'evaporate t)
+	    (gnus-overlay-put overlay 'gnus-button-url parameters)
+	    (when gnus-article-mouse-face
+	      (gnus-overlay-put overlay 'mouse-face gnus-article-mouse-face)))))
+       ;; Whatever.  Just ignore the tag.
+       (t
+	))
+      (goto-char start))
+    (goto-char (point-min))
+    ;; The output from -halfdump isn't totally regular, so strip
+    ;; off any </pre_int>s that were left over.
+    (while (re-search-forward "</pre_int>" nil t)
+      (replace-match "" t t))
+    (when images
+      (gnus-html-schedule-image-fetching (current-buffer) (nreverse images)))))
+
+(defun gnus-html-schedule-image-fetching (buffer images)
+  (let* ((url (caar images))
+	 (process (start-process
+		   "images" nil "curl"
+		   "-s" "--create-dirs"
+		   "--location"
+		   "--max-time" "60"
+		   "-o" (gnus-html-image-id url)
+		   url)))
+    (process-kill-without-query process)
+    (set-process-sentinel process 'gnus-html-curl-sentinel)
+    (set-process-plist process (list 'images images
+				     'buffer buffer))))
+
+(defun gnus-html-image-id (url)
+  (expand-file-name (sha1 url) gnus-html-cache-directory))
+
+(defun gnus-html-curl-sentinel (process event)
+  (when (string-match "finished" event)
+    (let* ((images (getf (process-plist process) 'images))
+	   (buffer (getf (process-plist process) 'buffer))
+	   (spec (pop images))
+	   (file (gnus-html-image-id (car spec))))
+      (when (and (buffer-live-p buffer)
+		 ;; If the position of the marker is 1, then that
+		 ;; means that the text is was in has been deleted;
+		 ;; i.e., that the user has selected a different
+		 ;; article before the image arrived.
+		 (not (= (marker-position (cadr spec)) 1)))
+	(save-excursion
+	  (set-buffer buffer)
+	  (let ((buffer-read-only nil))
+	    (when (gnus-html-put-image file (cadr spec))
+	      (delete-region (cadr spec) (caddr spec))))))
+      (when images
+	(gnus-html-schedule-image-fetching buffer images)))))
+
+(defun gnus-html-put-image (file point)
+  (let ((image (ignore-errors
+		 (create-image file))))
+    (if (and image
+	     ;; Kludge to avoid displaying 30x30 gif images, which
+	     ;; seems to be a signal of a broken image.
+	     (not (and (eq (getf (cdr image) :type) 'gif)
+		       (= (car (image-size image t)) 30)
+		       (= (cdr (image-size image t)) 30))))
+	(progn
+	  (put-image image point)
+	  t)
+      (when (fboundp 'find-image)
+	(put-image (find-image '((:type xpm :file "lock-broken.xpm")))
+		   point))
+      nil)))
+
+(defun gnus-html-prune-cache ()
+  (let ((total-size 0)
+	files)
+    (dolist (file (directory-files gnus-html-cache-directory t nil t))
+      (let ((attributes (file-attributes file)))
+	(unless (nth 0 attributes)
+	  (incf total-size (nth 7 attributes))
+	  (push (list (time-to-seconds (nth 5 attributes))
+		      (nth 7 attributes) file)
+		files))))
+    (when (> total-size gnus-html-cache-size)
+      (setq files (sort files (lambda (f1 f2)
+				(< (car f1) (car f2)))))
+      (dolist (file files)
+	(when (> total-size gnus-html-cache-size)
+	  (decf total-size (cadr file))
+	  (delete-file (nth 2 file)))))))
+
+;;;###autoload
+(defun gnus-html-prefetch-images (summary)
+  (let (safe-url-regexp urls)
+    (when (buffer-live-p summary)
+      (save-excursion
+	(set-buffer summary)
+	(setq safe-url-regexp mm-w3m-safe-url-regexp))
+      (save-match-data
+	(while (re-search-forward "<img.*src=[\"']\\([^\"']+\\)" nil t)
+	  (let ((url (match-string 1)))
+	    (when (or (null safe-url-regexp)
+		      (string-match safe-url-regexp url))
+	      (unless (file-exists-p (gnus-html-image-id url))
+		(push url urls)
+		(push (gnus-html-image-id url) urls)
+		(push "-o" urls)))))
+	(let ((process
+	       (apply 'start-process 
+		      "images" nil "curl"
+		      "-s" "--create-dirs"
+		      "--location"
+		      "--max-time" "60"
+		      urls)))
+	  (process-kill-without-query process))))))
+
+(provide 'gnus-html)
+
+;;; gnus-html.el ends here
--- a/lisp/gnus/gnus-score.el	Mon Aug 30 06:09:18 2010 +0000
+++ b/lisp/gnus/gnus-score.el	Mon Aug 30 06:49:10 2010 +0000
@@ -2055,8 +2055,11 @@
 
 	  ;; Evil hackery to make match usable in non-standard headers.
 	  (when extra
-	    (setq match (concat "[ (](" extra " \\. \"[^)]*"
-				match "[^\"]*\")[ )]")
+	    (setq match (concat "[ (](" extra " \\. \"\\([^\"]*\\\\\"\\)*[^\"]*"
+				(if (eq search-func 're-search-forward)
+				    match
+				  (regexp-quote match))
+				"\\([^\"]*\\\\\"\\)*[^\"]*\")[ )]")
 		  search-func 're-search-forward)) ; XXX danger?!?
 
 	  (cond
--- a/lisp/gnus/gnus-start.el	Mon Aug 30 06:09:18 2010 +0000
+++ b/lisp/gnus/gnus-start.el	Mon Aug 30 06:49:10 2010 +0000
@@ -869,6 +869,8 @@
 (defun gnus-dribble-read-file ()
   "Read the dribble file from disk."
   (let ((dribble-file (gnus-dribble-file-name)))
+    (unless (file-exists-p (file-name-directory dribble-file))
+      (make-directory (file-name-directory dribble-file) t))
     (save-excursion
       (set-buffer (setq gnus-dribble-buffer
 			(gnus-get-buffer-create
--- a/lisp/gnus/gnus-sum.el	Mon Aug 30 06:09:18 2010 +0000
+++ b/lisp/gnus/gnus-sum.el	Mon Aug 30 06:49:10 2010 +0000
@@ -76,6 +76,12 @@
   :version "23.1" ;; No Gnus
   :type 'boolean)
 
+(defcustom gnus-summary-stop-at-end-of-message nil
+  "If non-nil, don't select the next message when using `SPC'."
+  :link '(custom-manual "(gnus)Group Maneuvering")
+  :group 'gnus-summary-maneuvering
+  :type 'boolean)
+
 (defcustom gnus-fetch-old-headers nil
   "*Non-nil means that Gnus will try to build threads by grabbing old headers.
 If an unread article in the group refers to an older, already
@@ -7781,7 +7787,7 @@
 	    (setq endp (or (gnus-article-next-page lines)
 			   (gnus-article-only-boring-p))))
 	  (when endp
-	    (cond (stop
+	    (cond ((or stop gnus-summary-stop-at-end-of-message)
 		   (gnus-message 3 "End of message"))
 		  (circular
 		   (gnus-summary-beginning-of-article))
@@ -9518,7 +9524,7 @@
 remain unencoded after running this function, it is likely an
 invalid IDNA string (`xn--bar' is invalid).
 
-You must have GNU Libidn (`http://www.gnu.org/software/libidn/')
+You must have GNU Libidn (URL `http://www.gnu.org/software/libidn/')
 installed for this command to work."
   (interactive "P")
   (if (not (and (condition-case nil (require 'idna)
--- a/lisp/gnus/gnus.el	Mon Aug 30 06:09:18 2010 +0000
+++ b/lisp/gnus/gnus.el	Mon Aug 30 06:49:10 2010 +0000
@@ -1746,7 +1746,6 @@
     ("nnfolder" mail respool address)
     ("nngateway" post-mail address prompt-address physical-address)
     ("nnweb" none)
-    ("nngoogle" post)
     ("nnslashdot" post)
     ("nnultimate" none)
     ("nnrss" none)
--- a/lisp/gnus/message.el	Mon Aug 30 06:09:18 2010 +0000
+++ b/lisp/gnus/message.el	Mon Aug 30 06:49:10 2010 +0000
@@ -1620,7 +1620,7 @@
 and Emacs, you may use `iso-2022-7bit' for this value at your own risk.
 Note that the coding-system `iso-2022-7bit' isn't suitable to all data.")
 
-(defcustom message-send-mail-partially-limit 1000000
+(defcustom message-send-mail-partially-limit nil
   "The limitation of messages sent as message/partial.
 The lower bound of message size in characters, beyond which the message
 should be sent in several parts.  If it is nil, the size is unlimited."
@@ -1739,6 +1739,7 @@
 (defvar message-mime-part nil)
 (defvar message-posting-charset nil)
 (defvar message-inserted-headers nil)
+(defvar message-inhibit-ecomplete nil)
 
 ;; Byte-compiler warning
 (defvar gnus-active-hashtb)
@@ -4091,7 +4092,8 @@
 	(run-hooks 'message-sent-hook))
       (message "Sending...done")
       ;; Do ecomplete address snarfing.
-      (when (message-mail-alias-type-p 'ecomplete)
+      (when (and (message-mail-alias-type-p 'ecomplete)
+		 (not message-inhibit-ecomplete))
 	(message-put-addresses-in-ecomplete))
       ;; Mark the buffer as unmodified and delete auto-save.
       (set-buffer-modified-p nil)
@@ -7425,6 +7427,7 @@
 	(replace-match "X-From-Line: "))
       ;; Send it.
       (let ((message-inhibit-body-encoding t)
+	    (message-inhibit-ecomplete t)
 	    message-required-mail-headers
 	    message-generate-hashcash
 	    rfc2047-encode-encoded-words)
--- a/lisp/gnus/mm-decode.el	Mon Aug 30 06:09:18 2010 +0000
+++ b/lisp/gnus/mm-decode.el	Mon Aug 30 06:49:10 2010 +0000
@@ -105,10 +105,9 @@
 	 ,disposition ,description ,cache ,id))
 
 (defcustom mm-text-html-renderer
-  (cond ((executable-find "w3m")
-	 (if (locate-library "w3m")
-	     'w3m
-	   'w3m-standalone))
+  (cond ((and (executable-find "w3m")
+	      (executable-find "curl"))
+	 'gnus-article-html)
 	((executable-find "links") 'links)
 	((executable-find "lynx") 'lynx)
 	((locate-library "w3") 'w3)
--- a/lisp/gnus/mm-url.el	Mon Aug 30 06:09:18 2010 +0000
+++ b/lisp/gnus/mm-url.el	Mon Aug 30 06:49:10 2010 +0000
@@ -365,15 +365,20 @@
 (defun mm-url-decode-entities ()
   "Decode all HTML entities."
   (goto-char (point-min))
-  (while (re-search-forward "&\\(#[0-9]+\\|[a-z]+[0-9]*\\);" nil t)
-    (let ((elem (if (eq (aref (match-string 1) 0) ?\#)
-			(let ((c (mm-ucs-to-char
-				  (string-to-number
-				   (substring (match-string 1) 1)))))
-			  (if (mm-char-or-char-int-p c) c ?#))
-		      (or (cdr (assq (intern (match-string 1))
-				     mm-url-html-entities))
-			  ?#))))
+  (while (re-search-forward "&\\(#[0-9]+\\|#x[0-9a-f]+\\|[a-z]+[0-9]*\\);" nil t)
+    (let* ((entity (match-string 1))
+	   (elem (if (eq (aref entity 0) ?\#)
+		     (let ((c (mm-ucs-to-char
+			       ;; Hex number: &#x3212
+			       (if (eq (aref entity 1) ?x)
+				   (string-to-number (substring entity 2)
+						     16)
+				 ;; Decimal number: &#23
+				 (string-to-number (substring entity 1))))))
+		       (if (mm-char-or-char-int-p c) c ?#))
+		   (or (cdr (assq (intern entity)
+				  mm-url-html-entities))
+		       ?#))))
       (unless (stringp elem)
 	(setq elem (char-to-string elem)))
       (replace-match elem t t))))
--- a/lisp/gnus/nnrss.el	Mon Aug 30 06:09:18 2010 +0000
+++ b/lisp/gnus/nnrss.el	Mon Aug 30 06:49:10 2010 +0000
@@ -498,7 +498,7 @@
 (defun nnrss-normalize-date (date)
   "Return a date string of DATE in the RFC822 style.
 This function handles the ISO 8601 date format described in
-<URL:http://www.w3.org/TR/NOTE-datetime>, and also the RFC822 style
+URL `http://www.w3.org/TR/NOTE-datetime', and also the RFC822 style
 which RSS 2.0 allows."
   (let (case-fold-search vector year month day time zone cts given)
     (cond ((null date))			; do nothing for this case
@@ -1012,7 +1012,7 @@
 
 (defun nnrss-discover-feed (url)
   "Given a page, find an RSS feed using Mark Pilgrim's
-`ultra-liberal rss locator' (http://diveintomark.org/2002/08/15.html)."
+`ultra-liberal rss locator' (URL `http://diveintomark.org/2002/08/15.html')."
 
   (let ((parsed-page (nnrss-fetch url)))
 
--- a/lisp/gnus/nntp.el	Mon Aug 30 06:09:18 2010 +0000
+++ b/lisp/gnus/nntp.el	Mon Aug 30 06:49:10 2010 +0000
@@ -298,13 +298,6 @@
 (defvoo nntp-server-xover 'try)
 (defvoo nntp-server-list-active-group 'try)
 
-(defvar nntp-async-needs-kluge
-  (string-match "^GNU Emacs 20\\.3\\." (emacs-version))
-  "*When non-nil, nntp will poll asynchronous connections
-once a second.  By default, this is turned on only for Emacs
-20.3, which has a bug that breaks nntp's normal method of
-noticing asynchronous data.")
-
 (defvar nntp-async-timer nil)
 (defvar nntp-async-process-list nil)
 
@@ -1368,17 +1361,7 @@
 	  nntp-process-decode decode
 	  nntp-process-callback callback
 	  nntp-process-start-point (point-max))
-    (setq after-change-functions '(nntp-after-change-function))
-    (if nntp-async-needs-kluge
-	(nntp-async-kluge process))))
-
-(defun nntp-async-kluge (process)
-  ;; emacs 20.3 bug: process output with encoding 'binary
-  ;; doesn't trigger after-change-functions.
-  (unless nntp-async-timer
-    (setq nntp-async-timer
-	  (run-at-time 1 1 'nntp-async-timer-handler)))
-  (add-to-list 'nntp-async-process-list process))
+    (setq after-change-functions '(nntp-after-change-function))))
 
 (defun nntp-async-timer-handler ()
   (mapcar
--- a/lisp/gnus/smiley.el	Mon Aug 30 06:09:18 2010 +0000
+++ b/lisp/gnus/smiley.el	Mon Aug 30 06:49:10 2010 +0000
@@ -102,7 +102,8 @@
 
 ;; The XEmacs version has a baroque, if not rococo, set of these.
 (defcustom smiley-regexp-alist
-  '(("\\(;-?)\\)\\W" 1 "blink")
+  '(("\\(;-)\\)\\W" 1 "blink")
+    ("[^;]\\(;)\\)\\W" 1 "blink")
     ("\\(:-]\\)\\W" 1 "forced")
     ("\\(8-)\\)\\W" 1 "braindamaged")
     ("\\(:-|\\)\\W" 1 "indifferent")