/[emacs]/emacs/lisp/tooltip.el
ViewVC logotype

Diff of /emacs/lisp/tooltip.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.49 by mituharu, Mon Apr 18 07:43:59 2005 UTC revision 1.50 by kfstorm, Mon Apr 18 10:23:10 2005 UTC
# Line 290  change the existing association.  Value Line 290  change the existing association.  Value
290        (push (cons key value) alist))        (push (cons key value) alist))
291      alist))      alist))
292    
293  (defun tooltip-show (text gud-tip)  (defun tooltip-show (text &optional use-echo-area)
294    "Show a tooltip window displaying TEXT.    "Show a tooltip window displaying TEXT.
295    
296  Text larger than `x-max-tooltip-size' is clipped.  Text larger than `x-max-tooltip-size' is clipped.
# Line 301  is displayed.  Otherwise, the tooltip po Line 301  is displayed.  Otherwise, the tooltip po
301  `tooltip-x-offset' and `tooltip-y-offset' from the current mouse  `tooltip-x-offset' and `tooltip-y-offset' from the current mouse
302  position.  position.
303    
304  GUD-TIP is t if the tooltip is from a GUD session and nil otherwise."  Optional second arg USE-ECHO-AREA non-nil means to show tooltip
305    (if (and gud-tip tooltip-gud-echo-area)  in echo area."
306      (if use-echo-area
307        (message "%s" text)        (message "%s" text)
308      (condition-case error      (condition-case error
309          (let ((params (copy-sequence tooltip-frame-parameters))          (let ((params (copy-sequence tooltip-frame-parameters))
# Line 418  This event can be examined by forms in T Line 419  This event can be examined by forms in T
419  (defun tooltip-gud-process-output (process output)  (defun tooltip-gud-process-output (process output)
420    "Process debugger output and show it in a tooltip window."    "Process debugger output and show it in a tooltip window."
421    (set-process-filter process tooltip-gud-original-filter)    (set-process-filter process tooltip-gud-original-filter)
422    (tooltip-show (tooltip-strip-prompt process output) t))    (tooltip-show (tooltip-strip-prompt process output)
423                    tooltip-gud-echo-area))
424    
425  (defun tooltip-gud-print-command (expr)  (defun tooltip-gud-print-command (expr)
426    "Return a suitable command to print the expression EXPR.    "Return a suitable command to print the expression EXPR.
# Line 465  This function must return nil if it does Line 467  This function must return nil if it does
467     (with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer)     (with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer)
468       (let ((string (buffer-string)))       (let ((string (buffer-string)))
469         ;; remove newline for tooltip-gud-echo-area         ;; remove newline for tooltip-gud-echo-area
470         (substring string 0 (- (length string) 1)))) t))         (substring string 0 (- (length string) 1))))
471       tooltip-gud-echo-area))
472    
473    
474  ;;; Tooltip help.  ;;; Tooltip help.
# Line 498  This is installed on the hook `tooltip-h Line 501  This is installed on the hook `tooltip-h
501  the timer with ID `tooltip-timeout-id' fires.  the timer with ID `tooltip-timeout-id' fires.
502  Value is non-nil if this function handled the tip."  Value is non-nil if this function handled the tip."
503    (when (stringp tooltip-help-message)    (when (stringp tooltip-help-message)
504      (tooltip-show tooltip-help-message nil)      (tooltip-show tooltip-help-message)
505      t))      t))
506    
507  (provide 'tooltip)  (provide 'tooltip)

Legend:
Removed from v.1.49  
changed lines
  Added in v.1.50

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26