mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
I've taken a lot of inspiration from Emacs-Prelude when it came to the structure of this rewritten config. I didn't want to use Prelude as I don't agree with all it's defaults, nor do I want to have to deal with any future changes in Prelude that might break things for me. So instead I went down the fully custom path, but heavily inspired by Prelude, both in terms of file/code structure, and also some of it's features. Compared to my old config setup, it's got most of the same things, but nearly everything is in a module file now, making it easy to fully enable/disable certain features.
48 lines
1.3 KiB
EmacsLisp
48 lines
1.3 KiB
EmacsLisp
;;
|
|
;; emacs-lisp
|
|
;;
|
|
|
|
(siren-require-packages '(rainbow-mode))
|
|
|
|
(require 'siren-lisp)
|
|
|
|
(defun siren-recompile-elc-on-save ()
|
|
"Recompile your elc when saving an elisp file."
|
|
(add-hook 'after-save-hook
|
|
(lambda ()
|
|
(when (and
|
|
(string-prefix-p siren-dir (file-truename buffer-file-name))
|
|
(file-exists-p (byte-compile-dest-file buffer-file-name)))
|
|
(emacs-lisp-byte-compile)))
|
|
nil
|
|
t))
|
|
|
|
(defun siren-conditional-emacs-lisp-checker ()
|
|
"Don't check doc style in Emacs Lisp test files."
|
|
(let ((file-name (buffer-file-name)))
|
|
(when (and file-name (string-match-p ".*-tests?\\.el\\'" file-name))
|
|
(setq-local flycheck-checkers '(emacs-lisp)))))
|
|
|
|
(defun siren-emacs-lisp-mode-defaults ()
|
|
"Sensible defaults for `emacs-lisp-mode'."
|
|
; (run-hooks 'siren-lisp-coding-hook)
|
|
; (eldoc-mode +1)
|
|
; (siren-recompile-elc-on-save)
|
|
; (rainbow-mode +1)
|
|
; (setq mode-name "EL")
|
|
; (siren-conditional-emacs-lisp-checker)
|
|
)
|
|
|
|
(setq siren-emacs-lisp-mode-hook 'siren-emacs-lisp-mode-defaults)
|
|
|
|
(add-hook 'emacs-lisp-mode-hook (lambda ()
|
|
(run-hooks 'siren-emacs-lisp-mode-hook)))
|
|
|
|
(add-to-list 'auto-mode-alist '("Cask\\'" . emacs-lisp-mode))
|
|
|
|
(eval-after-load "rainbow-mode"
|
|
'(diminish 'rainbow-mode))
|
|
|
|
|
|
(provide 'siren-emacs-lisp)
|