branch: externals/gnorb
commit 9efae5a02a7b010c22db050d8d7d08038c840fc4
Author: Eric Abrahamsen <[email protected]>
Commit: Eric Abrahamsen <[email protected]>
Fix call to cl-subseq
* gnorb-bbdb.el (gnorb-bbdb-store-message-link): `cl-subseq' now errors
if you give it an upper bound larger than the sequence itself. Avoid
doing that.
---
gnorb-bbdb.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gnorb-bbdb.el b/gnorb-bbdb.el
index e95463e..bf5bd03 100644
--- a/gnorb-bbdb.el
+++ b/gnorb-bbdb.el
@@ -610,7 +610,7 @@ to a message into the record's `gnorb-bbdb-messages-field'."
(time-less-p
(gnorb-bbdb-link-date b)
(gnorb-bbdb-link-date a))))))
- (setq val (cl-subseq val 0 gnorb-bbdb-collect-N-messages))
+ (setq val (cl-subseq val 0 (min (length val)
gnorb-bbdb-collect-N-messages)))
(bbdb-record-set-xfield record
gnorb-bbdb-messages-field
(delq nil val))