[Top][All Lists]

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

Re: Is there a way to inhibit message3 from Elisp?

From: Oleh Krehel
Subject: Re: Is there a way to inhibit message3 from Elisp?
Date: Wed, 22 Apr 2015 13:55:42 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:
>> I got this code to work as I expect:
>> (progn
>>   (setq inhibit-message t)
>>   (message "foo")
>>   (setq inhibit-message nil))
>> However, this doesn't work:
>> (let ((inhibit-message t))
>>   (message "foo"))
> How does it "not work"?  It did for me.

I misunderstood that when "C-x C-e" would not print the message in
*scratch*. But otherwise, it works.

> Some comments for the changes:
>   . This variable is a boolean, so it's better to use DEFVAR_BOOL
>     instead of DEFVAR_LISP.  (Don't forget to change the test in
>     message3 accordingly.)
>   . The Emacs coding conventions are to use this:
>       if (something)
>         {
>         do_whatever ();
>       }
>     rather than this:
>       if (something) {
>         do_whatever ();
>       }
>     Besides, when there's only one statement after 'if', you don't
>     need the braces at all.


>   . With your last change, the doc string is misleading, and should be
>     updated.


>   . The change should be accompanied by an entry in etc/NEWS.  Bonus
>     points for updating the ELisp manual as well.

Updated etc/NEWS and the manual (entry for `message').
Let me know if it's OK to merge.


reply via email to

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