Mercurial > emacs
changeset 91924:b6c62ca6da76
(nxml-mode): Don't add a write-contents-hook.
author | Jason Rumney <jasonr@gnu.org> |
---|---|
date | Mon, 18 Feb 2008 02:04:38 +0000 |
parents | 950bd398d6c2 |
children | 70ae8b5ec55d |
files | lisp/nxml/nxml-mode.el |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/nxml/nxml-mode.el Mon Feb 18 01:58:38 2008 +0000 +++ b/lisp/nxml/nxml-mode.el Mon Feb 18 02:04:38 2008 +0000 @@ -550,7 +550,11 @@ (when nxml-syntax-highlight-flag (add-hook 'fontification-functions 'nxml-fontify nil t)) (add-hook 'after-change-functions 'nxml-after-change nil t) - (add-hook 'write-contents-hooks 'nxml-prepare-to-save) + ;; Emacs 23 handles the encoding attribute on the xml declaration + ;; transparently to nxml-mode, so there is no longer a need for the below + ;; hook. The hook also had the drawback of overriding explicit user + ;; instruction to save as some encoding other than utf-8. +;;; (add-hook 'write-contents-hooks 'nxml-prepare-to-save) (when (not (and (buffer-file-name) (file-exists-p (buffer-file-name)))) (when (and nxml-default-buffer-file-coding-system (not (local-variable-p 'buffer-file-coding-system)))