From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vinicius Jose Latorre Newsgroups: gmane.emacs.devel Subject: Re: TODO item: the mark and overlay in revert-buffer Date: Mon, 10 Dec 2007 22:31:36 -0300 Message-ID: <475DE878.4080707@ig.com.br> References: <871wa16q0n.fsf@actcom.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1197333065 18761 80.91.229.12 (11 Dec 2007 00:31:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 11 Dec 2007 00:31:05 +0000 (UTC) Cc: emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 11 01:31:15 2007 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 1J1t1i-0006cT-If for ged-emacs-devel@m.gmane.org; Tue, 11 Dec 2007 01:31:10 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J1t1Q-0006Cr-Q9 for ged-emacs-devel@m.gmane.org; Mon, 10 Dec 2007 19:30:52 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J1t1O-0006By-3x for emacs-devel@gnu.org; Mon, 10 Dec 2007 19:30:50 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J1t1L-00068f-Gl for emacs-devel@gnu.org; Mon, 10 Dec 2007 19:30:49 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J1t1L-00068Y-Ae for emacs-devel@gnu.org; Mon, 10 Dec 2007 19:30:47 -0500 Original-Received: from wr-out-0506.google.com ([64.233.184.229]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J1t1K-0007bX-RU for emacs-devel@gnu.org; Mon, 10 Dec 2007 19:30:47 -0500 Original-Received: by wr-out-0506.google.com with SMTP id 37so1537314wra for ; Mon, 10 Dec 2007 16:30:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; bh=e+Z2/BnbKTTt6Wsm/ADzbxYrlL2ghso8Aig7bAe3WbM=; b=NjwmBrT8ZeUPhJc09bqI0tgfj0ARqHUDpk3rX0/btQtr8JY6wPxMZgGzfEmr6ZlKugUzraJP95UuLgHKnU56F/Ea6oqAZDI51DM48yCCUwfkHI7oXc7vcZfWde340MYstj9lMYFT1wGYm77p6QguZPlJ/TxlvI76CHVN214Lghc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=ErTIUvcSvG7Vc+jC7o2aNIRZuiEKpU+zeNgOQyoEHyZ9NkzyEABhImwOWFmuPAFham6f2ViBUzw42u+lDaC1/E52Jp5H2sLy+4RtbKMgf9TbHZksu9ERhqlMn9CGw8WlMrDLB7i6yLYFTVzIWFCXLd6zsJcas6jBXxar4cazfII= Original-Received: by 10.70.11.5 with SMTP id 5mr8952213wxk.1197333045810; Mon, 10 Dec 2007 16:30:45 -0800 (PST) Original-Received: from ?192.168.0.100? ( [200.208.45.185]) by mx.google.com with ESMTPS id h35sm14389487wxd.2007.12.10.16.30.41 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 10 Dec 2007 16:30:42 -0800 (PST) User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.11) Gecko/20071128 SeaMonkey/1.1.7 In-Reply-To: X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 (Google crawlbot) 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:85012 Archived-At: > Would someone please install this, then ack? > (And thank him.) > Done in CVS trunk. > From: Yoni Rabkin Katzenell > To: emacs-devel@gnu.org > Date: Wed, 05 Dec 2007 18:54:32 +0200 > Message-ID: <871wa16q0n.fsf@actcom.com> > MIME-Version: 1.0 > Content-Type: multipart/mixed; boundary="=-=-=" > Subject: TODO item: the mark and overlay in revert-buffer > > --=-=-= > > > Hello, I am using GNU Emacs 23.0.50.1 (i686-pc-linux-gnu, X toolkit, > Xaw3d scroll bars) of 2007-12-05 > > /etc/TODO says: revert-buffer should eliminate overlays and the mark. > > This patch should do that. It removes the mark, mark-ring and all > overlays after `before-revert-hook' is run and before > `after-revert-hook' is run. > > Additionally, the patch changes the doc-string to be more explicit about > how other modes use revert-buffer via 'revert-buffer-function'. > > > --=-=-= > Content-Type: text/x-diff > Content-Disposition: inline; filename=2007-12-05-revert.patch > Content-Description: revert-buffer patch > > *** old/files.el 2007-12-05 18:03:59.000000000 +0200 > --- new/files.el 2007-12-05 18:03:54.000000000 +0200 > *************** > *** 4204,4213 **** > With a prefix argument, offer to revert from latest auto-save file, if > that is more recent than the visited file. > > ! This command also works for special buffers that contain text which > ! doesn't come from a file, but reflects some other data base instead: > ! for example, Dired buffers and `buffer-list' buffers. In these cases, > ! it reconstructs the buffer contents from the appropriate data base. > > When called from Lisp, the first argument is IGNORE-AUTO; only offer > to revert from the auto-save file when this is nil. Note that the > --- 4204,4215 ---- > With a prefix argument, offer to revert from latest auto-save file, if > that is more recent than the visited file. > > ! This command also implements an interface for special buffers > ! that contain text which doesn't come from a file, but reflects > ! some other data instead (e.g. Dired buffers, `buffer-list' > ! buffers). This is done via the variable > ! `revert-buffer-function'. In these cases, it should reconstruct > ! the buffer contents from the appropriate data. > > When called from Lisp, the first argument is IGNORE-AUTO; only offer > to revert from the auto-save file when this is nil. Note that the > *************** > *** 4323,4329 **** > (insert-file-contents file-name (not auto-save-p) > nil nil t)) > (insert-file-contents file-name (not auto-save-p) > ! nil nil t))))) > ;; Recompute the truename in case changes in symlinks > ;; have changed the truename. > (setq buffer-file-truename > --- 4325,4335 ---- > (insert-file-contents file-name (not auto-save-p) > nil nil t)) > (insert-file-contents file-name (not auto-save-p) > ! nil nil t)) > ! ;; Reset the mark and remove all overlays. > ! (setq mark-active nil > ! mark-ring nil) > ! (remove-overlays)))) > ;; Recompute the truename in case changes in symlinks > ;; have changed the truename. > (setq buffer-file-truename > > --=-=-= >