diff options
| author | Yuan Fu | 2024-12-01 17:52:16 -0800 |
|---|---|---|
| committer | Yuan Fu | 2024-12-01 17:52:16 -0800 |
| commit | 4afd1eca3662eda052d0017f83b4baa1f6131e8b (patch) | |
| tree | 10c2a2f0d338b8fb330fbbc9b21f296271b73ee2 /src | |
| parent | 676ff9fd7c083598b2955a463774283768d8e209 (diff) | |
| parent | cf4f1387a6561be7cd7387b766df4386a0fa472f (diff) | |
| download | emacs-4afd1eca3662eda052d0017f83b4baa1f6131e8b.tar.gz emacs-4afd1eca3662eda052d0017f83b4baa1f6131e8b.zip | |
Merge from emacs-30
cf4f1387a65 ; Update tree-sitter manual
3c7687c1dd1 Allow passing nil to treesit-node-match-p (bug#74612)
748b19e56e8 Update to version 2.58 of librsvg API (bug#74606)
4c67f636c08 Fix decoding of non-ASCII email attachments
bd8a6f70fb9 Prevent "Selecting deleted buffer" error with dabbrev-expand
0a753603a53 ; (dictionary-search-interface): Fix bug#74511.
Diffstat (limited to 'src')
| -rw-r--r-- | src/image.c | 26 | ||||
| -rw-r--r-- | src/treesit.c | 5 |
2 files changed, 27 insertions, 4 deletions
diff --git a/src/image.c b/src/image.c index db7f6acd171..88b0f91413e 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -11706,7 +11706,11 @@ DEF_DLL_FN (void, rsvg_handle_get_dimensions, | |||
| 11706 | DEF_DLL_FN (gboolean, rsvg_handle_set_stylesheet, | 11706 | DEF_DLL_FN (gboolean, rsvg_handle_set_stylesheet, |
| 11707 | (RsvgHandle *, const guint8 *, gsize, GError **)); | 11707 | (RsvgHandle *, const guint8 *, gsize, GError **)); |
| 11708 | # endif | 11708 | # endif |
| 11709 | # if LIBRSVG_CHECK_VERSION (2, 58, 0) | ||
| 11710 | DEF_DLL_FN (GdkPixbuf *, rsvg_handle_get_pixbuf_and_error, (RsvgHandle *, GError **)); | ||
| 11711 | # else | ||
| 11709 | DEF_DLL_FN (GdkPixbuf *, rsvg_handle_get_pixbuf, (RsvgHandle *)); | 11712 | DEF_DLL_FN (GdkPixbuf *, rsvg_handle_get_pixbuf, (RsvgHandle *)); |
| 11713 | # endif | ||
| 11710 | DEF_DLL_FN (int, gdk_pixbuf_get_width, (const GdkPixbuf *)); | 11714 | DEF_DLL_FN (int, gdk_pixbuf_get_width, (const GdkPixbuf *)); |
| 11711 | DEF_DLL_FN (int, gdk_pixbuf_get_height, (const GdkPixbuf *)); | 11715 | DEF_DLL_FN (int, gdk_pixbuf_get_height, (const GdkPixbuf *)); |
| 11712 | DEF_DLL_FN (guchar *, gdk_pixbuf_get_pixels, (const GdkPixbuf *)); | 11716 | DEF_DLL_FN (guchar *, gdk_pixbuf_get_pixels, (const GdkPixbuf *)); |
| @@ -11765,8 +11769,11 @@ init_svg_functions (void) | |||
| 11765 | #if LIBRSVG_CHECK_VERSION (2, 48, 0) | 11769 | #if LIBRSVG_CHECK_VERSION (2, 48, 0) |
| 11766 | LOAD_DLL_FN (library, rsvg_handle_set_stylesheet); | 11770 | LOAD_DLL_FN (library, rsvg_handle_set_stylesheet); |
| 11767 | #endif | 11771 | #endif |
| 11772 | #if LIBRSVG_CHECK_VERSION (2, 58, 0) | ||
| 11773 | LOAD_DLL_FN (library, rsvg_handle_get_pixbuf_and_error); | ||
| 11774 | #else | ||
| 11768 | LOAD_DLL_FN (library, rsvg_handle_get_pixbuf); | 11775 | LOAD_DLL_FN (library, rsvg_handle_get_pixbuf); |
| 11769 | 11776 | #endif | |
| 11770 | LOAD_DLL_FN (gdklib, gdk_pixbuf_get_width); | 11777 | LOAD_DLL_FN (gdklib, gdk_pixbuf_get_width); |
| 11771 | LOAD_DLL_FN (gdklib, gdk_pixbuf_get_height); | 11778 | LOAD_DLL_FN (gdklib, gdk_pixbuf_get_height); |
| 11772 | LOAD_DLL_FN (gdklib, gdk_pixbuf_get_pixels); | 11779 | LOAD_DLL_FN (gdklib, gdk_pixbuf_get_pixels); |
| @@ -11811,7 +11818,11 @@ init_svg_functions (void) | |||
| 11811 | # if LIBRSVG_CHECK_VERSION (2, 48, 0) | 11818 | # if LIBRSVG_CHECK_VERSION (2, 48, 0) |
| 11812 | # undef rsvg_handle_set_stylesheet | 11819 | # undef rsvg_handle_set_stylesheet |
| 11813 | # endif | 11820 | # endif |
| 11814 | # undef rsvg_handle_get_pixbuf | 11821 | # if LIBRSVG_CHECK_VERSION (2, 58, 0) |
| 11822 | # undef rsvg_handle_get_pixbuf_and_error | ||
| 11823 | # else | ||
| 11824 | # undef rsvg_handle_get_pixbuf | ||
| 11825 | # endif | ||
| 11815 | # if LIBRSVG_CHECK_VERSION (2, 32, 0) | 11826 | # if LIBRSVG_CHECK_VERSION (2, 32, 0) |
| 11816 | # undef g_file_new_for_path | 11827 | # undef g_file_new_for_path |
| 11817 | # undef g_memory_input_stream_new_from_data | 11828 | # undef g_memory_input_stream_new_from_data |
| @@ -11852,7 +11863,11 @@ init_svg_functions (void) | |||
| 11852 | # if LIBRSVG_CHECK_VERSION (2, 48, 0) | 11863 | # if LIBRSVG_CHECK_VERSION (2, 48, 0) |
| 11853 | # define rsvg_handle_set_stylesheet fn_rsvg_handle_set_stylesheet | 11864 | # define rsvg_handle_set_stylesheet fn_rsvg_handle_set_stylesheet |
| 11854 | # endif | 11865 | # endif |
| 11855 | # define rsvg_handle_get_pixbuf fn_rsvg_handle_get_pixbuf | 11866 | # if LIBRSVG_CHECK_VERSION (2, 58, 0) |
| 11867 | # define rsvg_handle_get_pixbuf_and_error fn_rsvg_handle_get_pixbuf_and_error | ||
| 11868 | # else | ||
| 11869 | # define rsvg_handle_get_pixbuf fn_rsvg_handle_get_pixbuf | ||
| 11870 | # endif | ||
| 11856 | # if LIBRSVG_CHECK_VERSION (2, 32, 0) | 11871 | # if LIBRSVG_CHECK_VERSION (2, 32, 0) |
| 11857 | # define g_file_new_for_path fn_g_file_new_for_path | 11872 | # define g_file_new_for_path fn_g_file_new_for_path |
| 11858 | # define g_memory_input_stream_new_from_data \ | 11873 | # define g_memory_input_stream_new_from_data \ |
| @@ -12357,8 +12372,13 @@ svg_load_image (struct frame *f, struct image *img, char *contents, | |||
| 12357 | 12372 | ||
| 12358 | /* We can now get a valid pixel buffer from the svg file, if all | 12373 | /* We can now get a valid pixel buffer from the svg file, if all |
| 12359 | went ok. */ | 12374 | went ok. */ |
| 12375 | #if LIBRSVG_CHECK_VERSION (2, 58, 0) | ||
| 12376 | pixbuf = rsvg_handle_get_pixbuf_and_error (rsvg_handle, &err); | ||
| 12377 | if (err) goto rsvg_error; | ||
| 12378 | #else | ||
| 12360 | pixbuf = rsvg_handle_get_pixbuf (rsvg_handle); | 12379 | pixbuf = rsvg_handle_get_pixbuf (rsvg_handle); |
| 12361 | if (!pixbuf) goto rsvg_error; | 12380 | if (!pixbuf) goto rsvg_error; |
| 12381 | #endif | ||
| 12362 | g_object_unref (rsvg_handle); | 12382 | g_object_unref (rsvg_handle); |
| 12363 | xfree (wrapped_contents); | 12383 | xfree (wrapped_contents); |
| 12364 | 12384 | ||
diff --git a/src/treesit.c b/src/treesit.c index 5e1e9b01059..2372944e166 100644 --- a/src/treesit.c +++ b/src/treesit.c | |||
| @@ -4148,7 +4148,8 @@ PREDICATE can be a symbol representing a thing in | |||
| 4148 | `treesit-thing-settings', or a predicate, like regexp matching node | 4148 | `treesit-thing-settings', or a predicate, like regexp matching node |
| 4149 | type, etc. See `treesit-thing-settings' for more details. | 4149 | type, etc. See `treesit-thing-settings' for more details. |
| 4150 | 4150 | ||
| 4151 | Return non-nil if NODE matches PREDICATE, nil otherwise. | 4151 | Return non-nil if NODE matches PREDICATE, nil otherwise. If NODE is |
| 4152 | nil, return nil. | ||
| 4152 | 4153 | ||
| 4153 | Signals `treesit-invalid-predicate' if there's no definition of THING | 4154 | Signals `treesit-invalid-predicate' if there's no definition of THING |
| 4154 | in `treesit-thing-settings', or if PREDICATE is malformed. If | 4155 | in `treesit-thing-settings', or if PREDICATE is malformed. If |
| @@ -4156,6 +4157,8 @@ IGNORE-MISSING is non-nil, don't signal an error for missing THING | |||
| 4156 | definition, but still signal for malformed PREDICATE. */) | 4157 | definition, but still signal for malformed PREDICATE. */) |
| 4157 | (Lisp_Object node, Lisp_Object predicate, Lisp_Object ignore_missing) | 4158 | (Lisp_Object node, Lisp_Object predicate, Lisp_Object ignore_missing) |
| 4158 | { | 4159 | { |
| 4160 | if (NILP (node)) return Qnil; | ||
| 4161 | |||
| 4159 | CHECK_TS_NODE (node); | 4162 | CHECK_TS_NODE (node); |
| 4160 | 4163 | ||
| 4161 | Lisp_Object parser = XTS_NODE (node)->parser; | 4164 | Lisp_Object parser = XTS_NODE (node)->parser; |