]> code.delx.au - gnu-emacs/blobdiff - lisp/nxml/xmltok.el
Fix interpretation of gnu line.col1-col2 error message format
[gnu-emacs] / lisp / nxml / xmltok.el
index 138d8e74a6b681d50a7a170bb11f1ee83d6befbc..03f05abac4327d69d80ed75402a176dc22c7a6c7 100644 (file)
@@ -1,6 +1,6 @@
 ;;; xmltok.el --- XML tokenization
 
-;; Copyright (C) 2003, 2007, 2008 Free Software Foundation, Inc.
+;; Copyright (C) 2003, 2007-2013 Free Software Foundation, Inc.
 
 ;; Author: James Clark
 ;; Keywords: XML
@@ -315,16 +315,14 @@ and VALUE-END, otherwise a STRING giving the value."
           (cond ((> space-count 0)
                  (setq xmltok-type 'space))
                 (t
-                 (goto-char (1+ (point)))
+                 (forward-char 1)
                  (xmltok-scan-after-lt))))
          ((eq ch ?\&)
           (cond ((> space-count 0)
                  (setq xmltok-type 'space))
                 (t
-                 (goto-char (1+ (point)))
-                 (xmltok-scan-after-amp
-                  (lambda (start end)
-                    (xmltok-handle-entity start end))))))
+                 (forward-char 1)
+                 (xmltok-scan-after-amp 'xmltok-handle-entity))))
          ((re-search-forward "[<&]\\|\\(]]>\\)" nil t)
           (cond ((not (match-beginning 1))
                  (goto-char (match-beginning 0))
@@ -1761,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))
@@ -1923,5 +1920,4 @@ and `xmltok-namespace-attributes'."
 
 (provide 'xmltok)
 
-;; arch-tag: 747e5f3a-6fc3-4f8d-bd96-89f05aa99f5e
 ;;; xmltok.el ends here