Here's what I suggest we do:
- Apply the attached patch to 21.5. It gets the operator definitions
from a new autoload-operators.el from the xemacs-base package, if
available.
- Add autoload-operators.el, as attached, to the xemacs-base package.
- Apply the same patch to 21.4, after applying these also:
changeset: 4352:d2f4dd8611d9
user: Stephen J. Turnbull <stephen(a)xemacs.org>
date: Sat Dec 22 15:57:21 2007 -0800
summary: Factor out lists of operators specially treated by 'make-autoload'.
changeset: 4331:6ad202d453cb
user: Mike Sperber <sperber(a)deinprogramm.de>
date: Thu Dec 20 08:49:38 2007 +0100
summary: Insert <immediate> into section header for immediate autoloads.
changeset: 4256:1dabc28c10d0
user: michaels
date: Thu Nov 08 07:12:40 2007 +0000
files: lisp/ChangeLog lisp/autoload.el
description:
[xemacs-hg @ 2007-11-08 07:12:39 by michaels]
--
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@ 2008-02-03 Aidan Kehoe <kehoea@parhasa
+2008-02-16 Michael Sperber <mike(a)xemacs.org>
+
+ * autoload.el (autoload-make-autoload-operators,
+ autoload-make-autoload-complex-operators): Move autoload operator
+ definitons to autoload-operators.el in xemacs-base package.
+ Continue to work with older packages.
+
2008-02-03 Aidan Kehoe <kehoea(a)parhasard.net>
* iso8859-1.el (ascii-case-table):
diff --git a/lisp/autoload.el b/lisp/autoload.el
--- a/lisp/autoload.el
+++ b/lisp/autoload.el
@@ -226,19 +226,40 @@ the section of autoloads for a file.")
;; Parsing the source file text.
;; Autoloads in C source differ from those in Lisp source.
-;; #### Eventually operators like defclass and defmethod (defined in an
-;; external package, EIEIO) may be factored out. Don't add operators here
-;; without discussing whether and how to do that on the developers' channel.
-(defvar autoload-make-autoload-operators
- '(defun define-skeleton defmacro define-derived-mode define-generic-mode
- easy-mmode-define-minor-mode easy-mmode-define-global-mode
- define-minor-mode defun* defmacro* defclass defmethod)
- "`defun'-like operators that use `autoload' to load the library.")
+; Add operator definitions to autoload-operators.el in the xemacs-base
+; package.
+(ignore-errors (require 'autoload-operators))
-(defvar autoload-make-autoload-complex-operators
- '(easy-mmode-define-minor-mode easy-mmode-define-global-mode
- define-minor-mode)
- "`defun'-like operators to macroexpand before using `autoload'.")
+; As autoload-operators is new, provide stopgap measure for a while.
+(if (not (boundp 'autoload-make-autoload-operators))
+ (progn
+ (defvar autoload-make-autoload-operators
+ '(defun define-skeleton defmacro define-derived-mode define-generic-mode
+ easy-mmode-define-minor-mode easy-mmode-define-global-mode
+ define-minor-mode defun* defmacro*)
+ "`defun'-like operators that use `autoload' to load the library.")
+
+ (defvar autoload-make-autoload-complex-operators
+ '(easy-mmode-define-minor-mode easy-mmode-define-global-mode
+ define-minor-mode)
+ "`defun'-like operators to macroexpand before using `autoload'.")
+
+ (put 'autoload 'doc-string-elt 3)
+ (put 'defun 'doc-string-elt 3)
+ (put 'defun* 'doc-string-elt 3)
+ (put 'defvar 'doc-string-elt 3)
+ (put 'defcustom 'doc-string-elt 3)
+ (put 'defconst 'doc-string-elt 3)
+ (put 'defmacro 'doc-string-elt 3)
+ (put 'defmacro* 'doc-string-elt 3)
+ (put 'defsubst 'doc-string-elt 3)
+ (put 'define-skeleton 'doc-string-elt 2)
+ (put 'define-derived-mode 'doc-string-elt 4)
+ (put 'easy-mmode-define-minor-mode 'doc-string-elt 2)
+ (put 'define-minor-mode 'doc-string-elt 2)
+ (put 'define-generic-mode 'doc-string-elt 7)
+ ;; defin-global-mode has no explicit docstring.
+ (put 'easy-mmode-define-global-mode 'doc-string-elt 1000)))
(defun make-autoload (form file)
"Turn FORM into an autoload or defvar for source file FILE.
@@ -779,43 +800,6 @@ at the beginning of lines and ^L charact
(delete-char -1)
(insert "\\^L")))
(goto-char p2))))))))
-
-;;; Forms which have doc-strings which should be printed specially.
-;;; A doc-string-elt property of ELT says that (nth ELT FORM) is
-;;; the doc-string in FORM.
-;;;
-;;; There used to be the following note here:
-;;; ;;; Note: defconst and defvar should NOT be marked in this way.
-;;; ;;; We don't want to produce defconsts and defvars that
-;;; ;;; make-docfile can grok, because then it would grok them twice,
-;;; ;;; once in foo.el (where they are given with ;;;###autoload) and
-;;; ;;; once in loaddefs.el.
-;;;
-;;; Counter-note: Yes, they should be marked in this way.
-;;; make-docfile only processes those files that are loaded into the
-;;; dumped Emacs, and those files should never have anything
-;;; autoloaded here. The above-feared problem only occurs with files
-;;; which have autoloaded entries *and* are processed by make-docfile;
-;;; there should be no such files.
-
-(put 'autoload 'doc-string-elt 3)
-(put 'defun 'doc-string-elt 3)
-(put 'defun* 'doc-string-elt 3)
-(put 'defvar 'doc-string-elt 3)
-(put 'defcustom 'doc-string-elt 3)
-(put 'defconst 'doc-string-elt 3)
-(put 'defmacro 'doc-string-elt 3)
-(put 'defmacro* 'doc-string-elt 3)
-(put 'defsubst 'doc-string-elt 3)
-(put 'define-skeleton 'doc-string-elt 2)
-(put 'define-derived-mode 'doc-string-elt 4)
-(put 'easy-mmode-define-minor-mode 'doc-string-elt 2)
-(put 'define-minor-mode 'doc-string-elt 2)
-(put 'define-generic-mode 'doc-string-elt 7)
-(put 'defclass 'doc-string-elt 4)
-(put 'defmethod 'doc-string-elt 3)
-;; defin-global-mode has no explicit docstring.
-(put 'easy-mmode-define-global-mode 'doc-string-elt 1000)
(defun autoload-trim-file-name (file)
"Returns relative pathname of FILE including the last directory.
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta