Variable: term-control-seq-regexp

term-control-seq-regexp is a variable defined in term.el.gz.

Value

"\\(?:[
\n�	]\\|[^\n]+\n\\|\\(?:[DM78c]\\|AnSiT[^\n]+\n\\|\\[\\([0-?]*\\)[ -/]*[@-~]\\)\\)"

Documentation

Regexp matching control sequences handled by term.el.

Source Code

;; Defined in /usr/src/emacs/lisp/term.el.gz
;; Terminal emulation
;; This is the standard process filter for term buffers.
;; It emulates (most of the features of) a VT100/ANSI-style terminal.

;; References:
;; [ctlseqs]: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html
;; [ECMA-48]: https://www.ecma-international.org/publications/standards/Ecma-048.htm
;; [vt100]: https://vt100.net/docs/vt100-ug/chapter3.html

(defconst term-control-seq-regexp
  (concat
   ;; A control character,
   "\\(?:[\r\n\000\007\t\b\016\017]\\|"
   ;; some Emacs specific control sequences, implemented by
   ;; `term-command-hook',
   "\032[^\n]+\n\\|"
   ;; a C1 escape coded character (see [ECMA-48] section 5.3 "Elements
   ;; of the C1 set"),
   "\e\\(?:[DM78c]\\|"
   ;; another Emacs specific control sequence,
   "AnSiT[^\n]+\n\\|"
   ;; or an escape sequence (section 5.4 "Control Sequences"),
   "\\[\\([\x30-\x3F]*\\)[\x20-\x2F]*[\x40-\x7E]\\)\\)")
  "Regexp matching control sequences handled by term.el.")