# HG changeset patch # User Nick Roberts # Date 1116225757 0 # Node ID b4775e4a25b8c152a1ae3c6d7750ae5feb7a69b2 # Parent ba0495c4ff913ad2b6160618e6db1158f4eb0055 (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. diff -r ba0495c4ff91 -r b4775e4a25b8 lisp/progmodes/gud.el --- a/lisp/progmodes/gud.el Mon May 16 06:41:46 2005 +0000 +++ b/lisp/progmodes/gud.el Mon May 16 06:42:37 2005 +0000 @@ -3215,7 +3215,7 @@ (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 @@ (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 @@ (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