all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Lars Ingebrigtsen <larsi@gnus.org>, Juri Linkov <juri@jurta.org>
Cc: 12491@debbugs.gnu.org, 11851@debbugs.gnu.org
Subject: 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)	[thread overview]
Message-ID: <0d98644c-d3a0-4e38-b054-c401eb3131f5@default> (raw)
In-Reply-To: <87lh3xag2k.fsf@gnus.org>

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





  reply	other threads:[~2016-04-28 16:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-22 22:42 bug#12491: 24.2.50; `Info-insert-dir' should be able to not show msgs Drew Adams
2012-09-22 22:52 ` Drew Adams
2012-09-22 23:50 ` Juri Linkov
2012-09-23  2:25   ` Drew Adams
2016-04-28 15:49   ` bug#11851: " Lars Ingebrigtsen
2016-04-28 16:05     ` Drew Adams [this message]
2016-04-28 19:03       ` Eli Zaretskii
     [not found]   ` <<87lh3xag2k.fsf@gnus.org>
     [not found]     ` <<0d98644c-d3a0-4e38-b054-c401eb3131f5@default>
     [not found]       ` <<8337q5y2rd.fsf@gnu.org>
2016-04-29  0:41         ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0d98644c-d3a0-4e38-b054-c401eb3131f5@default \
    --to=drew.adams@oracle.com \
    --cc=11851@debbugs.gnu.org \
    --cc=12491@debbugs.gnu.org \
    --cc=juri@jurta.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.