emacs-devel
[Top][All Lists]
Advanced

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

Shell-script mode: Backslash has syntax "punctuation", not "escape".


From: Alan Mackenzie
Subject: Shell-script mode: Backslash has syntax "punctuation", not "escape".
Date: Tue, 3 Jul 2007 11:15:08 +0100
User-agent: Mutt/1.5.9i

Hi, Emacs!

Load the following file into Emacs:

#########################################################################
#!/bin/bash
echo Backslash doesn\'t have escape syntax.
# The rest of the file now has string fontification.
#########################################################################

Font locking doesn't take the backslash in "doesn\'t" seriously.  A
quick C-u C-x = on this backslash shows it has "." (punctuation) syntax.

In Emacs 21, backslash has "\\" (escape) syntax, and this fragment
fontifies properly there.

Not giving backslash escape syntax seems wierd, so wierd that it was
surely done deliberately for a good reason.  Can anybody tell me what
this reason was?

Whatever, it would seem that the Font Locking in this mode needs fixing.

-- 
Alan Mackenzie (Ittersbach, Germany).




reply via email to

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