summaryrefslogtreecommitdiff
path: root/lisp/nxml/nxml-parse.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/nxml/nxml-parse.el')
-rw-r--r--lisp/nxml/nxml-parse.el6
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.
If the variable `nxml-validate-function' is non-nil, it will be called
twice for each element, and any reported error will be signaled in the
same way as well-formedness error."
- (save-excursion
- (set-buffer (nxml-parse-find-file file))
+ (with-current-buffer (nxml-parse-find-file file)
(unwind-protect
(let ((nxml-parse-file-name file))
(nxml-parse-instance))
(kill-buffer nil))))
(defun nxml-parse-find-file (file)
- (save-excursion
- (set-buffer (get-buffer-create " *nXML Parse*"))
+ (with-current-buffer (get-buffer-create " *nXML Parse*")
(erase-buffer)
(let ((set-auto-coding-function 'nxml-set-xml-coding))
(insert-file-contents file))