aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPo Lu2023-07-22 07:59:17 +0800
committerPo Lu2023-07-22 07:59:17 +0800
commit95db5042d5e636097bfb0f9af42f65cd5ffaa9bb (patch)
tree24991aa08ac7d614b3754a8cef7a440db307d651 /src
parentae174f266d70f2d722545e77d3f85dd7d3f09a68 (diff)
parentca4bc9baf9d2c861ad776da07e56381da8e3722a (diff)
downloademacs-95db5042d5e636097bfb0f9af42f65cd5ffaa9bb.tar.gz
emacs-95db5042d5e636097bfb0f9af42f65cd5ffaa9bb.zip
Merge remote-tracking branch 'origin/master' into feature/android
Diffstat (limited to 'src')
-rw-r--r--src/regex-emacs.c2
-rw-r--r--src/search.c11
-rw-r--r--src/xdisp.c4
3 files changed, 10 insertions, 7 deletions
diff --git a/src/regex-emacs.c b/src/regex-emacs.c
index 9e298b81ebb..51fc2b0558d 100644
--- a/src/regex-emacs.c
+++ b/src/regex-emacs.c
@@ -554,7 +554,7 @@ print_partial_compiled_pattern (re_char *start, re_char *end)
554 fprintf (stderr, "/charset [%s", 554 fprintf (stderr, "/charset [%s",
555 (re_opcode_t) *(p - 1) == charset_not ? "^" : ""); 555 (re_opcode_t) *(p - 1) == charset_not ? "^" : "");
556 556
557 if (p + *p >= pend) 557 if (p + (*p & 0x7f) >= pend)
558 fputs (" !extends past end of pattern! ", stderr); 558 fputs (" !extends past end of pattern! ", stderr);
559 559
560 for (c = 0; c < 256; c++) 560 for (c = 0; c < 256; c++)
diff --git a/src/search.c b/src/search.c
index 122d6166637..3edfc0bc1a8 100644
--- a/src/search.c
+++ b/src/search.c
@@ -162,7 +162,7 @@ clear_regexp_cache (void)
162 /* It's tempting to compare with the syntax-table we've actually changed, 162 /* It's tempting to compare with the syntax-table we've actually changed,
163 but it's not sufficient because char-table inheritance means that 163 but it's not sufficient because char-table inheritance means that
164 modifying one syntax-table can change others at the same time. */ 164 modifying one syntax-table can change others at the same time. */
165 if (!searchbufs[i].busy && !EQ (searchbufs[i].syntax_table, Qt)) 165 if (!searchbufs[i].busy && !BASE_EQ (searchbufs[i].syntax_table, Qt))
166 searchbufs[i].regexp = Qnil; 166 searchbufs[i].regexp = Qnil;
167} 167}
168 168
@@ -214,10 +214,11 @@ compile_pattern (Lisp_Object pattern, struct re_registers *regp,
214 && !cp->busy 214 && !cp->busy
215 && STRING_MULTIBYTE (cp->regexp) == STRING_MULTIBYTE (pattern) 215 && STRING_MULTIBYTE (cp->regexp) == STRING_MULTIBYTE (pattern)
216 && !NILP (Fstring_equal (cp->regexp, pattern)) 216 && !NILP (Fstring_equal (cp->regexp, pattern))
217 && EQ (cp->buf.translate, translate) 217 && BASE_EQ (cp->buf.translate, translate)
218 && cp->posix == posix 218 && cp->posix == posix
219 && (EQ (cp->syntax_table, Qt) 219 && (BASE_EQ (cp->syntax_table, Qt)
220 || EQ (cp->syntax_table, BVAR (current_buffer, syntax_table))) 220 || BASE_EQ (cp->syntax_table,
221 BVAR (current_buffer, syntax_table)))
221 && !NILP (Fequal (cp->f_whitespace_regexp, Vsearch_spaces_regexp)) 222 && !NILP (Fequal (cp->f_whitespace_regexp, Vsearch_spaces_regexp))
222 && cp->buf.charset_unibyte == charset_unibyte) 223 && cp->buf.charset_unibyte == charset_unibyte)
223 break; 224 break;
@@ -2892,7 +2893,7 @@ Return value is undefined if the last search failed. */)
2892 ptrdiff_t start = search_regs.start[i]; 2893 ptrdiff_t start = search_regs.start[i];
2893 if (start >= 0) 2894 if (start >= 0)
2894 { 2895 {
2895 if (EQ (last_thing_searched, Qt) 2896 if (BASE_EQ (last_thing_searched, Qt)
2896 || ! NILP (integers)) 2897 || ! NILP (integers))
2897 { 2898 {
2898 XSETFASTINT (data[2 * i], start); 2899 XSETFASTINT (data[2 * i], start);
diff --git a/src/xdisp.c b/src/xdisp.c
index 4e9c5f49e58..5e471cad61e 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -29268,7 +29268,9 @@ calc_pixel_width_or_height (double *res, struct it *it, Lisp_Object prop,
29268 /* 'width': the width of FONT. */ 29268 /* 'width': the width of FONT. */
29269 if (EQ (prop, Qwidth)) 29269 if (EQ (prop, Qwidth))
29270 return OK_PIXELS (font 29270 return OK_PIXELS (font
29271 ? FONT_WIDTH (font) 29271 ? (font->average_width
29272 ? font->average_width
29273 : font->space_width)
29272 : FRAME_COLUMN_WIDTH (it->f)); 29274 : FRAME_COLUMN_WIDTH (it->f));
29273#else 29275#else
29274 if (EQ (prop, Qheight) || EQ (prop, Qwidth)) 29276 if (EQ (prop, Qheight) || EQ (prop, Qwidth))