diff options
author | Mark A. Hershberger <mah@everybody.org> | 2004-10-06 00:58:29 +0000 |
---|---|---|
committer | Mark A. Hershberger <mah@everybody.org> | 2004-10-06 00:58:29 +0000 |
commit | a3110b5ddc17825486b5584c299d9c9ab3ca20e8 (patch) | |
tree | 3083581af44f0ddbbba294141b597e2c463ba7aa /lisp/xml.el | |
parent | fcb21188ecffe836c73449a38b45fbd3e7d0f9a4 (diff) | |
download | emacs-a3110b5ddc17825486b5584c299d9c9ab3ca20e8.tar.gz |
fix to for xml-substitute-special to produce a single string instead
of several if a substitution is made.
Diffstat (limited to 'lisp/xml.el')
-rw-r--r-- | lisp/xml.el | 20 |
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." (match-string 1 this-part))))))) (cond ((null children) - (if (stringp expansion) + (if (and (eq (length expansion) 1) + (stringp (cadr expansion))) (setq children (concat prev-part expansion)) - (if (stringp (car (last expansion))) - (progn - (setq children - (list (concat prev-part (car expansion)) - (cdr expansion)))) + (if (stringp (car expansion)) + (setq children + (list (concat prev-part (car expansion)) + (append (cdr expansion)))) (setq children (append expansion prev-part))))) ((stringp children) (if (stringp expansion) @@ -756,11 +756,15 @@ This follows the rule [28] in the XML specifications." (cond ((stringp children) (concat children (substring string point))) ((stringp (car (last children))) - (concat (car children) (substring string point))) + (concat (car (last children)) (substring string point))) ((null children) string) (t - (nreverse children))))) + (concat (mapconcat 'identity + (nreverse children) + "") + (substring string point)))))) + ;;******************************************************************* ;;** ;;** Printing a tree. |