Subject: bug#9313: closed (Re: bug#9313: 24.0.50; Emacs 24 cannot load byte-compiled code from Emacs 23.3 when using EIEIO's defmethod)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 23 Aug 2011 18:57:02 +0000

Your bug report

#9313: 24.0.50; Emacs 24 cannot load byte-compiled code from Emacs 23.3 when using EIEIO's defmethod

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
9313: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9313
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#9313: 24.0.50; Emacs 24 cannot load byte-compiled code from Emacs 23.3 when using EIEIO's defmethod
From: Stefan Monnier <[email-masked]>
To: David Engster <[email-masked]>
Cc: [email-masked]
Date: Tue, 23 Aug 2011 14:54:14 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

>>> This is a very late followup to an older message from emacs-devel,
>>> regarding the issue that Emacs24 after the lexbind merge cannot run
>>> byte-compiled code from Emacs23.3 if that is using EIEIO's 'defmethod':
>> Does the patch below fix the problem for you?
> Yes.

Thanks, installed,

        Stefan

Subject: 24.0.50; Emacs 24 cannot load byte-compiled code from Emacs 23.3 when using EIEIO's defmethod
From: David Engster <[email-masked]>
To: [email-masked]
Date: Wed, 17 Aug 2011 17:52:03 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

This is a very late followup to an older message from emacs-devel,
regarding the issue that Emacs24 after the lexbind merge cannot run
byte-compiled code from Emacs23.3 if that is using EIEIO's 'defmethod':

http://thread.gmane.org/gmane.emacs.devel/138030/focus=78338

In that message Stefan Monnier says that this is considered a bug, so
I'm writing this report. Also, this issue is popping up more frequently
now as people are migrating to Emacs24-bzr, but still have compiled Gnus
or CEDET sources with Emacs23, so I think this should be fixed before a
release.

Here's a recipe:

* Create a file ~/eieio-test/eieio-test.el with the following contents:

 (require 'eieio)

 (defclass someclass ()
   ((astring :initarg :astring
             :initform ""))
   "Some test class.")

 (defmethod somemethod ((arg someclass))
   "Some method."
   (message "Somemethod called."))

 (provide 'eieio-test)

* Byte-compile the file using Emacs 23.3:

  emacs23 --batch -f batch-byte-compile eieio-test.el

* Load Emacs24-bzr with

  emacs24 -Q -L ~/eieio-test

  and evaluate

  (require 'eieio-test)

* The following backtrace will appear:

Debugger entered--Lisp error: (void-function eieio-defmethod)
  (eieio-defmethod (quote somemethod) (quote (((arg someclass)) #[(arg) "\300\301!\207" [message "Somemethod called."] 2 "Some method."])))
  require(eieio-test)
  eval((require (quote eieio-test)) nil)

* Note that the following setups work:

  - Byte compile with Emacs23, require with Emacs23
  - Byte compile with Emacs24, require with Emacs24
  - Require uncompiled el-file.

* This issue is occuring since the lexbind merge.

Cheers,
David