7

Cartier-Tilet: Emacs 29 is nigh

 1 year ago
source link: https://lwn.net/Articles/916201/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Cartier-Tilet: Emacs 29 is nigh

[Posted November 29, 2022 by corbet]
Lucien Cartier-Tilet looks forward to the upcoming Emacs 29 release.
In case you didn’t know, Emacs’ current syntax highlighting is currently based on a system of regexes. Although it is not the worst thing to use, it’s not the best either, and it can become quite slow on larger files.

TreeSitter parses programming languages based into a concrete syntax tree. From there, not only can syntax highlighting can be done at high speed, but a much deeper analysis of the code is possible and actions such sa syntax manipulation can also be achieved since the syntax tree itself is available as an object which can be manipulated!


(Log in to post comments)

Cartier-Tilet: Emacs 29 is nigh

Posted Nov 29, 2022 15:40 UTC (Tue) by dskoll (subscriber, #1630) [Link]

Oh, I am definitely looking forward to better syntax highlighting! Sometimes the regexes get it wrong and I have to put in something like:

# ' Close quote to keep syntax highlighter happy

if an earlier comment contains the word "don't" or similar.

Cartier-Tilet: Emacs 29 is nigh

Posted Nov 29, 2022 18:06 UTC (Tue) by azaghal (subscriber, #47042) [Link]

Funny enough, this is why I have moved away from using shorthands (don't, can't, etc) in code comments. Somewhat improves the quality of writing as well, although Saxon genitive remains an issue :)

Cartier-Tilet: Emacs 29 is nigh

Posted Nov 29, 2022 18:49 UTC (Tue) by madscientist (subscriber, #16861) [Link]

Very strange: I've been using Emacs since... well, let's just say a really long time, and I can't remember ever seeing an apostrophe (or quote or whatever) in a comment every mess up formatting. Stuff in comments is ignored when it comes to matching quotes etc., at least in my experience.

Maybe you're using some language which doesn't have a proper mode defined for it in Emacs?


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK