diff options
| author | Stefan Monnier | 2014-09-22 15:20:45 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2014-09-22 15:20:45 -0400 |
| commit | 9949231fb06aa4a2dfa536e9d5125a81424db3a7 (patch) | |
| tree | a2259e8489127b8685097a20a3fd3d7be222d9fe /src | |
| parent | 298dfce8ac018aca6f8f1a38d7199cc28bfaf7fd (diff) | |
| parent | fc5ebc3f497a152132407d57a14cce147d59d29c (diff) | |
| download | emacs-9949231fb06aa4a2dfa536e9d5125a81424db3a7.tar.gz emacs-9949231fb06aa4a2dfa536e9d5125a81424db3a7.zip | |
Merge from emacs-24
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 230 | ||||
| -rw-r--r-- | src/dispextern.h | 4 | ||||
| -rw-r--r-- | src/eval.c | 60 | ||||
| -rw-r--r-- | src/frame.c | 13 | ||||
| -rw-r--r-- | src/image.c | 6 | ||||
| -rw-r--r-- | src/lisp.h | 3 | ||||
| -rw-r--r-- | src/macfont.m | 31 | ||||
| -rw-r--r-- | src/unexmacosx.c | 4 | ||||
| -rw-r--r-- | src/w32term.c | 13 | ||||
| -rw-r--r-- | src/xdisp.c | 62 | ||||
| -rw-r--r-- | src/xterm.c | 20 |
11 files changed, 293 insertions, 153 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 5aad2f91834..09426cfbf99 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,75 @@ | |||
| 1 | 2014-09-22 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 2 | |||
| 3 | On OSX, do not free font-specific data more than once (Bug#18501). | ||
| 4 | * macfont.m (macfont_close): Release and free font-specific data | ||
| 5 | only if it wasn't previously freed. | ||
| 6 | |||
| 7 | 2014-09-22 David Caldwell <david@porkrind.org> (tiny change) | ||
| 8 | |||
| 9 | * unexmacosx.c (dump_it): Improve error message. | ||
| 10 | |||
| 11 | 2014-09-22 Juri Linkov <juri@jurta.org> | ||
| 12 | |||
| 13 | * image.c (imagemagick_load_image): Add delay to imagemagick metadata. | ||
| 14 | (Bug#10747, bug#18334) | ||
| 15 | |||
| 16 | 2014-09-22 Eli Zaretskii <eliz@gnu.org> | ||
| 17 | |||
| 18 | * frame.c (Fmouse_position, Fset_mouse_position): Clarify the | ||
| 19 | units in which the position is measured. (Bug#18493) | ||
| 20 | |||
| 21 | * xdisp.c (redisplay_internal): Force redisplay of all windows | ||
| 22 | that show a buffer whose narrowing has changed. (Bug#18490) | ||
| 23 | |||
| 24 | 2014-09-22 Eli Zaretskii <eliz@gnu.org> | ||
| 25 | |||
| 26 | * xterm.c (x_draw_hollow_cursor, x_draw_bar_cursor): | ||
| 27 | * w32term.c (x_draw_hollow_cursor, x_draw_bar_cursor): In R2L | ||
| 28 | lines, draw the hollow-box and hbar cursors on the right side of | ||
| 29 | cursor-glyph. Thanks to martin rudalics <rudalics@gmx.at> for | ||
| 30 | testing on X. | ||
| 31 | |||
| 32 | * xterm.c (x_draw_stretch_glyph_string): | ||
| 33 | * w32term.c (x_draw_stretch_glyph_string): Fix a thinko that | ||
| 34 | caused the block cursor to disappear on a TAB in R2L lines in | ||
| 35 | every window except the leftmost one. Reported by Martin Rudalics | ||
| 36 | <rudalics@gmx.at>. | ||
| 37 | |||
| 38 | 2014-09-22 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 39 | |||
| 40 | Always use matched specpdl entry to record call arguments (Bug#18473). | ||
| 41 | * lisp.h (record_in_backtrace): Adjust prototype. | ||
| 42 | * eval.c (record_in_backtrace): Return current specpdl level. | ||
| 43 | (set_backtrace_args, set_backtrace_nargs): Merge. Adjust all users. | ||
| 44 | (eval_sub, Ffuncall): Record call arguments in matched specpdl | ||
| 45 | entry and use that entry in call to backtrace_debug_on_exit. | ||
| 46 | (apply_lambda): Likewise. Get current specpdl level as 3rd arg. | ||
| 47 | (do_debug_on_call): Get current specpdl level as 2nd arg. | ||
| 48 | |||
| 49 | Prefer ptrdiff_t to int and avoid integer overflows. | ||
| 50 | * fileio.c (make_temp_name): | ||
| 51 | * font.c (font_parse_family_registry): Avoid integer | ||
| 52 | overflow on string size calculation. | ||
| 53 | * data.c (Faset): Likewise for byte index. | ||
| 54 | |||
| 55 | 2014-09-22 Eli Zaretskii <eliz@gnu.org> | ||
| 56 | |||
| 57 | Fix display of R2L lines in partial-width windows. | ||
| 58 | * xdisp.c (init_iterator): Don't use it->bidi_p before it is | ||
| 59 | assigned the correct value. | ||
| 60 | (extend_face_to_end_of_line): Account for truncation and | ||
| 61 | continuation glyphs in R2L rows when one of the fringes is not | ||
| 62 | displayed. | ||
| 63 | (display_line): Don't assign negative X offset to a row if we are | ||
| 64 | going to produce a truncation glyph for it. When handling | ||
| 65 | truncated R2L rows, consider the width of the left fringe instead | ||
| 66 | of the right one. | ||
| 67 | (produce_special_glyphs): Fix bogus assignments. | ||
| 68 | |||
| 69 | 2014-09-22 Eli Zaretskii <eliz@gnu.org> | ||
| 70 | |||
| 71 | * w32.c (fcntl): Support O_NONBLOCK fcntl on the write side of pipes. | ||
| 72 | |||
| 1 | 2014-09-22 Eli Zaretskii <eliz@gnu.org> | 73 | 2014-09-22 Eli Zaretskii <eliz@gnu.org> |
| 2 | 74 | ||
| 3 | * fileio.c (Fexpand_file_name) [DOS_NT]: Make sure newdirlim is | 75 | * fileio.c (Fexpand_file_name) [DOS_NT]: Make sure newdirlim is |
| @@ -103,17 +175,17 @@ | |||
| 103 | file names properly displayed. | 175 | file names properly displayed. |
| 104 | (do_play_sound) [WINDOWSNT]: Use Unicode APIs to play sound files | 176 | (do_play_sound) [WINDOWSNT]: Use Unicode APIs to play sound files |
| 105 | when w32-unicode-filenames is non-nil, but not on Windows 9X, | 177 | when w32-unicode-filenames is non-nil, but not on Windows 9X, |
| 106 | where these APIs are not available even in UNICOWS.DLL. Improve | 178 | where these APIs are not available even in UNICOWS.DLL. |
| 107 | the format of error messages and include the file name in them | 179 | Improve the format of error messages and include the file name in them |
| 108 | where appropriate. | 180 | where appropriate. |
| 109 | (Fplay_sound_internal) [WINDOWSNT]: Make the MS-Windows branch | 181 | (Fplay_sound_internal) [WINDOWSNT]: Make the MS-Windows branch |
| 110 | call play-sound-functions, per documentation. | 182 | call play-sound-functions, per documentation. |
| 111 | 183 | ||
| 112 | * w32.c (w32_get_long_filename, w32_get_short_filename): Constify | 184 | * w32.c (w32_get_long_filename, w32_get_short_filename): |
| 113 | the input file name arguments. | 185 | Constify the input file name arguments. |
| 114 | 186 | ||
| 115 | * w32.h (w32_get_long_filename, w32_get_short_filename): Update | 187 | * w32.h (w32_get_long_filename, w32_get_short_filename): |
| 116 | prototypes. | 188 | Update prototypes. |
| 117 | 189 | ||
| 118 | 2014-09-15 Dmitry Antipov <dmantipov@yandex.ru> | 190 | 2014-09-15 Dmitry Antipov <dmantipov@yandex.ru> |
| 119 | 191 | ||
| @@ -220,8 +292,8 @@ | |||
| 220 | * lread.c (readevalloop_eager_expand_eval): Add GCPRO and fix | 292 | * lread.c (readevalloop_eager_expand_eval): Add GCPRO and fix |
| 221 | bootstrap broken if GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE. | 293 | bootstrap broken if GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE. |
| 222 | 294 | ||
| 223 | Remove redundant GCPROs around Ffuncall and Fapply calls. This | 295 | Remove redundant GCPROs around Ffuncall and Fapply calls. |
| 224 | is safe because Ffuncall protects all of its arguments by itself. | 296 | This is safe because Ffuncall protects all of its arguments by itself. |
| 225 | * charset.c (map_charset_for_dump): Remove redundant GCPRO. | 297 | * charset.c (map_charset_for_dump): Remove redundant GCPRO. |
| 226 | * eval.c (Fapply, apply1, call0, call1, call2, call3, call4, call5) | 298 | * eval.c (Fapply, apply1, call0, call1, call2, call3, call4, call5) |
| 227 | (call6, call7): Likewise. Use compound literals where applicable. | 299 | (call6, call7): Likewise. Use compound literals where applicable. |
| @@ -511,8 +583,8 @@ | |||
| 511 | 2014-09-03 Martin Rudalics <rudalics@gmx.at> | 583 | 2014-09-03 Martin Rudalics <rudalics@gmx.at> |
| 512 | 584 | ||
| 513 | * buffer.c (scroll-bar-height): Fix typo in doc-string. | 585 | * buffer.c (scroll-bar-height): Fix typo in doc-string. |
| 514 | * frame.c (Vdefault_frame_horizontal_scroll_bars): Remove | 586 | * frame.c (Vdefault_frame_horizontal_scroll_bars): |
| 515 | variable. | 587 | Remove variable. |
| 516 | * nsfns.m (Fx_create_frame): | 588 | * nsfns.m (Fx_create_frame): |
| 517 | * w32fns.c (Fx_create_frame): | 589 | * w32fns.c (Fx_create_frame): |
| 518 | * xfns.c (Fx_create_frame): Default horizontal scroll bars to | 590 | * xfns.c (Fx_create_frame): Default horizontal scroll bars to |
| @@ -750,8 +822,8 @@ | |||
| 750 | 822 | ||
| 751 | 2014-08-28 Martin Rudalics <rudalics@gmx.at> | 823 | 2014-08-28 Martin Rudalics <rudalics@gmx.at> |
| 752 | 824 | ||
| 753 | * w32term.c (w32_horizontal_scroll_bar_handle_click): In | 825 | * w32term.c (w32_horizontal_scroll_bar_handle_click): |
| 754 | `event->y' return entire range (the size of the scroll bar minus | 826 | In `event->y' return entire range (the size of the scroll bar minus |
| 755 | that of the thumb). | 827 | that of the thumb). |
| 756 | * xterm.c (xm_scroll_callback, xaw_jump_callback): In `whole' | 828 | * xterm.c (xm_scroll_callback, xaw_jump_callback): In `whole' |
| 757 | return entire range (the scaled size of the scroll bar minus | 829 | return entire range (the scaled size of the scroll bar minus |
| @@ -771,8 +843,8 @@ | |||
| 771 | 843 | ||
| 772 | * xdisp.c (display_line): Don't assume that the call to | 844 | * xdisp.c (display_line): Don't assume that the call to |
| 773 | reseat_at_next_visible_line_start ends up at a character | 845 | reseat_at_next_visible_line_start ends up at a character |
| 774 | immediately following the newline on the previous line. Avoids | 846 | immediately following the newline on the previous line. |
| 775 | setting the ends_at_zv_p flag on screen lines that are not at or | 847 | Avoids setting the ends_at_zv_p flag on screen lines that are not at or |
| 776 | beyond ZV, which causes infloop in redisplay. For the details, see | 848 | beyond ZV, which causes infloop in redisplay. For the details, see |
| 777 | http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00368.html. | 849 | http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00368.html. |
| 778 | 850 | ||
| @@ -796,8 +868,8 @@ | |||
| 796 | (newlocale, wcscoll_l): Define substitutes for platforms that | 868 | (newlocale, wcscoll_l): Define substitutes for platforms that |
| 797 | lack them, so as to simplify the mainline code. | 869 | lack them, so as to simplify the mainline code. |
| 798 | (str_collate): Simplify the code by assuming the above definitions. | 870 | (str_collate): Simplify the code by assuming the above definitions. |
| 799 | Use wcscoll_l, not uselocale, as uselocale is too fragile. For | 871 | Use wcscoll_l, not uselocale, as uselocale is too fragile. |
| 800 | example, the old version left the Emacs in the wrong locale if | 872 | For example, the old version left the Emacs in the wrong locale if |
| 801 | wcscoll reported an error. Use 'int', not ptrdiff_t, for the int | 873 | wcscoll reported an error. Use 'int', not ptrdiff_t, for the int |
| 802 | result. Report an error if newlocale fails. | 874 | result. Report an error if newlocale fails. |
| 803 | 875 | ||
| @@ -1016,8 +1088,8 @@ | |||
| 1016 | * term.c (OUTPUT, tty_set_terminal_modes) | 1088 | * term.c (OUTPUT, tty_set_terminal_modes) |
| 1017 | (tty_set_terminal_window, tty_set_scroll_region) | 1089 | (tty_set_terminal_window, tty_set_scroll_region) |
| 1018 | (tty_clear_to_end, tty_write_glyphs, tty_write_glyphs_with_face) | 1090 | (tty_clear_to_end, tty_write_glyphs, tty_write_glyphs_with_face) |
| 1019 | (tty_ins_del_lines, tty_menu_display, tty_menu_activate): Use | 1091 | (tty_ins_del_lines, tty_menu_display, tty_menu_activate): |
| 1020 | FRAME_TOTAL_LINES instead of FRAME_LINES. | 1092 | Use FRAME_TOTAL_LINES instead of FRAME_LINES. |
| 1021 | (Fresume_tty): Use FRAME_TOTAL_LINES instead of FRAME_LINES. | 1093 | (Fresume_tty): Use FRAME_TOTAL_LINES instead of FRAME_LINES. |
| 1022 | Call change_frame_size with frame's menu bar lines subtracted | 1094 | Call change_frame_size with frame's menu bar lines subtracted |
| 1023 | from height. | 1095 | from height. |
| @@ -1068,14 +1140,14 @@ | |||
| 1068 | 1140 | ||
| 1069 | 2014-08-04 Martin Rudalics <rudalics@gmx.at> | 1141 | 2014-08-04 Martin Rudalics <rudalics@gmx.at> |
| 1070 | 1142 | ||
| 1071 | * frame.h (FRAME_HAS_HORIZONTAL_SCROLL_BARS): Condition | 1143 | * frame.h (FRAME_HAS_HORIZONTAL_SCROLL_BARS): |
| 1072 | correctly according to toolkit used. | 1144 | Condition correctly according to toolkit used. |
| 1073 | * frame.c (make_initial_frame, make_terminal_frame) | 1145 | * frame.c (make_initial_frame, make_terminal_frame) |
| 1074 | (x_set_horizontal_scroll_bars, x_set_scroll_bar_height) | 1146 | (x_set_horizontal_scroll_bars, x_set_scroll_bar_height) |
| 1075 | (Vdefault_frame_horizontal_scroll_bars): Correctly condition | 1147 | (Vdefault_frame_horizontal_scroll_bars): Correctly condition |
| 1076 | assignments according to presence of toolkit scrollbars. | 1148 | assignments according to presence of toolkit scrollbars. |
| 1077 | * window.h (WINDOW_HAS_HORIZONTAL_SCROLL_BAR): Condition | 1149 | * window.h (WINDOW_HAS_HORIZONTAL_SCROLL_BAR): |
| 1078 | correctly according to toolkit used. | 1150 | Condition correctly according to toolkit used. |
| 1079 | * window.c (set_window_scroll_bars): Set horizontal scroll bar | 1151 | * window.c (set_window_scroll_bars): Set horizontal scroll bar |
| 1080 | only if toolkit supports it. | 1152 | only if toolkit supports it. |
| 1081 | * w32term.c (w32_redeem_scroll_bar): Always redeem scroll bar if | 1153 | * w32term.c (w32_redeem_scroll_bar): Always redeem scroll bar if |
| @@ -1331,15 +1403,15 @@ | |||
| 1331 | (x_set_scroll_bar_height): Add external declarations. | 1403 | (x_set_scroll_bar_height): Add external declarations. |
| 1332 | * frame.c: (frame_inhibit_resize, frame_windows_min_size) | 1404 | * frame.c: (frame_inhibit_resize, frame_windows_min_size) |
| 1333 | (adjust_frame_size): New functions. | 1405 | (adjust_frame_size): New functions. |
| 1334 | (make_frame): Initial horizontal_scroll_bars field. Use | 1406 | (make_frame): Initial horizontal_scroll_bars field. |
| 1335 | SET_FRAME_LINES. Don't allow horizontal scroll bar in | 1407 | Use SET_FRAME_LINES. Don't allow horizontal scroll bar in |
| 1336 | minibuffer window. | 1408 | minibuffer window. |
| 1337 | (make_initial_frame, make_terminal_frame): No horizontal scroll | 1409 | (make_initial_frame, make_terminal_frame): No horizontal scroll |
| 1338 | bar in initial and terminal frames. Use adjust_frame_size. | 1410 | bar in initial and terminal frames. Use adjust_frame_size. |
| 1339 | (Fframe_total_cols): Fix doc-string. | 1411 | (Fframe_total_cols): Fix doc-string. |
| 1340 | (Fframe_total_lines, Fscroll_bar_height): New Lisp functions. | 1412 | (Fframe_total_lines, Fscroll_bar_height): New Lisp functions. |
| 1341 | (Fset_frame_height, Fset_frame_width, Fset_frame_size): Rewrite | 1413 | (Fset_frame_height, Fset_frame_width, Fset_frame_size): |
| 1342 | using adjust_frame_size. | 1414 | Rewrite using adjust_frame_size. |
| 1343 | (Qscroll_bar_height, Qhorizontal_scroll_bars) | 1415 | (Qscroll_bar_height, Qhorizontal_scroll_bars) |
| 1344 | (Qframe_windows_min_size): New symbols. | 1416 | (Qframe_windows_min_size): New symbols. |
| 1345 | (x_set_frame_parameters): Remove call of check_frame_size. | 1417 | (x_set_frame_parameters): Remove call of check_frame_size. |
| @@ -1350,8 +1422,8 @@ | |||
| 1350 | (x_set_internal_border_width, x_set_vertical_scroll_bars) | 1422 | (x_set_internal_border_width, x_set_vertical_scroll_bars) |
| 1351 | (x_set_scroll_bar_width, x_set_right_divider_width) | 1423 | (x_set_scroll_bar_width, x_set_right_divider_width) |
| 1352 | (x_set_bottom_divider_width): Rewrite using adjust_frame_size. | 1424 | (x_set_bottom_divider_width): Rewrite using adjust_frame_size. |
| 1353 | (x_set_horizontal_scroll_bars, x_set_scroll_bar_height): New | 1425 | (x_set_horizontal_scroll_bars, x_set_scroll_bar_height): |
| 1354 | functions. | 1426 | New functions. |
| 1355 | (x_figure_window_size): Rewrite to make frame display the | 1427 | (x_figure_window_size): Rewrite to make frame display the |
| 1356 | expected number of lines. | 1428 | expected number of lines. |
| 1357 | (Vdefault_frame_scroll_bars): Rewrite doc-string. | 1429 | (Vdefault_frame_scroll_bars): Rewrite doc-string. |
| @@ -1398,8 +1470,8 @@ | |||
| 1398 | compute_fringe_widths. | 1470 | compute_fringe_widths. |
| 1399 | * term.c (Fresume_tty): When changing the size of a tty frame do | 1471 | * term.c (Fresume_tty): When changing the size of a tty frame do |
| 1400 | not pass height of menu bar. | 1472 | not pass height of menu bar. |
| 1401 | (clear_tty_hooks, set_tty_hooks): Clear | 1473 | (clear_tty_hooks, set_tty_hooks): |
| 1402 | horizontal_scroll_bar_hook. | 1474 | Clear horizontal_scroll_bar_hook. |
| 1403 | (init_tty): Frame has no horizontal scroll bars. | 1475 | (init_tty): Frame has no horizontal scroll bars. |
| 1404 | * termhooks.h (enum scroll_bar_part): Add scroll_bar_move_ratio, | 1476 | * termhooks.h (enum scroll_bar_part): Add scroll_bar_move_ratio, |
| 1405 | scroll_bar_before_handle, scroll_bar_horizontal_handle, | 1477 | scroll_bar_before_handle, scroll_bar_horizontal_handle, |
| @@ -1408,25 +1480,25 @@ | |||
| 1408 | scroll_bar_to_rightmost entries. | 1480 | scroll_bar_to_rightmost entries. |
| 1409 | (enum event_kind): Add HORIZONTAL_SCROLL_BAR_CLICK_EVENT | 1481 | (enum event_kind): Add HORIZONTAL_SCROLL_BAR_CLICK_EVENT |
| 1410 | (struct terminal): Add set_horizontal_scroll_bar_hook. | 1482 | (struct terminal): Add set_horizontal_scroll_bar_hook. |
| 1411 | * w32console.c (initialize_w32_display): Clear | 1483 | * w32console.c (initialize_w32_display): |
| 1412 | horizontal_scroll_bar_hook. | 1484 | Clear horizontal_scroll_bar_hook. |
| 1413 | * w32fns.c (x_set_mouse_color): Use FRAME_W32_DISPLAY instead of | 1485 | * w32fns.c (x_set_mouse_color): Use FRAME_W32_DISPLAY instead of |
| 1414 | FRAME_X_DISPLAY. | 1486 | FRAME_X_DISPLAY. |
| 1415 | (x_clear_under_internal_border, x_set_internal_border_width): | 1487 | (x_clear_under_internal_border, x_set_internal_border_width): |
| 1416 | New functions. | 1488 | New functions. |
| 1417 | (x_set_menu_bar_lines): Rewrite using frame_inhibit_resize. Set | 1489 | (x_set_menu_bar_lines): Rewrite using frame_inhibit_resize. |
| 1418 | windows_or_buffers_changed when adding the menu bar. | 1490 | Set windows_or_buffers_changed when adding the menu bar. |
| 1419 | (x_set_tool_bar_lines): Rewrite using adjust_frame_size. | 1491 | (x_set_tool_bar_lines): Rewrite using adjust_frame_size. |
| 1420 | (x_change_tool_bar_height, x_set_scroll_bar_default_height) | 1492 | (x_change_tool_bar_height, x_set_scroll_bar_default_height) |
| 1421 | (w32_createhscrollbar): New functions. | 1493 | (w32_createhscrollbar): New functions. |
| 1422 | (w32_createscrollbar): Rename to w32_createvscrollbar. | 1494 | (w32_createscrollbar): Rename to w32_createvscrollbar. |
| 1423 | (w32_createwindow): Init WND_HSCROLLBAR_INDEX. | 1495 | (w32_createwindow): Init WND_HSCROLLBAR_INDEX. |
| 1424 | (w32_name_of_message): Replace WM_EMACS_CREATESCROLLBAR by | 1496 | (w32_name_of_message): Replace WM_EMACS_CREATESCROLLBAR by |
| 1425 | WM_EMACS_CREATEVSCROLLBAR and WM_EMACS_CREATEHSCROLLBAR. Add | 1497 | WM_EMACS_CREATEVSCROLLBAR and WM_EMACS_CREATEHSCROLLBAR. |
| 1426 | WM_EMACS_SHOWCURSOR. | 1498 | Add WM_EMACS_SHOWCURSOR. |
| 1427 | (w32_wnd_proc): Handle WM_HSCROLL case. In WM_WINDOWPOSCHANGING | 1499 | (w32_wnd_proc): Handle WM_HSCROLL case. In WM_WINDOWPOSCHANGING |
| 1428 | case do not artificially impose WM size hints. Handle | 1500 | case do not artificially impose WM size hints. |
| 1429 | WM_EMACS_SHOWCURSOR case. Replace WM_EMACS_CREATESCROLLBAR case | 1501 | Handle WM_EMACS_SHOWCURSOR case. Replace WM_EMACS_CREATESCROLLBAR case |
| 1430 | by WM_EMACS_CREATEVSCROLLBAR and WM_EMACS_CREATEHSCROLLBAR | 1502 | by WM_EMACS_CREATEVSCROLLBAR and WM_EMACS_CREATEHSCROLLBAR |
| 1431 | cases. | 1503 | cases. |
| 1432 | (my_create_tip_window): Replace WND_SCROLLBAR_INDEX by | 1504 | (my_create_tip_window): Replace WND_SCROLLBAR_INDEX by |
| @@ -1445,8 +1517,8 @@ | |||
| 1445 | pass height of menu bar to change_frame_size. | 1517 | pass height of menu bar to change_frame_size. |
| 1446 | * w32menu.c (set_frame_menubar): Rewrite using | 1518 | * w32menu.c (set_frame_menubar): Rewrite using |
| 1447 | frame_inhibit_resize. | 1519 | frame_inhibit_resize. |
| 1448 | * w32term.h (struct w32_display_info): Add | 1520 | * w32term.h (struct w32_display_info): |
| 1449 | horizontal_scroll_bar_cursor and cursor_display_counter. | 1521 | Add horizontal_scroll_bar_cursor and cursor_display_counter. |
| 1450 | (struct scroll_bar): Add horizontal. | 1522 | (struct scroll_bar): Add horizontal. |
| 1451 | (HORIZONTAL_SCROLL_BAR_INSIDE_HEIGHT) | 1523 | (HORIZONTAL_SCROLL_BAR_INSIDE_HEIGHT) |
| 1452 | (HORIZONTAL_SCROLL_BAR_LEFT_RANGE) | 1524 | (HORIZONTAL_SCROLL_BAR_LEFT_RANGE) |
| @@ -1456,8 +1528,8 @@ | |||
| 1456 | (HORIZONTAL_SCROLL_BAR_TOP_BORDER) | 1528 | (HORIZONTAL_SCROLL_BAR_TOP_BORDER) |
| 1457 | (HORIZONTAL_SCROLL_BAR_BOTTOM_BORDER) | 1529 | (HORIZONTAL_SCROLL_BAR_BOTTOM_BORDER) |
| 1458 | (HORIZONTAL_SCROLL_BAR_MIN_HANDLE): New macros. | 1530 | (HORIZONTAL_SCROLL_BAR_MIN_HANDLE): New macros. |
| 1459 | (WM_EMACS_CREATEVSCROLLBAR, WM_EMACS_CREATEHSCROLLBAR): Define | 1531 | (WM_EMACS_CREATEVSCROLLBAR, WM_EMACS_CREATEHSCROLLBAR): |
| 1460 | instead of WM_EMACS_CREATESCROLLBAR. | 1532 | Define instead of WM_EMACS_CREATESCROLLBAR. |
| 1461 | (WND_VSCROLLBAR_INDEX, WND_HSCROLLBAR_INDEX): Define instead of | 1533 | (WND_VSCROLLBAR_INDEX, WND_HSCROLLBAR_INDEX): Define instead of |
| 1462 | WND_SCROLLBAR_INDEX. | 1534 | WND_SCROLLBAR_INDEX. |
| 1463 | * w32term.c (horizontal_scroll_bar_min_handle) | 1535 | * w32term.c (horizontal_scroll_bar_min_handle) |
| @@ -1476,18 +1548,18 @@ | |||
| 1476 | scrollbar cases. | 1548 | scrollbar cases. |
| 1477 | (my_create_scrollbar): Replace with two new functions | 1549 | (my_create_scrollbar): Replace with two new functions |
| 1478 | my_create_vscrollbar and my_create_hscrollbar. | 1550 | my_create_vscrollbar and my_create_hscrollbar. |
| 1479 | (x_scroll_bar_create): New argument "horizontal". Update | 1551 | (x_scroll_bar_create): New argument "horizontal". |
| 1480 | callers accordingly. | 1552 | Update callers accordingly. |
| 1481 | (x_scroll_bar_remove, w32_condemn_scroll_bars) | 1553 | (x_scroll_bar_remove, w32_condemn_scroll_bars) |
| 1482 | (w32_redeem_scroll_bar, x_scroll_bar_clear): Handle horizontal | 1554 | (w32_redeem_scroll_bar, x_scroll_bar_clear): Handle horizontal |
| 1483 | scroll bar case. | 1555 | scroll bar case. |
| 1484 | (w32_read_socket): Handle WM_HSCROLL cae. | 1556 | (w32_read_socket): Handle WM_HSCROLL cae. |
| 1485 | (x_new_font): Don't recompute fringe widths. Use | 1557 | (x_new_font): Don't recompute fringe widths. |
| 1486 | frame_inhibit_resize. Calculate new menu bar height iff we | 1558 | Use frame_inhibit_resize. Calculate new menu bar height iff we |
| 1487 | build without toolkit. Always clear under internal border. | 1559 | build without toolkit. Always clear under internal border. |
| 1488 | (x_set_window_size): Don't check frame size or recompute | 1560 | (x_set_window_size): Don't check frame size or recompute |
| 1489 | fringes. Reset fullscreen status before applying sizes. Always | 1561 | fringes. Reset fullscreen status before applying sizes. |
| 1490 | resize as requested by pixelwise argument. Don't call | 1562 | Always resize as requested by pixelwise argument. Don't call |
| 1491 | do_pending_window_change. | 1563 | do_pending_window_change. |
| 1492 | (x_wm_set_size_hint): Add call for FRAME_SCROLL_BAR_AREA_HEIGHT. | 1564 | (x_wm_set_size_hint): Add call for FRAME_SCROLL_BAR_AREA_HEIGHT. |
| 1493 | (w32_initialize_display_info): Initialize dpyinfo's | 1565 | (w32_initialize_display_info): Initialize dpyinfo's |
| @@ -1513,8 +1585,8 @@ | |||
| 1513 | (WINDOW_TOPMOST_P, WINDOW_HAS_HORIZONTAL_SCROLL_BAR) | 1585 | (WINDOW_TOPMOST_P, WINDOW_HAS_HORIZONTAL_SCROLL_BAR) |
| 1514 | (WINDOW_CONFIG_SCROLL_BAR_HEIGHT) | 1586 | (WINDOW_CONFIG_SCROLL_BAR_HEIGHT) |
| 1515 | (WINDOW_CONFIG_SCROLL_BAR_LINES) | 1587 | (WINDOW_CONFIG_SCROLL_BAR_LINES) |
| 1516 | (WINDOW_SCROLL_BAR_LINES, WINDOW_SCROLL_BAR_AREA_HEIGHT): New | 1588 | (WINDOW_SCROLL_BAR_LINES, WINDOW_SCROLL_BAR_AREA_HEIGHT): |
| 1517 | macros. | 1589 | New macros. |
| 1518 | (WINDOW_LEFT_FRINGE_COLS, WINDOW_RIGHT_FRINGE_COLS) | 1590 | (WINDOW_LEFT_FRINGE_COLS, WINDOW_RIGHT_FRINGE_COLS) |
| 1519 | (WINDOW_FRINGE_COLS, WINDOW_FRINGE_EXTENDED_P): Remove macros. | 1591 | (WINDOW_FRINGE_COLS, WINDOW_FRINGE_EXTENDED_P): Remove macros. |
| 1520 | (WINDOW_VERTICAL_SCROLL_BAR_TYPE) | 1592 | (WINDOW_VERTICAL_SCROLL_BAR_TYPE) |
| @@ -1527,11 +1599,11 @@ | |||
| 1527 | (Fwindow_old_point, sanitize_window_sizes): New functions. | 1599 | (Fwindow_old_point, sanitize_window_sizes): New functions. |
| 1528 | (Qwindow_sanitize_window_sizes): New symbol. | 1600 | (Qwindow_sanitize_window_sizes): New symbol. |
| 1529 | (window_body_height): Count in horizontal scroll bar. | 1601 | (window_body_height): Count in horizontal scroll bar. |
| 1530 | (set_window_hscroll, Fscroll_left, Fscroll_right): Set | 1602 | (set_window_hscroll, Fscroll_left, Fscroll_right): |
| 1531 | suspend_auto_hscroll slot. | 1603 | Set suspend_auto_hscroll slot. |
| 1532 | (Fwindow_inside_edges): Count fringes pixelwise. | 1604 | (Fwindow_inside_edges): Count fringes pixelwise. |
| 1533 | (coordinates_in_window, Fcoordinates_in_window_p): Consider | 1605 | (coordinates_in_window, Fcoordinates_in_window_p): |
| 1534 | horizontal scroll bar. | 1606 | Consider horizontal scroll bar. |
| 1535 | (check_frame_size, adjust_window_margins): Remove functions and | 1607 | (check_frame_size, adjust_window_margins): Remove functions and |
| 1536 | corresponding calls. | 1608 | corresponding calls. |
| 1537 | (set_window_buffer): Initialize old_pointm and horizontal scroll | 1609 | (set_window_buffer): Initialize old_pointm and horizontal scroll |
| @@ -1547,8 +1619,8 @@ | |||
| 1547 | (Fsplit_window_internal): Inherit horizontal scroll bar type and | 1619 | (Fsplit_window_internal): Inherit horizontal scroll bar type and |
| 1548 | height. | 1620 | height. |
| 1549 | (Fdelete_window_internal): Unchain old_pointm marker. | 1621 | (Fdelete_window_internal): Unchain old_pointm marker. |
| 1550 | (window_scroll_pixel_based, Fscroll_other_window): Adjust | 1622 | (window_scroll_pixel_based, Fscroll_other_window): |
| 1551 | old_pointm. | 1623 | Adjust old_pointm. |
| 1552 | (Fwindow_text_width, Fwindow_text_height): New argument | 1624 | (Fwindow_text_width, Fwindow_text_height): New argument |
| 1553 | "pixelwise". | 1625 | "pixelwise". |
| 1554 | (struct saved_window): New fields, old_pointm, hscroll_whole, | 1626 | (struct saved_window): New fields, old_pointm, hscroll_whole, |
| @@ -1603,10 +1675,10 @@ | |||
| 1603 | (x_frame_parm_handlers): Add x_set_scroll_bar_height, | 1675 | (x_frame_parm_handlers): Add x_set_scroll_bar_height, |
| 1604 | x_set_horizontal_scroll_bars, x_set_left_fringe, | 1676 | x_set_horizontal_scroll_bars, x_set_left_fringe, |
| 1605 | x_set_right_fringe. | 1677 | x_set_right_fringe. |
| 1606 | * xmenu.c (update_frame_menubar, free_frame_menubar): Use | 1678 | * xmenu.c (update_frame_menubar, free_frame_menubar): |
| 1607 | adjust_frame_size. | 1679 | Use adjust_frame_size. |
| 1608 | * xterm.h (struct x_display_info): Add | 1680 | * xterm.h (struct x_display_info): |
| 1609 | horizontal_scroll_bar_cursor and Xatom_Horizontal_Scrollbar | 1681 | Add horizontal_scroll_bar_cursor and Xatom_Horizontal_Scrollbar |
| 1610 | slots. | 1682 | slots. |
| 1611 | (struct scroll_bar): Add horizontal slot. | 1683 | (struct scroll_bar): Add horizontal slot. |
| 1612 | (HORIZONTAL_SCROLL_BAR_INSIDE_HEIGHT) | 1684 | (HORIZONTAL_SCROLL_BAR_INSIDE_HEIGHT) |
| @@ -1629,15 +1701,15 @@ | |||
| 1629 | (x_set_toolkit_horizontal_scroll_bar_thumb) | 1701 | (x_set_toolkit_horizontal_scroll_bar_thumb) |
| 1630 | (XTset_horizontal_scroll_bar, x_net_wm_state) | 1702 | (XTset_horizontal_scroll_bar, x_net_wm_state) |
| 1631 | (x_horizontal_scroll_bar_report_motion): New functions. | 1703 | (x_horizontal_scroll_bar_report_motion): New functions. |
| 1632 | (xg_scroll_callback, x_scroll_bar_handle_click): Handle | 1704 | (xg_scroll_callback, x_scroll_bar_handle_click): |
| 1633 | horizontal scroll bars. | 1705 | Handle horizontal scroll bars. |
| 1634 | (SCROLL_BAR_HORIZONTAL_NAME): Define. | 1706 | (SCROLL_BAR_HORIZONTAL_NAME): Define. |
| 1635 | (XTset_vertical_scroll_bar): Attempt to clear areas not covered | 1707 | (XTset_vertical_scroll_bar): Attempt to clear areas not covered |
| 1636 | by scroll bar. | 1708 | by scroll bar. |
| 1637 | (XTcondemn_scroll_bars, XTredeem_scroll_bar): Rewrite. Handle | 1709 | (XTcondemn_scroll_bars, XTredeem_scroll_bar): Rewrite. |
| 1638 | horizontal scroll bars. | 1710 | Handle horizontal scroll bars. |
| 1639 | (handle_one_xevent): Handle horizontal scroll bar events. Call | 1711 | (handle_one_xevent): Handle horizontal scroll bar events. |
| 1640 | x_net_wm_state. | 1712 | Call x_net_wm_state. |
| 1641 | (x_set_window_size_1, x_wm_set_size_hint): Don't call | 1713 | (x_set_window_size_1, x_wm_set_size_hint): Don't call |
| 1642 | check_frame_size. | 1714 | check_frame_size. |
| 1643 | (x_set_window_size): Don't call check_frame_size and | 1715 | (x_set_window_size): Don't call check_frame_size and |
| @@ -1687,8 +1759,8 @@ | |||
| 1687 | 1759 | ||
| 1688 | 2014-07-25 Eli Zaretskii <eliz@gnu.org> | 1760 | 2014-07-25 Eli Zaretskii <eliz@gnu.org> |
| 1689 | 1761 | ||
| 1690 | * w32term.h (current_popup_menu, menubar_in_use): Move | 1762 | * w32term.h (current_popup_menu, menubar_in_use): |
| 1691 | declarations from w32term.c. | 1763 | Move declarations from w32term.c. |
| 1692 | 1764 | ||
| 1693 | 2014-07-25 Martin Rudalics <rudalics@gmx.at> | 1765 | 2014-07-25 Martin Rudalics <rudalics@gmx.at> |
| 1694 | 1766 | ||
| @@ -1742,8 +1814,8 @@ | |||
| 1742 | * xterm.c (handle_one_xevent): | 1814 | * xterm.c (handle_one_xevent): |
| 1743 | * gtkutil.c (xg_event_is_for_menubar): | 1815 | * gtkutil.c (xg_event_is_for_menubar): |
| 1744 | * xfns.c (x_window) [USE_X_TOOLKIT]: | 1816 | * xfns.c (x_window) [USE_X_TOOLKIT]: |
| 1745 | * xmenu.c (set_frame_menubar, free_frame_menubar): Prefer | 1817 | * xmenu.c (set_frame_menubar, free_frame_menubar): |
| 1746 | to use FRAME_MENUBAR_HEIGHT. | 1818 | Prefer to use FRAME_MENUBAR_HEIGHT. |
| 1747 | 1819 | ||
| 1748 | 2014-07-21 Dmitry Antipov <dmantipov@yandex.ru> | 1820 | 2014-07-21 Dmitry Antipov <dmantipov@yandex.ru> |
| 1749 | 1821 | ||
| @@ -1764,12 +1836,12 @@ | |||
| 1764 | 1836 | ||
| 1765 | 2014-07-21 Eli Zaretskii <eliz@gnu.org> | 1837 | 2014-07-21 Eli Zaretskii <eliz@gnu.org> |
| 1766 | 1838 | ||
| 1767 | * w32select.c (setup_windows_coding_system): Apply | 1839 | * w32select.c (setup_windows_coding_system): |
| 1768 | CODING_ANNOTATION_MASK to the common_flags member of struct | 1840 | Apply CODING_ANNOTATION_MASK to the common_flags member of struct |
| 1769 | coding_system. Reported by martin rudalics <rudalics@gmx.at>. | 1841 | coding_system. Reported by martin rudalics <rudalics@gmx.at>. |
| 1770 | 1842 | ||
| 1771 | * w16select.c (Fw16_get_clipboard_data): Apply | 1843 | * w16select.c (Fw16_get_clipboard_data): |
| 1772 | CODING_ANNOTATION_MASK to the common_flags member of struct | 1844 | Apply CODING_ANNOTATION_MASK to the common_flags member of struct |
| 1773 | coding_system. | 1845 | coding_system. |
| 1774 | 1846 | ||
| 1775 | * xdisp.c (init_iterator): Initialize it->stop_charpos to the | 1847 | * xdisp.c (init_iterator): Initialize it->stop_charpos to the |
| @@ -1777,8 +1849,8 @@ | |||
| 1777 | (handle_invisible_prop): Record in it->stop_charpos the position | 1849 | (handle_invisible_prop): Record in it->stop_charpos the position |
| 1778 | where the invisible text ends. (Bug#18035) | 1850 | where the invisible text ends. (Bug#18035) |
| 1779 | (hscroll_window_tree): Don't try hscrolling windows whose cursor | 1851 | (hscroll_window_tree): Don't try hscrolling windows whose cursor |
| 1780 | row has zero buffer position as their start position. Reported by | 1852 | row has zero buffer position as their start position. |
| 1781 | martin rudalics <rudalics@gmx.at>. | 1853 | Reported by martin rudalics <rudalics@gmx.at>. |
| 1782 | 1854 | ||
| 1783 | * xdisp.c (move_it_vertically_backward, move_it_by_lines): Prevent | 1855 | * xdisp.c (move_it_vertically_backward, move_it_by_lines): Prevent |
| 1784 | infinite looping in redisplay when display lines don't have enough | 1856 | infinite looping in redisplay when display lines don't have enough |
| @@ -2218,8 +2290,8 @@ | |||
| 2218 | are in sync with what the window wants. | 2290 | are in sync with what the window wants. |
| 2219 | (Bug#17892) | 2291 | (Bug#17892) |
| 2220 | 2292 | ||
| 2221 | * xdisp.c (display_line, display_mode_line): Call | 2293 | * xdisp.c (display_line, display_mode_line): |
| 2222 | prepare_desired_row with additional arguments, as appropriate. | 2294 | Call prepare_desired_row with additional arguments, as appropriate. |
| 2223 | 2295 | ||
| 2224 | * dispextern.h (prepare_desired_row): Adjust prototype. | 2296 | * dispextern.h (prepare_desired_row): Adjust prototype. |
| 2225 | 2297 | ||
| @@ -2308,7 +2380,7 @@ | |||
| 2308 | 2380 | ||
| 2309 | 2014-06-28 K. Handa <handa@gnu.org> | 2381 | 2014-06-28 K. Handa <handa@gnu.org> |
| 2310 | 2382 | ||
| 2311 | * coding.c (MAX_CHARBUF_SIZE): Renamed from CHARBUF_SIZE. | 2383 | * coding.c (MAX_CHARBUF_SIZE): Rename from CHARBUF_SIZE. |
| 2312 | (MIN_CHARBUF_SIZE): New macro. | 2384 | (MIN_CHARBUF_SIZE): New macro. |
| 2313 | (ALLOC_CONVERSION_WORK_AREA): New arg SIZE. Callers changed. | 2385 | (ALLOC_CONVERSION_WORK_AREA): New arg SIZE. Callers changed. |
| 2314 | 2386 | ||
diff --git a/src/dispextern.h b/src/dispextern.h index ebd4260d408..99396b1deef 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -2523,7 +2523,9 @@ struct it | |||
| 2523 | 2523 | ||
| 2524 | /* First and last visible x-position in the display area. If window | 2524 | /* First and last visible x-position in the display area. If window |
| 2525 | is hscrolled by n columns, first_visible_x == n * FRAME_COLUMN_WIDTH | 2525 | is hscrolled by n columns, first_visible_x == n * FRAME_COLUMN_WIDTH |
| 2526 | (f), and last_visible_x == pixel width of W + first_visible_x. */ | 2526 | (f), and last_visible_x == pixel width of W + first_visible_x. |
| 2527 | When truncation or continuation glyphs are produced due to lack of | ||
| 2528 | fringes, last_visible_x excludes the space required for these glyphs. */ | ||
| 2527 | int first_visible_x, last_visible_x; | 2529 | int first_visible_x, last_visible_x; |
| 2528 | 2530 | ||
| 2529 | /* Last visible y-position + 1 in the display area without a mode | 2531 | /* Last visible y-position + 1 in the display area without a mode |
diff --git a/src/eval.c b/src/eval.c index 5f54c105444..77b1db95397 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -104,7 +104,7 @@ union specbinding *backtrace_next (union specbinding *) EXTERNALLY_VISIBLE; | |||
| 104 | union specbinding *backtrace_top (void) EXTERNALLY_VISIBLE; | 104 | union specbinding *backtrace_top (void) EXTERNALLY_VISIBLE; |
| 105 | 105 | ||
| 106 | static Lisp_Object funcall_lambda (Lisp_Object, ptrdiff_t, Lisp_Object *); | 106 | static Lisp_Object funcall_lambda (Lisp_Object, ptrdiff_t, Lisp_Object *); |
| 107 | static Lisp_Object apply_lambda (Lisp_Object fun, Lisp_Object args); | 107 | static Lisp_Object apply_lambda (Lisp_Object, Lisp_Object, ptrdiff_t); |
| 108 | 108 | ||
| 109 | static Lisp_Object | 109 | static Lisp_Object |
| 110 | specpdl_symbol (union specbinding *pdl) | 110 | specpdl_symbol (union specbinding *pdl) |
| @@ -172,17 +172,11 @@ backtrace_debug_on_exit (union specbinding *pdl) | |||
| 172 | /* Functions to modify slots of backtrace records. */ | 172 | /* Functions to modify slots of backtrace records. */ |
| 173 | 173 | ||
| 174 | static void | 174 | static void |
| 175 | set_backtrace_args (union specbinding *pdl, Lisp_Object *args) | 175 | set_backtrace_args (union specbinding *pdl, Lisp_Object *args, ptrdiff_t nargs) |
| 176 | { | 176 | { |
| 177 | eassert (pdl->kind == SPECPDL_BACKTRACE); | 177 | eassert (pdl->kind == SPECPDL_BACKTRACE); |
| 178 | pdl->bt.args = args; | 178 | pdl->bt.args = args; |
| 179 | } | 179 | pdl->bt.nargs = nargs; |
| 180 | |||
| 181 | static void | ||
| 182 | set_backtrace_nargs (union specbinding *pdl, ptrdiff_t n) | ||
| 183 | { | ||
| 184 | eassert (pdl->kind == SPECPDL_BACKTRACE); | ||
| 185 | pdl->bt.nargs = n; | ||
| 186 | } | 180 | } |
| 187 | 181 | ||
| 188 | static void | 182 | static void |
| @@ -334,10 +328,10 @@ call_debugger (Lisp_Object arg) | |||
| 334 | } | 328 | } |
| 335 | 329 | ||
| 336 | static void | 330 | static void |
| 337 | do_debug_on_call (Lisp_Object code) | 331 | do_debug_on_call (Lisp_Object code, ptrdiff_t count) |
| 338 | { | 332 | { |
| 339 | debug_on_next_call = 0; | 333 | debug_on_next_call = 0; |
| 340 | set_backtrace_debug_on_exit (specpdl_ptr - 1, true); | 334 | set_backtrace_debug_on_exit (specpdl + count, true); |
| 341 | call_debugger (list1 (code)); | 335 | call_debugger (list1 (code)); |
| 342 | } | 336 | } |
| 343 | 337 | ||
| @@ -2035,9 +2029,11 @@ grow_specpdl (void) | |||
| 2035 | } | 2029 | } |
| 2036 | } | 2030 | } |
| 2037 | 2031 | ||
| 2038 | void | 2032 | ptrdiff_t |
| 2039 | record_in_backtrace (Lisp_Object function, Lisp_Object *args, ptrdiff_t nargs) | 2033 | record_in_backtrace (Lisp_Object function, Lisp_Object *args, ptrdiff_t nargs) |
| 2040 | { | 2034 | { |
| 2035 | ptrdiff_t count = SPECPDL_INDEX (); | ||
| 2036 | |||
| 2041 | eassert (nargs >= UNEVALLED); | 2037 | eassert (nargs >= UNEVALLED); |
| 2042 | specpdl_ptr->bt.kind = SPECPDL_BACKTRACE; | 2038 | specpdl_ptr->bt.kind = SPECPDL_BACKTRACE; |
| 2043 | specpdl_ptr->bt.debug_on_exit = false; | 2039 | specpdl_ptr->bt.debug_on_exit = false; |
| @@ -2045,6 +2041,8 @@ record_in_backtrace (Lisp_Object function, Lisp_Object *args, ptrdiff_t nargs) | |||
| 2045 | specpdl_ptr->bt.args = args; | 2041 | specpdl_ptr->bt.args = args; |
| 2046 | specpdl_ptr->bt.nargs = nargs; | 2042 | specpdl_ptr->bt.nargs = nargs; |
| 2047 | grow_specpdl (); | 2043 | grow_specpdl (); |
| 2044 | |||
| 2045 | return count; | ||
| 2048 | } | 2046 | } |
| 2049 | 2047 | ||
| 2050 | /* Eval a sub-expression of the current expression (i.e. in the same | 2048 | /* Eval a sub-expression of the current expression (i.e. in the same |
| @@ -2055,6 +2053,7 @@ eval_sub (Lisp_Object form) | |||
| 2055 | Lisp_Object fun, val, original_fun, original_args; | 2053 | Lisp_Object fun, val, original_fun, original_args; |
| 2056 | Lisp_Object funcar; | 2054 | Lisp_Object funcar; |
| 2057 | struct gcpro gcpro1, gcpro2, gcpro3; | 2055 | struct gcpro gcpro1, gcpro2, gcpro3; |
| 2056 | ptrdiff_t count; | ||
| 2058 | 2057 | ||
| 2059 | if (SYMBOLP (form)) | 2058 | if (SYMBOLP (form)) |
| 2060 | { | 2059 | { |
| @@ -2092,10 +2091,10 @@ eval_sub (Lisp_Object form) | |||
| 2092 | original_args = XCDR (form); | 2091 | original_args = XCDR (form); |
| 2093 | 2092 | ||
| 2094 | /* This also protects them from gc. */ | 2093 | /* This also protects them from gc. */ |
| 2095 | record_in_backtrace (original_fun, &original_args, UNEVALLED); | 2094 | count = record_in_backtrace (original_fun, &original_args, UNEVALLED); |
| 2096 | 2095 | ||
| 2097 | if (debug_on_next_call) | 2096 | if (debug_on_next_call) |
| 2098 | do_debug_on_call (Qt); | 2097 | do_debug_on_call (Qt, count); |
| 2099 | 2098 | ||
| 2100 | /* At this point, only original_fun and original_args | 2099 | /* At this point, only original_fun and original_args |
| 2101 | have values that will be used below. */ | 2100 | have values that will be used below. */ |
| @@ -2147,8 +2146,7 @@ eval_sub (Lisp_Object form) | |||
| 2147 | gcpro3.nvars = argnum; | 2146 | gcpro3.nvars = argnum; |
| 2148 | } | 2147 | } |
| 2149 | 2148 | ||
| 2150 | set_backtrace_args (specpdl_ptr - 1, vals); | 2149 | set_backtrace_args (specpdl + count, vals, XINT (numargs)); |
| 2151 | set_backtrace_nargs (specpdl_ptr - 1, XINT (numargs)); | ||
| 2152 | 2150 | ||
| 2153 | val = (XSUBR (fun)->function.aMANY) (XINT (numargs), vals); | 2151 | val = (XSUBR (fun)->function.aMANY) (XINT (numargs), vals); |
| 2154 | UNGCPRO; | 2152 | UNGCPRO; |
| @@ -2169,8 +2167,7 @@ eval_sub (Lisp_Object form) | |||
| 2169 | 2167 | ||
| 2170 | UNGCPRO; | 2168 | UNGCPRO; |
| 2171 | 2169 | ||
| 2172 | set_backtrace_args (specpdl_ptr - 1, argvals); | 2170 | set_backtrace_args (specpdl + count, argvals, XINT (numargs)); |
| 2173 | set_backtrace_nargs (specpdl_ptr - 1, XINT (numargs)); | ||
| 2174 | 2171 | ||
| 2175 | switch (i) | 2172 | switch (i) |
| 2176 | { | 2173 | { |
| @@ -2223,7 +2220,7 @@ eval_sub (Lisp_Object form) | |||
| 2223 | } | 2220 | } |
| 2224 | } | 2221 | } |
| 2225 | else if (COMPILEDP (fun)) | 2222 | else if (COMPILEDP (fun)) |
| 2226 | val = apply_lambda (fun, original_args); | 2223 | val = apply_lambda (fun, original_args, count); |
| 2227 | else | 2224 | else |
| 2228 | { | 2225 | { |
| 2229 | if (NILP (fun)) | 2226 | if (NILP (fun)) |
| @@ -2240,7 +2237,7 @@ eval_sub (Lisp_Object form) | |||
| 2240 | } | 2237 | } |
| 2241 | if (EQ (funcar, Qmacro)) | 2238 | if (EQ (funcar, Qmacro)) |
| 2242 | { | 2239 | { |
| 2243 | ptrdiff_t count = SPECPDL_INDEX (); | 2240 | ptrdiff_t count1 = SPECPDL_INDEX (); |
| 2244 | Lisp_Object exp; | 2241 | Lisp_Object exp; |
| 2245 | /* Bind lexical-binding during expansion of the macro, so the | 2242 | /* Bind lexical-binding during expansion of the macro, so the |
| 2246 | macro can know reliably if the code it outputs will be | 2243 | macro can know reliably if the code it outputs will be |
| @@ -2248,19 +2245,19 @@ eval_sub (Lisp_Object form) | |||
| 2248 | specbind (Qlexical_binding, | 2245 | specbind (Qlexical_binding, |
| 2249 | NILP (Vinternal_interpreter_environment) ? Qnil : Qt); | 2246 | NILP (Vinternal_interpreter_environment) ? Qnil : Qt); |
| 2250 | exp = apply1 (Fcdr (fun), original_args); | 2247 | exp = apply1 (Fcdr (fun), original_args); |
| 2251 | unbind_to (count, Qnil); | 2248 | unbind_to (count1, Qnil); |
| 2252 | val = eval_sub (exp); | 2249 | val = eval_sub (exp); |
| 2253 | } | 2250 | } |
| 2254 | else if (EQ (funcar, Qlambda) | 2251 | else if (EQ (funcar, Qlambda) |
| 2255 | || EQ (funcar, Qclosure)) | 2252 | || EQ (funcar, Qclosure)) |
| 2256 | val = apply_lambda (fun, original_args); | 2253 | val = apply_lambda (fun, original_args, count); |
| 2257 | else | 2254 | else |
| 2258 | xsignal1 (Qinvalid_function, original_fun); | 2255 | xsignal1 (Qinvalid_function, original_fun); |
| 2259 | } | 2256 | } |
| 2260 | check_cons_list (); | 2257 | check_cons_list (); |
| 2261 | 2258 | ||
| 2262 | lisp_eval_depth--; | 2259 | lisp_eval_depth--; |
| 2263 | if (backtrace_debug_on_exit (specpdl_ptr - 1)) | 2260 | if (backtrace_debug_on_exit (specpdl + count)) |
| 2264 | val = call_debugger (list2 (Qexit, val)); | 2261 | val = call_debugger (list2 (Qexit, val)); |
| 2265 | specpdl_ptr--; | 2262 | specpdl_ptr--; |
| 2266 | 2263 | ||
| @@ -2657,7 +2654,7 @@ usage: (funcall FUNCTION &rest ARGUMENTS) */) | |||
| 2657 | Lisp_Object lisp_numargs; | 2654 | Lisp_Object lisp_numargs; |
| 2658 | Lisp_Object val; | 2655 | Lisp_Object val; |
| 2659 | register Lisp_Object *internal_args; | 2656 | register Lisp_Object *internal_args; |
| 2660 | ptrdiff_t i; | 2657 | ptrdiff_t i, count; |
| 2661 | 2658 | ||
| 2662 | QUIT; | 2659 | QUIT; |
| 2663 | 2660 | ||
| @@ -2670,13 +2667,13 @@ usage: (funcall FUNCTION &rest ARGUMENTS) */) | |||
| 2670 | } | 2667 | } |
| 2671 | 2668 | ||
| 2672 | /* This also GCPROs them. */ | 2669 | /* This also GCPROs them. */ |
| 2673 | record_in_backtrace (args[0], &args[1], nargs - 1); | 2670 | count = record_in_backtrace (args[0], &args[1], nargs - 1); |
| 2674 | 2671 | ||
| 2675 | /* Call GC after setting up the backtrace, so the latter GCPROs the args. */ | 2672 | /* Call GC after setting up the backtrace, so the latter GCPROs the args. */ |
| 2676 | maybe_gc (); | 2673 | maybe_gc (); |
| 2677 | 2674 | ||
| 2678 | if (debug_on_next_call) | 2675 | if (debug_on_next_call) |
| 2679 | do_debug_on_call (Qlambda); | 2676 | do_debug_on_call (Qlambda, count); |
| 2680 | 2677 | ||
| 2681 | check_cons_list (); | 2678 | check_cons_list (); |
| 2682 | 2679 | ||
| @@ -2796,14 +2793,14 @@ usage: (funcall FUNCTION &rest ARGUMENTS) */) | |||
| 2796 | } | 2793 | } |
| 2797 | check_cons_list (); | 2794 | check_cons_list (); |
| 2798 | lisp_eval_depth--; | 2795 | lisp_eval_depth--; |
| 2799 | if (backtrace_debug_on_exit (specpdl_ptr - 1)) | 2796 | if (backtrace_debug_on_exit (specpdl + count)) |
| 2800 | val = call_debugger (list2 (Qexit, val)); | 2797 | val = call_debugger (list2 (Qexit, val)); |
| 2801 | specpdl_ptr--; | 2798 | specpdl_ptr--; |
| 2802 | return val; | 2799 | return val; |
| 2803 | } | 2800 | } |
| 2804 | 2801 | ||
| 2805 | static Lisp_Object | 2802 | static Lisp_Object |
| 2806 | apply_lambda (Lisp_Object fun, Lisp_Object args) | 2803 | apply_lambda (Lisp_Object fun, Lisp_Object args, ptrdiff_t count) |
| 2807 | { | 2804 | { |
| 2808 | Lisp_Object args_left; | 2805 | Lisp_Object args_left; |
| 2809 | ptrdiff_t i; | 2806 | ptrdiff_t i; |
| @@ -2830,15 +2827,14 @@ apply_lambda (Lisp_Object fun, Lisp_Object args) | |||
| 2830 | 2827 | ||
| 2831 | UNGCPRO; | 2828 | UNGCPRO; |
| 2832 | 2829 | ||
| 2833 | set_backtrace_args (specpdl_ptr - 1, arg_vector); | 2830 | set_backtrace_args (specpdl + count, arg_vector, i); |
| 2834 | set_backtrace_nargs (specpdl_ptr - 1, i); | ||
| 2835 | tem = funcall_lambda (fun, numargs, arg_vector); | 2831 | tem = funcall_lambda (fun, numargs, arg_vector); |
| 2836 | 2832 | ||
| 2837 | /* Do the debug-on-exit now, while arg_vector still exists. */ | 2833 | /* Do the debug-on-exit now, while arg_vector still exists. */ |
| 2838 | if (backtrace_debug_on_exit (specpdl_ptr - 1)) | 2834 | if (backtrace_debug_on_exit (specpdl + count)) |
| 2839 | { | 2835 | { |
| 2840 | /* Don't do it again when we return to eval. */ | 2836 | /* Don't do it again when we return to eval. */ |
| 2841 | set_backtrace_debug_on_exit (specpdl_ptr - 1, false); | 2837 | set_backtrace_debug_on_exit (specpdl + count, false); |
| 2842 | tem = call_debugger (list2 (Qexit, tem)); | 2838 | tem = call_debugger (list2 (Qexit, tem)); |
| 2843 | } | 2839 | } |
| 2844 | SAFE_FREE (); | 2840 | SAFE_FREE (); |
diff --git a/src/frame.c b/src/frame.c index 67993a627e7..d56b11d962c 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -1806,9 +1806,9 @@ The functions are run with one argument, the frame to be deleted. */) | |||
| 1806 | 1806 | ||
| 1807 | DEFUN ("mouse-position", Fmouse_position, Smouse_position, 0, 0, 0, | 1807 | DEFUN ("mouse-position", Fmouse_position, Smouse_position, 0, 0, 0, |
| 1808 | doc: /* Return a list (FRAME X . Y) giving the current mouse frame and position. | 1808 | doc: /* Return a list (FRAME X . Y) giving the current mouse frame and position. |
| 1809 | The position is given in character cells, where (0, 0) is the | 1809 | The position is given in canonical character cells, where (0, 0) is the |
| 1810 | upper-left corner of the frame, X is the horizontal offset, and Y is | 1810 | upper-left corner of the frame, X is the horizontal offset, and Y is the |
| 1811 | the vertical offset. | 1811 | vertical offset, measured in units of the frame's default character size. |
| 1812 | If Emacs is running on a mouseless terminal or hasn't been programmed | 1812 | If Emacs is running on a mouseless terminal or hasn't been programmed |
| 1813 | to read the mouse position, it returns the selected frame for FRAME | 1813 | to read the mouse position, it returns the selected frame for FRAME |
| 1814 | and nil for X and Y. | 1814 | and nil for X and Y. |
| @@ -1927,9 +1927,10 @@ Coordinates are relative to the frame, not a window, | |||
| 1927 | so the coordinates of the top left character in the frame | 1927 | so the coordinates of the top left character in the frame |
| 1928 | may be nonzero due to left-hand scroll bars or the menu bar. | 1928 | may be nonzero due to left-hand scroll bars or the menu bar. |
| 1929 | 1929 | ||
| 1930 | The position is given in character cells, where (0, 0) is the | 1930 | The position is given in canonical character cells, where (0, 0) is |
| 1931 | upper-left corner of the frame, X is the horizontal offset, and Y is | 1931 | the upper-left corner of the frame, X is the horizontal offset, and |
| 1932 | the vertical offset. | 1932 | Y is the vertical offset, measured in units of the frame's default |
| 1933 | character size. | ||
| 1933 | 1934 | ||
| 1934 | This function is a no-op for an X frame that is not visible. | 1935 | This function is a no-op for an X frame that is not visible. |
| 1935 | If you have just created a frame, you must wait for it to become visible | 1936 | If you have just created a frame, you must wait for it to become visible |
diff --git a/src/image.c b/src/image.c index 57f9b7735b6..4b73a5fe80c 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -8231,6 +8231,12 @@ imagemagick_load_image (struct frame *f, struct image *img, | |||
| 8231 | return 0; | 8231 | return 0; |
| 8232 | } | 8232 | } |
| 8233 | 8233 | ||
| 8234 | if (MagickGetImageDelay (image_wand) > 0) | ||
| 8235 | img->lisp_data = | ||
| 8236 | Fcons (Qdelay, | ||
| 8237 | Fcons (make_float (MagickGetImageDelay (image_wand) / 100.0), | ||
| 8238 | img->lisp_data)); | ||
| 8239 | |||
| 8234 | if (MagickGetNumberImages (image_wand) > 1) | 8240 | if (MagickGetNumberImages (image_wand) > 1) |
| 8235 | img->lisp_data = | 8241 | img->lisp_data = |
| 8236 | Fcons (Qcount, | 8242 | Fcons (Qcount, |
diff --git a/src/lisp.h b/src/lisp.h index 2bc9fb13284..3795795c49a 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -3976,8 +3976,7 @@ extern Lisp_Object safe_call2 (Lisp_Object, Lisp_Object, Lisp_Object); | |||
| 3976 | extern void init_eval (void); | 3976 | extern void init_eval (void); |
| 3977 | extern void syms_of_eval (void); | 3977 | extern void syms_of_eval (void); |
| 3978 | extern void unwind_body (Lisp_Object); | 3978 | extern void unwind_body (Lisp_Object); |
| 3979 | extern void record_in_backtrace (Lisp_Object function, | 3979 | extern ptrdiff_t record_in_backtrace (Lisp_Object, Lisp_Object *, ptrdiff_t); |
| 3980 | Lisp_Object *args, ptrdiff_t nargs); | ||
| 3981 | extern void mark_specpdl (void); | 3980 | extern void mark_specpdl (void); |
| 3982 | extern void get_backtrace (Lisp_Object array); | 3981 | extern void get_backtrace (Lisp_Object array); |
| 3983 | Lisp_Object backtrace_top_function (void); | 3982 | Lisp_Object backtrace_top_function (void); |
diff --git a/src/macfont.m b/src/macfont.m index 4bc58229d6e..f1895d1b0a5 100644 --- a/src/macfont.m +++ b/src/macfont.m | |||
| @@ -2598,20 +2598,25 @@ static void | |||
| 2598 | macfont_close (struct font *font) | 2598 | macfont_close (struct font *font) |
| 2599 | { | 2599 | { |
| 2600 | struct macfont_info *macfont_info = (struct macfont_info *) font; | 2600 | struct macfont_info *macfont_info = (struct macfont_info *) font; |
| 2601 | int i; | ||
| 2602 | 2601 | ||
| 2603 | block_input (); | 2602 | if (macfont_info->cache) |
| 2604 | CFRelease (macfont_info->macfont); | 2603 | { |
| 2605 | CGFontRelease (macfont_info->cgfont); | 2604 | int i; |
| 2606 | if (macfont_info->screen_font) | 2605 | |
| 2607 | CFRelease (macfont_info->screen_font); | 2606 | block_input (); |
| 2608 | macfont_release_cache (macfont_info->cache); | 2607 | CFRelease (macfont_info->macfont); |
| 2609 | for (i = 0; i < macfont_info->metrics_nrows; i++) | 2608 | CGFontRelease (macfont_info->cgfont); |
| 2610 | if (macfont_info->metrics[i]) | 2609 | if (macfont_info->screen_font) |
| 2611 | xfree (macfont_info->metrics[i]); | 2610 | CFRelease (macfont_info->screen_font); |
| 2612 | if (macfont_info->metrics) | 2611 | macfont_release_cache (macfont_info->cache); |
| 2613 | xfree (macfont_info->metrics); | 2612 | for (i = 0; i < macfont_info->metrics_nrows; i++) |
| 2614 | unblock_input (); | 2613 | if (macfont_info->metrics[i]) |
| 2614 | xfree (macfont_info->metrics[i]); | ||
| 2615 | if (macfont_info->metrics) | ||
| 2616 | xfree (macfont_info->metrics); | ||
| 2617 | macfont_info->cache = NULL; | ||
| 2618 | unblock_input (); | ||
| 2619 | } | ||
| 2615 | } | 2620 | } |
| 2616 | 2621 | ||
| 2617 | static int | 2622 | static int |
diff --git a/src/unexmacosx.c b/src/unexmacosx.c index 940cbfacb10..3bd8f3b02fc 100644 --- a/src/unexmacosx.c +++ b/src/unexmacosx.c | |||
| @@ -1322,7 +1322,9 @@ dump_it (void) | |||
| 1322 | } | 1322 | } |
| 1323 | 1323 | ||
| 1324 | if (curr_header_offset > text_seg_lowest_offset) | 1324 | if (curr_header_offset > text_seg_lowest_offset) |
| 1325 | unexec_error ("not enough room for load commands for new __DATA segments"); | 1325 | unexec_error ("not enough room for load commands for new __DATA segments" |
| 1326 | " (increase headerpad_extra in configure.in to at least %lX)", | ||
| 1327 | num_unexec_regions * sizeof (struct segment_command)); | ||
| 1326 | 1328 | ||
| 1327 | printf ("%ld unused bytes follow Mach-O header\n", | 1329 | printf ("%ld unused bytes follow Mach-O header\n", |
| 1328 | text_seg_lowest_offset - curr_header_offset); | 1330 | text_seg_lowest_offset - curr_header_offset); |
diff --git a/src/w32term.c b/src/w32term.c index 55c2d718346..443f5ece8f0 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -2228,7 +2228,7 @@ x_draw_stretch_glyph_string (struct glyph_string *s) | |||
| 2228 | { | 2228 | { |
| 2229 | /* In R2L rows, draw the cursor on the right edge of the | 2229 | /* In R2L rows, draw the cursor on the right edge of the |
| 2230 | stretch glyph. */ | 2230 | stretch glyph. */ |
| 2231 | int right_x = window_box_right_offset (s->w, TEXT_AREA); | 2231 | int right_x = window_box_right (s->w, TEXT_AREA); |
| 2232 | 2232 | ||
| 2233 | if (x + background_width > right_x) | 2233 | if (x + background_width > right_x) |
| 2234 | background_width -= x - right_x; | 2234 | background_width -= x - right_x; |
| @@ -5472,6 +5472,12 @@ x_draw_hollow_cursor (struct window *w, struct glyph_row *row) | |||
| 5472 | /* Compute frame-relative coordinates for phys cursor. */ | 5472 | /* Compute frame-relative coordinates for phys cursor. */ |
| 5473 | get_phys_cursor_geometry (w, row, cursor_glyph, &left, &top, &h); | 5473 | get_phys_cursor_geometry (w, row, cursor_glyph, &left, &top, &h); |
| 5474 | rect.left = left; | 5474 | rect.left = left; |
| 5475 | /* When on R2L character, show cursor at the right edge of the | ||
| 5476 | glyph, unless the cursor box is as wide as the glyph or wider | ||
| 5477 | (the latter happens when x-stretch-cursor is non-nil). */ | ||
| 5478 | if ((cursor_glyph->resolved_level & 1) != 0 | ||
| 5479 | && cursor_glyph->pixel_width > w->phys_cursor_width) | ||
| 5480 | rect.left += cursor_glyph->pixel_width - w->phys_cursor_width; | ||
| 5475 | rect.top = top; | 5481 | rect.top = top; |
| 5476 | rect.bottom = rect.top + h; | 5482 | rect.bottom = rect.top + h; |
| 5477 | rect.right = rect.left + w->phys_cursor_width; | 5483 | rect.right = rect.left + w->phys_cursor_width; |
| @@ -5553,7 +5559,7 @@ x_draw_bar_cursor (struct window *w, struct glyph_row *row, | |||
| 5553 | WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y), | 5559 | WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y), |
| 5554 | width, row->height); | 5560 | width, row->height); |
| 5555 | } | 5561 | } |
| 5556 | else | 5562 | else /* HBAR_CURSOR */ |
| 5557 | { | 5563 | { |
| 5558 | int dummy_x, dummy_y, dummy_h; | 5564 | int dummy_x, dummy_y, dummy_h; |
| 5559 | 5565 | ||
| @@ -5564,6 +5570,9 @@ x_draw_bar_cursor (struct window *w, struct glyph_row *row, | |||
| 5564 | 5570 | ||
| 5565 | get_phys_cursor_geometry (w, row, cursor_glyph, &dummy_x, | 5571 | get_phys_cursor_geometry (w, row, cursor_glyph, &dummy_x, |
| 5566 | &dummy_y, &dummy_h); | 5572 | &dummy_y, &dummy_h); |
| 5573 | if ((cursor_glyph->resolved_level & 1) != 0 | ||
| 5574 | && cursor_glyph->pixel_width > w->phys_cursor_width) | ||
| 5575 | x += cursor_glyph->pixel_width - w->phys_cursor_width; | ||
| 5567 | w32_fill_area (f, hdc, cursor_color, x, | 5576 | w32_fill_area (f, hdc, cursor_color, x, |
| 5568 | WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y + | 5577 | WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y + |
| 5569 | row->height - width), | 5578 | row->height - width), |
diff --git a/src/xdisp.c b/src/xdisp.c index 08b7154aa8b..18ba3319f32 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -2995,12 +2995,8 @@ init_iterator (struct it *it, struct window *w, | |||
| 2995 | 2995 | ||
| 2996 | /* If we truncate lines, leave room for the truncation glyph(s) at | 2996 | /* If we truncate lines, leave room for the truncation glyph(s) at |
| 2997 | the right margin. Otherwise, leave room for the continuation | 2997 | the right margin. Otherwise, leave room for the continuation |
| 2998 | glyph(s). Done only if the window has no fringes. Since we | 2998 | glyph(s). Done only if the window has no right fringe. */ |
| 2999 | don't know at this point whether there will be any R2L lines in | 2999 | if (WINDOW_RIGHT_FRINGE_WIDTH (it->w) == 0) |
| 3000 | the window, we reserve space for truncation/continuation glyphs | ||
| 3001 | even if only one of the fringes is absent. */ | ||
| 3002 | if (WINDOW_RIGHT_FRINGE_WIDTH (it->w) == 0 | ||
| 3003 | || (it->bidi_p && WINDOW_LEFT_FRINGE_WIDTH (it->w) == 0)) | ||
| 3004 | { | 3000 | { |
| 3005 | if (it->line_wrap == TRUNCATE) | 3001 | if (it->line_wrap == TRUNCATE) |
| 3006 | it->last_visible_x -= it->truncation_pixel_width; | 3002 | it->last_visible_x -= it->truncation_pixel_width; |
| @@ -3065,6 +3061,19 @@ init_iterator (struct it *it, struct window *w, | |||
| 3065 | iterator. */ | 3061 | iterator. */ |
| 3066 | if (it->bidi_p) | 3062 | if (it->bidi_p) |
| 3067 | { | 3063 | { |
| 3064 | /* Since we don't know at this point whether there will be | ||
| 3065 | any R2L lines in the window, we reserve space for | ||
| 3066 | truncation/continuation glyphs even if only the left | ||
| 3067 | fringe is absent. */ | ||
| 3068 | if (base_face_id == DEFAULT_FACE_ID | ||
| 3069 | && WINDOW_LEFT_FRINGE_WIDTH (it->w) == 0 | ||
| 3070 | && WINDOW_RIGHT_FRINGE_WIDTH (it->w) != 0) | ||
| 3071 | { | ||
| 3072 | if (it->line_wrap == TRUNCATE) | ||
| 3073 | it->last_visible_x -= it->truncation_pixel_width; | ||
| 3074 | else | ||
| 3075 | it->last_visible_x -= it->continuation_pixel_width; | ||
| 3076 | } | ||
| 3068 | /* Note the paragraph direction that this buffer wants to | 3077 | /* Note the paragraph direction that this buffer wants to |
| 3069 | use. */ | 3078 | use. */ |
| 3070 | if (EQ (BVAR (current_buffer, bidi_paragraph_direction), | 3079 | if (EQ (BVAR (current_buffer, bidi_paragraph_direction), |
| @@ -13564,6 +13573,12 @@ redisplay_internal (void) | |||
| 13564 | 13573 | ||
| 13565 | if (mode_line_update_needed (w)) | 13574 | if (mode_line_update_needed (w)) |
| 13566 | w->update_mode_line = 1; | 13575 | w->update_mode_line = 1; |
| 13576 | |||
| 13577 | /* If reconsider_clip_changes above decided that the narrowing | ||
| 13578 | in the current buffer changed, make sure all other windows | ||
| 13579 | showing that buffer will be redisplayed. */ | ||
| 13580 | if (current_buffer->clip_changed) | ||
| 13581 | bset_update_mode_line (current_buffer); | ||
| 13567 | } | 13582 | } |
| 13568 | 13583 | ||
| 13569 | /* Normally the message* functions will have already displayed and | 13584 | /* Normally the message* functions will have already displayed and |
| @@ -19386,7 +19401,18 @@ extend_face_to_end_of_line (struct it *it) | |||
| 19386 | 19401 | ||
| 19387 | for (row_width = 0, g = row_start; g < row_end; g++) | 19402 | for (row_width = 0, g = row_start; g < row_end; g++) |
| 19388 | row_width += g->pixel_width; | 19403 | row_width += g->pixel_width; |
| 19389 | stretch_width = window_box_width (it->w, TEXT_AREA) - row_width; | 19404 | |
| 19405 | /* FIXME: There are various minor display glitches in R2L | ||
| 19406 | rows when only one of the fringes is missing. The | ||
| 19407 | strange condition below produces the least bad effect. */ | ||
| 19408 | if ((WINDOW_LEFT_FRINGE_WIDTH (it->w) == 0) | ||
| 19409 | == (WINDOW_RIGHT_FRINGE_WIDTH (it->w) == 0) | ||
| 19410 | || WINDOW_RIGHT_FRINGE_WIDTH (it->w) != 0) | ||
| 19411 | stretch_width = window_box_width (it->w, TEXT_AREA); | ||
| 19412 | else | ||
| 19413 | stretch_width = it->last_visible_x - it->first_visible_x; | ||
| 19414 | stretch_width -= row_width; | ||
| 19415 | |||
| 19390 | if (stretch_width > 0) | 19416 | if (stretch_width > 0) |
| 19391 | { | 19417 | { |
| 19392 | stretch_ascent = | 19418 | stretch_ascent = |
| @@ -20527,9 +20553,17 @@ display_line (struct it *it) | |||
| 20527 | /* When the last glyph of an R2L row only fits | 20553 | /* When the last glyph of an R2L row only fits |
| 20528 | partially on the line, we need to set row->x to a | 20554 | partially on the line, we need to set row->x to a |
| 20529 | negative offset, so that the leftmost glyph is | 20555 | negative offset, so that the leftmost glyph is |
| 20530 | the one that is partially visible. */ | 20556 | the one that is partially visible. But if we are |
| 20531 | if (row->reversed_p && new_x > it->last_visible_x) | 20557 | going to produce the truncation glyph, this will |
| 20532 | row->x = it->last_visible_x - new_x; | 20558 | be taken care of in produce_special_glyphs. */ |
| 20559 | if (row->reversed_p | ||
| 20560 | && new_x > it->last_visible_x | ||
| 20561 | && !(it->line_wrap == TRUNCATE | ||
| 20562 | && WINDOW_LEFT_FRINGE_WIDTH (it->w) == 0)) | ||
| 20563 | { | ||
| 20564 | eassert (FRAME_WINDOW_P (it->f)); | ||
| 20565 | row->x = it->last_visible_x - new_x; | ||
| 20566 | } | ||
| 20533 | } | 20567 | } |
| 20534 | else | 20568 | else |
| 20535 | { | 20569 | { |
| @@ -20603,7 +20637,10 @@ display_line (struct it *it) | |||
| 20603 | that they are cropped at the right edge of the | 20637 | that they are cropped at the right edge of the |
| 20604 | window, so an image glyph will always end exactly at | 20638 | window, so an image glyph will always end exactly at |
| 20605 | last_visible_x, even if there's no right fringe. */ | 20639 | last_visible_x, even if there's no right fringe. */ |
| 20606 | && (WINDOW_RIGHT_FRINGE_WIDTH (it->w) || it->what == IT_IMAGE)) | 20640 | && ((row->reversed_p |
| 20641 | ? WINDOW_LEFT_FRINGE_WIDTH (it->w) | ||
| 20642 | : WINDOW_RIGHT_FRINGE_WIDTH (it->w)) | ||
| 20643 | || it->what == IT_IMAGE)) | ||
| 20607 | ? (it->current_x >= it->last_visible_x) | 20644 | ? (it->current_x >= it->last_visible_x) |
| 20608 | : (it->current_x > it->last_visible_x))) | 20645 | : (it->current_x > it->last_visible_x))) |
| 20609 | { | 20646 | { |
| @@ -25780,14 +25817,13 @@ produce_special_glyphs (struct it *it, enum display_element_type what) | |||
| 25780 | 25817 | ||
| 25781 | temp_it.dp = NULL; | 25818 | temp_it.dp = NULL; |
| 25782 | temp_it.what = IT_CHARACTER; | 25819 | temp_it.what = IT_CHARACTER; |
| 25783 | temp_it.len = 1; | ||
| 25784 | temp_it.c = temp_it.char_to_display = GLYPH_CHAR (glyph); | 25820 | temp_it.c = temp_it.char_to_display = GLYPH_CHAR (glyph); |
| 25785 | temp_it.face_id = GLYPH_FACE (glyph); | 25821 | temp_it.face_id = GLYPH_FACE (glyph); |
| 25786 | temp_it.len = CHAR_BYTES (temp_it.c); | 25822 | temp_it.len = CHAR_BYTES (temp_it.c); |
| 25787 | 25823 | ||
| 25788 | PRODUCE_GLYPHS (&temp_it); | 25824 | PRODUCE_GLYPHS (&temp_it); |
| 25789 | it->pixel_width = temp_it.pixel_width; | 25825 | it->pixel_width = temp_it.pixel_width; |
| 25790 | it->nglyphs = temp_it.pixel_width; | 25826 | it->nglyphs = temp_it.nglyphs; |
| 25791 | } | 25827 | } |
| 25792 | 25828 | ||
| 25793 | #ifdef HAVE_WINDOW_SYSTEM | 25829 | #ifdef HAVE_WINDOW_SYSTEM |
diff --git a/src/xterm.c b/src/xterm.c index 1426546d3ae..4b4349d2622 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -2474,7 +2474,7 @@ x_draw_stretch_glyph_string (struct glyph_string *s) | |||
| 2474 | { | 2474 | { |
| 2475 | /* In R2L rows, draw the cursor on the right edge of the | 2475 | /* In R2L rows, draw the cursor on the right edge of the |
| 2476 | stretch glyph. */ | 2476 | stretch glyph. */ |
| 2477 | int right_x = window_box_right_offset (s->w, TEXT_AREA); | 2477 | int right_x = window_box_right (s->w, TEXT_AREA); |
| 2478 | 2478 | ||
| 2479 | if (x + background_width > right_x) | 2479 | if (x + background_width > right_x) |
| 2480 | background_width -= x - right_x; | 2480 | background_width -= x - right_x; |
| @@ -7977,6 +7977,15 @@ x_draw_hollow_cursor (struct window *w, struct glyph_row *row) | |||
| 7977 | GCForeground, &xgcv); | 7977 | GCForeground, &xgcv); |
| 7978 | gc = dpyinfo->scratch_cursor_gc; | 7978 | gc = dpyinfo->scratch_cursor_gc; |
| 7979 | 7979 | ||
| 7980 | /* When on R2L character, show cursor at the right edge of the | ||
| 7981 | glyph, unless the cursor box is as wide as the glyph or wider | ||
| 7982 | (the latter happens when x-stretch-cursor is non-nil). */ | ||
| 7983 | if ((cursor_glyph->resolved_level & 1) != 0 | ||
| 7984 | && cursor_glyph->pixel_width > w->phys_cursor_width) | ||
| 7985 | { | ||
| 7986 | x += cursor_glyph->pixel_width - w->phys_cursor_width; | ||
| 7987 | wd -= 1; | ||
| 7988 | } | ||
| 7980 | /* Set clipping, draw the rectangle, and reset clipping again. */ | 7989 | /* Set clipping, draw the rectangle, and reset clipping again. */ |
| 7981 | x_clip_to_row (w, row, TEXT_AREA, gc); | 7990 | x_clip_to_row (w, row, TEXT_AREA, gc); |
| 7982 | XDrawRectangle (dpy, FRAME_X_WINDOW (f), gc, x, y, wd, h - 1); | 7991 | XDrawRectangle (dpy, FRAME_X_WINDOW (f), gc, x, y, wd, h - 1); |
| @@ -8062,9 +8071,10 @@ x_draw_bar_cursor (struct window *w, struct glyph_row *row, int width, enum text | |||
| 8062 | WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y), | 8071 | WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y), |
| 8063 | width, row->height); | 8072 | width, row->height); |
| 8064 | } | 8073 | } |
| 8065 | else | 8074 | else /* HBAR_CURSOR */ |
| 8066 | { | 8075 | { |
| 8067 | int dummy_x, dummy_y, dummy_h; | 8076 | int dummy_x, dummy_y, dummy_h; |
| 8077 | int x = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x); | ||
| 8068 | 8078 | ||
| 8069 | if (width < 0) | 8079 | if (width < 0) |
| 8070 | width = row->height; | 8080 | width = row->height; |
| @@ -8074,8 +8084,10 @@ x_draw_bar_cursor (struct window *w, struct glyph_row *row, int width, enum text | |||
| 8074 | get_phys_cursor_geometry (w, row, cursor_glyph, &dummy_x, | 8084 | get_phys_cursor_geometry (w, row, cursor_glyph, &dummy_x, |
| 8075 | &dummy_y, &dummy_h); | 8085 | &dummy_y, &dummy_h); |
| 8076 | 8086 | ||
| 8077 | XFillRectangle (dpy, window, gc, | 8087 | if ((cursor_glyph->resolved_level & 1) != 0 |
| 8078 | WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x), | 8088 | && cursor_glyph->pixel_width > w->phys_cursor_width) |
| 8089 | x += cursor_glyph->pixel_width - w->phys_cursor_width; | ||
| 8090 | XFillRectangle (dpy, window, gc, x, | ||
| 8079 | WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y + | 8091 | WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y + |
| 8080 | row->height - width), | 8092 | row->height - width), |
| 8081 | w->phys_cursor_width, width); | 8093 | w->phys_cursor_width, width); |