changeset 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 c6e45e9a83bf
children 71ea8ba70056
files lisp/ChangeLog lisp/smerge-mode.el
diffstat 2 files changed, 23 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Fri Sep 23 17:06:03 2005 +0000
+++ b/lisp/ChangeLog	Fri Sep 23 18:15:20 2005 +0000
@@ -1,23 +1,27 @@
+2005-09-23  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* smerge-mode.el (smerge-remove-props): Cause re-highlighting of the
+	whole conflict.
+
 2005-09-23  Carsten Dominik  <dominik@science.uva.nl>
 
-	* textmodes/org.el (org-mode-map, orgtbl-mode-map): Move
-	keybindings with `C-c C-h' prefix to `C-c C-x' prefix.  Make use
+	* textmodes/org.el (org-mode-map, orgtbl-mode-map):
+	Move keybindings with `C-c C-h' prefix to `C-c C-x' prefix.  Make use
 	of `remap' feature when available.  Additional key bindings for
 	better tty support.
 	(org-mode-restart, org-force-self-insert): New commands.
 	(org-time-stamp-inactive): New command.
 	(org-remap): New function.
-	(org-table-auto-blank-field, org-level-color-stars-only): New
-	options.
-	(org-enable-fixed-width-editor): Moved to `org-structure'
+	(org-table-auto-blank-field, org-level-color-stars-only): New options.
+	(org-enable-fixed-width-editor): Move to `org-structure'
 	customization group.
-	(org-self-insert-command, orgtbl-self-insert-command): Modified to
+	(org-self-insert-command, orgtbl-self-insert-command): Modify to
 	blank field after field motion commands.
 
 2005-09-23  Kenichi Handa  <handa@m17n.org>
 
-	* international/mule-cmds.el (set-language-environment): Don't
-	check utf-translate-cjk-lang-env is nil or not on deciding if we
+	* international/mule-cmds.el (set-language-environment):
+	Don't check utf-translate-cjk-lang-env is nil or not on deciding if we
 	have to call utf-translate-cjk-load-tables.
 
 2005-09-22  Stefan Monnier  <monnier@iro.umontreal.ca>
--- a/lisp/smerge-mode.el	Fri Sep 23 17:06:03 2005 +0000
+++ b/lisp/smerge-mode.el	Fri Sep 23 18:15:20 2005 +0000
@@ -335,7 +335,17 @@
 
 (defun smerge-remove-props (beg end)
   (remove-overlays beg end 'smerge 'refine)
-  (remove-overlays beg end 'smerge 'conflict))
+  (remove-overlays beg end 'smerge 'conflict)
+  ;; Now that we use overlays rather than text-properties, this function
+  ;; does not cause refontification any more.  It can be seen very clearly
+  ;; in buffers where jit-lock-contextually is not t, in which case deleting
+  ;; the "<<<<<<< foobar" leading line leaves the rest of the conflict
+  ;; highlighted as if it were still a valid conflict.  Note that in many
+  ;; important cases (such as the previous example) we're actually called
+  ;; during font-locking so inhibit-modification-hooks is non-nil, so we
+  ;; can't just modify the buffer and expect font-lock to be triggered as in:
+  ;; (put-text-property beg end 'smerge-force-highlighting nil)
+  (remove-text-properties beg end '(fontified nil)))
 
 (defun smerge-popup-context-menu (event)
   "Pop up the Smerge mode context menu under mouse."