diff options
| author | Glenn Morris <rgm@gnu.org> | 2020-09-20 17:18:16 -0700 |
|---|---|---|
| committer | Glenn Morris <rgm@gnu.org> | 2020-09-20 17:18:16 -0700 |
| commit | 3675993d76cc6db43703240d0ff0fd892abf1b41 (patch) | |
| tree | 2615512bfb3d569b679efb09711dad1cea7536cc /src/syntax.c | |
| parent | 15c594c282176cf8e29072de2934a046922053b1 (diff) | |
| parent | df04f3e755f3001ebb9cc428faa7fa46059e636b (diff) | |
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.c | 25 |
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. */) bool fence_found = 0; ptrdiff_t ini = from, ini_byte = from_byte; - while (1) + if (from > stop) { - dec_both (&from, &from_byte); - UPDATE_SYNTAX_TABLE_BACKWARD (from); - c = FETCH_CHAR_AS_MULTIBYTE (from_byte); - if (SYNTAX (c) == Scomment_fence - && !char_quoted (from, from_byte)) + while (1) { - fence_found = 1; - break; + dec_both (&from, &from_byte); + UPDATE_SYNTAX_TABLE_BACKWARD (from); + c = FETCH_CHAR_AS_MULTIBYTE (from_byte); + if (SYNTAX (c) == Scomment_fence + && !char_quoted (from, from_byte)) + { + fence_found = 1; + break; + } + else if (from == stop) + break; + rarely_quit (++quit_count); } - else if (from == stop) - break; - rarely_quit (++quit_count); } if (fence_found == 0) { |
