From: Le TeXnicien de Surface <texnicien.de.surface@chezmoi.eur>
To: help-gnu-emacs@gnu.org
Subject: How to ensure nxml-mode instead of sgml-mode for html-file?
Date: Wed, 05 Dec 2007 08:30:37 +0100 [thread overview]
Message-ID: <475653a6$0$5082$ba4acef3@news.orange.fr> (raw)
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.
--
Le TeXnicien de Surface
next reply other threads:[~2007-12-05 7:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-05 7:30 Le TeXnicien de Surface [this message]
2007-12-05 15:54 ` How to ensure nxml-mode instead of sgml-mode for html-file? Lennart Borgman (gmail)
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='475653a6$0$5082$ba4acef3@news.orange.fr' \
--to=texnicien.de.surface@chezmoi.eur \
--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.