Auto-compile elisp files & delete trailing whitespaces
This commit is contained in:
parent
5ea3bc9176
commit
71a8c6f767
1 changed files with 8 additions and 0 deletions
|
@ -7,6 +7,14 @@
|
||||||
(defadvice emacs-lisp-mode (after emacs-lisp-mode-rename-modeline activate)
|
(defadvice emacs-lisp-mode (after emacs-lisp-mode-rename-modeline activate)
|
||||||
(setq mode-name "Elisp"))
|
(setq mode-name "Elisp"))
|
||||||
|
|
||||||
|
(defun narf-elisp-auto-compile ()
|
||||||
|
(when (narf/is-compilable-p)
|
||||||
|
(narf:compile-el)))
|
||||||
|
|
||||||
|
(add-hook! emacs-lisp-mode
|
||||||
|
(add-hook 'before-save-hook 'delete-trailing-whitespace nil t)
|
||||||
|
(add-hook 'after-save-hook 'narf-elisp-auto-compile nil t))
|
||||||
|
|
||||||
;; Real go-to-definition for elisp
|
;; Real go-to-definition for elisp
|
||||||
(bind! :map emacs-lisp-mode-map
|
(bind! :map emacs-lisp-mode-map
|
||||||
:m "gd" 'narf/elisp-find-function-at-pt
|
:m "gd" 'narf/elisp-find-function-at-pt
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue