X-Git-Url: http://git.chise.org/gitweb/?p=elisp%2Fflim.git;a=blobdiff_plain;f=luna.el;h=238fba8e49a66042233a45e703eb7922d2e67dc5;hp=0aee9f79f56f18d4fafa468e8fa1bf944db9e46c;hb=HEAD;hpb=9e314ae633f6f342206553baed4cfac3d4eb17af diff --git a/luna.el b/luna.el index 0aee9f7..238fba8 100644 --- a/luna.el +++ b/luna.el @@ -1,6 +1,6 @@ ;;; 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 ;; Keywords: OOP @@ -19,8 +19,8 @@ ;; 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: @@ -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 ',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))))