From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: undo weirdness with insert-file-contents Date: Thu, 28 Feb 2008 23:20:11 +0100 Message-ID: <47C7339B.3090002@gmx.at> References: <47C70CFC.30203@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1204237376 25216 80.91.229.12 (28 Feb 2008 22:22:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 28 Feb 2008 22:22:56 +0000 (UTC) Cc: emacs-devel@gnu.org To: Glenn Morris Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 28 23:23:22 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JUr9n-000679-I3 for ged-emacs-devel@m.gmane.org; Thu, 28 Feb 2008 23:23:15 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JUr9H-0007uU-75 for ged-emacs-devel@m.gmane.org; Thu, 28 Feb 2008 17:22:43 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JUr8a-0007d1-96 for emacs-devel@gnu.org; Thu, 28 Feb 2008 17:22:00 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JUr8Y-0007cE-F2 for emacs-devel@gnu.org; Thu, 28 Feb 2008 17:21:59 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JUr8Y-0007cB-57 for emacs-devel@gnu.org; Thu, 28 Feb 2008 17:21:58 -0500 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1JUr8W-0007nN-Vv for emacs-devel@gnu.org; Thu, 28 Feb 2008 17:21:57 -0500 Original-Received: (qmail invoked by alias); 28 Feb 2008 22:21:53 -0000 Original-Received: from N717P006.adsl.highway.telekom.at (EHLO [62.47.33.134]) [62.47.33.134] by mail.gmx.net (mp040) with SMTP; 28 Feb 2008 23:21:53 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1+J7fE2lKiJlf9N8fwM3uIDFOx1scg1ZBgf4ecXHY 3p0Lu+gBWvbbBH User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en In-Reply-To: X-Y-GMX-Trusted: 0 X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:90787 Archived-At: > (progn > (pop-to-buffer "foo") > (insert-file-contents "/etc/issue") > (goto-char (point-max)) > (insert-file-contents "/etc/issue")) > M-x undo > > now works in both 22 and 23, but in 22 the buffer is marked as not > modified after undo. It 23 it is marked as modified. ... which is wrong, obviously. Could you try to debug `insert-file-contents' around the lines 4768-4779 of fileio.c Lisp_Object tem = XCAR (old_undo); if (CONSP (tem) && INTEGERP (XCAR (tem)) && INTEGERP (XCDR (tem)) && EQ (XCAR (tem), lbeg)) /* In the non-visiting case record only the final insertion. */ current_buffer->undo_list = Fcons (Fcons (lbeg, lend), Fcdr (old_undo)); } } else /* If undo_list was Qt before, keep it that way. Otherwise start with an empty undo_list. */ current_buffer->undo_list = EQ (old_undo, Qt) ? Qt : Qnil; to see where the (t 0 . 0) entry gets removed? Sorry but I currently can't debug that myself.