diff options
| author | Stefan Monnier | 2009-11-05 21:01:32 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2009-11-05 21:01:32 +0000 |
| commit | 2adaf05797dbf20e645f0357dcf22fe308ae7bbe (patch) | |
| tree | 8886c6e992f0fd1652ac5dc61264f5c37899cd6b /lisp/nxml/nxml-parse.el | |
| parent | 81ad75af15f169655ba4c8eada78782367cabbf0 (diff) | |
| download | emacs-2adaf05797dbf20e645f0357dcf22fe308ae7bbe.tar.gz emacs-2adaf05797dbf20e645f0357dcf22fe308ae7bbe.zip | |
* nxml/xsd-regexp.el (xsdre-gen-categories):
* nxml/xmltok.el (xmltok-parse-entity):
* nxml/rng-parse.el (rng-parse-validate-file):
* nxml/rng-maint.el (rng-format-manual, rng-manual-output-force-new-line):
* nxml/rng-loc.el (rng-save-schema-location-1):
* nxml/rng-cmpct.el (rng-c-parse-file):
* nxml/nxml-maint.el (nxml-insert-target-repertoire-glyph-set):
* nxml/nxml-parse.el (nxml-parse-file): Use with-current-buffer.
Diffstat (limited to 'lisp/nxml/nxml-parse.el')
| -rw-r--r-- | lisp/nxml/nxml-parse.el | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lisp/nxml/nxml-parse.el b/lisp/nxml/nxml-parse.el index 2b86c22789f..3059132a096 100644 --- a/lisp/nxml/nxml-parse.el +++ b/lisp/nxml/nxml-parse.el | |||
| @@ -98,16 +98,14 @@ modified buffer currently visiting FILE. | |||
| 98 | If the variable `nxml-validate-function' is non-nil, it will be called | 98 | If the variable `nxml-validate-function' is non-nil, it will be called |
| 99 | twice for each element, and any reported error will be signaled in the | 99 | twice for each element, and any reported error will be signaled in the |
| 100 | same way as well-formedness error." | 100 | same way as well-formedness error." |
| 101 | (save-excursion | 101 | (with-current-buffer (nxml-parse-find-file file) |
| 102 | (set-buffer (nxml-parse-find-file file)) | ||
| 103 | (unwind-protect | 102 | (unwind-protect |
| 104 | (let ((nxml-parse-file-name file)) | 103 | (let ((nxml-parse-file-name file)) |
| 105 | (nxml-parse-instance)) | 104 | (nxml-parse-instance)) |
| 106 | (kill-buffer nil)))) | 105 | (kill-buffer nil)))) |
| 107 | 106 | ||
| 108 | (defun nxml-parse-find-file (file) | 107 | (defun nxml-parse-find-file (file) |
| 109 | (save-excursion | 108 | (with-current-buffer (get-buffer-create " *nXML Parse*") |
| 110 | (set-buffer (get-buffer-create " *nXML Parse*")) | ||
| 111 | (erase-buffer) | 109 | (erase-buffer) |
| 112 | (let ((set-auto-coding-function 'nxml-set-xml-coding)) | 110 | (let ((set-auto-coding-function 'nxml-set-xml-coding)) |
| 113 | (insert-file-contents file)) | 111 | (insert-file-contents file)) |