emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Some improvements for cl-flet


From: Lars Ingebrigtsen
Subject: Re: [PATCH] Some improvements for cl-flet
Date: Sun, 26 Sep 2021 08:54:06 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

akater <nuclearspace@gmail.com> writes:

> Fixes the following issues with cl-flet:
> - No error on illegal function names
> - No error on malformed specs
> - Incorrectly treated (setf ..) local functions
> - No warning on duplicated definitions
> - No warning on unused definitions
> - No way to capture definitions present in the body

Sounds great.  :-)  I don't have any comments on the actual
functionality, but just a couple of trivial notes:

> -(defmacro cl--generic-with-memoization (place &rest code)
> +(defmacro cl--with-memoization (place &rest code)

Is there any reason for this renaming?

> +(defun cl--flet-convert-with-setf (f)
> +  "Special macro-expander to rename (function F) references in `cl-flet', 
> including (function (setf F)).

The first line of the doc string should be a complete sentence (shorter
than 80 characters).

> +(defmacro with--cl-flet-macroexp ( arglist var
> +                                   function-name expander memoized-alist
> +                                   &rest body)
> +  "Return lambda (with ARGLIST being its arglist) that can
> +serve as a macroexpanding function in
> +`macroexpand-all-environment' to expand local function calls of
> +the form (FUNCTION-NAME ..).

Ditto (and the same for a couple more macros).

Anyway, this sounds like good improvement for cl-flet, but I think it'll
have to wait until Emacs 29 -- it's a too big a change to go into Emacs
28.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



reply via email to

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