Last active
January 18, 2018 18:24
-
-
Save dustinlacewell-wk/30d4e42df70eaa97632d8a2a3406c957 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun print-plist (a) | |
(loop for (key value) on a by 'cddr | |
do (message "key: %s - value: %s" key value))) | |
(defun merge-plist (first second) | |
(loop for (key value) on second by 'cddr | |
do (setq first (plist-put first key value))) | |
first) | |
(setq a (list :foo 1 :bar 2)) | |
(setq b (list :foo 2)) | |
(message "Before:") | |
(print-plist a) | |
(setq a (merge-plist 'a b)) | |
(message "After:") | |
(print-plist a) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment