Function: isearch-end-of-buffer

isearch-end-of-buffer is an interactive and byte-compiled function defined in isearch.el.gz.

Signature

(isearch-end-of-buffer &optional ARG)

Documentation

Go to the last occurrence of the current search string.

Move point to the end of the buffer and search backwards from the bottom. With a numeric argument, go to the ARGth absolute occurrence counting from the end of the buffer. To find the next relative occurrence backwards, type C-r (isearch-repeat-backward) with a numeric argument. You might want to use isearch-allow-motion instead of this command.

Probably introduced at or before Emacs version 27.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/isearch.el.gz
(defun isearch-end-of-buffer (&optional arg)
  "Go to the last occurrence of the current search string.
Move point to the end of the buffer and search backwards from the bottom.
\\<isearch-mode-map>
With a numeric argument, go to the ARGth absolute occurrence counting from
the end of the buffer.  To find the next relative occurrence backwards,
type \\[isearch-repeat-backward] with a numeric argument.
You might want to use `isearch-allow-motion' instead of this command."
  (interactive "p")
  (if (and arg (< arg 0))
      (isearch-beginning-of-buffer (abs arg))
    (setq isearch-just-started t)
    (goto-char (point-max))
    (let ((current-direction (if isearch-forward 'forward 'backward))
          (isearch-repeat-on-direction-change nil))
      (isearch-repeat 'backward arg)
      (unless (eq current-direction (if isearch-forward 'forward 'backward))
        (isearch-repeat current-direction)))))