summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/bytecomp.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2018-03-22 18:18:26 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2018-03-22 18:18:26 -0400
commit97b7e58c4d34722e8b0eb73b3ed315fdc9671264 (patch)
tree9b5075b0e69f908393028ae2aac5e3985d286ed5 /lisp/emacs-lisp/bytecomp.el
parent86d6417bf15b7ad5717dec2112f8616f67b2c9d3 (diff)
downloademacs-97b7e58c4d34722e8b0eb73b3ed315fdc9671264.tar.gz
emacs-97b7e58c4d34722e8b0eb73b3ed315fdc9671264.tar.bz2
emacs-97b7e58c4d34722e8b0eb73b3ed315fdc9671264.zip
Try and fix the more obvious sources of bug#30635
* lisp/files.el (dir-locals-read-from-dir): Handle the easy cases without loading `map`. * lisp/emacs-lisp/bytecomp.el: Don't require cl-lib at run-time. (byte-compile-and-folded): Avoid cl-every.
Diffstat (limited to 'lisp/emacs-lisp/bytecomp.el')
-rw-r--r--lisp/emacs-lisp/bytecomp.el18
1 files changed, 6 insertions, 12 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index b3ea9300b01..07476f1ac96 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -124,17 +124,10 @@
(require 'backquote)
(require 'macroexp)
(require 'cconv)
-(require 'cl-lib)
-
-;; During bootstrap, cl-loaddefs.el is not created yet, so loading cl-lib
-;; doesn't setup autoloads for things like cl-every, which is why we have to
-;; require cl-extra as well (bug#18804).
-(or (fboundp 'cl-every)
- (require 'cl-extra))
-
-(or (fboundp 'defsubst)
- ;; This really ought to be loaded already!
- (load "byte-run"))
+;; Refrain from using cl-lib at run-time here, since it otherwise prevents
+;; us from emitting warnings when compiling files which use cl-lib without
+;; requiring it! (bug#30635)
+(eval-when-compile (require 'cl-lib))
;; The feature of compiling in a specific target Emacs version
;; has been turned off because compile time options are a bad idea.
@@ -3582,7 +3575,8 @@ These implicitly `and' together a bunch of two-arg bytecodes."
(cond
((< l 3) (byte-compile-form `(progn ,(nth 1 form) t)))
((= l 3) (byte-compile-two-args form))
- ((cl-every #'macroexp-copyable-p (nthcdr 2 form))
+ ;; Don't use `cl-every' here (see comment where we require cl-lib).
+ ((not (memq nil (mapcar #'macroexp-copyable-p (nthcdr 2 form))))
(byte-compile-form `(and (,(car form) ,(nth 1 form) ,(nth 2 form))
(,(car form) ,@(nthcdr 2 form)))))
(t (byte-compile-normal-call form)))))