]> git.eshelyaron.com Git - emacs.git/commitdiff
Merge from origin/emacs-27
authorGlenn Morris <rgm@gnu.org>
Mon, 21 Sep 2020 00:18:16 +0000 (17:18 -0700)
committerGlenn Morris <rgm@gnu.org>
Mon, 21 Sep 2020 00:18:16 +0000 (17:18 -0700)
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

1  2 
doc/lispref/minibuf.texi
doc/lispref/text.texi
lisp/emacs-lisp/syntax.el
lisp/menu-bar.el
src/nsterm.m
src/syntax.c
src/xdisp.c

Simple merge
Simple merge
index ce495af95bc28ca80f4d4e4671eae06bdc5016c0,f4f077264be53b2cb673bef89b519a13375ac846..487faacd738aaee5c572b8a4cac20902d152f15a
@@@ -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)
  
Simple merge
diff --cc src/nsterm.m
index f6a36c8fdcb55442c6e9e15bb6e771e282cdbdf4,3dd915e3703c81f41913405ae2192bf7f3dd02e2..5e5d09f058b0434a283f2c0fece93349035b5331
@@@ -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 7f0fc341f6e84d54d96f13c76ad2f75fc7c157f2,e8b32f5a445795ed9d7666950341806b8b814d37..e6af8a377bb5d656623efb37d7cb7706fad7b6e8
@@@ -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)
                {
diff --cc src/xdisp.c
Simple merge