changeset 5377:eac2e6bd5b2c

Correct some minor problems in my last change. 2011-03-17 Aidan Kehoe <kehoea@parhasard.net> * bytecomp.el (byte-compile-catch): * bytecomp.el (byte-compile-throw): Correct some minor problems in my last change. Happy St. Patrick's day, everyone!
author Aidan Kehoe <kehoea@parhasard.net>
date Thu, 17 Mar 2011 21:50:34 +0000
parents 4b529b940e2e
children 4f0a1f4cc111
files lisp/ChangeLog lisp/bytecomp.el
diffstat 2 files changed, 17 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Thu Mar 17 21:07:16 2011 +0000
+++ b/lisp/ChangeLog	Thu Mar 17 21:50:34 2011 +0000
@@ -1,3 +1,10 @@
+2011-03-17  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* bytecomp.el (byte-compile-catch):
+	* bytecomp.el (byte-compile-throw):
+	Correct some minor problems in my last change. Happy St. Patrick's
+	day, everyone!
+
 2011-03-17  Aidan Kehoe  <kehoea@parhasard.net>
 
 	* bytecomp.el (byte-compile-catch):
--- a/lisp/bytecomp.el	Thu Mar 17 21:07:16 2011 +0000
+++ b/lisp/bytecomp.el	Thu Mar 17 21:50:34 2011 +0000
@@ -4209,7 +4209,7 @@
 	    byte-compile-active-blocks))
 	 (body
 	  (byte-compile-top-level (cons 'progn (cddr form))
-				  (and elt for-effect))))
+                                  (and (not elt) for-effect))))
     (if (and elt (not (cdr elt)))
 	;; A lexical block without any contained return-from clauses:
 	(byte-compile-form body)
@@ -4371,16 +4371,17 @@
     ;; corresponding block as having been referenced.
     (let* ((symbol (car-safe (cdr-safe (nth 1 form))))
            (not-present '#:not-present)
-	   (block (and symbol (symbolp symbol)
-                       (get symbol 'cl-block-name not-present)))
+	   (block (if (and symbol (symbolp symbol))
+		      (get symbol 'cl-block-name not-present)
+		    not-present))
 	   (assq (and (not (eq block not-present))
                       (assq block byte-compile-active-blocks))))
-      (when assq
-        (setcdr assq t))
-       (when (not (eq block not-present))
-         ;; No corresponding enclosing block.
-         (byte-compile-warn "return-from: no enclosing block named `%s'"
-                            block)))
+      (if assq
+	  (setcdr assq t)
+	(if (not (eq block not-present))
+	    ;; No corresponding enclosing block.
+	    (byte-compile-warn "return-from: no enclosing block named `%s'"
+			       block))))
     (mapc 'byte-compile-form (cdr form))  ;; Push the arguments
     (byte-compile-out (get (car form) 'byte-opcode) 0)
     (pushnew '(null (function-max-args 'throw)) byte-compile-checks-on-load