cp-lisp.el - auto-compile-on-save code for elisp
emacs-init-time to open a session showing (only) the *Messages* buffer - before (no byte-compilation) - 13.1s after (with byte-compilation) - 12.7s
This commit is contained in:
parent
f8fe50bd38
commit
317dc6b44c
|
@ -1,5 +1,6 @@
|
|||
*~
|
||||
*~
|
||||
erc/logs/
|
||||
elpa/*readme.txt
|
||||
elpa/
|
||||
elisp-git/
|
||||
*elc
|
|
@ -33,3 +33,11 @@
|
|||
:keymap geiser-mode-map
|
||||
:bindings
|
||||
`((,(kbd "C-.")))))
|
||||
|
||||
(autoload 'byte-recompile-file "bytecomp" "byte-recompile-file" t)
|
||||
(defun cp-byte-recompile-el-buffer ()
|
||||
"Run byte-recompile-file on current buffer if current buffer is
|
||||
an Emacs Lisp file."
|
||||
(if (equal major-mode 'emacs-lisp-mode)
|
||||
(byte-compile-file (buffer-name))))
|
||||
(add-hook 'after-save-hook 'cp-byte-recompile-el-buffer)
|
||||
|
|
Loading…
Reference in New Issue