@@ -492,9 +492,9 @@ This allows you to manually remove highlighting from uninteresting changes."
492
492
; ; otherwise an undone change shows up as changed. While the properties
493
493
; ; are automatically restored by undo, we must fix up the overlay.
494
494
(save-match-data
495
- (let (; ;(beg-decr 1)
496
- (end-incr 1 )
497
- (type 'hilit-chg ))
495
+ (let ((end-incr 1 )
496
+ (type 'hilit-chg )
497
+ (property 'hilit-chg ))
498
498
(if undo-in-progress
499
499
(if (and highlight-changes-mode
500
500
highlight-changes-visible-mode)
@@ -515,22 +515,24 @@ This allows you to manually remove highlighting from uninteresting changes."
515
515
; ; (setq beg-decr 0))))
516
516
; ; (setq beg (max (- beg beg-decr) (point-min)))
517
517
(setq end (min (+ end end-incr) (point-max )))
518
- (setq type 'hilit-chg-delete ))
518
+ (setq type 'hilit-chg-delete
519
+ property 'hilit-chg-delete ))
519
520
; ; Not a deletion.
520
521
; ; Most of the time the following is not necessary, but
521
522
; ; if the current text was marked as a deletion then
522
523
; ; the old overlay is still in effect. So if the user adds some
523
524
; ; text where she earlier deleted text, we have to remove the
524
525
; ; deletion marking, and replace it explicitly with a `changed'
525
526
; ; marking, otherwise its highlighting would disappear.
526
- (if (eq (get-text-property end 'hilit-chg ) 'hilit-chg-delete )
527
- (save-restriction
528
- (widen )
529
- (put-text-property end (+ end 1 ) 'hilit-chg 'hilit-chg )
530
- (if highlight-changes-visible-mode
531
- (hilit-chg-fixup end (+ end 1 ))))))
527
+ (when (eq (get-text-property end 'hilit-chg-delete )
528
+ 'hilit-chg-delete )
529
+ (save-restriction
530
+ (widen )
531
+ (put-text-property end (+ end 1 ) 'hilit-chg-delete nil )
532
+ (if highlight-changes-visible-mode
533
+ (hilit-chg-fixup end (+ end 1 ))))))
532
534
(unless no-property-change
533
- (put-text-property beg end 'hilit-chg type))
535
+ (put-text-property beg end property type))
534
536
(if (or highlight-changes-visible-mode no-property-change)
535
537
(hilit-chg-make-ov type beg end)))))))
536
538
0 commit comments