[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [h-e-w] fontifying ivascript code inside html code?
From: |
Galen Boyer |
Subject: |
Re: [h-e-w] fontifying ivascript code inside html code? |
Date: |
09 Jul 2002 23:28:35 -0700 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 |
On Sat, 06 Jul 2002, address@hidden wrote:
> Hi,
> I've the following problem: I'm using htmp-helper-mode.el, and it
> works fine; but since i write many lines of javascript code, I
> whish that those code should be threated as the classic "C" code,
> i.e. with syntax coloring, automatic indentation, parenthesis
> matching,etc, thing that doesn't happens. If I use .html
> extension for my script files, I see correct correct syntax
> coloring for the html code, but none for the java script code i
> put inside, using the classic <SCRIPT> tag; it appears in the
> same color (light grey on black), and it's very frustrating for
> me. If I use the .js or .jsp extension for my files, nothing
> works at all! I'm not an expert of elisp, so I ask you to help me
> to solve this little problem. Attached is my .emacs file that I'm
> currently using.
> Another thing: to semplify my work, I will use some ASP include
> files with the <% %> brachets, that will contain script code
> sxclusively; normally, for those files I use the .ASP extension:
> how to get those files fontifyed as the my old lovely C/C++ file?
Try mmm-mode. Found http://mmm-mode.sourceforge.net/. This was drilled
to on the mother of all elisp contributions,
http://www.anc.ed.ac.uk/~stephen/emacs/ell.html
It is a package, so take a look at the the file, mmm-sample.el. It will
have a sample of for jsp's. Add a line in your .emacs like so,
(add-to-list 'auto-mode-alist '("\\.jsp\\'" . html-helper-mode))
Then, add the extensions in the samples file. Hit `f' on a blah.jsp and
see if you get what you need.