aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Nicolaescu2004-12-11 21:05:19 +0000
committerDan Nicolaescu2004-12-11 21:05:19 +0000
commitd56bb1ab22c3cc463c088550a15fe0f91c5db006 (patch)
treec98cca8d7da27ef1b916d5ffd3ef8f4ad4d80819
parentc83c9f9db773a3d37482414c9eefddf347de08c7 (diff)
downloademacs-d56bb1ab22c3cc463c088550a15fe0f91c5db006.tar.gz
emacs-d56bb1ab22c3cc463c088550a15fe0f91c5db006.zip
(term-termcap-format): Synchronyze with terminfo.
(term-emulate-terminal): Handle reset. (term-reset-terminal): New function.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/term.el24
2 files changed, 28 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 879e6a5195a..fc4a8ebcd12 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12004-12-11 Dan Nicolaescu <dann@ics.uci.edu>
2
3 * term.el (term-termcap-format): Synchronyze with terminfo.
4 (term-emulate-terminal): Handle reset.
5 (term-reset-terminal): New function.
6
12004-12-11 Thien-Thi Nguyen <ttn@gnu.org> 72004-12-11 Thien-Thi Nguyen <ttn@gnu.org>
2 8
3 * play/zone.el (zone-programs): Add `zone-pgm-random-life'. 9 * play/zone.el (zone-programs): Add `zone-pgm-random-life'.
diff --git a/lisp/term.el b/lisp/term.el
index 8c624568ad0..14a567a667c 100644
--- a/lisp/term.el
+++ b/lisp/term.el
@@ -1402,7 +1402,7 @@ The main purpose is to get rid of the local keymap."
1402:kl=\\EOD:kd=\\EOB:kr=\\EOC:ku=\\EOA:kN=\\E[6~:kP=\\E[5~:@7=\\E[4~:kh=\\E[1~\ 1402:kl=\\EOD:kd=\\EOB:kr=\\EOC:ku=\\EOA:kN=\\E[6~:kP=\\E[5~:@7=\\E[4~:kh=\\E[1~\
1403:mk=\\E[8m:cb=\\E[1K:op=\\E[39;49m:Co#8:pa#64:AB=\\E[4%%dm:AF=\\E[3%%dm:cr=^M\ 1403:mk=\\E[8m:cb=\\E[1K:op=\\E[39;49m:Co#8:pa#64:AB=\\E[4%%dm:AF=\\E[3%%dm:cr=^M\
1404:bl=^G:do=^J:le=^H:ta=^I:se=\E[27m:ue=\E24m\ 1404:bl=^G:do=^J:le=^H:ta=^I:se=\E[27m:ue=\E24m\
1405:kb=^?:kD=^[[3~:sc=\E7:rc=\E8:" 1405:kb=^?:kD=^[[3~:sc=\E7:rc=\E8:r1=\Ec:"
1406;;; : -undefine ic 1406;;; : -undefine ic
1407;;; don't define :te=\\E[2J\\E[?47l\\E8:ti=\\E7\\E[?47h\ 1407;;; don't define :te=\\E[2J\\E[?47l\\E8:ti=\\E7\\E[?47h\
1408 "termcap capabilities supported") 1408 "termcap capabilities supported")
@@ -2893,6 +2893,10 @@ See `term-prompt-regexp'."
2893 (term-goto (car term-saved-cursor) 2893 (term-goto (car term-saved-cursor)
2894 (cdr term-saved-cursor))) 2894 (cdr term-saved-cursor)))
2895 (setq term-terminal-state 0)) 2895 (setq term-terminal-state 0))
2896 ((eq char ?c) ;; \Ec - Reset (terminfo: rs1)
2897 ;; This is used by the "clear" program.
2898 (setq term-terminal-state 0)
2899 (term-reset-terminal))
2896 ;; The \E#8 reset sequence for xterm. We 2900 ;; The \E#8 reset sequence for xterm. We
2897 ;; probably don't need to handle it, but this 2901 ;; probably don't need to handle it, but this
2898 ;; is the code to parse it. 2902 ;; is the code to parse it.
@@ -3020,13 +3024,29 @@ See `term-prompt-regexp'."
3020 (set-marker term-home-marker (point)) 3024 (set-marker term-home-marker (point))
3021 (setq term-current-row (1- term-height)))))) 3025 (setq term-current-row (1- term-height))))))
3022 3026
3027;;; Reset the terminal, delete all the content and set the face to the
3028;;; default one.
3029(defun term-reset-terminal ()
3030 (erase-buffer)
3031 (setq term-current-row 1)
3032 (setq term-current-column 1)
3033 (setq term-insert-mode nil)
3034 (setq term-current-face nil)
3035 (setq term-ansi-current-underline 0)
3036 (setq term-ansi-current-bold 0)
3037 (setq term-ansi-current-reverse 0)
3038 (setq term-ansi-current-color 0)
3039 (setq term-ansi-current-invisible 0)
3040 (setq term-ansi-face-already-done 1)
3041 (setq term-ansi-current-bg-color 0))
3042
3023;;; New function to deal with ansi colorized output, as you can see you can 3043;;; New function to deal with ansi colorized output, as you can see you can
3024;;; have any bold/underline/fg/bg/reverse combination. -mm 3044;;; have any bold/underline/fg/bg/reverse combination. -mm
3025 3045
3026(defun term-handle-colors-array (parameter) 3046(defun term-handle-colors-array (parameter)
3027 (cond 3047 (cond
3028 3048
3029;;; Bold 3049;;; Bold (terminfo: bold)
3030 ((eq parameter 1) 3050 ((eq parameter 1)
3031 (setq term-ansi-current-bold 1)) 3051 (setq term-ansi-current-bold 1))
3032 3052