GNU bug report logs - #12491
24.2.50; `Info-insert-dir' should be able to not show msgs

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Sat, 22 Sep 2012 22:45:02 UTC

Severity: wishlist

Merged with 11851

Found in versions 24.1.50, 24.2.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #24 received at 12491 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>, Juri Linkov <juri <at> jurta.org>
Cc: 12491 <at> debbugs.gnu.org, 11851 <at> debbugs.gnu.org
Subject: RE: bug#12491: 24.2.50; `Info-insert-dir' should be able to not show
 msgs
Date: Thu, 28 Apr 2016 09:05:02 -0700 (PDT)
> As Eli pointed out, there's now `inhibit-message'.  Closing.

That is not the Emacs way.  It is not what is recommended
in the manual. See (elisp) `Distinguish Interactive'.

--

The recommended way to test whether
the function was called using 'call-interactively' is to give it an
optional argument 'print-message' and use the 'interactive' spec to make
it non-'nil' in interactive calls.  Here's an example:

     (defun foo (&optional print-message)
       (interactive "p")
       (when print-message
         (message "foo")))

We use '"p"' because the numeric prefix argument is never 'nil'.
Defined in this way, the function does display the message when called
from a keyboard macro.

   The above method with the additional argument is usually best,
because it allows callers to say "treat this call as interactive".  But
you can also do the job by testing 'called-interactively-p'.




This bug report was last modified 9 years and 28 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.