Skip to content

Commit

Permalink
better highlighting for with- forms
Browse files Browse the repository at this point in the history
  • Loading branch information
mishoo committed Jul 16, 2011
1 parent 95b516b commit 28a5f2f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/js/ymacs-mode-lisp.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ return return-from setq multiple-value-call".qw().toHash();
type = "type"; type = "type";
} }
// there are a lot of macros starting with "with-", so let's highlight this // there are a lot of macros starting with "with-", so let's highlight this
else if (/^with-/i.test(tmp.id)) { else if (/^with[-\x2f]|:with[-\x2f]/i.test(tmp.id)) {
type = "builtin"; type = "builtin";
} }
} }
Expand Down Expand Up @@ -357,7 +357,7 @@ return return-from setq multiple-value-call".qw().toHash();
if (currentForm) { if (currentForm) {
currentForm = currentForm.replace(/\*$/, ""); currentForm = currentForm.replace(/\*$/, "");
var formArgs = FORM_ARGS[currentForm]; var formArgs = FORM_ARGS[currentForm];
if (!formArgs && /^with/.test(currentForm)) { if (!formArgs && /^with|:with/.test(currentForm)) {
// "with" macros usually take one argument, then &body // "with" macros usually take one argument, then &body
formArgs = "1*"; formArgs = "1*";
} }
Expand Down

0 comments on commit 28a5f2f

Please sign in to comment.