From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Wilfred Hughes Newsgroups: gmane.emacs.help Subject: EIEIO defmethod broken if symbol already bound? Date: Sat, 18 May 2013 16:10:36 +0100 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1368893552 17662 80.91.229.3 (18 May 2013 16:12:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 18 May 2013 16:12:32 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat May 18 18:12:30 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UdjkE-0007Ut-Ff for geh-help-gnu-emacs@m.gmane.org; Sat, 18 May 2013 18:12:30 +0200 Original-Received: from localhost ([::1]:39750 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UdjkE-0005QH-05 for geh-help-gnu-emacs@m.gmane.org; Sat, 18 May 2013 12:12:30 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:40020) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Udimn-00031r-1i for help-gnu-emacs@gnu.org; Sat, 18 May 2013 11:11:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Udimf-0007Cm-Qk for help-gnu-emacs@gnu.org; Sat, 18 May 2013 11:11:04 -0400 Original-Received: from mail-ve0-x22a.google.com ([2607:f8b0:400c:c01::22a]:56741) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Udimf-0007CU-I7 for help-gnu-emacs@gnu.org; Sat, 18 May 2013 11:10:57 -0400 Original-Received: by mail-ve0-f170.google.com with SMTP id 15so2930889vea.15 for ; Sat, 18 May 2013 08:10:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-originating-ip:from:date:message-id :subject:to:content-type:x-gm-message-state; bh=gWQkIEZhuUfNneaoZgn1Msug0FNqbaM1PP1Ho8aBJNE=; b=WgekuxUVAQjwZ8nf0/QQ2IwjN8uQrFUFEF1RWEBLXg8B52hk/oPTIKCQ6efztvjW/4 UCmQr+F1AnWC2/CBwCeGIUzIEoUuW+Duu1wWZ80vnYTz3jLcB4FRLH4b9ixLUFtiqwVE LQRZ+FH2wWMkgF7iUBf1AD96afGCTG8lI/a04BupJvUnGurCHRUH8EOyHfZ2+t8j8s7u QBRLDY7odHc5ya2JMzc8Y6gWyq+vWo7D5fy2HoxgEkVvGOGG+nsPbzn0+A9xpLUuUGyx Ane+3p45I3GG+vvh57DDhAzNNAsmfq10tg9KA8erN7/43KA1AuC1EUgrhxqZR3H1GiJU N4tg== X-Received: by 10.58.22.36 with SMTP id a4mr31780989vef.28.1368889856555; Sat, 18 May 2013 08:10:56 -0700 (PDT) Original-Received: by 10.58.171.195 with HTTP; Sat, 18 May 2013 08:10:36 -0700 (PDT) X-Originating-IP: [91.125.134.104] X-Gm-Message-State: ALoCoQltv0QM6vmTwZD3nAyiHZE+uqeQzSgN0VGQqQECpAurqyXoPQeBRXdPvPa2KaxY59NrNs+T X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400c:c01::22a X-Mailman-Approved-At: Sat, 18 May 2013 12:11:36 -0400 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:90901 Archived-At: Hi folks I think this might be an Emacs bug, but I'm not familiar enough with EIEIO to be certain. Suppose I want to assign a method foo to a class some-class: (require 'eieio) (defclass some-class () ((bar :initform 42))) (defmethod foo ((s some-class)) 1) This works fine. However, if the function definition of foo is already bound to t, it doesn't work: (require 'eieio) (defclass some-class () ((bar :initform 42))) (defalias 'foo 't) (defmethod foo ((s some-class)) 1) ;; Debugger entered--Lisp error: (void-function foo) I'm forced to set foo to a function (e.g. (defalias 'foo 'method)) before I can use (defmethod foo ...). In fact, calling M-x describe-function foo says 'file a bug report'. Now, I know that (defalias 'foo 't) is silly thing to do. However, I accidentally ended up in this state when hacking on some code. Is this a legitimate bug? Emacs 24.2.1. Thanks :)