rejeep / commander.el

Emacs command line parser
GNU General Public License v3.0
56 stars 8 forks source link

Require 'cl during runtime #1

Closed swsnr closed 11 years ago

swsnr commented 11 years ago

Commander must require cl at runtime, to make case available when the expanded body of commander is actually run. If cl is required at compile time only, case is only available while commander is expanded (for which it's not actually required), but not necessarily while the expanded body of commander is executed.

On Emacs 24.3 and later this makes commander emit a runtime warning about cl being required at runtime. I do not know how to avoid this. You may want to use cl-lib instead, and add a dependency to cl-lib for backwards compatibility.

rejeep commented 11 years ago

It never crossed my mind that case was not a builtin function.

rejeep commented 11 years ago

This actually breaks the tests (don't mind Travis, which does not work ATM).

swsnr commented 11 years ago

@rejeep I didn't care for the tests, for I just wanted to bring this issue to your attention. I actually don't think that commander should require cl at runtime. As said, imho it should use cl-lib and add a cl-lib requirement for backwards compatibility.

rejeep commented 11 years ago

I've never used cl-lib so I'm not sure how it works. Here's an attempt https://github.com/rejeep/commander.el/tree/cl-lib

swsnr commented 11 years ago

@rejeep Well, just like "cl", except that you can require it without warnings, and all functions are prefixed with cl-. The branch looks good.

rejeep commented 11 years ago

Great, merged it.