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
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)
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;
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)
{