<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Javascript regex en string literal highlighting in Emacs</title>
	<link>http://joost.zeekat.nl/2007/10/31/javascript-regex-en-string-literal-highlighting-in-emacs/</link>
	<description>Webdevelopment en ander cools in Lisp Perl JavaScript &#38; Ruby.</description>
	<pubDate>Mon, 06 Feb 2012 01:39:59 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.2</generator>
		<item>
		<title>By: Joost</title>
		<link>http://joost.zeekat.nl/2007/10/31/javascript-regex-en-string-literal-highlighting-in-emacs/#comment-33</link>
		<dc:creator>Joost</dc:creator>
		<pubDate>Thu, 31 Jan 2008 15:34:54 +0000</pubDate>
		<guid>http://joost.zeekat.nl/2007/10/31/javascript-regex-en-string-literal-highlighting-in-emacs/#comment-33</guid>
		<description>Hey Michael,

I'm not sure that can be fixed. At least not with the changes I made - I disabled all built-in string detection and all built-in comment detection except for the /* ... */ style comments - I left those in because I couldn't work out how to check for multi-line constructs.

Basically that means that  /* and  */  are detected before any other comment and string detection, so even inside a string or regex they will be interpreted as comment markers.

As a work around, you can escape the * character, which should not have any effect on the code: 

getElementsByXPath('.//\*' + cond, element)

I'm going to try and find a better solution, but don't hold your breath :-)</description>
		<content:encoded><![CDATA[<p>Hey Michael,</p>
<p>I&#8217;m not sure that can be fixed. At least not with the changes I made - I disabled all built-in string detection and all built-in comment detection except for the /* &#8230; */ style comments - I left those in because I couldn&#8217;t work out how to check for multi-line constructs.</p>
<p>Basically that means that  /* and  */  are detected before any other comment and string detection, so even inside a string or regex they will be interpreted as comment markers.</p>
<p>As a work around, you can escape the * character, which should not have any effect on the code: </p>
<p>getElementsByXPath(&#8217;.//\*&#8217; + cond, element)</p>
<p>I&#8217;m going to try and find a better solution, but don&#8217;t hold your breath :-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Alan Dorman</title>
		<link>http://joost.zeekat.nl/2007/10/31/javascript-regex-en-string-literal-highlighting-in-emacs/#comment-32</link>
		<dc:creator>Michael Alan Dorman</dc:creator>
		<pubDate>Thu, 31 Jan 2008 14:32:59 +0000</pubDate>
		<guid>http://joost.zeekat.nl/2007/10/31/javascript-regex-en-string-literal-highlighting-in-emacs/#comment-32</guid>
		<description>Joost, I just wanted to say thanks for posting this modified version of javascript.el---Karls last published version was causing emacs to fall over when looking at the source for prototype.js.

That said, if you're interested, there's one expression in the latest version at http://prototypejs.org/assets/2008/1/25/prototype-1.6.0.2.js that causes some mis-hilighting.  If you look at line 4160, there's an xpath expression involving // that causes the rest of the file to be highlighted as a comment.

Still, much much better than sending Emacs into some sort of tight loop!  Many thanks!

Mike.</description>
		<content:encoded><![CDATA[<p>Joost, I just wanted to say thanks for posting this modified version of javascript.el&#8212;Karls last published version was causing emacs to fall over when looking at the source for prototype.js.</p>
<p>That said, if you&#8217;re interested, there&#8217;s one expression in the latest version at <a href="http://prototypejs.org/assets/2008/1/25/prototype-1.6.0.2.js" rel="nofollow">http://prototypejs.org/assets/2008/1/25/prototype-1.6.0.2.js</a> that causes some mis-hilighting.  If you look at line 4160, there&#8217;s an xpath expression involving // that causes the rest of the file to be highlighted as a comment.</p>
<p>Still, much much better than sending Emacs into some sort of tight loop!  Many thanks!</p>
<p>Mike.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

