Function: gud-guiler-marker-filter

gud-guiler-marker-filter is a byte-compiled function defined in gud.el.gz.

Signature

(gud-guiler-marker-filter STRING)

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/gud.el.gz
(defun gud-guiler-marker-filter (string)
  (setq gud-marker-acc (if gud-marker-acc (concat gud-marker-acc string) string))

  (let ((start 0))
    (while
	(cond
	 ((string-match "^In \\(.*\\):" gud-marker-acc start)
          (setq gud-guiler-lastfile (match-string 1 gud-marker-acc)))
	 ((string-match "^\\([^:\n]+\\):\\([0-9]+\\):\\([0-9]+\\):[^\n]*"
			gud-marker-acc start)
          (setq gud-guiler-lastfile (match-string 1 gud-marker-acc))
          (setq gud-last-frame
                (cons gud-guiler-lastfile
                      (string-to-number (match-string 2 gud-marker-acc)))))
	 ((string-match "^[ ]*\\([0-9]+\\):\\([0-9]+\\)  [^\n]*"
			gud-marker-acc start)
          (if gud-guiler-lastfile
              (setq gud-last-frame
                    (cons gud-guiler-lastfile
                          (string-to-number (match-string 1 gud-marker-acc))))))
	 ((string-match comint-prompt-regexp gud-marker-acc start) t)
         ((string= (substring gud-marker-acc start) "") nil)
         (t nil))
      (setq start (match-end 0)))

    ;; Search for the last incomplete line in this chunk
    (while (string-match "\n" gud-marker-acc start)
      (setq start (match-end 0)))

    ;; If we have an incomplete line, store it in gud-marker-acc.
    (setq gud-marker-acc (substring gud-marker-acc (or start 0))))
  string)