Fix void-function doom--resolve-path-forms error
By using project-file-exists-p! macro instead.
This commit is contained in:
parent
9d0966e94a
commit
205bf453de
1 changed files with 18 additions and 13 deletions
|
@ -224,20 +224,25 @@ Relevant: `doom-project-hook'."
|
||||||
(add-hook ',(intern (format "%s-hook" name)) hook)))
|
(add-hook ',(intern (format "%s-hook" name)) hook)))
|
||||||
(cond ((or files modes when)
|
(cond ((or files modes when)
|
||||||
(cl-check-type files (or null list string))
|
(cl-check-type files (or null list string))
|
||||||
(let ((fn `(lambda ()
|
(let ((fn
|
||||||
(and (not (bound-and-true-p ,name))
|
`(lambda ()
|
||||||
(and buffer-file-name (not (file-remote-p buffer-file-name nil t)))
|
(and (not (bound-and-true-p ,name))
|
||||||
,(or (null match)
|
(and buffer-file-name (not (file-remote-p buffer-file-name nil t)))
|
||||||
`(if buffer-file-name (string-match-p ,match buffer-file-name)))
|
,(when match
|
||||||
,(or (null files)
|
`(if buffer-file-name (string-match-p ,match buffer-file-name)))
|
||||||
(doom--resolve-path-forms
|
,(when files
|
||||||
(if (stringp (car files)) (cons 'and files) files)
|
;; Wrap this in `eval' to prevent eager expansion
|
||||||
'(doom-project-root)))
|
;; of `project-file-exists-p!' from pulling in
|
||||||
,(or when t)
|
;; autoloaded files prematurely.
|
||||||
(,name 1)))))
|
`(eval
|
||||||
|
'(project-file-exists-p!
|
||||||
|
,(if (stringp (car files)) (cons 'and files) files))))
|
||||||
|
,(or when t)
|
||||||
|
(,name 1)))))
|
||||||
`((dolist (mode ,modes)
|
`((dolist (mode ,modes)
|
||||||
(let ((hook-name (intern (format "doom--enable-%s%s-h" ',name
|
(let ((hook-name
|
||||||
(if (eq mode t) "" (format "-in-" mode))))))
|
(intern (format "doom--enable-%s%s-h" ',name
|
||||||
|
(if (eq mode t) "" (format "-in-" mode))))))
|
||||||
(fset hook-name #',fn)
|
(fset hook-name #',fn)
|
||||||
(if (eq mode t)
|
(if (eq mode t)
|
||||||
(add-to-list 'auto-minor-mode-magic-alist (cons hook-name #',name))
|
(add-to-list 'auto-minor-mode-magic-alist (cons hook-name #',name))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue