aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar David Aspinall <da@inf.ed.ac.uk>2004-08-25 20:20:24 +0000
committerGravatar David Aspinall <da@inf.ed.ac.uk>2004-08-25 20:20:24 +0000
commit1b0a9f62c9ea2e577a72ecf1c180713471b965fb (patch)
treeaf8c16501e9af3f8a866693bf391446650cb2f1b
parent64a4e312f60d0a9255efe880d1d05efc4c06e5f5 (diff)
Add pg-internal-warning. Use display-warning for that and proof-debug, if available.
-rw-r--r--generic/proof-utils.el23
1 files changed, 13 insertions, 10 deletions
diff --git a/generic/proof-utils.el b/generic/proof-utils.el
index 67f5e462..a2d1c8e2 100644
--- a/generic/proof-utils.el
+++ b/generic/proof-utils.el
@@ -590,22 +590,25 @@ The warning is coloured with proof-warning-face."
(pg-response-display-with-face (apply 'concat args) 'proof-warning-face)
(proof-display-and-keep-buffer proof-response-buffer))
-(defun pg-internal-warning (message)
- "Display internal warning MESSAGE."
- (if (fboundp 'display-warning)
- (display-warning 'proof-general message)
- (message message)))
+(defun pg-internal-warning (message &rest args)
+ "Display internal warning MESSAGE with ARGS as for format."
+ (let ((formatted (apply 'format message args)))
+ (if (fboundp 'display-warning)
+ (display-warning 'proof-general formatted)
+ (message formatted))))
;; could be a macro for efficiency in compiled code
(defun proof-debug (msg &rest args)
"Issue the debugging message (format MSG ARGS) in the response buffer, display it.
If proof-show-debug-messages is nil, do nothing."
(if proof-show-debug-messages
- (progn
- (pg-response-display-with-face (concat "PG debug: "
- (apply 'format msg args))
- 'proof-debug-message-face)
- (proof-display-and-keep-buffer proof-response-buffer))))
+ (let ((formatted (apply 'format msg args)))
+ (if (fboundp 'display-warning) ;; use builtin warning system in XEmacs
+ (display-warning 'proof-general formatted 'info)
+ ;; otherwise use response buffer with dedicated font, & display it
+ (progn
+ (pg-response-display-with-face 'proof-debug-message-face)
+ (proof-display-and-keep-buffer proof-response-buffer))))))
;;; A handy utility function used in the "Buffers" menu, and throughout