Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
climacs
climacs
Commits
4d56337b
Commit
4d56337b
authored
Jan 15, 2008
by
Troels Henriksen
Browse files
Also consider macrolet to define local functions.
parent
bd1ebe6e
Changes
1
Hide whitespace changes
Inline
Side-by-side
climacs-lisp-syntax.lisp
View file @
4d56337b
...
...
@@ -342,13 +342,18 @@ Each newline and following whitespace is replaced by a single space."
'cl:function
)
(
t
t
))))
(
defvar
*local-function-definers*
'
(
flet
labels
macrolet
)
"A list of macros that define local functions, as per
`find-local-definition."
)
(
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
)))
*local-function-definers*
))
(
match
(
form-operator
)
(
when
form-operator
(
form-equal
syntax
form-operator
symbol-form
)))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment