unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: Fwd: problems with smerge-mode.el
       [not found] <E1Emwal-0007Dz-9Y@fencepost.gnu.org>
@ 2005-12-16 20:00 ` Stefan Monnier
  0 siblings, 0 replies; only message in thread
From: Stefan Monnier @ 2005-12-16 20:00 UTC (permalink / raw)
  Cc: emacs-devel, bug-cc-mode, rms

>> 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?


        Stefan


--- 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
   (save-excursion
     (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


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id\x16865&op=click


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-12-16 20:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <E1Emwal-0007Dz-9Y@fencepost.gnu.org>
2005-12-16 20:00 ` Fwd: problems with smerge-mode.el Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).