diff options
| author | Stefan Monnier <monnier@iro.umontreal.ca> | 2013-06-20 16:01:51 -0400 |
|---|---|---|
| committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2013-06-20 16:01:51 -0400 |
| commit | aff6371e3281f4da696093806b1658cb48670a76 (patch) | |
| tree | a717343bdf3ad629de46a3bf9255b834dfea7e9b /lisp/emacs-lisp/cl-macs.el | |
| parent | 1fc7100890ced39f81a822661439b1f7030df5a1 (diff) | |
| download | emacs-aff6371e3281f4da696093806b1658cb48670a76.tar.gz | |
* lisp/emacs-lisp/cl-loaddefs.el: Don't version-control any more.
* lisp/emacs-lisp/cl-lib.el: Load cl-macs when cl-loaddefs is not
yet available.
* lisp/Makefile.in (AUTOGEN_VCS): Move cl-loaddefs.el...
(AUTOGENEL): ... here.
* lisp/emacs-lisp/cl-macs.el (cl--sublis): New function.
(cl--defsubst-expand): Use it.
* .bzrignore: Don't unignore cl-loaddefs.el.
Diffstat (limited to 'lisp/emacs-lisp/cl-macs.el')
| -rw-r--r-- | lisp/emacs-lisp/cl-macs.el | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 34957d86796..384aa18e153 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -2739,9 +2739,17 @@ surrounded by (cl-block NAME ...). (setq body (cond ((null substs) body) ((null (cdr substs)) (cl-subst (cdar substs) (caar substs) body)) - (t (cl-sublis substs body)))) + (t (cl--sublis substs body)))) (if lets `(let ,lets ,body) body)))) +(defun cl--sublis (alist tree) + "Perform substitutions indicated by ALIST in TREE (non-destructively)." + (let ((x (assq tree alist))) + (cond + (x (cdr x)) + ((consp tree) + (cons (cl--sublis alist (car tree)) (cl--sublis alist (cdr tree)))) + (t tree)))) ;; Compile-time optimizations for some functions defined in this package. |
