# HG changeset patch # User Aidan Kehoe # Date 1300398634 0 # Node ID eac2e6bd5b2cd5226490ce691472729026bbb2b6 # Parent 4b529b940e2e8bcc623fed865ac1796132b99eaa Correct some minor problems in my last change. 2011-03-17 Aidan Kehoe * bytecomp.el (byte-compile-catch): * bytecomp.el (byte-compile-throw): Correct some minor problems in my last change. Happy St. Patrick's day, everyone! diff -r 4b529b940e2e -r eac2e6bd5b2c lisp/ChangeLog --- 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 + + * 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 * bytecomp.el (byte-compile-catch): diff -r 4b529b940e2e -r eac2e6bd5b2c lisp/bytecomp.el --- 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