all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: 23947@debbugs.gnu.org
Subject: bug#23947: Regression in EIEIO
Date: Mon, 11 Jul 2016 13:27:50 -0400	[thread overview]
Message-ID: <jwvshvgxey1.fsf@iro.umontreal.ca> (raw)

Package: Emacs
Version: 25.0.95


I finally tracked down why GNU ELPA's "rudel" package wasn't working
with Emacs-25, and it turns out to be a combination of two bugs
in the new EIEIO code.

Rudel seems to be the heaviest user of EIEIO so far (e.g. the only user
of the :c3 method invocation order, since the eieio-core code had
a plain bug which made it signal an error whenever that was used).

The patch below lets Rudel setup a shared buffer, so at least the core
functionality now works.  To my eyes, this is a very safe patch which
just fixes an incompatibility and an error I introduced in the new EIEIO
code when moving to cl-generic, so I think it should go to emacs-25.

Any objection?


        Stefan


2016-07-11  Stefan Monnier  <monnier@iro.umontreal.ca>

	* lisp/emacs-lisp/eieio-compat.el (eieio--defmethod): Better obey
	EIEIO's `no-applicable-method' calling convention.
	* lisp/emacs-lisp/eieio-core.el (eieio--class-precedence-c3): `class'
	is not a symbol but a class object.


diff --git a/lisp/emacs-lisp/eieio-compat.el b/lisp/emacs-lisp/eieio-compat.el
index 6d4798b..6aba8a3 100644
--- a/lisp/emacs-lisp/eieio-compat.el
+++ b/lisp/emacs-lisp/eieio-compat.el
@@ -188,7 +188,8 @@ eieio--defmethod
             (`no-applicable-method
              (setq method 'cl-no-applicable-method)
              (setq specializers `(generic ,@specializers))
-             (lambda (generic arg &rest args) (apply code arg generic args)))
+             (lambda (generic arg &rest args)
+               (apply code arg (cl--generic-name generic) (cons arg args))))
             (_ code))))
     (cl-generic-define-method
      method (unless (memq kind '(nil :primary)) (list kind))
diff --git a/lisp/emacs-lisp/eieio-core.el b/lisp/emacs-lisp/eieio-core.el
index 631e4a4..223c2a6 100644
--- a/lisp/emacs-lisp/eieio-core.el
+++ b/lisp/emacs-lisp/eieio-core.el
@@ -976,7 +976,7 @@ eieio--class/struct-parents
 
 (defun eieio--class-precedence-c3 (class)
   "Return all parents of CLASS in c3 order."
-  (let ((parents (eieio--class-parents (cl--find-class class))))
+  (let ((parents (eieio--class-parents class)))
     (eieio--c3-merge-lists
      (list class)
      (append
@@ -1101,7 +1101,7 @@ eieio--generic-subclass-specializers
   (list eieio--generic-subclass-generalizer))
 
 \f
-;;;### (autoloads nil "eieio-compat" "eieio-compat.el" "6aca3c1b5f751a01331761da45fc4f5c")
+;;;### (autoloads nil "eieio-compat" "eieio-compat.el" "dba4205b1a0d7133f1311d975b4d0ebe")
 ;;; Generated autoloads from eieio-compat.el
 
 (autoload 'eieio--defalias "eieio-compat" "\





             reply	other threads:[~2016-07-11 17:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-11 17:27 Stefan Monnier [this message]
2016-07-11 17:42 ` bug#23947: Regression in EIEIO Clément Pit--Claudel
2016-07-12 13:06   ` Stefan Monnier
2016-07-12 21:13     ` Clément Pit--Claudel
2016-07-14 19:09     ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvshvgxey1.fsf@iro.umontreal.ca \
    --to=monnier@iro.umontreal.ca \
    --cc=23947@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.