Move doom-file-cookie-p to core-dispatcher
And rename it to doom--file-cookie-p
This commit is contained in:
parent
c22b3da9f9
commit
3c7c5d5120
2 changed files with 12 additions and 12 deletions
|
@ -90,16 +90,6 @@ This is used by `associate!', `file-exists-p!' and `project-file-exists-p!'."
|
|||
"Return EXP wrapped in a list, or as-is if already a list."
|
||||
(if (listp exp) exp (list exp)))
|
||||
|
||||
(defun doom-file-cookie-p (file)
|
||||
"Returns the return value of the ;;;###if predicate form in FILE."
|
||||
(with-temp-buffer
|
||||
(insert-file-contents-literally file nil 0 256)
|
||||
(if (and (re-search-forward "^;;;###if " nil t)
|
||||
(<= (line-number-at-pos) 3))
|
||||
(let ((load-file-name file))
|
||||
(eval (sexp-at-point)))
|
||||
t)))
|
||||
|
||||
(defun doom-keyword-intern (str)
|
||||
"Converts STR (a string) into a keyword (`keywordp')."
|
||||
(or (stringp str)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue