From 3f9058580bca760397db35b44e1fb1bfc1517179 Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Mon, 13 Jan 2003 18:02:32 +0000 Subject: [PATCH] (gnus-random-x-face): Doc fix. (gnus-insert-random-x-face-header): New function. --- lisp/ChangeLog | 5 +++++ lisp/gnus-fun.el | 15 ++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 373a653ac..a21a4fe69 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2003-01-13 Simon Josefsson + + * gnus-fun.el (gnus-random-x-face): Doc fix. + (gnus-insert-random-x-face-header): New function. + 2003-01-13 Jesper Harder * gnus-sum.el (gnus-summary-make-menu-bar): Deactivate items if diff --git a/lisp/gnus-fun.el b/lisp/gnus-fun.el index 5e9d79a3e..5e63bc9ae 100644 --- a/lisp/gnus-fun.el +++ b/lisp/gnus-fun.el @@ -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." -- 2.34.1