summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-06-03 16:24:13 -0700
committerFranck Cuny <franck@fcuny.net>2022-06-03 16:24:13 -0700
commit295f54558b9e1d10eaaacc60e27a8c2b14b88bc2 (patch)
treeb7b266e5eada6b7ba79309c8cf936b3ad0a68057
parentfix(emacs): specify where to store customizations (diff)
downloademacs.d-295f54558b9e1d10eaaacc60e27a8c2b14b88bc2.tar.gz
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
-rw-r--r--emacs/custom/my-settings.el8
1 files changed, 4 insertions, 4 deletions
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'