-(run-with-idle-timer 0.4 nil #'require 'which-key)
-(with-eval-after-load 'which-key
- (csetq
- which-key-add-column-padding 5
- which-key-idle-delay 10000
- which-key-idle-secondary-delay 0.05
- which-key-max-description-length 32
- which-key-show-early-on-C-h t)
- (which-key-add-key-based-replacements
- ;; prefixes for global prefixes and minor modes
- "C-c !" "flycheck"
- "C-x RET" "coding system"
- "C-x 8" "unicode"
- "C-x @" "event modifiers"
- "C-x a" "abbrev/expand"
- "C-x r" "rectangle/register/bookmark"
- "C-x t" "tabs"
- "C-x v" "version control"
- "C-x X" "edebug"
- "C-x C-a" "edebug"
- "C-x C-k" "kmacro"
- ;; prefixes for my personal bindings
- "C-c &" "yasnippet"
- "C-c a" "applications"
- "C-c a e" "erc"
- "C-c a o" "org"
- "C-c a s" "shells"
- "C-c b" "buffers"
- "C-c c" "compile-and-comments"
- "C-c e" "eval"
- "C-c f" "files"
- "C-c F" "frames"
- "C-c g" "magit"
- "C-S-h" "help(ful)"
- "C-c q" "boxquote"
- "C-c t" "themes")
- ;; prefixes for major modes
- (which-key-add-major-mode-key-based-replacements 'org-mode
- "C-c C-v" "org-babel")
- (which-key-mode))
-
-;; (require 'bandali-projectile)
-
-(run-with-idle-timer 0.6 nil #'require 'unkillable-scratch)
-(with-eval-after-load 'unkillable-scratch
- (csetq unkillable-buffers '("^\\*scratch\\*$" "^\\*Messages\\*$"))
- (unkillable-scratch 1))
+(defun b/*scratch* ()
+ "Switch to `*scratch*' buffer, creating it if it does not exist."
+ (interactive)
+ (switch-to-buffer
+ (or (get-buffer "*scratch*")
+ (with-current-buffer (get-buffer-create "*scratch*")
+ (set-buffer-major-mode (current-buffer))
+ (current-buffer)))))
+(global-set-key (kbd "C-c s") #'b/*scratch*)