commit: Fix a bug in my last commit, symbol macros that expand to themselves hang.

Aidan Kehoe kehoea at parhasard.net
Mon Jun 20 03:05:51 EDT 2011


changeset:   5525:2a6a8da4dd7c
tag:         tip
user:        Aidan Kehoe <kehoea at parhasard.net>
date:        Sun Jun 19 19:47:13 2011 +0100
files:       lisp/ChangeLog lisp/cl-macs.el
description:
Fix a bug in my last commit, symbol macros that expand to themselves hang.

2011-06-19  Aidan Kehoe  <kehoea at parhasard.net>

	* cl-macs.el (cl-defsubst-expand):
	It is occasionally the case that the symbol naming the argument
	co-incides with the value that it is replacing; in that case,
	using the symbol macro is counterproductive and hangs XEmacs (as
	does analogous code in SBCL), so don't.


diff -r e05d98bf9644 -r 2a6a8da4dd7c lisp/ChangeLog
--- a/lisp/ChangeLog	Sun Jun 19 19:15:52 2011 +0100
+++ b/lisp/ChangeLog	Sun Jun 19 19:47:13 2011 +0100
@@ -1,3 +1,11 @@
+2011-06-19  Aidan Kehoe  <kehoea at parhasard.net>
+
+	* cl-macs.el (cl-defsubst-expand):
+	It is occasionally the case that the symbol naming the argument
+	co-incides with the value that it is replacing; in that case,
+	using the symbol macro is counterproductive and hangs XEmacs (as
+	does analogous code in SBCL), so don't.
+
 2011-06-19  Aidan Kehoe  <kehoea at parhasard.net>
 
 	* behavior.el (enable-behavior):
diff -r e05d98bf9644 -r 2a6a8da4dd7c lisp/cl-macs.el
--- a/lisp/cl-macs.el	Sun Jun 19 19:15:52 2011 +0100
+++ b/lisp/cl-macs.el	Sun Jun 19 19:47:13 2011 +0100
@@ -3223,7 +3223,9 @@
     (let* ((symbol-macros nil)
            (lets (mapcan #'(lambda (argn argv)
                              (if (or simple (cl-const-expr-p argv))
-                                 (progn (push (list argn argv) symbol-macros)
+                                 (progn (or (eq argn argv)
+					    (push (list argn argv)
+						  symbol-macros))
                                         (and unsafe (list (list argn argv))))
                                (list (list argn argv))))
                          argns argvs)))



More information about the XEmacs-Patches mailing list