Function: isearch-delete-char

isearch-delete-char is an interactive and byte-compiled function defined in isearch.el.gz.

Signature

(isearch-delete-char)

Documentation

Undo last input item during a search.

An input item is the result of a command that pushes a new state of isearch (as recorded by the isearch--state structure) to isearch-cmds. Info node (emacs)Basic Isearch explains when Emacs records a new input item.

If no input items have been entered yet, just beep.

This function has :around advice: evil--exit-search-when-empty.

View in manual

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/isearch.el.gz
(defun isearch-delete-char ()
  "Undo last input item during a search.

An input item is the result of a command that pushes a new state
of isearch (as recorded by the `isearch--state' structure) to
`isearch-cmds'.  Info node `(emacs)Basic Isearch' explains when
Emacs records a new input item.

If no input items have been entered yet, just beep."
  (interactive)
  (if (null (cdr isearch-cmds))
      (ding)
    (isearch-pop-state))
  ;; When going back to the hidden match, reopen it and close other overlays.
  (when (and (eq isearch-invisible 'open) isearch-hide-immediately)
    (if isearch-other-end
        (let ((search-invisible isearch-invisible))
          (isearch-range-invisible (min (point) isearch-other-end)
                                   (max (point) isearch-other-end)))
      (isearch-close-unnecessary-overlays (point) (point))))
  (isearch-update))