From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Uninformative comment in files.el Date: Wed, 12 Dec 2007 10:20:16 -0500 Message-ID: References: <475EF93E.3060203@ig.com.br> <475F0992.2030307@gmx.at> <475F45EB.2070704@ig.com.br> <87mysg1l17.fsf@actcom.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1197472840 14774 80.91.229.12 (12 Dec 2007 15:20:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 12 Dec 2007 15:20:40 +0000 (UTC) Cc: emacs-devel@gnu.org To: Yoni Rabkin Katzenell Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 12 16:20:47 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 1J2TO5-00076U-21 for ged-emacs-devel@m.gmane.org; Wed, 12 Dec 2007 16:20:41 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J2TNm-0006iz-Rg for ged-emacs-devel@m.gmane.org; Wed, 12 Dec 2007 10:20:22 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J2TNj-0006ik-1r for emacs-devel@gnu.org; Wed, 12 Dec 2007 10:20:19 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J2TNh-0006iY-T0 for emacs-devel@gnu.org; Wed, 12 Dec 2007 10:20:18 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J2TNh-0006iV-Pi for emacs-devel@gnu.org; Wed, 12 Dec 2007 10:20:17 -0500 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J2TNh-0004a4-Lr for emacs-devel@gnu.org; Wed, 12 Dec 2007 10:20:17 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CACqLX0dMCpwi/2dsb2JhbAA X-IronPort-AV: E=Sophos;i="4.24,157,1196658000"; d="scan'208";a="11291830" Original-Received: from smtp.pppoe.ca ([65.39.196.238]) by ironport2-out.pppoe.ca with ESMTP; 12 Dec 2007 10:20:17 -0500 Original-Received: from pastel.home ([76.10.156.34]) by smtp.pppoe.ca (Internet Mail Server v1.0) with ESMTP id RBG85116; Wed, 12 Dec 2007 10:20:16 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 80C5783EE; Wed, 12 Dec 2007 10:20:16 -0500 (EST) In-Reply-To: <87mysg1l17.fsf@actcom.com> (Yoni Rabkin Katzenell's message of "Wed, 12 Dec 2007 08:31:32 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. 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:85096 Archived-At: > After reading that thread (which I neglected to do beforehand, sorry) I > still think that revert-buffer should remove all overlays and the mark. I disagree. Anything that's not a minor mode will suffer from similar problems and setting revert-buffer-function is not an option for them. Your change will cause problems for the other category of minor-mode like packages: those that need their overlays to survive a revert-buffer. Blindly removing all overlays is drastic, and even more so if the only way to prevent it is to set revert-buffer-function. If a package needs to delete its hooks upon revert (e.g. cua-mode), then it can use `before-revert-hook' and `after-revert-function'. Stefan PS: For what it's worth, I believe that those two hooks should be applied regardless of revert-buffer-function.