all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* In docstrings: `sym' and ‘sym’ are equivalent to mismatched `sym’ and ‘sym' (and ‘'sym’, nor `undefined' cannot be used)
@ 2018-10-18 14:07 Garreau, Alexandre
  2018-10-18 14:35 ` Clément Pit-Claudel
  2018-10-18 15:01 ` Paul Eggert
  0 siblings, 2 replies; 5+ messages in thread
From: Garreau, Alexandre @ 2018-10-18 14:07 UTC (permalink / raw)
  To: emacs-devel

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?)



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-10-18 16:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-18 14:07 In docstrings: `sym' and ‘sym’ are equivalent to mismatched `sym’ and ‘sym' (and ‘'sym’, nor `undefined' cannot be used) Garreau, Alexandre
2018-10-18 14:35 ` 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

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.