mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 22:41:06 -08:00
Use 'any' and 'all' to simplify parts of the byte-compiler
* lisp/emacs-lisp/byte-opt.el (byte-opt--nary-comparison) (byte-optimize-constant-args, byte-optimize-member) (byte-optimize-append): * lisp/emacs-lisp/bytecomp.el (byte-compile-warnings) (byte-compile-out-toplevel): * lisp/emacs-lisp/cconv.el (cconv-convert): Replace various hand-written 'any' and 'all' expressions with calls to the new functions, for readability and speed.
This commit is contained in:
parent
4a39e46d9c
commit
bcc88bc5c2
3 changed files with 27 additions and 34 deletions
|
|
@ -372,9 +372,7 @@ for the Emacs build itself.")
|
|||
|
||||
;;;###autoload
|
||||
(put 'byte-compile-warnings 'safe-local-variable
|
||||
(lambda (v)
|
||||
(or (symbolp v)
|
||||
(null (delq nil (mapcar (lambda (x) (not (symbolp x))) v))))))
|
||||
(lambda (v) (or (symbolp v) (all #'symbolp v))))
|
||||
|
||||
;;;###autoload
|
||||
(defun byte-compile-warning-enabled-p (warning &optional symbol)
|
||||
|
|
@ -3344,7 +3342,7 @@ lambda-expression."
|
|||
(cons (nth 1 (car body)) (cdr body))
|
||||
(cons tmp body))))
|
||||
(or (eq output-type 'file)
|
||||
(not (delq nil (mapcar 'consp (cdr (car body))))))))
|
||||
(not (any #'consp (cdr (car body)))))))
|
||||
(setq rest (cdr rest)))
|
||||
rest))
|
||||
(let ((byte-compile-vector (byte-compile-constants-vector)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue