;;; emacs-lisp.el -*- lexical-binding: t; -*- (require 'syd-handle-repl) ;; Don't `use-package' `ielm', since it's loaded by Emacs. You'll get weird ;; autoload errors if you do. ;; https://www.reddit.com/r/emacs/comments/q7fjbi/comment/lml127d (use-package emacs :custom ((ielm-history-file-name ; Stay out of my config dir! (file-name-concat syd-cache-dir "ielm-history.eld")))) (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)) (provide 'syd-lang-emacs-lisp)