;;; luna.el --- tiny OOP system kernel
-;; Copyright (C) 1999,2000 Free Software Foundation, Inc.
+;; Copyright (C) 1999,2000,2002 Free Software Foundation, Inc.
;; Author: MORIOKA Tomohiko <tomo@m17n.org>
;; Keywords: OOP
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
;;; Code:
(defun luna-class-find-member (class member-name)
(or (stringp member-name)
(setq member-name (symbol-name member-name)))
- (or (intern-soft member-name (luna-class-obarray class))
- (let ((parents (luna-class-parents class))
- ret)
- (while (and parents
- (null
- (setq ret (luna-class-find-member
- (luna-find-class (pop parents))
- member-name)))))
- ret)))
+ (intern-soft member-name (luna-class-obarray class)))
;; Return a member (slot or method) of CLASS that has name
(sym (luna-class-find-or-make-member
(luna-find-class ',class) ',name))
(cache (get ',name 'luna-method-cache)))
- (if cache
- (unintern ',class cache))
+ (and cache
+ (fboundp sym)
+ (mapatoms
+ (lambda (s)
+ (if (memq (symbol-function sym) (symbol-value s))
+ (unintern s cache)))
+ cache))
(fset sym func)
(put sym 'luna-method-qualifier ,method-qualifier))))