From 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 7 Apr 2024 13:41:34 -0500 Subject: new repository --- devdocs/elisp/plist-access.html | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 devdocs/elisp/plist-access.html (limited to 'devdocs/elisp/plist-access.html') diff --git a/devdocs/elisp/plist-access.html b/devdocs/elisp/plist-access.html new file mode 100644 index 00000000..72b885d8 --- /dev/null +++ b/devdocs/elisp/plist-access.html @@ -0,0 +1,34 @@ +

Property Lists Outside Symbols

The following functions can be used to manipulate property lists. They all compare property names using eq.

Function: plist-get plist property +
+

This returns the value of the property property stored in the property list plist. It accepts a malformed plist argument. If property is not found in the plist, it returns nil. For example,

(plist-get '(foo 4) 'foo)
+     ⇒ 4
+(plist-get '(foo 4 bad) 'foo)
+     ⇒ 4
+(plist-get '(foo 4 bad) 'bad)
+     ⇒ nil
+(plist-get '(foo 4 bad) 'bar)
+     ⇒ nil
+
+
+
Function: plist-put plist property value +
+

This stores value as the value of the property property in the property list plist. It may modify plist destructively, or it may construct a new list structure without altering the old. The function returns the modified property list, so you can store that back in the place where you got plist. For example,

(setq my-plist (list 'bar t 'foo 4))
+     ⇒ (bar t foo 4)
+(setq my-plist (plist-put my-plist 'foo 69))
+     ⇒ (bar t foo 69)
+(setq my-plist (plist-put my-plist 'quux '(a)))
+     ⇒ (bar t foo 69 quux (a))
+
+
+
Function: lax-plist-get plist property +

Like plist-get except that it compares properties using equal instead of eq.

+
Function: lax-plist-put plist property value +

Like plist-put except that it compares properties using equal instead of eq.

+
Function: plist-member plist property +

This returns non-nil if plist contains the given property. Unlike plist-get, this allows you to distinguish between a missing property and a property with the value nil. The value is actually the tail of plist whose car is property.

+
+

+ Copyright © 1990-1996, 1998-2022 Free Software Foundation, Inc.
Licensed under the GNU GPL license.
+ https://www.gnu.org/software/emacs/manual/html_node/elisp/Plist-Access.html +

+
-- cgit v1.2.3