diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2004-03-02 21:45:06 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2004-03-02 21:45:06 +0000 |
commit | 2e9bdf15e6c7ffbd950a727a92ef7c7e792040e1 (patch) | |
tree | 3d3e7a8d2891f3a9b57ddb4d9bf9196e5627c688 /lisp/xml.el | |
parent | 34ed747a82a03e88929d38db45409e416e7240df (diff) | |
download | emacs-2e9bdf15e6c7ffbd950a727a92ef7c7e792040e1.tar.gz |
(xml-get-attribute-or-nil): Simplify.
Diffstat (limited to 'lisp/xml.el')
-rw-r--r-- | lisp/xml.el | 7 |
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 @@ ;;; xml.el --- XML parser -;; Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. +;; Copyright (C) 2000, 01, 03, 2004 Free Software Foundation, Inc. ;; Author: Emmanuel Briot <briot@gnat.com> ;; Maintainer: Mark A. Hershberger <mah@everybody.org> @@ -109,10 +109,7 @@ CHILD-NAME should be a lower case symbol." Return `nil' if the attribute was not found. See also `xml-get-attribute'." - (when (xml-node-attributes node) - (let ((value (assoc attribute (xml-node-attributes node)))) - (when value - (cdr value))))) + (cdr (assoc attribute (xml-node-attributes node)))) (defsubst xml-get-attribute (node attribute) "Get from NODE the value of ATTRIBUTE. |