mmontone / emacs-inspector

Inspection tool for Emacs Lisp objects.
GNU General Public License v3.0
107 stars 9 forks source link

Autoloads! #3

Closed Hugo-Heagren closed 2 years ago

Hugo-Heagren commented 2 years ago

This package is awesome. But for the sake of easy use and onboarding, I think it would be good to autoload all of the entry-point commands. I'm not sure exactly which ones you would think are appropriate, but I would suggest, as a minimum, inspect-object, and all of the top-level interactive commands in the ;;------ Commands section.

mmontone commented 2 years ago

I don't know how autoloads work. I'm just loading the inspector.el file into Emacs an using atm.

mmontone commented 2 years ago

I'll have a look and see if I understand how autoloads work.

Hugo-Heagren commented 2 years ago

I don't know how autoloads work. I'm just loading the inspector.el file into Emacs an using atm.

Sorry, shouldn't have assumed. The best resource is the elisp manual node on autoloads. As a very rough guide though, what you probably want to do is put a line like this:

;;;###autload

above each command you want to be loaded automatically for the users. Have a look through the definitions of top-level user commands in some other packages on your machine to see examples.

(Given that I have a bit more experience with them, I would be happy to make a PR if you like?)

mmontone commented 2 years ago

Ah. Cool stuff. I had seen autoloads declaration in files, but didn't know how they worked.

I think I can manage to add the autoloads myself, no need for PR.

Thanks for the suggestion and info!

mmontone commented 2 years ago

@Hugo-Heagren

Like that?

Those are the top-level commands that should trigger loading in my opinion ..

Hugo-Heagren commented 2 years ago

LGTM!