APPROVE COMMIT
NOTE: This patch has been committed.
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1325261131 0
# Node ID bd80d9103fc8d867b63865e0979c61a9bb3926fd
# Parent 5e256f495401fa242ea0e8d330807ecaae2b709f
Integrate CL code better into core, remove obsolete compatibility code.
lisp/ChangeLog addition:
2011-12-30 Aidan Kehoe <kehoea(a)parhasard.net>
* bytecomp.el:
Call #'cl-compile-time-init explicitly here, don't rely on
bytecomp-load-hook for what is core functionality.
* cl-extra.el:
* cl-extra.el (require):
* cl-extra.el (make-random-state):
* cl-extra.el (random-state-p):
* cl-extra.el (make-hashtable): Removed.
* cl-extra.el (make-weak-hashtable): Removed.
* cl-extra.el (make-key-weak-hashtable): Removed.
* cl-extra.el (make-value-weak-hashtable): Removed.
* cl-extra.el ('hashtablep): Removed.
* cl-extra.el ('hashtable-fullness): Removed.
* cl-extra.el ('hashtable-test-function): Removed.
* cl-extra.el ('hashtable-type): Removed.
* cl-extra.el ('hashtable-size): Removed.
* cl-extra.el ('copy-hashtable): Removed.
* cl-extra.el (cl-builtin-gethash): Removed.
* cl-extra.el (cl-builtin-remhash): Removed.
* cl-extra.el (cl-builtin-clrhash): Removed.
* cl-extra.el (cl-builtin-maphash): Removed.
* cl-extra.el ('cl-gethash): Removed.
* cl-extra.el ('cl-puthash): Removed.
* cl-extra.el ('cl-remhash): Removed.
* cl-extra.el ('cl-clrhash): Removed.
* cl-extra.el ('cl-maphash): Removed.
* cl-extra.el ('cl-make-hash-table): Removed.
* cl-extra.el ('cl-hash-table-p): Removed.
* cl-extra.el ('cl-hash-table-count): Removed.
* cl-extra.el (cl-prettyexpand):
* cl-extra.el (names):
Remove compatibility aliases from this file.
In #'cl-prettyexpand, if FULL is nil, don't expand return-from
either, for symmetry with not expanding block.
Drop cl-extra-load-hook, it's useless when cl-extra is dumped
(since third-party code can't use it, and dumped code shouldn't
use it.)
* cl-macs.el:
* cl-macs.el (cl-pop2):
* cl-macs.el (defun*):
* cl-macs.el (cl-parse-loop-clause):
Remove some no-longer-needed compatibility kludges.
* cl.el:
* cl.el ('cl-map-extents): Removed.
* cl.el (cl-random-time):
* cl.el (list*): New, moved back from subr.el, given a shorter
implementation.
* cl.el ('cl-member): Removed.
* cl.el ('cl-floor): Removed.
* cl.el ('cl-ceiling): Removed.
* cl.el ('cl-truncate): Removed.
* cl.el ('cl-round): Removed.
* cl.el ('cl-mod): Removed.
Remove some compatibility aliases; these may conflict with
package usage, in which case the packages need to be updated, the
new names are available in 21.4, and that's the most recent
version we support.
* cl.el (cl-hacked-flag): Removed.
* cl.el (cl-hack-byte-compiler): Removed.
* subr.el:
* subr.el (list*): Moved back to cl.el.
* update-elc-2.el (batch-update-elc-2):
* update-elc.el (do-autoload-commands):
Add an autoload for cl-compile-time-init in these two files, they
run on bare temacs, auto-autoload isn't available to them, and now
bytecomp calls cl-compile-time-init explicitly.
* cl-compat.el: Removed. This file was long obsolete.
man/ChangeLog addition:
2011-12-30 Aidan Kehoe <kehoea(a)parhasard.net>
* cl.texi (Top):
* cl.texi (Usage):
* cl.texi (Organization):
* cl.texi (Efficiency Concerns):
* cl.texi (Common Lisp Compatibility):
Remove documentation of cl-compat, now it's deleted.
diff -r 5e256f495401 -r bd80d9103fc8 lisp/ChangeLog
--- a/lisp/ChangeLog Fri Dec 30 13:55:07 2011 +0000
+++ b/lisp/ChangeLog Fri Dec 30 16:05:31 2011 +0000
@@ -3,6 +3,82 @@
* subr.el (copy-symbol): Don't error with a non-list plist, as
happens with symbols in abbrev tables.
+2011-12-30 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * bytecomp.el:
+ Call #'cl-compile-time-init explicitly here, don't rely on
+ bytecomp-load-hook for what is core functionality.
+
+ * cl-extra.el:
+ * cl-extra.el (require):
+ * cl-extra.el (make-random-state):
+ * cl-extra.el (random-state-p):
+ * cl-extra.el (make-hashtable): Removed.
+ * cl-extra.el (make-weak-hashtable): Removed.
+ * cl-extra.el (make-key-weak-hashtable): Removed.
+ * cl-extra.el (make-value-weak-hashtable): Removed.
+ * cl-extra.el ('hashtablep): Removed.
+ * cl-extra.el ('hashtable-fullness): Removed.
+ * cl-extra.el ('hashtable-test-function): Removed.
+ * cl-extra.el ('hashtable-type): Removed.
+ * cl-extra.el ('hashtable-size): Removed.
+ * cl-extra.el ('copy-hashtable): Removed.
+ * cl-extra.el (cl-builtin-gethash): Removed.
+ * cl-extra.el (cl-builtin-remhash): Removed.
+ * cl-extra.el (cl-builtin-clrhash): Removed.
+ * cl-extra.el (cl-builtin-maphash): Removed.
+ * cl-extra.el ('cl-gethash): Removed.
+ * cl-extra.el ('cl-puthash): Removed.
+ * cl-extra.el ('cl-remhash): Removed.
+ * cl-extra.el ('cl-clrhash): Removed.
+ * cl-extra.el ('cl-maphash): Removed.
+ * cl-extra.el ('cl-make-hash-table): Removed.
+ * cl-extra.el ('cl-hash-table-p): Removed.
+ * cl-extra.el ('cl-hash-table-count): Removed.
+ * cl-extra.el (cl-prettyexpand):
+ * cl-extra.el (names):
+ Remove compatibility aliases from this file.
+ In #'cl-prettyexpand, if FULL is nil, don't expand return-from
+ either, for symmetry with not expanding block.
+ Drop cl-extra-load-hook, it's useless when cl-extra is dumped
+ (since third-party code can't use it, and dumped code shouldn't
+ use it.)
+
+ * cl-macs.el:
+ * cl-macs.el (cl-pop2):
+ * cl-macs.el (defun*):
+ * cl-macs.el (cl-parse-loop-clause):
+ Remove some no-longer-needed compatibility kludges.
+
+ * cl.el:
+ * cl.el ('cl-map-extents): Removed.
+ * cl.el (cl-random-time):
+ * cl.el (list*): New, moved back from subr.el, given a shorter
+ implementation.
+ * cl.el ('cl-member): Removed.
+ * cl.el ('cl-floor): Removed.
+ * cl.el ('cl-ceiling): Removed.
+ * cl.el ('cl-truncate): Removed.
+ * cl.el ('cl-round): Removed.
+ * cl.el ('cl-mod): Removed.
+ Remove some compatibility aliases; these may conflict with
+ package usage, in which case the packages need to be updated, the
+ new names are available in 21.4, and that's the most recent
+ version we support.
+
+ * cl.el (cl-hacked-flag): Removed.
+ * cl.el (cl-hack-byte-compiler): Removed.
+ * subr.el:
+ * subr.el (list*): Moved back to cl.el.
+
+ * update-elc-2.el (batch-update-elc-2):
+ * update-elc.el (do-autoload-commands):
+ Add an autoload for cl-compile-time-init in these two files, they
+ run on bare temacs, auto-autoload isn't available to them, and now
+ bytecomp calls cl-compile-time-init explicitly.
+
+ * cl-compat.el: Removed. This file was long obsolete.
+
2011-12-27 Didier Verna <didier(a)xemacs.org>
* cl-macs.el (face-foreback): New defsetf.
diff -r 5e256f495401 -r bd80d9103fc8 lisp/bytecomp.el
--- a/lisp/bytecomp.el Fri Dec 30 13:55:07 2011 +0000
+++ b/lisp/bytecomp.el Fri Dec 30 16:05:31 2011 +0000
@@ -5036,6 +5036,8 @@
byte-compile-constant
byte-compile-variable-ref)))))
+;; XEmacs; call this explicitly, don't implement it using bytecomp-load-hook.
+(cl-compile-time-init)
(run-hooks 'bytecomp-load-hook)
diff -r 5e256f495401 -r bd80d9103fc8 lisp/cl-compat.el
--- a/lisp/cl-compat.el Fri Dec 30 13:55:07 2011 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,144 +0,0 @@
-;;; cl-compat.el --- Common Lisp extensions for XEmacs Lisp (compatibility)
-
-;; Copyright (C) 1993 Free Software Foundation, Inc.
-
-;; Author: Dave Gillespie <daveg(a)synaptics.com>
-;; Version: 2.02
-;; Keywords: extensions
-
-;; 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 3 of the License, 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. If not, see <
http://www.gnu.org/licenses/>.
-
-;;; Synched up with: FSF 21.3.
-
-;;; Commentary:
-
-;; These are extensions to Emacs Lisp that provide a degree of
-;; Common Lisp compatibility, beyond what is already built-in
-;; in Emacs Lisp.
-;;
-;; This package was written by Dave Gillespie; it is a complete
-;; rewrite of Cesar Quiroz's original cl.el package of December 1986.
-;;
-;; This package works with Emacs 18, Emacs 19, and XEmacs/Lucid Emacs 19.
-;;
-;; Bug reports, comments, and suggestions are welcome!
-
-;; This file contains emulations of internal routines of the older
-;; CL package which users may have called directly from their code.
-;; Use (require 'cl-compat) to get these routines.
-
-;; See cl.el for Change Log.
-
-
-;;; Code:
-
-;; Require at load-time, but not when compiling cl-compat.
-(or (featurep 'cl) (require 'cl))
-
-
-;;; Keyword routines not supported by new package.
-
-(defmacro defkeyword (x &optional doc)
- (list* 'defconst x (list 'quote x) (and doc (list doc))))
-
-(defun keyword-of (sym)
- (or (keywordp sym) (keywordp (read (format ":%s" sym)))))
-
-;;; Routines for parsing keyword arguments.
-
-(defun build-klist (arglist keys &optional allow-others)
- (let ((res (multiple-value-call 'mapcar* 'cons (unzip-lists arglist))))
- (or allow-others
- (let ((bad (set-difference (mapcar 'car res) keys)))
- (if bad (error "Bad keywords: %s not in %s" bad keys))))
- res))
-
-(defun extract-from-klist (klist key &optional def)
- (let ((res (assq key klist))) (if res (cdr res) def)))
-
-(defun keyword-argument-supplied-p (klist key)
- (assq key klist))
-
-(defun elt-satisfies-test-p (item elt klist)
- (let ((test-not (cdr (assq :test-not klist)))
- (test (cdr (assq :test klist)))
- (key (cdr (assq :key klist))))
- (if key (setq elt (funcall key elt)))
- (if test-not (not (funcall test-not item elt))
- (funcall (or test 'eql) item elt))))
-
-;; The rounding functions in C now have all the functionality this package
-;; used to:
-(loop
- for symbol in '(floor ceiling round truncate)
- do (defalias (intern (format "cl-%s" symbol)) symbol))
-
-(defun safe-idiv (a b)
- (let* ((q (/ (abs a) (abs b)))
- (s (* (signum a) (signum b))))
- (values q (- a (* s q b)) s)))
-
-;; Internal routines.
-
-(defun pair-with-newsyms (oldforms)
- (let ((newsyms (mapcar (function (lambda (x) (gensym))) oldforms)))
- (values (mapcar* 'list newsyms oldforms) newsyms)))
-
-(defun zip-lists (evens odds)
- (mapcan 'list evens odds))
-
-(defun unzip-lists (list)
- (let ((e nil) (o nil))
- (while list
- (setq e (cons (car list) e) o (cons (cadr list) o) list (cddr list)))
- (values (nreverse e) (nreverse o))))
-
-(defun reassemble-argslists (list)
- (let ((n (apply 'min (mapcar 'length list))) (res nil))
- (while (>= (setq n (1- n)) 0)
- (setq res (cons (mapcar (function (lambda (x) (elt x n))) list) res)))
- res))
-
-(defun duplicate-symbols-p (list)
- (let ((res nil))
- (while list
- (if (memq (car list) (cdr list)) (setq res (cons (car list) res)))
- (setq list (cdr list)))
- res))
-
-
-;;; Setf internals.
-
-(defun setnth (n list x)
- (setcar (nthcdr n list) x))
-
-(defun setnthcdr (n list x)
- (setcdr (nthcdr (1- n) list) x))
-
-(defun setelt (seq n x)
- (if (consp seq) (setcar (nthcdr n seq) x) (aset seq n x)))
-
-
-;;; Functions omitted: case-clausify, check-do-stepforms, check-do-endforms,
-;;; extract-do-inits, extract-do[*]-steps, select-stepping-forms,
-;;; elt-satisfies-if[-not]-p, with-keyword-args, mv-bind-clausify,
-;;; all names with embedded `$'.
-
-
-(provide 'cl-compat)
-
-;;; arch-tag: 9996bb4f-aaf5-4592-b436-bf64759a3163
-;;; cl-compat.el ends here
diff -r 5e256f495401 -r bd80d9103fc8 lisp/cl-extra.el
--- a/lisp/cl-extra.el Fri Dec 30 13:55:07 2011 +0000
+++ b/lisp/cl-extra.el Fri Dec 30 16:05:31 2011 +0000
@@ -46,8 +46,7 @@
;;; Code:
;; XEmacs addition
-(eval-when-compile
- (require 'obsolete))
+(eval-when-compile (require 'obsolete))
;;; Type coercion.
@@ -354,13 +353,13 @@
"Return a copy of random-state STATE, or of `*random-state*' if omitted.
If STATE is t, return a new state object seeded from the time of day."
(cond ((null state) (make-random-state *random-state*))
- ((vectorp state) (cl-copy-tree state t))
+ ((vectorp state) (copy-tree state t))
((integerp state) (vector 'cl-random-state-tag -1 30 state))
(t (make-random-state (cl-random-time)))))
(defun random-state-p (object)
"Return t if OBJECT is a random-state object."
- (and (vectorp object) (= (length object) 4)
+ (and (vectorp object) (eql (length object) 4)
(eq (aref object 0) 'cl-random-state-tag)))
;;; Sequence functions.
@@ -452,50 +451,8 @@
(compiled-function-instructions compiled)))
(vector value) 1))))
-;;; Hash tables.
-
-;; The `regular' Common Lisp hash-table stuff has been moved into C.
-;; Only backward compatibility stuff remains here.
-(defun make-hashtable (size &optional test)
- (make-hash-table :test test :size size))
-(defun make-weak-hashtable (size &optional test)
- (make-hash-table :test test :size size :weakness t))
-(defun make-key-weak-hashtable (size &optional test)
- (make-hash-table :test test :size size :weakness 'key))
-(defun make-value-weak-hashtable (size &optional test)
- (make-hash-table :test test :size size :weakness 'value))
-
-(define-obsolete-function-alias 'hashtablep 'hash-table-p)
-(define-obsolete-function-alias 'hashtable-fullness 'hash-table-count)
-(define-obsolete-function-alias 'hashtable-test-function 'hash-table-test)
-(define-obsolete-function-alias 'hashtable-type 'hash-table-type)
-(define-obsolete-function-alias 'hashtable-size 'hash-table-size)
-(define-obsolete-function-alias 'copy-hashtable 'copy-hash-table)
-
-(make-obsolete 'make-hashtable 'make-hash-table)
-(make-obsolete 'make-weak-hashtable 'make-hash-table)
-(make-obsolete 'make-key-weak-hashtable 'make-hash-table)
-(make-obsolete 'make-value-weak-hashtable 'make-hash-table)
-(make-obsolete 'hash-table-type 'hash-table-weakness)
-
-(when (fboundp 'x-keysym-hash-table)
- (make-obsolete 'x-keysym-hashtable 'x-keysym-hash-table))
-
-;; Compatibility stuff for old kludgy cl.el hash table implementation
-(defvar cl-builtin-gethash (symbol-function 'gethash))
-(defvar cl-builtin-remhash (symbol-function 'remhash))
-(defvar cl-builtin-clrhash (symbol-function 'clrhash))
-(defvar cl-builtin-maphash (symbol-function 'maphash))
-
-(defalias 'cl-gethash 'gethash)
-(defalias 'cl-puthash 'puthash)
-(defalias 'cl-remhash 'remhash)
-(defalias 'cl-clrhash 'clrhash)
-(defalias 'cl-maphash 'maphash)
-;; These three actually didn't exist in Emacs-20.
-(defalias 'cl-make-hash-table 'make-hash-table)
-(defalias 'cl-hash-table-p 'hash-table-p)
-(defalias 'cl-hash-table-count 'hash-table-count)
+;;; Hash tables. XEmacs; remove the compatibility stuff, which was all that
+;;; remained here, given the hash table implementation is in C.
;;; Some debugging aids.
@@ -643,7 +600,8 @@
(let ((cl-macroexpand-cmacs full) (cl-compiling-file full)
(byte-compile-macro-environment nil))
(setq form (cl-macroexpand-all form
- (and (not full) '((block) (eval-when)))))
+ (and (not full)
+ '((block) (return-from) (eval-when)))))
(message "Formatting...")
(prog1 (cl-prettyprint form)
(message ""))))
@@ -828,7 +786,8 @@
(require 'descr-text)
(when (zerop (buffer-size))
;; Don't use -literally in case of DOS line endings.
- (insert-file-contents describe-char-unicodedata-file))
+ (insert-file-contents
+ (declare-boundp describe-char-unicodedata-file)))
(goto-char (point-min))
(setq case-fold-search nil)
(and (re-search-forward (format #r"^\([0-9A-F]\{4,6\}\);%s;"
@@ -898,7 +857,9 @@
(delete* key alist :test #'eq
:key (if key #'car-safe #'car-or-not-nil))))))
-(run-hooks 'cl-extra-load-hook)
+;; XEmacs; since cl-extra.el is dumped, cl-extra-load-hook is
+;; useless. (Dumped files normally shouldn't be using hooks, functionality
+;; should be implemented explicitly.)
;; XEmacs addition
(provide 'cl-extra)
diff -r 5e256f495401 -r bd80d9103fc8 lisp/cl-macs.el
--- a/lisp/cl-macs.el Fri Dec 30 13:55:07 2011 +0000
+++ b/lisp/cl-macs.el Fri Dec 30 16:05:31 2011 +0000
@@ -45,10 +45,6 @@
;;; Code:
-(or (memq 'cl-19 features)
- (error "Tried to load `cl-macs' before `cl'!"))
-
-
(defmacro cl-pop2 (place)
(list 'prog1 (list 'car (list 'cdr place))
(list 'setq place (list 'cdr (list 'cdr place)))))
@@ -57,20 +53,6 @@
(defvar cl-optimize-safety)
(defvar cl-optimize-speed)
-
-;;; This kludge allows macros which use cl-transform-function-property
-;;; to be called at compile-time.
-
-(require
- (progn
- (or (fboundp 'cl-transform-function-property)
- (defalias 'cl-transform-function-property
- #'(lambda (n p f)
- (list 'put (list 'quote n) (list 'quote p)
- (list 'function (cons 'lambda f))))))
- 'xemacs))
-
-
;;; Initialization.
(defvar cl-old-bc-file-form nil)
@@ -191,7 +173,7 @@
variables, they can be lists of the form (VAR [INITFORM [SVAR]]); when
no argument is available for VAR, INITFORM is evaluated (or nil, if
INITFORM is omitted) and stored as VAR's value, and SVAR is bound to t.
- If an arguent is available for VAR, and INITFORM is unused, SVAR is
+ If an argument is available for VAR, and INITFORM is unused, SVAR is
bound to nil.
-- &key specifies keyword arguments. The format of each argument is
@@ -1306,7 +1288,7 @@
((eq (car args) 'to) (setq to (cl-pop2 args)))
(t (setq buf (cl-pop2 args)))))
(setq loop-map-form
- (list 'cl-map-extents
+ (list 'map-extents
(list 'function (list 'lambda (list var (gensym))
'(progn . --cl-map) nil))
buf from to))))
diff -r 5e256f495401 -r bd80d9103fc8 lisp/cl.el
--- a/lisp/cl.el Fri Dec 30 13:55:07 2011 +0000
+++ b/lisp/cl.el Fri Dec 30 16:05:31 2011 +0000
@@ -201,8 +201,6 @@
;; ALWAYS be available. So they've been moved from cl.el to eval.c.
;; Note: FSF Emacs moved them to subr.el in FSF 20.
-(defalias 'cl-map-extents 'map-extents)
-
;;; XEmacs; multiple values are in eval.c and cl-macs.el.
;;; We no longer support `multiple-value-apply', which was ill-conceived to
@@ -249,7 +247,7 @@
(defun cl-random-time ()
(let* ((time (copy-sequence (current-time-string))) (i (length time)) (v 0))
(while (>= (decf i) 0) (setq v (+ (* v 3) (aref time i))))
- (if-fboundp 'coerce-number
+ (if (fboundp 'coerce-number)
(coerce-number v 'fixnum)
v)))
@@ -516,7 +514,11 @@
;;; `last' is implemented as a C primitive, as of 1998-11
-;;; XEmacs: `list*' is in subr.el.
+(defun list* (first &rest rest) ; See compiler macro in cl-macs.el
+ "Return a new list with specified args as elements, cons'd to last arg.
+Thus, `(list* A B C D)' is equivalent to `(nconc (list A B C) D)', or to
+`(cons A (cons B (cons C D)))'."
+ (if rest (cons first (reduce #'cons rest :from-end t)) first))
;; XEmacs; handle dotted lists properly, error on circularity and if LIST is
;; not a list.
@@ -541,13 +543,6 @@
;;; `copy-list' is implemented as a C primitive, as of 1998-11
-(defalias 'cl-member 'memq) ; for compatibility with old CL package
-(defalias 'cl-floor 'floor*)
-(defalias 'cl-ceiling 'ceiling*)
-(defalias 'cl-truncate 'truncate*)
-(defalias 'cl-round 'round*)
-(defalias 'cl-mod 'mod*)
-
;;; XEmacs; #'acons is in C.
(defun pairlis (keys values &optional alist)
@@ -618,34 +613,14 @@
((loop) defun (&rest &or symbolp form))
((ignore-errors) 0 (&rest form))))
-;;; This goes here so that cl-macs can find it if it loads right now.
-(provide 'cl-19)
-
-;;; Things to do after byte-compiler is loaded.
-;;; As a side effect, we cause cl-macs to be loaded when compiling, so
-;;; that the compiler-macros defined there will be present.
-
-(defvar cl-hacked-flag nil)
-(defun cl-hack-byte-compiler ()
- (if (and (not cl-hacked-flag) (fboundp 'byte-compile-file-form))
- (progn
- (setq cl-hacked-flag t) ; Do it first, to prevent recursion.
- (when (not (fboundp 'cl-compile-time-init))
- (load "cl-macs" nil t))
- (cl-compile-time-init)))) ; In cl-macs.el.
-
-;;; Try it now in case the compiler has already been loaded.
-(cl-hack-byte-compiler)
-
-;;; Also make a hook in case compiler is loaded after this file.
-(add-hook 'bytecomp-load-hook 'cl-hack-byte-compiler)
-
-;;; The following ensures that packages which expect the old-style cl.el
-;;; will be happy with this one.
+;;; Things to do after byte-compiler is loaded. XEmacs; no longer done here
+;;; using bytecomp-load-hook, done explicitly in bytecomp.el
+;;; instead.
+;;; cl-load-hook is also gone; given that cl.el is dumped it is not
+;;; available to non-dumped code, and dumped code should not be and is not
+;;; using it anyway.
(provide 'cl)
-(run-hooks 'cl-load-hook)
-
;;; arch-tag: 5f07fa74-f153-4524-9303-21f5be125851
;;; cl.el ends here
diff -r 5e256f495401 -r bd80d9103fc8 lisp/subr.el
--- a/lisp/subr.el Fri Dec 30 13:55:07 2011 +0000
+++ b/lisp/subr.el Fri Dec 30 16:05:31 2011 +0000
@@ -40,20 +40,6 @@
;; XEmacs; no need for custom-declare-variable-list, preloaded-file-list is
;; ordered to make it unnecessary.
-;; XEmacs; this is here because we use it in backquote.el, so it needs to be
-;; available the first time a `(...) form is expanded.
-(defun list* (first &rest rest) ; See compiler macro in cl-macs.el
- "Return a new list with specified args as elements, cons'd to last arg.
-Thus, `(list* A B C D)' is equivalent to `(nconc (list A B C) D)', or to
-`(cons A (cons B (cons C D)))'."
- (cond ((not rest) first)
- ((not (cdr rest)) (cons first (car rest)))
- (t (let* ((n (length rest))
- (copy (copy-sequence rest))
- (last (nthcdr (- n 2) copy)))
- (setcdr last (car (cdr last)))
- (cons first copy)))))
-
;;;; Lisp language features.
(defmacro lambda (&rest cdr)
diff -r 5e256f495401 -r bd80d9103fc8 lisp/update-elc-2.el
--- a/lisp/update-elc-2.el Fri Dec 30 13:55:07 2011 +0000
+++ b/lisp/update-elc-2.el Fri Dec 30 16:05:31 2011 +0000
@@ -137,6 +137,7 @@
(let ((dir (car command-line-args-left)))
;; don't depend on being able to autoload `update-autoload-files'!
(load "autoload")
+ (autoload 'cl-compile-time-init "cl-macs")
(load "bytecomp")
(load "byte-optimize")
;; #### the API used here is deprecated, convert to one with explicit
diff -r 5e256f495401 -r bd80d9103fc8 lisp/update-elc.el
--- a/lisp/update-elc.el Fri Dec 30 13:55:07 2011 +0000
+++ b/lisp/update-elc.el Fri Dec 30 16:05:31 2011 +0000
@@ -386,6 +386,7 @@
#'equalp
#'equal))))
(append bc-bootstrap bootstrap-other))
+ (autoload 'cl-compile-time-init "cl-macs")
(setq command-line-args
(append
'("-l" "loadup-el.el" "run-temacs"
diff -r 5e256f495401 -r bd80d9103fc8 man/ChangeLog
--- a/man/ChangeLog Fri Dec 30 13:55:07 2011 +0000
+++ b/man/ChangeLog Fri Dec 30 16:05:31 2011 +0000
@@ -1,3 +1,12 @@
+2011-12-30 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * cl.texi (Top):
+ * cl.texi (Usage):
+ * cl.texi (Organization):
+ * cl.texi (Efficiency Concerns):
+ * cl.texi (Common Lisp Compatibility):
+ Remove documentation of cl-compat, now it's deleted.
+
2011-12-04 Aidan Kehoe <kehoea(a)parhasard.net>
* internals/internals.texi (Basic Lisp Modules):
diff -r 5e256f495401 -r bd80d9103fc8 man/cl.texi
--- a/man/cl.texi Fri Dec 30 13:55:07 2011 +0000
+++ b/man/cl.texi Fri Dec 30 16:05:31 2011 +0000
@@ -111,7 +111,6 @@
* Efficiency Concerns:: Hints and techniques
* Common Lisp Compatibility:: All known differences with Steele
-* Old CL Compatibility:: All known differences with old cl.el
* Porting Common Lisp:: Hints for porting Common Lisp code
* Function Index::
@@ -190,20 +189,6 @@
(require 'cl)
@end example
-@noindent
-If you want to ensure that the new (Gillespie) version of @dfn{CL}
-is the one that is present, add an additional @code{(require 'cl-19)}
-call:
-
-@example
-(require 'cl)
-(require 'cl-19)
-@end example
-
-@noindent
-The second call will fail (with ``(a)file{cl-19.el} not found'') if
-the old @file{cl.el} package was in use.
-
It is safe to arrange to load @dfn{CL} at all times, e.g.,
in your @file{.emacs} file. But it's a good idea, for portability,
to @code{(require 'cl)} in your code even if you do this.
@@ -246,12 +231,6 @@
will take care of pulling in the other files when they are
needed.
-There is another file, @file{cl-compat.el}, which defines some
-routines from the older @file{cl.el} package that are no longer
-present in the new package. This includes internal routines
-like @code{setelt} and @code{zip-lists}, and deprecated features
-like @code{defkeyword}. @xref{Old CL Compatibility}.
-
@node Installation, Naming Conventions, Organization, Overview
@section Installation
@@ -5247,7 +5226,7 @@
optimizing compiler removes @code{block}s which are not actually
referenced by @code{return} or @code{return-from} inside the block.
-@node Common Lisp Compatibility, Old CL Compatibility, Efficiency Concerns, Top
+@node Common Lisp Compatibility, Porting Common Lisp, Efficiency Concerns, Top
@appendix Common Lisp Compatibility
@noindent
@@ -5308,87 +5287,7 @@
The second argument of @code{check-type} is treated differently.
-@node Old CL Compatibility, Porting Common Lisp, Common Lisp Compatibility, Top
-@appendix Old CL Compatibility
-
-@noindent
-Following is a list of all known incompatibilities between this package
-and the older Quiroz @file{cl.el} package.
-
-The @code{defkeyword} form and @code{keywordp} function are not
-implemented in this package.
-
-The @code{member}, @code{floor}, @code{ceiling}, @code{truncate},
-@code{round}, @code{mod}, and @code{rem} functions are suffixed
-by @samp{*} in this package to avoid collision with existing
-functions in Emacs 18 or Emacs 19. The older package simply
-redefined these functions, overwriting the built-in meanings and
-causing serious portability problems with Emacs 19. (Some more
-recent versions of the Quiroz package changed the names to
-@code{cl-member}, etc.; this package defines the latter names as
-aliases for @code{member*}, etc.)
-
-Certain functions in the old package which were buggy or inconsistent
-with the Common Lisp standard are incompatible with the conforming
-versions in this package. For example, @code{eql} and @code{member}
-were synonyms for @code{eq} and @code{memq} in that package, @code{setf}
-failed to preserve correct order of evaluation of its arguments, etc.
-
-Finally, unlike the older package, this package is careful to
-prefix all of its internal names with @code{cl-}. Except for a
-few functions which are explicitly defined as additional features
-(such as @code{floatp-safe} and @code{letf}), this package does not
-export any non-@samp{cl-} symbols which are not also part of Common
-Lisp.
-
-@ifinfo
-@example
-
-@end example
-@end ifinfo
-@appendixsec The @code{cl-compat} package
-
-@noindent
-The @dfn{CL} package includes emulations of some features of the
-old @file{cl.el}, in the form of a compatibility package
-@code{cl-compat}. To use it, put @code{(require 'cl-compat)} in
-your program.
-
-The old package defined a number of internal routines without
-@code{cl-} prefixes or other annotations. Call to these routines
-may have crept into existing Lisp code. @code{cl-compat}
-provides emulations of the following internal routines:
-@code{pair-with-newsyms}, @code{zip-lists}, @code{unzip-lists},
-@code{reassemble-arglists}, @code{duplicate-symbols-p},
-@code{safe-idiv}.
-
-Some @code{setf} forms translated into calls to internal
-functions that user code might call directly. The functions
-@code{setnth}, @code{setnthcdr}, and @code{setelt} fall in
-this category; they are defined by @code{cl-compat}, but the
-best fix is to change to use @code{setf} properly.
-
-The @code{cl-compat} file defines the keyword functions
-@code{keywordp}, @code{keyword-of}, and @code{defkeyword},
-which are not defined by the new @dfn{CL} package because the
-use of keywords as data is discouraged.
-
-The @code{build-klist} mechanism for parsing keyword arguments
-is emulated by @code{cl-compat}; the @code{with-keyword-args}
-macro is not, however, and in any case it's best to change to
-use the more natural keyword argument processing offered by
-@code{defun*}.
-
-The functions @code{cl-floor}, @code{cl-ceiling}, @code{cl-truncate},
-and @code{cl-round} are defined by @code{cl-compat} to use the
-old-style multiple-value mechanism, just as they did in the old
-package. The newer @code{floor*} and friends return their two
-results in a list rather than as multiple values. Note that
-older versions of the old package used the unadorned names
-@code{floor}, @code{ceiling}, etc.; @code{cl-compat} cannot use
-these names because they conflict with Emacs 19 built-ins.
-
-@node Porting Common Lisp, Function Index, Old CL Compatibility, Top
+@node Porting Common Lisp, Function Index, Common Lisp Compatibility, Top
@appendix Porting Common Lisp
@noindent
--
‘Iodine deficiency was endemic in parts of the UK until, through what has been
described as “an unplanned and accidental public health triumph”, iodine was
added to cattle feed to improve milk production in the 1930s.’
(EN Pearce, Lancet, June 2011)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches