diff options
| author | Richard M. Stallman | 1996-09-24 06:54:18 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1996-09-24 06:54:18 +0000 |
| commit | 1e3ab67be50df67c5a37f9e1db2d347985a0fac5 (patch) | |
| tree | b305e7af4a2c0d44f2955879516b8ec6cd1e297e | |
| parent | a53e4a8bf6ac66829618eeb737548aee3c38a1f6 (diff) | |
| download | emacs-1e3ab67be50df67c5a37f9e1db2d347985a0fac5.tar.gz emacs-1e3ab67be50df67c5a37f9e1db2d347985a0fac5.zip | |
(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.
| -rw-r--r-- | lisp/emacs-lisp/edebug.el | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index 2b5653e072a..52dbb67a862 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | ;; LCD Archive Entry: | 8 | ;; LCD Archive Entry: |
| 9 | ;; edebug|Daniel LaLiberte|liberte@cs.uiuc.edu | 9 | ;; edebug|Daniel LaLiberte|liberte@cs.uiuc.edu |
| 10 | ;; |A source level debugger for Emacs Lisp. | 10 | ;; |A source level debugger for Emacs Lisp. |
| 11 | ;; |$Date: 1996/07/24 16:36:41 $|$Revision: 3.8 $|~/modes/edebug.el| | 11 | ;; |$Date: 1996/09/23 04:39:19 $|$Revision: 3.9 $|~/modes/edebug.el| |
| 12 | 12 | ||
| 13 | ;; This file is part of GNU Emacs. | 13 | ;; This file is part of GNU Emacs. |
| 14 | 14 | ||
| @@ -85,7 +85,7 @@ | |||
| 85 | ;;; Code: | 85 | ;;; Code: |
| 86 | 86 | ||
| 87 | (defconst edebug-version | 87 | (defconst edebug-version |
| 88 | (let ((raw-version "$Revision: 3.8 $")) | 88 | (let ((raw-version "$Revision: 3.9 $")) |
| 89 | (substring raw-version (string-match "[0-9.]*" raw-version) | 89 | (substring raw-version (string-match "[0-9.]*" raw-version) |
| 90 | (match-end 0)))) | 90 | (match-end 0)))) |
| 91 | 91 | ||
| @@ -2200,10 +2200,6 @@ expressions; a `progn' form will be returned enclosing these forms." | |||
| 2200 | 2200 | ||
| 2201 | ;;; Handling signals | 2201 | ;;; Handling signals |
| 2202 | 2202 | ||
| 2203 | (if (not (fboundp 'edebug-original-signal)) | ||
| 2204 | (defalias 'edebug-original-signal (symbol-function 'signal))) | ||
| 2205 | ;; We should use advise for this!! | ||
| 2206 | |||
| 2207 | (defun edebug-signal (edebug-signal-name edebug-signal-data) | 2203 | (defun edebug-signal (edebug-signal-name edebug-signal-data) |
| 2208 | "Signal an error. Args are SIGNAL-NAME, and associated DATA. | 2204 | "Signal an error. Args are SIGNAL-NAME, and associated DATA. |
| 2209 | A signal name is a symbol with an `error-conditions' property | 2205 | A signal name is a symbol with an `error-conditions' property |
| @@ -2223,8 +2219,7 @@ error is signaled again." | |||
| 2223 | (edebug 'error (cons edebug-signal-name edebug-signal-data))) | 2219 | (edebug 'error (cons edebug-signal-name edebug-signal-data))) |
| 2224 | ;; If we reach here without another non-local exit, then send signal again. | 2220 | ;; If we reach here without another non-local exit, then send signal again. |
| 2225 | ;; i.e. the signal is not continuable, yet. | 2221 | ;; i.e. the signal is not continuable, yet. |
| 2226 | (edebug-original-signal edebug-signal-name edebug-signal-data)) | 2222 | (signal edebug-signal-name edebug-signal-data)) |
| 2227 | |||
| 2228 | 2223 | ||
| 2229 | ;;; Entering Edebug | 2224 | ;;; Entering Edebug |
| 2230 | 2225 | ||
| @@ -2267,6 +2262,8 @@ error is signaled again." | |||
| 2267 | (executing-kbd-macro | 2262 | (executing-kbd-macro |
| 2268 | (if edebug-continue-kbd-macro executing-kbd-macro)) | 2263 | (if edebug-continue-kbd-macro executing-kbd-macro)) |
| 2269 | 2264 | ||
| 2265 | (signal-hook-function 'edebug-signal) | ||
| 2266 | |||
| 2270 | ;; Disable command hooks. This is essential when | 2267 | ;; Disable command hooks. This is essential when |
| 2271 | ;; a hook function is instrumented - to avoid infinite loop. | 2268 | ;; a hook function is instrumented - to avoid infinite loop. |
| 2272 | ;; This may be more than we need, however. | 2269 | ;; This may be more than we need, however. |
| @@ -2276,11 +2273,7 @@ error is signaled again." | |||
| 2276 | edebug-initial-mode | 2273 | edebug-initial-mode |
| 2277 | edebug-execution-mode) | 2274 | edebug-execution-mode) |
| 2278 | edebug-next-execution-mode nil) | 2275 | edebug-next-execution-mode nil) |
| 2279 | ;; Bind signal to edebug-signal only while Edebug is active. | 2276 | (edebug-enter edebug-function edebug-args edebug-body)) |
| 2280 | (fset 'signal 'edebug-signal) | ||
| 2281 | (unwind-protect | ||
| 2282 | (edebug-enter edebug-function edebug-args edebug-body) | ||
| 2283 | (fset 'signal (symbol-function 'edebug-original-signal)))) | ||
| 2284 | ;; Reset global variables in case outside value was changed. | 2277 | ;; Reset global variables in case outside value was changed. |
| 2285 | (setq executing-kbd-macro edebug-outside-executing-macro | 2278 | (setq executing-kbd-macro edebug-outside-executing-macro |
| 2286 | pre-command-hook edebug-outside-pre-command-hook | 2279 | pre-command-hook edebug-outside-pre-command-hook |
| @@ -2863,14 +2856,14 @@ MSG is printed after `::::} '." | |||
| 2863 | (message "Break")) | 2856 | (message "Break")) |
| 2864 | 2857 | ||
| 2865 | (setq buffer-read-only t) | 2858 | (setq buffer-read-only t) |
| 2866 | (fset 'signal (symbol-function 'edebug-original-signal)) | 2859 | (setq signal-hook-function nil) |
| 2867 | 2860 | ||
| 2868 | (edebug-mode) | 2861 | (edebug-mode) |
| 2869 | (unwind-protect | 2862 | (unwind-protect |
| 2870 | (recursive-edit) ; <<<<<<<<<< Recursive edit | 2863 | (recursive-edit) ; <<<<<<<<<< Recursive edit |
| 2871 | 2864 | ||
| 2872 | ;; Do the following, even if quit occurs. | 2865 | ;; Do the following, even if quit occurs. |
| 2873 | (fset 'signal 'edebug-signal) | 2866 | (setq signal-hook-function 'edebug-signal) |
| 2874 | (if edebug-backtrace-buffer | 2867 | (if edebug-backtrace-buffer |
| 2875 | (kill-buffer edebug-backtrace-buffer)) | 2868 | (kill-buffer edebug-backtrace-buffer)) |
| 2876 | ;; Could be an option to keep eval display up. | 2869 | ;; Could be an option to keep eval display up. |
| @@ -4478,7 +4471,6 @@ Print result in minibuffer." | |||
| 4478 | edebug-sit-for | 4471 | edebug-sit-for |
| 4479 | edebug-prin1-to-string | 4472 | edebug-prin1-to-string |
| 4480 | edebug-format | 4473 | edebug-format |
| 4481 | edebug-original-signal | ||
| 4482 | ;; lemacs | 4474 | ;; lemacs |
| 4483 | zmacs-deactivate-region | 4475 | zmacs-deactivate-region |
| 4484 | popup-menu | 4476 | popup-menu |