mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-03-15 11:21:19 -07:00
A trivial optimization and a formatting fix
* lisp/subr.el (internal--compiler-macro-cXXr): Re-use `head' for `n'. Fix indentation and line length.
This commit is contained in:
parent
5e40c5a3be
commit
6f5f2ebfb4
1 changed files with 3 additions and 3 deletions
|
|
@ -540,12 +540,12 @@ i.e., subtract 2 * `most-negative-fixnum' from VALUE before shifting it."
|
|||
;; you may want to amend the other, too.
|
||||
(defun internal--compiler-macro-cXXr (form x)
|
||||
(let* ((head (car form))
|
||||
(n (symbol-name (car form)))
|
||||
(n (symbol-name head))
|
||||
(i (- (length n) 2)))
|
||||
(if (not (string-match "c[ad]+r\\'" n))
|
||||
(if (and (fboundp head) (symbolp (symbol-function head)))
|
||||
(internal--compiler-macro-cXXr (cons (symbol-function head) (cdr form))
|
||||
x)
|
||||
(internal--compiler-macro-cXXr
|
||||
(cons (symbol-function head) (cdr form)) x)
|
||||
(error "Compiler macro for cXXr applied to non-cXXr form"))
|
||||
(while (> i (match-beginning 0))
|
||||
(setq x (list (if (eq (aref n i) ?a) 'car 'cdr) x))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue