From: Glenn Morris Date: Tue, 11 Dec 2007 05:29:49 +0000 (+0000) Subject: Add declare-function compatibility definition. X-Git-Tag: emacs-pretest-23.0.90~8962 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=431e6df6c8fa1c38788baf303023e80f0d0018ed;p=emacs.git 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. --- diff --git a/lisp/gnus/mml-smime.el b/lisp/gnus/mml-smime.el index 07dc1ab4ccb..cbd70cb2adb 100644 --- a/lisp/gnus/mml-smime.el +++ b/lisp/gnus/mml-smime.el @@ -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 @@ Whether the passphrase is cached at all is controlled by (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 @@ Whether the passphrase is cached at all is controlled by (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 @@ Whether the passphrase is cached at all is controlled by (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))