# HG changeset patch # User Kim F. Storm # Date 1113819790 0 # Node ID 058da2e836147807cb29a3a20dc21919c2d2e255 # Parent ec1c2d7cc79229abd52e9cf6fb6e7d4bf20b5252 (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. diff -r ec1c2d7cc792 -r 058da2e83614 lisp/tooltip.el --- a/lisp/tooltip.el Mon Apr 18 10:22:38 2005 +0000 +++ b/lisp/tooltip.el Mon Apr 18 10:23:10 2005 +0000 @@ -290,7 +290,7 @@ (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 @@ `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 @@ (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 @@ (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 @@ 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)