all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Bastien'" <bastienguerry@googlemail.com>
Cc: emacs-pretest-bug@gnu.org, 3936@emacsbugs.donarmstrong.com
Subject: bug#3936: 23.0.96; doc string of called-interactively-p
Date: Mon, 27 Jul 2009 09:04:17 -0700	[thread overview]
Message-ID: <02DB279632ED43DC9D58AC05960C61E1@us.oracle.com> (raw)
In-Reply-To: <87prbmwklv.fsf@bzg.ath.cx>

> > In particular, the doc strings of `called-interactively-p' 
> > and `interactive-p' should, together, make clear their
> > difference. They can't both just say that they test for
> > an interactive call. They need to speak about keyboard
> > macro use as the difference in behavior.
> 
> Please suggest a docstring for both these functions.
> If your suggested dosctrings are clearer, we will clearly see it.
> 
> By trying to explain in a very wordy fashion what is *not* 
> clear to you, you're at risk of not being clear yourself.

I think I was clear enough. Fix the Elisp manual first; the doc strings will
follow easily. If you don't understand what I wrote or are unwilling to work on
it, perhaps someone else will.

The doc is not just unclear; it is wrong/bad, as I pointed out specifically.

In addition to the doc problems I listed, there is a non-doc problem: Whoever
came up with the new function (in Emacs 22) `called-interactively-p' did the
wrong thing, IMO.

That function name tells nothing more nor less than the name `interactive-p' -
there is nothing in the names that distinguishes these functions. Might as well
have named the new function `interactive-p-2' (no, it's not a suggestion).

It would have been far better to add an optional argument to `interactive-p'
than to create a new, similarly named function. For example:

(defun interactive-p (&optional k-macro-p)
  "Return t if function in which this appears was called interactively.
If optional arg K-MACRO-P is non-nil, return t when called during
execution of a keyboard macro. If it is nil, return nil in that case.
...[rest of description]"

I vote for deprecating one or the other of these two functions, combining them
by using an optional argument to express the alternative behaviors. That will go
a long way toward clarifying the intended uses.






  reply	other threads:[~2009-07-27 16:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <877hx4n3r0.fsf@cyd.mit.edu>
2009-07-26 20:56 ` bug#3936: 23.0.96; doc string of called-interactively-p Drew Adams
2009-07-27  2:03   ` Bastien
2009-07-27  6:24     ` Drew Adams
2009-07-27  6:43       ` Bastien
2009-07-27  8:18         ` Drew Adams
2009-07-27  9:17           ` Bastien
2009-07-27 16:04             ` Drew Adams [this message]
2009-08-15 22:00   ` bug#3936: marked as done (23.0.96; doc string of called-interactively-p) Emacs bug Tracking System

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=02DB279632ED43DC9D58AC05960C61E1@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=3936@emacsbugs.donarmstrong.com \
    --cc=bastienguerry@googlemail.com \
    --cc=emacs-pretest-bug@gnu.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.