diff options
| author | Jason Rumney | 2008-02-18 02:04:38 +0000 |
|---|---|---|
| committer | Jason Rumney | 2008-02-18 02:04:38 +0000 |
| commit | 4d42bcc9b8cea4e820999584c402d3c535fe8d8a (patch) | |
| tree | c635e380bd189d537dae06a9f0565aeb2a436778 | |
| parent | 7123da6dab267a97abfe757d94835a06f98a2dff (diff) | |
| download | emacs-4d42bcc9b8cea4e820999584c402d3c535fe8d8a.tar.gz emacs-4d42bcc9b8cea4e820999584c402d3c535fe8d8a.zip | |
(nxml-mode): Don't add a write-contents-hook.
| -rw-r--r-- | lisp/nxml/nxml-mode.el | 6 |
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 | |||
| 550 | (when nxml-syntax-highlight-flag | 550 | (when nxml-syntax-highlight-flag |
| 551 | (add-hook 'fontification-functions 'nxml-fontify nil t)) | 551 | (add-hook 'fontification-functions 'nxml-fontify nil t)) |
| 552 | (add-hook 'after-change-functions 'nxml-after-change nil t) | 552 | (add-hook 'after-change-functions 'nxml-after-change nil t) |
| 553 | (add-hook 'write-contents-hooks 'nxml-prepare-to-save) | 553 | ;; Emacs 23 handles the encoding attribute on the xml declaration |
| 554 | ;; transparently to nxml-mode, so there is no longer a need for the below | ||
| 555 | ;; hook. The hook also had the drawback of overriding explicit user | ||
| 556 | ;; instruction to save as some encoding other than utf-8. | ||
| 557 | ;;; (add-hook 'write-contents-hooks 'nxml-prepare-to-save) | ||
| 554 | (when (not (and (buffer-file-name) (file-exists-p (buffer-file-name)))) | 558 | (when (not (and (buffer-file-name) (file-exists-p (buffer-file-name)))) |
| 555 | (when (and nxml-default-buffer-file-coding-system | 559 | (when (and nxml-default-buffer-file-coding-system |
| 556 | (not (local-variable-p 'buffer-file-coding-system))) | 560 | (not (local-variable-p 'buffer-file-coding-system))) |