diff options
author | Eli Zaretskii <eliz@gnu.org> | 2012-08-14 21:48:39 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2012-08-14 21:48:39 +0300 |
commit | ba025fbd446b8c72735617713a0f0037388ae3f4 (patch) | |
tree | fcbdd4b55fe00ca6aec347a61f9b76acf69fcc5a /lisp/progmodes/gud.el | |
parent | 9b8d51650b04c184e53c1c5dc703bb11eed7317e (diff) | |
download | emacs-ba025fbd446b8c72735617713a0f0037388ae3f4.tar.gz |
Fix and improve GUD Tooltip mode.
lisp/tooltip.el (tooltip-identifier-from-point): Don't treat tokens
inside comments and strings as identifiers.
lisp/progmodes/gud.el (gud-tooltip-print-command): Quote the
expression to evaluate. This allows to evaluate expressions with
embedded whitespace.
(gud-tooltip-tips): Add a blank before the newline in the
message-box text, for the benefit of message-box emulation on
MS-Windows.
lisp/progmodes/gdb-mi.el (gdb-tooltip-print): Don't ignore error
messages from GDB, pop them up in a tooltip to give feedback to
user.
(gdb-tooltip-print-1): Quote the expression to evaluate. This
allows to evaluate expressions with embedded whitespace.
(gdb-inferior-io--init-proc): Don't send "-inferior-tty" command
if the TTY name is nil or empty (which happens when communicating
with the inferior via pipes, e.g. on MS-Windows).
(gdb-internals): If GDB sends a "&\n" empty debugging message,
don't send that to the GUD buffer.
doc/emacs/building.texi (Debugger Operation): Correct and improve
documentation of the GUD Tooltip mode.
Diffstat (limited to 'lisp/progmodes/gud.el')
-rw-r--r-- | lisp/progmodes/gud.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 8912e67d603..5946e93f34d 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -3411,7 +3411,7 @@ With arg, dereference expr if ARG is positive, otherwise do not dereference." (defun gud-tooltip-print-command (expr) "Return a suitable command to print the expression EXPR." (pcase gud-minor-mode - (`gdbmi (concat "-data-evaluate-expression " expr)) + (`gdbmi (concat "-data-evaluate-expression \"" expr "\"")) (`dbx (concat "print " expr)) ((or `xdb `pdb) (concat "p " expr)) (`sdb (concat expr "/")))) @@ -3456,7 +3456,10 @@ This function must return nil if it doesn't handle EVENT." (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\ + ;; The blank before the newline is for MS-Windows, + ;; whose emulation of message box removes newlines and + ;; displays a single long line. + (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 (eq gud-minor-mode 'gdbmi) |