joaotavora / sly

Sylvester the Cat's Common Lisp IDE
1.24k stars 140 forks source link

Manual highlighting #506

Open aadcg opened 2 years ago

aadcg commented 2 years ago

I'm not very comfortable with the texinfo format, so I'm wondering if someone would point me in the right direction to fix the issue below. I can work on the PR myself. Thanks.

2022-03-22_11:10:39

On the left - Sly's manual; on the right - Emacs' manual.

joaotavora commented 2 years ago

I'm not very comfortable with the format either, but I would love to have this normalized between Emacs and SLY. Maybe ask in the emacs-devel or help-gnu-emacs mailing list.

duckbilledwren commented 2 years ago

I'm not 100% sure about this, but based on behavior in other parts of Emacs and looking at these screenshots, I think this is a problem with the specific punctuation used, specifically using apostrophes (ASCII 0x27) instead of curved quotes (U+2018 and U+2019).

In elisp docstings and comments (at least with the theme I currently use, although I'd wager this is true for most themes), things surrounded by curved quotes[0] are highlighted.

I would be willing to try and dig through some documentation to try and find a source on this specific to Texinfo manuals, but this also seems simple enough to test[1] that I figured it probably couldn't hurt and would probably be faster to chime in with what I already know.

[0]: Generally this is used for elisp symbols, as in https://www.gnu.org/software/emacs/manual/html_node/elisp/Documentation-Tips.html

[1]: The commands for this are C-x 8 [ and C-x 8 ] for opening and closing curved quotes respectively, but it might also be worth taking a look at https://www.gnu.org/software/emacs/manual/html_node/emacs/Quotation-Marks.html#Quotation-Marks

EDIT: I spent a bit more time looking into it and Texinfo uses @ commands to generate those, not plain punctuation, which in hindsight I probably should've expected, so I don't know how helpful this will actually be.