changeset 16308:2334a3d634c0

(edebug-original-signal): Don't define it. (edebug-signal): Call signal, not edebug-original-signal. (edebug-enter): Bind signal-hook-function instead of fsetting signal. (edebug-recursive-edit): Clear or clear signal-hook-function.
author Richard M. Stallman <rms@gnu.org>
date Tue, 24 Sep 1996 06:54:18 +0000
parents 3c75845250f0
children fea88c3fb20c
files lisp/emacs-lisp/edebug.el
diffstat 1 files changed, 8 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/edebug.el	Tue Sep 24 04:50:39 1996 +0000
+++ b/lisp/emacs-lisp/edebug.el	Tue Sep 24 06:54:18 1996 +0000
@@ -8,7 +8,7 @@
 ;; LCD Archive Entry:
 ;; edebug|Daniel LaLiberte|liberte@cs.uiuc.edu
 ;; |A source level debugger for Emacs Lisp.
-;; |$Date: 1996/07/24 16:36:41 $|$Revision: 3.8 $|~/modes/edebug.el|
+;; |$Date: 1996/09/23 04:39:19 $|$Revision: 3.9 $|~/modes/edebug.el|
 
 ;; This file is part of GNU Emacs.
 
@@ -85,7 +85,7 @@
 ;;; Code:
 
 (defconst edebug-version
-  (let ((raw-version "$Revision: 3.8 $"))
+  (let ((raw-version "$Revision: 3.9 $"))
     (substring raw-version (string-match "[0-9.]*" raw-version)
 	       (match-end 0))))
      
@@ -2200,10 +2200,6 @@
 
 ;;; Handling signals
 
-(if (not (fboundp 'edebug-original-signal))
-    (defalias 'edebug-original-signal (symbol-function 'signal)))
-;; We should use advise for this!!
-
 (defun edebug-signal (edebug-signal-name edebug-signal-data)
   "Signal an error.  Args are SIGNAL-NAME, and associated DATA.
 A signal name is a symbol with an `error-conditions' property
@@ -2223,8 +2219,7 @@
       (edebug 'error (cons edebug-signal-name edebug-signal-data)))
   ;; If we reach here without another non-local exit, then send signal again.
   ;; i.e. the signal is not continuable, yet.
-  (edebug-original-signal edebug-signal-name edebug-signal-data))
-  
+  (signal edebug-signal-name edebug-signal-data))
 
 ;;; Entering Edebug
 
@@ -2267,6 +2262,8 @@
 		  (executing-kbd-macro 
 		   (if edebug-continue-kbd-macro executing-kbd-macro))
 
+		  (signal-hook-function 'edebug-signal)
+
 		  ;; Disable command hooks.  This is essential when
 		  ;; a hook function is instrumented - to avoid infinite loop.
 		  ;; This may be more than we need, however.
@@ -2276,11 +2273,7 @@
 					      edebug-initial-mode 
 					      edebug-execution-mode)
 		    edebug-next-execution-mode nil)
-	      ;; Bind signal to edebug-signal only while Edebug is active.
-	      (fset 'signal 'edebug-signal)
-	      (unwind-protect
-		  (edebug-enter edebug-function edebug-args edebug-body)
-		(fset 'signal (symbol-function 'edebug-original-signal))))
+	      (edebug-enter edebug-function edebug-args edebug-body))
 	  ;; Reset global variables in case outside value was changed.
 	  (setq executing-kbd-macro edebug-outside-executing-macro
 		pre-command-hook edebug-outside-pre-command-hook
@@ -2863,14 +2856,14 @@
 	      (message "Break"))
 
 	  (setq buffer-read-only t)
-	  (fset 'signal (symbol-function 'edebug-original-signal))
+	  (setq signal-hook-function nil)
 
 	  (edebug-mode)
 	  (unwind-protect
 	      (recursive-edit)		;  <<<<<<<<<< Recursive edit
 
 	    ;; Do the following, even if quit occurs.
-	    (fset 'signal 'edebug-signal)
+	    (setq signal-hook-function 'edebug-signal)
 	    (if edebug-backtrace-buffer
 		(kill-buffer edebug-backtrace-buffer))
 	    ;; Could be an option to keep eval display up.
@@ -4478,7 +4471,6 @@
      edebug-sit-for
      edebug-prin1-to-string 
      edebug-format
-     edebug-original-signal
      ;; lemacs
      zmacs-deactivate-region
      popup-menu