Loading ...
Sorry, an error occurred while loading the content.

567Re: [emacs-nxml-mode] disabling xml-mode autoload in emacs (in favor of nxml-mode)

Expand Messages
  • Vincent Lefevre
    Jul 2, 2004
    • 0 Attachment
      On 2004-07-02 13:58:23 +1000, Mike Williams wrote:
      > Aaron Falk wrote:
      > >I'm new at nxml and am working on getting it to automatically load ...
      > Add this to your ~/.emacs:
      > (aput 'auto-mode-alist "\\.xml\\'" 'nxml-mode)

      And what about the XML files that do not have the .xml extension?
      (This could be rss, html, and so on.)

      I prefer the following code (I don't remember where I got it from...):

      ;; Hook to enter XML mode
      (add-hook 'hack-local-variables-hook
      (lambda ()
      (when (search-forward-regexp "^<\\?xml" 6 0)

      You need an XML prolog, though.

      Vincent Lefèvre <vincent@...> - Web: <http://www.vinc17.org/>
      100% validated (X)HTML - Acorn / RISC OS / ARM, free software, YP17,
      Championnat International des Jeux Mathématiques et Logiques, etc.
      Work: CR INRIA - computer arithmetic / SPACES project at LORIA
    • Show all 3 messages in this topic