aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPo Lu2024-07-24 11:41:58 +0800
committerPo Lu2024-07-24 11:41:58 +0800
commitdb40b65825f311aaa908f7c169ff6ad3ec5a40e6 (patch)
tree68b0a176342f33f7248a72168457c4e06e40201a /src
parenta793305d166939f26e6fb5418186bb11e65f0e0b (diff)
parent1ee8579eb7d7aae9405f33099559ac8205a59be2 (diff)
downloademacs-db40b65825f311aaa908f7c169ff6ad3ec5a40e6.tar.gz
emacs-db40b65825f311aaa908f7c169ff6ad3ec5a40e6.zip
Merge from savannah/emacs-30
1ee8579eb7d Fix bug#72255 05629d3af0a Delete redundant "a.k.a." in use-package.texi c7609464f70 Document (use-package 'emacs) declarations de9f9add138 Improve 'emacs-news-view-mode' menus and bindings 7588e1f8a9f ; * src/xdisp.c (Fformat_mode_line): Doc fix. 2074e94c3b1 Fix disappearing bar cursor on Hebrew text (bug#72230) 1aaadc8aec5 Fix DocView with DVI files c1382257aa8 ; Fix typo in use-package.texi caf7426f0ca FIx spurious fontification of variable in Java Mode 9b426e15abd Correctly typeset nil and t in texinfo f050b9c5033 Fix Tramp IPv6 handling in tests 46b192c04b1 Update to Org 9.7.8-5-gfdf0e0 87f41b937bc Fix Ftreesit_parser_create
Diffstat (limited to 'src')
-rw-r--r--src/image.c16
-rw-r--r--src/nsterm.m20
-rw-r--r--src/treesit.c4
-rw-r--r--src/xdisp.c2
4 files changed, 20 insertions, 22 deletions
diff --git a/src/image.c b/src/image.c
index 90e6312e128..94404c09895 100644
--- a/src/image.c
+++ b/src/image.c
@@ -1328,11 +1328,11 @@ struct image_type
1328 image type. Value is true if SPEC is valid. */ 1328 image type. Value is true if SPEC is valid. */
1329 bool (*valid_p) (Lisp_Object spec); 1329 bool (*valid_p) (Lisp_Object spec);
1330 1330
1331 /* Load IMG which is used on frame F from information contained in 1331 /* Load IMG which is to be used on frame F from information contained
1332 IMG->spec. Value is true if successful. */ 1332 in IMG->spec. Value is true if successful. */
1333 bool (*load_img) (struct frame *f, struct image *img); 1333 bool (*load_img) (struct frame *f, struct image *img);
1334 1334
1335 /* Free resources of image IMG which is used on frame F. */ 1335 /* Free such resources of image IMG as are used on frame F. */
1336 void (*free_img) (struct frame *f, struct image *img); 1336 void (*free_img) (struct frame *f, struct image *img);
1337 1337
1338#ifdef WINDOWSNT 1338#ifdef WINDOWSNT
@@ -4154,16 +4154,16 @@ image_destroy_x_image (Emacs_Pix_Container pimg)
4154 eassert (input_blocked_p ()); 4154 eassert (input_blocked_p ());
4155 if (pimg) 4155 if (pimg)
4156 { 4156 {
4157#ifdef USE_CAIRO 4157#if defined USE_CAIRO || defined HAVE_HAIKU || defined HAVE_NS
4158#endif /* USE_CAIRO */ 4158 /* On these systems, Emacs_Pix_Containers always point to the same
4159 data as pixmaps in `struct image', and therefore must never be
4160 freed separately. */
4161#endif /* USE_CAIRO || HAVE_HAIKU || HAVE_NS */
4159#ifdef HAVE_NTGUI 4162#ifdef HAVE_NTGUI
4160 /* Data will be freed by DestroyObject. */ 4163 /* Data will be freed by DestroyObject. */
4161 pimg->data = NULL; 4164 pimg->data = NULL;
4162 xfree (pimg); 4165 xfree (pimg);
4163#endif /* HAVE_NTGUI */ 4166#endif /* HAVE_NTGUI */
4164#ifdef HAVE_NS
4165 ns_release_object (pimg);
4166#endif /* HAVE_NS */
4167 } 4167 }
4168#endif 4168#endif
4169} 4169}
diff --git a/src/nsterm.m b/src/nsterm.m
index 794630de1c1..2aadada2df6 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -3026,7 +3026,7 @@ ns_draw_window_cursor (struct window *w, struct glyph_row *glyph_row,
3026 Note that CURSOR_WIDTH is meaningful only for (h)bar cursors. 3026 Note that CURSOR_WIDTH is meaningful only for (h)bar cursors.
3027 -------------------------------------------------------------------------- */ 3027 -------------------------------------------------------------------------- */
3028{ 3028{
3029 NSRect r, s; 3029 NSRect r;
3030 int fx, fy, h, cursor_height; 3030 int fx, fy, h, cursor_height;
3031 struct frame *f = WINDOW_XFRAME (w); 3031 struct frame *f = WINDOW_XFRAME (w);
3032 struct glyph *phys_cursor_glyph; 3032 struct glyph *phys_cursor_glyph;
@@ -3076,6 +3076,12 @@ ns_draw_window_cursor (struct window *w, struct glyph_row *glyph_row,
3076 /* The bar cursor should never be wider than the glyph. */ 3076 /* The bar cursor should never be wider than the glyph. */
3077 if (cursor_width < w->phys_cursor_width) 3077 if (cursor_width < w->phys_cursor_width)
3078 w->phys_cursor_width = cursor_width; 3078 w->phys_cursor_width = cursor_width;
3079
3080 /* If the character under cursor is R2L, draw the bar cursor
3081 on the right of its glyph, rather than on the left. */
3082 cursor_glyph = get_phys_cursor_glyph (w);
3083 if ((cursor_glyph->resolved_level & 1) != 0)
3084 fx += cursor_glyph->pixel_width - w->phys_cursor_width;
3079 } 3085 }
3080 /* If we have an HBAR, "cursor_width" MAY specify height. */ 3086 /* If we have an HBAR, "cursor_width" MAY specify height. */
3081 else if (cursor_type == HBAR_CURSOR) 3087 else if (cursor_type == HBAR_CURSOR)
@@ -3126,18 +3132,8 @@ ns_draw_window_cursor (struct window *w, struct glyph_row *glyph_row,
3126 [ctx restoreGraphicsState]; 3132 [ctx restoreGraphicsState];
3127 break; 3133 break;
3128 case HBAR_CURSOR: 3134 case HBAR_CURSOR:
3129 NSRectFill (r);
3130 [ctx restoreGraphicsState];
3131 break;
3132 case BAR_CURSOR: 3135 case BAR_CURSOR:
3133 s = r; 3136 NSRectFill (r);
3134 /* If the character under cursor is R2L, draw the bar cursor
3135 on the right of its glyph, rather than on the left. */
3136 cursor_glyph = get_phys_cursor_glyph (w);
3137 if ((cursor_glyph->resolved_level & 1) != 0)
3138 s.origin.x += cursor_glyph->pixel_width - s.size.width;
3139
3140 NSRectFill (s);
3141 [ctx restoreGraphicsState]; 3137 [ctx restoreGraphicsState];
3142 break; 3138 break;
3143 } 3139 }
diff --git a/src/treesit.c b/src/treesit.c
index baa1b8dfd11..45db71bb5fd 100644
--- a/src/treesit.c
+++ b/src/treesit.c
@@ -1457,7 +1457,9 @@ an indirect buffer. */)
1457 ts_parser_set_language (parser, lang); 1457 ts_parser_set_language (parser, lang);
1458 1458
1459 /* Create parser. */ 1459 /* Create parser. */
1460 Lisp_Object lisp_parser = make_treesit_parser (Fcurrent_buffer (), 1460 Lisp_Object lisp_buf;
1461 XSETBUFFER (lisp_buf, buf);
1462 Lisp_Object lisp_parser = make_treesit_parser (lisp_buf,
1461 parser, NULL, 1463 parser, NULL,
1462 language, tag); 1464 language, tag);
1463 1465
diff --git a/src/xdisp.c b/src/xdisp.c
index 4185e368c96..45317cc9f5d 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -28160,7 +28160,7 @@ store_mode_line_string (const char *string, Lisp_Object lisp_string,
28160 28160
28161DEFUN ("format-mode-line", Fformat_mode_line, Sformat_mode_line, 28161DEFUN ("format-mode-line", Fformat_mode_line, Sformat_mode_line,
28162 1, 4, 0, 28162 1, 4, 0,
28163 doc: /* Format a string out of a mode line format specification. 28163 doc: /* Return a string formatted according to mode-line format specification.
28164First arg FORMAT specifies the mode line format (see `mode-line-format' 28164First arg FORMAT specifies the mode line format (see `mode-line-format'
28165for details) to use. 28165for details) to use.
28166 28166