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

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

Re: Temporarily turning message logging off


From: Katsumi Yamaoka
Subject: Re: Temporarily turning message logging off
Date: Fri, 25 May 2007 16:00:27 +0900
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (gnu/linux)

>>>>> In <address@hidden>
>>>>>   Davin Pearson wrote:

> I actually want to turn the messages themselves off AS WELL as the
> message logging.

Then, here's a `defcustom' version:

--8<---------------cut here---------------start------------->8---
(defvar my-message-silent-p nil)

(defadvice message (around shut-up (&rest args) activate)
  (if my-message-silent-p
      (setq ad-return-value (apply 'format args))
    ad-do-it))

(defadvice write-region (before shut-up activate)
  (if my-message-silent-p
      (ad-set-arg 4 'silent)))
--8<---------------cut here---------------end--------------->8---

Set (or bind using `let') `my-message-silent-p' to a non-nil
value when you don't want Emacs to issue messages.


reply via email to

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