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 | |
| 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.
| -rw-r--r-- | lisp/ChangeLog | 12 | ||||
| -rw-r--r-- | lisp/nxml/nxml-maint.el | 3 | ||||
| -rw-r--r-- | lisp/nxml/nxml-parse.el | 6 | ||||
| -rw-r--r-- | lisp/nxml/rng-cmpct.el | 3 | ||||
| -rw-r--r-- | lisp/nxml/rng-loc.el | 3 | ||||
| -rw-r--r-- | lisp/nxml/rng-maint.el | 9 | ||||
| -rw-r--r-- | lisp/nxml/rng-parse.el | 3 | ||||
| -rw-r--r-- | lisp/nxml/xmltok.el | 3 | ||||
| -rw-r--r-- | lisp/nxml/xsd-regexp.el | 3 |
9 files changed, 23 insertions, 22 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 729c5436a3b..1ecb9034b87 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,15 @@ | |||
| 1 | 2009-11-05 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * nxml/xsd-regexp.el (xsdre-gen-categories): | ||
| 4 | * nxml/xmltok.el (xmltok-parse-entity): | ||
| 5 | * nxml/rng-parse.el (rng-parse-validate-file): | ||
| 6 | * nxml/rng-maint.el (rng-format-manual) | ||
| 7 | (rng-manual-output-force-new-line): | ||
| 8 | * nxml/rng-loc.el (rng-save-schema-location-1): | ||
| 9 | * nxml/rng-cmpct.el (rng-c-parse-file): | ||
| 10 | * nxml/nxml-maint.el (nxml-insert-target-repertoire-glyph-set): | ||
| 11 | * nxml/nxml-parse.el (nxml-parse-file): Use with-current-buffer. | ||
| 12 | |||
| 1 | 2009-11-05 Wilson Snyder <wsnyder@wsnyder.org> | 13 | 2009-11-05 Wilson Snyder <wsnyder@wsnyder.org> |
| 2 | 14 | ||
| 3 | * verilog-mode.el (verilog-getopt-file, verilog-set-define): | 15 | * verilog-mode.el (verilog-getopt-file, verilog-set-define): |
diff --git a/lisp/nxml/nxml-maint.el b/lisp/nxml/nxml-maint.el index b8fd1d97ae1..d877c4ffa5d 100644 --- a/lisp/nxml/nxml-maint.el +++ b/lisp/nxml/nxml-maint.el | |||
| @@ -74,8 +74,7 @@ | |||
| 74 | (defun nxml-insert-target-repertoire-glyph-set (file var) | 74 | (defun nxml-insert-target-repertoire-glyph-set (file var) |
| 75 | (interactive "fTarget file: \nSVariable name: ") | 75 | (interactive "fTarget file: \nSVariable name: ") |
| 76 | (let (lst head) | 76 | (let (lst head) |
| 77 | (save-excursion | 77 | (with-current-buffer (find-file-noselect file) |
| 78 | (set-buffer (find-file-noselect file)) | ||
| 79 | (goto-char (point-min)) | 78 | (goto-char (point-min)) |
| 80 | (while (re-search-forward "^ *\\([a-FA-F0-9]\\{2\\}\\)[ \t]+" nil t) | 79 | (while (re-search-forward "^ *\\([a-FA-F0-9]\\{2\\}\\)[ \t]+" nil t) |
| 81 | (let ((row (match-string 1)) | 80 | (let ((row (match-string 1)) |
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)) |
diff --git a/lisp/nxml/rng-cmpct.el b/lisp/nxml/rng-cmpct.el index f357633c2e9..d9e29003497 100644 --- a/lisp/nxml/rng-cmpct.el +++ b/lisp/nxml/rng-cmpct.el | |||
| @@ -348,8 +348,7 @@ OVERRIDE is either nil, require or t." | |||
| 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 |
diff --git a/lisp/nxml/rng-loc.el b/lisp/nxml/rng-loc.el index 5207d7aa5e4..84ee27a44f1 100644 --- a/lisp/nxml/rng-loc.el +++ b/lisp/nxml/rng-loc.el | |||
| @@ -508,8 +508,7 @@ saved to the first writable file in `rng-schema-locating-files'." | |||
| 508 | "schema location") | 508 | "schema location") |
| 509 | file))))) | 509 | file))))) |
| 510 | (t | 510 | (t |
| 511 | (save-excursion | 511 | (with-current-buffer (find-file-noselect file) |
| 512 | (set-buffer (find-file-noselect file)) | ||
| 513 | (let ((modified (buffer-modified-p))) | 512 | (let ((modified (buffer-modified-p))) |
| 514 | (if (> (buffer-size) 0) | 513 | (if (> (buffer-size) 0) |
| 515 | (let (xmltok-dtd) | 514 | (let (xmltok-dtd) |
diff --git a/lisp/nxml/rng-maint.el b/lisp/nxml/rng-maint.el index 780e292c0fd..24c903482a1 100644 --- a/lisp/nxml/rng-maint.el +++ b/lisp/nxml/rng-maint.el | |||
| @@ -46,8 +46,7 @@ | |||
| 46 | rng-dir))) | 46 | rng-dir))) |
| 47 | (texi-buf (find-file-noselect (expand-file-name rng-manual-texi | 47 | (texi-buf (find-file-noselect (expand-file-name rng-manual-texi |
| 48 | rng-dir)))) | 48 | rng-dir)))) |
| 49 | (save-excursion | 49 | (with-current-buffer texi-buf |
| 50 | (set-buffer texi-buf) | ||
| 51 | (erase-buffer) | 50 | (erase-buffer) |
| 52 | (let ((standard-output texi-buf)) | 51 | (let ((standard-output texi-buf)) |
| 53 | (princ (format "\\input texinfo @c -*- texinfo -*-\n\ | 52 | (princ (format "\\input texinfo @c -*- texinfo -*-\n\ |
| @@ -212,14 +211,12 @@ | |||
| 212 | )))) | 211 | )))) |
| 213 | 212 | ||
| 214 | (defun rng-manual-output-force-new-line () | 213 | (defun rng-manual-output-force-new-line () |
| 215 | (save-excursion | 214 | (with-current-buffer standard-output |
| 216 | (set-buffer standard-output) | ||
| 217 | (unless (eq (char-before) ?\n) | 215 | (unless (eq (char-before) ?\n) |
| 218 | (insert ?\n)))) | 216 | (insert ?\n)))) |
| 219 | 217 | ||
| 220 | (defun rng-manual-output-force-blank-line () | 218 | (defun rng-manual-output-force-blank-line () |
| 221 | (save-excursion | 219 | (with-current-buffer standard-output |
| 222 | (set-buffer standard-output) | ||
| 223 | (if (eq (char-before) ?\n) | 220 | (if (eq (char-before) ?\n) |
| 224 | (unless (eq (char-before (1- (point))) ?\n) | 221 | (unless (eq (char-before (1- (point))) ?\n) |
| 225 | (insert ?\n)) | 222 | (insert ?\n)) |
diff --git a/lisp/nxml/rng-parse.el b/lisp/nxml/rng-parse.el index d628e734f4a..d4ed32d6c12 100644 --- a/lisp/nxml/rng-parse.el +++ b/lisp/nxml/rng-parse.el | |||
| @@ -40,8 +40,7 @@ The returned list has the same form as that returned by | |||
| 40 | for validation, such as returned by the function `rng-c-load-schema'. | 40 | for validation, such as returned by the function `rng-c-load-schema'. |
| 41 | If the XML document is invalid with respect to schema, an error will | 41 | If the XML document is invalid with respect to schema, an error will |
| 42 | be signaled in the same way as when it is not well-formed." | 42 | be signaled in the same way as when it is not well-formed." |
| 43 | (save-excursion | 43 | (with-current-buffer (nxml-parse-find-file file) |
| 44 | (set-buffer (nxml-parse-find-file file)) | ||
| 45 | (unwind-protect | 44 | (unwind-protect |
| 46 | (let ((nxml-parse-file-name file) | 45 | (let ((nxml-parse-file-name file) |
| 47 | (nxml-validate-function 'rng-parse-do-validate) | 46 | (nxml-validate-function 'rng-parse-do-validate) |
diff --git a/lisp/nxml/xmltok.el b/lisp/nxml/xmltok.el index a73efd27bac..9872a7acc1f 100644 --- a/lisp/nxml/xmltok.el +++ b/lisp/nxml/xmltok.el | |||
| @@ -1759,8 +1759,7 @@ Processing instruction does not start with a name" | |||
| 1759 | (setcdr name-def 'not-well-formed) ; avoid infinite expansion loops | 1759 | (setcdr name-def 'not-well-formed) ; avoid infinite expansion loops |
| 1760 | (setq buf (get-buffer-create | 1760 | (setq buf (get-buffer-create |
| 1761 | (format " *Entity %s*" (car name-def)))) | 1761 | (format " *Entity %s*" (car name-def)))) |
| 1762 | (save-excursion | 1762 | (with-current-buffer buf |
| 1763 | (set-buffer buf) | ||
| 1764 | (erase-buffer) | 1763 | (erase-buffer) |
| 1765 | (insert def) | 1764 | (insert def) |
| 1766 | (goto-char (point-min)) | 1765 | (goto-char (point-min)) |
diff --git a/lisp/nxml/xsd-regexp.el b/lisp/nxml/xsd-regexp.el index 0cb4d3fdf2f..64ed5f62cfe 100644 --- a/lisp/nxml/xsd-regexp.el +++ b/lisp/nxml/xsd-regexp.el | |||
| @@ -710,8 +710,7 @@ whose value is a range-list." | |||
| 710 | "Use a UnicodeData file to generate code to initialize Unicode categories. | 710 | "Use a UnicodeData file to generate code to initialize Unicode categories. |
| 711 | Code is inserted into the current buffer." | 711 | Code is inserted into the current buffer." |
| 712 | (interactive "fUnicodeData file: ") | 712 | (interactive "fUnicodeData file: ") |
| 713 | (save-excursion | 713 | (with-current-buffer (find-file-noselect file) |
| 714 | (set-buffer (find-file-noselect file)) | ||
| 715 | (goto-char (point-min)) | 714 | (goto-char (point-min)) |
| 716 | (mapc (lambda (x) (put x 'xsdre-ranges nil)) xsdre-gen-categories) | 715 | (mapc (lambda (x) (put x 'xsdre-ranges nil)) xsdre-gen-categories) |
| 717 | (while (re-search-forward "^\\([0-9A-Fa-f]*\\);[^;]*;\\([A-Z][a-z]\\);" | 716 | (while (re-search-forward "^\\([0-9A-Fa-f]*\\);[^;]*;\\([A-Z][a-z]\\);" |