Commits

Anonymous committed 9666ae6

2008-02-23 Michael Sperber <mike@xemacs.org>

* autoload-operators.el: Add this file, parameterizes autoload.el
in the core.

Comments (0)

Files changed (3)

+2008-02-23  Michael Sperber  <mike@xemacs.org>
+
+	* autoload-operators.el: Add this file, parameterizes autoload.el
+	in the core.
+
 2008-01-13  Norbert Koch  <viteno@xemacs.org>
 
 	* Makefile (VERSION): XEmacs package 2.15 released.
   (package-suppress 'xemacs-base \"regexp-opt\" '(fboundp 'package-suppress)) \
   (package-suppress 'xemacs-base \"easy-mmode\" '(fboundp 'package-suppress))
 
-ELCS = add-log.elc advice.elc annotations.elc assoc.elc case-table.elc \
+ELCS = add-log.elc advice.elc annotations.elc assoc.elc autoload-operators.elc \
+	case-table.elc \
 	chistory.elc comint.elc comint-xemacs.elc compile.elc debug.elc \
 	easy-mmode.elc ebuff-menu.elc echistory.elc ehelp.elc edmacro.elc \
 	electric.elc enriched.elc env.elc facemenu.elc ffap.elc field.elc \

autoload-operators.el

+;;; autoload-operators.el --- special autoload treatment for some operators
+
+;; Copyright (C) 1991-1994, 1997, 2003 Free Software Foundation, Inc.
+
+;; Original Author: Roland McGrath <roland@gnu.ai.mit.edu>
+;; Heavily Modified: XEmacs Maintainers
+;; Keywords: maint
+
+;; This file is part of XEmacs.
+
+;; XEmacs is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; XEmacs is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with XEmacs; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
+
+;;; 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.
+
+(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.")
+
+(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'.")
+
+;;; 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)
+
+(provide 'autoload-operators)
+
+;;; autoload-operators.el ends here