branch: externals/denote
commit 9a5d7f912e28ed1494cac7a2d01963724e7e6f96
Author: Protesilaos Stavrou <i...@protesilaos.com>
Commit: Protesilaos Stavrou <i...@protesilaos.com>

    Make denote-sequence-get-new accept SEQUENCES like all its helper functions
---
 denote-sequence.el | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/denote-sequence.el b/denote-sequence.el
index eb963c721e..8538b31b3b 100644
--- a/denote-sequence.el
+++ b/denote-sequence.el
@@ -556,14 +556,17 @@ function `denote-sequence-get-all-sequences-with-prefix'."
           (number-to-string (+ (string-to-number largest) 1)))
       (error "Cannot find sequences given sequence `%s' using scheme `%s'" 
sequence denote-sequence-scheme))))
 
-(defun denote-sequence-get-new (type &optional sequence)
+(defun denote-sequence-get-new (type &optional sequence sequences)
   "Return a sequence given TYPE among `denote-sequence-types'.
 If TYPE is either `child' or `sibling', then optional SEQUENCE must be
-non-nil and conform with `denote-sequence-p'."
+non-nil and conform with `denote-sequence-p'.
+
+With optional SEQUENCES consider only those, otherwise operate on the
+return value of `denote-sequence-get-all-sequences'."
   (pcase type
-    ('parent (denote-sequence--get-new-parent))
-    ('child (denote-sequence--get-new-child sequence))
-    ('sibling (denote-sequence--get-new-sibling sequence))
+    ('parent (denote-sequence--get-new-parent sequences))
+    ('child (denote-sequence--get-new-child sequence sequences))
+    ('sibling (denote-sequence--get-new-sibling sequence sequences))
     (_ (error "The type `%s' is not among `denote-sequence-types'" type))))
 
 (defvar denote-sequence-type-history nil

Reply via email to