Subject: bug#41890: 28.0.50; [PATCH]: Add bindings for project.el

From: Michael Albinus <[email-masked]>
Date: Thu, 18 Jun 2020 20:18:23 +0200

Eli Zaretskii <[email-masked]> writes:

>> > And if we don't want these key bindings to be available always, we
>> > could have a separate autoloads file for project.el.  Some packages do
>> > that already.
>>
>> We might not want them when the package is simply installed through ELPA.
>
> So is Tramp.  Maybe Michael could share his experience with the
> separate autoloads file.

There's no magic. Tramp isn't used by many users, so it tries to keep
calm. Only the absolute minimum of functions and variables are
;;;###autoloaded. Everything else, which needs to be autoloaded in Tramp
(mainly objects which are shared by different tramp-*.el files), are
autoloaded with the ";;;###tramp-autoload" cookie. A file
tramp-loaddefs.el is generated during compilation, and this file is
required once the Tramp basic file, tramp.el, is loaded. That's it.

Such a *-loaddefs.el could also contain key bindings, which are activated
once the *.loaddefs.el file is loaded. Tramp doesn't define own key bindings,
so there's no need for it in tramp-loaddefs.el.

>> > And if we do care about this, we could use a separate autoloads file.
>>
>> Which the users would have to (require '...)?
>
> Do they do that with the likes of tramp-loaddefs.el?

Of course not! It is required tramp.el.

Best regards, Michael.