Mercurial > hg > xemacs-beta
comparison lisp/subr.el @ 5281:aa20a889ff14
Remove a couple of redundant functions, backquote.el
2010-10-10 Aidan Kehoe <kehoea@parhasard.net>
* backquote.el (bq-vector-contents, bq-list*): Remove; the former
is equivalent to (append VECTOR nil), the latter to (list* ...).
(bq-process-2): Use (append VECTOR nil) instead of using
#'bq-vector-contents to convert to a list.
(bq-process-1): Now we use list* instead of bq-list
* subr.el (list*): Moved from cl.el, since it is now required to
be available the first time a backquoted form is encountered.
* cl.el (list*): Move to subr.el.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 10 Oct 2010 12:13:32 +0100 |
parents | 2157ecaedc1d |
children | d27c1ee1943b |
comparison
equal
deleted
inserted
replaced
5280:59a6419f7504 | 5281:aa20a889ff14 |
---|---|
64 (put macro 'edebug-form-spec (cadr d))) | 64 (put macro 'edebug-form-spec (cadr d))) |
65 (t | 65 (t |
66 (message "Unknown declaration %s" d))))) | 66 (message "Unknown declaration %s" d))))) |
67 | 67 |
68 (setq macro-declaration-function 'macro-declaration-function) | 68 (setq macro-declaration-function 'macro-declaration-function) |
69 | 69 |
70 ;; XEmacs; this is here because we use it in backquote.el, so it needs to be | |
71 ;; available the first time a `(...) form is expanded. | |
72 (defun list* (first &rest rest) ; See compiler macro in cl-macs.el | |
73 "Return a new list with specified args as elements, cons'd to last arg. | |
74 Thus, `(list* A B C D)' is equivalent to `(nconc (list A B C) D)', or to | |
75 `(cons A (cons B (cons C D)))'." | |
76 (cond ((not rest) first) | |
77 ((not (cdr rest)) (cons first (car rest))) | |
78 (t (let* ((n (length rest)) | |
79 (copy (copy-sequence rest)) | |
80 (last (nthcdr (- n 2) copy))) | |
81 (setcdr last (car (cdr last))) | |
82 (cons first copy))))) | |
70 | 83 |
71 ;;;; Lisp language features. | 84 ;;;; Lisp language features. |
72 | 85 |
73 (defmacro lambda (&rest cdr) | 86 (defmacro lambda (&rest cdr) |
74 "Return a lambda expression. | 87 "Return a lambda expression. |