* gnus-vers.el (gnus-revision-number): Increment to 09.
[elisp/gnus.git-] / lisp / gnus-art.el
index 14981af..6f4fde5 100644 (file)
@@ -37,6 +37,7 @@
 (require 'gnus-int)
 (require 'alist)
 (require 'mime-view)
+(require 'wid-edit)
 
 ;; Avoid byte-compile warnings.
 (eval-when-compile
@@ -44,7 +45,6 @@
   (require 'mail-parse)
   (require 'mm-decode)
   (require 'mm-view)
-  (require 'wid-edit)
   (require 'mm-uu)
   )
 
@@ -208,10 +208,13 @@ regexp.  If it matches, the text in question is not a signature."
   :type 'sexp
   :group 'gnus-article-hiding)
 
+;; Fixme: This isn't the right thing for mixed graphical and and
+;; non-graphical frames in a session.
 (defcustom gnus-article-x-face-command
   (cond
-   ;; Fixme: This isn't the right thing for mixed graphical and and
-   ;; non-graphical frames in a session.
+   ((and (fboundp 'image-type-available-p)
+        (module-installed-p 'x-face-e21))
+    'x-face-decode-message-header)
    ((and (fboundp 'image-type-available-p)
         (image-type-available-p 'xbm))
     'gnus-article-display-xface)
@@ -225,6 +228,9 @@ regexp.  If it matches, the text in question is not a signature."
 If it is a string, the command will be executed in a sub-shell
 asynchronously.         The compressed face will be piped to this command."
   :type '(choice string
+                (function-item
+                 :tag "x-face-decode-message-header (x-face-e21)"
+                 x-face-decode-message-header)
                 (function-item gnus-article-display-xface)
                 (function-item x-face-mule-gnus-article-display-x-face)
                 function)
@@ -901,7 +907,10 @@ See the manual for details."
 (put 'gnus-treat-overstrike 'highlight t)
 
 (defcustom gnus-treat-display-xface
-  (if (or (and gnus-xemacs (featurep 'xface))
+  (if (or (and (fboundp 'image-type-available-p)
+              (image-type-available-p 'xbm)
+              (string-match "^0x" (shell-command-to-string "uncompface")))
+         (and gnus-xemacs (featurep 'xface))
          (eq 'x-face-mule-gnus-article-display-x-face
              gnus-article-x-face-command))
       'head
@@ -917,7 +926,7 @@ See the manual for details."
   (if (or (and gnus-xemacs (featurep 'xpm))
          (and (not gnus-xemacs)
               window-system
-              (module-installed-p 'gnus-bitmap)))
+              (module-installed-p 'smiley-mule)))
       t
     nil)
   "Display smileys.
@@ -981,7 +990,7 @@ See the manual for details."
 
 (defvar gnus-article-mime-handle-alist-1 nil)
 (defvar gnus-treatment-function-alist
-  '((gnus-treat-decode-article-as-default-mime-charset
+  `((gnus-treat-decode-article-as-default-mime-charset
      gnus-article-decode-article-as-default-mime-charset)
     (gnus-treat-strip-banner gnus-article-strip-banner)
     (gnus-treat-strip-headers-in-body gnus-article-strip-headers-in-body)
@@ -1015,7 +1024,9 @@ See the manual for details."
      gnus-article-strip-multiple-blank-lines)
     (gnus-treat-overstrike gnus-article-treat-overstrike)
     (gnus-treat-buttonize-head gnus-article-add-buttons-to-head)
-    (gnus-treat-display-smileys gnus-article-smiley-display)
+    (gnus-treat-display-smileys ,(if (featurep 'xemacs)
+                                    'gnus-smiley-display
+                                  'gnus-article-smiley-display))
     (gnus-treat-capitalize-sentences gnus-article-capitalize-sentences)
     (gnus-treat-display-picons gnus-article-display-picons)
     (gnus-treat-play-sounds gnus-earcon-display)))
@@ -4861,7 +4872,9 @@ specified by `gnus-button-alist'."
          (list 'gnus-callback fun)
          (and data (list 'gnus-data data))))
   (widget-convert-button 'link from to :action 'gnus-widget-press-button
-                        :button-keymap gnus-widget-button-keymap))
+                        ;; Quote `:button-keymap' for Mule 2.3
+                        ;; but it won't work.
+                        ':button-keymap gnus-widget-button-keymap))
 
 ;;; Internal functions:
 
@@ -5027,6 +5040,9 @@ forbidden in URL encoding."
   "Browse ADDRESS."
   (browse-url (gnus-strip-whitespace address)))
 
+(eval-when-compile
+  ;; Silence the byte-compiler.
+  (autoload 'smiley-toggle-buffer "gnus-bitmap"))
 (defun gnus-article-smiley-display ()
   "Display \"smileys\" as small graphical icons."
   (smiley-toggle-buffer 1 (current-buffer) (point-min) (point-max)))