medley icon indicating copy to clipboard operation
medley copied to clipboard

Add to `DEFINE-RECORD` expansion providing of arglist info for generated macros.

Open MattHeffron opened this issue 1 month ago • 3 comments

NOTE: This uses the function IL:CLSMARTEN which is from the file CLSMARTARGS. The file CLSMARTARGS isn't loaded until almost immediately after XCL-EXTRAS during making loadups. There are no uses of DEFINE-RECORD in making the lisp.sysout loadup, so this ought to be safe, but this must be verified!

MattHeffron avatar Dec 12 '25 06:12 MattHeffron

On this branch Medley builds and runs with no apparent issues on Linux Mint 22.1 Cinnamon.

pamoroso avatar Dec 12 '25 11:12 pamoroso

I'd like a little background on this PR -- what problem is it solving? What is DEFINE-RECORDS? Not fmailiar with it.

masinter avatar Dec 14 '25 17:12 masinter

@masinter What is DEFINE-RECORDS?

xcl:define-record is a DEFINER that "Creates a structures object named by the symbol name that provides Common Lisp accessors, settors, predicates and constructors for an Interlisp record" (from the Medley Release Notes, September 1988, Page 7-3 ).

I'm trying these to reduce the Interlisp (CLISP) code in READ-BDF, which already is primarily Common Lisp code. I discovered that the macros are defined in such a way that their argument lists are not available to ?=, etc. This change just adds the argument list information to the property lists of the defined macros.

It isn't actually a structures object created, but macros and SETF places, that can be used as if the record was defined by defstruct.

MattHeffron avatar Dec 14 '25 22:12 MattHeffron