1 ;;; -*- mode: lisp; syntax: common-lisp; package: existenz-client; coding: utf-8-unix; -*-
3 (in-package #:existenz-common)
8 (cdr (assoc name *options*)))
10 (defun set-option (name new-value)
12 `((,name . ,new-value)
13 ,@(remove name *options* :test #'eq :key #'car)))
16 (defsetf option set-option)
18 (defvar *options-mappings* NIL)
20 (defun load-options ()
22 (for (name . variables) in *options-mappings*)
24 (for value in (option name))
25 (for variable in variables)
26 (set variable value))))
28 ;; TODO: make emacs macros for this
31 (defmacro defcustom (name value documentation &key (type T)))
33 (defcustom window-resolution
35 "Width and height of window. Two-element LIST of INTEGERS. Is mapped
36 to the global variables *WINDOW-WIDTH* and *WINDOW-HEIGHT*."
39 (defcustom window-fullscreen
41 "Whether the application runs in fullscreen or windowed mode. Is mapped
42 to the global variable *WINDOW-FULLSCREEN*."