Function: gud-tooltip-mode
gud-tooltip-mode is an autoloaded, interactive and byte-compiled
function defined in gud.el.gz.
Signature
(gud-tooltip-mode &optional ARG)
Documentation
Toggle the display of GUD tooltips.
This is a global minor mode. If called interactively, toggle the
Gud-Tooltip mode mode. If the prefix argument is positive, enable the
mode, and if it is zero or negative, disable the mode.
If called from Lisp, toggle the mode if ARG is toggle. Enable the
mode if ARG is nil, omitted, or is a positive number. Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
evaluate (default-value \=gud-tooltip-mode)'.
The mode's hook is called both when the mode is enabled and when it is disabled.
Probably introduced at or before Emacs version 22.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/gud.el.gz
;;;###autoload
(define-minor-mode gud-tooltip-mode
"Toggle the display of GUD tooltips."
:global t
:group 'gud
:group 'tooltip
(require 'tooltip)
(if gud-tooltip-mode
(progn
(add-hook 'change-major-mode-hook #'gud-tooltip-change-major-mode)
(add-hook 'pre-command-hook #'tooltip-hide)
(add-hook 'tooltip-functions #'gud-tooltip-tips)
(define-key global-map [mouse-movement] #'gud-tooltip-mouse-motion))
(unless tooltip-mode (remove-hook 'pre-command-hook #'tooltip-hide)
(remove-hook 'change-major-mode-hook #'gud-tooltip-change-major-mode)
(remove-hook 'tooltip-functions #'gud-tooltip-tips)
(define-key global-map [mouse-movement] #'ignore)))
(gud-tooltip-activate-mouse-motions-if-enabled)
(if (and gud-comint-buffer
(buffer-name gud-comint-buffer); gud-comint-buffer might be killed
(eq (buffer-local-value 'gud-minor-mode gud-comint-buffer)
'gdbmi))
(if gud-tooltip-mode
(progn
(dolist (buffer (buffer-list))
(unless (eq buffer gud-comint-buffer)
(with-current-buffer buffer
(when (and (eq gud-minor-mode 'gdbmi)
(not (string-match "\\`\\*.+\\*\\'"
(buffer-name))))
(make-local-variable 'gdb-define-alist)
(gdb-create-define-alist)
(add-hook 'after-save-hook
#'gdb-create-define-alist nil t))))))
(kill-local-variable 'gdb-define-alist)
(remove-hook 'after-save-hook #'gdb-create-define-alist t))))