From 83eb3409c1be37c17c52821e29e41e7f953d0fb4 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Thu, 10 Jun 1999 10:17:18 +0000 Subject: [PATCH] (luna-define-class-function): Bind member variables statically for old Emacsen. (TopLevel): Require `static'; bind `:before', `:after' and `:around' statically for old Emacsen. [cf. ] --- luna.el | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/luna.el b/luna.el index 65c647a..a35432b 100644 --- a/luna.el +++ b/luna.el @@ -27,6 +27,13 @@ (eval-when-compile (require 'cl)) +(eval-when-compile (require 'static)) + +(static-unless (or (>= emacs-major-version 20)(featurep 'xemacs)) + (defconst :before ':before) + (defconst :after ':after) + (defconst :around ':around)) + (defmacro luna-find-class (name) "Return the luna-class of the given NAME." `(get ,name 'luna-class)) @@ -52,6 +59,11 @@ 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)))) (let ((oa (make-vector 31 0)) (rest parents) parent name -- 1.7.10.4