branch: externals/m-buffer
commit 63a46e6732b9626223ab74d59889d77b55d3af72
Author: Phillip Lord <[email protected]>
Commit: Phillip Lord <[email protected]>
m-buffer-in-match-p added.
---
m-buffer.el | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/m-buffer.el b/m-buffer.el
index 4ffaca1ec9..9899f171a5 100644
--- a/m-buffer.el
+++ b/m-buffer.el
@@ -363,7 +363,14 @@ in M."
m))
m))
-
+(defun m-buffer-in-match-p (matches position)
+ "Returns true is any of MATCHES contain POSITION."
+ (-any?
+ (lambda (match)
+ (and
+ (<= (car match) position)
+ (<= position (cadr match))))
+ matches))
;; marker/position utility functions
(defun m-buffer-nil-marker (markers)