From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Yoni Rabkin Katzenell Newsgroups: gmane.emacs.devel Subject: TODO item: the mark and overlay in revert-buffer Date: Wed, 05 Dec 2007 18:54:32 +0200 Message-ID: <871wa16q0n.fsf@actcom.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1196873932 11480 80.91.229.12 (5 Dec 2007 16:58:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 5 Dec 2007 16:58:52 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 05 17:59:01 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 1IzxaN-0005Or-HK for ged-emacs-devel@m.gmane.org; Wed, 05 Dec 2007 17:58:59 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Izxa6-0004L3-VV for ged-emacs-devel@m.gmane.org; Wed, 05 Dec 2007 11:58:42 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IzxZt-0004BG-It for emacs-devel@gnu.org; Wed, 05 Dec 2007 11:58:29 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IzxZr-0004AF-VD for emacs-devel@gnu.org; Wed, 05 Dec 2007 11:58:29 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IzxZr-0004A8-OP for emacs-devel@gnu.org; Wed, 05 Dec 2007 11:58:27 -0500 Original-Received: from sa2.bezeqint.net ([192.115.104.16]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IzxZq-0004s1-6s for emacs-devel@gnu.org; Wed, 05 Dec 2007 11:58:26 -0500 Original-Received: from localhost (sa2 [127.0.0.1]) by sa2.bezeqint.net (Bezeq International SMTP out Mail Server) with ESMTP id E5C8416C1A6 for ; Wed, 5 Dec 2007 18:58:21 +0200 (IST) X-Virus-Scanned: amavisd-new at bezeqint.net Original-Received: from sa2.bezeqint.net ([127.0.0.1]) by localhost (sa2.bezeqint.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5uii2AdLR944 for ; Wed, 5 Dec 2007 18:58:18 +0200 (IST) Original-Received: from ardbeg.actcom.com (unknown [212.179.254.113]) by sa2.bezeqint.net (Bezeq International SMTP out Mail Server) with ESMTP for ; Wed, 5 Dec 2007 18:58:15 +0200 (IST) X-Ethics: Use GNU User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux) 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:84736 Archived-At: --=-=-= 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 --=-=-=--