diff options
| author | Stefan Monnier | 2014-11-07 11:25:35 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2014-11-07 11:25:35 -0500 |
| commit | 3946aeb962440b8e76fea95c31aa518928082cc6 (patch) | |
| tree | 2b118bf349c394b692026f7a932ed1fb387ce563 /src | |
| parent | 0e44a2d2335fd7d382f0edc18345b9d382005d04 (diff) | |
| download | emacs-3946aeb962440b8e76fea95c31aa518928082cc6.tar.gz emacs-3946aeb962440b8e76fea95c31aa518928082cc6.zip | |
* src/keyboard.c: Call gui-set-selection instead of x-set-selection.
* src/xdisp.c (window-scroll-functions): Improve docstring.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 38 | ||||
| -rw-r--r-- | src/keyboard.c | 6 | ||||
| -rw-r--r-- | src/xdisp.c | 25 |
3 files changed, 37 insertions, 32 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 95880e806ee..a2a4e9dccaf 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2014-11-07 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * keyboard.c: Call gui-set-selection instead of x-set-selection. | ||
| 4 | * xdisp.c (window-scroll-functions): Improve docstring. | ||
| 5 | |||
| 1 | 2014-11-07 Paul Eggert <eggert@cs.ucla.edu> | 6 | 2014-11-07 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 7 | ||
| 3 | Uniquify the 'size' symbol. | 8 | Uniquify the 'size' symbol. |
| @@ -21,11 +26,11 @@ | |||
| 21 | (Fset_frame_size, x_set_left_fringe, x_set_right_fringe) | 26 | (Fset_frame_size, x_set_left_fringe, x_set_right_fringe) |
| 22 | (x_set_right_divider_width, x_set_bottom_divider_width) | 27 | (x_set_right_divider_width, x_set_bottom_divider_width) |
| 23 | (x_set_vertical_scroll_bars, x_set_horizontal_scroll_bars) | 28 | (x_set_vertical_scroll_bars, x_set_horizontal_scroll_bars) |
| 24 | (x_set_scroll_bar_width, x_set_scroll_bar_height): Update | 29 | (x_set_scroll_bar_width, x_set_scroll_bar_height): |
| 25 | callers. | 30 | Update callers. |
| 26 | (frame-inhibit-implied-resize): Rewrite doc-string. | 31 | (frame-inhibit-implied-resize): Rewrite doc-string. |
| 27 | * frame.h (frame_inhibit_resize, adjust_frame_size): Fix | 32 | * frame.h (frame_inhibit_resize, adjust_frame_size): |
| 28 | external declarations. | 33 | Fix external declarations. |
| 29 | (Qframe_position, Qframe_outer_size) | 34 | (Qframe_position, Qframe_outer_size) |
| 30 | (Qframe_inner_size, Qexternal_border_size, Qtitle_height) | 35 | (Qframe_inner_size, Qexternal_border_size, Qtitle_height) |
| 31 | (Qmenu_bar_external, Qmenu_bar_size, Qtool_bar_external) | 36 | (Qmenu_bar_external, Qmenu_bar_size, Qtool_bar_external) |
| @@ -36,11 +41,10 @@ | |||
| 36 | (menubar_map_cb, xg_update_frame_menubar, free_frame_menubar) | 41 | (menubar_map_cb, xg_update_frame_menubar, free_frame_menubar) |
| 37 | (tb_size_cb, update_frame_tool_bar, free_frame_tool_bar) | 42 | (tb_size_cb, update_frame_tool_bar, free_frame_tool_bar) |
| 38 | (xg_change_toolbar_position): Call adjust_frame_size directly. | 43 | (xg_change_toolbar_position): Call adjust_frame_size directly. |
| 39 | * nsfns.m (x_set_internal_border_width, Fx_create_frame): Fix | 44 | * nsfns.m (x_set_internal_border_width, Fx_create_frame): |
| 40 | calls of adjust_frame_size. | 45 | Fix calls of adjust_frame_size. |
| 41 | * w32fns.c (x_set_internal_border_width, x_set_menu_bar_lines) | 46 | * w32fns.c (x_set_internal_border_width, x_set_menu_bar_lines) |
| 42 | (Fx_create_frame, x_create_tip_frame): Adjust adjust_frame_size | 47 | (Fx_create_frame, x_create_tip_frame): Adjust adjust_frame_size calls. |
| 43 | calls. | ||
| 44 | (x_set_tool_bar_lines, x_change_tool_bar_height): Make sure that | 48 | (x_set_tool_bar_lines, x_change_tool_bar_height): Make sure that |
| 45 | frame can get resized when tool-bar-lines parameter changes from | 49 | frame can get resized when tool-bar-lines parameter changes from |
| 46 | or to zero. | 50 | or to zero. |
| @@ -49,10 +53,8 @@ | |||
| 49 | (Fx_frame_geometry): New function. | 53 | (Fx_frame_geometry): New function. |
| 50 | * w32menu.c (set_frame_menubar): Adjust adjust_frame_size call. | 54 | * w32menu.c (set_frame_menubar): Adjust adjust_frame_size call. |
| 51 | * w32term.c (x_new_font): Adjust adjust_frame_size call. | 55 | * w32term.c (x_new_font): Adjust adjust_frame_size call. |
| 52 | * widget.c (EmacsFrameSetCharSize): Adjust frame_inhibit_resize | 56 | * widget.c (EmacsFrameSetCharSize): Adjust frame_inhibit_resize call. |
| 53 | call. | 57 | * window.c (Fset_window_configuration): Adjust adjust_frame_size call. |
| 54 | * window.c (Fset_window_configuration): Adjust adjust_frame_size | ||
| 55 | call. | ||
| 56 | * xfns.c (x_set_menu_bar_lines, x_set_internal_border_width) | 58 | * xfns.c (x_set_menu_bar_lines, x_set_internal_border_width) |
| 57 | (Fx_create_frame): Adjust adjust_frame_size calls. | 59 | (Fx_create_frame): Adjust adjust_frame_size calls. |
| 58 | (x_set_tool_bar_lines, x_change_tool_bar_height): Make sure that | 60 | (x_set_tool_bar_lines, x_change_tool_bar_height): Make sure that |
| @@ -170,8 +172,8 @@ | |||
| 170 | * fileio.c (Fexpand_file_name): Use make_unibyte_string, not | 172 | * fileio.c (Fexpand_file_name): Use make_unibyte_string, not |
| 171 | build_string, when importing a home directory. (Bug#18873) | 173 | build_string, when importing a home directory. (Bug#18873) |
| 172 | 174 | ||
| 173 | * dispnew.c (buffer_posn_from_coords): Use | 175 | * dispnew.c (buffer_posn_from_coords): |
| 174 | WINDOW_WANTS_HEADER_LINE_P, not WINDOW_WANTS_MODELINE_P, to | 176 | Use WINDOW_WANTS_HEADER_LINE_P, not WINDOW_WANTS_MODELINE_P, to |
| 175 | account for the header-line height. (Bug#18839) | 177 | account for the header-line height. (Bug#18839) |
| 176 | 178 | ||
| 177 | 2014-10-28 Ulf Jasper <ulf.jasper@web.de> | 179 | 2014-10-28 Ulf Jasper <ulf.jasper@web.de> |
| @@ -186,8 +188,8 @@ | |||
| 186 | (ns_string_to_pasteboard_internal): Correct comment. | 188 | (ns_string_to_pasteboard_internal): Correct comment. |
| 187 | type => gtype in eassert, Call ns_store_pb_change_count. | 189 | type => gtype in eassert, Call ns_store_pb_change_count. |
| 188 | (Fns_own_selection_internal): Remove data, use value (Bug#18799). | 190 | (Fns_own_selection_internal): Remove data, use value (Bug#18799). |
| 189 | (Fns_disown_selection_internal, Fns_selection_owner_p): Replace | 191 | (Fns_disown_selection_internal, Fns_selection_owner_p): |
| 190 | Vselection_alist check, with change count check. | 192 | Replace Vselection_alist check, with change count check. |
| 191 | (Fns_get_selection): Initialize val to Qnil. Only get local | 193 | (Fns_get_selection): Initialize val to Qnil. Only get local |
| 192 | selection if change counts match (Bug#18799). | 194 | selection if change counts match (Bug#18799). |
| 193 | (nxatoms_of_nsselect): Initialize pasteboard_changecount. | 195 | (nxatoms_of_nsselect): Initialize pasteboard_changecount. |
| @@ -213,8 +215,8 @@ | |||
| 213 | 2014-10-23 Martin Rudalics <rudalics@gmx.at> | 215 | 2014-10-23 Martin Rudalics <rudalics@gmx.at> |
| 214 | 216 | ||
| 215 | * frame.c (Fset_frame_height, Fset_frame_width, Fset_frame_size) | 217 | * frame.c (Fset_frame_height, Fset_frame_width, Fset_frame_size) |
| 216 | (frame_resize_pixelwise, frame_inhibit_implied_resize): Fix | 218 | (frame_resize_pixelwise, frame_inhibit_implied_resize): |
| 217 | doc-strings (Bug#18789). | 219 | Fix doc-strings (Bug#18789). |
| 218 | 220 | ||
| 219 | 2014-10-23 Paul Eggert <eggert@cs.ucla.edu> | 221 | 2014-10-23 Paul Eggert <eggert@cs.ucla.edu> |
| 220 | 222 | ||
diff --git a/src/keyboard.c b/src/keyboard.c index e16ee51ee0e..24f47bfedc9 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -231,7 +231,7 @@ static ptrdiff_t last_point_position; | |||
| 231 | 'volatile' here. */ | 231 | 'volatile' here. */ |
| 232 | Lisp_Object internal_last_event_frame; | 232 | Lisp_Object internal_last_event_frame; |
| 233 | 233 | ||
| 234 | static Lisp_Object Qx_set_selection, Qhandle_switch_frame; | 234 | static Lisp_Object Qgui_set_selection, Qhandle_switch_frame; |
| 235 | static Lisp_Object Qhandle_select_window; | 235 | static Lisp_Object Qhandle_select_window; |
| 236 | Lisp_Object QPRIMARY; | 236 | Lisp_Object QPRIMARY; |
| 237 | 237 | ||
| @@ -1653,7 +1653,7 @@ command_loop_1 (void) | |||
| 1653 | = call1 (Fsymbol_value (Qregion_extract_function), Qnil); | 1653 | = call1 (Fsymbol_value (Qregion_extract_function), Qnil); |
| 1654 | if (XINT (Flength (txt)) > 0) | 1654 | if (XINT (Flength (txt)) > 0) |
| 1655 | /* Don't set empty selections. */ | 1655 | /* Don't set empty selections. */ |
| 1656 | call2 (Qx_set_selection, QPRIMARY, txt); | 1656 | call2 (Qgui_set_selection, QPRIMARY, txt); |
| 1657 | } | 1657 | } |
| 1658 | 1658 | ||
| 1659 | if (current_buffer != prev_buffer || MODIFF != prev_modiff) | 1659 | if (current_buffer != prev_buffer || MODIFF != prev_modiff) |
| @@ -11167,7 +11167,7 @@ syms_of_keyboard (void) | |||
| 11167 | 11167 | ||
| 11168 | DEFSYM (Qpolling_period, "polling-period"); | 11168 | DEFSYM (Qpolling_period, "polling-period"); |
| 11169 | 11169 | ||
| 11170 | DEFSYM (Qx_set_selection, "x-set-selection"); | 11170 | DEFSYM (Qgui_set_selection, "gui-set-selection"); |
| 11171 | DEFSYM (QPRIMARY, "PRIMARY"); | 11171 | DEFSYM (QPRIMARY, "PRIMARY"); |
| 11172 | DEFSYM (Qhandle_switch_frame, "handle-switch-frame"); | 11172 | DEFSYM (Qhandle_switch_frame, "handle-switch-frame"); |
| 11173 | DEFSYM (Qhandle_select_window, "handle-select-window"); | 11173 | DEFSYM (Qhandle_select_window, "handle-select-window"); |
diff --git a/src/xdisp.c b/src/xdisp.c index 2cdbade3062..1b015e70709 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -15196,8 +15196,8 @@ try_scrolling (Lisp_Object window, int just_this_one_p, | |||
| 15196 | non-zero margins, because scroll_up_aggressively | 15196 | non-zero margins, because scroll_up_aggressively |
| 15197 | means put point that fraction of window height | 15197 | means put point that fraction of window height |
| 15198 | _from_the_bottom_margin_. */ | 15198 | _from_the_bottom_margin_. */ |
| 15199 | if (aggressive_scroll + 2*this_scroll_margin > height) | 15199 | if (aggressive_scroll + 2 * this_scroll_margin > height) |
| 15200 | aggressive_scroll = height - 2*this_scroll_margin; | 15200 | aggressive_scroll = height - 2 * this_scroll_margin; |
| 15201 | amount_to_scroll = dy + aggressive_scroll; | 15201 | amount_to_scroll = dy + aggressive_scroll; |
| 15202 | } | 15202 | } |
| 15203 | } | 15203 | } |
| @@ -15290,8 +15290,8 @@ try_scrolling (Lisp_Object window, int just_this_one_p, | |||
| 15290 | start_display (&it, w, startp); | 15290 | start_display (&it, w, startp); |
| 15291 | 15291 | ||
| 15292 | if (arg_scroll_conservatively) | 15292 | if (arg_scroll_conservatively) |
| 15293 | amount_to_scroll = max (dy, frame_line_height * | 15293 | amount_to_scroll = max (dy, frame_line_height |
| 15294 | max (scroll_step, temp_scroll_step)); | 15294 | * max (scroll_step, temp_scroll_step)); |
| 15295 | else if (scroll_step || temp_scroll_step) | 15295 | else if (scroll_step || temp_scroll_step) |
| 15296 | amount_to_scroll = scroll_max; | 15296 | amount_to_scroll = scroll_max; |
| 15297 | else | 15297 | else |
| @@ -15308,8 +15308,8 @@ try_scrolling (Lisp_Object window, int just_this_one_p, | |||
| 15308 | bottom of the window, if the value of | 15308 | bottom of the window, if the value of |
| 15309 | scroll_down_aggressively happens to be too | 15309 | scroll_down_aggressively happens to be too |
| 15310 | large. */ | 15310 | large. */ |
| 15311 | if (aggressive_scroll + 2*this_scroll_margin > height) | 15311 | if (aggressive_scroll + 2 * this_scroll_margin > height) |
| 15312 | aggressive_scroll = height - 2*this_scroll_margin; | 15312 | aggressive_scroll = height - 2 * this_scroll_margin; |
| 15313 | amount_to_scroll = dy + aggressive_scroll; | 15313 | amount_to_scroll = dy + aggressive_scroll; |
| 15314 | } | 15314 | } |
| 15315 | } | 15315 | } |
| @@ -16580,8 +16580,8 @@ redisplay_window (Lisp_Object window, bool just_this_one_p) | |||
| 16580 | { | 16580 | { |
| 16581 | int window_total_lines | 16581 | int window_total_lines |
| 16582 | = WINDOW_TOTAL_LINES (w) * FRAME_LINE_HEIGHT (f) / frame_line_height; | 16582 | = WINDOW_TOTAL_LINES (w) * FRAME_LINE_HEIGHT (f) / frame_line_height; |
| 16583 | int margin = | 16583 | int margin |
| 16584 | scroll_margin > 0 | 16584 | = scroll_margin > 0 |
| 16585 | ? min (scroll_margin, window_total_lines / 4) | 16585 | ? min (scroll_margin, window_total_lines / 4) |
| 16586 | : 0; | 16586 | : 0; |
| 16587 | ptrdiff_t margin_pos = CHARPOS (startp); | 16587 | ptrdiff_t margin_pos = CHARPOS (startp); |
| @@ -30731,9 +30731,12 @@ all the functions in the list are called, with the frame as argument. */); | |||
| 30731 | DEFVAR_LISP ("window-scroll-functions", Vwindow_scroll_functions, | 30731 | DEFVAR_LISP ("window-scroll-functions", Vwindow_scroll_functions, |
| 30732 | doc: /* List of functions to call before redisplaying a window with scrolling. | 30732 | doc: /* List of functions to call before redisplaying a window with scrolling. |
| 30733 | Each function is called with two arguments, the window and its new | 30733 | Each function is called with two arguments, the window and its new |
| 30734 | display-start position. Note that these functions are also called by | 30734 | display-start position. |
| 30735 | `set-window-buffer'. Also note that the value of `window-end' is not | 30735 | These functions are called whenever the `window-start' marker is modified, |
| 30736 | valid when these functions are called. | 30736 | either to point into another buffer (e.g. via `set-window-buffer') or another |
| 30737 | place in the same buffer. | ||
| 30738 | Note that the value of `window-end' is not valid when these functions are | ||
| 30739 | called. | ||
| 30737 | 30740 | ||
| 30738 | Warning: Do not use this feature to alter the way the window | 30741 | Warning: Do not use this feature to alter the way the window |
| 30739 | is scrolled. It is not designed for that, and such use probably won't | 30742 | is scrolled. It is not designed for that, and such use probably won't |