aboutsummaryrefslogtreecommitdiffhomepage
path: root/generic
diff options
context:
space:
mode:
authorGravatar Christophe Raffalli <christophe.raffalli@univ-savoie.fr>2000-09-20 06:43:58 +0000
committerGravatar Christophe Raffalli <christophe.raffalli@univ-savoie.fr>2000-09-20 06:43:58 +0000
commit6692a499ab43692628b806502bf565b2acedecc6 (patch)
tree4145553b550f4dcab8d153dad80ae70cb8f20938 /generic
parent1ad9be5d39639e62a56fc2508f827783eef990f8 (diff)
dirty bug fix in next-span to avoid loops with FSF Emacs
Diffstat (limited to 'generic')
-rw-r--r--generic/span-overlay.el24
1 files changed, 17 insertions, 7 deletions
diff --git a/generic/span-overlay.el b/generic/span-overlay.el
index f1f6d6a9..7b313ed4 100644
--- a/generic/span-overlay.el
+++ b/generic/span-overlay.el
@@ -265,13 +265,23 @@ A span is before PT if it covers the character before PT."
(find-span-aux prev-prop-p (span-property span 'before))))
; overlays are [start, end)
-(defun next-span (span prop)
- "Return span after SPAN with property PROP.
-If there are two spans overlapping then this won't work."
- (let ((l (member-if (lambda (span) (span-property span prop))
- (overlays-at
- (next-overlay-change (overlay-start span))))))
- (car-safe l)))
+; Then test is for a dirty bug fix with FSF Emacs with next-span not
+; advancing the span !
+(if proof-running-on-XEmacs
+ (defun next-span (span prop)
+ "Return span after SPAN with property PROP. If there are two spans overlapping then this won't work."
+ (let ((l (member-if (lambda (span) (span-property span prop))
+ (overlays-at
+ (next-overlay-change (overlay-start span))))))
+ (car-safe l)))
+ (defun next-span (span prop)
+ "Return span after SPAN with property PROP. If there are two spans overlapping then this won't work."
+ (let (spanres (l (member-if (lambda (span) (span-property span prop))
+ (overlays-at
+ (next-overlay-change (overlay-start span))))))
+ (setq spanres (car-safe l))
+ (if (and spanres (<= (span-start spanres) (span-start span)))
+ nil spanres))))
(defsubst span-live-p (span)