Re: Uses nxhtml-mode in an no-standard extension files

Florent Georges <[email protected]>
Newsgroups gmane.emacs.nxml.general
Message-ID <[email protected]>
Reinout van Rees wrote:

  Hi

> (autoload 'nxml-mode "nxml-mode" "XML editing mode." t)
> ;(load "rng-auto.el")
> (setq auto-mode-alist
>       (cons
> '("\\.\\(xml\\|html\\|htm\\|xslt\\|pt\\|cpt\\|zcml\\|xsl\\)\\'"
> . nxml-mode)
>             auto-mode-alist))

  push is available for a while now in GNU Emacs, so for the sake of
readibility I suggest the equivalent (but that's just cosmetic):

    (push '("\\...\\'" . nxml-mode) auto-mode-alist)

  More importantly, don't forget magic-mode-alist:

    (push '("\\`<\\?xml" . nxml-mode) magic-mode-alist)

That will use nXML for all files whose the content starts with "<?xml"
(that is, the beginning of an XML declaration.)  That have precedence
over auto-mode-alist.

  And of course, because he seems to be installing nXML, the OP will be
perhaps interested by schema locating files to install additional
format understood by nXML (for validation, completion...)  See (info
"(nxml-mode)Schema locating files").

  Regards,

--drkm























      _____________________________________________________________________________ 
Envoyez avec Yahoo! Mail. Plus de moyens pour rester en contact. http://mail.yahoo.fr


------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/emacs-nxml-mode/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/emacs-nxml-mode/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[email protected] 
    mailto:[email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.