# HG changeset patch # User Stefan Monnier # Date 1078263906 0 # Node ID 586ffda6e9f90a05d5bccf191f50e572fa030178 # Parent 6625957ce0aee3fbeb7e2bb282cdc234fc6ddafb (xml-get-attribute-or-nil): Simplify. diff -r 6625957ce0ae -r 586ffda6e9f9 lisp/xml.el --- 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 ;; Maintainer: Mark A. Hershberger @@ -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.