- (if (and (boundp 'lexical-binding) lexical-binding)
- `(labels ,@args)
- (error "`cl-labels' with dynamic scoping is not implemented"))))
+ (unless (and (boundp 'lexical-binding) lexical-binding)
+ ;; We used to signal an error rather than a message, but in many uses of
+ ;; cl-labels, the value of lexical-binding doesn't actually matter.
+ ;; More importantly, the value of `lexical-binding' here is unreliable
+ ;; (it does not necessarily reflect faithfully whether the output of this
+ ;; macro will be interpreted as lexically bound code or not).
+ (message "This `cl-labels' requires `lexical-binding' to be non-nil"))
+ `(labels ,@args)))