Update of /cvsroot/emacs-jabber/emacs-jabber
In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv13381
Modified Files:
jabber-xml.el
Log Message:
Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-532
Creator: Magnus Henoch <ma...@fr...>
Improve jabber-xml-skip-tag-forward for jabberd test
Index: jabber-xml.el
===================================================================
RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-xml.el,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- jabber-xml.el 17 Jun 2008 14:46:05 -0000 1.23
+++ jabber-xml.el 17 Jun 2008 14:48:09 -0000 1.24
@@ -94,10 +94,12 @@
"/>")))
xml))))
-(defun jabber-xml-skip-tag-forward ()
+(defun jabber-xml-skip-tag-forward (&optional dont-recurse-into-stream)
"Skip to end of tag or matching closing tag if present.
Return t iff after a closing tag, otherwise throws an 'unfinished
tag with value nil.
+If DONT-RECURSE-INTO-STREAM is true, stop after an opening
+<stream:stream> tag.
The version of `sgml-skip-tag-forward' in Emacs 21 isn't good
enough for us."
@@ -116,11 +118,12 @@
t)
((looking-at ">")
(forward-char 1)
- (loop
- do (skip-chars-forward "^<")
- until (looking-at (regexp-quote (concat "</" node-name ">")))
- do (jabber-xml-skip-tag-forward))
- (goto-char (match-end 0))
+ (unless (and dont-recurse-into-stream (equal node-name "stream:stream"))
+ (loop
+ do (skip-chars-forward "^<")
+ until (looking-at (regexp-quote (concat "</" node-name ">")))
+ do (jabber-xml-skip-tag-forward))
+ (goto-char (match-end 0)))
t)
(t
(throw 'unfinished nil)))))
|