changeset 87236:8cbce6c6b6c0

Add declare-function compatibility definition. (epg-check-configuration, epg-configuration) (message-options-set): Declare as functions. (gnus-buffer-live-p, gnus-get-buffer-create): Autoload.
author Glenn Morris <rgm@gnu.org>
date Tue, 11 Dec 2007 05:26:52 +0000
parents 1efb9854eedf
children 39e105c95381
files lisp/gnus/mml2015.el
diffstat 1 files changed, 15 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/gnus/mml2015.el	Tue Dec 11 05:25:51 2007 +0000
+++ b/lisp/gnus/mml2015.el	Tue Dec 11 05:26:52 2007 +0000
@@ -30,6 +30,10 @@
 
 ;;; Code:
 
+;; For Emacs < 22.2.
+(eval-and-compile
+  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
+
 (eval-when-compile (require 'cl))
 (require 'mm-decode)
 (require 'mm-util)
@@ -38,6 +42,10 @@
 
 (defvar mc-pgp-always-sign)
 
+(declare-function epg-check-configuration "ext:epg-config"
+                  (config &optional minimum-version))
+(declare-function epg-configuration "ext:epg-config" ())
+
 (defvar mml2015-use (or
 		     (condition-case nil
 			 (progn
@@ -396,6 +404,10 @@
     (insert (format "--%s--\n" boundary))
     (goto-char (point-max))))
 
+;; We require mm-decode, which requires mm-bodies, which autoloads
+;; message-options-get (!).
+(declare-function message-options-set "message" (symbol value))
+
 (defun mml2015-mailcrypt-encrypt (cont &optional sign)
   (let ((mc-pgp-always-sign
 	 (or mc-pgp-always-sign
@@ -1329,6 +1341,9 @@
 
 ;;; General wrapper
 
+(autoload 'gnus-buffer-live-p "gnus-util")
+(autoload 'gnus-get-buffer-create "gnus")
+
 (defun mml2015-clean-buffer ()
   (if (gnus-buffer-live-p mml2015-result-buffer)
       (with-current-buffer mml2015-result-buffer