aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Aspinall2008-01-17 13:04:54 +0000
committerDavid Aspinall2008-01-17 13:04:54 +0000
commit6e660a5d3ed11c7093e62c9a3a532c03b0fc953a (patch)
tree2093a07c5e6f1a32db321f98f6621e04af5da6db /lib
parent82192123aa85c0b7ddf2422893a6b38f8e1f2e75 (diff)
Support spans-at-region-prop.
Diffstat (limited to 'lib')
-rw-r--r--lib/span-extent.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/span-extent.el b/lib/span-extent.el
index 481933fc..8af787c7 100644
--- a/lib/span-extent.el
+++ b/lib/span-extent.el
@@ -56,6 +56,10 @@
"Apply function FN to all spans between START and END with property PROP set"
(mapcar-extents fn nil (current-buffer) start end nil prop val))
+(defsubst spans-at-region-prop (start end prop &optional val)
+ "Return a list of the spans in START END with PROP [set to VAL]."
+ (extent-list (current-buffer) start end nil prop val))
+
(defsubst span-at (pt prop)
"Return the smallest SPAN at point PT with property PROP."
(extent-at pt nil prop))