changeset 87239:4b1974470f60

Add declare-function compatibility definition. (mml-compute-boundary, gnus-completing-read-with-default): Autoload. (epg-key-sub-key-list, epg-sub-key-capability) (epg-sub-key-validity, message-options-set): Declare as functions.
author Glenn Morris <rgm@gnu.org>
date Tue, 11 Dec 2007 05:29:49 +0000
parents ada1cfe623ac
children 30bc3f465294
files lisp/gnus/mml-smime.el
diffstat 1 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/gnus/mml-smime.el	Tue Dec 11 05:28:59 2007 +0000
+++ b/lisp/gnus/mml-smime.el	Tue Dec 11 05:29:49 2007 +0000
@@ -27,6 +27,10 @@
 
 ;;; Code:
 
+;; For Emacs < 22.2.
+(eval-and-compile
+  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
+
 (eval-when-compile (require 'cl))
 
 (require 'smime)
@@ -216,6 +220,8 @@
       (quit))
     result))
 
+(autoload 'gnus-completing-read-with-default "gnus-util")
+
 (defun mml-smime-openssl-encrypt-query ()
   ;; todo: try dns/ldap automatically first, before prompting user
   (let (certs done)
@@ -346,6 +352,10 @@
 	      (cons key-id mml-smime-epg-secret-key-id-list))
 	(copy-sequence passphrase)))))
 
+(declare-function epg-key-sub-key-list   "ext:epg" (key))
+(declare-function epg-sub-key-capability "ext:epg" (sub-key))
+(declare-function epg-sub-key-validity   "ext:epg" (sub-key))
+
 (defun mml-smime-epg-find-usable-key (keys usage)
   (catch 'found
     (while keys
@@ -358,6 +368,12 @@
 	  (setq pointer (cdr pointer))))
       (setq keys (cdr keys)))))
 
+(autoload 'mml-compute-boundary "mml")
+
+;; We require mm-decode, which requires mm-bodies, which autoloads
+;; message-options-get (!).
+(declare-function message-options-set "message" (symbol value))
+
 (defun mml-smime-epg-sign (cont)
   (let* ((inhibit-redisplay t)
 	 (context (epg-make-context 'CMS))