aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorGravatar David Aspinall <da@inf.ed.ac.uk>2009-09-06 17:33:14 +0000
committerGravatar David Aspinall <da@inf.ed.ac.uk>2009-09-06 17:33:14 +0000
commit8148700f330f4888214818d8ae9bacfdac5e99cf (patch)
tree35e7e076dbaa6e8a3bff1c52efc69818edd4b586 /lib
parentb46d6c1c95e560bf21bd30758de80cc08b1992dd (diff)
span-mapc-spans for span-delete-spans
Diffstat (limited to 'lib')
-rw-r--r--lib/span.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/span.el b/lib/span.el
index 9dcfe187..9cb48b7e 100644
--- a/lib/span.el
+++ b/lib/span.el
@@ -98,9 +98,13 @@ Optional argument FUN is used in place of `span-give-warning'."
;; The next two change ordering of list of spans:
(defsubst span-mapcar-spans (fn start end prop)
- "Apply function FN to all spans between START and END with property PROP set."
+ "Map function FN over spans between START and END with property PROP."
(mapcar fn (spans-at-region-prop start end prop)))
+(defsubst span-mapc-spans (fn start end prop)
+ "Apply function FN to spans between START and END with property PROP."
+ (mapc fn (spans-at-region-prop start end prop)))
+
(defun span-at-before (pt prop)
"Return the smallest SPAN at before PT with property PROP.
A span is before PT if it begins before the character before PT."
@@ -197,7 +201,7 @@ Return nil if no such overlay belong to the list."
(defsubst span-delete-spans (start end prop)
"Delete all spans between START and END with property PROP set."
- (span-mapcar-spans 'span-delete start end prop))
+ (span-mapc-spans 'span-delete start end prop))
(defsubst span-property-safe (span name)
"Like span-property, but return nil if SPAN is nil."