From: tsuchiya Date: Thu, 26 Sep 2002 01:06:52 +0000 (+0000) Subject: (luna-define-method): Clear method cache of child classes. X-Git-Tag: flim-1_14_5~10 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=37fe006c9585f1f8d36926fc35f3bd7b7df0050e;p=elisp%2Fflim.git (luna-define-method): Clear method cache of child classes. --- diff --git a/ChangeLog b/ChangeLog index 122484d..971abcb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-09-26 TSUCHIYA Masatoshi + + * luna.el (luna-define-method): Clear method cache of child + classes. + 2002-09-24 TSUCHIYA Masatoshi * mime-ja.texi (CVS): Escape @. diff --git a/luna.el b/luna.el index d264c7d..f33b83f 100644 --- a/luna.el +++ b/luna.el @@ -164,8 +164,13 @@ The optional 5th BODY is the body of the method." (sym (luna-class-find-or-make-member (luna-find-class ',class) ',name)) (cache (get ',name 'luna-method-cache))) - (if cache - (unintern (symbol-name ',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))))