[Top][All Lists]

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

Re: Towards a cleaner build: srecode/insert

From: Eric Ludlam
Subject: Re: Towards a cleaner build: srecode/insert
Date: Sun, 16 Jun 2019 10:19:30 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0

On 6/15/19 12:33 PM, Lars Ingebrigtsen wrote:

Is it literally complaining about that first parameter?

(srecode-template-inserted-region :start 1 :end 2)
=> #s(srecode-template-inserted-region #<overlay from 1 to 2 in *unsent wide reply 
to Lars Ingebrigtsen*> nil)

(equal (srecode-template-inserted-region "TEMPLATE" :start 1 :end 2)
        (srecode-template-inserted-region :start 1 :end 2))
=> t

Indeed?  The name arg is just discarded?  In which case, it seems like
this could be fixed by just removing "TEMPLATE" from all these calls,
but that seems too obvious, so I'm asking.

In old EIEIO, the first argument to a constructor was a name. I often used the name to distinguish between different instances. That way when debugging I could identify which object instance was which. Sometimes, such as above, there was no useful distinguishing name and a constant was used.

If I remember rightly, the name isn't part of CLOS, so it was made optional, and now appears to be obsoleted. Since the only value of the name in most cases was for debugging, removing it should have no functional effect.

The one exception is if the class in question inherits from 'eieio-named'. I'm not really sure how that might be made to work without the name input, and I don't have a recent enough Emacs to easily see how it was adapted.

Hope this helps

reply via email to

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