emacs-devel
[Top][All Lists]
Advanced

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

Re: Raw string literals in Emacs lisp.


From: David Kastrup
Subject: Re: Raw string literals in Emacs lisp.
Date: Sun, 03 Aug 2014 15:40:14 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

"Stephen J. Turnbull" <address@hidden> writes:

> In the case of
>
>     (format "%s%c\n""r#"?\")-!-
>
> it's "r#\"\n".  But for
>
>     (format "%s%c\n""r#"?\"-!-)
>
> you could argue that it's ?\" (that's XEmacs's opinion)

Which is correct according the surrounding syntax.

> or "?\\".  I guess for XEmacs (which already has this syntax in the
> wild) the rule should be "longest match wins" (because otherwise
> there's no way to evaluate r#"?\" in an interactive buffer),

Longest single-sexp match would be r#"?\" since the correct
interpretation "r#"?\" are actually _two_ sexps.  So the "correct"
single sexp match in _this_ example would indeed be the shortest match
?\" here.  Obviously, depending on what transpires before, it is equally
easy to have the longer match be correct.

-- 
David Kastrup




reply via email to

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