From 193fa1463da76ebcdaa9c90970c09384e067da0c Mon Sep 17 00:00:00 2001 From: Lars Tveito Date: Sat, 14 Mar 2015 17:23:29 +0100 Subject: [PATCH] Make sure modes are available before toggling. --- emacs-init.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/emacs-init.el b/emacs-init.el index e82178f..8becfe8 100644 --- a/emacs-init.el +++ b/emacs-init.el @@ -34,7 +34,8 @@ global-undo-tree-mode ; use undo-tree-mode globally ;; Enable more modes by adding them here )) - (funcall mode 1)) + (when (fboundp mode) + (funcall mode 1))) (dolist (mode '(blink-cursor-mode ; stop blinking cursor menu-bar-mode ; no menubar @@ -42,7 +43,8 @@ scroll-bar-mode ; scrollbar? no ;; Disable more modes by adding them here. )) - (funcall mode 0)) + (when (fboundp mode) + (funcall mode 0))) ;; No splash screen (setq inhibit-splash-screen t)