unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Alan Mackenzie <acm@muc.de>
Cc: "Clément Pit-Claudel" <cpitclaudel@gmail.com>, emacs-devel@gnu.org
Subject: Re: Poor quality documentation in edebug.el, and recursive documentation.
Date: Wed, 06 May 2020 14:20:15 -0400	[thread overview]
Message-ID: <jwv4kstrkxy.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <20200506170134.GB5741@ACM> (Alan Mackenzie's message of "Wed, 6 May 2020 17:01:34 +0000")

>> Really? You're looking at the documentation of a field accessor — can
>> it be made much better (sort of writing it by hand)?
> It could be made much better.  For a start, it shouldn't be
> syntactically ambiguous - It could be talking about "an access slot" or
> "accessing the slot".  I think you're telling me that the second is
> meant.

I'm not sure what that would look like in practice.  I may be to blame
for the current wording and I'm definitely not wedded to it, so I'd
welcome concrete suggestions.

For the record, part of the motivation for the current wording is that
traditionally the first line of the docstring of a function describes
concisely what the function *does* in the present/imperative tense.
So "an access slot" or "accessing the slot" would be quite unusual.

I don't have strong feelings about whether such unusual would be good or
not, but I think other people might.

> And why such a woolly, meaningless word like "access"?  Are we talking
> about a read access or a write access here?

Actually it works for both since it's a "place" (i.e. it works with
`setf`, `push`, ...).

> Now people have explained it, I see that it means "return the value of
> the slot def-name".  That is explicit and says what is done.
> Why can that not be written?

Sounds fine to me, yes.

Any objection to the patch below?

> And why is the edebug--frame's metasyntactic variable called CL-X?  If
> somebody were trying deliberately to be unhelpful, that is what they
> would call it.

I answered this in an earlier message, which I assume you've read since.


        Stefan


diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index 4408bb58464..237d85b81d3 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -2899,7 +2899,7 @@ cl-defstruct
 	      ;; The arg "cl-x" is referenced by name in eg pred-form
 	      ;; and pred-check, so changing it is not straightforward.
 	      (push `(,defsym ,accessor (cl-x)
-                       ,(format "Access slot \"%s\" of `%s' struct CL-X.%s"
+                       ,(format "Return value of the slot \"%s\" of `%s' struct CL-X.%s"
                                 slot name
                                 (if doc (concat "\n" doc) ""))
                        (declare (side-effect-free t))




  reply	other threads:[~2020-05-06 18:20 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-05 20:20 Poor quality documentation in edebug.el, and recursive documentation Alan Mackenzie
2020-05-05 20:39 ` Drew Adams
2020-05-05 21:11 ` Clément Pit-Claudel
2020-05-06 17:01   ` Alan Mackenzie
2020-05-06 18:20     ` Stefan Monnier [this message]
2020-05-06 18:34       ` Eli Zaretskii
2020-05-08 19:59       ` Alan Mackenzie
2020-05-09  5:53         ` Eli Zaretskii
2020-05-09 13:47           ` Stefan Monnier
2020-05-09 13:53             ` Eli Zaretskii
2020-05-09 14:56           ` Alan Mackenzie
2020-05-09 15:06             ` tomas
2020-05-09 15:12               ` Andreas Schwab
2020-05-09 15:11             ` Eli Zaretskii
2020-05-06 18:26     ` Stefan Monnier
2020-05-05 22:18 ` Stefan Monnier
2020-05-08 19:53   ` Alan Mackenzie
2020-05-08 20:24     ` Stefan Monnier
2020-05-12  6:33       ` Madhu
2020-05-12  7:42         ` Eli Zaretskii
2020-05-12 14:04         ` cl-generic misdesign (was: Poor quality documentation in edebug.el, and recursive documentation) Stefan Monnier
2020-05-14  5:03           ` Richard Stallman

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=jwv4kstrkxy.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=acm@muc.de \
    --cc=cpitclaudel@gmail.com \
    --cc=emacs-devel@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 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).