aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding.c
diff options
context:
space:
mode:
authorNoam Postavsky2016-12-18 00:00:30 -0500
committerNoam Postavsky2017-01-23 19:28:30 -0500
commit201dfe311868932d10da146808fcdd681948ba53 (patch)
tree17b0d5bd792909b88fa30de7282c5dd947d04e68 /src/coding.c
parent0c31ff43b6880c84498fbe1f06e1e5809b55e838 (diff)
downloademacs-201dfe311868932d10da146808fcdd681948ba53.tar.gz
emacs-201dfe311868932d10da146808fcdd681948ba53.zip
Fix comment detection on open parens
Characters having both open paren syntax and comment start syntax were being detected as open parens even when they should have been part a comment starter (Bug#24870). * src/syntax.c (in_2char_comment_start): New function, extracted from `scan_sexps_forward'. (scan_sexps_forward): Add check for a 2-char comment starter before the loop. Inside the loop, do that check after incrementing the 'from' character index. Move the single char comment syntax cases into the switch instead of special casing them before. * test/src/syntax-tests.el (parse-partial-sexp-paren-comments): (parse-partial-sexp-continue-over-comment-marker): New tests.
Diffstat (limited to 'src/coding.c')
0 files changed, 0 insertions, 0 deletions