Function: TeX-interactive-goto-prompt

TeX-interactive-goto-prompt is a byte-compiled function defined in tex.el.

Signature

(TeX-interactive-goto-prompt STRING)

Documentation

Move point to prompt of an interactive TeX run.

Source Code

;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/tex.el
;; Copy and adaption of `comint-postoutput-scroll-to-bottom' from CVS
;; Emacs of 2005-04-24.
(defun TeX-interactive-goto-prompt (string)
  "Move point to prompt of an interactive TeX run."
  (let* ((selected (selected-window))
         (current (current-buffer))
         (process (get-buffer-process current)))
    (unwind-protect
        (when process
          (walk-windows
           (lambda (window)
             (when (eq (window-buffer window) current)
               (select-window window)
               (when (and (< (point) (process-mark process))
                          (string-match "^\\? $" string))
                 (goto-char (process-mark process)))
               (select-window selected)))
           nil t))
      (set-buffer current))))