]> git.eshelyaron.com Git - emacs.git/commitdiff
* nxml/xsd-regexp.el (xsdre-gen-categories):
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 5 Nov 2009 21:01:32 +0000 (21:01 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Thu, 5 Nov 2009 21:01:32 +0000 (21:01 +0000)
* 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.

lisp/ChangeLog
lisp/nxml/nxml-maint.el
lisp/nxml/nxml-parse.el
lisp/nxml/rng-cmpct.el
lisp/nxml/rng-loc.el
lisp/nxml/rng-maint.el
lisp/nxml/rng-parse.el
lisp/nxml/xmltok.el
lisp/nxml/xsd-regexp.el

index 729c5436a3bb9422a84c032b675d94b9ffa7137e..1ecb9034b87be6ff9a724e52b825985b14771744 100644 (file)
@@ -1,3 +1,15 @@
+2009-11-05  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * 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.
+
 2009-11-05  Wilson Snyder  <wsnyder@wsnyder.org>
 
        * verilog-mode.el (verilog-getopt-file, verilog-set-define):
index b8fd1d97ae1d4210fd0243330943e64aa0ef96e2..d877c4ffa5ddaeadf28d3df053f8414630fe1b8a 100644 (file)
@@ -74,8 +74,7 @@
 (defun nxml-insert-target-repertoire-glyph-set (file var)
   (interactive "fTarget file: \nSVariable name: ")
   (let (lst head)
-    (save-excursion
-      (set-buffer (find-file-noselect file))
+    (with-current-buffer (find-file-noselect file)
       (goto-char (point-min))
       (while (re-search-forward "^ *\\([a-FA-F0-9]\\{2\\}\\)[ \t]+" nil t)
        (let ((row (match-string 1))
index 2b86c22789fb5e7e5a7a0157845ae552f1030444..3059132a0969c1e040fcc37bbe2f39be902f4e4c 100644 (file)
@@ -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))
index f357633c2e9e6cda62bf466531c5609c8105a8c8..d9e290034972e9e3b06b3de9be4157ae9e4a4845 100644 (file)
@@ -348,8 +348,7 @@ OVERRIDE is either nil, require or t."
 (defvar rng-c-file-index nil)
 
 (defun rng-c-parse-file (filename &optional context)
-  (save-excursion
-    (set-buffer (get-buffer-create (rng-c-buffer-name context)))
+  (with-current-buffer (get-buffer-create (rng-c-buffer-name context))
     (erase-buffer)
     (rng-c-init-buffer)
     (setq rng-c-file-name
index 5207d7aa5e4f70d5e74faae5dd72335d3553d021..84ee27a44f194b025918c3a72d7d4ae8ff2b63ac 100644 (file)
@@ -508,8 +508,7 @@ saved to the first writable file in `rng-schema-locating-files'."
                                         "schema location")
                                       file)))))
          (t
-          (save-excursion
-            (set-buffer (find-file-noselect file))
+          (with-current-buffer (find-file-noselect file)
             (let ((modified (buffer-modified-p)))
               (if (> (buffer-size) 0)
                   (let (xmltok-dtd)
index 780e292c0fdb64f9400a56e2a8f479ee936d2fac..24c903482a1418f5b07cf6f4715a5e4f39fea747 100644 (file)
@@ -46,8 +46,7 @@
                                                       rng-dir)))
        (texi-buf (find-file-noselect (expand-file-name rng-manual-texi
                                                        rng-dir))))
-    (save-excursion
-      (set-buffer texi-buf)
+    (with-current-buffer texi-buf
       (erase-buffer)
       (let ((standard-output texi-buf))
        (princ (format "\\input texinfo @c -*- texinfo -*-\n\
             ))))
 
 (defun rng-manual-output-force-new-line ()
-  (save-excursion
-    (set-buffer standard-output)
+  (with-current-buffer standard-output
     (unless (eq (char-before) ?\n)
       (insert ?\n))))
 
 (defun rng-manual-output-force-blank-line ()
-  (save-excursion
-    (set-buffer standard-output)
+  (with-current-buffer standard-output
     (if (eq (char-before) ?\n)
        (unless (eq (char-before (1- (point))) ?\n)
          (insert ?\n))
index d628e734f4afe14add144cfbd6438b9a8aff1941..d4ed32d6c122e9089399ae3316ded57e85f4de67 100644 (file)
@@ -40,8 +40,7 @@ The returned list has the same form as that returned by
 for validation, such as returned by the function `rng-c-load-schema'.
 If the XML document is invalid with respect to schema, an error will
 be signaled in the same way as when it is not well-formed."
-  (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-validate-function 'rng-parse-do-validate)
index a73efd27baca35f9c5993fa7fa97a57e5832a792..9872a7acc1f2317c24118177f04283104d75e981 100644 (file)
@@ -1759,8 +1759,7 @@ Processing instruction does not start with a name"
        (setcdr name-def 'not-well-formed) ; avoid infinite expansion loops
        (setq buf (get-buffer-create
                   (format " *Entity %s*" (car name-def))))
-       (save-excursion
-         (set-buffer buf)
+       (with-current-buffer buf
          (erase-buffer)
          (insert def)
          (goto-char (point-min))
index 0cb4d3fdf2f2d3bfe204e554a0b35b061509fa55..64ed5f62cfe52cfd85d5cb9e4b61533e8963864c 100644 (file)
@@ -710,8 +710,7 @@ whose value is a range-list."
   "Use a UnicodeData file to generate code to initialize Unicode categories.
 Code is inserted into the current buffer."
   (interactive "fUnicodeData file: ")
-  (save-excursion
-    (set-buffer (find-file-noselect file))
+  (with-current-buffer (find-file-noselect file)
     (goto-char (point-min))
     (mapc (lambda (x) (put x 'xsdre-ranges nil)) xsdre-gen-categories)
     (while (re-search-forward "^\\([0-9A-Fa-f]*\\);[^;]*;\\([A-Z][a-z]\\);"