mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-23 10:34:07 +00:00
(xml-get-attribute-or-nil): Simplify.
This commit is contained in:
parent
34ed747a82
commit
2e9bdf15e6
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user