aboutsummaryrefslogtreecommitdiffstats
path: root/src/syntax.c
diff options
context:
space:
mode:
authorGlenn Morris2020-09-20 17:18:16 -0700
committerGlenn Morris2020-09-20 17:18:16 -0700
commit3675993d76cc6db43703240d0ff0fd892abf1b41 (patch)
tree2615512bfb3d569b679efb09711dad1cea7536cc /src/syntax.c
parent15c594c282176cf8e29072de2934a046922053b1 (diff)
parentdf04f3e755f3001ebb9cc428faa7fa46059e636b (diff)
downloademacs-3675993d76cc6db43703240d0ff0fd892abf1b41.tar.gz
emacs-3675993d76cc6db43703240d0ff0fd892abf1b41.zip
Merge from origin/emacs-27
df04f3e755 Fix a rare segfault in syntax.c fd1fe1e1ec Add doc to syntax-propertize-function saying it must do a ... fcd599bbea Minor copyedits of doc of 'with-silent-modifications' 759399cdb1 Improve documentation of 'max-mini-window-height' 3223302aa2 Use modern constant names for the NS pasteboard 985703d380 Fix doc string of 'toggle-menu-bar-mode-from-frame' 184a4977c7 Make vc-bzr tests work with brz 3.1 (bug#43314) # Conflicts: # lisp/emacs-lisp/syntax.el # src/syntax.c
Diffstat (limited to 'src/syntax.c')
-rw-r--r--src/syntax.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/syntax.c b/src/syntax.c
index 7f0fc341f6e..e6af8a377bb 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -2542,20 +2542,23 @@ between them, return t; otherwise return nil. */)
2542 bool fence_found = 0; 2542 bool fence_found = 0;
2543 ptrdiff_t ini = from, ini_byte = from_byte; 2543 ptrdiff_t ini = from, ini_byte = from_byte;
2544 2544
2545 while (1) 2545 if (from > stop)
2546 { 2546 {
2547 dec_both (&from, &from_byte); 2547 while (1)
2548 UPDATE_SYNTAX_TABLE_BACKWARD (from);
2549 c = FETCH_CHAR_AS_MULTIBYTE (from_byte);
2550 if (SYNTAX (c) == Scomment_fence
2551 && !char_quoted (from, from_byte))
2552 { 2548 {
2553 fence_found = 1; 2549 dec_both (&from, &from_byte);
2554 break; 2550 UPDATE_SYNTAX_TABLE_BACKWARD (from);
2551 c = FETCH_CHAR_AS_MULTIBYTE (from_byte);
2552 if (SYNTAX (c) == Scomment_fence
2553 && !char_quoted (from, from_byte))
2554 {
2555 fence_found = 1;
2556 break;
2557 }
2558 else if (from == stop)
2559 break;
2560 rarely_quit (++quit_count);
2555 } 2561 }
2556 else if (from == stop)
2557 break;
2558 rarely_quit (++quit_count);
2559 } 2562 }
2560 if (fence_found == 0) 2563 if (fence_found == 0)
2561 { 2564 {