Mercurial > emacs
comparison lisp/emacs-lisp/debug.el @ 6567:baf8fe0c51e3
(debug): Behave sensibly if pop-up-frames is set.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Tue, 29 Mar 1994 02:20:04 +0000 |
parents | b0c731997544 |
children | 027b7de8a571 |
comparison
equal
deleted
inserted
replaced
6566:248eede22658 | 6567:baf8fe0c51e3 |
---|---|
58 (let (debugger-value | 58 (let (debugger-value |
59 (debugger-match-data (match-data)) | 59 (debugger-match-data (match-data)) |
60 (debug-on-error nil) | 60 (debug-on-error nil) |
61 (debug-on-quit nil) | 61 (debug-on-quit nil) |
62 (debugger-buffer (let ((default-major-mode 'fundamental-mode)) | 62 (debugger-buffer (let ((default-major-mode 'fundamental-mode)) |
63 (generate-new-buffer "*Backtrace*"))) | 63 (get-buffer-create "*Backtrace*"))) |
64 (debugger-old-buffer (current-buffer)) | 64 (debugger-old-buffer (current-buffer)) |
65 (debugger-step-after-exit nil) | 65 (debugger-step-after-exit nil) |
66 ;; Don't keep reading from an executing kbd macro! | 66 ;; Don't keep reading from an executing kbd macro! |
67 (executing-macro nil) | 67 (executing-macro nil) |
68 ;; Save the outer values of these vars for the `e' command | 68 ;; Save the outer values of these vars for the `e' command |
134 (let ((inhibit-trace t) | 134 (let ((inhibit-trace t) |
135 (standard-output nil) | 135 (standard-output nil) |
136 (buffer-read-only t)) | 136 (buffer-read-only t)) |
137 (message "") | 137 (message "") |
138 (recursive-edit)))) | 138 (recursive-edit)))) |
139 ;; So that users do not try to execute debugger commands | 139 ;; Kill or at least neuter the backtrace buffer, so that users |
140 ;; in an invalid context | 140 ;; don't try to execute debugger commands in an invalid context. |
141 (kill-buffer debugger-buffer) | 141 (if (get-buffer-window debugger-buffer 'visible) |
142 ;; Still visible despite the save-window-excursion? Maybe it | |
143 ;; it's in a pop-up frame. It would be annoying to delete and | |
144 ;; recreate it every time the debugger stops, so instead we'll | |
145 ;; erase it but leave it visible. | |
146 (save-excursion | |
147 (set-buffer debugger-buffer) | |
148 (erase-buffer) | |
149 (fundamental-mode)) | |
150 (kill-buffer debugger-buffer)) | |
142 (store-match-data debugger-match-data))) | 151 (store-match-data debugger-match-data))) |
143 ;; Put into effect the modified values of these variables | 152 ;; Put into effect the modified values of these variables |
144 ;; in case the user set them with the `e' command. | 153 ;; in case the user set them with the `e' command. |
145 (setq track-mouse debugger-outer-track-mouse) | 154 (setq track-mouse debugger-outer-track-mouse) |
146 (setq last-command debugger-outer-last-command) | 155 (setq last-command debugger-outer-last-command) |