mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
- Switch from highlight-indentation package to highlight-indent-guides. - Activate visual indentation in a prog-mode hook, rather than doing within each individual major mode. It was already done within all major modes based on prog-mode anyway. - Add new siren-display-indetation module and function as a central way to enable visual indetation guides. This makes switching the underlying package at some point in the future much easier.
42 lines
1.3 KiB
EmacsLisp
42 lines
1.3 KiB
EmacsLisp
;;; siren-emacs-lisp.el --- jimeh's Emacs Siren: emacs-lisp-mode configuration.
|
|
|
|
;;; Commentary:
|
|
|
|
;; Basic configuration for emacs-lisp-mode.
|
|
|
|
;;; Code:
|
|
|
|
(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-setup ()
|
|
"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)
|
|
)
|
|
|
|
(add-hook 'emacs-lisp-mode-hook #'siren-emacs-lisp-mode-setup)
|
|
(add-to-list 'auto-mode-alist '("Cask\\'" . emacs-lisp-mode))
|
|
|
|
(provide 'siren-emacs-lisp)
|
|
;;; siren-emacs-lisp.el ends here
|