* SLIM: Version 1.13.6 released.
[elisp/flim.git] / luna.el
diff --git a/luna.el b/luna.el
index a35432b..e66d265 100644 (file)
--- a/luna.el
+++ b/luna.el
 
 (eval-when-compile (require 'static))
 
-(static-unless (or (>= emacs-major-version 20)(featurep 'xemacs))
-  (defconst :before ':before)
-  (defconst :after ':after)
-  (defconst :around ':around))
+(static-condition-case nil
+    :symbol-for-testing-whether-colon-keyword-is-available-or-not
+  (void-variable
+   (defconst :before ':before)
+   (defconst :after ':after)
+   (defconst :around ':around)))
 
 (defmacro luna-find-class (name)
   "Return the luna-class of the given NAME."
@@ -59,11 +61,13 @@ If SLOTS is specified, TYPE will be defined to have them."
                               ',slots))
 
 (defun luna-define-class-function (type &optional parents slots)
-  (static-unless (or (>= emacs-major-version 20)(featurep 'xemacs))
-    (let (key)
-      (dolist (slot slots)
-       (setq key (intern (format ":%s" slot)))
-       (set key key))))
+  (static-condition-case nil
+      :symbol-for-testing-whether-colon-keyword-is-available-or-not
+    (void-variable
+     (let (key)
+       (dolist (slot slots)
+        (setq key (intern (format ":%s" slot)))
+        (set key key)))))
   (let ((oa (make-vector 31 0))
        (rest parents)
        parent name