Skip to content

Commit

Permalink
Fix dap--put-if-absent to allow unsetting keys (#529)
Browse files Browse the repository at this point in the history
* Fix dap--put-if-absent to allow unsetting keys

* Capture evaluation as variable to prevent exponential macro expansion
  • Loading branch information
davidarnold committed Oct 20, 2021
1 parent 01e8f0f commit a18f29e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dap-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ has succeeded."

(defmacro dap--put-if-absent (config key form)
"Update KEY to FORM if KEY does not exist in plist CONFIG."
`(plist-put ,config ,key (or (plist-get ,config ,key) ,form)))
`(let ((c ,config)) (if (plist-member c ,key) c (plist-put c ,key ,form))))

(defun dap--completing-read (prompt collection transform-fn &optional predicate
require-match initial-input
Expand Down

0 comments on commit a18f29e

Please sign in to comment.