From 6d706967f1de63de80c83766053e896ab4792420 Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Fri, 11 Mar 2022 10:33:19 -0600 Subject: refactoring client functions --- lib/state.lisp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'lib/state.lisp') 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))))) -- cgit v1.2.3