(defun nxmlm-hook() (custom-set-faces ;; Get rid of that goddamn underline face '(rng-error-face ((t (:foreground "yellow" :weight light))))) ;; Start flyspell, checking only prog-mode faces. (flyspell-prog-mode) ;; And add normal xml text to that list of prog-mode faces. (add-to-list 'flyspell-prog-text-faces 'nxml-text-face) ) (add-hook 'nxml-mode-hook (function nxmlm-hook))