Function: comint-previous-input

comint-previous-input is an interactive and byte-compiled function defined in comint.el.gz.

Signature

(comint-previous-input ARG)

Documentation

Cycle backwards through input history, saving input.

View in manual

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/comint.el.gz
(defun comint-previous-input (arg)
  "Cycle backwards through input history, saving input."
  (interactive "*p")
  (if (and comint-input-ring-index
	   (or		       ;; leaving the "end" of the ring
	    (and (< arg 0)		; going down
		 (eq comint-input-ring-index 0))
	    (and (> arg 0)		; going up
		 (eq comint-input-ring-index
		     (1- (ring-length comint-input-ring)))))
	   comint-stored-incomplete-input)
      (comint-restore-input)
    (comint-previous-matching-input "." arg)))