aboutsummaryrefslogtreecommitdiffhomepage
path: root/generic/pg-xml.el
diff options
context:
space:
mode:
authorGravatar David Aspinall <da@inf.ed.ac.uk>2008-01-16 21:43:48 +0000
committerGravatar David Aspinall <da@inf.ed.ac.uk>2008-01-16 21:43:48 +0000
commite3e203869d5e25fab4809d53c3938f067b3a94db (patch)
treeafd60fddf5d0a549876fd4fe0247986c294d213f /generic/pg-xml.el
parent72f240e63eb57755e618613cad4bb7edbe951a26 (diff)
Reduce compiler warnings. Minor fixes.
Diffstat (limited to 'generic/pg-xml.el')
-rw-r--r--generic/pg-xml.el17
1 files changed, 12 insertions, 5 deletions
diff --git a/generic/pg-xml.el b/generic/pg-xml.el
index 141508ff..3f9a0f37 100644
--- a/generic/pg-xml.el
+++ b/generic/pg-xml.el
@@ -9,6 +9,9 @@
;; XML functions for Proof General.
;;
+(eval-when-compile
+ (require 'xml-fixed)) ; for compile only
+
(require 'proof-utils) ;; for pg-internal-warning
(cond
@@ -18,6 +21,10 @@
(t ;; Otherwise use GNU Emacs distrib version.
(require 'xml)))
+(defalias 'pg-xml-error 'error)
+
+
+;;
;; Elisp format of XML trees (see xml.el)
;;
;; xml-list ::= (node node ...)
@@ -44,7 +51,7 @@
(save-excursion
(set-buffer tempbuffer)
(delete-region (point-min) (point-max))
- (insert-string arg)
+ (insert arg)
(pg-xml-parse-buffer (current-buffer) 'nomessage))))
@@ -75,7 +82,7 @@ Parsing according to `xml-parse-file' of xml.el."
(or val
(if optional
defaultval
- (pg-pgip-error "pg-xml-get-attr: Didn't find required %s attribute in %s element"
+ (pg-xml-error "pg-xml-get-attr: Didn't find required %s attribute in %s element"
attribute (xml-node-name node))))))
(defun pg-xml-child-elts (node)
@@ -123,9 +130,9 @@ Parsing according to `xml-parse-file' of xml.el."
(defun pg-xml-string-of (xmls)
"Convert the XML trees in XMLS into a string (without additional indentation)."
- (let ((insertfn (lambda (&rest args)
- (setq strs (cons (reduce 'concat args) strs))))
- strs)
+ (let* (strs
+ (insertfn (lambda (&rest args)
+ (setq strs (cons (reduce 'concat args) strs)))))
(dolist (xml xmls)
(pg-xml-output-internal xml nil insertfn))
(reduce 'concat (reverse strs))))