davidianstyle 0 Newbie Poster

I'm working with perl and javascript and I was wondering if anyone knew of a way to get syntax highlight for two or more programming languages at once in Emacs.

For example:

# This is perl's comment
my $variable;
// This is javascript's comment
var variable;

I'd like the perl comment to have the same color highlighting as the javascript comment and not have the apostrophe in javascript's ruin highlighting for the rest of the code (since the line is not interpreted as a comment in the editor) Please let me know if I'm being confusing.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.