diff options
author | David Aspinall <da@inf.ed.ac.uk> | 2010-10-11 18:07:55 +0000 |
---|---|---|
committer | David Aspinall <da@inf.ed.ac.uk> | 2010-10-11 18:07:55 +0000 |
commit | 78a79e474a3b647e4a32af760ceab3559f1abb5d (patch) | |
tree | 7a0e5d9649333dedc5f297ddd847f69eb36fe689 /generic/proof-utils.el | |
parent | cd04af65c6feaeddb699775b3f14dbe94f5e754b (diff) |
proof-debug: fiddle with warning levels to make *PG Debug* buffer appear, set it in help mode.
Diffstat (limited to 'generic/proof-utils.el')
-rw-r--r-- | generic/proof-utils.el | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/generic/proof-utils.el b/generic/proof-utils.el index 6bf9e53e..eb170e23 100644 --- a/generic/proof-utils.el +++ b/generic/proof-utils.el @@ -337,13 +337,18 @@ No effect if buffer is dead." ;;;###autoload (defun proof-debug (msg &rest args) - "Issue the debugging message (format MSG ARGS) in the response buffer, display it. + "Issue the debugging message (format MSG ARGS) in the *PG Debug* buffer. If proof-general-debug is nil, do nothing." - (if proof-general-debug - (let ((formatted (apply 'format msg args))) + (when proof-general-debug + (with-current-buffer (get-buffer-create "*PG Debug*") + (help-mode) + (let ((formatted (apply 'format msg args)) + (log-warning-minimum-level :debug) + (warning-minimum-level :debug) + (buffer-read-only nil)) (display-warning 'proof-general - formatted 'debug - "*PG Debug*")))) + formatted :debug + "*PG Debug*"))))) ;; Utility used in the "Buffers" menu, and throughout (defun proof-switch-to-buffer (buf &optional noselect) |