Function: term-goto-process-mark-maybe

term-goto-process-mark-maybe is a byte-compiled function defined in term.el.gz.

Signature

(term-goto-process-mark-maybe)

Documentation

Move point to the term buffer's process mark upon keyboard input.

Called as a buffer-local post-command-hook function in term-char-mode to prevent commands from putting the buffer into an inconsistent state by unexpectedly moving point.

Mouse events are ignored so that mouse selection is unimpeded.

Only acts when the pre-command position of point was equal to the process mark, and the term-char-mode-point-at-process-mark option is enabled. See term-set-goto-process-mark.

Source Code

;; Defined in /usr/src/emacs/lisp/term.el.gz
(defun term-goto-process-mark-maybe ()
  "Move point to the term buffer's process mark upon keyboard input.

Called as a buffer-local `post-command-hook' function in
`term-char-mode' to prevent commands from putting the buffer into
an inconsistent state by unexpectedly moving point.

Mouse events are ignored so that mouse selection is unimpeded.

Only acts when the pre-command position of point was equal to the
process mark, and the `term-char-mode-point-at-process-mark'
option is enabled.  See `term-set-goto-process-mark'."
  (when term-goto-process-mark
    (unless (mouse-event-p last-command-event)
      (goto-char (term-process-mark)))))