Function: kill-current-buffer

kill-current-buffer is an interactive and byte-compiled function defined in simple.el.gz.

Signature

(kill-current-buffer)

Documentation

Kill the current buffer.

When called in the minibuffer, get out of the minibuffer using abort-recursive-edit.

This is like kill-this-buffer, but it doesn't have to be invoked via the menu bar, and pays no attention to the menu-bar's frame.

View in manual

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/simple.el.gz
(defun kill-current-buffer ()
  "Kill the current buffer.
When called in the minibuffer, get out of the minibuffer
using `abort-recursive-edit'.

This is like `kill-this-buffer', but it doesn't have to be invoked
via the menu bar, and pays no attention to the menu-bar's frame."
  (interactive)
  (let ((frame (selected-frame)))
    (if (and (frame-live-p frame)
             (not (window-minibuffer-p (frame-selected-window frame))))
        (kill-buffer (current-buffer))
      (abort-recursive-edit))))