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

2057Re: [emacs-nxml-mode] Disabling nxml-mode

Expand Messages
  • Jason Rumney
    May 7, 2011
      Peter Flynn <peter@...> writes:

      > I just upgraded a machine to Ubuntu Natty, which installed Emacs 23.2,
      > which appears to open XML files in nxml-mode by default. My .emacs file says
      >> (autoload 'xml-mode "psgml" "Major mode to edit XML files." t )
      >> (setq auto-mode-alist (cons
      >> ("\\.[XxRrMmDdTt][TtMmDdSsNnEe][PpAaMmLlFfSsIi]?[EePp]*[Cc]*$"
      >> . xml-mode) auto-mode-alist))
      > which has been working fine for years. It looks as if Emacs 23.2 defines
      > xml-mode to point to nxml-mode, and this is somehow superseding my .emacs.
      > Unfortunately I still need to use psgml's xml-mode for all my XML stuff.
      > How do I disable Emacs' new behaviour?

      Replace the autoload line in your .emacs with:

      (require 'nxml-mode)
      (require 'psgml)

      This will ensure that psgml overrides nxml's definition of xml-mode. If
      you leave those files to auto load, then it is always possible that nxml
      loads later, overriding psgml's xml-mode definition, or nxml loads
      first, and psgml never gets loaded because xml-mode is already defined.
    • Show all 14 messages in this topic