all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to ensure nxml-mode instead of sgml-mode for html-file?
@ 2007-12-05  7:30 Le TeXnicien de Surface
  2007-12-05 15:54 ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 2+ messages in thread
From: Le TeXnicien de Surface @ 2007-12-05  7:30 UTC (permalink / raw)
  To: help-gnu-emacs

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: How to ensure nxml-mode instead of sgml-mode for html-file?
  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)
  0 siblings, 0 replies; 2+ messages in thread
From: Lennart Borgman (gmail) @ 2007-12-05 15:54 UTC (permalink / raw)
  To: help-gnu-emacs

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-12-05 15:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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)

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.