aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2004-03-02 21:45:06 +0000
committerStefan Monnier2004-03-02 21:45:06 +0000
commit2e9bdf15e6c7ffbd950a727a92ef7c7e792040e1 (patch)
tree3d3e7a8d2891f3a9b57ddb4d9bf9196e5627c688
parent34ed747a82a03e88929d38db45409e416e7240df (diff)
downloademacs-2e9bdf15e6c7ffbd950a727a92ef7c7e792040e1.tar.gz
emacs-2e9bdf15e6c7ffbd950a727a92ef7c7e792040e1.zip
(xml-get-attribute-or-nil): Simplify.
-rw-r--r--lisp/xml.el7
1 files changed, 2 insertions, 5 deletions
diff --git a/lisp/xml.el b/lisp/xml.el
index dbd991f5583..61a79b37104 100644
--- a/lisp/xml.el
+++ b/lisp/xml.el
@@ -1,6 +1,6 @@
1;;; xml.el --- XML parser 1;;; xml.el --- XML parser
2 2
3;; Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. 3;; Copyright (C) 2000, 01, 03, 2004 Free Software Foundation, Inc.
4 4
5;; Author: Emmanuel Briot <briot@gnat.com> 5;; Author: Emmanuel Briot <briot@gnat.com>
6;; Maintainer: Mark A. Hershberger <mah@everybody.org> 6;; Maintainer: Mark A. Hershberger <mah@everybody.org>
@@ -109,10 +109,7 @@ CHILD-NAME should be a lower case symbol."
109Return `nil' if the attribute was not found. 109Return `nil' if the attribute was not found.
110 110
111See also `xml-get-attribute'." 111See also `xml-get-attribute'."
112 (when (xml-node-attributes node) 112 (cdr (assoc attribute (xml-node-attributes node))))
113 (let ((value (assoc attribute (xml-node-attributes node))))
114 (when value
115 (cdr value)))))
116 113
117(defsubst xml-get-attribute (node attribute) 114(defsubst xml-get-attribute (node attribute)
118 "Get from NODE the value of ATTRIBUTE. 115 "Get from NODE the value of ATTRIBUTE.