;;; xmltok.el --- XML tokenization
-;; Copyright (C) 2003, 2007, 2008 Free Software Foundation, Inc.
+;; Copyright (C) 2003, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
;; Author: James Clark
;; Keywords: XML
(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))
(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))