mirror of
https://github.com/git/git.git
synced 2026-05-18 17:35:38 +02:00
b79f7a3ad3
Common Lisp has top-level forms, such as 'defun' and 'defmacro', that are not matched by the current Scheme pattern. Also, it is more common in CL, when defining user macros intended as top-level forms, to prefix their names with "def" instead of "define"; such forms are also not matched. And some top-level forms don't even begin with "def". On the other hand, it is an established formatting convention in the Lisp community that only top-level forms start at the left margin. So matching any unindented line starting with an open parenthesis is an acceptable heuristic; false positives will be rare. However, there are also cases where notionally top-level forms are grouped together within some containing form. At least in the Common Lisp community, it is conventional to indent these by two spaces, or sometimes one. But matching just an open parenthesis indented by two spaces would be too broad; so the pattern added by this commit requires an indented form to start with "(def". It is believed that this strikes a good balance between potential false positives and false negatives. Signed-off-by: Scott L. Burson <Scott@sympoiesis.com> Acked-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 lines
235 B
Plaintext
7 lines
235 B
Plaintext
(module A
|
|
(export with-display-exception)
|
|
(extern (display-exception display-exception))
|
|
(def (with-display-exception thunk) RIGHT
|
|
(with-catch (lambda (e) (display-exception e (current-error-port)) e)
|
|
thunk ChangeMe)))
|