* lisp/gnus-vers.el (gnus-revision-number): Increment to 07.
[elisp/gnus.git-] / lisp / gnus-art.el
index 9e01c05..288e8cd 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)
   )
 
@@ -214,7 +214,9 @@ regexp.  If it matches, the text in question is not a signature."
    ;; non-graphical frames in a session.
    ((and (fboundp 'image-type-available-p)
         (image-type-available-p 'xbm))
-    'gnus-article-display-xface)
+    (if (module-installed-p 'x-face-e21)
+       'x-face-decode-message-header
+      'gnus-article-display-xface))
    ((and (not gnus-xemacs)
         window-system
         (module-installed-p 'x-face-mule))
@@ -225,6 +227,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 +906,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
@@ -2865,6 +2873,7 @@ commands:
     ;; Init original article buffer.
     (save-excursion
       (set-buffer (gnus-get-buffer-create gnus-original-article-buffer))
+      (set-buffer-multibyte nil)
       (setq major-mode 'gnus-original-article-mode)
       (make-local-variable 'gnus-original-article))
     (if (get-buffer name)
@@ -2915,12 +2924,7 @@ commands:
     (mime-display-message mime-message-structure
                          gnus-article-buffer nil gnus-article-mode-map)
     (when all-headers
-      (gnus-article-hide-headers nil -1))
-    )
-  ;; `mime-display-message' changes current buffer to `gnus-article-buffer'.
-  (make-local-variable 'mime-button-mother-dispatcher)
-  (setq mime-button-mother-dispatcher
-       (function gnus-article-push-button))
+      (gnus-article-hide-headers nil -1)))
   (run-hooks 'gnus-mime-article-prepare-hook))
 
 (defun gnus-article-display-traditional-message ()
@@ -4260,6 +4264,7 @@ If given a prefix, show the hidden text instead."
          (if (get-buffer gnus-original-article-buffer)
              (set-buffer gnus-original-article-buffer)
            (set-buffer (gnus-get-buffer-create gnus-original-article-buffer))
+           (set-buffer-multibyte nil)
            (buffer-disable-undo)
            (setq major-mode 'gnus-original-article-mode)
            (setq buffer-read-only t))
@@ -4862,7 +4867,11 @@ specified by `gnus-button-alist'."
    (nconc (and gnus-article-mouse-face
               (list gnus-mouse-face-prop gnus-article-mouse-face))
          (list 'gnus-callback fun)
-         (and data (list 'gnus-data data)))))
+         (and data (list 'gnus-data data))))
+  (widget-convert-button 'link from to :action 'gnus-widget-press-button
+                        ;; Quote `:button-keymap' for Mule 2.3
+                        ;; but it won't work.
+                        ':button-keymap gnus-widget-button-keymap))
 
 ;;; Internal functions: