comparison lisp/nxml/rng-cmpct.el @ 105866:3367f0022cf2

* 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.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Thu, 05 Nov 2009 21:01:32 +0000
parents a9dc0e7c3f2b
children 1d1d5d9bd884
comparison
equal deleted inserted replaced
105865:131bccfc4f5d 105866:3367f0022cf2
346 (make-variable-buffer-local 'rng-c-file-name) 346 (make-variable-buffer-local 'rng-c-file-name)
347 347
348 (defvar rng-c-file-index nil) 348 (defvar rng-c-file-index nil)
349 349
350 (defun rng-c-parse-file (filename &optional context) 350 (defun rng-c-parse-file (filename &optional context)
351 (save-excursion 351 (with-current-buffer (get-buffer-create (rng-c-buffer-name context))
352 (set-buffer (get-buffer-create (rng-c-buffer-name context)))
353 (erase-buffer) 352 (erase-buffer)
354 (rng-c-init-buffer) 353 (rng-c-init-buffer)
355 (setq rng-c-file-name 354 (setq rng-c-file-name
356 (car (insert-file-contents filename))) 355 (car (insert-file-contents filename)))
357 (setq rng-c-escape-positions nil) 356 (setq rng-c-escape-positions nil)