emacs-devel
[Top][All Lists]
Advanced

[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 15:24:24 +0300

> From: Oleh Krehel <address@hidden>
> Cc: address@hidden,  address@hidden
> Date: Wed, 22 Apr 2015 13:55:42 +0200
> 
> 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.

I used C-j instead, and it correctly inserts the message into
*Messages*, but does not display it in the echo area.

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

I think it's OK, with a few minor comments:

  +** New variable `inhibit-message', when bound to t, inhibits the
                                                 ^^^^
"non-nil" is more accurate (please make the same change in the manual
as well)

  +   message3 C function from using the Echo Area. The output is still
  +   logged to the *Messages* buffer.

First, we use 2 spaces between sentences, per US English conventions.

More importantly, NEWS is supposed to be read by Lisp-level users, so
talking about C-level details is not useful.  Please talk about the
'message' function instead.  Also, "using the Echo Area" is too vague;
better say "displaying messages in the Echo Area".

Finally, if the change is documented in the manual, it should be
marked with "+++", see the explanations at the beginning of NEWS.

  +When @code{inhibit-message} is @code{t}, no message will be displayed
  +in the echo area, it will only be logged to @file{*Messages*}.

"*Messages*" is not a file, so please use the @samp markup.

Also, please document this explicitly as a variable, using @defvar, so
that it gets indexed as all the other variables.  There are examples
of its usage in the manual.



reply via email to

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