aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark A. Hershberger2004-10-06 00:58:29 +0000
committerMark A. Hershberger2004-10-06 00:58:29 +0000
commita3110b5ddc17825486b5584c299d9c9ab3ca20e8 (patch)
tree3083581af44f0ddbbba294141b597e2c463ba7aa
parentfcb21188ecffe836c73449a38b45fbd3e7d0f9a4 (diff)
downloademacs-a3110b5ddc17825486b5584c299d9c9ab3ca20e8.tar.gz
emacs-a3110b5ddc17825486b5584c299d9c9ab3ca20e8.zip
fix to for xml-substitute-special to produce a single string instead
of several if a substitution is made.
-rw-r--r--lisp/xml.el20
1 files changed, 12 insertions, 8 deletions
diff --git a/lisp/xml.el b/lisp/xml.el
index 993ef59b276..dd6d5095bc2 100644
--- a/lisp/xml.el
+++ b/lisp/xml.el
@@ -727,13 +727,13 @@ This follows the rule [28] in the XML specifications."
727 (match-string 1 this-part))))))) 727 (match-string 1 this-part)))))))
728 728
729 (cond ((null children) 729 (cond ((null children)
730 (if (stringp expansion) 730 (if (and (eq (length expansion) 1)
731 (stringp (cadr expansion)))
731 (setq children (concat prev-part expansion)) 732 (setq children (concat prev-part expansion))
732 (if (stringp (car (last expansion))) 733 (if (stringp (car expansion))
733 (progn 734 (setq children
734 (setq children 735 (list (concat prev-part (car expansion))
735 (list (concat prev-part (car expansion)) 736 (append (cdr expansion))))
736 (cdr expansion))))
737 (setq children (append expansion prev-part))))) 737 (setq children (append expansion prev-part)))))
738 ((stringp children) 738 ((stringp children)
739 (if (stringp expansion) 739 (if (stringp expansion)
@@ -756,11 +756,15 @@ This follows the rule [28] in the XML specifications."
756 (cond ((stringp children) 756 (cond ((stringp children)
757 (concat children (substring string point))) 757 (concat children (substring string point)))
758 ((stringp (car (last children))) 758 ((stringp (car (last children)))
759 (concat (car children) (substring string point))) 759 (concat (car (last children)) (substring string point)))
760 ((null children) 760 ((null children)
761 string) 761 string)
762 (t 762 (t
763 (nreverse children))))) 763 (concat (mapconcat 'identity
764 (nreverse children)
765 "")
766 (substring string point))))))
767
764;;******************************************************************* 768;;*******************************************************************
765;;** 769;;**
766;;** Printing a tree. 770;;** Printing a tree.