Mercurial > emacs
changeset 67486:3d94a55776e3
(gud-tooltip-modes, gud-tooltip-display):
Add the gud groupname.
(gud-tooltip-mode): Add the tooltip groupname. Move in front
of other defcustoms with that groupname.
(gud-tooltip-echo-area): Add the gud groupname. Remove tag to
avoid conflict with tooltip-use-echo-area.
author | Nick Roberts <nickrob@snap.net.nz> |
---|---|
date | Sat, 10 Dec 2005 21:32:22 +0000 |
parents | 2865d1195586 |
children | 44fba69e3c47 |
files | lisp/progmodes/gud.el |
diffstat | 1 files changed, 43 insertions(+), 39 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/progmodes/gud.el Sat Dec 10 21:28:59 2005 +0000 +++ b/lisp/progmodes/gud.el Sat Dec 10 21:32:22 2005 +0000 @@ -3221,10 +3221,50 @@ ;;; tooltips for GUD ;;; Customizable settings + +;;;###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-hook '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-hook '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 + (with-current-buffer gud-comint-buffer + (memq gud-minor-mode '(gdbmi gdba)))) + (if gud-tooltip-mode + (progn + (dolist (buffer (buffer-list)) + (unless (eq buffer gud-comint-buffer) + (with-current-buffer buffer + (when (and (memq gud-minor-mode '(gdbmi gdba)) + (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)))) + (defcustom gud-tooltip-modes '(gud-mode c-mode c++-mode fortran-mode) - "List of modes for which to enable GUD tips." + "List of modes for which to enable GUD tooltips." :type 'sexp :tag "GUD modes" + :group 'gud :group 'tooltip) (defcustom gud-tooltip-display @@ -3236,12 +3276,13 @@ only tooltips in the buffer containing the overlay arrow." :type 'sexp :tag "GUD buffers predicate" + :group 'gud :group 'tooltip) (defcustom gud-tooltip-echo-area nil "Use the echo area instead of frames for GUD tooltips." :type 'boolean - :tag "Use echo area" + :group 'gud :group 'tooltip) (define-obsolete-variable-alias 'tooltip-gud-modes @@ -3315,43 +3356,6 @@ (define-obsolete-function-alias 'tooltip-gud-toggle-dereference 'toggle-gud-tooltip-dereference "22.1") -;;;###autoload -(define-minor-mode gud-tooltip-mode - "Toggle the display of GUD tooltips." - :global t - :group 'gud - (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-hook '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-hook '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 - (with-current-buffer gud-comint-buffer - (memq gud-minor-mode '(gdbmi gdba)))) - (if gud-tooltip-mode - (progn - (dolist (buffer (buffer-list)) - (unless (eq buffer gud-comint-buffer) - (with-current-buffer buffer - (when (and (memq gud-minor-mode '(gdbmi gdba)) - (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)))) - ; This will only display data that comes in one chunk. ; Larger arrays (say 400 elements) are displayed in ; the tooltip incompletely and spill over into the gud buffer.