comparison lisp/gnus/gnus-fun.el @ 87251:0abba064c568

Add declare-function compatibility definition. (message-goto-eoh): Autoload. (article-narrow-to-head, gnus-article-goto-header) (gnus-add-image, gnus-add-wash-type): Declare as functions. (gnus-display-x-face-in-from): Require gnus-art.
author Glenn Morris <rgm@gnu.org>
date Tue, 11 Dec 2007 05:46:37 +0000
parents 1cdfc94602cb
children 107ccd98fa12
comparison
equal deleted inserted replaced
87250:cdbb1d6ce433 87251:0abba064c568
23 ;; Boston, MA 02110-1301, USA. 23 ;; Boston, MA 02110-1301, USA.
24 24
25 ;;; Commentary: 25 ;;; Commentary:
26 26
27 ;;; Code: 27 ;;; Code:
28
29 ;; For Emacs < 22.2.
30 (eval-and-compile
31 (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
28 32
29 (eval-when-compile 33 (eval-when-compile
30 (require 'cl)) 34 (require 'cl))
31 35
32 (require 'mm-util) 36 (require 'mm-util)
102 (file (nth (random (length files)) files))) 106 (file (nth (random (length files)) files)))
103 (when file 107 (when file
104 (gnus-shell-command-to-string 108 (gnus-shell-command-to-string
105 (format gnus-convert-pbm-to-x-face-command 109 (format gnus-convert-pbm-to-x-face-command
106 (shell-quote-argument file))))))) 110 (shell-quote-argument file)))))))
111
112 (autoload 'message-goto-eoh "message" nil t)
107 113
108 ;;;###autoload 114 ;;;###autoload
109 (defun gnus-insert-random-x-face-header () 115 (defun gnus-insert-random-x-face-header ()
110 "Insert a random X-Face header from `gnus-x-face-directory'." 116 "Insert a random X-Face header from `gnus-x-face-directory'."
111 (interactive) 117 (interactive)
201 "Face to show X-Face. 207 "Face to show X-Face.
202 The colors from this face are used as the foreground and background 208 The colors from this face are used as the foreground and background
203 colors of the displayed X-Faces." 209 colors of the displayed X-Faces."
204 :group 'gnus-article-headers) 210 :group 'gnus-article-headers)
205 211
212 (declare-function article-narrow-to-head "gnus-art" ())
213 (declare-function gnus-article-goto-header "gnus-art" (header))
214 (declare-function gnus-add-image "gnus-art" (category image))
215 (declare-function gnus-add-wash-type "gnus-art" (type))
216
206 (defun gnus-display-x-face-in-from (data) 217 (defun gnus-display-x-face-in-from (data)
207 "Display the X-Face DATA in the From header." 218 "Display the X-Face DATA in the From header."
219 (require 'gnus-art)
208 (let ((default-enable-multibyte-characters nil) 220 (let ((default-enable-multibyte-characters nil)
209 pbm) 221 pbm)
210 (when (or (gnus-image-type-available-p 'xface) 222 (when (or (gnus-image-type-available-p 'xface)
211 (and (gnus-image-type-available-p 'pbm) 223 (and (gnus-image-type-available-p 'pbm)
212 (setq pbm (uncompface data)))) 224 (setq pbm (uncompface data))))