diff options
| author | Nick Roberts | 2005-05-03 06:46:27 +0000 |
|---|---|---|
| committer | Nick Roberts | 2005-05-03 06:46:27 +0000 |
| commit | 64f3c670bd6a21cd71ed10831b2a4664960fd9be (patch) | |
| tree | d6c1fe0644f9e89331fbd8d297e3bce7348fec60 | |
| parent | 004e695aa56e5febbdd681361aff3cd1e7da88b1 (diff) | |
| download | emacs-64f3c670bd6a21cd71ed10831b2a4664960fd9be.tar.gz emacs-64f3c670bd6a21cd71ed10831b2a4664960fd9be.zip | |
(tooltip-gud-tips): Use gdb-define-alist.
| -rw-r--r-- | lisp/tooltip.el | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lisp/tooltip.el b/lisp/tooltip.el index 69f35a9997f..9bd35f05d11 100644 --- a/lisp/tooltip.el +++ b/lisp/tooltip.el | |||
| @@ -119,8 +119,10 @@ position to pop up the tooltip." | |||
| 119 | (defcustom tooltip-gud-tips-p nil | 119 | (defcustom tooltip-gud-tips-p nil |
| 120 | "*Non-nil means show tooltips in GUD sessions. | 120 | "*Non-nil means show tooltips in GUD sessions. |
| 121 | 121 | ||
| 122 | This allows you to display a variable's value in a tooltip simply by | 122 | This allows you to display a variable's value in a tooltip simply |
| 123 | pointing at it with the mouse." | 123 | by pointing at it with the mouse. In the case of a C program |
| 124 | controlled by GDB, it shows the associated #define directives | ||
| 125 | when program is not executing." | ||
| 124 | :type 'boolean | 126 | :type 'boolean |
| 125 | :tag "GUD" | 127 | :tag "GUD" |
| 126 | :group 'tooltip) | 128 | :group 'tooltip) |
| @@ -478,11 +480,10 @@ This function must return nil if it doesn't handle EVENT." | |||
| 478 | (window-buffer (let ((mouse (mouse-position))) | 480 | (window-buffer (let ((mouse (mouse-position))) |
| 479 | (window-at (cadr mouse) | 481 | (window-at (cadr mouse) |
| 480 | (cddr mouse)))) | 482 | (cddr mouse)))) |
| 481 | (when (boundp 'cc-define-alist) ; might be a Fortran program | 483 | (let ((define-elt (assoc expr gdb-define-alist))) |
| 482 | (let ((define-elt (assoc expr cc-define-alist))) | 484 | (unless (null define-elt) |
| 483 | (unless (null define-elt) | 485 | (tooltip-show (cdr define-elt)) |
| 484 | (tooltip-show (cdr define-elt)) | 486 | expr)))) |
| 485 | expr))))) | ||
| 486 | (let ((cmd (tooltip-gud-print-command expr))) | 487 | (let ((cmd (tooltip-gud-print-command expr))) |
| 487 | (unless (null cmd) ; CMD can be nil if unknown debugger | 488 | (unless (null cmd) ; CMD can be nil if unknown debugger |
| 488 | (case gud-minor-mode | 489 | (case gud-minor-mode |