From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jeff Sparkes Newsgroups: gmane.emacs.devel Subject: Re: Delayed warnings Date: Wed, 23 Mar 2011 09:50:30 -0400 Message-ID: References: <4D8705CA.1020300@gmx.at> <4D874FF3.9010606@gmx.at> <4D8793B1.2040701@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1300888987 6143 80.91.229.12 (23 Mar 2011 14:03:07 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 23 Mar 2011 14:03:07 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 23 15:03:03 2011 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.69) (envelope-from ) id 1Q2OeM-00010U-Oe for ged-emacs-devel@m.gmane.org; Wed, 23 Mar 2011 15:03:02 +0100 Original-Received: from localhost ([127.0.0.1]:40401 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q2OTg-0001H4-TA for ged-emacs-devel@m.gmane.org; Wed, 23 Mar 2011 09:52:00 -0400 Original-Received: from [140.186.70.92] (port=37239 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q2OTI-0000B9-W7 for emacs-devel@gnu.org; Wed, 23 Mar 2011 09:51:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q2OSS-0007NL-Nt for emacs-devel@gnu.org; Wed, 23 Mar 2011 09:50:48 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:59713) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q2OSS-0007MQ-HV for emacs-devel@gnu.org; Wed, 23 Mar 2011 09:50:44 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Q2OSQ-0001Oa-VI for emacs-devel@gnu.org; Wed, 23 Mar 2011 14:50:42 +0100 Original-Received: from waterloo.fw.opentext.com ([204.138.115.3]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 23 Mar 2011 14:50:42 +0100 Original-Received: from jsparkes by waterloo.fw.opentext.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 23 Mar 2011 14:50:42 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 14 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: waterloo.fw.opentext.com User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (windows-nt) Cancel-Lock: sha1:aft1i4AzwdUqx4TSN2n89asPpOY= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 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:137567 Archived-At: Stefan Monnier writes: >> Only I would process `display-delayed-warnings' in reverse, so C code >> can add with > >> Vdisplay_delayed_warnings = Fcons (..., Vdisplay_delayed_warnings); > >> but the user still gets the warnings in order. > > Or you could have your C code all `add-hook-once' on post-command-hook > which would be a new function that adds a function onto a hook such that > the function is only run once and then automatically removed. FWIW, in XEmacs it's called `add-one-shot-hook'.