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: Please try Pmail Date: Wed, 21 Jan 2009 15:38:59 -0500 Message-ID: References: <87r6303c31.fsf@cyd.mit.edu> <87ljt83svc.fsf@cyd.mit.edu> <87eiyyvz2h.fsf@cyd.mit.edu> <873afdti10.fsf@cyd.mit.edu> <87zlhkitpv.fsf@cyd.mit.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1232572805 7855 80.91.229.12 (21 Jan 2009 21:20:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 21 Jan 2009 21:20:05 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 21 22:21:17 2009 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 1LPkVc-0001vZ-Vp for ged-emacs-devel@m.gmane.org; Wed, 21 Jan 2009 22:21:13 +0100 Original-Received: from localhost ([127.0.0.1]:39590 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LPkUI-00051I-G6 for ged-emacs-devel@m.gmane.org; Wed, 21 Jan 2009 16:19:50 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LPkST-0004CU-81 for emacs-devel@gnu.org; Wed, 21 Jan 2009 16:17:57 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LPkSS-0004Bx-7A for emacs-devel@gnu.org; Wed, 21 Jan 2009 16:17:56 -0500 Original-Received: from [199.232.76.173] (port=44013 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LPkSR-0004Bq-Pf for emacs-devel@gnu.org; Wed, 21 Jan 2009 16:17:56 -0500 Original-Received: from hsiamail.ps-av.com ([207.138.179.125]:3324 helo=psavcns.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LPkSM-0005PX-7A; Wed, 21 Jan 2009 16:17:50 -0500 Original-Received: from ceviche.home [64.213.79.190] by psavcns.com with ESMTP (SMTPD32-8.12) id A7E31E43010A; Wed, 21 Jan 2009 14:38:59 -0600 Original-Received: by ceviche.home (Postfix, from userid 20848) id 8ADE4B400C; Wed, 21 Jan 2009 15:38:59 -0500 (EST) In-Reply-To: <87zlhkitpv.fsf@cyd.mit.edu> (Chong Yidong's message of "Wed, 21 Jan 2009 10:06:52 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Windows 2000 SP4, XP SP1+ X-Greylist: delayed 2494 seconds by postgrey-1.27 at monty-python; Wed, 21 Jan 2009 16:17:49 EST X-Greylist: delayed 2328 seconds by postgrey-1.27 at monty-python; Wed, 21 Jan 2009 16:17:50 EST 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:108051 Archived-At: >> Since they return a buffer already, we may as well store the FUN2 >> inside that buffer (as a buffer-local var). > They don't return a buffer. They switch to a different buffer, and > return nil. Yes, that's what I meant by "return a new buffer". They aren't forced to return nil, BTW (although in practice, it seems they always do). > Here's one reason against adding a new hook to post-process annotations: > to do this particular job right, we need to run all the hook functions > in all the buffers that have been swapped to (so as to pick up their > local values). This violates the usual behavior of run-hooks, which > only runs the buffer-local value of the hook, followed by the global > value of the hook. I don't propose a hook, but a buffer-local *-function (as opposed to *-functions or *-hook). I.e. a single function, just like your proposal, except it's stored in the final "returned" buffer, rather than returned explicitly. Stefan