Mats Lidell writes:
>>>>> Stephen wrote:
Stephen> I really don't like the idea of requiring people to upgrade
Stephen> when we've promised that the packages will support 21.4.
... and then we changed the _packages_ so that they don't.
No, GNU Emacs and zappo did that by abusing the heck out of autoloads.
We're just trying to maintain compatibility.
Like it or not but the packages main branch doesn't support 21.4
at
the moment.
That's because Mike has been objecting to the monkey-patch solution,
Vin hasn't gotten a clear signal that we need a release of 21.4 with
the autoload abuse in it, and I haven't had time to push an override
through for either the monkey-patch solution or the 21.4 update.
Here's the monkey-patch solution again (I think I've posted this
before but I'm not sure where). Apply the diff below to XEmacs.rules
Index: XEmacs.rules
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/XEmacs.rules,v
retrieving revision 1.62
diff -u -r1.62 XEmacs.rules
--- XEmacs.rules 29 Feb 2008 07:17:14 -0000 1.62
+++ XEmacs.rules 18 Dec 2008 01:42:34 -0000
@@ -66,6 +66,9 @@
# PRELOADS = additional command-line arguments needed when compiling .elcs
# AUTOLOAD_PATH = subdirectory in source tree where .elcs are located (this
# is where auto-autoloads.el, etc. will be placed)
+# PACKAGE_FUTURE = -l ../../package-future.el (This file monkey-patches the
+# running xemacs with features required by certain packages that are not
+# available in older XEmacsen.)
#
# Doc files (see below):
# ----------------------
@@ -496,7 +499,7 @@
$(LOAD_AUTOLOADS) \
-eval "$(AUTOLOAD_PACKAGE_NAME)" \
-eval "$(AUTOLOAD_FILE)" \
- -l autoload -f batch-update-autoloads $^
+ -l autoload $(PACKAGE_FUTURE) -f batch-update-autoloads $^
@touch $(AUTOLOAD_PATH)/auto-autoloads.el
@rm -f $(AUTOLOAD_PATH)/auto-autoloads.el~
endif
Then add "PACKAGE_FUTURE = -l ../../package-future" to the Makefiles
for packages that need it (currently ede and semantic), where
package-future.el is
;;; package-future.el --- update XEmacs to deal with modern packages
;; Copyright (C) 2007 Free Software Foundation, Inc.
;; Author: Stephen J. Turnbull <stephen(a)xemacs.org>
;; Maintainer: XEmacs Development Team
;; Keywords: packages
;; This file is part of the XEmacs package distribution.
;; The XEmacs packages are free software; you can redistribute it and/or
;; modify them 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.
;; The XEmacs packages are distributed in the hope that they 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 the XEmacs packages; see the file COPYING. If not, write
;; to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Commentary:
;; This file contains monkey-patches required to provide functionality
;; missing in older XEmacsen but needed to build some recent packages.
;; To use it, add
;;
;; PACKAGE_FUTURE = -l ../..package-future.el
;;
;; to a package's XEmacs Makefile.
;; To add features to this file, ... well, be a wizard, then do wizardly
;; things. Remember that a True Wizard avoids disturbing the Equilibrium
;; needlessly. Carefully protect the pristine XEmacs from unneeded
;; monkey-patches! Try to use exact tests.
;;; Code:
(unless (emacs-version>= 21 5 29)
;; We monkeypatch the make-autoload function so it can handle recent
;; packages like JDE that require extension of the class of functions
;; that must generate autoloads.
(terpri)
(princ "***** WARNING: monkey-patching `make-autoload'. *****")
(terpri)
(require 'autoload)
;; Add operator definitions to autoload-operators.el in the xemacs-base
;; package.
(ignore-errors (require 'autoload-operators))
(unless (boundp 'autoload-make-autoload-operators)
(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."))
(fmakunbound 'make-autoload)
(defun make-autoload (form file)
"Turn FORM into an autoload or defvar for source file FILE.
Returns nil if FORM is not a special autoload form (i.e. a function definition
or macro definition or a defcustom)."
(princ (format ".. transforming %s in %s\n" form file))
(let ((car (car-safe form)) expand)
(cond
;; For complex cases, try again on the macro-expansion.
((and (memq car '(easy-mmode-define-global-mode
easy-mmode-define-minor-mode define-minor-mode))
(setq expand (let ((load-file-name file)) (macroexpand form)))
(eq (car expand) 'progn)
(memq :autoload-end expand))
(let ((end (memq :autoload-end expand)))
;; Cut-off anything after the :autoload-end marker.
(setcdr end nil)
(cons 'progn
(mapcar (lambda (form) (make-autoload form file))
(cdr expand)))))
;; For special function-like operators, use the `autoload' function.
((memq car autoload-make-autoload-operators)
(let* ((macrop (memq car '(defmacro defmacro*)))
(name (nth 1 form))
(body (nthcdr (get car 'doc-string-elt) form))
(doc (if (stringp (car body)) (pop body))))
;; `define-generic-mode' quotes the name, so take care of that
(list 'autoload (if (listp name) name (list 'quote name)) file doc
(or (and (memq car '(define-skeleton define-derived-mode
define-generic-mode
easy-mmode-define-global-mode
easy-mmode-define-minor-mode
define-minor-mode)) t)
(eq (car-safe (car body)) 'interactive))
(if macrop (list 'quote 'macro) nil))))
;; Convert defcustom to a simpler (and less space-consuming) defvar,
;; but add some extra stuff if it uses :require.
((eq car 'defcustom)
(let ((varname (car-safe (cdr-safe form)))
(init (car-safe (cdr-safe (cdr-safe form))))
(doc (car-safe (cdr-safe (cdr-safe (cdr-safe form)))))
(rest (cdr-safe (cdr-safe (cdr-safe (cdr-safe form))))))
(if (not (plist-get rest :require))
`(defvar ,varname ,init ,doc)
`(progn
(defvar ,varname ,init ,doc)
(custom-add-to-group ,(plist-get rest :group)
',varname 'custom-variable)
(custom-add-load ',varname
,(plist-get rest :require))))))
;; Coding systems. #### Would be nice to handle the docstring here too.
((memq car '(make-coding-system make-8-bit-coding-system))
`(autoload-coding-system ,(nth 1 form) '(load ,file)))
;; nil here indicates that this is not a special autoload form.
(t nil)))))
;;; end monkey-patches for pre-21.5.29
;;; monkey-patches to provide autoloads for EIEIO object definitions
(add-to-list 'autoload-make-autoload-operators 'defclass)
(add-to-list 'autoload-make-autoload-operators 'defmethod)
;;; end monkey-patches for EIEIO
;;; package-future.el ends here
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta