Skip to content

Commit

Permalink
change string and comment hilight regex.
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchan0321 committed Aug 4, 2024
1 parent e45fb6e commit 4580f5b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 9 deletions.
6 changes: 1 addition & 5 deletions lib/Mode-C.key
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ sets HILIGHT_REGEXP (
'\b[Nn][Uu][Ll][Ll]\b|<t>|<nil>|\b[Tt][Rr][Uu][Ee]\b|\b[Ff][Aa][Ll][Ss][Ee]\b|\b[0-9]+\b|\b0x[0-9a-fA-F]+\b'
VALUE_LITERAL_HILIGHT
)
(
'//.*$'
COMMENT_HILIGHT
)
);

sets HILIGHT_REGEXP_ML (
Expand All @@ -25,7 +21,7 @@ sets HILIGHT_REGEXP_ML (
STRING_LITERAL_HILIGHT
)
(
'/\*/?([^/]|[^*]/)*\*/'
'/\*/?([^/]|[^*]/)*\*/|//.*\n'
COMMENT_HILIGHT
)
);
Expand Down
2 changes: 1 addition & 1 deletion lib/Mode-Grep.key
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
sets HILIGHT_REGEXP [setvar HILIGHT_REGEXP_DEFAULT];
sets HILIGHT_REGEXP $HILIGHT_REGEXP_DEFAULT;
sets HILIGHT_REGEXP_ML ();

15 changes: 13 additions & 2 deletions lib/Mode-Prfm.key
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
sets HILIGHT_REGEXP [setvar HILIGHT_REGEXP_DEFAULT];
sets HILIGHT_REGEXP_ML [setvar HILIGHT_REGEXP_DEFAULT_ML];
sets HILIGHT_REGEXP $HILIGHT_REGEXP_DEFAULT;
sets HILIGHT_REGEXP_ML
(
(
'(?:\\"(?:[^\\\\"]|\\\\(?:.|\n))*\\")|(?:\'(?:[^\\\\\']|\\\\(?:.|\n))*\')'
STRING_LITERAL_HILIGHT
)
#(
# '#[^"\']*[\n\r]|#.*$'
# COMMENT_HILIGHT
#)
);

setkey CTRL_J eval-region;
setkey CTRL_I smart-indent;
setkey CTRL_M smart-newline;
Expand Down
3 changes: 2 additions & 1 deletion lib/pmacs.conf
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,8 @@ setconf HILIGHT_REGEXP_DEFAULT
NORMAL_TEXT
)
(
'#[^"\']*$|^[\t ]*#.*$'
'#[^"\']*\n|#.*$'
# '#[^"\']*$|^[\t ]*#.*$'
COMMENT_HILIGHT
)
)
Expand Down

0 comments on commit 4580f5b

Please sign in to comment.