unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Hadron <hadronquark@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: How to edit "mixed" (e.g. HTML/JavaScript) files?
Date: Thu, 08 Mar 2007 12:02:34 +0100	[thread overview]
Message-ID: <87mz2odmlx.fsf@gmail.com> (raw)
In-Reply-To: 87hcsw2hhw.fsf@gmail.com

Hadron <hadronquark@gmail.com> writes:

> "Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:
>
>> kj wrote:
>>> It often happens that a single file must contain code corresponding
>>> to two different syntaxes.  For example, an HTML file with embedded
>>> JavaScript or CSS.
>>>
>>> Is there a way to *locally* override the mode of a file and replace
>>> it with a different mode?
>>>
>>> If not, is there a good way to deal with such situations (other
>>> than avoiding them altogether)?
>>>
>>> Thanks!
>>>
>>> kj
>>
>> It depends on whom you ask ;-)
>>
>> You may try nxhtml-part-mode in nXhtml (you need Emacs 22 beta):
>>
>>   http://ourcomments.org/Emacs/nXhtml/doc/nxhtml.html
>>
>> Or you may try this
>>
>>   http://www.emacswiki.org/cgi-bin/wiki/MultipleModes
>>
>>
>
> Has anyone recently got this multiplemodes working? The wiki reads like
> a slaughter house!

ok, I bit the bullet.

I followed the instructions here:

http://www.emacswiki.org/cgi-bin/wiki/HtmlModeDeluxe

having installed php-mode, downloaded stefans css-mode, mmm-mode and pqsml from synaptic in Ubuntu.

I created a "my-mmm.el" pasting in the code listed there to configure
the html editing.

It all worked well "enough".

The default hiliting is attrocious IMO and I had to change
mmm-default-submode-face to grey12.  The mode changes when I am in
embedded php.

Interestingly though css-mode is the major mode for css files, not mmm
mode. Any ideas why?




-- 

  reply	other threads:[~2007-03-08 11:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-06 19:45 How to edit "mixed" (e.g. HTML/JavaScript) files? kj
2007-03-06 21:07 ` Lennart Borgman (gmail)
     [not found] ` <mailman.552.1173217248.7795.help-gnu-emacs@gnu.org>
2007-03-07 18:06   ` kj
2007-03-08  9:48   ` Hadron
2007-03-08 11:02     ` Hadron [this message]
2007-03-08 11:49     ` David Hansen
2007-03-08 13:27       ` Lennart Borgman (gmail)
2007-03-08 14:11         ` David Hansen
2007-03-08 16:06           ` Lennart Borgman (gmail)
2007-03-08 16:43             ` David Hansen
2007-03-08 17:15               ` Lennart Borgman (gmail)
2007-03-08 18:14                 ` David Hansen
     [not found]       ` <mailman.655.1173360456.7795.help-gnu-emacs@gnu.org>
2007-03-08 13:51         ` Hadron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mz2odmlx.fsf@gmail.com \
    --to=hadronquark@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).