branch: externals/a68-mode commit 98617f3d179f943c3ddc94765ad55bc59a51e97d Author: Jose E. Marchesi <jose.march...@oracle.com> Commit: Jose E. Marchesi <jose.march...@oracle.com>
Improve regexp for invalid string breaks. --- a68-mode.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/a68-mode.el b/a68-mode.el index 265fec0471..f7b48f0382 100644 --- a/a68-mode.el +++ b/a68-mode.el @@ -179,8 +179,8 @@ ''font-lock-constant-face) ;; String breaks. Apostrophe is not (currently) a worthy character ;; out of strings, so for now we can just match it anywhere. - '("\\('[nrft']\\)\\|\\('(.*?)\\)" 0 ''a68-string-break-face prepend) - '("'[^nrft'(]" 0 ''font-lock-warning-face) + '("[^']\\('[^nrft'(]\\)" 1 ''font-lock-warning-face) + '("\\(''\\|[^']\\)\\('[^nrft'(]\\)" 2 ''font-lock-warning-face prepend) ;; Two or more consecutive underscore characters are always ;; illegal in this stropping regime. (cons "_[_]+" ''font-lock-warning-face) @@ -365,7 +365,7 @@ ;; String breaks. Apostrophe is not (currently) a worthy character ;; out of strings, so for now we can just match it anywhere. '("\\('[nrft']\\)\\|\\('(.*?)\\)" 0 ''a68-string-break-face prepend) - '("'[^nrft'(]" 0 ''font-lock-warning-face prepend) + '("\\(''\\|[^']\\)\\('[^nrft'(]\\)" 2 ''font-lock-warning-face prepend) ;; Two or more consecutive underscore characters are always ;; illegal in this stropping regime. (cons "_[_]+" ''font-lock-warning-face)