From 809e3e0af8a67a60c3d70ec6edbea21f6b52300c Mon Sep 17 00:00:00 2001 From: Alison Watson Date: Fri, 20 Mar 2020 23:24:19 -0400 Subject: [PATCH] emacs: use lambda for initial-buffer-choice --- emacs/init.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/emacs/init.el b/emacs/init.el index af62878..dbfe509 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -10,7 +10,6 @@ global-mark-ring-max 1024 inhibit-compacting-font-caches t inhibit-startup-screen t - initial-buffer-choice "~/org/init.org" initial-scratch-message nil mark-ring-max 1024) @@ -61,6 +60,12 @@ (add-hook 'hack-local-variables-hook #'agw-after-local-vars) ;; macros +(setq initial-buffer-choice + (lambda () + (if (buffer-file-name) + (current-buffer) + (find-file "~/org/init.org")))) + (add-hook 'emacs-lisp-mode-hook #'agw-fp-mode) (add-hook 'lisp-mode-hook #'agw-fp-mode) (add-hook 'reb-lisp-mode-hook #'agw-fp-mode)