summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2014-10-29 22:15:28 -0700
committerGlenn Morris <rgm@gnu.org>2014-10-29 22:15:28 -0700
commit52b410c60aebeb769ec9580af25ca50df2a44751 (patch)
treeba5de0b896c5ea410ceb2f2f1866c0fac73ea236 /lisp/emacs-lisp
parentcc99f920f507d28bb1422f8a3d52723ddc734c8a (diff)
parent237bf45a48999d5a8a3617822dddf3ea305bc269 (diff)
downloademacs-52b410c60aebeb769ec9580af25ca50df2a44751.tar.gz
emacs-52b410c60aebeb769ec9580af25ca50df2a44751.tar.bz2
emacs-52b410c60aebeb769ec9580af25ca50df2a44751.zip
Merge from emacs-24; up to 117634
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/bytecomp.el23
-rw-r--r--lisp/emacs-lisp/cl-extra.el1
2 files changed, 15 insertions, 9 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 62de943f1be..392f6ee83cd 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -120,7 +120,11 @@
(require 'backquote)
(require 'macroexp)
(require 'cconv)
-(eval-when-compile (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 instead (bug#18804).
+(require 'cl-extra)
(or (fboundp 'defsubst)
;; This really ought to be loaded already!
@@ -3283,11 +3287,11 @@ If it is nil, then the handler is \"byte-compile-SYMBOL.\""
(byte-defop-compiler cons 2)
(byte-defop-compiler aref 2)
(byte-defop-compiler set 2)
-(byte-defop-compiler (= byte-eqlsign) 2) ;; -and bug#18767
-(byte-defop-compiler (< byte-lss) 2) ;; -and bug#18767
-(byte-defop-compiler (> byte-gtr) 2) ;; -and bug#18767
-(byte-defop-compiler (<= byte-leq) 2) ;; -and bug#18767
-(byte-defop-compiler (>= byte-geq) 2) ;; -and bug#18767
+(byte-defop-compiler (= byte-eqlsign) 2-and)
+(byte-defop-compiler (< byte-lss) 2-and)
+(byte-defop-compiler (> byte-gtr) 2-and)
+(byte-defop-compiler (<= byte-leq) 2-and)
+(byte-defop-compiler (>= byte-geq) 2-and)
(byte-defop-compiler get 2)
(byte-defop-compiler nth 2)
(byte-defop-compiler substring 2-3)
@@ -3354,13 +3358,14 @@ If it is nil, then the handler is \"byte-compile-SYMBOL.\""
(defun byte-compile-and-folded (form)
"Compile calls to functions like `<='.
These implicitly `and' together a bunch of two-arg bytecodes."
- ;; FIXME: bug#18767 means we can't do it this way!
(let ((l (length form)))
(cond
((< l 3) (byte-compile-form `(progn ,(nth 1 form) t)))
((= l 3) (byte-compile-two-args form))
- (t (byte-compile-form `(and (,(car form) ,(nth 1 form) ,(nth 2 form))
- (,(car form) ,@(nthcdr 2 form))))))))
+ ((cl-every #'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)))))
(defun byte-compile-three-args (form)
(if (not (= (length form) 4))
diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el
index a7970261608..b8b7b2c170b 100644
--- a/lisp/emacs-lisp/cl-extra.el
+++ b/lisp/emacs-lisp/cl-extra.el
@@ -720,4 +720,5 @@ including `cl-block' and `cl-eval-when'."
;; generated-autoload-file: "cl-loaddefs.el"
;; End:
+(provide 'cl-extra)
;;; cl-extra.el ends here