Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
lem-core:config-plist errors out when ~/.lem/config.lisp is empty
  • Loading branch information
kamysheblid committed Aug 11, 2023
commit 14c6c96ed9b9c40d44835097693cf25cd8d7c3d5
6 changes: 4 additions & 2 deletions src/config.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@
(defun config-plist ()
(let ((pathname (ensure-config-pathname)))
(if (uiop:file-exists-p pathname)
(uiop:read-file-form pathname)
(uiop:read-file-forms pathname)
'())))

(defun config (key &optional default)
(let ((plist (config-plist)))
(getf plist key default)))
(if (car plist)
(getf (car plist) key default))))


(defun (setf config) (value key &optional default)
(declare (ignore default))
Expand Down