(gnus-random-x-face): Doc fix.
authorSimon Josefsson <jas@extundo.com>
Mon, 13 Jan 2003 18:02:32 +0000 (18:02 +0000)
committerSimon Josefsson <jas@extundo.com>
Mon, 13 Jan 2003 18:02:32 +0000 (18:02 +0000)
(gnus-insert-random-x-face-header): New function.

lisp/ChangeLog
lisp/gnus-fun.el

index 373a653..a21a4fe 100644 (file)
@@ -1,3 +1,8 @@
+2003-01-13  Simon Josefsson  <jas@extundo.com>
+
+       * gnus-fun.el (gnus-random-x-face): Doc fix.
+       (gnus-insert-random-x-face-header): New function.
+
 2003-01-13  Jesper Harder  <harder@ifa.au.dk>
 
        * gnus-sum.el (gnus-summary-make-menu-bar): Deactivate items if
index 5e9d79a..5e63bc9 100644 (file)
@@ -60,7 +60,7 @@ Output to the current buffer, replace text, and don't mingle error."
 
 ;;;###autoload
 (defun gnus-random-x-face ()
-  "Insert a random X-Face header from `gnus-x-face-directory'."
+  "Return X-Face header data chosen randomly from `gnus-x-face-directory'."
   (interactive)
   (when (file-exists-p gnus-x-face-directory)
     (let* ((files (directory-files gnus-x-face-directory t "\\.pbm$"))
@@ -70,6 +70,19 @@ Output to the current buffer, replace text, and don't mingle error."
         (format gnus-convert-pbm-to-x-face-command
                 (shell-quote-argument file)))))))
 
+;;;###autoload
+(defun gnus-insert-random-x-face-header ()
+  "Insert a random X-Face header from `gnus-x-face-directory'."
+  (interactive)
+  (let ((data (gnus-random-x-face)))
+    (save-excursion
+      (message-goto-eoh)
+      (if data
+         (insert "X-Face: " data)
+       (message
+        "No face returned by `gnus-random-x-face'.  Does %s/*.pbm exist?"
+        gnus-x-face-directory)))))
+
 ;;;###autoload
 (defun gnus-x-face-from-file (file)
   "Insert an X-Face header based on an image file."