From dad4406f70e8d84f6e0eb8dcc1398ddcb05bbaee Mon Sep 17 00:00:00 2001 From: khjcph Date: Wed, 14 Oct 2020 16:49:57 +0200 Subject: [PATCH] Only set undo system if fun. exists. The PR fixes an issue where spacemacs is in a bad state after upgrading. I suppose what happens is that `evil-set-undo-system` is invoked before `evil` is necessarily the correct version. --- CHANGELOG.develop | 1 + layers/+distributions/spacemacs-bootstrap/packages.el | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.develop b/CHANGELOG.develop index bae70da28..ba42e11f2 100644 --- a/CHANGELOG.develop +++ b/CHANGELOG.develop @@ -1365,6 +1365,7 @@ Other: - Fixed origami bindings in normal mode (thanks to Tomasz Kowal) - Handled buffer move/select/swap to last window nr +1 (thanks to duianto) - Set =evil-undo-system= to =undo-tree= (thanks to duianto) + - Checked that =evil-undo-system= exists before it's called (thanks to khjcph) *** Layer changes and fixes **** Agda - Fixes diff --git a/layers/+distributions/spacemacs-bootstrap/packages.el b/layers/+distributions/spacemacs-bootstrap/packages.el index 48cd8a3c6..bdd7e77bc 100644 --- a/layers/+distributions/spacemacs-bootstrap/packages.el +++ b/layers/+distributions/spacemacs-bootstrap/packages.el @@ -67,7 +67,8 @@ (require 'evil) (evil-mode 1) - (evil-set-undo-system 'undo-tree) + (when (fboundp 'evil-set-undo-system) + (evil-set-undo-system 'undo-tree)) ;; Use evil as a default jump handler (add-to-list 'spacemacs-default-jump-handlers 'evil-goto-definition)