summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrégoire Duchêne <gduchene@awhk.org>2022-01-09 14:16:29 +0000
committerGrégoire Duchêne <gduchene@awhk.org>2022-01-09 14:16:29 +0000
commit041ed694a1bd633dbe1e561b55d2d55353bc6f7a (patch)
treef4ce51c45662c3e2314dd5b8e396e589912538db
parent8b4aa76b057201d945ce75abdb6b816f7caafd80 (diff)
emacs: Disable some modes only if present
-rw-r--r--emacs/early-init.el5
1 files changed, 3 insertions, 2 deletions
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