forked from McCLIM/McCLIM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpatch.lisp
25 lines (20 loc) · 833 Bytes
/
patch.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
(in-package :cl-user)
(defpackage clim-lisp-patch
(:use)
(:export #:defconstant
#:defclass
#:describe
#:describe-object
#:interactive-stream-p))
(defmacro clim-lisp-patch:defconstant (symbol value &optional docu)
(if (typep value '(or number character))
`(cl:defconstant ,symbol ,value ,@(and docu (list docu)))
`(defvar ,symbol ,value ,@(and docu (list docu)))))
(defvar clim-lisp-patch::*compile-time-clos-names* (make-hash-table))
(defun clim-lisp-patch::compile-time-clos-class-p (name)
(gethash name clim-lisp-patch::*compile-time-clos-names* nil))
(defmacro clim-lisp-patch:defclass (name &rest args)
`(progn
(eval-when (:compile-toplevel)
(setf (gethash ',name clim-lisp-patch::*compile-time-clos-names*) t))
(cl:defclass ,name ,@args)))