Function: term-command-hook
term-command-hook is a byte-compiled function defined in term.el.gz.
Signature
(term-command-hook STRING)
Source Code
;; Defined in /usr/src/emacs/lisp/term.el.gz
;; Default value for the symbol term-command-function.
(defun term-command-hook (string)
(cond ((equal string "")
t)
((= (aref string 0) ?\032)
;; gdb (when invoked with -fullname) prints:
;; \032\032FULLFILENAME:LINENUMBER:CHARPOS:BEG_OR_MIDDLE:PC\n
(let* ((first-colon (string-search ":" string 1))
(second-colon
(string-search ":" string (1+ first-colon)))
(filename (substring string 1 first-colon))
(fileline (string-to-number
(substring string (1+ first-colon) second-colon))))
(setq term-pending-frame (cons filename fileline))))
((= (aref string 0) ?/)
(cd (substring string 1)))
;; Allowing the inferior to call functions in Emacs is
;; probably too big a security hole.
;; ((= (aref string 0) ?!)
;; (eval (car (read-from-string string 1))))
(t)));; Otherwise ignore it