aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorGravatar David Aspinall <da@inf.ed.ac.uk>2010-08-27 14:47:28 +0000
committerGravatar David Aspinall <da@inf.ed.ac.uk>2010-08-27 14:47:28 +0000
commit3841c6b363b74d2fc214acd92041fa608d2e9913 (patch)
tree45b1e15ac9ea7b040c3341bb05c43477f9a60665 /lib
parent15ccc9c78cf0bc4fb5d6ffa0e76d280d9638e99b (diff)
Implement the eagerly anticipated Beyond Script Management Feature No.2 (i.e., automatic preview of next command)
Diffstat (limited to 'lib')
-rw-r--r--lib/span.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/span.el b/lib/span.el
index 32967c78..6b576b87 100644
--- a/lib/span.el
+++ b/lib/span.el
@@ -215,6 +215,17 @@ Return nil if no such overlay belong to the list."
"Set the end point of SPAN to VALUE."
(span-set-endpoints span (span-start span) value))
+;;
+;; Handy overlay utils
+;;
+
+(defun span-add-self-removing-span (beg end &rest props)
+ (let ((ol (make-overlay beg end)))
+ (while props
+ (overlay-put ol (car props) (cadr props))
+ (setq props (cddr props)))
+ (add-timeout 2 'delete-overlay ol)))
+
(provide 'span)