|
From: | Lennart Borgman (gmail) |
Subject: | Adopting xmltok.el to multi major mode buffers |
Date: | Thu, 17 Jul 2008 20:06:27 +0200 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666 |
The parts that are not in nxml-mode should be regarded as empty. The reason for this logic is that it is the best I can come up with. Everything else I can think of will be to complicated and I think this simple logic would be useful in many cases.
Unfortunately xmltok uses a lot of regular expressions for parsing. (They are mostly used with looking-at, but that is not very important here.) AFAICS there is no way to tell a regular expression in Emacs to simply jump over a region (or several) in the buffer. I would be glad to know I am missing something there, but I am a bit pessimistic ;-)
There are about 30 places where regular expressions searches are used.I guess the regular expressions would have to be replaced by some parsing code. But I worry about the speed and I worry about that it is quite a lot of work.
I know about two parsing frameworks, the one that comes with CEDET and Mike Mattie's parser. I do not know if any of those really fit for the requirements here. xmltok is doing a bit different job, perhaps. And the regular expressions are nearly sufficient - except for that they can not jump.
Any suggestions?
[Prev in Thread] | Current Thread | [Next in Thread] |