diff options
| author | Eli Zaretskii | 2023-09-16 07:36:49 -0400 |
|---|---|---|
| committer | Eli Zaretskii | 2023-09-16 07:36:49 -0400 |
| commit | 302bc23f7cb9fbde7f225650d833e1c09da97338 (patch) | |
| tree | 127047d962b30405980589a95412338f513c1353 /src | |
| parent | f44c1969b6fae3651ca6cc5e077e5f6430a6b57b (diff) | |
| parent | 755ae813a6adf203d4a602a3e7fc0b9ed547be8c (diff) | |
| download | emacs-302bc23f7cb9fbde7f225650d833e1c09da97338.tar.gz emacs-302bc23f7cb9fbde7f225650d833e1c09da97338.zip | |
Merge from origin/emacs-29
755ae813a6a ; Declare some treesit.c functions in typescript-ts-mode.el.
89fa204b706 Fix loss of encrypted data in plstore.el
d9a1175a611 Close SQL database when corresponding 'sqlite-mode' buffe...
cbd8fac283a Fix Unicode normalization of characters
825be05b379 Support one-time passwords in Tramp
f880b94e649 Fix the 'C' and 'c' categories of characters
58fd212d8a2 Fix Emoji zooming commands
8970cdd009a ; Fix last change.
ba924be4522 ; * etc/DEBUG: Improve the redisplay section.
e110312ad95 ; * doc/lispref/minibuf.texi (Text from Minibuffer): Ment...
65f4810003b tsx-ts-mode--font-lock-compatibility-bb1f97b: Improve
6fe11b88ed0 Avoid using --display in emacsclient to reuse frames on PGTK
2fc7463c0e5 ; * INSTALL: Don't advertise -O3. (Bug#65988)
29055412f2d ; Fix doc string of 'lsh'
738d8543337 Support emacsclient on Windows with server on GNU or Unix...
f0a89fa1d0e ; * lisp/saveplace.el (save-place-ignore-files-regexp): F...
c9cb8ee0fc0 Fix defcustom in saveplace.el (Bug#65977)
5ec8be1d589 ; * lisp/subr.el (string-suffix-p, string-prefix-p): Doc ...
809305e6d8f Fix 'window-text-pixel-size' when there are several image...
ea14b0dcc20 : Doc fix.
01e8a0c6cbf Doc fix for prettify-symbols-unprettify-at-point
0065621d0d3 (report_overlay_modification): Fix bug#65929
6cc6455e931 Fix SVG colors (bug#56182)
9396d73942e * doc/emacs/text.texi (Outline Minor Mode): Add a note ab...
a65d1a5a167 Improve documentation of 'list-abbrevs'
5dcc4b7eab1 Tweak s-p-f for js-ts-mode
1fb2fb501f3 typescript-ts-mode, tsx-ts-mode: Fix syntax properties fo...
946b395e7e1 * lisp/progmodes/c-ts-mode.el (c++-ts-mode): Provide (bug...
33ee3e588fd Fix regression of treesit_cursor_helper_1
d11d81dfcc6 ; Fix doc typos (Bug#65868)
6554ec22465 Update docs for passing of Thien-Thi Nguyen
5ab2792d5c1 Update defvar usage tips example in manual
35d88c657e1 Document using Flymake together with Eglot
3f04efe9e7d ; * src/font.h (struct font): Comment about use of averag...
459b5f6b6d1 ; * admin/authors.el (authors-aliases): Update.
0c029ae8bcb ; tweak etc/TODO item
# Conflicts:
# admin/authors.el
# lisp/subr.el
Diffstat (limited to 'src')
| -rw-r--r-- | src/buffer.c | 2 | ||||
| -rw-r--r-- | src/font.h | 14 | ||||
| -rw-r--r-- | src/image.c | 12 | ||||
| -rw-r--r-- | src/treesit.c | 11 | ||||
| -rw-r--r-- | src/xdisp.c | 1 |
5 files changed, 32 insertions, 8 deletions
diff --git a/src/buffer.c b/src/buffer.c index 9facc4b7ab8..a7299f4a49e 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -4099,7 +4099,7 @@ report_overlay_modification (Lisp_Object start, Lisp_Object end, bool after, | |||
| 4099 | } | 4099 | } |
| 4100 | /* Test for intersecting intervals. This does the right thing | 4100 | /* Test for intersecting intervals. This does the right thing |
| 4101 | for both insertion and deletion. */ | 4101 | for both insertion and deletion. */ |
| 4102 | if (! insertion || (end_arg > obegin && begin_arg < oend)) | 4102 | if (end_arg > obegin && begin_arg < oend) |
| 4103 | { | 4103 | { |
| 4104 | Lisp_Object prop = Foverlay_get (overlay, Qmodification_hooks); | 4104 | Lisp_Object prop = Foverlay_get (overlay, Qmodification_hooks); |
| 4105 | if (!NILP (prop)) | 4105 | if (!NILP (prop)) |
diff --git a/src/font.h b/src/font.h index ff05ef7356e..9c9f7952560 100644 --- a/src/font.h +++ b/src/font.h | |||
| @@ -303,10 +303,16 @@ struct font | |||
| 303 | SPACE glyph, the value is 0. */ | 303 | SPACE glyph, the value is 0. */ |
| 304 | int space_width; | 304 | int space_width; |
| 305 | 305 | ||
| 306 | /* Average width of glyphs in the font. If the font itself doesn't | 306 | /* Average width of glyphs in the font. Should be the average width |
| 307 | have that information, but has glyphs of ASCII characters, the | 307 | of the glyphs of ASCII characters. The value for the default |
| 308 | value is the average width of those glyphs. Otherwise, the value | 308 | face's font is used to determine the canonical character width of |
| 309 | is 0. */ | 309 | the frame (see FRAME_COLUMN_WIDTH). For fonts that are not |
| 310 | fixed-pitch, the font backend should actually calculate the value | ||
| 311 | from the glyphs of ASCII characters in the range 32..126 | ||
| 312 | inclusively; relying on the average-width attribute recorded in | ||
| 313 | the font is unreliable in this case, especially in fonts that | ||
| 314 | support CJK scripts, where many characters are wide. Value can | ||
| 315 | be zero if the font doesn't have glyphs for ASCII characters. */ | ||
| 310 | int average_width; | 316 | int average_width; |
| 311 | 317 | ||
| 312 | /* Ascent and descent of the font (in pixels). */ | 318 | /* Ascent and descent of the font (in pixels). */ |
diff --git a/src/image.c b/src/image.c index a4b8d21cee6..84db9bfb3b8 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -12075,6 +12075,18 @@ svg_load_image (struct frame *f, struct image *img, char *contents, | |||
| 12075 | img->background_valid = 1; | 12075 | img->background_valid = 1; |
| 12076 | } | 12076 | } |
| 12077 | 12077 | ||
| 12078 | #if HAVE_NTGUI | ||
| 12079 | /* Windows stores the image colours in BGR format, and SVG expects | ||
| 12080 | them in RGB. */ | ||
| 12081 | foreground = (foreground & 0x0000FF) << 16 | ||
| 12082 | | (foreground & 0xFF0000) >> 16 | ||
| 12083 | | (foreground & 0x00FF00); | ||
| 12084 | |||
| 12085 | background = (background & 0x0000FF) << 16 | ||
| 12086 | | (background & 0xFF0000) >> 16 | ||
| 12087 | | (background & 0x00FF00); | ||
| 12088 | #endif | ||
| 12089 | |||
| 12078 | wrapped_contents = xmalloc (buffer_size); | 12090 | wrapped_contents = xmalloc (buffer_size); |
| 12079 | 12091 | ||
| 12080 | if (buffer_size <= snprintf (wrapped_contents, buffer_size, wrapper, | 12092 | if (buffer_size <= snprintf (wrapped_contents, buffer_size, wrapper, |
diff --git a/src/treesit.c b/src/treesit.c index 91d4616253d..69b59fca111 100644 --- a/src/treesit.c +++ b/src/treesit.c | |||
| @@ -2208,7 +2208,10 @@ return nil. */) | |||
| 2208 | static bool treesit_cursor_first_child_for_byte | 2208 | static bool treesit_cursor_first_child_for_byte |
| 2209 | (TSTreeCursor *cursor, ptrdiff_t pos, bool named) | 2209 | (TSTreeCursor *cursor, ptrdiff_t pos, bool named) |
| 2210 | { | 2210 | { |
| 2211 | if (!ts_tree_cursor_goto_first_child (cursor)) | 2211 | /* ts_tree_cursor_goto_first_child_for_byte is significantly faster, |
| 2212 | so despite it having problems, we try it first. */ | ||
| 2213 | if (ts_tree_cursor_goto_first_child_for_byte (cursor, pos) == -1 | ||
| 2214 | && !ts_tree_cursor_goto_first_child (cursor)) | ||
| 2212 | return false; | 2215 | return false; |
| 2213 | 2216 | ||
| 2214 | TSNode node = ts_tree_cursor_current_node (cursor); | 2217 | TSNode node = ts_tree_cursor_current_node (cursor); |
| @@ -3075,7 +3078,11 @@ treesit_cursor_helper_1 (TSTreeCursor *cursor, TSNode *target, | |||
| 3075 | if (ts_node_eq (cursor_node, *target)) | 3078 | if (ts_node_eq (cursor_node, *target)) |
| 3076 | return true; | 3079 | return true; |
| 3077 | 3080 | ||
| 3078 | if (ts_tree_cursor_goto_first_child_for_byte (cursor, start_pos) == -1) | 3081 | /* ts_tree_cursor_goto_first_child_for_byte is significantly faster, |
| 3082 | so despite it having problems (see bug#60127), we try it | ||
| 3083 | first. */ | ||
| 3084 | if (ts_tree_cursor_goto_first_child_for_byte (cursor, start_pos) == -1 | ||
| 3085 | && !ts_tree_cursor_goto_first_child (cursor)) | ||
| 3079 | return false; | 3086 | return false; |
| 3080 | 3087 | ||
| 3081 | /* Go through each sibling that could contain TARGET. Because of | 3088 | /* Go through each sibling that could contain TARGET. Because of |
diff --git a/src/xdisp.c b/src/xdisp.c index a9119788663..077245a7791 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -11448,7 +11448,6 @@ window_text_pixel_size (Lisp_Object window, Lisp_Object from, Lisp_Object to, | |||
| 11448 | else | 11448 | else |
| 11449 | move_it_in_display_line (&it, start, it1_x + 1, | 11449 | move_it_in_display_line (&it, start, it1_x + 1, |
| 11450 | MOVE_TO_POS | MOVE_TO_X); | 11450 | MOVE_TO_POS | MOVE_TO_X); |
| 11451 | move_it_to (&it, start - 1, -1, -1, -1, MOVE_TO_POS); | ||
| 11452 | start_x = it.current_x; | 11451 | start_x = it.current_x; |
| 11453 | /* If we didn't change our buffer position, the pixel | 11452 | /* If we didn't change our buffer position, the pixel |
| 11454 | width of what's here was not yet accounted for; do it | 11453 | width of what's here was not yet accounted for; do it |