1 ;;; geiser-custom.el -- customization utilities
3 ;; Copyright (C) 2009, 2010, 2012 Jose Antonio Ortega Ruiz
5 ;; This program is free software; you can redistribute it and/or
6 ;; modify it under the terms of the Modified BSD License. You should
7 ;; have received a copy of the license along with this program. If
8 ;; not, see <http://www.xfree86.org/3.3.6/COPYRIGHT2.html#5>.
10 ;; Start date: Sat Feb 14, 2009 21:49
15 (require 'geiser-base
)
18 ;;; Customization group:
21 "Geiser framework for Scheme-Emacs interaction."
27 (defgroup geiser-faces nil
28 "Faces used by Geiser."
32 (defmacro geiser-custom--defface
(face def group doc
)
33 (let ((face (intern (format "geiser-font-lock-%s" face
))))
34 `(defface ,face
(face-default-spec ,def
)
35 ,(format "Face for %s." doc
)
40 (put 'geiser-custom--defface
'lisp-indent-function
1)
46 (defvar geiser-custom--memoized-vars nil
)
48 (defun geiser-custom--memoize (name)
49 (add-to-list 'geiser-custom--memoized-vars name
))
51 (defmacro geiser-custom--defcustom
(name &rest body
)
53 (geiser-custom--memoize ',name
)
54 (defcustom ,name
,@body
)))
56 (defun geiser-custom--memoized-state ()
58 (dolist (name geiser-custom--memoized-vars result
)
60 (push (cons name
(symbol-value name
)) result
)))))
63 (put 'geiser-custom--defcustom
'lisp-indent-function
2)
66 (provide 'geiser-custom
)