help-gnu-emacs
[Top][All Lists]
Advanced

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

RE: I can not understant a paragraph in Emacs Lisp Reference.


From: Drew Adams
Subject: RE: I can not understant a paragraph in Emacs Lisp Reference.
Date: Sat, 11 Jul 2009 08:05:35 -0700

>>     `[^\]' (`"[^\\]"' for Lisp string syntax)

>> `[^\]'  or `"[^\\]"' , which is right ?
>> what is Lisp string syntax for ?

> I try with re-builder ,  find that `"[^\\]"' is corrct .
> `"[^\]"' can not find anything .

Lisp string syntax is the syntax used in Lisp code when you write a literal
string (constant). The Lisp reader (part of the Lisp interpreter) reads the
string syntax you enter and constructs a string constant accordingly.

In Lisp string syntax, you need to double each backslash that you want in the
string. So "\\" is Lisp string syntax for the string that has one character, a
backslash. This doubling is needed because Lisp string syntax uses the backslash
for special escape sequences: for example, \" represents a double-quote
character.

See the Elisp manual, node `Syntax for Strings'.





reply via email to

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