all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eric Ludlam <ericludlam@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org, Eric Ludlam <eric@siege-engine.com>
Subject: Re: Compatibility patches for EDE / EIEIO
Date: Mon, 18 Jan 2021 11:52:32 -0500	[thread overview]
Message-ID: <40993b3e-ad3f-9514-6fb3-8c0a220305db@gmail.com> (raw)
In-Reply-To: <jwvczy3jjmj.fsf-monnier+emacs@gnu.org>

Thanks for looking at my patch,

The short answer to your questions is that I'm not very familiar with 
how the typing system works with the latest eieio changes.  I'm fine 
with the proposed use of (list-of ...) as it seems much simpler and more 
obvious.

I would expect you would want to make the same change in ede/base.el 
around line 172, which is the code I used as a template to make :rules 
work.   Maybe something like the below patch?

I suspect the fboundp part was transitional when the old auto-generated 
predicates were deprecated. Maybe useful in an external bit of elisp 
that needs to support multiple versions, but not here.  Thanks for 
pointing this out.

Eric

diff --git a/lisp/cedet/ede/base.el b/lisp/cedet/ede/base.el
index 7799746e0c..b26984712a 100644
--- a/lisp/cedet/ede/base.el
+++ b/lisp/cedet/ede/base.el
@@ -160,8 +160,6 @@ ede-project-placeholder
  ;; Projects can also affect how EDE works, by changing what appears in
  ;; the EDE menu, or how some keys are bound.
  ;;
-(unless (fboundp 'ede-target-list-p)
-  (cl-deftype ede-target-list () '(list-of ede-target)))

  (defclass ede-project (ede-project-placeholder)
    ((subproj :initform nil
@@ -169,7 +167,7 @@ ede-project
          :documentation "Sub projects controlled by this project.
  For Automake based projects, each directory is treated as a project.")
     (targets :initarg :targets
-        :type ede-target-list
+        :type (list-of ede-target)
          :custom (repeat (object :objectcreatefcn ede-new-target-custom))
          :label "Local Targets"
          :group (targets)

On 1/17/21 5:16 PM, Stefan Monnier wrote:
> Hi Eric,
>
>> +(unless (fboundp 'ede-makefile-rule-p)
>> +  (cl-deftype ede-makefile-rule-list () '(list-of ede-makefile-rule)))
> I don't understand the (fboundp 'ede-makefile-rule-p) test, maybe it
> deserves a comment?
>
>>   (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
> How 'bout using
>
> 	  :type (list-of ede-makefile-rule)
>
> ?
>
>
>          Stefan
>




  reply	other threads:[~2021-01-18 16:52 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
2021-01-17 22:16     ` Stefan Monnier
2021-01-18 16:52       ` Eric Ludlam [this message]
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

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

  git send-email \
    --in-reply-to=40993b3e-ad3f-9514-6fb3-8c0a220305db@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 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.