From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: How to ensure nxml-mode instead of sgml-mode for html-file?
Date: Wed, 05 Dec 2007 16:54:23 +0100 [thread overview]
Message-ID: <4756C9AF.4030401@gmail.com> (raw)
In-Reply-To: <475653a6$0$5082$ba4acef3@news.orange.fr>
Le TeXnicien de Surface wrote:
> hello all
>
> I'm using emacs 22.1.1 which doesn't solve a recurring problem I have for
> too long a while.
>
> I've put that in my .emacs:
>
> ;; BEGIN
> (setq auto-mode-alist
> (cons '("\\.\\(xml\\|xsl\\|ent\\|rng\\)\\'" . nxml-mode)
> auto-mode-alist))
> (setq auto-mode-alist
> (cons '("\\.\\(html\\|htm\\|xhtml\\)\\'" . nxhtml-mode)
> auto-mode-alist))
>
> (load "/home/yvon/share/emacs/autostart.el")
> ;; this is where I've put all of the nxml and nxhtml trees
> ;; I do follow the instructions of the package author
> (require 'fmode)
> (fmode-replace-default-mode 'xml-mode 'nxml-mode)
> (fmode-replace-default-mode 'sgml-mode 'nxml-mode)
> (add-hook 'nxml-mode-hook 'turn-on-auto-fill)
> ;; END
>
> but so far to no avail.
>
> When I open a 1st html file the mode is HTML but for the 2d it is SGML
> which I would like to avoid. More over, it seems that the choice of HTML or
> SGML mode is quite unpredictable.
>
> I've got no problem with xml-files for there are always open in nxml-mode.
>
> Is there any way out of it?
> And if there is, could anybody show me the light, please.
>
> Many thanks in advance.
See
http://www.emacswiki.org/cgi-bin/wiki/NxmlMode
http://www.emacswiki.org/cgi-bin/wiki/NxhtmlMode
prev parent reply other threads:[~2007-12-05 15:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-05 7:30 How to ensure nxml-mode instead of sgml-mode for html-file? Le TeXnicien de Surface
2007-12-05 15:54 ` Lennart Borgman (gmail) [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4756C9AF.4030401@gmail.com \
--to=lennart.borgman@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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.