Mercurial > hg > xemacs-beta
comparison lisp/cmdloop.el @ 1123:37bdd24225ef
[xemacs-hg @ 2002-11-27 07:15:02 by ben]
bug fixes, profiling debugging improvements
configure.in: Check for GCC version and only use -Wpacked in v3.
.cvsignore: Add .idb, .ilk for MS Windows VC++.
cl-macs.el: Document better.
cmdloop.el: Removed.
Remove nonworking breakpoint-on-error now that debug-on-error
works as documented.
help.el: Extract out with-displaying-help-buffer into a more general
mechanism.
lib-complete.el: Support thunks in find-library-source-path.
startup.el: Don't catch errors when noninteractive, because that makes
stack traces from stack-trace-on-error useless.
.cvsignore: Windows shit.
alloc.c: Better redisplay-related assert.
elhash.c: Comment change.
eval.c: Don't generate large warning strings (e.g. backtraces) when they will
be discarded.
Implement debug-on-error as documented -- it will enter the
debugger and crash when an uncaught signal happens noninteractively
and we are --debug.
Better redisplay-related asserts.
frame-msw.c, frame.c, lisp.h, redisplay.c, scrollbar-gtk.c, scrollbar-x.c, signal.c, sysdep.c: Fix up documentation related to QUIT (which CANNOT garbage-collect
under any circumstances), and to redisplay critical sections.
lread.c: Add load-ignore-out-of-date-elc-files,
load-always-display-messages, load-show-full-path-in-messages for
more robust package compilation and debugging.
profile.c: Overhaul profile code. Change format to include call count and be
extensible for further info. Remove call-count-profile-table.
Add set-profiling-info. See related profile.el changes (which
SHOULD ABSOLUTELY be in the core! Get rid of xemacs-devel and
xemacs-base packages *yesterday*!).
author | ben |
---|---|
date | Wed, 27 Nov 2002 07:15:36 +0000 |
parents | 943eaba38521 |
children | 1b0339b048ce |
comparison
equal
deleted
inserted
replaced
1122:7abc2b15a990 | 1123:37bdd24225ef |
---|---|
1 ;;; cmdloop.el --- support functions for the top-level command loop. | 1 ;;; cmdloop.el --- support functions for the top-level command loop. |
2 | 2 |
3 ;; Copyright (C) 1992-4, 1997 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1992-4, 1997 Free Software Foundation, Inc. |
4 ;; Copyright (C) 2001 Ben Wing. | 4 ;; Copyright (C) 2001, 2002 Ben Wing. |
5 | 5 |
6 ;; Author: Richard Mlynarik | 6 ;; Author: Richard Mlynarik |
7 ;; Date: 8-Jul-92 | 7 ;; Date: 8-Jul-92 |
8 ;; Maintainer: XEmacs Development Team | 8 ;; Maintainer: XEmacs Development Team |
9 ;; Keywords: internal, dumped | 9 ;; Keywords: internal, dumped |
128 (defcustom errors-deactivate-region nil | 128 (defcustom errors-deactivate-region nil |
129 "*Non-nil means that errors will cause the region to be deactivated." | 129 "*Non-nil means that errors will cause the region to be deactivated." |
130 :type 'boolean | 130 :type 'boolean |
131 :group 'editing-basics) | 131 :group 'editing-basics) |
132 | 132 |
133 (defvar breakpoint-on-error nil | |
134 "Break into the C debugger when an unhandled error occurs noninteractively. | |
135 This happens by calling `force-debugging-signal'. This can be very | |
136 useful when debugging noninteractive errors in tricky situations, | |
137 e.g. makefiles, since you can set this variable using an environment | |
138 variable, like this: | |
139 | |
140 \(using csh) setenv XEMACSDEBUG '(setq breakpoint-on-error t)' | |
141 \(using bash) export XEMACSDEBUG='(setq breakpoint-on-error t)' | |
142 | |
143 XEMACSDEBUG is also useful for setting `stack-trace-on-error'. which will | |
144 display a Lisp backtrace when exiting noninteractively due to an unhandled | |
145 error.") | |
146 | |
147 (defun command-error (error-object) | 133 (defun command-error (error-object) |
148 ;; if you want a backtrace before exiting, set stack-trace-on-error. | 134 ;; if you want a backtrace before exiting, set stack-trace-on-error. |
149 (let* ((inhibit-quit t) | 135 (let* ((inhibit-quit t) |
150 (debug-on-error nil) | 136 (debug-on-error nil) |
151 (etype (car-safe error-object))) | 137 (etype (car-safe error-object))) |
175 (t 'command-error))) | 161 (t 'command-error))) |
176 (display-error error-object t) | 162 (display-error error-object t) |
177 | 163 |
178 (if (noninteractive) | 164 (if (noninteractive) |
179 (progn | 165 (progn |
180 (when breakpoint-on-error | 166 (message "%s exiting.\n" emacs-program-name) |
181 (force-debugging-signal)) | |
182 (message "%s exiting\n." emacs-program-name) | |
183 (kill-emacs -1))) | 167 (kill-emacs -1))) |
184 t)) | 168 t)) |
185 | 169 |
186 (defun describe-last-error () | 170 (defun describe-last-error () |
187 "Redisplay the last error-message. See the variable `last-error'." | 171 "Redisplay the last error-message. See the variable `last-error'." |