feat: REPLs, by major mode, by project

Also includes Doom's popup code. }:)
This commit is contained in:
Madeleine Sydney
2025-01-27 03:21:52 -07:00
parent 2e11e3838a
commit 9bb1534b68
14 changed files with 1683 additions and 7 deletions

View File

@@ -4,15 +4,15 @@
;; Persist the scratch buffer between sessions. Note that it is not persisted
;; between boots.
;; TODO: This could be deferred better.
;; TODO: This could be better deferred.
(use-package persistent-scratch
:hook (after-init)
:custom (persistent-scratch-save-file
(file-name-concat syd-data-dir "scratch"))
:config
;; The default error/warning message is a bit too error-looking for my tastes.
;; This is the same function, but with a tamer warning message.
(defun syd--persistent-scratch--auto-restore ()
;; The default warning message is a bit too error-looking for my tastes. This
;; is the same function, but with a tamer warning message.
(defun syd--persistent-scratch--auto-restore-a ()
"Automatically restore the scratch buffer once per session."
(unless persistent-scratch--auto-restored
(condition-case err
@@ -21,7 +21,7 @@
(message "No previous scratch buffer to restore")))
(setq persistent-scratch--auto-restored t)))
(advice-add #'persistent-scratch--auto-restore
:override #'syd--persistent-scratch--auto-restore)
:override #'syd--persistent-scratch--auto-restore-a)
;; Arrange the activation of autosave and auto-restore (if applicable) on
;; Emacs start.