branch: externals/denote
commit 26c97bdee23f389db839e531d1fcb33bb0b2f1a4
Author: Protesilaos Stavrou <[email protected]>
Commit: Protesilaos Stavrou <[email protected]>
Make denote-directory-files-matching-regexp public
This is the same idea as with commit c294eaf.
It means that users or developers can rely on this function in their own
code. By making it "public" (removing the double hyphens), we declare
that we will keep this form in check and document any changes to its
behaviour.
---
denote.el | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/denote.el b/denote.el
index 522293ba31..00d78d2e7f 100644
--- a/denote.el
+++ b/denote.el
@@ -521,15 +521,18 @@ include files that are not implied by
`denote-file-types'."
(string-prefix-p id (file-name-nondirectory f)))
(denote-directory-files)))
-(defun denote--directory-files-matching-regexp (regexp)
- "Return list of files matching REGEXP.
-Files are those which satisfy `denote--file-has-identifier-p' and
-`denote--file-name-relative-to-denote-directory'."
+(defun denote-directory-files-matching-regexp (regexp)
+ "Return list of files matching REGEXP in `denote-directory-files'."
(seq-filter
(lambda (f)
(string-match-p regexp (denote--file-name-relative-to-denote-directory
f)))
(denote-directory-files)))
+(define-obsolete-function-alias
+ 'denote--directory-files-matching-regexp
+ 'denote-directory-files-matching-regexp
+ "1.0.0")
+
;;;; Keywords
(defun denote--extract-keywords-from-path (path)
@@ -2270,7 +2273,7 @@ inserts links with just the identifier."
(read-regexp "Insert links matching REGEX: " nil
'denote-link--add-links-history)
current-prefix-arg))
(let ((current-file (buffer-file-name)))
- (if-let ((files (delete current-file
(denote--directory-files-matching-regexp regexp))))
+ (if-let ((files (delete current-file
(denote-directory-files-matching-regexp regexp))))
(let ((beg (point)))
(insert (denote-link--prepare-links files current-file id-only))
(unless (derived-mode-p 'org-mode)