# HG changeset patch # User Nick Roberts # Date 1113991730 0 # Node ID c7e8695076af2dff3c7de57c63bd9cdeeca97366 # Parent a095ad7b17e445c57a1a881d8a456900623b99f5 (tooltip-gud-tips-p): Expand documentation. (tooltip-toggle-gud-tips): New function. diff -r a095ad7b17e4 -r c7e8695076af lisp/tooltip.el --- a/lisp/tooltip.el Wed Apr 20 10:08:21 2005 +0000 +++ b/lisp/tooltip.el Wed Apr 20 10:08:50 2005 +0000 @@ -117,7 +117,10 @@ :group 'tooltip) (defcustom tooltip-gud-tips-p nil - "*Non-nil means show tooltips in GUD sessions." + "*Non-nil means show tooltips in GUD sessions. + +This allows you to display a variable's value in a tooltip simply by +pointing at it with the mouse." :type 'boolean :tag "GUD" :group 'tooltip) @@ -412,12 +415,22 @@ (message "Dereferencing is now %s." (if tooltip-gud-dereference "on" "off")))) +(defun tooltip-toggle-gud-tips () + "Toggle the display of GUD tooltips." + (interactive) + (setq tooltip-gud-tips-p (not tooltip-gud-tips-p)) + ;; Reconsider for all buffers whether mouse motion events are desired. + (tooltip-change-major-mode) + (when (interactive-p) + (message (format "GUD tooltips %sabled" + (if tooltip-gud-tips-p "en" "dis"))))) + ; This will only display data that comes in one chunk. ; Larger arrays (say 400 elements) are displayed in ; the tootip incompletely and spill over into the gud buffer. ; Switching the process-filter creates timing problems and -; it may be difficult to do better. gdba in gdb-ui.el -; gets round this problem. +; it may be difficult to do better. Using annotations as in +; gdb-ui.el gets round this problem. (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)