Delete temporary files when Gnus exits instead of using timers
[gnus] / lisp / gnus-art.el
index a8ee480..2fa8fdf 100644 (file)
@@ -6198,9 +6198,14 @@ Provided for backwards compatibility."
 
 (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)
-                             flags)))
+  (let ((image (if flags
+                  (shr-put-image data (propertize (or alt "*")
+                                                  'gnus-image-category 'shr)
+                                 flags)
+                ;; Old `shr-put-image' doesn't take the optional `flags'
+                ;; argument.
+                (shr-put-image data (propertize (or alt "*")
+                                                'gnus-image-category 'shr)))))
     (when image
       (gnus-add-image 'shr image))))
 
@@ -7173,15 +7178,17 @@ groups."
          "\\(?:"
          ;; Match paired parentheses, e.g. in Wikipedia URLs:
          ;; http://thread.gmane.org/47B4E3B2.3050402@gmail.com
-         "[" chars punct "]+" "(" "[" chars punct "]+" "[" chars "]*)" "[" chars "]*"
+         "[" chars punct "]+" "(" "[" chars punct "]+" "[" chars "]*)"
+         "\\(?:" "[" chars punct "]+" "[" chars "]" "\\)?"
          "\\|"
-         "[" chars punct     "]+" "[" chars "]"
+         "[" chars punct "]+" "[" chars "]"
          "\\)"))
      (concat ;; XEmacs 21.4 doesn't support POSIX.
       "\\([-a-z0-9_=!?#$@~%&*+\\/:;.,]\\|\\w\\)+"
       "\\([-a-z0-9_=#$@~%&*+\\/]\\|\\w\\)"))
    "\\)")
   "Regular expression that matches URLs."
+  :version "24.4"
   :group 'gnus-article-buttons
   :type 'regexp)
 
@@ -8415,6 +8422,8 @@ For example:
        (not (gnus-treat-predicate (car val))))
        ((eq pred 'typep)
        (equal (car val) gnus-treat-type))
+       ((functionp pred)
+       (funcall pred))
        (t
        (error "%S is not a valid predicate" pred)))))
    ((eq val t)