[COMMIT] Refuse to attempt debug on entry for special forms.

Aidan Kehoe kehoea at parhasard.net
Sun Jan 11 07:47:07 EST 2009


APPROVE COMMIT

NOTE: This patch has been committed.

xemacs-packages/xemacs-base/ChangeLog addition:

2009-01-11  Aidan Kehoe  <kehoea at parhasard.net>

	* debug.el (debug-on-entry): 
	Refuse to attempt this for special forms. 


XEmacs Packages source patch:
Diff command:   cvs -q diff -Nu
Files affected: xemacs-packages/xemacs-base/debug.el
===================================================================
RCS

Index: xemacs-packages/xemacs-base/debug.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/xemacs-base/debug.el,v
retrieving revision 1.6
diff -u -u -r1.6 debug.el
--- xemacs-packages/xemacs-base/debug.el	2006/03/16 07:11:50	1.6
+++ xemacs-packages/xemacs-base/debug.el	2009/01/11 12:45:26
@@ -682,10 +682,12 @@
   (interactive "aDebug on entry (to function): ")
   (debugger-reenable)
   ;; Handle a function that has been aliased to some other function.
-  ;; #### We have no way of determining if a subr is unevalled
-;   (if (and (subrp (symbol-function function))
-; 	   (eq (cdr (subr-arity (symbol-function function))) 'unevalled))
-;       (error "Function %s is a special form" function))
+  (if (and (subrp (symbol-function function))
+           ;; XEmacs change; 21.4 has no way of checking if a subr is a
+           ;; special form, early 21.5 does not have #'subr-arity. 
+           (fboundp 'special-form-p)
+           (special-form-p (symbol-function function)))
+      (error "Function %s is a special form" function))
   (if (or (symbolp (symbol-function function))
 	  (subrp (symbol-function function)))
       ;; Create a wrapper in which we can then add the necessary debug call.

-- 
¿Dónde estará ahora mi sobrino Yoghurtu Nghe, que tuvo que huir
precipitadamente de la aldea por culpa de la escasez de rinocerontes?




More information about the XEmacs-Patches mailing list