Function: comint-adjust-point

comint-adjust-point is a byte-compiled function defined in comint.el.gz.

Signature

(comint-adjust-point SELECTED)

Documentation

Move point in the selected window based on Comint settings.

SELECTED is the window that was originally selected.

Source Code

;; Defined in /usr/src/emacs/lisp/comint.el.gz
;; this function is nowhere used
(defun comint-adjust-point (selected)
  "Move point in the selected window based on Comint settings.
SELECTED is the window that was originally selected."
  (let ((process (get-buffer-process (current-buffer))))
    (and (< (point) (process-mark process))
	 (or (memq comint-move-point-for-output '(t all))
	     ;; Maybe user wants point to jump to end.
	     (eq comint-move-point-for-output
		 (if (eq (selected-window) selected) 'this 'others))
	     ;; If point was at the end, keep it at end.
	     (and (marker-position comint-last-output-start)
		  (>= (point) comint-last-output-start)))
	 (goto-char (process-mark process)))))