mirror of https://codeberg.org/cage/tinmop/
- used 'alexandria:when-let' macro to semplify the code.
This commit is contained in:
parent
1e9fecc599
commit
8d3ed466ee
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue