[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compatibility patches for EDE / EIEIO

From: Eric Ludlam
Subject: Re: Compatibility patches for EDE / EIEIO
Date: Mon, 18 Jan 2021 11:52:32 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

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.


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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]