X-Git-Url: http://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fgnus-art.el;h=32399e1586fda04265e2f304042efe0b309ca538;hb=5beb390633ce1e32cdf319c6ba19926244bbfdf2;hp=ea0710bf026557a76880b55245568faa30ee5bb6;hpb=76ec4b823ceb4bcb6003ea3670815362f5062bfb;p=gnus diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index ea0710bf0..32399e158 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -1,6 +1,6 @@ ;;; gnus-art.el --- article mode commands for Gnus -;; Copyright (C) 1996-2011 Free Software Foundation, Inc. +;; Copyright (C) 1996-2012 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen ;; Keywords: news @@ -2785,10 +2785,11 @@ summary buffer." (or how (setq how gnus-article-browse-delete-temp)) (if (eq how 'ask) (let ((files (length gnus-article-browse-html-temp-list))) - (gnus-y-or-n-p (format - "Delete all %s temporary HTML file%s? " - files - (if (> files 1) "s" "")))) + (gnus-y-or-n-p + (if (= files 1) + "Delete the temporary HTML file? " + (format "Delete all %s temporary HTML files? " + files)))) how))) (dolist (file gnus-article-browse-html-temp-list) (cond ((file-directory-p file) @@ -3239,9 +3240,16 @@ always hide." Point is left at the beginning of the narrowed-to region." (narrow-to-region (goto-char (point-min)) - (if (search-forward "\n\n" nil 1) - (1- (point)) - (point-max))) + (cond + ;; Absolutely no headers displayed. + ((looking-at "\n") + (point)) + ;; Normal headers. + ((search-forward "\n\n" nil 1) + (1- (point))) + ;; Nothing but headers. + (t + (point-max)))) (goto-char (point-min))) (defun article-goto-body () @@ -4574,6 +4582,10 @@ commands: (when (eq (elt timer 5) 'image-animate-timeout) (cancel-timer timer)))) +(defun gnus-stop-downloads () + (when (boundp 'url-queue) + (set (intern "url-queue" obarray) nil))) + ;; Set article window start at LINE, where LINE is the number of lines ;; from the head of the article. (defun gnus-article-set-window-start (&optional line) @@ -5315,9 +5327,8 @@ Compressed files like .gz and .bz2 are decompressed." (or (cdr (assq arg gnus-summary-show-article-charset-alist)) (mm-read-coding-system "Charset: ")))) - (t - (if (mm-handle-undisplayer handle) - (mm-remove-part handle)))) + ((mm-handle-undisplayer handle) + (mm-remove-part handle))) (forward-line 2) (mm-display-inline handle) (goto-char b))))) @@ -6186,12 +6197,13 @@ Provided for backwards compatibility." (not gnus-inhibit-hiding)) (gnus-article-hide-headers))) -(declare-function shr-put-image "shr" (data alt)) +(declare-function shr-put-image "shr" (data alt &optional flags)) -(defun gnus-shr-put-image (data alt) +(defun gnus-shr-put-image (data alt &optional flags) "Put image DATA with a string ALT. Enable image to be deleted." (let ((image (shr-put-image data (propertize (or alt "*") - 'gnus-image-category 'shr)))) + 'gnus-image-category 'shr) + flags))) (when image (gnus-add-image 'shr image))))