[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master ff4de1b: Fix quoting style in Lisp comments
From: |
Stefan Kangas |
Subject: |
Re: master ff4de1b: Fix quoting style in Lisp comments |
Date: |
Fri, 17 Sep 2021 15:46:25 -0700 |
Eli Zaretskii <eliz@gnu.org> writes:
>> IMO, we should automatically display in comments and docstrings whatever
>> quote character the user prefers according to `text-quoting-style', and
>> automatically insert the correct quote character when typing "'".
>
> 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.
Am I missing something?
Here's what I tried:
(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.
- Re: [External] : Re: master ff4de1b: Fix quoting style in Lisp comments, (continued)
- Re: master ff4de1b: Fix quoting style in Lisp comments, Eli Zaretskii, 2021/09/16
- Re: master ff4de1b: Fix quoting style in Lisp comments, Dmitry Gutov, 2021/09/16
- Re: master ff4de1b: Fix quoting style in Lisp comments, Eli Zaretskii, 2021/09/16
- RE: [External] : Re: master ff4de1b: Fix quoting style in Lisp comments, Drew Adams, 2021/09/16
- Re: master ff4de1b: Fix quoting style in Lisp comments, Gregory Heytings, 2021/09/17
- Re: master ff4de1b: Fix quoting style in Lisp comments, Stefan Kangas, 2021/09/17
- Re: master ff4de1b: Fix quoting style in Lisp comments, Eli Zaretskii, 2021/09/17
- Re: master ff4de1b: Fix quoting style in Lisp comments,
Stefan Kangas <=
- Re: master ff4de1b: Fix quoting style in Lisp comments, Eli Zaretskii, 2021/09/18
- Re: master ff4de1b: Fix quoting style in Lisp comments, Andreas Schwab, 2021/09/18
- Re: master ff4de1b: Fix quoting style in Lisp comments, Eli Zaretskii, 2021/09/18
- Re: master ff4de1b: Fix quoting style in Lisp comments, Adam Sjøgren, 2021/09/18
- Re: master ff4de1b: Fix quoting style in Lisp comments, Gregory Heytings, 2021/09/18
- Re: master ff4de1b: Fix quoting style in Lisp comments, Yuri Khan, 2021/09/18
- Re: master ff4de1b: Fix quoting style in Lisp comments, Phil Sainty, 2021/09/18
- Re: master ff4de1b: Fix quoting style in Lisp comments, Yuri Khan, 2021/09/18
- RE: [External] : Re: master ff4de1b: Fix quoting style in Lisp comments, Drew Adams, 2021/09/18
- RE: [External] : Re: master ff4de1b: Fix quoting style in Lisp comments, Drew Adams, 2021/09/18