emacs-devel
[Top][All Lists]
Advanced

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

Re: "Raw" string literals for elisp


From: Stefan Kangas
Subject: Re: "Raw" string literals for elisp
Date: Wed, 8 Sep 2021 23:11:00 +0200

Philip Kaludercic <philipk@posteo.net> writes:

> The reason I use rx in a lot of my scripts is that I can add comments,
> explanations, formatting, etc. when it gets complicated. I think that is
> a significant advantage, that even raw strings wouldn't have (unless a
> comment syntax were to be added into the regular expression language,
> which is unlikely).

Perl has this:

    perl -e '$foo = "bar"; print "yes" if $foo =~ / bar # comment /x;'

is equivalent to

    perl -e '$foo = "bar"; print "yes" if $foo =~ /bar/;'



reply via email to

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