CeleritasCelery / emacs-native-shell-complete

Completion in shell buffers using native mechanisms
GNU Lesser General Public License v3.0
98 stars 9 forks source link

Require used libraries #4

Closed eclig closed 4 years ago

eclig commented 4 years ago

Hi Troy,

thank you very much for this library!

I've noticed that string-remove-suffix is not available per default, one has to load subr-x, thus this PR.

Cheers

Emílio

CeleritasCelery commented 4 years ago

We don't require shell because we don't actually use any functions from the library. Everything we do is at the comint level. And we don't need to require comint because it will be loaded when a shell is loaded. But good catch on subr-x! If you remove (require 'shell) I will merge this.

eclig commented 4 years ago

Hello Troy,

the byte-compiler spews some warnings when run in a fresh Emacs instance (emacs -q):

In native-complete-setup-bash:
native-complete.el:52:33:Warning: reference to free variable
    ‘explicit-bash-args’
native-complete.el:52:33:Warning: assignment to free variable
    ‘explicit-bash-args’

I changed the code to only require when byte-compiling.

The other two commits address further warnings from the byte-compiler.

CeleritasCelery commented 4 years ago

Thanks!