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

@@ -0,0 +1,26 @@
;;; emacs-lisp.el -*- lexical-binding: t; -*-
(require 'syd-handle-repl)
(use-package ielm
:hook (emacs-lisp-mode)
:custom ((ielm-history-file-name ; Stay out of my config dir!
(file-name-concat syd-cache-dir "ielm-history.eld")))
:config
(defun syd/open-emacs-lisp-repl ()
(interactive)
(pop-to-buffer
(or (get-buffer "*ielm*")
(progn (ielm) ; Creates the *ielm* buffer.
(let ((b (get-buffer "*ielm*")))
;; We leave it to the enclosing `pop-to-buffer' to display the
;; buffer.
(bury-buffer b)
b)))))
(add-to-list '+syd-major-mode-repl-alist
'(emacs-lisp-mode syd/open-emacs-lisp-repl))
(pp +popup-defaults))
(provide 'syd-lang-emacs-lisp)