unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Garreau\, Alexandre" <galex-713@galex-713.eu>
To: emacs-devel@gnu.org
Subject: In docstrings: `sym' and ‘sym’ are equivalent to mismatched `sym’ and ‘sym' (and ‘'sym’, nor `undefined' cannot be used)
Date: Thu, 18 Oct 2018 16:07:52 +0200	[thread overview]
Message-ID: <87zhvbuz47.fsf@portable.galex-713.eu> (raw)

Take the following piece of code, directly taken from Gnus v5.13:

#+BEGIN_SRC emacs-lisp
(defcustom gnus-build-sparse-threads nil
  "*If non-nil, fill in the gaps in threads.
If `some', only fill in the gaps that are needed to tie loose threads
together.  If `more', fill in all leaf nodes that Gnus can find.  If
non-nil and non-`some', fill in all gaps that Gnus manages to guess."
  :group 'gnus-thread
  :type '(choice (const :tag "off" nil)
		 (const some)
		 (const more)
		 (sexp :menu-tag "all" t)))
#+END_SRC

Passing on the fact the second `more', as it is undefined, oddly acts
differently than the others, which are defined.

The following is equivalent (look at the quotes), and gives in the end
just the same curly quotes and highlighting, while it is mismatched (I
believe it shouldn’t, when mismatched):

#+BEGIN_SRC emacs-lisp
(defcustom gnus-build-sparse-threads nil
  "*If non-nil, fill in the gaps in threads.
If ‘some', only fill in the gaps that are needed to tie loose threads
together.  If `more', fill in all leaf nodes that Gnus can find.  If
non-nil and non-`some’, fill in all gaps that Gnus manages to guess."
  :group 'gnus-thread
  :type '(choice (const :tag "off" nil)
		 (const some)
		 (const more)
		 (sexp :menu-tag "all" t)))
#+END_SRC

I noticed it while trying this:

#+BEGIN_SRC emacs-lisp
(defcustom gnus-build-sparse-threads nil
  "*If non-nil, fill in the gaps in threads.
If “'some”, only fill in the gaps that are needed to tie loose threads
together.  If ‘'more’, fill in all leaf nodes that Gnus can find.  If
non-nil and non-‘some’, fill in all gaps that Gnus manages to guess."
  :group 'gnus-thread
  :type '(choice (const :tag "off" nil)
		 (const some)
		 (const more)
		 (sexp :menu-tag "all" t)))
#+END_SRC

Note how it is impossible to refer to anything quoted without getting
the (wrong) curly quote.  This joins the previous thread about odd
symbols and modifying the reader (should it be also used for quoting?
or should it be accepted to be impossible to correctly write a quote in
docstrings?)



             reply	other threads:[~2018-10-18 14:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-18 14:07 Garreau, Alexandre [this message]
2018-10-18 14:35 ` In docstrings: `sym' and ‘sym’ are equivalent to mismatched `sym’ and ‘sym' (and ‘'sym’, nor `undefined' cannot be used) Clément Pit-Claudel
2018-10-18 14:58   ` Garreau, Alexandre
2018-10-18 15:01 ` Paul Eggert
2018-10-18 16:34   ` Garreau, Alexandre

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=87zhvbuz47.fsf@portable.galex-713.eu \
    --to=galex-713@galex-713.eu \
    --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).