From 041ed694a1bd633dbe1e561b55d2d55353bc6f7a Mon Sep 17 00:00:00 2001 From: GrĂ©goire DuchĂȘne Date: Sun, 9 Jan 2022 14:16:29 +0000 Subject: emacs: Disable some modes only if present --- emacs/early-init.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'emacs') diff --git a/emacs/early-init.el b/emacs/early-init.el index 9eaf316..4080f10 100644 --- a/emacs/early-init.el +++ b/emacs/early-init.el @@ -22,8 +22,9 @@ directories." gc-cons-threshold (* 50 1024 1024)) (menu-bar-mode -1) -(scroll-bar-mode -1) -(tool-bar-mode -1) +;; Those functions may not exist if the GUI is not compiled in. +(if (fboundp 'scroll-bar-mode) (scroll-bar-mode -1)) +(if (fboundp 'tool-bar-mode) (tool-bar-mode -1)) ;; Further Early Customization -- cgit v1.2.3-70-g09d2