Commit 6f5f2ebf authored by Sam Steingold's avatar Sam Steingold
Browse files

A trivial optimization and a formatting fix

* lisp/subr.el (internal--compiler-macro-cXXr): Re-use `head' for `n'.
Fix indentation and line length.
parent 5e40c5a3
Pipeline #18717 failed with stages
in 132 minutes and 15 seconds
......@@ -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))
(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))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment