2002-01-04 ShengHuo ZHU <zsh@cs.rochester.edu>
[gnus] / lisp / gnus-art.el
index f02d31c..08f1bf3 100644 (file)
@@ -228,23 +228,18 @@ regexp.  If it matches, the text in question is not a signature."
 (defcustom gnus-article-x-face-command
   (if (featurep 'xemacs)
       (if (or (gnus-image-type-available-p 'xface)
-             (gnus-image-type-available-p 'xpm))
-         'gnus-xmas-article-display-xface
+             (gnus-image-type-available-p 'pbm))
+         'gnus-display-x-face-in-from
        "{ echo '/* Width=48, Height=48 */'; uncompface; } | icontopbm | ee -")
-    (if (gnus-image-type-available-p 'xbm)
-       'gnus-article-display-xface
-      (if gnus-article-compface-xbm
-         "{ echo '/* Width=48, Height=48 */'; uncompface; } | display -"
-       "{ echo '/* Width=48, Height=48 */'; uncompface; } | icontopbm | \
-display -")))
+    (if (gnus-image-type-available-p 'pbm)
+       'gnus-display-x-face-in-from
+      "{ echo '/* Width=48, Height=48 */'; uncompface; } | icontopbm | \
+display -"))
   "*String or function to be executed to display an X-Face header.
 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
-                 ,(if (featurep 'xemacs)
-                      'gnus-xmas-article-display-xface
-                    'gnus-article-display-xface))
+                (function-item gnus-display-x-face-in-from)
                 function)
   :version "21.1"
   :group 'gnus-article-washing)
@@ -1802,8 +1797,14 @@ unfolded."
              (push (mail-header-field-value) x-faces))
            (setq from (message-fetch-field "from"))))
        (if grey
-           (gnus-put-image
-            (create-image (gnus-convert-gray-x-face-to-xpm x-faces) 'xpm t))
+           (let ((xpm (gnus-convert-gray-x-face-to-xpm x-faces))
+                 image)
+             (when xpm
+               (setq image (gnus-create-image xpm 'xpm t))
+               (gnus-article-goto-header "from")
+               (gnus-add-wash-type 'xface)
+               (gnus-add-image 'xface image)
+               (gnus-put-image image)))
          ;; Sending multiple EOFs to xv doesn't work, so we only do a
          ;; single external face.
          (when (stringp gnus-article-x-face-command)
@@ -3162,6 +3163,8 @@ If variable `gnus-use-long-file-name' is non-nil, it is
   ">" end-of-buffer
   "\C-c\C-i" gnus-info-find-node
   "\C-c\C-b" gnus-bug
+  "R" gnus-article-reply-with-original
+  "F" gnus-article-followup-with-original
   "\C-hk" gnus-article-describe-key
   "\C-hc" gnus-article-describe-key-briefly
 
@@ -4553,7 +4556,7 @@ Argument LINES specifies lines to be scrolled down."
   (interactive "P")
   (gnus-article-check-buffer)
   (let ((nosaves
-        '("q" "Q"  "c" "r" "R" "\C-c\C-f" "m"  "a" "f" "F"
+        '("q" "Q"  "c" "r" "\C-c\C-f" "m"  "a" "f"
           "Zc" "ZC" "ZE" "ZQ" "ZZ" "Zn" "ZR" "ZG" "ZN" "ZP"
           "=" "^" "\M-^" "|"))
        (nosave-but-article
@@ -4667,6 +4670,28 @@ Argument LINES specifies lines to be scrolled down."
        (describe-key-briefly key insert))
     (describe-key-briefly key insert)))
 
+(defun gnus-article-reply-with-original (&optional wide)
+  "Start composing a reply mail to the current message.
+The text in the region will be yanked.  If the region isn't active,
+the entire article will be yanked."
+  (interactive "P")
+  (let ((article (cdr gnus-article-current)))
+    (if (not mark-active)
+       (gnus-summary-reply (list (list article)) wide)
+      (gnus-summary-reply
+       (list (list article (buffer-substring (point) (mark)))) wide))))
+
+(defun gnus-article-followup-with-original ()
+  "Compose a followup to the current article.
+The text in the region will be yanked.  If the region isn't active,
+the entire article will be yanked."
+  (interactive)
+  (let ((article (cdr gnus-article-current)))
+    (if (not mark-active)
+       (gnus-summary-followup (list (list article)))
+      (gnus-summary-followup
+       (list (list article (buffer-substring (point) (mark))))))))
+
 (defun gnus-article-hide (&optional arg force)
   "Hide all the gruft in the current article.
 This means that PGP stuff, signatures, cited text and (some)