From 4cd5d08d7ded78738991b6c525b5d05a898976d4 Mon Sep 17 00:00:00 2001 From: Andreas Gerler Date: Sat, 8 Oct 2016 18:35:52 +0200 Subject: [PATCH] added jcs-kill-a-buffer Kill the current buffer without asking if there is no prefix. Signed-off-by: Andreas Gerler --- bba.org | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/bba.org b/bba.org index 543b7fc2..a9a3f063 100644 --- a/bba.org +++ b/bba.org @@ -2700,6 +2700,22 @@ positions. "python -mjson.tool" (current-buffer) t))) #+END_SRC +* [[http://irreal.org/blog/?p=5585][kill this buffer]] +[2016-09-26 Mon 13:22] + +Kill the current buffer without asking if there is no prefix. + +#+BEGIN_SRC emacs-lisp + (defun jcs-kill-a-buffer (askp) + (interactive "P") + (if askp + (kill-buffer (funcall completing-read-function + "Kill buffer: " + (mapcar #'buffer-name (buffer-list)))) + (kill-this-buffer))) + + (global-set-key (kbd "C-x k") 'jcs-kill-a-buffer) +#+END_SRC * configure some default values [2014-10-02 Thu 00:27] -- 2.47.3