help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is there a way to get the last message?


From: John Ankarström
Subject: Re: Is there a way to get the last message?
Date: Sun, 28 May 2017 13:41:39 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Stephen Berman <stephen.berman@gmx.net> writes:

> (add-hook 'post-command-hook 'get-last-message)

Wouldn't post-command-hook be a bit overkill here? Personally,
I'd do something like this:

(advice-add #'message :after #'get-last-message)

I'm not 100% sure that `message' is the only function that
creates messages, but that advice should cover most cases.

- John



reply via email to

[Prev in Thread] Current Thread [Next in Thread]