[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: Eli Zaretskii
Subject: Re: Is there a way to inhibit message3 from Elisp?
Date: Wed, 22 Apr 2015 13:53:29 +0300

> From: Oleh Krehel <address@hidden>
> Date: Tue, 21 Apr 2015 20:50:59 +0200
> Cc: address@hidden
> Please check the scratch/inhibit-message3 branch.
> I don't have experience with Emacs C code, let me know if I'm doing
> something in a silly way.

Some comments below.

> 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.

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

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

Thanks for working on this.

reply via email to

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