manateelazycat / blink-search

In the blink of an eye, the search is complete
114 stars 15 forks source link

support package-vc #20

Closed ksqsf closed 2 years ago

ksqsf commented 2 years ago

package-vc is the new way to install external packages introduced in emacs 29.

this PR consists of three improvements to make blink-search compatible with package-vc:

  1. fix illegal version number 2.6-dev, or package-vc refuses to do anything (Could you please check what the expected version is?)
  2. make the new load-path visible to the bytecode compiler
  3. make interactive commands autoload
manateelazycat commented 2 years ago

It's not necessary to wrap autoload on function, you can use similar technology like lazy-load (https://github.com/manateelazycat/lazy-load) to load function dynamically.

ksqsf commented 2 years ago

Autoloads are required when the package is used as a package.el-flavor package. Package.el will generate "blink-search-autoloads.el" from autoload annotations, and only this file will be loaded on package initialization, to speed up Emacs startup. (There is a separate feature called package-quickstart which also needs correct autoloads.) If there are no autoloads, the user will not be able to call any blink-search command if he uses package-vc-install.

I added autoloads blindlessly just now. In retrospect, some are indeed unnecessary. I will update the PR in minutes.