From 39b085fbabbf123270b6769ce062898645f4cd6e Mon Sep 17 00:00:00 2001 From: Jessie Hildebrandt Date: Sat, 29 Aug 2020 18:14:11 -0400 Subject: [PATCH] Fix focus change function use for Emacs 26 --- init.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/init.el b/init.el index e41ec90..b93f429 100644 --- a/init.el +++ b/init.el @@ -52,7 +52,9 @@ (add-hook 'minibuffer-exit-hook #'restore-garbage-collection) ;; Collect all garbage whenever the focus changes to/from Emacs. -(add-function :after after-focus-change-function #'garbage-collect) +(if (>= emacs-major-version 27) + (add-function :after after-focus-change-function #'garbage-collect) + (add-hook 'focus-out-hook #'garbage-collect)) ;;==================== ;; Variables/Basic Config.