From: Glenn Morris Date: Mon, 21 Sep 2020 00:18:16 +0000 (-0700) Subject: Merge from origin/emacs-27 X-Git-Tag: emacs-28.0.90~5972 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3675993d76cc6db43703240d0ff0fd892abf1b41;p=emacs.git 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 --- 3675993d76cc6db43703240d0ff0fd892abf1b41 diff --cc lisp/emacs-lisp/syntax.el index ce495af95bc,f4f077264be..487faacd738 --- a/lisp/emacs-lisp/syntax.el +++ b/lisp/emacs-lisp/syntax.el @@@ -63,10 -63,14 +63,15 @@@ override the buffer's syntax table for cannot be handled just by the buffer's syntax-table. The specified function may call `syntax-ppss' on any position -before END, but it should not call `syntax-ppss-flush-cache', -which means that it should not call `syntax-ppss' on some -position and later modify the buffer on some earlier position. +before END, but if it calls `syntax-ppss' on some +position and later modifies the buffer on some earlier position, +then it is its responsability to call `syntax-ppss-flush-cache' to flush - the now obsolete ppss info from the cache.") ++the now obsolete ppss info from the cache. + + Note: When this variable is a function, it must apply _all_ the + `syntax-table' properties needed in the given text interval. + Using both this function and other means to apply these + properties won't work properly.") (defvar syntax-propertize-chunk-size 500) diff --cc src/nsterm.m index f6a36c8fdcb,3dd915e3703..5e5d09f058b --- a/src/nsterm.m +++ b/src/nsterm.m @@@ -8608,19 -8361,19 +8608,19 @@@ not_in_argv (NSString *arg fenum = [files objectEnumerator]; while ( (file = [fenum nextObject]) ) - strings = Fcons (build_string ([file UTF8String]), strings); + strings = Fcons ([file lispString], strings); } - else if ([type isEqualToString: NSURLPboardType]) + else if ([type isEqualToString: NSPasteboardTypeURL]) { NSURL *url = [NSURL URLFromPasteboard: pb]; if (url == nil) return NO; type_sym = Qurl; - strings = list1 (build_string ([[url absoluteString] UTF8String])); + strings = list1 ([[url absoluteString] lispString]); } - else if ([type isEqualToString: NSStringPboardType] - || [type isEqualToString: NSTabularTextPboardType]) + else if ([type isEqualToString: NSPasteboardTypeString] + || [type isEqualToString: NSPasteboardTypeTabularText]) { NSString *data; diff --cc src/syntax.c index 7f0fc341f6e,e8b32f5a445..e6af8a377bb --- a/src/syntax.c +++ b/src/syntax.c @@@ -2542,20 -2545,23 +2542,23 @@@ between them, return t; otherwise retur 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); ++ 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) {