Ar an deichiú lá de mí Méan Fómhair, scríobh Stephen J. Turnbull:
[...]
OK, I’ve reproduced, and committed the below. Thank you both!
APPROVE COMMIT
NOTE: This patch has been committed.
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1315657049 -3600
# Node ID d19b6e3bdf91e4e1f99857e9973c86fa2bebb40c
# Parent b039c0f018b81507efbf95589e9ad11eaae6d45f
#'cl-defsubst-expand; avoid mutually-recursive symbol macros.
lisp/ChangeLog addition:
2011-09-10 Aidan Kehoe <kehoea(a)parhasard.net>
* cl-macs.el (cl-defsubst-expand):
Change set 2a6a8da4dd7c of
http://mid.gmane.org/19966.17522.332164.615228@parhasard.net
wasn't sufficiently comprehensive, symbol macros can be mutually
rather than simply recursive, and they can equally hang. Thanks
for the bug report, Michael Sperber, and for the test case,
Stephen Turnbull.
diff -r b039c0f018b8 -r d19b6e3bdf91 lisp/ChangeLog
--- a/lisp/ChangeLog Fri Sep 09 22:50:31 2011 +0100
+++ b/lisp/ChangeLog Sat Sep 10 13:17:29 2011 +0100
@@ -1,3 +1,13 @@
+2011-09-10 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * cl-macs.el (cl-defsubst-expand):
+ Change set 2a6a8da4dd7c of
+
http://mid.gmane.org/19966.17522.332164.615228@parhasard.net
+ wasn't sufficiently comprehensive, symbol macros can be mutually
+ rather than simply recursive, and they can equally hang. Thanks
+ for the bug report, Michael Sperber, and for the test case,
+ Stephen Turnbull.
+
2011-09-09 Aidan Kehoe <kehoea(a)parhasard.net>
* bytecomp.el (byte-compile-from-buffer):
diff -r b039c0f018b8 -r d19b6e3bdf91 lisp/cl-macs.el
--- a/lisp/cl-macs.el Fri Sep 09 22:50:31 2011 +0100
+++ b/lisp/cl-macs.el Sat Sep 10 13:17:29 2011 +0100
@@ -3236,10 +3236,20 @@
(let* ((symbol-macros nil)
(lets (mapcan #'(lambda (argn argv)
(if (or simple (cl-const-expr-p argv))
- (progn (or (eq argn argv)
- (push (list argn argv)
- symbol-macros))
- (and unsafe (list (list argn argv))))
+ (progn
+ ;; Avoid infinite loop on symbol macro
+ ;; expansion, make sure none of the argvs
+ ;; refer to the symbols in the argns.
+ (or (block find
+ ;; Can't use cl-expr-contains, that
+ ;; doesn't descend lambdas:
+ (subst nil argn argvs :test
+ #'(lambda (elt tree)
+ (if (eq elt tree)
+ (return-from find t))))
+ nil)
+ (push (list argn argv) symbol-macros))
+ (and unsafe (list (list argn argv))))
(list (list argn argv))))
argns argvs)))
`(let ,lets
--
‘Iodine deficiency was endemic in parts of the UK until, through what has been
described as “an unplanned and accidental public health triumph”, iodine was
added to cattle feed to improve milk production in the 1930s.’
(EN Pearce, Lancet, June 2011)
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta