aboutsummaryrefslogtreecommitdiffhomepage
path: root/generic/pg-xml.el
diff options
context:
space:
mode:
authorGravatar David Aspinall <da@inf.ed.ac.uk>2009-09-05 09:51:56 +0000
committerGravatar David Aspinall <da@inf.ed.ac.uk>2009-09-05 09:51:56 +0000
commit559426016c112b6147fe82582c6479521b0fab6a (patch)
tree82fa6c0c5c9e38f327439201f8bb926c5a4642a2 /generic/pg-xml.el
parentd549dfc8c5184890e8c2579ecb9016c00a656c64 (diff)
Missing unused function
Diffstat (limited to 'generic/pg-xml.el')
-rw-r--r--generic/pg-xml.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/generic/pg-xml.el b/generic/pg-xml.el
index 46a98b2f..adf907eb 100644
--- a/generic/pg-xml.el
+++ b/generic/pg-xml.el
@@ -99,7 +99,7 @@ Parsing according to `xml-parse-file' of xml.el."
child (xml-node-name node))
(car children))
children)))
-
+
(defun pg-xml-get-text-content (node)
"Return the concatenation of all the text children of node NODE."
(mapconcat (lambda (x) (if (stringp x) x "")) (xml-node-children node) ""))
@@ -137,14 +137,14 @@ Output with indentation INDENT-STRING (or none if nil)."
(let ((tree xml)
attlist)
(funcall outputfn (or indent-string "") "<" (symbol-name (xml-node-name tree)))
-
+
;; output the attribute list
(setq attlist (xml-node-attributes tree))
(while attlist
(funcall outputfn " ")
(funcall outputfn (symbol-name (caar attlist)) "=\"" (cdar attlist) "\"")
(setq attlist (cdr attlist)))
-
+
(setq tree (xml-node-children tree))
(if tree
@@ -159,7 +159,7 @@ Output with indentation INDENT-STRING (or none if nil)."
((stringp node) (funcall outputfn node))
(t
(error "pg-xml-output-internal: Invalid XML tree"))))
-
+
(funcall outputfn (if indent-string (concat "\n" indent-string) "")
"</" (symbol-name (xml-node-name xml)) ">"))
(funcall outputfn "/>"))))
@@ -173,6 +173,9 @@ Output with indentation INDENT-STRING (or none if nil)."
;; Auxiliary functions for parsing common bits of PGIP
;;
+(defsubst pg-pgip-get-area (node &optional optional defaultval)
+ (pg-xml-get-attr 'area node optional defaultval))
+
(defun pg-pgip-get-icon (node &optional optional defaultval)
"Return the <icon> child of NODE, or nil if none."
(pg-xml-get-child 'icon node))