branch: externals/gnorb
commit dfa0043f231ea07bbde86668903f2d3b270a7e7e
Author: Eric Abrahamsen <[email protected]>
Commit: Eric Abrahamsen <[email protected]>
Safer usage of cl-subseq
* gnorb-org.el (gnorb-org-extract-links): Looks like cl-subseq will
start throwing errors for END arguments larger than the length of SEQ.
This is a tidier way of handling it, anyway.
---
gnorb-org.el | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/gnorb-org.el b/gnorb-org.el
index 39fc7c1..b4de033 100644
--- a/gnorb-org.el
+++ b/gnorb-org.el
@@ -177,9 +177,10 @@ we came from."
(cond ((eq gnorb-org-mail-scan-scope 'all)
strings)
((numberp gnorb-org-mail-scan-scope)
- (delq nil
- (cl-subseq
- strings 0 (1+ gnorb-org-mail-scan-scope))))
+ (cl-subseq
+ strings 0 (min
+ (length strings)
+ (1+ gnorb-org-mail-scan-scope))))
;; We could provide more options here. 'tree vs
;; 'subtree, for instance.
(t