Mercurial > emacs
changeset 54243:586ffda6e9f9
(xml-get-attribute-or-nil): Simplify.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Tue, 02 Mar 2004 21:45:06 +0000 |
parents | 6625957ce0ae |
children | 9df8cecf70d2 |
files | lisp/xml.el |
diffstat | 1 files changed, 2 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/xml.el Tue Mar 02 21:42:03 2004 +0000 +++ b/lisp/xml.el Tue Mar 02 21:45:06 2004 +0000 @@ -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 @@ 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.