[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fwd: problems with smerge-mode.el

From: Stefan Monnier
Subject: Re: Fwd: problems with smerge-mode.el
Date: Fri, 16 Dec 2005 15:00:41 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>> That's odd.  I can't see any place in smerge-remove-props where the
>> match-data might be clobbered.
>> And I can't reproduce your problem: M-x smerge-keep-current works just
>> fine in my tests.  I suspect it may be something like a bad interaction
>> with an after-change-function that doesn't properly save the match data.
>> Can you give a more precise recipe to reproduce the problem, starting
>> from "emacs -Q"?

Oh now I indeed see the problem with C++ files, but not with Elisp (or C)
files.  The patch below seems to fix it.
I'll install it in Emacs-CVS.  Alan could you make sure it either gets
integrated in your upstream code or gets replaced by some other fix?


--- cc-engine.el        02 déc 2005 14:04:24 -0500      1.44
+++ cc-engine.el        16 déc 2005 14:51:49 -0500      
@@ -3993,6 +3993,7 @@
   ;; This function might do hidden buffer changes.
+  (save-match-data
     (goto-char beg)
     (when (or (looking-at "[<>]")
@@ -4021,7 +4022,7 @@
          (while (progn (skip-chars-forward "^<>" end)
                        (< (point) end))
            (c-clear-char-property (point) 'syntax-table)
-           (forward-char)))))))
+             (forward-char))))))))
 ;; Dynamically bound variable that instructs `c-forward-type' to also
 ;; treat possible types (i.e. those that it normally returns 'maybe or

reply via email to

[Prev in Thread] Current Thread [Next in Thread]