2001-09-08 Simon Josefsson <jas@extundo.com>
authorSimon Josefsson <jas@extundo.com>
Sat, 8 Sep 2001 18:34:39 +0000 (18:34 +0000)
committerSimon Josefsson <jas@extundo.com>
Sat, 8 Sep 2001 18:34:39 +0000 (18:34 +0000)
* gnus-art.el (gnus-buttonized-mime-types): New variable.
(gnus-unbuttonized-mime-type-p): Use it.

* gnus-agent.el (gnus-agent-fetch-group): If online, actually
fetch group.

2001-09-08  Simon Josefsson  <jas@extundo.com>

* gnus.texi (MIME Commands): Add gnus-buttonized-mime-types.

lisp/ChangeLog
lisp/gnus-agent.el
lisp/gnus-art.el
texi/ChangeLog
texi/gnus.texi

index 8f552b1..224bea1 100644 (file)
@@ -1,3 +1,11 @@
+2001-09-08  Simon Josefsson  <jas@extundo.com>
+
+       * gnus-art.el (gnus-buttonized-mime-types): New variable.
+       (gnus-unbuttonized-mime-type-p): Use it.
+
+       * gnus-agent.el (gnus-agent-fetch-group): If online, actually
+       fetch group.
+
 2001-09-08  Simon Josefsson  <jas@extundo.com>
        From Daniel Pittman <daniel@rimspace.net>
 
index 39cc648..a89db5a 100644 (file)
@@ -469,14 +469,14 @@ be a select method."
   (let ((state gnus-plugged))
     (unwind-protect
        (progn
+         (unless group
+           (error "No group on the current line"))
          (unless state
-           (gnus-agent-toggle-plugged gnus-plugged)
-           (unless group
-             (error "No group on the current line"))
-           (let ((gnus-command-method (gnus-find-method-for-group group)))
-             (gnus-agent-with-fetch
-               (gnus-agent-fetch-group-1 group gnus-command-method)
-               (gnus-message 5 "Fetching %s...done" group)))))
+           (gnus-agent-toggle-plugged gnus-plugged))
+         (let ((gnus-command-method (gnus-find-method-for-group group)))
+           (gnus-agent-with-fetch
+             (gnus-agent-fetch-group-1 group gnus-command-method)
+             (gnus-message 5 "Fetching %s...done" group))))
       (when (and (not state)
                 gnus-plugged)
        (gnus-agent-toggle-plugged gnus-plugged)))))
index 46fea27..d2f5b46 100644 (file)
@@ -672,7 +672,17 @@ displayed by the first non-nil matching CONTENT face."
   :type '(repeat regexp))
 
 (defcustom gnus-unbuttonized-mime-types '(".*/.*")
-  "List of MIME types that should not be given buttons when rendered inline."
+  "List of MIME types that should not be given buttons when rendered inline.
+See also `gnus-buttonized-mime-types' which may override this variable."
+  :version "21.1"
+  :group 'gnus-article-mime
+  :type '(repeat regexp))
+
+(defcustom gnus-buttonized-mime-types nil
+  "List of MIME types that should be given buttons when rendered inline.
+If set, this variable overrides `gnus-unbuttonized-mime-types'.
+To see e.g. security buttons you could set this to
+`(\"multipart/signed\")'."
   :version "21.1"
   :group 'gnus-article-mime
   :type '(repeat regexp))
@@ -3934,11 +3944,16 @@ If no internal viewer is available, use an external viewer."
 (defun gnus-unbuttonized-mime-type-p (type)
   "Say whether TYPE is to be unbuttonized."
   (unless gnus-inhibit-mime-unbuttonizing
-    (catch 'found
-      (let ((types gnus-unbuttonized-mime-types))
-       (while types
-         (when (string-match (pop types) type)
-           (throw 'found t)))))))
+    (when (catch 'found
+           (let ((types gnus-unbuttonized-mime-types))
+             (while types
+               (when (string-match (pop types) type)
+                 (throw 'found t)))))
+      (not (catch 'found
+            (let ((types gnus-buttonized-mime-types))
+              (while types
+                (when (string-match (pop types) type)
+                  (throw 'found t)))))))))
 
 (defun gnus-article-insert-newline ()
   "Insert a newline, but mark it as undeletable."
index d4cc59c..d9be9a8 100644 (file)
@@ -1,3 +1,7 @@
+2001-09-08  Simon Josefsson  <jas@extundo.com>
+
+       * gnus.texi (MIME Commands): Add gnus-buttonized-mime-types.
+
 2001-09-08  Kai Gro\e,A_\e(Bjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 
        * gnus.texi (Topic Commands): Make this the first subsection of
index 982998e..cba3fbc 100644 (file)
@@ -8323,7 +8323,20 @@ To have all Vcards be ignored, you'd say something like this:
 @vindex gnus-unbuttonized-mime-types
 This is a list of regexps.  @sc{mime} types that match a regexp from
 this list won't have @sc{mime} buttons inserted unless they aren't
-displayed.  The default value is @code{(".*/.*")}.
+displayed or this variable is overriden by
+@code{gnus-buttonized-mime-types}.  The default value is
+@code{(".*/.*")}.
+
+@item gnus-buttonized-mime-types
+@vindex gnus-buttonized-mime-types
+This is a list of regexps.  @sc{mime} types that match a regexp from
+this list will have @sc{mime} buttons inserted unless they aren't
+displayed.  This variable overrides
+@code{gnus-unbuttonized-mime-types}.  The default value is @code{nil}.
+
+To see e.g. security buttons but no other buttons, you could set this
+variable to @code{("multipart/signed")} and leave
+@code{gnus-unbuttonized-mime-types} to the default value.
 
 @item gnus-article-mime-part-function
 @vindex gnus-article-mime-part-function