comparison lisp/progmodes/gud.el @ 63731:4121439fd904

(gud-tooltip-print-command): Indent properly. (gud-gdb-marker-filter): Use font-lock-warning-face for any initial error.
author Nick Roberts <nickrob@snap.net.nz>
date Fri, 24 Jun 2005 01:31:50 +0000
parents 41b38bc88264
children b0c4ce512db4 97f6c3a96df1
comparison
equal deleted inserted replaced
63730:1ca0765c7c7b 63731:4121439fd904
495 gud-marker-acc (substring gud-marker-acc (match-end 0)))) 495 gud-marker-acc (substring gud-marker-acc (match-end 0))))
496 496
497 ;; Check for annotations and change gud-minor-mode to 'gdba if 497 ;; Check for annotations and change gud-minor-mode to 'gdba if
498 ;; they are found. 498 ;; they are found.
499 (while (string-match "\n\032\032\\(.*\\)\n" gud-marker-acc) 499 (while (string-match "\n\032\032\\(.*\\)\n" gud-marker-acc)
500 (when (string-equal (match-string 1 gud-marker-acc) "prompt") 500 (let ((match (match-string 1 gud-marker-acc)))
501 (require 'gdb-ui) 501 (when (string-equal match "prompt")
502 (gdb-prompt nil)) 502 (require 'gdb-ui)
503 503 (gdb-prompt nil))
504 (setq 504
505 ;; Append any text before the marker to the output we're going 505 (setq
506 ;; to return - we don't include the marker in this text. 506 ;; Append any text before the marker to the output we're going
507 output (concat output 507 ;; to return - we don't include the marker in this text.
508 (substring gud-marker-acc 0 (match-beginning 0))) 508 output (concat output
509 509 (substring gud-marker-acc 0 (match-beginning 0)))
510 ;; Set the accumulator to the remaining text. 510
511 gud-marker-acc (substring gud-marker-acc (match-end 0)))) 511 ;; Set the accumulator to the remaining text.
512
513 gud-marker-acc (substring gud-marker-acc (match-end 0)))
514 (if (string-equal match "error-begin")
515 (put-text-property 0 (length gud-marker-acc)
516 'face font-lock-warning-face
517 gud-marker-acc))))
512 518
513 ;; Does the remaining text look like it might end with the 519 ;; Does the remaining text look like it might end with the
514 ;; beginning of another marker? If it does, then keep it in 520 ;; beginning of another marker? If it does, then keep it in
515 ;; gud-marker-acc until we receive the rest of it. Since we 521 ;; gud-marker-acc until we receive the rest of it. Since we
516 ;; know the full marker regexp above failed, it's pretty simple to 522 ;; know the full marker regexp above failed, it's pretty simple to
3254 "Return a suitable command to print the expression EXPR. 3260 "Return a suitable command to print the expression EXPR.
3255 If GUD-TOOLTIP-DEREFERENCE is t, also prepend a `*' to EXPR." 3261 If GUD-TOOLTIP-DEREFERENCE is t, also prepend a `*' to EXPR."
3256 (when gud-tooltip-dereference 3262 (when gud-tooltip-dereference
3257 (setq expr (concat "*" expr))) 3263 (setq expr (concat "*" expr)))
3258 (case gud-minor-mode 3264 (case gud-minor-mode
3259 (gdba (concat "server print " expr)) 3265 (gdba (concat "server print " expr))
3260 ((dbx gdbmi) (concat "print " expr)) 3266 ((dbx gdbmi) (concat "print " expr))
3261 (xdb (concat "p " expr)) 3267 (xdb (concat "p " expr))
3262 (sdb (concat expr "/")) 3268 (sdb (concat expr "/"))
3263 (perldb expr))) 3269 (perldb expr)))
3264 3270
3265 (defun gud-tooltip-tips (event) 3271 (defun gud-tooltip-tips (event)
3266 "Show tip for identifier or selection under the mouse. 3272 "Show tip for identifier or selection under the mouse.
3267 The mouse must either point at an identifier or inside a selected 3273 The mouse must either point at an identifier or inside a selected
3268 region for the tip window to be shown. If gud-tooltip-dereference is t, 3274 region for the tip window to be shown. If gud-tooltip-dereference is t,