(process-put, process-get): New functions.
authorKim F. Storm <storm@cua.dk>
Tue, 14 Jan 2003 09:56:10 +0000 (09:56 +0000)
committerKim F. Storm <storm@cua.dk>
Tue, 14 Jan 2003 09:56:10 +0000 (09:56 +0000)
lisp/subr.el

index c0e0ea6..b2842b2 100644 (file)
@@ -1048,6 +1048,19 @@ or `set-process-query-on-exit-flag' instead."
     (set-process-query-on-exit-flag process nil)
     old))
 
+;; process plist management
+
+(defun process-get (process propname)
+  "Return the value of PROCESS' PROPNAME property.
+This is the last value stored with `(process-put PROCESS PROPNAME VALUE)'."
+  (plist-get (process-plist process) propname))
+
+(defun process-put (process propname value)
+  "Change PROCESS' PROPNAME property to VALUE.
+It can be retrieved with `(process-get PROCESS PROPNAME)'."
+  (set-process-plist process 
+                    (plist-put (process-plist process) propname value)))
+
 \f
 ;;;; Input and display facilities.