+2011-05-31 Helmut Eller <eller.helmut@gmail.com>
+
+ * debug.el (debug): Restore the previous content of the
+ *Backtrace* buffer when we exit with C-M-c.
+
2011-05-31 Stefan Monnier <monnier@iro.umontreal.ca>
* minibuffer.el: Add metadata method to completion tables.
(debug-on-quit nil)
(debugger-buffer (get-buffer-create "*Backtrace*"))
(debugger-old-buffer (current-buffer))
+ (debugger-previous-contents nil)
(debugger-step-after-exit nil)
(debugger-will-be-back nil)
;; Don't keep reading from an executing kbd macro!
(when (eq 'lambda (car-safe (cadr (backtrace-frame 4))))
(backtrace-debug 5 t)))
(pop-to-buffer debugger-buffer)
+ (setq debugger-previous-contents (buffer-string))
(debugger-mode)
(debugger-setup-buffer debugger-args)
(when noninteractive
;; erase it (and maybe hide it) but keep it alive.
(with-current-buffer debugger-buffer
(erase-buffer)
+ (insert debugger-previous-contents)
(fundamental-mode)
(with-selected-window (get-buffer-window debugger-buffer 0)
(when (and (window-dedicated-p (selected-window))