diff options
| author | Miquel Sabaté Solà <msabate@suse.com> | 2020-04-21 14:15:49 +0200 |
|---|---|---|
| committer | Miquel Sabaté Solà <msabate@suse.com> | 2020-04-21 14:15:49 +0200 |
| commit | 5341d2183082f68c0f8d65ba845bb8a58030d3c3 (patch) | |
| tree | 33b61d63b2b88f398cd627529f29d91eae7cfee2 | |
| parent | 58e628aaeecb0e5aebd684946aba89ca2a09a35f (diff) | |
| download | dotfiles-5341d2183082f68c0f8d65ba845bb8a58030d3c3.tar.gz dotfiles-5341d2183082f68c0f8d65ba845bb8a58030d3c3.zip | |
emacs: prefer newer files for local stuff
I have some stuff that I've built locally, and in those cases I'd prefer GNU
Emacs not picking the first stuff that it sees, but instead pick the newest
file, even if that involves stating which file is newer and so on.
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
| -rw-r--r-- | .emacs.d/init.org | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/.emacs.d/init.org b/.emacs.d/init.org index db15e23..618efcd 100644 --- a/.emacs.d/init.org +++ b/.emacs.d/init.org @@ -172,8 +172,10 @@ Compile the =g.el= script and bind it to @@html:<kbd>M-g</kbd>@@. #+BEGIN_SRC elisp (if (file-exists-p (concat user-emacs-directory "lisp/g.elc")) - (load-file (concat user-emacs-directory "lisp/g.elc")) + (let ((load-prefer-newer t)) + (load-file (concat user-emacs-directory "lisp/g.elc"))) (byte-compile-file (concat user-emacs-directory "lisp/g.el") t)) + (global-set-key (kbd "M-g") 'g) #+END_SRC @@ -1985,7 +1987,8 @@ There is this handy minor mode I've built which is [[https://github.com/mssola/w (shell-command "make build")) ;; Then load the byte-compiled files. - (let ((list (directory-files writer-source t ".elc$"))) + (let ((list (directory-files writer-source t ".elc$")) + (load-prefer-newer t)) (while list (load-file (car list)) (setq list (cdr list)))) |
