From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Richard M. Stallman" Newsgroups: gmane.emacs.devel Subject: Re: occur-hook changing the current buffer Date: Thu, 23 Jun 2005 12:54:26 -0400 Message-ID: References: <87slzbqd6r.fsf-monnier+emacs@gnu.org> <871x6ucqat.fsf@jurta.org> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1119545533 11905 80.91.229.2 (23 Jun 2005 16:52:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 23 Jun 2005 16:52:13 +0000 (UTC) Cc: lekktu@gmail.com, miles@gnu.org, monnier@iro.umontreal.ca, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 23 18:52:11 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DlUuN-0007BB-1M for ged-emacs-devel@m.gmane.org; Thu, 23 Jun 2005 18:50:31 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DlV1E-0005Rp-J9 for ged-emacs-devel@m.gmane.org; Thu, 23 Jun 2005 12:57:36 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DlV0s-0005Pf-Hv for emacs-devel@gnu.org; Thu, 23 Jun 2005 12:57:14 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DlV0p-0005Nj-R8 for emacs-devel@gnu.org; Thu, 23 Jun 2005 12:57:12 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DlV0p-0005M6-Do for emacs-devel@gnu.org; Thu, 23 Jun 2005 12:57:11 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DlV2c-0002y0-9C for emacs-devel@gnu.org; Thu, 23 Jun 2005 12:59:02 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1DlUyA-0004Np-NA; Thu, 23 Jun 2005 12:54:26 -0400 Original-To: Juri Linkov In-reply-to: <871x6ucqat.fsf@jurta.org> (message from Juri Linkov on Wed, 22 Jun 2005 19:29:59 +0300) 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:39377 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:39377 Why setting the not-modified flag comes after running a hook? AFAIK, there is a convention that run-hook should be the last element in the function body, so users could override every default settings of the function, including in this particular case setting the modification flag. There is no such convention, and many hooks are run from the middle of a function. However, you may have a valid point that, all else being equal, it is usually better to run the hook at the end.