File tree Expand file tree Collapse file tree 2 files changed +14
-7
lines changed Expand file tree Collapse file tree 2 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -1180,15 +1180,15 @@ the current buffer."
1180
1180
" Skip to the next token."
1181
1181
(let ((case-fold-search nil ))
1182
1182
1183
- (if (or (looking-at " \" \\ ([^\\ \" ]\\ |\\\\ .\\ )*\" " )
1183
+ (if (or (looking-at " '\\ ([^\\ ']\\ |\\\\ .\\ )'" )
1184
+ (looking-at " \" \\ ([^\\ \" ]\\ |\\\\ .\\ )*\" " )
1184
1185
(looking-at ; Hierarchical names always start with uppercase
1185
- " [[:upper:]]\\ (\\ s_\\ |\\ sw\\ |'\\ )*\\ (\\ .\\ (\\ s_\\ |\\ sw\\ |'\\ )+\\ )*" )
1186
- (looking-at " \\ (\\ s_\\ |\\ sw\\ )\\ (\\ s_\\ |\\ sw\\ |'\\ )*" ) ; Only unqualified vars can start with lowercase
1186
+ " '?'? [[:upper:]]\\ (\\ s_\\ |\\ sw\\ |'\\ )*\\ (\\ .\\ (\\ s_\\ |\\ sw\\ |'\\ )+\\ )*" )
1187
+ (looking-at " '?'? \\ (\\ s_\\ |\\ sw\\ )\\ (\\ s_\\ |\\ sw\\ |'\\ )*" ) ; Only unqualified vars can start with lowercase
1187
1188
(looking-at " [0-9][0-9oOxXeE+-]*" )
1188
1189
(looking-at " [-:!#$%&*+./<=>?@\\\\ ^|~]+" )
1189
1190
(looking-at " [](){}[,;]" )
1190
- (looking-at " `[[:alnum:]' ]*`" )
1191
- (looking-at " '\\ ([^\\ ']\\ |\\\\ .\\ )*'" ))
1191
+ (looking-at " `[[:alnum:]' ]*`" ))
1192
1192
(goto-char (match-end 0 ))
1193
1193
; ; otherwise skip until space found
1194
1194
(skip-syntax-forward " ^-" ))
Original file line number Diff line number Diff line change @@ -423,9 +423,16 @@ Example of lines:
423
423
" , baz = 0"
424
424
" ^" ))
425
425
426
- (ert-deftest haskell-indentation-check-22 ()
427
- " layout versus comma in braces (unicode) "
426
+ (ert-deftest haskell-indentation-check-22a ()
427
+ " names starting with quotes "
428
428
(haskell-indentation-check
429
429
" f = a (a 'A)"
430
430
" (a 'A)"
431
431
" ^ ^" ))
432
+
433
+ (ert-deftest haskell-indentation-check-22b ()
434
+ " character literal (escape sequence)"
435
+ (haskell-indentation-check
436
+ " f = '\\\\ "
437
+ " "
438
+ " ^ ^" ))
You can’t perform that action at this time.
0 commit comments