1
0
Fork 0
dotfiles/.emacs.d/include/racket.el
Lucas Sta Maria 1563dff6b2
fix(emacs): add keybind for clearing racket repl
Signed-off-by: Lucas Sta Maria <lucas@priime.dev>
2024-01-29 12:43:43 -05:00

27 lines
972 B
EmacsLisp

;;; racket.el --- Configuration for Racket.
;;; Commentary:
;; Configuration for Racket and Racket-based languages, including Pollen.
;;; Code:
(add-to-list 'load-path (expand-file-name "lisp/pollen-mode" user-emacs-directory))
(autoload 'pollen-mode "pollen" "A major mode for the pollen preprocessor." t)
;; Recognize pollen filetypes
(setq auto-mode-alist (cons '("\\.pp$" . racket-mode) auto-mode-alist))
(setq auto-mode-alist (cons '("\\.pm$" . pollen-mode) auto-mode-alist))
(setq auto-mode-alist (cons '("\\.pmd$" . pollen-mode) auto-mode-alist))
(defun configure-racket-repl ()
"Configure keybinds for the racket repl."
(keymap-local-set "C-c C-a" #'racket-repl-clear-leaving-last-prompt))
(add-hook 'racket-repl-mode-hook #'configure-racket-repl)
(defun configure-scribble ()
"Configure keybinds for scribble."
(keymap-local-set "C-c C-c" #'compile))
(add-hook 'scribble-mode-hook #'configure-scribble)
(provide 'racket)
;;; racket.el ends here