dotemacs

My Emacs configuration
git clone git://git.entf.net/dotemacs
Log | Files | Refs | LICENSE

commit 5b3a91cd501ed9e980bf6b4285a8fa3124155c6a
parent 176221acbe983321ddd8bd6b809c199f717e3583
Author: Lukas Henkel <lh@entf.net>
Date:   Sat, 14 May 2022 20:20:08 +0200

Easy way to create new empty buffers

Diffstat:
Minit.el | 2++
Mlisp/lh.el | 7+++++++
2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/init.el b/init.el @@ -132,6 +132,8 @@ ("C-# n" . mc/mark-next-like-this) ("C-# p" . mc/mark-previous-like-this) + ("C-c n" . lh/buffer-create-new) + ("<mouse-8>" . xref-go-back) ("<mouse-9>" . xref-go-forward))) diff --git a/lisp/lh.el b/lisp/lh.el @@ -105,4 +105,11 @@ (interactive "MData: ") (insert (json-serialize obj))) +(defun lh/buffer-create-new () + (interactive) + (let ((buf (generate-new-buffer "new"))) + (switch-to-buffer buf) + (setq-local buffer-offer-save t) + buf)) + (provide 'lh)