]> git.eshelyaron.com Git - emacs.git/commit
Avoid creating inconsistent buffer states in term-char-mode
authorPhil Sainty <psainty@orcon.net.nz>
Sat, 21 Oct 2017 08:17:56 +0000 (11:17 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 21 Oct 2017 08:17:56 +0000 (11:17 +0300)
commit0d8e4f45d612ecd77f4997fae30e4d1591f9b8a6
tree72c3d41f678300c07d799d7942ca6b2d8cce6d9d
parent79d57f4b7a8dc0d0cd213ce5989886cc9fc9b7f3
Avoid creating inconsistent buffer states in term-char-mode

* lisp/term.el (term-mode, term-char-mode, term-line-mode)
(term-emulate-terminal): Make buffer read-only in 'term-char-mode',
except for the process filter's output.  Use 'read-only-mode-hook' to
track and restore the user-set state of 'buffer-read-only' for
'term-line-mode'.  (Bug#24837)
(term-char-mode-buffer-read-only): New user option.
(term-line-mode-buffer-read-only): New buffer-local variable.
(term-line-mode-buffer-read-only-update): New function.
(term-char-mode, term-line-mode): Use 'term-set-goto-process-mark'
in pre-command-hook, and 'term-goto-process-mark-maybe' in
post-command-hook to counter-act unexpected changes to point when
using 'term-char-mode'.
(term-char-mode-point-at-process-mark): New user option.
(term-goto-process-mark): New buffer-local variable.
(term-set-goto-process-mark): New function.
(term-goto-process-mark-maybe): New function.
(term-process-mark): New function.

* etc/NEWS: Mention the new behavior and user options.
etc/NEWS
lisp/term.el