From 2b9688f62f54b91532c98e272c9b1a1241ab392a Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Mon, 16 May 2005 06:42:37 +0000 Subject: [PATCH] (gud-tooltip-mode): Add gud prefix to tooltip-change-major-mode. (gud-tooltip-print-command): Remove case where gud-minor-mode is gdb ("--fullname"). (gud-tooltip-tips): Turn GUD tooltips off for this case and explain to user. --- lisp/progmodes/gud.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 5c81ba7f6f9..4c95fc65d58 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -3215,7 +3215,7 @@ This event can be examined by forms in GUD-TOOLTIP-DISPLAY.") (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 'tooltip-change-major-mode) + (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) @@ -3253,7 +3253,7 @@ If GUD-TOOLTIP-DEREFERENCE is t, also prepend a `*' to EXPR." (when gud-tooltip-dereference (setq expr (concat "*" expr))) (case gud-minor-mode - ((gdb gdba) (concat "server print " expr)) + (gdba (concat "server print " expr)) ((dbx gdbmi) (concat "print " expr)) (xdb (concat "p " expr)) (sdb (concat expr "/")) @@ -3293,6 +3293,10 @@ This function must return nil if it doesn't handle EVENT." (tooltip-show (cdr define-elt)) expr)))) (let ((cmd (gud-tooltip-print-command expr))) + (when (and gud-tooltip-mode (eq gud-minor-mode 'gdb)) + (gud-tooltip-mode -1) + (message-box "Using GUD tooltips in this mode is unsafe\n\ +so they have been disabled.")) (unless (null cmd) ; CMD can be nil if unknown debugger (if (memq gud-minor-mode '(gdba gdbmi)) (if gdb-macro-info -- 2.39.2