diff options
author | Colin Okay <okay@toyful.space> | 2022-03-11 10:33:19 -0600 |
---|---|---|
committer | Colin Okay <okay@toyful.space> | 2022-03-11 10:33:19 -0600 |
commit | 6d706967f1de63de80c83766053e896ab4792420 (patch) | |
tree | 99e1ef623cced4d22e1d6947c3779f35e82158f2 /lib/state.lisp | |
parent | 8f9b59690660f85aeae675989fe9fe6b1b830445 (diff) |
refactoring client functions
Diffstat (limited to 'lib/state.lisp')
-rw-r--r-- | lib/state.lisp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/state.lisp b/lib/state.lisp index 5bab3ed..0c01d4d 100644 --- a/lib/state.lisp +++ b/lib/state.lisp @@ -92,13 +92,14 @@ CACHED-ONELINERS-FILE. NIL if there is no such file." sets the api's *host* variable. If BODY produces no errors, the " `(let* ((*config* (read-config-file)) (*cache* (read-cache-file)) - (api::*host* (config-host *config*))) - (assert *host* () "ol must be configured with a server host.") + (api:*host* (config-host *config*))) + (assert api:*host* () "ol must be configured with a server host.") + (set-term-width) (handler-case (progn ,@body ;; only if there is no error do we save the local state. (write-cache-to-disk) - (write-config-to-disk))) - (error (e) - (format *error-output* "~a~%" e)))) + (write-config-to-disk)) + (error (e) + (format *error-output* "~a~%" e))))) |