Move denote--regexp-in-file-p further up

This commit is contained in:
Protesilaos Stavrou 2026-04-06 21:56:59 +03:00
parent 53bb758384
commit acadd80426
No known key found for this signature in database
GPG key ID: 99BD6459CD5CA3EA

View file

@ -2703,6 +2703,11 @@ or `line', referring to what the function should retrieve."
(denote--define-retrieve-front-matter date value)
(denote--define-retrieve-front-matter date line)
(defun denote--regexp-in-file-p (regexp file)
"Return t if REGEXP matches in the FILE."
(denote--file-with-temp-buffer file
(re-search-forward regexp nil t 1)))
;; These are private front matter retrieval functions, working with a content parameter
(defmacro denote--define-retrieve-front-matter-from-content (component scope)
@ -3934,11 +3939,6 @@ if appropriate."
(goto-char (point-min))
(insert new-front-matter))))
(defun denote--regexp-in-file-p (regexp file)
"Return t if REGEXP matches in the FILE."
(denote--file-with-temp-buffer file
(re-search-forward regexp nil t 1)))
(defun denote-rewrite-keywords (file keywords file-type &optional save-buffer)
"Rewrite KEYWORDS in FILE outright according to FILE-TYPE.