Hi Nick,

Nick Dokos <nicholas.do...@hp.com> writes:

> I'd suggest that that can be a source of bugs that would be
> avoided with a compatibility macro.

`org-labels' is an alias for `cl-labels' (when available) or `labels'.

There is no need for a compatibility macro here, as the current code 
is compatible with both Emacs 23 and Emacs 24 -- and hopefully later
versions of Emacs.

The question is rather whether we want to be very strict and replace
as much cl-* constructs as possible.

Nicolas shown a way to let-bind functions recursively (which is simple
and neat, by the way), so yes, I'd favor replacing org-labels in this
case.  Especially because the cl-labels and labels macros do not work
exactly the same way.

See labels' docstring:

...
Like `cl-labels' except that the lexical scoping is handled via `lexical-let'
rather than relying on `lexical-binding'.

> But maybe the compatibility macro would be a bigger problem - I don't
> know for sure. In particular, the file would need a periodic cleanup to
> get rid of old cruft, but if it's a once-a-year-or-two occurrence, that
> might not be too bad.

Always good to know there are many people we can rely on to clean the
old cruft :)

-- 
 Bastien

Reply via email to