diff options
| author | Kim F. Storm | 2005-04-18 10:23:41 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2005-04-18 10:23:41 +0000 |
| commit | cae0724067c878fd2aba1d51c0101053a53eaf5c (patch) | |
| tree | 7b2c0b325ec97567a087dfa493ce48370c236f3e | |
| parent | 2e764c66338518badd00d020f04fb792db877b71 (diff) | |
| download | emacs-cae0724067c878fd2aba1d51c0101053a53eaf5c.tar.gz emacs-cae0724067c878fd2aba1d51c0101053a53eaf5c.zip | |
(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.
| -rw-r--r-- | lisp/ChangeLog | 2 | ||||
| -rw-r--r-- | lisp/tooltip.el | 15 |
2 files changed, 10 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b137be21e03..98668e689b6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | and make it optional. Don't test tooltip-gud-echo-area here. | 4 | and make it optional. Don't test tooltip-gud-echo-area here. |
| 5 | (tooltip-gud-process-output, gdb-tooltip-print): Pass | 5 | (tooltip-gud-process-output, gdb-tooltip-print): Pass |
| 6 | tooltip-gud-echo-area to tooltip-show. | 6 | tooltip-gud-echo-area to tooltip-show. |
| 7 | (tooltip-help-tips): Remove second optional arg. | 7 | (tooltip-help-tips): Remove second optional arg to tooltip-show. |
| 8 | 8 | ||
| 9 | 2005-04-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | 9 | 2005-04-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
| 10 | 10 | ||
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." | |||
| 290 | (push (cons key value) alist)) | 290 | (push (cons key value) alist)) |
| 291 | alist)) | 291 | alist)) |
| 292 | 292 | ||
| 293 | (defun tooltip-show (text gud-tip) | 293 | (defun tooltip-show (text &optional use-echo-area) |
| 294 | "Show a tooltip window displaying TEXT. | 294 | "Show a tooltip window displaying TEXT. |
| 295 | 295 | ||
| 296 | Text larger than `x-max-tooltip-size' is clipped. | 296 | Text larger than `x-max-tooltip-size' is clipped. |
| @@ -301,8 +301,9 @@ is displayed. Otherwise, the tooltip pops at offsets specified by | |||
| 301 | `tooltip-x-offset' and `tooltip-y-offset' from the current mouse | 301 | `tooltip-x-offset' and `tooltip-y-offset' from the current mouse |
| 302 | position. | 302 | position. |
| 303 | 303 | ||
| 304 | GUD-TIP is t if the tooltip is from a GUD session and nil otherwise." | 304 | Optional second arg USE-ECHO-AREA non-nil means to show tooltip |
| 305 | (if (and gud-tip tooltip-gud-echo-area) | 305 | in echo area." |
| 306 | (if use-echo-area | ||
| 306 | (message "%s" text) | 307 | (message "%s" text) |
| 307 | (condition-case error | 308 | (condition-case error |
| 308 | (let ((params (copy-sequence tooltip-frame-parameters)) | 309 | (let ((params (copy-sequence tooltip-frame-parameters)) |
| @@ -418,7 +419,8 @@ This event can be examined by forms in TOOLTIP-GUD-DISPLAY.") | |||
| 418 | (defun tooltip-gud-process-output (process output) | 419 | (defun tooltip-gud-process-output (process output) |
| 419 | "Process debugger output and show it in a tooltip window." | 420 | "Process debugger output and show it in a tooltip window." |
| 420 | (set-process-filter process tooltip-gud-original-filter) | 421 | (set-process-filter process tooltip-gud-original-filter) |
| 421 | (tooltip-show (tooltip-strip-prompt process output) t)) | 422 | (tooltip-show (tooltip-strip-prompt process output) |
| 423 | tooltip-gud-echo-area)) | ||
| 422 | 424 | ||
| 423 | (defun tooltip-gud-print-command (expr) | 425 | (defun tooltip-gud-print-command (expr) |
| 424 | "Return a suitable command to print the expression EXPR. | 426 | "Return a suitable command to print the expression EXPR. |
| @@ -465,7 +467,8 @@ This function must return nil if it doesn't handle EVENT." | |||
| 465 | (with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer) | 467 | (with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer) |
| 466 | (let ((string (buffer-string))) | 468 | (let ((string (buffer-string))) |
| 467 | ;; remove newline for tooltip-gud-echo-area | 469 | ;; remove newline for tooltip-gud-echo-area |
| 468 | (substring string 0 (- (length string) 1)))) t)) | 470 | (substring string 0 (- (length string) 1)))) |
| 471 | tooltip-gud-echo-area)) | ||
| 469 | 472 | ||
| 470 | 473 | ||
| 471 | ;;; Tooltip help. | 474 | ;;; Tooltip help. |
| @@ -498,7 +501,7 @@ This is installed on the hook `tooltip-hook', which is run when | |||
| 498 | the timer with ID `tooltip-timeout-id' fires. | 501 | the timer with ID `tooltip-timeout-id' fires. |
| 499 | Value is non-nil if this function handled the tip." | 502 | Value is non-nil if this function handled the tip." |
| 500 | (when (stringp tooltip-help-message) | 503 | (when (stringp tooltip-help-message) |
| 501 | (tooltip-show tooltip-help-message nil) | 504 | (tooltip-show tooltip-help-message) |
| 502 | t)) | 505 | t)) |
| 503 | 506 | ||
| 504 | (provide 'tooltip) | 507 | (provide 'tooltip) |