* term.el (term-raw-map): Add mapping for insert.
(term-send-insert): New.
(term-mode): Make variables local here instead of doing it in
`term-emulate-terminal'.
(term-emulate-terminal): Delete incorrect optimization for cr+lf.
Scroll reverse needs to take into account the scroll
region. Saving and restoring the cursor should save the color
attributes too.
(term-reset-terminal): Reset the scroll region.
(term-handle-ansi-escape): Cursor up and down should take into
account the scroll region.
(term-set-scroll-region): Renamed from `term-scroll-region'. Move
to 0,0 after setting the region.
(term-handle-scroll): Handle scroll up.
(term-down): Fix off by one error.
(term-delete-lines): Do not delete outside the scroll region.
(term-insert-lines): Take into account the scroll region.
(term-ansi-current-reverse, term-ansi-current-invisible)
(term-ansi-face-already-done): Change to boolean.
(term-reset-terminal, term-handle-colors-array): Handle the above
vars accordingly.
(term-buffer-vertical-motion): Rename from buffer-vertical-motion.
(term-emulate-terminal): Use the new name.
* faces.el (secondary-selection): Use yellow1, not yellow.
(trailing-whitespace): Use red1, not red.
row to become negative.
(term-emulate-terminal): Fix insert mode. Handle tab insertion at
the end of the line. Fix scroll down. Add comments.
(term-handle-ansi-escape): Don\'t exceed terminal width when moving
right.
(term-scroll-region): Move the cursor after setting the scroll region.
(term-ansi-default-bg, term-ansi-current-temp): Delete unused vars.
(map): Bind S-prior, S-next and S-insert.
(term-mode): Set `indent-tabs-mode\' to nil.
(term-paste): New function to be bound to S-insert.
(term-send-del, term-send-backspace): Change the strings sent.
(term-termcap-format): Synchronyze with etc/e/eterm.ti.
(term-handle-colors-array): Fix handling of underline and reverse.
(term-handle-ansi-escape): Do not handle smcup/rmcup. Add comments.
(term-erase-in-line): Fix comparison.
(term-emulate-terminal): Fix line wrap handling.
(term-start-output-log): Rename from `term-set-output-log\'.
(term-stop-output-log): Rename from `term-stop-photo\'.
(term-switch-to-alternate-sub-buffer): Comment out, unused.
From Stefan <monnier@iro.umontreal.ca>
(term-display-table): New variable.
(term-mode): Use it.
(term-exec-1): Set the coding system to binary.
(term-emulate-terminal): Decode the string before inserting it.
(term-down): Perform vertical motion if DOWN is negative.
(term-exec-1): Set both TERMCAP and TERMINFO unconditionally.
(term-termcap-format): Synchronyze with the eterm terminfo entry
in etc/e/eterm.ti.
(term-handle-colors-array): If the current foreground or
background are zero (i.e. unspecified), use the foreground and
background of the default face for reverse video.
(term-ansi-at-eval-string, term-ansi-default-fg)
(term-ansi-default-bg, term-ansi-current-temp): Delete unused variable.
(term-mem): Delete ununsed function.
(term-protocol-version): Increment.
(term-current-face): Set to default.
(term-if-xemacs, term-ifnot-xemacs): Test (featurep 'xemacs).
(term-window-width): New function.
(term-mode, term-check-size): Use it.
(term-mode): Disable overflow-newline-into-fringe in term buffer.
(term-char-mode): Don't set up term-raw-map here.
(term-set-escape-char): Don't set up C-x subcommand.
(term-ansi-face-already-done): Renamed from
term-ansi-face-alredy-done.
(term-command-hook): Avoid error if STRING is empty.
(term, term-mode): Doc fixes.
Redesign handling of colors and faces.
Delete all the faces that this mode used to make.
(ansi-term-color-vector): New variable.
(ansi-term-fg-faces-vector, ansi-term-bg-faces-vector)
(ansi-term-inv-bg-faces-vector, ansi-term-inv-fg-faces-vector):
Variables deleted.
(term-default-fg-color, term-default-bg-color): Use defcustom.
(term-handle-colors-array): Use ansi-term-color-vector,
and specify face attributes rather than faces in `face' property.
(term-ansi-fg-faces-vector, term-ansi-bg-faces-vector)
(term-ansi-inv-fg-faces-vector, term-ansi-inv-bg-faces-vector)
(term-ansi-reverse-faces-vector): Unused variables deleted.
(term-ignore-error): Macro deleted.
(term-set-escape-char): Bind M-x to execute-extended-command in
term-raw-escape-map.
(term-move-columns): Don't try to move to negagive column.
(term-emulate-terminal): Insert a string before deleting a text to
overwrite.