From 295f54558b9e1d10eaaacc60e27a8c2b14b88bc2 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Fri, 3 Jun 2022 16:24:13 -0700 Subject: fix(settings): run `exec-path-from-shell' when we're on a mac Don't add `exec-path-from-shell' to the hook `emacs-startup-hook' has it's executed after `init.el' has been loaded. We need to run this when we're at this stage while processing all the init files, so that we configure correctly the path. For example, before this change, `aspell' was not used as the spell checker on mac before we were setting it to nil (the path was not set properly when we were initializing ispell through flyspell). Change-Id: I37d3e8d1c08b50966f1fe0df2579c06e37830e9a --- emacs/custom/my-settings.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'emacs/custom') diff --git a/emacs/custom/my-settings.el b/emacs/custom/my-settings.el index 5ff81d1..e6c1ce9 100644 --- a/emacs/custom/my-settings.el +++ b/emacs/custom/my-settings.el @@ -53,14 +53,14 @@ (customize-set-variable 'save-place-forget-unreadable-files t) (add-hook 'after-init-hook #'save-place-mode) +(when (memq window-system '(mac ns)) + (require 'exec-path-from-shell) + (exec-path-from-shell-initialize)) + (unless (and (fboundp 'server-running-p) (server-running-p)) (server-start)) -(when (memq window-system '(mas ns)) - (require 'exec-path-from-shell) - (add-hook 'emacs-startup-hook (lambda () (exec-path-from-shell-initialize)))) - (require 'yasnippet) ;; I want the snippets under `etc' -- cgit 1.4.1