From: Andreas Gerler Date: Sat, 8 Oct 2016 16:35:52 +0000 (+0200) Subject: added jcs-kill-a-buffer X-Git-Url: http://git.bundesbrandschatzamt.de/?a=commitdiff_plain;h=4cd5d08d7ded78738991b6c525b5d05a898976d4;p=emacsconfig.git added jcs-kill-a-buffer Kill the current buffer without asking if there is no prefix. Signed-off-by: Andreas Gerler --- 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]