(gnus-article-display-x-face-with-x-face-mule): Warn if it is used with
authoryamaoka <yamaoka>
Fri, 11 Jun 1999 00:45:01 +0000 (00:45 +0000)
committeryamaoka <yamaoka>
Fri, 11 Jun 1999 00:45:01 +0000 (00:45 +0000)
X-Face 0.25 or later.  Note that it should be abolished in the future.

lisp/gnus-art.el

index 7e4ffa2..9ab6fb4 100644 (file)
@@ -2915,8 +2915,9 @@ value of the variable `gnus-show-mime' is non-nil."
                                (with-current-buffer gnus-summary-buffer
                                  default-mime-charset))))
 
+;; The following procedures will be abolished in the future.
 (autoload 'x-face-mule-x-face-decode-message-header "x-face-mule")
-
+(defvar x-face-mule-version-number)
 (defun gnus-article-display-x-face-with-x-face-mule (&rest args)
   "Decode and show X-Face with the function
 `x-face-mule-x-face-decode-message-header'.  The buffer is expected to be
@@ -2925,11 +2926,30 @@ narrowed to just the headers of the article."
     (error "`%s' won't work under XEmacs."
           'gnus-article-display-x-face-with-x-face-mule))
   (when window-system
+    (when (and (boundp 'x-face-mule-version-number)
+              (> (string-to-number x-face-mule-version-number) 0.24)
+              (not (gnus-buffer-live-p "*X-Face-Mule WARNING*")))
+      (let ((buffer (generate-new-buffer "*X-Face-Mule WARNING*")))
+       (save-window-excursion
+         (pop-to-buffer buffer)
+         (insert (format
+                  "WARNING:
+`%s' is an obsolete function.
+You have no use for setting the variable `%s',
+however, it will be set suitably by X-Face-Mule %s.
+Type any key: "
+                  'gnus-article-display-x-face-with-x-face-mule
+                  'gnus-article-x-face-command
+                  x-face-mule-version-number))
+         (let ((inhibit-quit t) (echo-keystrokes 0) cursor-in-echo-area)
+           (read-char-exclusive))
+         (beginning-of-line)
+         (delete-region (point) (point-max)))))
     (condition-case err
        (x-face-mule-x-face-decode-message-header)
       (error (error "%s"
                    (if (featurep 'x-face-mule)
-                       "Please install x-face-mule 0.24 or later."
+                       "Please install x-face-mule 0.25 or later."
                      err))))))
 
 ;;;