[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH]: xmltok.el: (xmltok-forward): Minimal simplification
From: |
Mario Lang |
Subject: |
[PATCH]: xmltok.el: (xmltok-forward): Minimal simplification |
Date: |
Tue, 30 Sep 2008 09:38:40 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) |
Hi.
While looking for some speedups in Emacs XML pasers for a project
of mine I noticed the following trivial changes that should probably
be done to `xmltok-forward'. This is a trivial change, doesn't change
functionality.
--- a/lisp/nxml/xmltok.el
+++ b/lisp/nxml/xmltok.el
@@ -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))
--
CYa,
⡍⠁⠗⠊⠕ | Debian Developer <URL:http://debian.org/>
.''`. | Get my public key via finger mlang/address@hidden
: :' : | 1024D/7FC1A0854909BCCDBE6C102DDFFC022A6B113E44
`. `'
`- <URL:http://delysid.org/> <URL:http://www.staff.tugraz.at/mlang/>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH]: xmltok.el: (xmltok-forward): Minimal simplification,
Mario Lang <=