summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2016-06-07 09:34:27 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2016-06-07 09:34:27 -0700
commit2aa6b47e3e216410195cf7ec3abb5902f38082fa (patch)
tree1b993c346dd4b6e92df488e1228411a6c737fef0 /src
parent5bc3263303bde93db32b0799ecee0cfa9fe40e9a (diff)
parent6e3adf8a4a796cea4328a528da48fc972b3feed6 (diff)
downloademacs-2aa6b47e3e216410195cf7ec3abb5902f38082fa.tar.gz
Merge from origin/emacs-25
6e3adf8 Fix crash in syntax.c after GC 973ce5a Improve squiggly heredoc support in non-SMIE Ruby mode 9d5cceb Fix doc string quoting 0b33a23 Fix mouse dragging of vertical dividers with scroll bars on l... a5d05f4 * etc/PROBLEMS: Mention the link-time problems on FreeBSD 11.
Diffstat (limited to 'src')
-rw-r--r--src/nsfns.m2
-rw-r--r--src/syntax.c61
2 files changed, 26 insertions, 37 deletions
diff --git a/src/nsfns.m b/src/nsfns.m
index ea099081a7f..9bc6c1d3418 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -3125,7 +3125,7 @@ Example: Install an icon Gnus.tiff and execute the following code
(setq ns-icon-type-alist
(append ns-icon-type-alist
- '((\"^\\\\*\\\\(Group\\\\*$\\\\|Summary \\\\|Article\\\\*$\\\\)\"
+ \\='((\"^\\\\*\\\\(Group\\\\*$\\\\|Summary \\\\|Article\\\\*$\\\\)\"
. \"Gnus\"))))
When you miniaturize a Group, Summary or Article frame, Gnus.tiff will
diff --git a/src/syntax.c b/src/syntax.c
index 1c3f644aec5..78c7de9c65b 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -2182,63 +2182,51 @@ skip_syntaxes (bool forwardp, Lisp_Object string, Lisp_Object lim)
ptrdiff_t start_point = PT;
ptrdiff_t pos = PT;
ptrdiff_t pos_byte = PT_BYTE;
- unsigned char *p = PT_ADDR, *endp, *stop;
-
- if (forwardp)
- {
- endp = (XINT (lim) == GPT) ? GPT_ADDR : CHAR_POS_ADDR (XINT (lim));
- stop = (pos < GPT && GPT < XINT (lim)) ? GPT_ADDR : endp;
- }
- else
- {
- endp = CHAR_POS_ADDR (XINT (lim));
- stop = (pos >= GPT && GPT > XINT (lim)) ? GAP_END_ADDR : endp;
- }
+ unsigned char *p, *endp, *stop;
immediate_quit = 1;
SETUP_SYNTAX_TABLE (pos, forwardp ? 1 : -1);
+
if (forwardp)
{
- if (multibyte)
+ while (true)
{
- while (1)
+ p = BYTE_POS_ADDR (pos_byte);
+ endp = XINT (lim) == GPT ? GPT_ADDR : CHAR_POS_ADDR (XINT (lim));
+ stop = pos < GPT && GPT < XINT (lim) ? GPT_ADDR : endp;
+
+ do
{
int nbytes;
if (p >= stop)
{
if (p >= endp)
- break;
+ goto done;
p = GAP_END_ADDR;
stop = endp;
}
- c = STRING_CHAR_AND_LENGTH (p, nbytes);
+ if (multibyte)
+ c = STRING_CHAR_AND_LENGTH (p, nbytes);
+ else
+ c = *p, nbytes = 1;
if (! fastmap[SYNTAX (c)])
- break;
+ goto done;
p += nbytes, pos++, pos_byte += nbytes;
- UPDATE_SYNTAX_TABLE_FORWARD (pos);
- }
- }
- else
- {
- while (1)
- {
- if (p >= stop)
- {
- if (p >= endp)
- break;
- p = GAP_END_ADDR;
- stop = endp;
- }
- if (! fastmap[SYNTAX (*p)])
- break;
- p++, pos++, pos_byte++;
- UPDATE_SYNTAX_TABLE_FORWARD (pos);
}
+ while (!parse_sexp_lookup_properties
+ || pos < gl_state.e_property);
+
+ update_syntax_table_forward (pos + gl_state.offset,
+ false, gl_state.object);
}
}
else
{
+ p = BYTE_POS_ADDR (pos_byte);
+ endp = CHAR_POS_ADDR (XINT (lim));
+ stop = pos >= GPT && GPT > XINT (lim) ? GAP_END_ADDR : endp;
+
if (multibyte)
{
while (1)
@@ -2280,6 +2268,7 @@ skip_syntaxes (bool forwardp, Lisp_Object string, Lisp_Object lim)
}
}
+ done:
SET_PT_BOTH (pos, pos_byte);
immediate_quit = 0;
@@ -3109,7 +3098,7 @@ but before count is used up, nil is returned. */)
DEFUN ("backward-prefix-chars", Fbackward_prefix_chars, Sbackward_prefix_chars,
0, 0, 0,
doc: /* Move point backward over any number of chars with prefix syntax.
-This includes chars with expression prefix syntax class (') and those with
+This includes chars with expression prefix syntax class (\\=') and those with
the prefix syntax flag (p). */)
(void)
{