changeset 87243:23ea76295829

Add declare-function compatibility definition. Require gnus-util. (gnus-configure-windows): Declare as a function. (mm-remove-part): Only call delete-annotation on XEmacs. (mm-view-pkcs7): Autoload.
author Glenn Morris <rgm@gnu.org>
date Tue, 11 Dec 2007 05:41:13 +0000
parents c2c948ff1ad8
children dac02fccd9a7
files lisp/gnus/mm-decode.el
diffstat 1 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/gnus/mm-decode.el	Tue Dec 11 05:40:08 2007 +0000
+++ b/lisp/gnus/mm-decode.el	Tue Dec 11 05:41:13 2007 +0000
@@ -26,9 +26,14 @@
 
 ;;; Code:
 
+;; For Emacs < 22.2.
+(eval-and-compile
+  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
+
 (require 'mail-parse)
 (require 'mailcap)
 (require 'mm-bodies)
+(require 'gnus-util)
 (eval-when-compile (require 'cl)
 		   (require 'term))
 
@@ -733,6 +738,8 @@
 		(mm-display-external
 		 handle 'mailcap-save-binary-file)))))))))
 
+(declare-function gnus-configure-windows "gnus-win" (setting &optional force))
+
 (defun mm-display-external (handle method)
   "Display HANDLE using METHOD."
   (let ((outbuf (current-buffer)))
@@ -990,7 +997,8 @@
 	(cond
 	 ;; Internally displayed part.
 	 ((mm-annotationp object)
-	  (delete-annotation object))
+          (if (featurep 'xemacs)
+              (delete-annotation object)))
 	 ((or (functionp object)
 	      (and (listp object)
 		   (eq (car object) 'lambda)))
@@ -1490,6 +1498,8 @@
     (put-text-property 0 (length (car handle)) parameter value
 		       (car handle))))
 
+(autoload 'mm-view-pkcs7 "mm-view")
+
 (defun mm-possibly-verify-or-decrypt (parts ctl)
   (let ((type (car ctl))
 	(subtype (cadr (split-string (car ctl) "/")))