unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eric Ludlam <ericludlam@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>,
	Eric Ludlam <eric@siege-engine.com>
Cc: emacs-devel@gnu.org
Subject: Re: Compatibility patches for EDE / EIEIO
Date: Sun, 17 Jan 2021 14:57:37 -0500	[thread overview]
Message-ID: <55bf727a-761c-ff52-7688-8946a3df1d86@gmail.com> (raw)
In-Reply-To: <jwv5z435fwe.fsf-monnier+emacs@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 801 bytes --]

On 1/11/21 4:21 PM, Stefan Monnier wrote:
>> Attached are two proposed patches related to compatibility for EIEIO
>>   and EDE.
> Thanks, pushed both to `master`,
Attached is one more small patch I had missed in my previous set. This 
change is independent of the other two.  This is also needed to load 
Project.ede files that happen to include custom rules, where those rules 
are also objects.  The Project loader's error checking in eieio-base.el 
requires the :type to be precise when the value can be a list of objects.

I used the same basic mechanism used in ede/base.el for ede-project's 
'targets' slot.

If you want to verify the changes, this project uses the feature:

https://sourceforge.net/p/matlab-emacs/src/ci/master/tree/

Use global-ede-mode and visit this project.

Thanks
Eric

[-- Attachment #2: 0003-lisp-cedet-ede-proj.el.patch --]
[-- Type: text/x-patch, Size: 1247 bytes --]

From d07f0c4711fa8f82c4415a2a69d0338006088205 Mon Sep 17 00:00:00 2001
From: Eric Ludlam <zappo@gnu.org>
Date: Sun, 17 Jan 2021 14:41:51 -0500
Subject: [PATCH 3/3] lisp/cedet/ede/proj.el:

(ede-makefile-rule-list): New type.
(ede-proj-target-makefile): Set :type of :rules slot to
ede-makefile-rule-list.  This enables Project files to
load.
Author: Eric Ludlam <zappo@gnu.org>
---
 lisp/cedet/ede/proj.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lisp/cedet/ede/proj.el b/lisp/cedet/ede/proj.el
index 59628ebf4c..78b852378c 100644
--- a/lisp/cedet/ede/proj.el
+++ b/lisp/cedet/ede/proj.el
@@ -150,6 +150,9 @@ ede-proj-target
    )
   "Abstract class for ede-proj targets.")
 
+(unless (fboundp 'ede-makefile-rule-p)
+  (cl-deftype ede-makefile-rule-list () '(list-of ede-makefile-rule)))
+
 (defclass ede-proj-target-makefile (ede-proj-target)
   ((makefile :initarg :makefile
 	     :initform "Makefile"
@@ -184,7 +187,7 @@ ede-proj-target-makefile
 commands where the variable would usually appear.")
    (rules :initarg :rules
 	  :initform nil
-	  :type list
+	  :type ede-makefile-rule-list
 	  :custom (repeat (object :objecttype ede-makefile-rule))
 	  :label "Additional Rules"
 	  :group (make)
-- 
2.25.1


  reply	other threads:[~2021-01-17 19:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-10 16:52 Compatibility patches for EDE / EIEIO Eric Ludlam
2021-01-11 21:21 ` Stefan Monnier
2021-01-17 19:57   ` Eric Ludlam [this message]
2021-01-17 22:16     ` Stefan Monnier
2021-01-18 16:52       ` Eric Ludlam
2021-01-18 17:52         ` 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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=55bf727a-761c-ff52-7688-8946a3df1d86@gmail.com \
    --to=ericludlam@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=eric@siege-engine.com \
    --cc=monnier@iro.umontreal.ca \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).