Subject: Re: bug#77312: [PATCH] Add uniquify-get-unique-names

From: Daniel Mendler <[email-masked]>
Date: Tue, 10 Jun 2025 05:14:28 +0200

Dmitry Gutov <[email-masked]> writes:

>> Btw, would you be interested in having `uniquify-get-unique-names' in
>> Compat, such that you avoid the fboundp check? project.el would have to
>> depend on Compat for that, but that's essentially free on Emacs 30 and
>> newer.
>
> I usually try to avoid extra deps, but this can make sense, at least for users
> of Emacs>30. Especially if it leads to simplification in multiple places.

I also find it good to avoid extra deps, in particular if they introduce
their own idioms. Compat doesn't invent functionality, it just provides
some APIs from the latest stable Emacs versions, so it will help keeping
your code up to date. Compat is made such that the dependency cost is
minimized, since it is not installed if Emacs is sufficiently new.

> Can you see other compatibility checks we could forgo this way? Offhand, I see
> another fboundp in 'project-ignores' (default definition) and a version< inside
> 'project-list-buffers-buffer-menu'.

I think these checks cannot be avoided. But you could start using some
new functions or macros like `defvar-keymap'. See the Compat manual for
a list of backported functionality.

Daniel