all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Kangas <stefan@marxist.se>
Cc: emacs-devel@gnu.org, rudalics@gmx.at, gregory@heytings.org,
	monnier@iro.umontreal.ca, dgutov@yandex.ru, larsi@gnus.org,
	juri@linkov.net
Subject: Re: master ff4de1b: Fix quoting style in Lisp comments
Date: Sat, 18 Sep 2021 09:19:40 +0300	[thread overview]
Message-ID: <83czp676df.fsf@gnu.org> (raw)
In-Reply-To: <CADwFkmkXDm6TAS3Zx4YNNY7+7n8E2Y+LZP6Wm59nw4sFirVLpw@mail.gmail.com> (message from Stefan Kangas on Fri, 17 Sep 2021 15:46:25 -0700)

> From: Stefan Kangas <stefan@marxist.se>
> Date: Fri, 17 Sep 2021 15:46:25 -0700
> Cc: emacs-devel@gnu.org, rudalics@gmx.at, gregory@heytings.org, 
> 	monnier@iro.umontreal.ca, dgutov@yandex.ru, larsi@gnus.org, juri@linkov.net
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > Patches welcome to make that happen.  One idea for implementation
> > would be to use the display-table feature.
> 
> I can't see any way to limit `buffer-display-table' to docstrings.

You can't.

> (define-minor-mode emacs-lisp-fancy-docstring-mode
>   "Minor mode for fancy display of Emacs Lisp `docstrings'."
>   :init-value nil
>   (if emacs-lisp-fancy-docstring-mode
>       (let ((table (or (copy-sequence standard-display-table)
>                        (make-display-table))))
>         (aset table ?` `[,(string-to-char (substitute-command-keys "`"))])
>         (aset table ?' `[,(string-to-char (substitute-command-keys "'"))])
>         (setq buffer-display-table table))
>     (setq buffer-display-table nil)))
> 
> It does the job in the sense that it correctly displays these quotes in
> docstrings, but it also does it in code, which makes things hard to
> read.

If it makes things harder to read, then my idea won't fly.  I thought
that since ‘ and ’ look so very similar to ` and ', the effect on
readability of code will be negligible.

If this idea is a non-starter, and we want to do this only in comments
and strings, I guess the only reasonable alternative is to do it as
part of font-lock?  Which means people who turn off font-lock will not
be able to have the feature.

Or maybe we could introduce a 'display-table' text property, which
would then make it possible to do this only for some parts of the
buffer text.



  reply	other threads:[~2021-09-18  6:19 UTC|newest]

Thread overview: 159+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210912165141.9491.52637@vcs0.savannah.gnu.org>
     [not found] ` <20210912165143.5BC1E20A5E@vcs0.savannah.gnu.org>
2021-09-12 22:42   ` master ff4de1b: Fix quoting style in Lisp comments Dmitry Gutov
2021-09-13  8:06     ` Lars Ingebrigtsen
2021-09-13 12:01       ` Eli Zaretskii
2021-09-14  2:14         ` Phil Sainty
2021-09-13 11:34     ` Eli Zaretskii
2021-09-13 11:41       ` Lars Ingebrigtsen
2021-09-13 12:23         ` Eli Zaretskii
2021-09-13 12:36         ` martin rudalics
2021-09-13 16:53           ` Stefan Monnier
2021-09-13 18:25             ` Stefan Monnier
2021-09-15  9:27               ` martin rudalics
2021-09-15 12:42                 ` Stefan Monnier
2021-09-15 18:46                   ` martin rudalics
2021-09-15 16:02                 ` Juri Linkov
2021-09-15 16:30                   ` Eli Zaretskii
2021-09-15 18:07                     ` Dmitry Gutov
2021-09-15 18:16                       ` Eli Zaretskii
2021-09-15 18:20                         ` Dmitry Gutov
2021-09-15 21:12                           ` [External] : " Drew Adams
2021-09-15 18:40                         ` Stefan Kangas
2021-09-15 18:52                           ` Eli Zaretskii
2021-09-15 20:01                             ` Dmitry Gutov
2021-09-15 20:15                               ` Stefan Monnier
2021-09-15 21:24                                 ` [External] : " Drew Adams
2021-09-16  5:08                                 ` Eli Zaretskii
2021-09-16 10:39                                   ` Dmitry Gutov
2021-09-16 12:32                                     ` Lars Ingebrigtsen
2021-09-16 12:53                                       ` Eli Zaretskii
2021-09-16 13:37                                         ` Dmitry Gutov
2021-09-16 23:20                                           ` Phil Sainty
2021-09-18  0:15                                             ` Dmitry Gutov
2021-09-16 16:19                                         ` [External] : " Drew Adams
2021-09-17 14:12                                         ` Lars Ingebrigtsen
2021-09-17 15:58                                           ` Eli Zaretskii
2021-09-17 19:21                                             ` Stefan Kangas
2021-09-18  5:42                                               ` Eli Zaretskii
2021-09-18  8:17                                                 ` Stefan Kangas
2021-09-18  8:26                                                   ` Eli Zaretskii
2021-09-18 13:30                                             ` Lars Ingebrigtsen
2021-09-18 13:34                                               ` Eli Zaretskii
2021-09-18 16:03                                                 ` [External] : " Drew Adams
2021-09-18 16:13                                                   ` Eli Zaretskii
2021-09-18 16:52                                                     ` Drew Adams
2021-09-18 16:54                                                       ` Lars Ingebrigtsen
2021-09-18 17:07                                                         ` Drew Adams
2021-09-16 13:31                                       ` Eli Zaretskii
2021-09-16 16:20                                         ` [External] : " Drew Adams
2021-09-16 14:15                                       ` Eli Zaretskii
2021-09-16 14:18                                         ` Dmitry Gutov
2021-09-16 15:22                                           ` Eli Zaretskii
2021-09-16 16:20                                         ` [External] : " Drew Adams
2021-09-17  9:17                                       ` Gregory Heytings
2021-09-17 10:26                                         ` Stefan Kangas
2021-09-17 10:39                                           ` Eli Zaretskii
2021-09-17 22:46                                             ` Stefan Kangas
2021-09-18  6:19                                               ` Eli Zaretskii [this message]
2021-09-18  7:32                                                 ` Andreas Schwab
2021-09-18  8:20                                                   ` Eli Zaretskii
2021-09-18  8:37                                                     ` Adam Sjøgren
2021-09-18  8:44                                                     ` Gregory Heytings
2021-09-18  8:48                                                     ` Yuri Khan
2021-09-18 11:50                                                       ` Phil Sainty
2021-09-18 11:54                                                         ` Yuri Khan
2021-09-18 16:03                                                           ` [External] : " Drew Adams
2021-09-18 16:02                                                         ` Drew Adams
2021-09-18 16:02                                                       ` Drew Adams
2021-09-18 16:01                                                     ` Drew Adams
2021-09-18 16:01                                                   ` Drew Adams
2021-09-18  8:17                                                 ` Stefan Kangas
2021-09-18  8:25                                                   ` Eli Zaretskii
2021-09-18  9:18                                                     ` Stefan Kangas
2021-09-18 11:00                                                       ` Eli Zaretskii
2021-09-18 16:02                                                     ` [External] : " Drew Adams
2021-09-18  9:28                                                   ` Yuri Khan
2021-09-18 10:05                                                     ` Stefan Kangas
2021-09-18 10:27                                                       ` Yuri Khan
2021-09-18 10:51                                                         ` Stefan Kangas
2021-09-18 18:40                                                           ` Juri Linkov
2021-09-18 18:56                                                             ` Eli Zaretskii
2021-09-18 19:34                                                               ` Stefan Kangas
2021-09-18 23:22                                                                 ` [External] : " Drew Adams
2021-09-19  5:44                                                                   ` Eli Zaretskii
2021-09-19 10:00                                                                     ` Stefan Kangas
2021-09-19 17:30                                                                     ` Drew Adams
2021-09-19 17:42                                                                       ` Eli Zaretskii
2021-09-19 17:54                                                                         ` Drew Adams
2021-09-21 14:38                                                                           ` Jean Louis
2021-09-21 17:04                                                                             ` tomas
2021-09-21 17:09                                                                               ` tomas
2021-09-24 20:42                                                                               ` Richard Stallman
2021-09-19  5:30                                                                 ` Eli Zaretskii
2021-09-17 10:55                                           ` Gregory Heytings
2021-09-17 11:16                                             ` Eli Zaretskii
2021-09-17 11:30                                               ` Gregory Heytings
2021-09-17 12:11                                                 ` Eli Zaretskii
2021-09-17 12:30                                                   ` Gregory Heytings
2021-09-17 16:21                                                     ` Yuri Khan
2021-09-17 16:40                                                       ` João Távora
2021-09-17 16:44                                                       ` Alan Mackenzie
2021-09-17 17:47                                                       ` Eli Zaretskii
2021-09-17 18:42                                                         ` Yuri Khan
2021-09-17 18:51                                                           ` Eli Zaretskii
2021-09-17 19:14                                                       ` Gregory Heytings
2021-09-17 19:22                                                         ` Stefan Monnier
2021-09-17 20:32                                                           ` Manuel Giraud
2021-09-17 22:16                                                             ` [External] : " Drew Adams
2021-09-18 13:45                                                             ` Stefan Monnier
2021-09-18 16:03                                                               ` [External] : " Drew Adams
2021-09-18 17:25                                                                 ` Stefan Monnier
2021-09-18 17:46                                                                   ` Stefan Kangas
2021-09-18 23:11                                                                     ` Stefan Monnier
2021-09-18 23:22                                                                   ` Drew Adams
2021-09-19 12:26                                                                     ` Stefan Monnier
2021-09-18  5:43                                                           ` Eli Zaretskii
2021-09-18  8:33                                                             ` Stefan Kangas
2021-09-18  8:53                                                               ` Gregory Heytings
2021-09-17 18:09                                                   ` [External] : " Drew Adams
2021-09-17 18:09                                           ` Drew Adams
2021-09-16 16:18                                   ` Drew Adams
2021-09-16 10:50                                 ` Dmitry Gutov
2021-09-16 11:39                                   ` Eli Zaretskii
2021-09-16 14:12                                     ` Dmitry Gutov
2021-09-16 16:20                                       ` [External] : " Drew Adams
2021-09-16 16:18                                     ` Drew Adams
2021-09-16 11:25                                 ` Stefan Kangas
2021-09-17  0:16                                 ` Richard Stallman
2021-09-17  0:27                                   ` Alexandre Garreau
2021-09-17  6:34                                   ` Eli Zaretskii
2021-09-17 10:44                                     ` Dmitry Gutov
2021-09-17 11:11                                       ` Eli Zaretskii
2021-09-17 11:25                                         ` Dmitry Gutov
2021-09-17 12:09                                           ` Eli Zaretskii
2021-09-17 12:38                                             ` Phil Sainty
2021-09-17 12:59                                               ` Tassilo Horn
2021-09-17 15:45                                               ` Eli Zaretskii
2021-09-17 13:07                                             ` Dmitry Gutov
2021-09-17 13:44                                               ` João Távora
2021-09-17 15:49                                               ` Eli Zaretskii
2021-09-17 16:33                                                 ` Dmitry Gutov
2021-09-17 18:10                                               ` [External] : " Drew Adams
2021-09-17 13:18                                           ` Amin Bandali
2021-09-17 18:09                                       ` [External] : " Drew Adams
2021-09-16  4:53                               ` Eli Zaretskii
2021-09-16  8:51                                 ` Dmitry Gutov
2021-09-16  9:11                                   ` Eli Zaretskii
2021-09-16 10:34                                     ` Dmitry Gutov
2021-09-16 11:35                                       ` Eli Zaretskii
2021-09-16 13:38                                         ` Dmitry Gutov
2021-09-15 18:48                     ` martin rudalics
2021-09-15 19:05                       ` Eli Zaretskii
2021-09-16  6:56                         ` martin rudalics
2021-09-16  7:11                           ` Eli Zaretskii
2021-09-16 16:18                             ` [External] : " Drew Adams
2021-09-13 11:51       ` Dmitry Gutov
2021-09-13 12:05         ` Lars Ingebrigtsen
2021-09-13 12:28           ` Eli Zaretskii
2021-09-13 12:29             ` Lars Ingebrigtsen
2021-09-13 12:26         ` Eli Zaretskii
2021-09-13 12:56           ` Dmitry Gutov

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=83czp676df.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=dgutov@yandex.ru \
    --cc=emacs-devel@gnu.org \
    --cc=gregory@heytings.org \
    --cc=juri@linkov.net \
    --cc=larsi@gnus.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=rudalics@gmx.at \
    --cc=stefan@marxist.se \
    /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.