Skip to content

Commit

Permalink
Fix straight.elc with multiple Emacs versions
Browse files Browse the repository at this point in the history
  • Loading branch information
raxod502 committed Jul 13, 2019
1 parent 01c602c commit 7ea8798
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bootstrap.el
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@
nil 'nomessage 'nosuffix)
(setq emacs-version-changed nil))
(when emacs-version-changed
;; Sometimes when switching between different Emacs versions,
;; we get an odd error message "Cannot overwrite file". This
;; is solved by deleting the .elc file before trying to
;; recompile.
(delete-file (concat straight.el "c"))
;; Don't use the optional LOAD argument for
;; `byte-compile-file' because it emits a message.
(byte-compile-file straight.el)
Expand Down

0 comments on commit 7ea8798

Please sign in to comment.