From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: no-spam@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.help Subject: Re: `last-message' variable ? Date: Tue, 16 May 2006 16:57:22 +0200 Organization: StormWare Message-ID: References: <87slnb54eq.fsf@tallis.ilo.ucl.ac.uk> <87fyjamfaz.fsf@tallis.ilo.ucl.ac.uk> <87bqty9o5c.fsf@tiger.rapttech.com.au> <87y7x2i1f8.fsf@tallis.ilo.ucl.ac.uk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1147792641 2761 80.91.229.2 (16 May 2006 15:17:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 16 May 2006 15:17:21 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue May 16 17:17:16 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Fg187-0007TF-K1 for geh-help-gnu-emacs@m.gmane.org; Tue, 16 May 2006 17:06:35 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fg186-00048t-T0 for geh-help-gnu-emacs@m.gmane.org; Tue, 16 May 2006 11:06:34 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fg17w-00048O-5N for help-gnu-emacs@gnu.org; Tue, 16 May 2006 11:06:24 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fg17v-00047r-9p for help-gnu-emacs@gnu.org; Tue, 16 May 2006 11:06:23 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fg17v-00047l-2c for help-gnu-emacs@gnu.org; Tue, 16 May 2006 11:06:23 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1Fg1AZ-0001wn-PT for help-gnu-emacs@gnu.org; Tue, 16 May 2006 11:09:08 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Fg162-0006u1-B1 for help-gnu-emacs@gnu.org; Tue, 16 May 2006 17:04:28 +0200 Original-Received: from mail.trustgate.net ([213.83.150.2]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 16 May 2006 17:04:26 +0200 Original-Received: from no-spam by mail.trustgate.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 16 May 2006 17:04:26 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: help-gnu-emacs@gnu.org Original-Lines: 18 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: mail.trustgate.net User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:nssbPl9nRKy4DnoU/9KshGj3wMM= X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:35080 Archived-At: Bastien writes: > Tim X writes: > >> Another suggestion is to use defadvice on message. For example, >> >> (defvar last-message nil) >> >> (defadvice message (after my-message pre act) >> (setq last-message ad-return-value)) > > Works great, thanks! And this is *really* more elegant. I should > think the defadvice-way more often. I don't think it works for messages printed by the emacs core (C-level). -- Kim F. Storm http://www.cua.dk