]> git.eshelyaron.com Git - emacs.git/commitdiff
Byte compile cond clauses without any bodies correctly.
authorVibhav Pant <vibhavp@gmail.com>
Thu, 9 Mar 2017 18:39:58 +0000 (00:09 +0530)
committerVibhav Pant <vibhavp@gmail.com>
Thu, 9 Mar 2017 18:52:35 +0000 (00:22 +0530)
* lisp/emacs-lisp/bytecomp.el (byte-compile-cond-jump-table): When a
cond clause has no body, push t on to the stack.

lisp/emacs-lisp/bytecomp.el

index 25513bd02487646c95f31daaa64be7ab163f9050..7cbef8e43405112f6a0c981d5c6a0d53592827f2 100644 (file)
@@ -4128,7 +4128,9 @@ Return a list of the form ((TEST . VAR)  ((VALUE BODY) ...))"
           ;; depth/tag conflicts or violating asserts down the road.
           ;; To make sure `byte-compile-body' itself doesn't violate this,
           ;; we use `cl-assert'.
-          (byte-compile-body body byte-compile--for-effect)
+          (if (null body)
+              (byte-compile-form t byte-compile--for-effect)
+            (byte-compile-body body byte-compile--for-effect))
           (cl-assert (or (= byte-compile-depth init-depth)
                          (= byte-compile-depth (1+ init-depth))))
           (byte-compile-goto 'byte-goto donetag)