From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Edward O'Connor Newsgroups: gmane.emacs.devel Subject: patch: bugfix in lisp/xml.el Date: Thu, 27 Oct 2005 19:23:45 -0700 Organization: Church of Emacs Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1130466363 20614 80.91.229.2 (28 Oct 2005 02:26:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 28 Oct 2005 02:26:03 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 28 04:26:00 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EVJvA-0004Ej-Af for ged-emacs-devel@m.gmane.org; Fri, 28 Oct 2005 04:24:44 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EVJv9-0001m2-L8 for ged-emacs-devel@m.gmane.org; Thu, 27 Oct 2005 22:24:43 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EVJuy-0001lk-6T for emacs-devel@gnu.org; Thu, 27 Oct 2005 22:24:32 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EVJuw-0001lW-Lk for emacs-devel@gnu.org; Thu, 27 Oct 2005 22:24:31 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EVJuw-0001lT-Fi for emacs-devel@gnu.org; Thu, 27 Oct 2005 22:24:30 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1EVJuw-0002q3-9P for emacs-devel@gnu.org; Thu, 27 Oct 2005 22:24:30 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1EVJur-00047w-F5 for emacs-devel@gnu.org; Fri, 28 Oct 2005 04:24:25 +0200 Original-Received: from ip68-101-164-233.sd.sd.cox.net ([68.101.164.233]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 28 Oct 2005 04:24:25 +0200 Original-Received: from hober0 by ip68-101-164-233.sd.sd.cox.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 28 Oct 2005 04:24:25 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 62 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: ip68-101-164-233.sd.sd.cox.net Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAHlBMVEX47PoBAAegiLwiH1N IQYI0M4iMeKYBAAYGBBGqm9JF4g0mAAACYElEQVR4nGWTsY/aMBTGLXoLo8WQjNVrFJXxzviUbig JEcy5SNft5LhRGT3RNecUuRuiCMn/bZ+dhHDqJ2SZ7+f3nt/DEMOcqv9E9AdQTsD7fPw6hRIz+iw xxuhbMBn3SUtRofk95CTa9D49UIWiRvt4TnTiNmUbHIIDykUxdwm8lTvQUmergwoCpXR/qwojXqk 7jTEK1xANXhKOgD8eRmHggrt2CNKKtfcAU3EHkCbB5OJn4Ws40Prco6jhAyiDoSyeTrAb1gNe+dI eKNVlpvXNE5+pT6HUIjEi24a8B6XvjSrd0rCon5vCDwX7eA2wvV9bqrPWdCAFZBtfA0tQRWmRsE6 uZCMA6qYHbRDg6I5RlxVSFNCISG56QB3oIBNSRKL+JuLMg9LZlGqIUhCFlH9m8FN74GxFQwEFxKm crWYQJQ680v43TSEGEDArAWLJPVAObN8BHDghhrwcI1RYH2GSLMfiKnzWd6DGx4DvwNc41mIC0QQ WqzgXH0HV+kvVoohvIB5AaHRSyCZHyzawtOd4SBUyXR9lxOb2RB7Sz4T0AB8zY/smvWzRIrN0OQL GcsbW8zf7dY1gfsIlZm66JUsdOK3ljjjNCbnoHuxq9jQnb+TkAa6XY0XyJmf7C1uRwfbk4b0m1tr 8+zljb+ROD0+xA9f4umHP9+CTAAesjfGPWNyBvzCAc5ax/I40CFJPvkQrC/vRP+NsiC58LpGKfWH 7Ppy/JMY8ObK0AJfTRUDTz5eQxHS2VxPlG1697N0ee4qSbjeQ64bjc94Nhex1b+2N5Hn1MoJJwlp pf1Rr7/8DXitGHanPc2gAAAAASUVORK5CYII= X-Attribution: Ted User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (darwin) Cancel-Lock: sha1:7KMKNACCYz/JjKwv39pbUIxH1vQ= X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:45002 Archived-At: --=-=-= Hi, Attached is a trivial (one-line) patch to lisp/xml.el, which fixes a bug in its handling of text nodes broken by a comment. Here's a demonstration of the bug: (require 'xml) (defun ted-parse-xml-from-string (string) (with-temp-buffer (insert string) (xml-parse-region (point-min) (point-max)))) (ted-parse-xml-from-string "yo yo") ;; returns ((n nil "yo yo")) (ted-parse-xml-from-string "yo yo") ;; returns ((n nil 111 121 32 32 111 121)) ;; expected ((n nil "yo yo")) The bug is in a call to `append'. After applying this patch, we get the value we expect: (ted-parse-xml-from-string "yo yo") ;; returns ((n nil "yo yo")) Ted -- Edward O'Connor hober0@gmail.com Ense petit placidam sub libertate quietem. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=xml.el.patch Content-Description: bugfix in xml.el Index: xml.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/xml.el,v retrieving revision 1.49 diff -u -r1.49 xml.el --- xml.el 9 Aug 2005 02:52:15 -0000 1.49 +++ xml.el 28 Oct 2005 02:18:23 -0000 @@ -473,7 +473,7 @@ (if (stringp expansion) (if (stringp (car children)) ;; The two strings were separated by a comment. - (setq children (append (concat (car children) expansion) + (setq children (append (list (concat (car children) expansion)) (cdr children))) (setq children (append (list expansion) children))) (setq children (append expansion children)))))))) --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --=-=-=--