Commits

Anonymous committed 61c640c

Refuse to attempt debug on entry for special forms.

  • Participants
  • Parent commits 8c63294

Comments (0)

Files changed (2)

+2009-01-11  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* debug.el (debug-on-entry): 
+	Refuse to attempt this for special forms. 
+
 2008-07-23  Norbert Koch  <viteno@xemacs.org>
 
 	* Makefile (VERSION): XEmacs package 2.18 released.
   (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.