Monday, May 11, 2009

Config for nXML-mode in Emacs 23.1


(require 'rng-loc)
(setq rng-schema-locating-files
(list* "schemas.xml"
(u:in-elisp-dir "user-nxml-schema/schemas.xml")
(remove "schemas.xml" rng-schema-locating-files-default)))

(setq auto-mode-alist
(cons '("\\.\\(xml\\|xsl\\|rng\\|xhtml\\|plist\\|keylayout\\|sdef\\)\\'" . nxml-mode)
auto-mode-alist))
;;
(setq magic-mode-alist
(remove-if '(lambda (x) (member x '(xml-mode html-mode sgml-mode)))
magic-mode-alist :key 'cdr))