From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Le TeXnicien de Surface Newsgroups: gmane.emacs.help Subject: How to ensure nxml-mode instead of sgml-mode for html-file? Date: Wed, 05 Dec 2007 08:30:37 +0100 Organization: les newsgroups par Orange Message-ID: <475653a6$0$5082$ba4acef3@news.orange.fr> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: ger.gmane.org 1196868999 25414 80.91.229.12 (5 Dec 2007 15:36:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 5 Dec 2007 15:36:39 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 05 16:36:47 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IzwIn-0007Uo-0W for geh-help-gnu-emacs@m.gmane.org; Wed, 05 Dec 2007 16:36:45 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IzwIW-0000Bc-Aa for geh-help-gnu-emacs@m.gmane.org; Wed, 05 Dec 2007 10:36:28 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!proxad.net!feeder1-2.proxad.net!usenet-fr.net!grolier!rain.fr!news.wanadoo.fr!news.wanadoo.fr!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: KNode/0.10.4 Original-Lines: 39 Original-NNTP-Posting-Date: 05 Dec 2007 08:30:46 CET Original-NNTP-Posting-Host: 82.127.217.190 Original-X-Trace: 1196839846 news.orange.fr 5082 82.127.217.190:60445 Original-X-Complaints-To: abuse@orange.fr Original-Xref: shelby.stanford.edu gnu.emacs.help:154405 X-Mailman-Approved-At: Wed, 05 Dec 2007 10:36:04 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:49845 Archived-At: 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