Add hooks for gcc handling
[gnus] / lisp / gnus-art.el
index 5c93514..32399e1 100644 (file)
@@ -3240,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 ()
@@ -4575,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)
@@ -5316,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)))))
@@ -6187,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))))