emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 0920713: Byte compile cond clauses without any bodi


From: Vibhav Pant
Subject: [Emacs-diffs] master 0920713: Byte compile cond clauses without any bodies correctly.
Date: Thu, 9 Mar 2017 13:54:41 -0500 (EST)

branch: master
commit 092071345f265efcd3abd6de01552ebe95ffb9a1
Author: Vibhav Pant <address@hidden>
Commit: Vibhav Pant <address@hidden>

    Byte compile cond clauses without any bodies correctly.
    
    * 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 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 25513bd..7cbef8e 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]