pauldub / activity-watch-mode

Emacs plugin for automatic time tracking and metrics generated from your programming activity.
https://activitywatch.net
70 stars 9 forks source link

function* is not defined #13

Closed VojtechStep closed 4 years ago

VojtechStep commented 4 years ago

The function* macro is an alias for cl-function from cl-lib, but only when the deprecated cl package is required.

I use emacs build from source, so it's possible that it works in other versions, and since nobody else is complaining, that is probably the case.

I'm not sure in what version was cl-function introduced, so I don't know how replacing all instances of function* would influence backwards emacs compatibility.

pauldub commented 4 years ago

I've used function because at the time request.el documentation had those in their examples.

The emacs manual says the following about cl-lib:

New code should use cl-lib rather than cl.

Given that cl-lib was introduced by default in emacs 24.3 which was released on March 10, 2013. I think its pretty safe to update to cl-function and break compatibility with emacs < 24.3.

Any thoughts on this?

VojtechStep commented 4 years ago

I don't the package supports emacs < 24.3 even now, given that cl-lib is already required and the minimal version declared in the header is 25.

If cl-function was in cl-lib from the beggining (I have to admit I didn't do any research except for replacing it on my machine and seeing it works), there should be no reason not to use it.

pauldub commented 4 years ago

It looks like it has been supported since the inception of cl-lib: http://git.savannah.gnu.org/gitweb/?p=emacs/elpa.git;a=blob;f=packages/cl-lib/cl-lib.el;hb=5e7858e072ce22091a532cdb1cd00a075f8e3d0e#l85

In this case I'll upgrade the code to use cl-function and release a new version

pauldub commented 4 years ago

I've published a new version of the package, 1.2.0, which fixes this issue.