1
0
Fork 0

- used 'alexandria:when-let' macro to semplify the code.

This commit is contained in:
cage 2022-04-20 22:07:48 +02:00
parent 1e9fecc599
commit 8d3ed466ee
1 changed files with 2 additions and 3 deletions

View File

@ -114,9 +114,8 @@
(defmacro set-option-variable (options option-name option-variable) (defmacro set-option-variable (options option-name option-variable)
(with-gensyms (option-value) (with-gensyms (option-value)
`(let ((,option-value (getf ,options ,option-name))) `(alexandria:when-let ((,option-value (getf ,options ,option-name)))
(when ,option-value (setf ,option-variable ,option-value))))
(setf ,option-variable ,option-value)))))
(defun manage-opts () (defun manage-opts ()
(handler-bind ((opts:unknown-option #'exit-on-error) (handler-bind ((opts:unknown-option #'exit-on-error)