Fix #313 - invoke prelude-remove-elc-on-save only for Emacs Lisp buffers
This commit is contained in:
parent
72294d1e70
commit
5e93ddc62b
1 changed files with 3 additions and 2 deletions
|
@ -37,11 +37,12 @@
|
||||||
|
|
||||||
(defun prelude-remove-elc-on-save ()
|
(defun prelude-remove-elc-on-save ()
|
||||||
"If you're saving an elisp file, likely the .elc is no longer valid."
|
"If you're saving an elisp file, likely the .elc is no longer valid."
|
||||||
(make-local-variable 'after-save-hook)
|
|
||||||
(add-hook 'after-save-hook
|
(add-hook 'after-save-hook
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(if (file-exists-p (concat buffer-file-name "c"))
|
(if (file-exists-p (concat buffer-file-name "c"))
|
||||||
(delete-file (concat buffer-file-name "c"))))))
|
(delete-file (concat buffer-file-name "c"))))
|
||||||
|
nil
|
||||||
|
t))
|
||||||
|
|
||||||
(defun prelude-visit-ielm ()
|
(defun prelude-visit-ielm ()
|
||||||
"Switch to default `ielm' buffer.
|
"Switch to default `ielm' buffer.
|
||||||
|
|
Loading…
Reference in a new issue