emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Raw string literals in Emacs lisp.


From: Matthew Plant
Subject: Raw string literals in Emacs lisp.
Date: Fri, 25 Jul 2014 12:47:45 -0700

I think that raw string literals would be a really nice thing to add to Emacs
lisp. The most immediate benefit is that writing regexps would be much easier.
And since most of the work that goes into major modes is writing regexp, writing
major modes would become a lot faster.

Obviously it can't be done in any way that's really consistent with the language
(it'd be super nice if ``string'' could be used, but alas). However, perhaps I
have found a reasonable approach.

What if we assume that any string surrounded immediately by parenthesis is a raw
string literal? I'm pretty sure every instance of ("...") is currently illegal,
and it would be almost certainly trivial to extend the Emacs' lexer/parser to
support it. I can do it myself if everyone thinks this is a good idea.

Please let me know what your thoughts are on this.

-Matt

reply via email to

[Prev in Thread] Current Thread [Next in Thread]