From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Juri Linkov <juri@jurta.org>
Cc: 10624@debbugs.gnu.org
Subject: bug#10624: Dired-marking all files in the region
Date: Thu, 22 Nov 2012 10:40:36 -0500 [thread overview]
Message-ID: <jwva9u9hcu2.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87ehjmrmzg.fsf@mail.jurta.org> (Juri Linkov's message of "Thu, 22 Nov 2012 11:49:57 +0200")
> is to add an `interactive' arg (there were some reasons not to use
> (called-interactively-p 'interactive) but I forgot the exact reasons).
One of the main reasons is reliability. If you look at the code of
called-interactively-p, you'll see it's pretty hackish, so it's easy to
break it. For example `called-interactively-p' may fail to work correctly
in the following known cases:
- when the function is advised (this was recently improved, so it will
now fail sometimes rather than always).
- when inside a condition-case or catch in lexical-binding code.
- when inside a `pcase' branch (because pcase sometimes moves the
branch to a lambda in order to avoid duplicating the code).
Another reason is that it makes it more flexible for non-interactive
callers, which can control whether to run the function "as if the
arguments had been provided interactively".
`called-interactively-p' is handy when you can't add an argument, but
otherwise it's much better to add an `interactive' argument.
Stefan
next prev parent reply other threads:[~2012-11-22 15:40 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-27 15:35 bug#10624: 24.0.92; default value of `dired-do-ch*' Drew Adams
2012-01-27 16:23 ` Drew Adams
2012-09-14 23:47 ` Juri Linkov
2012-09-15 0:37 ` Drew Adams
2012-09-15 22:50 ` Juri Linkov
2012-09-16 4:47 ` Drew Adams
2012-09-16 23:48 ` Juri Linkov
2012-09-17 0:39 ` Drew Adams
2012-09-18 23:22 ` Juri Linkov
2012-09-15 22:54 ` Juri Linkov
2012-09-16 4:47 ` Drew Adams
2012-09-16 23:45 ` bug#10624: Dired-marking all files in the region Juri Linkov
2012-11-22 9:49 ` Juri Linkov
2012-11-22 15:27 ` Drew Adams
2012-11-23 7:51 ` Juri Linkov
2012-11-23 17:12 ` Drew Adams
2012-11-25 9:16 ` Juri Linkov
2012-11-25 15:49 ` Drew Adams
2012-11-25 16:12 ` Juri Linkov
2012-11-25 17:02 ` Drew Adams
2012-11-22 15:40 ` Stefan Monnier [this message]
2012-11-23 7:59 ` Juri Linkov
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwva9u9hcu2.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=10624@debbugs.gnu.org \
--cc=juri@jurta.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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).