Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ;;;###autoload for various commands #2131

Closed
wants to merge 2 commits into from
Closed

add ;;;###autoload for various commands #2131

wants to merge 2 commits into from

Conversation

@AmaiKinono
Copy link
Contributor

@AmaiKinono AmaiKinono commented Jul 13, 2019

Currently there are some commands that aren't autoloaded, making it problematic when user lazyload counsel.

@abo-abo
Copy link
Owner

@abo-abo abo-abo commented Jul 15, 2019

Thanks. But we have to try to be careful with autoloads, they are not free.

Right now, a recent version of counsel.el is 5762 lines. And counsel-autoloads.el is 495 lines. Emacs will load counsel-autoloads.el even if counsel.el is not loaded. So every ;;;###autoload adds a little bit to Emacs start up time.

Please update the PR to add autoload only to those commands that can be called from top-level. For instance, these commands can't be called at top-level:

  • counsel-git-grep-switch-cmd
  • counsel-git-grep-query-replace
  • counsel-up-directory
  • counsel-down-directory

They are marked interactive because they are bound in keymaps.

@AmaiKinono
Copy link
Contributor Author

@AmaiKinono AmaiKinono commented Jul 15, 2019

I see. I have tested these commands, and removed ;;;###autoload for those don't need. Please if this is done right.

@abo-abo abo-abo closed this in e858b10 Jul 15, 2019
@abo-abo
Copy link
Owner

@abo-abo abo-abo commented Jul 15, 2019

Thanks.

astoff added a commit to astoff/swiper that referenced this issue Jan 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants