diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-07-01 10:32:47 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-07-01 10:32:47 -0700 |
commit | 01e419ac514ef54f3fc3c3dbf21cf16686474892 (patch) | |
tree | 66a1f10274899882c48ebeee978ce48896f00a1c /.emacs.d | |
parent | d1b902dc08b261c2b4f6e896bb516b5e532c86d9 (diff) | |
download | dotfiles-01e419ac514ef54f3fc3c3dbf21cf16686474892.tar.gz |
avoid trying to change the package when compilation failed
The package may not exist.
Diffstat (limited to '.emacs.d')
-rw-r--r-- | .emacs.d/init-spw.el | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/.emacs.d/init-spw.el b/.emacs.d/init-spw.el index ed79bb7c..46e1ea77 100644 --- a/.emacs.d/init-spw.el +++ b/.emacs.d/init-spw.el @@ -2041,11 +2041,17 @@ Called by that script using emacsclient(1)." (user-error "Consfig git repo not found")) (dired repo)) (cl-flet ((load () - (slime-load-system "com.silentflame.consfig") - (spw/add-once-hook - 'slime-compilation-finished-hook - (lambda (&rest ignore) - (slime-repl-set-package "COM.SILENTFLAME.CONSFIG"))))) + (slime-load-system "com.silentflame.consfig") + (spw/add-once-hook + 'slime-compilation-finished-hook + (lambda (notes) + ;; see `slime-maybe-show-compilation-log' + (unless (memq 'slime-maybe-show-compilation-log + slime-compilation-finished-hook) + (slime-create-compilation-log notes)) + (when (slime-compilation-result.successp + slime-last-compilation-result) + (slime-repl-set-package "COM.SILENTFLAME.CONSFIG")))))) (if (and (fboundp 'slime-output-buffer) (slime-output-buffer)) (progn (slime-switch-to-output-buffer) (load)) |