aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStefan Kangas2023-01-27 11:30:38 +0100
committerStefan Kangas2023-01-27 11:30:38 +0100
commit12e419ad1157973ceae8b610e3ddf2e76cbeb488 (patch)
treeb7e79ff1ec4e99a36b58fc85f6f76949d9765cb8 /src
parente8db522e43701740fecc37a3f6fa7d6fb9f25ee8 (diff)
parentf8c95d1a7681e861fc22d2a040cda0ddfe23eff4 (diff)
downloademacs-12e419ad1157973ceae8b610e3ddf2e76cbeb488.tar.gz
emacs-12e419ad1157973ceae8b610e3ddf2e76cbeb488.zip
Merge from origin/emacs-29
f8c95d1a768 Fix xt-mouse on terminals that report UTF-8 encoded coord... 4bf7cb71edc Fix go-ts-mode indentation and set indent offset to 8 (Bu... ff9498624fc ; * src/insdel.c (insert_from_buffer): Fix assertions. 41f497c8bee Fix doc strings of window-splitting commands cdf74254ffa Fix indentation for c-ts-mode (bug#61026) 4bd06ce2a9f Fix call to treesit_record_change in insdel.c 00675aa724a Add support for building tree-sitter modules with MinGW af28191b04f * lisp/net/tramp.el (tramp-wrong-passwd-regexp): Fix regexp. 42e02480c2b * doc/emacs/text.texi (Outline Minor Mode): New node spli... 37c1c924666 ; * etc/NEWS: Minor reordering. cfb180329b5 ruby-ts-mode: Don't reindent when "class" or "def" is und... abb3becb9fb treesit-install-language-grammar: Provide default repo url c6613403e5c Fix Dired face for directory symlinks 37454de0c8f Pacify --without-x unused function warning 9a21cb10751 ; * etc/NEWS: Fix typos. f30a4f51fef Announce outline.el keymaps 8198803f660 ; Don't mention in the Gnus manual user options that were... 8a1498c01f7 Fix fontification of function-valued variables (bug#61053) cfe26f31893 Add new java indent rules 987e53f3e2d ; * doc/misc/erc.texi: Improve Local Modules section. 3846e79c93b ; Fix filename mismatches in prop lines of ERC tests ecf500b5e34 Handle relative file names in vc-resynch-window and vc-re... 695e9f71c3f Use named keymaps for outline buttons e31a5623965 * lisp/vc/vc-bzr.el (vc-bzr--pushpull): Return buffer's p... deee3a92623 ; Fix last change in etc/NEWS bc78285e686 ; * etc/NEWS: Fix typos. c15c0f7f018 CC Mode: Change the default value of objc-font-lock-extra... 7f438ff543b Don't try to make a pipe process for remote processes in ... cb9628373a8 * lisp/startup.el (command-line): Fix warning message. (... e6c5f32e77d * lisp/find-dired.el (find-dired): Fix bug where M-p skip... # Conflicts: # etc/NEWS
Diffstat (limited to 'src')
-rw-r--r--src/insdel.c17
-rw-r--r--src/xfaces.c2
2 files changed, 12 insertions, 7 deletions
diff --git a/src/insdel.c b/src/insdel.c
index b51767bf527..0e1e98664b3 100644
--- a/src/insdel.c
+++ b/src/insdel.c
@@ -1175,9 +1175,20 @@ insert_from_buffer (struct buffer *buf,
1175{ 1175{
1176 ptrdiff_t opoint = PT; 1176 ptrdiff_t opoint = PT;
1177 1177
1178#ifdef HAVE_TREE_SITTER
1179 ptrdiff_t obyte = PT_BYTE;
1180#endif
1181
1178 insert_from_buffer_1 (buf, charpos, nchars, inherit); 1182 insert_from_buffer_1 (buf, charpos, nchars, inherit);
1179 signal_after_change (opoint, 0, PT - opoint); 1183 signal_after_change (opoint, 0, PT - opoint);
1180 update_compositions (opoint, PT, CHECK_BORDER); 1184 update_compositions (opoint, PT, CHECK_BORDER);
1185
1186#ifdef HAVE_TREE_SITTER
1187 eassert (PT_BYTE >= BEG_BYTE);
1188 eassert (obyte >= BEG_BYTE);
1189 eassert (PT_BYTE >= obyte);
1190 treesit_record_change (obyte, obyte, PT_BYTE);
1191#endif
1181} 1192}
1182 1193
1183static void 1194static void
@@ -1305,12 +1316,6 @@ insert_from_buffer_1 (struct buffer *buf,
1305 /* Insert those intervals. */ 1316 /* Insert those intervals. */
1306 graft_intervals_into_buffer (intervals, PT, nchars, current_buffer, inherit); 1317 graft_intervals_into_buffer (intervals, PT, nchars, current_buffer, inherit);
1307 1318
1308#ifdef HAVE_TREE_SITTER
1309 eassert (outgoing_nbytes >= 0);
1310 eassert (PT_BYTE >= 0);
1311 treesit_record_change (PT_BYTE, PT_BYTE, PT_BYTE + outgoing_nbytes);
1312#endif
1313
1314 adjust_point (nchars, outgoing_nbytes); 1319 adjust_point (nchars, outgoing_nbytes);
1315} 1320}
1316 1321
diff --git a/src/xfaces.c b/src/xfaces.c
index 68f7cc493cc..35b79154805 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -6012,7 +6012,6 @@ realize_non_ascii_face (struct frame *f, Lisp_Object font_object,
6012 6012
6013 return face; 6013 return face;
6014} 6014}
6015#endif /* HAVE_WINDOW_SYSTEM */
6016 6015
6017/* Remove the attribute at INDEX from the font object if SYMBOL 6016/* Remove the attribute at INDEX from the font object if SYMBOL
6018 appears in `font-fallback-ignored-attributes'. */ 6017 appears in `font-fallback-ignored-attributes'. */
@@ -6031,6 +6030,7 @@ font_maybe_unset_attribute (Lisp_Object font_object,
6031 ASET (font_object, index, Qnil); 6030 ASET (font_object, index, Qnil);
6032 } 6031 }
6033} 6032}
6033#endif /* HAVE_WINDOW_SYSTEM */
6034 6034
6035/* Realize the fully-specified face with attributes ATTRS in face 6035/* Realize the fully-specified face with attributes ATTRS in face
6036 cache CACHE for ASCII characters. Do it for GUI frame CACHE->f. 6036 cache CACHE for ASCII characters. Do it for GUI frame CACHE->f.