From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: TODO item: the mark and overlay in revert-buffer Date: Sun, 09 Dec 2007 18:18:55 -0500 Message-ID: References: <871wa16q0n.fsf@actcom.com> Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: ger.gmane.org 1197242468 8505 80.91.229.12 (9 Dec 2007 23:21:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 9 Dec 2007 23:21:08 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 10 00:21:14 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 1J1VSM-0005RK-DZ for ged-emacs-devel@m.gmane.org; Mon, 10 Dec 2007 00:21:06 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J1VS4-0004VP-S1 for ged-emacs-devel@m.gmane.org; Sun, 09 Dec 2007 18:20:48 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J1VQH-0003qj-PY for emacs-devel@gnu.org; Sun, 09 Dec 2007 18:18:57 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J1VQG-0003qN-L6 for emacs-devel@gnu.org; Sun, 09 Dec 2007 18:18:57 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J1VQG-0003qF-EM for emacs-devel@gnu.org; Sun, 09 Dec 2007 18:18:56 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J1VQF-0006Nz-VR for emacs-devel@gnu.org; Sun, 09 Dec 2007 18:18:56 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1J1VQF-0002mB-GA; Sun, 09 Dec 2007 18:18:55 -0500 In-reply-to: <871wa16q0n.fsf@actcom.com> (message from Yoni Rabkin Katzenell on Wed, 05 Dec 2007 18:54:32 +0200) 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:84934 Archived-At: Would someone please install this, then ack? (And thank him.) 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 --=-=-= -- "Cut your own wood and it will warm you twice" --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --=-=-=--