all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: npostavs@users.sourceforge.net
Cc: 25461@debbugs.gnu.org
Subject: bug#25461: [Patch]: Missing doc strings for "," and ",@".
Date: Thu, 19 Jan 2017 17:37:28 +0000	[thread overview]
Message-ID: <20170119173728.GA3397@acm.fritz.box> (raw)
In-Reply-To: <87r33zx5st.fsf@users.sourceforge.net>

Hello, Noam.

On Wed, Jan 18, 2017 at 07:16:34PM -0500, npostavs@users.sourceforge.net wrote:
> Alan Mackenzie <acm@muc.de> writes:


> > I'll just point out one thing I'm proposing changing.  That is, to use
> > princ rather than prin1 to print the name of the function.  This causes,
> > for example, backtick to be printed as

> >     `

> > rather than the

> >     \`

> > we get at the moment.  This might cause problems for function names
> > which include backslashes or unprintable characters such as \n.

> Perhaps only do this for symbols which have `reader-macro' set in their
> plist?

That sounds like a good idea.

> > +;; Give `,' and `,@' documentation strings which can be examined by C-h f.
> > +(put '\, 'function-documentation
> > +     "`,' signals that the next form should be evaluated and inserted.

> This conflates the reader macro with its particular use by the backquote
> macro.  

The use by backquote isn't "a particular" use, as though there were
several equally valid uses.  This use is the prime one, and up until
fairly recently the only one.  Other uses are subsidiary (and I make
reference to the other one lower down).

> I think it's better to explain only the reader macro here, and
> link to ` and pcase for more details.

In other words, omit the semantics from the doc string.  I don't think
that's a good idea: "This macro transforms `foo' into ....., but you'll
have to look up ..... to see what it actually does.".  We don't do that
for macros like `when' and `unless', or any others I can think of, so
why do it for ,?

> > +It can occur only in `\\=`' constructs.

> This isn't true.

In what sense is it not true?  I've never seen a comma used otherwise in
a lisp program.  What misunderstanding could it cause in a (relatively
new) Lisp hacker reading it?  I realise that it is possible to write
(defun \, (...) ...), but that is surely of interest only to people
testing Emacs.

-- 
Alan Mackenzie (Nuremberg, Germany).





  reply	other threads:[~2017-01-19 17:37 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-16 21:22 bug#25461: Missing doc strings for "," and ",@" Alan Mackenzie
2017-01-17 19:34 ` Glenn Morris
2017-01-17 19:56   ` Alan Mackenzie
2017-01-17 20:36     ` Andreas Schwab
2017-01-17 20:41       ` Alan Mackenzie
2017-01-17 20:53         ` Andreas Schwab
2017-01-18  1:44         ` Michael Heerdegen
2017-01-18 19:28           ` Alan Mackenzie
     [not found] ` <handler.25461.B.148460180922707.ack@debbugs.gnu.org>
2017-01-18 19:43   ` bug#25461: [Patch]: " Alan Mackenzie
2017-01-19  0:16     ` npostavs
2017-01-19 17:37       ` Alan Mackenzie [this message]
2017-01-19 18:10         ` Noam Postavsky
2017-01-19 18:36           ` Alan Mackenzie
2017-01-20  0:24             ` Michael Heerdegen
2017-01-19  2:23     ` Michael Heerdegen
2017-01-19 17:58       ` Alan Mackenzie
2017-01-20  0:12         ` Michael Heerdegen
2017-01-20 16:58           ` Alan Mackenzie
2017-01-21  2:26             ` Michael Heerdegen
2017-01-21 15:56               ` Alan Mackenzie
2017-01-21 20:46                 ` bug#25461: [Patch #2]: " Alan Mackenzie
2017-01-24  1:58                   ` Michael Heerdegen
2017-01-24 19:43                     ` Alan Mackenzie
2017-01-24  4:01                   ` npostavs
2017-01-24 19:39                     ` Alan Mackenzie
2017-01-24 20:00                       ` Noam Postavsky
2017-01-23 19:09               ` bug#25461: [Patch]: " Alan Mackenzie

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=20170119173728.GA3397@acm.fritz.box \
    --to=acm@muc.de \
    --cc=25461@debbugs.gnu.org \
    --cc=npostavs@users.sourceforge.net \
    /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.