Function: term-previous-matching-input-from-input
term-previous-matching-input-from-input is an interactive and
byte-compiled function defined in term.el.gz.
Signature
(term-previous-matching-input-from-input N)
Documentation
Search backwards through input history for match for current input.
(Previous history elements are earlier commands.)
With prefix argument N, search for Nth previous match.
If N is negative, search forwards for the -Nth following match.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/term.el.gz
(defun term-previous-matching-input-from-input (n)
"Search backwards through input history for match for current input.
\(Previous history elements are earlier commands.)
With prefix argument N, search for Nth previous match.
If N is negative, search forwards for the -Nth following match."
(interactive "p")
(when (not (memq last-command '(term-previous-matching-input-from-input
term-next-matching-input-from-input)))
;; Starting a new search
(setq term-matching-input-from-input-string
(buffer-substring
(process-mark (get-buffer-process (current-buffer)))
(point))
term-input-ring-index nil))
(term-previous-matching-input
(concat "^" (regexp-quote term-matching-input-from-input-string))
n))