feat: Progress towards comfortable Lisp editing
This commit is contained in:
@@ -66,4 +66,12 @@
|
||||
(put ',hook-name 'permanent-local-hook t)
|
||||
(add-hook ,hook-or-function* #',hook-name))))))
|
||||
|
||||
(defun syd-plist-put (plist prop new-val)
|
||||
"Immutably update a single property of PLIST. Like `plist-put', but PLIST is
|
||||
not mutated; a new plist is returned."
|
||||
(cl-loop for (prop* old-val) on plist by #'cddr
|
||||
appending (if (eq prop prop*)
|
||||
(list prop* new-val)
|
||||
(list prop* old-val))))
|
||||
|
||||
(provide 'syd-prelude)
|
||||
|
||||
Reference in New Issue
Block a user