Commit 4d56337b authored by Troels Henriksen's avatar Troels Henriksen
Browse files

Also consider macrolet to define local functions.

parent bd1ebe6e
......@@ -342,13 +342,18 @@ Each newline and following whitespace is replaced by a single space."
(t t))))
(defvar *local-function-definers* '(flet labels macrolet)
"A list of macros that define local functions, as per
(defun find-local-definition (syntax symbol-form)
"Return a form locally defining `symbol-form' as a
function (explicitly via `flet' or `labels', does not expand
macros or similar). If no such form can be found, return NIL."
(labels ((locally-binding-p (form)
(or (form-equal syntax (form-operator form) "FLET")
(form-equal syntax (form-operator form) "LABELS")))
(find-if #'(lambda (symbol)
(form-equal syntax (form-operator form) (string symbol)))
(match (form-operator)
(when form-operator
(form-equal syntax form-operator symbol-form)))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment