summaryrefslogtreecommitdiff
path: root/lisp/nxml/nxml-mode.el
diff options
context:
space:
mode:
authorJason Rumney <jasonr@gnu.org>2008-02-18 02:04:38 +0000
committerJason Rumney <jasonr@gnu.org>2008-02-18 02:04:38 +0000
commit43a54646b1d0de2f630e79f344e61e62f556f8a0 (patch)
tree999576d72276b218a5fa817d8b7f6bb4f64c0287 /lisp/nxml/nxml-mode.el
parentcb554a17b5efe33981af2bc64fb4cee104c90dc7 (diff)
downloademacs-43a54646b1d0de2f630e79f344e61e62f556f8a0.tar.gz
(nxml-mode): Don't add a write-contents-hook.
Diffstat (limited to 'lisp/nxml/nxml-mode.el')
-rw-r--r--lisp/nxml/nxml-mode.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/nxml/nxml-mode.el b/lisp/nxml/nxml-mode.el
index 11fadedd531..01637795c6b 100644
--- a/lisp/nxml/nxml-mode.el
+++ b/lisp/nxml/nxml-mode.el
@@ -550,7 +550,11 @@ Many aspects this mode can be customized using
(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)))