unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org, bug-cc-mode@gnu.org, rms@gnu.org
Subject: Re: Fwd: problems with smerge-mode.el
Date: Fri, 16 Dec 2005 15:00:41 -0500	[thread overview]
Message-ID: <87bqzgq0i7.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <E1Emwal-0007Dz-9Y@fencepost.gnu.org> (Richard M. Stallman's message of "Thu, 15 Dec 2005 12:08:31 -0500")

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


           reply	other threads:[~2005-12-16 20:00 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <E1Emwal-0007Dz-9Y@fencepost.gnu.org>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bqzgq0i7.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=bug-cc-mode@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).