From 851b51357ec1b305f02bbf25e34fa0c08e9f2641 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 28 Aug 2019 12:50:53 -0400 Subject: [PATCH] Fix #1712, #1719: project minor modes not activating --- core/core-projects.el | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/core/core-projects.el b/core/core-projects.el index c3365c16f..ba5a4a5f6 100644 --- a/core/core-projects.el +++ b/core/core-projects.el @@ -228,21 +228,21 @@ Relevant: `doom-project-hook'." `(lambda () (and (not (bound-and-true-p ,name)) (and buffer-file-name (not (file-remote-p buffer-file-name nil t))) - ,(when match - `(if buffer-file-name (string-match-p ,match buffer-file-name))) - ,(when files - ;; Wrap this in `eval' to prevent eager expansion - ;; of `project-file-exists-p!' from pulling in - ;; autoloaded files prematurely. - `(eval - '(project-file-exists-p! - ,(if (stringp (car files)) (cons 'and files) files)))) + ,(or (null match) + `(if buffer-file-name (string-match-p ,match buffer-file-name))) + ,(or (null files) + ;; Wrap this in `eval' to prevent eager expansion + ;; of `project-file-exists-p!' from pulling in + ;; autoloaded files prematurely. + `(eval + '(project-file-exists-p! + ,(if (stringp (car files)) (cons 'and files) files)))) ,(or when t) (,name 1))))) `((dolist (mode ,modes) (let ((hook-name (intern (format "doom--enable-%s%s-h" ',name - (if (eq mode t) "" (format "-in-" mode)))))) + (if (eq mode t) "" (format "-in-%s" mode)))))) (fset hook-name #',fn) (if (eq mode t) (add-to-list 'auto-minor-mode-magic-alist (cons hook-name #',name))