Mercurial > hg > xemacs-beta
comparison lisp/subr.el @ 5632:bd80d9103fc8
Integrate CL code better into core, remove obsolete compatibility code.
lisp/ChangeLog addition:
2011-12-30 Aidan Kehoe <kehoea@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@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.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Fri, 30 Dec 2011 16:05:31 +0000 |
parents | 5e256f495401 |
children | b7ae5f44b950 |
comparison
equal
deleted
inserted
replaced
5631:5e256f495401 | 5632:bd80d9103fc8 |
---|---|
37 | 37 |
38 ;; BEGIN SYNCHED WITH FSF 21.2 | 38 ;; BEGIN SYNCHED WITH FSF 21.2 |
39 | 39 |
40 ;; XEmacs; no need for custom-declare-variable-list, preloaded-file-list is | 40 ;; XEmacs; no need for custom-declare-variable-list, preloaded-file-list is |
41 ;; ordered to make it unnecessary. | 41 ;; ordered to make it unnecessary. |
42 | |
43 ;; XEmacs; this is here because we use it in backquote.el, so it needs to be | |
44 ;; available the first time a `(...) form is expanded. | |
45 (defun list* (first &rest rest) ; See compiler macro in cl-macs.el | |
46 "Return a new list with specified args as elements, cons'd to last arg. | |
47 Thus, `(list* A B C D)' is equivalent to `(nconc (list A B C) D)', or to | |
48 `(cons A (cons B (cons C D)))'." | |
49 (cond ((not rest) first) | |
50 ((not (cdr rest)) (cons first (car rest))) | |
51 (t (let* ((n (length rest)) | |
52 (copy (copy-sequence rest)) | |
53 (last (nthcdr (- n 2) copy))) | |
54 (setcdr last (car (cdr last))) | |
55 (cons first copy))))) | |
56 | 42 |
57 ;;;; Lisp language features. | 43 ;;;; Lisp language features. |
58 | 44 |
59 (defmacro lambda (&rest cdr) | 45 (defmacro lambda (&rest cdr) |
60 "Return a lambda expression. | 46 "Return a lambda expression. |