summaryrefslogtreecommitdiff
path: root/lisp/tooltip.el
diff options
context:
space:
mode:
authorKim F. Storm <storm@cua.dk>2005-04-18 10:23:41 +0000
committerKim F. Storm <storm@cua.dk>2005-04-18 10:23:41 +0000
commitcae0724067c878fd2aba1d51c0101053a53eaf5c (patch)
tree7b2c0b325ec97567a087dfa493ce48370c236f3e /lisp/tooltip.el
parent2e764c66338518badd00d020f04fb792db877b71 (diff)
downloademacs-cae0724067c878fd2aba1d51c0101053a53eaf5c.tar.gz
(tooltip-show): Change second arg to USE-ECHO-AREA
and make it optional. Don't test tooltip-gud-echo-area here. (tooltip-gud-process-output, gdb-tooltip-print): Pass tooltip-gud-echo-area to tooltip-show. (tooltip-help-tips): Remove second optional arg.
Diffstat (limited to 'lisp/tooltip.el')
-rw-r--r--lisp/tooltip.el15
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/tooltip.el b/lisp/tooltip.el
index 89a72d570a2..d70e20e5b6b 100644
--- a/lisp/tooltip.el
+++ b/lisp/tooltip.el
@@ -290,7 +290,7 @@ change the existing association. Value is the resulting alist."
(push (cons key value) alist))
alist))
-(defun tooltip-show (text gud-tip)
+(defun tooltip-show (text &optional use-echo-area)
"Show a tooltip window displaying TEXT.
Text larger than `x-max-tooltip-size' is clipped.
@@ -301,8 +301,9 @@ is displayed. Otherwise, the tooltip pops at offsets specified by
`tooltip-x-offset' and `tooltip-y-offset' from the current mouse
position.
-GUD-TIP is t if the tooltip is from a GUD session and nil otherwise."
- (if (and gud-tip tooltip-gud-echo-area)
+Optional second arg USE-ECHO-AREA non-nil means to show tooltip
+in echo area."
+ (if use-echo-area
(message "%s" text)
(condition-case error
(let ((params (copy-sequence tooltip-frame-parameters))
@@ -418,7 +419,8 @@ This event can be examined by forms in TOOLTIP-GUD-DISPLAY.")
(defun tooltip-gud-process-output (process output)
"Process debugger output and show it in a tooltip window."
(set-process-filter process tooltip-gud-original-filter)
- (tooltip-show (tooltip-strip-prompt process output) t))
+ (tooltip-show (tooltip-strip-prompt process output)
+ tooltip-gud-echo-area))
(defun tooltip-gud-print-command (expr)
"Return a suitable command to print the expression EXPR.
@@ -465,7 +467,8 @@ This function must return nil if it doesn't handle EVENT."
(with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer)
(let ((string (buffer-string)))
;; remove newline for tooltip-gud-echo-area
- (substring string 0 (- (length string) 1)))) t))
+ (substring string 0 (- (length string) 1))))
+ tooltip-gud-echo-area))
;;; Tooltip help.
@@ -498,7 +501,7 @@ This is installed on the hook `tooltip-hook', which is run when
the timer with ID `tooltip-timeout-id' fires.
Value is non-nil if this function handled the tip."
(when (stringp tooltip-help-message)
- (tooltip-show tooltip-help-message nil)
+ (tooltip-show tooltip-help-message)
t))
(provide 'tooltip)