comparison lisp/smerge-mode.el @ 65658:5bde6d4759d6

(smerge-remove-props): Cause re-highlighting of the whole conflict.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Fri, 23 Sep 2005 18:15:20 +0000
parents 66ed969ca7cc
children f2be1560adf2 2a679c81f552 ee12d75eb214
comparison
equal deleted inserted replaced
65657:c6e45e9a83bf 65658:5bde6d4759d6
333 ;; mouse-face highlight 333 ;; mouse-face highlight
334 keymap (keymap (down-mouse-3 . smerge-popup-context-menu)))) 334 keymap (keymap (down-mouse-3 . smerge-popup-context-menu))))
335 335
336 (defun smerge-remove-props (beg end) 336 (defun smerge-remove-props (beg end)
337 (remove-overlays beg end 'smerge 'refine) 337 (remove-overlays beg end 'smerge 'refine)
338 (remove-overlays beg end 'smerge 'conflict)) 338 (remove-overlays beg end 'smerge 'conflict)
339 ;; Now that we use overlays rather than text-properties, this function
340 ;; does not cause refontification any more. It can be seen very clearly
341 ;; in buffers where jit-lock-contextually is not t, in which case deleting
342 ;; the "<<<<<<< foobar" leading line leaves the rest of the conflict
343 ;; highlighted as if it were still a valid conflict. Note that in many
344 ;; important cases (such as the previous example) we're actually called
345 ;; during font-locking so inhibit-modification-hooks is non-nil, so we
346 ;; can't just modify the buffer and expect font-lock to be triggered as in:
347 ;; (put-text-property beg end 'smerge-force-highlighting nil)
348 (remove-text-properties beg end '(fontified nil)))
339 349
340 (defun smerge-popup-context-menu (event) 350 (defun smerge-popup-context-menu (event)
341 "Pop up the Smerge mode context menu under mouse." 351 "Pop up the Smerge mode context menu under mouse."
342 (interactive "e") 352 (interactive "e")
343 (if (and smerge-mode 353 (if (and smerge-mode