unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eliza Velasquez <eliza@eliza.sh>
To: 55780@debbugs.gnu.org
Subject: bug#55780: 29.0.50; byte-compile-docstring-style-warn warns against valid usages of curved quotes
Date: Thu, 02 Jun 2022 17:04:41 -0700	[thread overview]
Message-ID: <87h752d33a.fsf@eliza.sh> (raw)

The elisp manual states in "(elisp)Documentation Tips"

> When a documentation string refers to a Lisp symbol, write it as it
> would be printed (which usually means in lower case), surrounding it
> with curved single quotes (‘..’).

‘checkdoc’ treats this case as valid.

Recently, though, it seems like bytecomp.el’s
‘byte-compile-docstring-style-warn’ function was recently modified by
2701cd59b521989530a7eb7489540c64177e0f69 which mistakenly flags this
usage as incorrect. Its news entry states:

> When writing code snippets that contains the ' character (APOSTROPHE),
> that quote character has to be escaped to avoid Emacs displaying it as
> ’ (LEFT SINGLE QUOTATION MARK), which would make code examples like
> 
>     (setq foo '(1 2 3))
> 
> invalid.  Emacs will now warn during byte compilation if it seems
> something like that, and also warn about when using RIGHT/LEFT SINGLE
> QUOTATION MARK directly.  In both these cases, if these characters
> should really be present in the doc string, they should be quoted with
> \=.

Judging by both this news entry and the implementation's regex, I assume
this is intended to catch erroneous cases like “(setq foo ’(1 2 3))” and
allow correct usages like “it’s”, but it inadvertently flags cases like
“‘lisp-mode’”.

In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.16.0)
Repository revision: e06d600b4963fc6ccc69fb0bbbc725350a80c9fc
Repository branch: master
System Description: NixOS 22.11 (Raccoon)

Configured using:
 'configure
 --prefix=/nix/store/banascjwdai200brq116c4m54jx10if9-emacs-pgtk-native-comp-20220529.0
 --disable-build-details --with-modules --with-x-toolkit=gtk3
 --with-cairo --with-native-compilation --with-pgtk'

-- 
Eliza





             reply	other threads:[~2022-06-03  0:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-03  0:04 Eliza Velasquez [this message]
2022-06-03 11:08 ` bug#55780: 29.0.50; byte-compile-docstring-style-warn warns against valid usages of curved quotes Lars Ingebrigtsen
2022-06-04  1:32   ` Eliza Velasquez
2022-06-04 11:30     ` Lars Ingebrigtsen
2022-06-04 12:21       ` Andreas Röhler
2022-06-04 13:15         ` Lars Ingebrigtsen

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=87h752d33a.fsf@eliza.sh \
    --to=eliza@eliza.sh \
    --cc=55780@debbugs.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).