(defmacro anaphoric-lambda (args &rest body)
"Like `lambda', but the function may refer to itself as `self'.
ARGS and BODY are otherwise as documented for `lambda'."
(declare (debug lambda)
(indent defun))
`(labels ((self ,args ,@body))
#'self))
Some versions ago it was working(it seems to me that for 24.4 it works).
(With cl-labels and lexical-binding I can do it, but it is not compatible with older emacses.)
My current emacs-version is 25.0.50.1.