diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2012-09-09 21:16:13 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2012-09-09 21:16:13 -0400 |
commit | 9b851e2550c1d627413ecc6c626a0dfe1bbbf33b (patch) | |
tree | 4f4d0ffa29a1e1f1128db5dde2bb2133bd387702 /lisp/emacs-lisp/cl-macs.el | |
parent | b8b0239fd0485002d1c761067c9047d1f26dbd4c (diff) | |
download | emacs-9b851e2550c1d627413ecc6c626a0dfe1bbbf33b.tar.gz emacs-9b851e2550c1d627413ecc6c626a0dfe1bbbf33b.tar.bz2 emacs-9b851e2550c1d627413ecc6c626a0dfe1bbbf33b.zip |
New emacs-lisp-byte-code-mode; misc minor changes.
* lisp/emacs-lisp/lisp-mode.el (emacs-list-byte-code-comment-re): New var.
(emacs-lisp-byte-code-comment)
(emacs-lisp-byte-code-syntax-propertize, emacs-lisp-byte-code-mode):
New functions.
(eval-sexp-add-defvars): Don't skip defvars in column >0.
(eval-defun-2): Remove bogus interactive spec.
(lisp-indent-line): Remove redundant whole-exp code, now done in
indent-according-to-mode.
(save-match-data): Remove redundant indent data.
* lisp/emacs-lisp/benchmark.el (benchmark-run, benchmark-run-compiled):
Use `declare'.
* lisp/gnus/qp.el (quoted-printable-decode-region):
Inline+CSE+strength-reduction.
Diffstat (limited to 'lisp/emacs-lisp/cl-macs.el')
-rw-r--r-- | lisp/emacs-lisp/cl-macs.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 312c37261e2..16ac14f8fe9 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -1463,8 +1463,15 @@ Valid clauses are: cl--loop-accum-var)))) (defun cl--loop-build-ands (clauses) + "Return various representations of (and . CLAUSES). +CLAUSES is a list of Elisp expressions, where clauses of the form +\(progn E1 E2 E3 .. t) are the focus of particular optimizations. +The return value has shape (COND BODY COMBO) +such that COMBO is equivalent to (and . CLAUSES)." (let ((ands nil) (body nil)) + ;; Look through `clauses', trying to optimize (progn ,@A t) (progn ,@B) ,@C + ;; into (progn ,@A ,@B) ,@C. (while clauses (if (and (eq (car-safe (car clauses)) 'progn) (eq (car (last (car clauses))) t)) @@ -1475,6 +1482,7 @@ Valid clauses are: (cl-cdadr clauses) (list (cadr clauses)))) (cddr clauses))) + ;; A final (progn ,@A t) is moved outside of the `and'. (setq body (cdr (butlast (pop clauses))))) (push (pop clauses) ands))) (setq ands (or (nreverse ands) (list t))) |