[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to ensure nxml-mode instead of sgml-mode for html-file?
From: |
Le TeXnicien de Surface |
Subject: |
How to ensure nxml-mode instead of sgml-mode for html-file? |
Date: |
Wed, 05 Dec 2007 08:30:37 +0100 |
User-agent: |
KNode/0.10.4 |
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
- How to ensure nxml-mode instead of sgml-mode for html-file?,
Le TeXnicien de Surface <=