Function: comint-history-isearch-wrap

comint-history-isearch-wrap is a byte-compiled function defined in comint.el.gz.

Signature

(comint-history-isearch-wrap)

Documentation

Wrap the input history search when search fails.

Move point to the first history element for a forward search, or to the last history element for a backward search.

Source Code

;; Defined in /usr/src/emacs/lisp/comint.el.gz
(defun comint-history-isearch-wrap ()
  "Wrap the input history search when search fails.
Move point to the first history element for a forward search,
or to the last history element for a backward search."
  ;; When `comint-history-isearch-search' fails on reaching the
  ;; beginning/end of the history, wrap the search to the first/last
  ;; input history element.
  (if isearch-forward
      (comint-goto-input (1- (ring-length comint-input-ring)))
    (comint-goto-input nil))
  (goto-char (if isearch-forward (comint-line-beginning-position) (point-max))))