Skip to content

Instantly share code, notes, and snippets.

@emk
Created May 21, 2009 17:34
Show Gist options
  • Save emk/115584 to your computer and use it in GitHub Desktop.
Save emk/115584 to your computer and use it in GitHub Desktop.
wxScintilla LexLisp: More brackets
diff --git a/src/stc/scintilla/src/LexLisp.cxx b/src/stc/scintilla/src/LexLisp.cxx
index 8784e38..e1d06cb 100644
--- a/src/stc/scintilla/src/LexLisp.cxx
+++ b/src/stc/scintilla/src/LexLisp.cxx
@@ -32,7 +32,7 @@ using namespace Scintilla;
static inline bool isLispoperator(char ch) {
if (isascii(ch) && isalnum(ch))
return false;
- if (ch == '\'' || ch == '`' || ch == '(' || ch == ')' )
+ if (ch == '\'' || ch == '`' || ch == '(' || ch == ')' || ch == '[' || ch == ']' || ch == '{' || ch == '}')
return true;
return false;
}
@@ -246,9 +246,9 @@ static void FoldLispDoc(unsigned int startPos, int length, int /* initStyle */,
styleNext = styler.StyleAt(i + 1);
bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n');
if (style == SCE_LISP_OPERATOR) {
- if (ch == '(') {
+ if (ch == '(' || ch == '[' || ch == '{') {
levelCurrent++;
- } else if (ch == ')') {
+ } else if (ch == ')' || ch == ']' || ch == '}') {
levelCurrent--;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment