From 68c18e860f9f72c029f52701483aabe90d340e5c Mon Sep 17 00:00:00 2001 From: bard Date: Fri, 22 Mar 2024 21:47:19 -0400 Subject: move scratch to own library --- bard-elisp/bard-scratch.el | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 bard-elisp/bard-scratch.el (limited to 'bard-elisp/bard-scratch.el') diff --git a/bard-elisp/bard-scratch.el b/bard-elisp/bard-scratch.el new file mode 100644 index 0000000..7775336 --- /dev/null +++ b/bard-elisp/bard-scratch.el @@ -0,0 +1,32 @@ +;; Text Scratch buffers +(defun bard/new-org-buffer () + (interactive) + (let ((xbuf (generate-new-buffer "*org*"))) + (switch-to-buffer xbuf) + (funcall (quote org-mode)) + (text-scale-increase 1.5) + xbuf)) +(define-key global-map (kbd "M-=") #'bard/new-org-buffer) + +(defun bard/new-plain-buffer () + (interactive) + (let ((xbuf (generate-new-buffer "*plain*"))) + (switch-to-buffer xbuf) + (text-scale-increase 1.5) + xbuf)) + +(define-key global-map (kbd "M--") #'bard/new-plain-buffer) + +;; elisp scratch buffer + +(defun bard/new-elisp-buffer () + (interactive) + (let ((xbuf (generate-new-buffer "*elisp*"))) + (switch-to-buffer xbuf) + (funcall (quote emacs-lisp-mode)) + (text-scale-increase 1.5) + xbuf)) + +(define-key global-map (kbd "C-z C-s") #'bard-new-elisp-buffer) + +(provide 'bard-scratch.el) -- cgit v1.2.3