From: yamaoka Date: Fri, 11 Jun 1999 11:15:05 +0000 (+0000) Subject: (luna-define-class-function): Check for the improbable name of variable X-Git-Tag: flim-1_13_0~12 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d95e69095dee7460ad8ef9851e24b27b857e6b1;p=elisp%2Fflim.git (luna-define-class-function): Check for the improbable name of variable beginning with colon whether we should bind the sort of symbol or not. (TopLevel): Likewise. --- diff --git a/luna.el b/luna.el index a35432b..e66d265 100644 --- a/luna.el +++ b/luna.el @@ -29,10 +29,12 @@ (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