diff options
| author | Kenichi Handa | 2011-12-05 16:03:31 +0900 |
|---|---|---|
| committer | Kenichi Handa | 2011-12-05 16:03:31 +0900 |
| commit | 2ab04b956544fc24132cee405f93c1a757ebca56 (patch) | |
| tree | f8ff3a51bac0430ed69b6497568de699f6d3b904 /src | |
| parent | a79703f53ccd12623371263d93baf0d1be928ec7 (diff) | |
| parent | 58a70b943c3efcc25e1396c8e67bc440c43a3f0a (diff) | |
| download | emacs-2ab04b956544fc24132cee405f93c1a757ebca56.tar.gz emacs-2ab04b956544fc24132cee405f93c1a757ebca56.zip | |
merge trunk
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 103 | ||||
| -rw-r--r-- | src/ChangeLog.10 | 2 | ||||
| -rw-r--r-- | src/ChangeLog.11 | 2 | ||||
| -rw-r--r-- | src/ChangeLog.2 | 2 | ||||
| -rw-r--r-- | src/ChangeLog.8 | 4 | ||||
| -rw-r--r-- | src/ccl.c | 2 | ||||
| -rw-r--r-- | src/cm.h | 4 | ||||
| -rw-r--r-- | src/coding.c | 2 | ||||
| -rw-r--r-- | src/coding.h | 2 | ||||
| -rw-r--r-- | src/dispnew.c | 3 | ||||
| -rw-r--r-- | src/emacs.c | 3 | ||||
| -rw-r--r-- | src/emacsgtkfixed.c | 2 | ||||
| -rw-r--r-- | src/emacsgtkfixed.h | 2 | ||||
| -rw-r--r-- | src/eval.c | 14 | ||||
| -rw-r--r-- | src/fileio.c | 20 | ||||
| -rw-r--r-- | src/font.c | 8 | ||||
| -rw-r--r-- | src/fontset.c | 2 | ||||
| -rw-r--r-- | src/frame.c | 2 | ||||
| -rw-r--r-- | src/ftfont.c | 2 | ||||
| -rw-r--r-- | src/keyboard.c | 31 | ||||
| -rw-r--r-- | src/lisp.h | 15 | ||||
| -rw-r--r-- | src/nsfns.m | 35 | ||||
| -rw-r--r-- | src/search.c | 59 | ||||
| -rw-r--r-- | src/sysdep.c | 2 | ||||
| -rw-r--r-- | src/term.c | 2 | ||||
| -rw-r--r-- | src/w32fns.c | 10 | ||||
| -rw-r--r-- | src/w32term.h | 2 | ||||
| -rw-r--r-- | src/widget.c | 11 | ||||
| -rw-r--r-- | src/widget.h | 1 | ||||
| -rw-r--r-- | src/window.c | 2 | ||||
| -rw-r--r-- | src/window.h | 2 | ||||
| -rw-r--r-- | src/xdisp.c | 55 | ||||
| -rw-r--r-- | src/xfns.c | 2 | ||||
| -rw-r--r-- | src/xterm.c | 8 | ||||
| -rw-r--r-- | src/xterm.h | 2 |
35 files changed, 299 insertions, 121 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 760bf575da5..69e3eda2630 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -24,13 +24,92 @@ | |||
| 24 | (encode_coding_iso_2022, encode_coding_sjis) | 24 | (encode_coding_iso_2022, encode_coding_sjis) |
| 25 | (encode_coding_big5, encode_coding_charset): Use the above macros. | 25 | (encode_coding_big5, encode_coding_charset): Use the above macros. |
| 26 | 26 | ||
| 27 | 2011-12-05 Juanma Barranquero <lekktu@gmail.com> | ||
| 28 | |||
| 29 | * lisp.h (process_quit_flag): Fix external declaration. | ||
| 30 | |||
| 31 | 2011-12-04 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 32 | |||
| 33 | Don't macro-inline non-performance-critical code. | ||
| 34 | * eval.c (process_quit_flag): New function. | ||
| 35 | * lisp.h (QUIT): Use it. | ||
| 36 | |||
| 37 | 2011-12-04 Jan Djärv <jan.h.d@swipnet.se> | ||
| 38 | |||
| 39 | * nsfns.m (get_geometry_from_preferences): New function. | ||
| 40 | (Fx_create_frame): Call get_geometry_from_preferences (Bug#10103). | ||
| 41 | |||
| 42 | 2011-12-04 Andreas Schwab <schwab@linux-m68k.org> | ||
| 43 | |||
| 44 | * emacs.c (Qkill_emacs): Define. | ||
| 45 | (syms_of_emacs): Initialize it. | ||
| 46 | * keyboard.c (interrupt_signal): Don't call Fkill_emacs here, set | ||
| 47 | Qquit_flag to `kill-emacs' instead. | ||
| 48 | (quit_throw_to_read_char): Add parameter `from_signal'. | ||
| 49 | All callers changed. Call Fkill_emacs if requested and safe. | ||
| 50 | * lisp.h (QUIT): Call Fkill_emacs if requested. | ||
| 51 | |||
| 52 | 2011-12-03 Jan Djärv <jan.h.d@swipnet.se> | ||
| 53 | |||
| 54 | * widget.c (update_wm_hints): Return if wmshell is null. | ||
| 55 | (widget_update_wm_size_hints): New function. | ||
| 56 | |||
| 57 | * widget.h (widget_update_wm_size_hints): Declare. | ||
| 58 | |||
| 59 | * xterm.c (x_wm_set_size_hint): If USE_X_TOOLKIT, call | ||
| 60 | widget_update_wm_size_hints (Bug#10104). | ||
| 61 | |||
| 62 | 2011-12-03 Eli Zaretskii <eliz@gnu.org> | ||
| 63 | |||
| 64 | * xdisp.c (handle_invisible_prop): If the invisible text ends just | ||
| 65 | before a newline, prepare the bidi iterator for consuming the | ||
| 66 | newline, and keep the current paragraph direction. (Bug#10183) | ||
| 67 | (redisplay_window): Don't let `margin' become negative. (Bug#10192) | ||
| 68 | |||
| 69 | 2011-12-02 Juri Linkov <juri@jurta.org> | ||
| 70 | |||
| 71 | * search.c (Fword_search_regexp): New Lisp function created from | ||
| 72 | `wordify'. Change type of arg `lax' from `int' to `Lisp_Object'. | ||
| 73 | (Fword_search_backward, Fword_search_forward) | ||
| 74 | (Fword_search_backward_lax, Fword_search_forward_lax): | ||
| 75 | Use `Fword_search_regexp' instead of `wordify'. Doc fix. | ||
| 76 | (syms_of_search): Define `Sword_search_regexp'. (Bug#10145) | ||
| 77 | |||
| 78 | 2011-12-01 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 79 | |||
| 80 | * fileio.c (Finsert_file_contents): Move after-change-function call | ||
| 81 | to before the "handled:" label, since all "goto handled" appear in | ||
| 82 | cases where the *-change-functions have already been properly called | ||
| 83 | (bug#10117). | ||
| 84 | |||
| 85 | 2011-12-01 Andreas Schwab <schwab@linux-m68k.org> | ||
| 86 | |||
| 87 | * keyboard.c (interrupt_signal): Don't call kill-emacs when | ||
| 88 | waiting for input. (Bug#10169) | ||
| 89 | |||
| 90 | 2011-11-30 Eli Zaretskii <eliz@gnu.org> | ||
| 91 | |||
| 92 | * dispnew.c (adjust_glyph_matrix): Remove the assertion that | ||
| 93 | verifies glyph row's hash code--we have just reallocated the | ||
| 94 | glyphs, so their contents can be complete garbage. (Bug#10164) | ||
| 95 | |||
| 96 | 2011-11-30 Juanma Barranquero <lekktu@gmail.com> | ||
| 97 | |||
| 98 | * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Add missing check. | ||
| 99 | |||
| 100 | 2011-11-30 Eli Zaretskii <eliz@gnu.org> | ||
| 101 | |||
| 102 | * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Ensure ROW's | ||
| 103 | attributes are tested _before_ calling verify_row_hash, to protect | ||
| 104 | against GCC re-ordering of the tests. (Bug#10164) | ||
| 105 | |||
| 27 | 2011-11-29 Jan Djärv <jan.h.d@swipnet.se> | 106 | 2011-11-29 Jan Djärv <jan.h.d@swipnet.se> |
| 28 | 107 | ||
| 29 | * xterm.h (struct x_output): net_wm_state_hidden_seen is new. | 108 | * xterm.h (struct x_output): net_wm_state_hidden_seen is new. |
| 30 | 109 | ||
| 31 | * xterm.c (handle_one_xevent): Only set async_visible and friends | 110 | * xterm.c (handle_one_xevent): Only set async_visible and friends |
| 32 | if net_wm_state_hidden_seen is non-zero (Bug#10002) | 111 | if net_wm_state_hidden_seen is non-zero (Bug#10002) |
| 33 | (get_current_wm_state): Set net_wm_state_hidden_seen to 1 if | 112 | (get_current_wm_state): Set net_wm_state_hidden_seen to 1 if |
| 34 | _NET_WM_STATE_HIDDEN is in NET_WM_STATE. | 113 | _NET_WM_STATE_HIDDEN is in NET_WM_STATE. |
| 35 | 114 | ||
| 36 | 2011-11-28 Paul Eggert <eggert@cs.ucla.edu> | 115 | 2011-11-28 Paul Eggert <eggert@cs.ucla.edu> |
| @@ -67,8 +146,8 @@ | |||
| 67 | 146 | ||
| 68 | 2011-11-27 Jan Djärv <jan.h.d@swipnet.se> | 147 | 2011-11-27 Jan Djärv <jan.h.d@swipnet.se> |
| 69 | 148 | ||
| 70 | * gtkutil.c (xg_create_frame_widgets): Call | 149 | * gtkutil.c (xg_create_frame_widgets): |
| 71 | gtk_window_set_has_resize_grip (FALSE) if that function is | 150 | Call gtk_window_set_has_resize_grip (FALSE) if that function is |
| 72 | present with Gtk+ 2.0. | 151 | present with Gtk+ 2.0. |
| 73 | 152 | ||
| 74 | 2011-11-26 Paul Eggert <eggert@cs.ucla.edu> | 153 | 2011-11-26 Paul Eggert <eggert@cs.ucla.edu> |
| @@ -275,8 +354,8 @@ | |||
| 275 | * xdisp.c (display_line): Move the call to | 354 | * xdisp.c (display_line): Move the call to |
| 276 | highlight_trailing_whitespace before the call to | 355 | highlight_trailing_whitespace before the call to |
| 277 | compute_line_metrics, since the latter needs to see the final | 356 | compute_line_metrics, since the latter needs to see the final |
| 278 | faces of all the glyphs to compute ROW's hash value. Fixes | 357 | faces of all the glyphs to compute ROW's hash value. |
| 279 | assertion violations in row_equal_p. (Bug#10035) | 358 | Fixes assertion violations in row_equal_p. (Bug#10035) |
| 280 | 359 | ||
| 281 | 2011-11-14 Juanma Barranquero <lekktu@gmail.com> | 360 | 2011-11-14 Juanma Barranquero <lekktu@gmail.com> |
| 282 | 361 | ||
| @@ -360,8 +439,8 @@ | |||
| 360 | 2011-11-08 Chong Yidong <cyd@gnu.org> | 439 | 2011-11-08 Chong Yidong <cyd@gnu.org> |
| 361 | 440 | ||
| 362 | * window.c (Fwindow_left_column, Fwindow_top_line): Doc fix. | 441 | * window.c (Fwindow_left_column, Fwindow_top_line): Doc fix. |
| 363 | (Fwindow_body_height, Fwindow_body_width): Move from Lisp. Signal | 442 | (Fwindow_body_height, Fwindow_body_width): Move from Lisp. |
| 364 | an error if not a live window. | 443 | Signal an error if not a live window. |
| 365 | (Fwindow_total_width, Fwindow_total_height): Move from Lisp. | 444 | (Fwindow_total_width, Fwindow_total_height): Move from Lisp. |
| 366 | (Fwindow_total_size, Fwindow_body_size): Move to Lisp. | 445 | (Fwindow_total_size, Fwindow_body_size): Move to Lisp. |
| 367 | 446 | ||
| @@ -493,8 +572,8 @@ | |||
| 493 | (x_destroy_window): Move code to x_free_frame_resources. | 572 | (x_destroy_window): Move code to x_free_frame_resources. |
| 494 | 573 | ||
| 495 | * xfns.c (unwind_create_frame): Fix comment. | 574 | * xfns.c (unwind_create_frame): Fix comment. |
| 496 | (Fx_create_frame, x_create_tip_frame): Move | 575 | (Fx_create_frame, x_create_tip_frame): |
| 497 | terminal->reference_count++ just before making the frame | 576 | Move terminal->reference_count++ just before making the frame |
| 498 | official. Move initialization of image_cache_refcount and | 577 | official. Move initialization of image_cache_refcount and |
| 499 | dpyinfo_refcount before calling init_frame_faces (Bug#9943). | 578 | dpyinfo_refcount before calling init_frame_faces (Bug#9943). |
| 500 | 579 | ||
| @@ -564,8 +643,8 @@ | |||
| 564 | * xdisp.c (mouse_face_from_buffer_pos): Fix a typo in a comment. | 643 | * xdisp.c (mouse_face_from_buffer_pos): Fix a typo in a comment. |
| 565 | Don't stop backward scan on the continuation glyph, even though | 644 | Don't stop backward scan on the continuation glyph, even though |
| 566 | its CHARPOS is positive. | 645 | its CHARPOS is positive. |
| 567 | (mouse_face_from_buffer_pos, note_mouse_highlight): Rename | 646 | (mouse_face_from_buffer_pos, note_mouse_highlight): |
| 568 | cover_string to disp_string. | 647 | Rename cover_string to disp_string. |
| 569 | 648 | ||
| 570 | 2011-11-01 Martin Rudalics <rudalics@gmx.at> | 649 | 2011-11-01 Martin Rudalics <rudalics@gmx.at> |
| 571 | 650 | ||
| @@ -8704,7 +8783,7 @@ | |||
| 8704 | (xg_set_widget_bg): New function. | 8783 | (xg_set_widget_bg): New function. |
| 8705 | (delete_cb): New function. | 8784 | (delete_cb): New function. |
| 8706 | (xg_create_frame_widgets): Connect delete-event to delete_cb. | 8785 | (xg_create_frame_widgets): Connect delete-event to delete_cb. |
| 8707 | Call xg_set_widget_bg. Only set backgrund pixmap for ! HAVE_GTK3 | 8786 | Call xg_set_widget_bg. Only set background pixmap for ! HAVE_GTK3 |
| 8708 | (xg_set_background_color): Call xg_set_widget_bg. | 8787 | (xg_set_background_color): Call xg_set_widget_bg. |
| 8709 | (xg_set_frame_icon): Call xg_get_pixbuf_from_pix_and_mask. | 8788 | (xg_set_frame_icon): Call xg_get_pixbuf_from_pix_and_mask. |
| 8710 | (xg_create_scroll_bar): vadj is a GtkAdjustment for HAVE_GTK3. | 8789 | (xg_create_scroll_bar): vadj is a GtkAdjustment for HAVE_GTK3. |
diff --git a/src/ChangeLog.10 b/src/ChangeLog.10 index 7d2f48a03ea..e759183724e 100644 --- a/src/ChangeLog.10 +++ b/src/ChangeLog.10 | |||
| @@ -516,7 +516,7 @@ | |||
| 516 | * w32fns.c (current_popup_menu): Use from w32menu.c. | 516 | * w32fns.c (current_popup_menu): Use from w32menu.c. |
| 517 | (w32_wnd_proc) <WM_EXITMENULOOP, WM_TIMER>: Use menubar_active | 517 | (w32_wnd_proc) <WM_EXITMENULOOP, WM_TIMER>: Use menubar_active |
| 518 | and current_popup_menu to determine whether a menubar menu has | 518 | and current_popup_menu to determine whether a menubar menu has |
| 519 | been cancelled. | 519 | been canceled. |
| 520 | 520 | ||
| 521 | * w32term.h (w32_output): Remove menu_command_in_progress. | 521 | * w32term.h (w32_output): Remove menu_command_in_progress. |
| 522 | 522 | ||
diff --git a/src/ChangeLog.11 b/src/ChangeLog.11 index 7c46dea675c..f9fd442da3f 100644 --- a/src/ChangeLog.11 +++ b/src/ChangeLog.11 | |||
| @@ -23182,7 +23182,7 @@ | |||
| 23182 | * font.c (font_prop_validate_symbol, font_prop_validate_style) | 23182 | * font.c (font_prop_validate_symbol, font_prop_validate_style) |
| 23183 | (font_prop_validate_non_neg, font_prop_validate_spacing): | 23183 | (font_prop_validate_non_neg, font_prop_validate_spacing): |
| 23184 | Delete argument prop_index. | 23184 | Delete argument prop_index. |
| 23185 | (font_property_table): Change arguments to validater. Change Callers. | 23185 | (font_property_table): Change arguments to validator. Change Callers. |
| 23186 | (font_lispy_object): Delete. | 23186 | (font_lispy_object): Delete. |
| 23187 | (font_at): Use font_find_object instead fo font_lispy_object. | 23187 | (font_at): Use font_find_object instead fo font_lispy_object. |
| 23188 | 23188 | ||
diff --git a/src/ChangeLog.2 b/src/ChangeLog.2 index 62e3de22b09..ba61c337efc 100644 --- a/src/ChangeLog.2 +++ b/src/ChangeLog.2 | |||
| @@ -1811,7 +1811,7 @@ | |||
| 1811 | 1987-03-13 Richard M. Stallman (rms@prep) | 1811 | 1987-03-13 Richard M. Stallman (rms@prep) |
| 1812 | 1812 | ||
| 1813 | * sysdep.c: Don't redefine TCSETAW if already defined. | 1813 | * sysdep.c: Don't redefine TCSETAW if already defined. |
| 1814 | (Cancelled by change on March 17). | 1814 | (Canceled by change on March 17). |
| 1815 | 1815 | ||
| 1816 | * sunfns.c: New file containing interface to Sun windows. | 1816 | * sunfns.c: New file containing interface to Sun windows. |
| 1817 | This is enabled by the switch HAVE_SUN_WINDOWS. | 1817 | This is enabled by the switch HAVE_SUN_WINDOWS. |
diff --git a/src/ChangeLog.8 b/src/ChangeLog.8 index 2f3ee45a1ac..6a48b09e64b 100644 --- a/src/ChangeLog.8 +++ b/src/ChangeLog.8 | |||
| @@ -12583,7 +12583,7 @@ | |||
| 12583 | quit_char is typed, in order to break out of potential deadlocks. | 12583 | quit_char is typed, in order to break out of potential deadlocks. |
| 12584 | (cancel_all_deferred_msgs): New function. | 12584 | (cancel_all_deferred_msgs): New function. |
| 12585 | (complete_deferred_msg): Don't abort if msg not found; may have | 12585 | (complete_deferred_msg): Don't abort if msg not found; may have |
| 12586 | been cancelled. | 12586 | been canceled. |
| 12587 | (Fw32_reconstruct_hot_key): Use pre-interned symbols. | 12587 | (Fw32_reconstruct_hot_key): Use pre-interned symbols. |
| 12588 | (Fw32_send_sys_command): Wait for system command to | 12588 | (Fw32_send_sys_command): Wait for system command to |
| 12589 | complete before returning. | 12589 | complete before returning. |
| @@ -13701,7 +13701,7 @@ | |||
| 13701 | * ccl.c (CCL_WRITE_CHAR): Don't use bcopy. | 13701 | * ccl.c (CCL_WRITE_CHAR): Don't use bcopy. |
| 13702 | (ccl_driver): If BUFFER-MAGNIFICATION of the CCL program is 0, | 13702 | (ccl_driver): If BUFFER-MAGNIFICATION of the CCL program is 0, |
| 13703 | cause error if the program is going to output some bytes. When | 13703 | cause error if the program is going to output some bytes. When |
| 13704 | outputing a string to notify an error, check the case that | 13704 | outputting a string to notify an error, check the case that |
| 13705 | DST_BYTES is zero. | 13705 | DST_BYTES is zero. |
| 13706 | 13706 | ||
| 13707 | * coding.h (CODING_FINISH_INTERRUPT): New macro. | 13707 | * coding.h (CODING_FINISH_INTERRUPT): New macro. |
| @@ -552,7 +552,7 @@ static Lisp_Object Vccl_program_table; | |||
| 552 | But, when VALm is mapped to VALn and VALn is not a number, the | 552 | But, when VALm is mapped to VALn and VALn is not a number, the |
| 553 | mapping proceed as below: | 553 | mapping proceed as below: |
| 554 | 554 | ||
| 555 | If VALn is nil, the lastest map is ignored and the mapping of VALm | 555 | If VALn is nil, the last map is ignored and the mapping of VALm |
| 556 | proceed to the next map. | 556 | proceed to the next map. |
| 557 | 557 | ||
| 558 | In VALn is t, VALm is reverted to reg[rrr] and the mapping of VALm | 558 | In VALn is t, VALm is reverted to reg[rrr] and the mapping of VALm |
| @@ -16,7 +16,7 @@ GNU General Public License for more details. | |||
| 16 | You should have received a copy of the GNU General Public License | 16 | You should have received a copy of the GNU General Public License |
| 17 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | 17 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
| 18 | 18 | ||
| 19 | /* Holds the minimum and maximum costs for the parametrized capabilities. */ | 19 | /* Holds the minimum and maximum costs for the parameterized capabilities. */ |
| 20 | struct parmcap | 20 | struct parmcap |
| 21 | { | 21 | { |
| 22 | int mincost, maxcost; | 22 | int mincost, maxcost; |
| @@ -79,7 +79,7 @@ struct cm | |||
| 79 | struct parmcap cc_multiright; /* multiple right (RI) */ | 79 | struct parmcap cc_multiright; /* multiple right (RI) */ |
| 80 | #endif | 80 | #endif |
| 81 | 81 | ||
| 82 | /* Costs for the non-parametrized capabilities */ | 82 | /* Costs for the non-parameterized capabilities */ |
| 83 | int cc_up; /* cost for up */ | 83 | int cc_up; /* cost for up */ |
| 84 | int cc_down; /* etc. */ | 84 | int cc_down; /* etc. */ |
| 85 | int cc_left; | 85 | int cc_left; |
diff --git a/src/coding.c b/src/coding.c index 99a766a915a..b1743076630 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -9300,7 +9300,7 @@ frame's terminal device. */) | |||
| 9300 | = TERMINAL_TERMINAL_CODING (get_terminal (terminal, 1)); | 9300 | = TERMINAL_TERMINAL_CODING (get_terminal (terminal, 1)); |
| 9301 | Lisp_Object coding_system = CODING_ID_NAME (terminal_coding->id); | 9301 | Lisp_Object coding_system = CODING_ID_NAME (terminal_coding->id); |
| 9302 | 9302 | ||
| 9303 | /* For backward compatibility, return nil if it is `undecided'. */ | 9303 | /* For backward compatibility, return nil if it is `undecided'. */ |
| 9304 | return (! EQ (coding_system, Qundecided) ? coding_system : Qnil); | 9304 | return (! EQ (coding_system, Qundecided) ? coding_system : Qnil); |
| 9305 | } | 9305 | } |
| 9306 | 9306 | ||
diff --git a/src/coding.h b/src/coding.h index 2621928adc3..b694e6c6b6e 100644 --- a/src/coding.h +++ b/src/coding.h | |||
| @@ -457,7 +457,7 @@ struct coding_system | |||
| 457 | /* Number of error source data found in a decoding routine. */ | 457 | /* Number of error source data found in a decoding routine. */ |
| 458 | int errors; | 458 | int errors; |
| 459 | 459 | ||
| 460 | /* Store the positions of error source data. */ | 460 | /* Store the positions of error source data. */ |
| 461 | EMACS_INT *error_positions; | 461 | EMACS_INT *error_positions; |
| 462 | 462 | ||
| 463 | /* Finish status of code conversion. */ | 463 | /* Finish status of code conversion. */ |
diff --git a/src/dispnew.c b/src/dispnew.c index c9e4ec5c20e..2c0e74d0dde 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -608,9 +608,6 @@ adjust_glyph_matrix (struct window *w, struct glyph_matrix *matrix, int x, int y | |||
| 608 | row->glyphs[LAST_AREA] | 608 | row->glyphs[LAST_AREA] |
| 609 | = row->glyphs[LEFT_MARGIN_AREA] + dim.width; | 609 | = row->glyphs[LEFT_MARGIN_AREA] + dim.width; |
| 610 | } | 610 | } |
| 611 | xassert (!row->enabled_p | ||
| 612 | || row->mode_line_p | ||
| 613 | || verify_row_hash (row)); | ||
| 614 | ++row; | 611 | ++row; |
| 615 | } | 612 | } |
| 616 | } | 613 | } |
diff --git a/src/emacs.c b/src/emacs.c index 529fa35a5bd..6bfc0dc60d0 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -154,6 +154,8 @@ Lisp_Object Qfile_name_handler_alist; | |||
| 154 | 154 | ||
| 155 | Lisp_Object Qrisky_local_variable; | 155 | Lisp_Object Qrisky_local_variable; |
| 156 | 156 | ||
| 157 | Lisp_Object Qkill_emacs; | ||
| 158 | |||
| 157 | /* If non-zero, Emacs should not attempt to use a window-specific code, | 159 | /* If non-zero, Emacs should not attempt to use a window-specific code, |
| 158 | but instead should use the virtual terminal under which it was started. */ | 160 | but instead should use the virtual terminal under which it was started. */ |
| 159 | int inhibit_window_system; | 161 | int inhibit_window_system; |
| @@ -2394,6 +2396,7 @@ syms_of_emacs (void) | |||
| 2394 | { | 2396 | { |
| 2395 | DEFSYM (Qfile_name_handler_alist, "file-name-handler-alist"); | 2397 | DEFSYM (Qfile_name_handler_alist, "file-name-handler-alist"); |
| 2396 | DEFSYM (Qrisky_local_variable, "risky-local-variable"); | 2398 | DEFSYM (Qrisky_local_variable, "risky-local-variable"); |
| 2399 | DEFSYM (Qkill_emacs, "kill-emacs"); | ||
| 2397 | 2400 | ||
| 2398 | #ifndef CANNOT_DUMP | 2401 | #ifndef CANNOT_DUMP |
| 2399 | defsubr (&Sdump_emacs); | 2402 | defsubr (&Sdump_emacs); |
diff --git a/src/emacsgtkfixed.c b/src/emacsgtkfixed.c index aef1ffdf783..d9084bf9a98 100644 --- a/src/emacsgtkfixed.c +++ b/src/emacsgtkfixed.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* A Gtk Widget that inherits GtkFixed, but can be shrinked. | 1 | /* A Gtk Widget that inherits GtkFixed, but can be shrunk. |
| 2 | This file is only use when compiling with Gtk+ 3. | 2 | This file is only use when compiling with Gtk+ 3. |
| 3 | 3 | ||
| 4 | Copyright (C) 2011 Free Software Foundation, Inc. | 4 | Copyright (C) 2011 Free Software Foundation, Inc. |
diff --git a/src/emacsgtkfixed.h b/src/emacsgtkfixed.h index dbac136bd7f..c70e9a3efe3 100644 --- a/src/emacsgtkfixed.h +++ b/src/emacsgtkfixed.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* A Gtk Widget that inherits GtkFixed, but can be shrinked. | 1 | /* A Gtk Widget that inherits GtkFixed, but can be shrunk. |
| 2 | This file is only use when compiling with Gtk+ 3. | 2 | This file is only use when compiling with Gtk+ 3. |
| 3 | 3 | ||
| 4 | Copyright (C) 2011 Free Software Foundation, Inc. | 4 | Copyright (C) 2011 Free Software Foundation, Inc. |
diff --git a/src/eval.c b/src/eval.c index 32b9d366fc3..079c7ecb6c2 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -1629,6 +1629,18 @@ static Lisp_Object find_handler_clause (Lisp_Object, Lisp_Object); | |||
| 1629 | static int maybe_call_debugger (Lisp_Object conditions, Lisp_Object sig, | 1629 | static int maybe_call_debugger (Lisp_Object conditions, Lisp_Object sig, |
| 1630 | Lisp_Object data); | 1630 | Lisp_Object data); |
| 1631 | 1631 | ||
| 1632 | void | ||
| 1633 | process_quit_flag (void) | ||
| 1634 | { | ||
| 1635 | Lisp_Object flag = Vquit_flag; | ||
| 1636 | Vquit_flag = Qnil; | ||
| 1637 | if (EQ (flag, Qkill_emacs)) | ||
| 1638 | Fkill_emacs (Qnil); | ||
| 1639 | if (EQ (Vthrow_on_input, flag)) | ||
| 1640 | Fthrow (Vthrow_on_input, Qt); | ||
| 1641 | Fsignal (Qquit, Qnil); | ||
| 1642 | } | ||
| 1643 | |||
| 1632 | DEFUN ("signal", Fsignal, Ssignal, 2, 2, 0, | 1644 | DEFUN ("signal", Fsignal, Ssignal, 2, 2, 0, |
| 1633 | doc: /* Signal an error. Args are ERROR-SYMBOL and associated DATA. | 1645 | doc: /* Signal an error. Args are ERROR-SYMBOL and associated DATA. |
| 1634 | This function does not return. | 1646 | This function does not return. |
| @@ -3733,7 +3745,7 @@ When lexical binding is not being used, this variable is nil. | |||
| 3733 | A value of `(t)' indicates an empty environment, otherwise it is an | 3745 | A value of `(t)' indicates an empty environment, otherwise it is an |
| 3734 | alist of active lexical bindings. */); | 3746 | alist of active lexical bindings. */); |
| 3735 | Vinternal_interpreter_environment = Qnil; | 3747 | Vinternal_interpreter_environment = Qnil; |
| 3736 | /* Don't export this variable to Elisp, so noone can mess with it | 3748 | /* Don't export this variable to Elisp, so no one can mess with it |
| 3737 | (Just imagine if someone makes it buffer-local). */ | 3749 | (Just imagine if someone makes it buffer-local). */ |
| 3738 | Funintern (Qinternal_interpreter_environment, Qnil); | 3750 | Funintern (Qinternal_interpreter_environment, Qnil); |
| 3739 | 3751 | ||
diff --git a/src/fileio.c b/src/fileio.c index 5f7a8ad3972..c0f6c1d2e8e 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -4100,6 +4100,16 @@ variable `last-coding-system-used' to the coding system actually used. */) | |||
| 4100 | adjust_after_insert (PT, PT_BYTE, PT + inserted, PT_BYTE + inserted, | 4100 | adjust_after_insert (PT, PT_BYTE, PT + inserted, PT_BYTE + inserted, |
| 4101 | inserted); | 4101 | inserted); |
| 4102 | 4102 | ||
| 4103 | /* Call after-change hooks for the inserted text, aside from the case | ||
| 4104 | of normal visiting (not with REPLACE), which is done in a new buffer | ||
| 4105 | "before" the buffer is changed. */ | ||
| 4106 | if (inserted > 0 && total > 0 | ||
| 4107 | && (NILP (visit) || !NILP (replace))) | ||
| 4108 | { | ||
| 4109 | signal_after_change (PT, 0, inserted); | ||
| 4110 | update_compositions (PT, PT, CHECK_BORDER); | ||
| 4111 | } | ||
| 4112 | |||
| 4103 | /* Now INSERTED is measured in characters. */ | 4113 | /* Now INSERTED is measured in characters. */ |
| 4104 | 4114 | ||
| 4105 | handled: | 4115 | handled: |
| @@ -4270,16 +4280,6 @@ variable `last-coding-system-used' to the coding system actually used. */) | |||
| 4270 | unbind_to (count1, Qnil); | 4280 | unbind_to (count1, Qnil); |
| 4271 | } | 4281 | } |
| 4272 | 4282 | ||
| 4273 | /* Call after-change hooks for the inserted text, aside from the case | ||
| 4274 | of normal visiting (not with REPLACE), which is done in a new buffer | ||
| 4275 | "before" the buffer is changed. */ | ||
| 4276 | if (inserted > 0 && total > 0 | ||
| 4277 | && (NILP (visit) || !NILP (replace))) | ||
| 4278 | { | ||
| 4279 | signal_after_change (PT, 0, inserted); | ||
| 4280 | update_compositions (PT, PT, CHECK_BORDER); | ||
| 4281 | } | ||
| 4282 | |||
| 4283 | if (!NILP (visit) | 4283 | if (!NILP (visit) |
| 4284 | && current_buffer->modtime == -1) | 4284 | && current_buffer->modtime == -1) |
| 4285 | { | 4285 | { |
diff --git a/src/font.c b/src/font.c index 35f5703e32e..6ab65281a48 100644 --- a/src/font.c +++ b/src/font.c | |||
| @@ -614,7 +614,7 @@ static const struct | |||
| 614 | /* Function to validate PROP's value VAL, or NULL if any value is | 614 | /* Function to validate PROP's value VAL, or NULL if any value is |
| 615 | ok. The value is VAL or its regularized value if VAL is valid, | 615 | ok. The value is VAL or its regularized value if VAL is valid, |
| 616 | and Qerror if not. */ | 616 | and Qerror if not. */ |
| 617 | Lisp_Object (*validater) (Lisp_Object prop, Lisp_Object val); | 617 | Lisp_Object (*validator) (Lisp_Object prop, Lisp_Object val); |
| 618 | } font_property_table[] = | 618 | } font_property_table[] = |
| 619 | { { &QCtype, font_prop_validate_symbol }, | 619 | { { &QCtype, font_prop_validate_symbol }, |
| 620 | { &QCfoundry, font_prop_validate_symbol }, | 620 | { &QCfoundry, font_prop_validate_symbol }, |
| @@ -672,7 +672,7 @@ font_prop_validate (int idx, Lisp_Object prop, Lisp_Object val) | |||
| 672 | if (idx < 0) | 672 | if (idx < 0) |
| 673 | return val; | 673 | return val; |
| 674 | } | 674 | } |
| 675 | validated = (font_property_table[idx].validater) (prop, val); | 675 | validated = (font_property_table[idx].validator) (prop, val); |
| 676 | if (EQ (validated, Qerror)) | 676 | if (EQ (validated, Qerror)) |
| 677 | signal_error ("invalid font property", Fcons (prop, val)); | 677 | signal_error ("invalid font property", Fcons (prop, val)); |
| 678 | return validated; | 678 | return validated; |
| @@ -825,7 +825,7 @@ font_expand_wildcards (Lisp_Object *field, int n) | |||
| 825 | range_mask = (range_mask << 1) | 1; | 825 | range_mask = (range_mask << 1) | 1; |
| 826 | 826 | ||
| 827 | /* The triplet RANGE_FROM, RANGE_TO, and RANGE_MASK is a | 827 | /* The triplet RANGE_FROM, RANGE_TO, and RANGE_MASK is a |
| 828 | position-based retriction for FIELD[I]. */ | 828 | position-based restriction for FIELD[I]. */ |
| 829 | for (i = 0, range_from = 0, range_to = 14 - n; i < n; | 829 | for (i = 0, range_from = 0, range_to = 14 - n; i < n; |
| 830 | i++, range_from++, range_to++, range_mask <<= 1) | 830 | i++, range_from++, range_to++, range_mask <<= 1) |
| 831 | { | 831 | { |
| @@ -842,7 +842,7 @@ font_expand_wildcards (Lisp_Object *field, int n) | |||
| 842 | else | 842 | else |
| 843 | { | 843 | { |
| 844 | /* The triplet FROM, TO, and MASK is a value-based | 844 | /* The triplet FROM, TO, and MASK is a value-based |
| 845 | retriction for FIELD[I]. */ | 845 | restriction for FIELD[I]. */ |
| 846 | int from, to; | 846 | int from, to; |
| 847 | unsigned mask; | 847 | unsigned mask; |
| 848 | 848 | ||
diff --git a/src/fontset.c b/src/fontset.c index 7592521cc7d..605d807aa3c 100644 --- a/src/fontset.c +++ b/src/fontset.c | |||
| @@ -166,7 +166,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 166 | These structures are hidden from the other codes than this file. | 166 | These structures are hidden from the other codes than this file. |
| 167 | The other codes handle fontsets only by their ID numbers. They | 167 | The other codes handle fontsets only by their ID numbers. They |
| 168 | usually use the variable name `fontset' for IDs. But, in this | 168 | usually use the variable name `fontset' for IDs. But, in this |
| 169 | file, we always use varialbe name `id' for IDs, and name `fontset' | 169 | file, we always use variable name `id' for IDs, and name `fontset' |
| 170 | for an actual fontset object, i.e., char-table. | 170 | for an actual fontset object, i.e., char-table. |
| 171 | 171 | ||
| 172 | */ | 172 | */ |
diff --git a/src/frame.c b/src/frame.c index 039ed6543cb..bd97c5f18c7 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -1929,7 +1929,7 @@ request a switch to FOCUS-FRAME, and `last-event-frame' will be | |||
| 1929 | FOCUS-FRAME after reading an event typed at FRAME. | 1929 | FOCUS-FRAME after reading an event typed at FRAME. |
| 1930 | 1930 | ||
| 1931 | If FOCUS-FRAME is omitted or nil, any existing redirection is | 1931 | If FOCUS-FRAME is omitted or nil, any existing redirection is |
| 1932 | cancelled, and the frame again receives its own keystrokes. | 1932 | canceled, and the frame again receives its own keystrokes. |
| 1933 | 1933 | ||
| 1934 | Focus redirection is useful for temporarily redirecting keystrokes to | 1934 | Focus redirection is useful for temporarily redirecting keystrokes to |
| 1935 | a surrogate minibuffer frame when a frame doesn't have its own | 1935 | a surrogate minibuffer frame when a frame doesn't have its own |
diff --git a/src/ftfont.c b/src/ftfont.c index 5c540f9bf82..c48346b0147 100644 --- a/src/ftfont.c +++ b/src/ftfont.c | |||
| @@ -1462,7 +1462,7 @@ ftfont_get_bitmap (struct font *font, unsigned int code, struct font_bitmap *bit | |||
| 1462 | : ft_face->glyph->bitmap.pixel_mode == FT_PIXEL_MODE_LCD_V ? 8 | 1462 | : ft_face->glyph->bitmap.pixel_mode == FT_PIXEL_MODE_LCD_V ? 8 |
| 1463 | : -1); | 1463 | : -1); |
| 1464 | if (bitmap->bits_per_pixel < 0) | 1464 | if (bitmap->bits_per_pixel < 0) |
| 1465 | /* We don't suport that kind of pixel mode. */ | 1465 | /* We don't support that kind of pixel mode. */ |
| 1466 | return -1; | 1466 | return -1; |
| 1467 | bitmap->rows = ft_face->glyph->bitmap.rows; | 1467 | bitmap->rows = ft_face->glyph->bitmap.rows; |
| 1468 | bitmap->width = ft_face->glyph->bitmap.width; | 1468 | bitmap->width = ft_face->glyph->bitmap.width; |
diff --git a/src/keyboard.c b/src/keyboard.c index e74c7ca1c68..a114e495cf7 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -464,7 +464,7 @@ static void input_available_signal (int signo); | |||
| 464 | static Lisp_Object (Fcommand_execute) (Lisp_Object, Lisp_Object, Lisp_Object, | 464 | static Lisp_Object (Fcommand_execute) (Lisp_Object, Lisp_Object, Lisp_Object, |
| 465 | Lisp_Object); | 465 | Lisp_Object); |
| 466 | static void handle_interrupt (void); | 466 | static void handle_interrupt (void); |
| 467 | static void quit_throw_to_read_char (void) NO_RETURN; | 467 | static void quit_throw_to_read_char (int) NO_RETURN; |
| 468 | static void timer_start_idle (void); | 468 | static void timer_start_idle (void); |
| 469 | static void timer_stop_idle (void); | 469 | static void timer_stop_idle (void); |
| 470 | static void timer_resume_idle (void); | 470 | static void timer_resume_idle (void); |
| @@ -653,7 +653,7 @@ echo_now (void) | |||
| 653 | echo_kboard = current_kboard; | 653 | echo_kboard = current_kboard; |
| 654 | 654 | ||
| 655 | if (waiting_for_input && !NILP (Vquit_flag)) | 655 | if (waiting_for_input && !NILP (Vquit_flag)) |
| 656 | quit_throw_to_read_char (); | 656 | quit_throw_to_read_char (0); |
| 657 | } | 657 | } |
| 658 | 658 | ||
| 659 | /* Turn off echoing, for the start of a new command. */ | 659 | /* Turn off echoing, for the start of a new command. */ |
| @@ -3817,7 +3817,7 @@ kbd_buffer_get_event (KBOARD **kbp, | |||
| 3817 | /* If the quit flag is set, then read_char will return | 3817 | /* If the quit flag is set, then read_char will return |
| 3818 | quit_char, so that counts as "available input." */ | 3818 | quit_char, so that counts as "available input." */ |
| 3819 | if (!NILP (Vquit_flag)) | 3819 | if (!NILP (Vquit_flag)) |
| 3820 | quit_throw_to_read_char (); | 3820 | quit_throw_to_read_char (0); |
| 3821 | 3821 | ||
| 3822 | /* One way or another, wait until input is available; then, if | 3822 | /* One way or another, wait until input is available; then, if |
| 3823 | interrupt handlers have not read it, read it now. */ | 3823 | interrupt handlers have not read it, read it now. */ |
| @@ -10824,7 +10824,7 @@ set_waiting_for_input (struct timeval *time_to_clear) | |||
| 10824 | /* If handle_interrupt was called before and buffered a C-g, | 10824 | /* If handle_interrupt was called before and buffered a C-g, |
| 10825 | make it run again now, to avoid timing error. */ | 10825 | make it run again now, to avoid timing error. */ |
| 10826 | if (!NILP (Vquit_flag)) | 10826 | if (!NILP (Vquit_flag)) |
| 10827 | quit_throw_to_read_char (); | 10827 | quit_throw_to_read_char (0); |
| 10828 | } | 10828 | } |
| 10829 | 10829 | ||
| 10830 | void | 10830 | void |
| @@ -10839,7 +10839,7 @@ clear_waiting_for_input (void) | |||
| 10839 | 10839 | ||
| 10840 | If we have a frame on the controlling tty, we assume that the | 10840 | If we have a frame on the controlling tty, we assume that the |
| 10841 | SIGINT was generated by C-g, so we call handle_interrupt. | 10841 | SIGINT was generated by C-g, so we call handle_interrupt. |
| 10842 | Otherwise, the handler kills Emacs. */ | 10842 | Otherwise, tell QUIT to kill Emacs. */ |
| 10843 | 10843 | ||
| 10844 | static void | 10844 | static void |
| 10845 | interrupt_signal (int signalnum) /* If we don't have an argument, some */ | 10845 | interrupt_signal (int signalnum) /* If we don't have an argument, some */ |
| @@ -10856,12 +10856,10 @@ interrupt_signal (int signalnum) /* If we don't have an argument, some */ | |||
| 10856 | if (!terminal) | 10856 | if (!terminal) |
| 10857 | { | 10857 | { |
| 10858 | /* If there are no frames there, let's pretend that we are a | 10858 | /* If there are no frames there, let's pretend that we are a |
| 10859 | well-behaving UN*X program and quit. We cannot do that while | 10859 | well-behaving UN*X program and quit. We must not call Lisp |
| 10860 | GC is in progress, though. */ | 10860 | in a signal handler, so tell QUIT to exit when it is |
| 10861 | if (!gc_in_progress) | 10861 | safe. */ |
| 10862 | Fkill_emacs (Qnil); | 10862 | Vquit_flag = Qkill_emacs; |
| 10863 | else | ||
| 10864 | Vquit_flag = Qt; | ||
| 10865 | } | 10863 | } |
| 10866 | else | 10864 | else |
| 10867 | { | 10865 | { |
| @@ -11010,15 +11008,20 @@ handle_interrupt (void) | |||
| 11010 | separate event loop thread like W32. */ | 11008 | separate event loop thread like W32. */ |
| 11011 | #ifndef HAVE_NS | 11009 | #ifndef HAVE_NS |
| 11012 | if (waiting_for_input && !echoing) | 11010 | if (waiting_for_input && !echoing) |
| 11013 | quit_throw_to_read_char (); | 11011 | quit_throw_to_read_char (1); |
| 11014 | #endif | 11012 | #endif |
| 11015 | } | 11013 | } |
| 11016 | 11014 | ||
| 11017 | /* Handle a C-g by making read_char return C-g. */ | 11015 | /* Handle a C-g by making read_char return C-g. */ |
| 11018 | 11016 | ||
| 11019 | static void | 11017 | static void |
| 11020 | quit_throw_to_read_char (void) | 11018 | quit_throw_to_read_char (int from_signal) |
| 11021 | { | 11019 | { |
| 11020 | /* When not called from a signal handler it is safe to call | ||
| 11021 | Lisp. */ | ||
| 11022 | if (!from_signal && EQ (Vquit_flag, Qkill_emacs)) | ||
| 11023 | Fkill_emacs (Qnil); | ||
| 11024 | |||
| 11022 | sigfree (); | 11025 | sigfree (); |
| 11023 | /* Prevent another signal from doing this before we finish. */ | 11026 | /* Prevent another signal from doing this before we finish. */ |
| 11024 | clear_waiting_for_input (); | 11027 | clear_waiting_for_input (); |
| @@ -12245,7 +12248,7 @@ text in the region before modifying the buffer. The next | |||
| 12245 | DEFVAR_LISP ("debug-on-event", | 12248 | DEFVAR_LISP ("debug-on-event", |
| 12246 | Vdebug_on_event, | 12249 | Vdebug_on_event, |
| 12247 | doc: /* Enter debugger on this event. When Emacs | 12250 | doc: /* Enter debugger on this event. When Emacs |
| 12248 | receives the special event specifed by this variable, it will try to | 12251 | receives the special event specified by this variable, it will try to |
| 12249 | break into the debugger as soon as possible instead of processing the | 12252 | break into the debugger as soon as possible instead of processing the |
| 12250 | event normally through `special-event-map'. | 12253 | event normally through `special-event-map'. |
| 12251 | 12254 | ||
diff --git a/src/lisp.h b/src/lisp.h index e645fbd65a5..a80d39765e0 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -2128,7 +2128,10 @@ extern char *stack_bottom; | |||
| 2128 | Exception: if you set immediate_quit to nonzero, | 2128 | Exception: if you set immediate_quit to nonzero, |
| 2129 | then the handler that responds to the C-g does the quit itself. | 2129 | then the handler that responds to the C-g does the quit itself. |
| 2130 | This is a good thing to do around a loop that has no side effects | 2130 | This is a good thing to do around a loop that has no side effects |
| 2131 | and (in particular) cannot call arbitrary Lisp code. */ | 2131 | and (in particular) cannot call arbitrary Lisp code. |
| 2132 | |||
| 2133 | If quit-flag is set to `kill-emacs' the SIGINT handler has received | ||
| 2134 | a request to exit Emacs when it is safe to do. */ | ||
| 2132 | 2135 | ||
| 2133 | #ifdef SYNC_INPUT | 2136 | #ifdef SYNC_INPUT |
| 2134 | extern void process_pending_signals (void); | 2137 | extern void process_pending_signals (void); |
| @@ -2140,16 +2143,11 @@ extern int pending_signals; | |||
| 2140 | #define ELSE_PENDING_SIGNALS | 2143 | #define ELSE_PENDING_SIGNALS |
| 2141 | #endif /* not SYNC_INPUT */ | 2144 | #endif /* not SYNC_INPUT */ |
| 2142 | 2145 | ||
| 2146 | extern void process_quit_flag (void); | ||
| 2143 | #define QUIT \ | 2147 | #define QUIT \ |
| 2144 | do { \ | 2148 | do { \ |
| 2145 | if (!NILP (Vquit_flag) && NILP (Vinhibit_quit)) \ | 2149 | if (!NILP (Vquit_flag) && NILP (Vinhibit_quit)) \ |
| 2146 | { \ | 2150 | process_quit_flag (); \ |
| 2147 | Lisp_Object flag = Vquit_flag; \ | ||
| 2148 | Vquit_flag = Qnil; \ | ||
| 2149 | if (EQ (Vthrow_on_input, flag)) \ | ||
| 2150 | Fthrow (Vthrow_on_input, Qt); \ | ||
| 2151 | Fsignal (Qquit, Qnil); \ | ||
| 2152 | } \ | ||
| 2153 | ELSE_PENDING_SIGNALS \ | 2151 | ELSE_PENDING_SIGNALS \ |
| 2154 | } while (0) | 2152 | } while (0) |
| 2155 | 2153 | ||
| @@ -3291,6 +3289,7 @@ extern Lisp_Object Qfile_name_handler_alist; | |||
| 3291 | #ifdef FLOAT_CATCH_SIGILL | 3289 | #ifdef FLOAT_CATCH_SIGILL |
| 3292 | extern void fatal_error_signal (int); | 3290 | extern void fatal_error_signal (int); |
| 3293 | #endif | 3291 | #endif |
| 3292 | extern Lisp_Object Qkill_emacs; | ||
| 3294 | EXFUN (Fkill_emacs, 1) NO_RETURN; | 3293 | EXFUN (Fkill_emacs, 1) NO_RETURN; |
| 3295 | #if HAVE_SETLOCALE | 3294 | #if HAVE_SETLOCALE |
| 3296 | void fixup_locale (void); | 3295 | void fixup_locale (void); |
diff --git a/src/nsfns.m b/src/nsfns.m index 280fee0b27b..482650fab2b 100644 --- a/src/nsfns.m +++ b/src/nsfns.m | |||
| @@ -1076,7 +1076,41 @@ unwind_create_frame (Lisp_Object frame) | |||
| 1076 | return Qnil; | 1076 | return Qnil; |
| 1077 | } | 1077 | } |
| 1078 | 1078 | ||
| 1079 | /* | ||
| 1080 | * Read geometry related parameters from preferences if not in PARMS. | ||
| 1081 | * Returns the union of parms and any preferences read. | ||
| 1082 | */ | ||
| 1083 | |||
| 1084 | static Lisp_Object | ||
| 1085 | get_geometry_from_preferences (struct ns_display_info *dpyinfo, | ||
| 1086 | Lisp_Object parms) | ||
| 1087 | { | ||
| 1088 | struct { | ||
| 1089 | const char *val; | ||
| 1090 | const char *cls; | ||
| 1091 | Lisp_Object tem; | ||
| 1092 | } r[] = { | ||
| 1093 | { "width", "Width", Qwidth }, | ||
| 1094 | { "height", "Height", Qheight }, | ||
| 1095 | { "left", "Left", Qleft }, | ||
| 1096 | { "top", "Top", Qtop }, | ||
| 1097 | }; | ||
| 1098 | |||
| 1099 | int i; | ||
| 1100 | for (i = 0; i < sizeof (r)/sizeof (r[0]); ++i) | ||
| 1101 | { | ||
| 1102 | if (NILP (Fassq (r[i].tem, parms))) | ||
| 1103 | { | ||
| 1104 | Lisp_Object value | ||
| 1105 | = x_get_arg (dpyinfo, parms, r[i].tem, r[i].val, r[i].cls, | ||
| 1106 | RES_TYPE_NUMBER); | ||
| 1107 | if (! EQ (value, Qunbound)) | ||
| 1108 | parms = Fcons (Fcons (r[i].tem, value), parms); | ||
| 1109 | } | ||
| 1110 | } | ||
| 1079 | 1111 | ||
| 1112 | return parms; | ||
| 1113 | } | ||
| 1080 | 1114 | ||
| 1081 | /* ========================================================================== | 1115 | /* ========================================================================== |
| 1082 | 1116 | ||
| @@ -1285,6 +1319,7 @@ This function is an internal primitive--use `make-frame' instead. */) | |||
| 1285 | x_default_parameter (f, parms, Qtitle, Qnil, "title", "Title", | 1319 | x_default_parameter (f, parms, Qtitle, Qnil, "title", "Title", |
| 1286 | RES_TYPE_STRING); | 1320 | RES_TYPE_STRING); |
| 1287 | 1321 | ||
| 1322 | parms = get_geometry_from_preferences (dpyinfo, parms); | ||
| 1288 | window_prompting = x_figure_window_size (f, parms, 1); | 1323 | window_prompting = x_figure_window_size (f, parms, 1); |
| 1289 | 1324 | ||
| 1290 | tem = x_get_arg (dpyinfo, parms, Qunsplittable, 0, 0, RES_TYPE_BOOLEAN); | 1325 | tem = x_get_arg (dpyinfo, parms, Qunsplittable, 0, 0, RES_TYPE_BOOLEAN); |
diff --git a/src/search.c b/src/search.c index fe4ce534b0b..811ac74e194 100644 --- a/src/search.c +++ b/src/search.c | |||
| @@ -83,11 +83,10 @@ static struct re_registers search_regs; | |||
| 83 | Qnil if no searching has been done yet. */ | 83 | Qnil if no searching has been done yet. */ |
| 84 | static Lisp_Object last_thing_searched; | 84 | static Lisp_Object last_thing_searched; |
| 85 | 85 | ||
| 86 | /* error condition signaled when regexp compile_pattern fails */ | 86 | /* Error condition signaled when regexp compile_pattern fails. */ |
| 87 | |||
| 88 | static Lisp_Object Qinvalid_regexp; | 87 | static Lisp_Object Qinvalid_regexp; |
| 89 | 88 | ||
| 90 | /* Error condition used for failing searches */ | 89 | /* Error condition used for failing searches. */ |
| 91 | static Lisp_Object Qsearch_failed; | 90 | static Lisp_Object Qsearch_failed; |
| 92 | 91 | ||
| 93 | static void set_search_regs (EMACS_INT, EMACS_INT); | 92 | static void set_search_regs (EMACS_INT, EMACS_INT); |
| @@ -2078,13 +2077,16 @@ set_search_regs (EMACS_INT beg_byte, EMACS_INT nbytes) | |||
| 2078 | XSETBUFFER (last_thing_searched, current_buffer); | 2077 | XSETBUFFER (last_thing_searched, current_buffer); |
| 2079 | } | 2078 | } |
| 2080 | 2079 | ||
| 2081 | /* Given STRING, a string of words separated by word delimiters, | 2080 | DEFUN ("word-search-regexp", Fword_search_regexp, Sword_search_regexp, 1, 2, 0, |
| 2082 | compute a regexp that matches those exact words separated by | 2081 | doc: /* Return a regexp which matches words, ignoring punctuation. |
| 2083 | arbitrary punctuation. If LAX is nonzero, the end of the string | 2082 | Given STRING, a string of words separated by word delimiters, |
| 2084 | need not match a word boundary unless it ends in whitespace. */ | 2083 | compute a regexp that matches those exact words separated by |
| 2085 | 2084 | arbitrary punctuation. If LAX is non-nil, the end of the string | |
| 2086 | static Lisp_Object | 2085 | need not match a word boundary unless it ends in whitespace. |
| 2087 | wordify (Lisp_Object string, int lax) | 2086 | |
| 2087 | Used in `word-search-forward', `word-search-backward', | ||
| 2088 | `word-search-forward-lax', `word-search-backward-lax'. */) | ||
| 2089 | (Lisp_Object string, Lisp_Object lax) | ||
| 2088 | { | 2090 | { |
| 2089 | register unsigned char *o; | 2091 | register unsigned char *o; |
| 2090 | register EMACS_INT i, i_byte, len, punct_count = 0, word_count = 0; | 2092 | register EMACS_INT i, i_byte, len, punct_count = 0, word_count = 0; |
| @@ -2125,7 +2127,7 @@ wordify (Lisp_Object string, int lax) | |||
| 2125 | } | 2127 | } |
| 2126 | 2128 | ||
| 2127 | adjust = - punct_count + 5 * (word_count - 1) | 2129 | adjust = - punct_count + 5 * (word_count - 1) |
| 2128 | + ((lax && !whitespace_at_end) ? 2 : 4); | 2130 | + ((!NILP (lax) && !whitespace_at_end) ? 2 : 4); |
| 2129 | if (STRING_MULTIBYTE (string)) | 2131 | if (STRING_MULTIBYTE (string)) |
| 2130 | val = make_uninit_multibyte_string (len + adjust, | 2132 | val = make_uninit_multibyte_string (len + adjust, |
| 2131 | SBYTES (string) | 2133 | SBYTES (string) |
| @@ -2162,7 +2164,7 @@ wordify (Lisp_Object string, int lax) | |||
| 2162 | prev_c = c; | 2164 | prev_c = c; |
| 2163 | } | 2165 | } |
| 2164 | 2166 | ||
| 2165 | if (!lax || whitespace_at_end) | 2167 | if (NILP (lax) || whitespace_at_end) |
| 2166 | { | 2168 | { |
| 2167 | *o++ = '\\'; | 2169 | *o++ = '\\'; |
| 2168 | *o++ = 'b'; | 2170 | *o++ = 'b'; |
| @@ -2217,10 +2219,14 @@ An optional second argument bounds the search; it is a buffer position. | |||
| 2217 | The match found must not extend before that position. | 2219 | The match found must not extend before that position. |
| 2218 | Optional third argument, if t, means if fail just return nil (no error). | 2220 | Optional third argument, if t, means if fail just return nil (no error). |
| 2219 | If not nil and not t, move to limit of search and return nil. | 2221 | If not nil and not t, move to limit of search and return nil. |
| 2220 | Optional fourth argument is repeat count--search for successive occurrences. */) | 2222 | Optional fourth argument is repeat count--search for successive occurrences. |
| 2223 | |||
| 2224 | Relies on the function `word-search-regexp' to convert a sequence | ||
| 2225 | of words in STRING to a regexp used to search words without regard | ||
| 2226 | to punctuation. */) | ||
| 2221 | (Lisp_Object string, Lisp_Object bound, Lisp_Object noerror, Lisp_Object count) | 2227 | (Lisp_Object string, Lisp_Object bound, Lisp_Object noerror, Lisp_Object count) |
| 2222 | { | 2228 | { |
| 2223 | return search_command (wordify (string, 0), bound, noerror, count, -1, 1, 0); | 2229 | return search_command (Fword_search_regexp (string, Qnil), bound, noerror, count, -1, 1, 0); |
| 2224 | } | 2230 | } |
| 2225 | 2231 | ||
| 2226 | DEFUN ("word-search-forward", Fword_search_forward, Sword_search_forward, 1, 4, | 2232 | DEFUN ("word-search-forward", Fword_search_forward, Sword_search_forward, 1, 4, |
| @@ -2231,10 +2237,14 @@ An optional second argument bounds the search; it is a buffer position. | |||
| 2231 | The match found must not extend after that position. | 2237 | The match found must not extend after that position. |
| 2232 | Optional third argument, if t, means if fail just return nil (no error). | 2238 | Optional third argument, if t, means if fail just return nil (no error). |
| 2233 | If not nil and not t, move to limit of search and return nil. | 2239 | If not nil and not t, move to limit of search and return nil. |
| 2234 | Optional fourth argument is repeat count--search for successive occurrences. */) | 2240 | Optional fourth argument is repeat count--search for successive occurrences. |
| 2241 | |||
| 2242 | Relies on the function `word-search-regexp' to convert a sequence | ||
| 2243 | of words in STRING to a regexp used to search words without regard | ||
| 2244 | to punctuation. */) | ||
| 2235 | (Lisp_Object string, Lisp_Object bound, Lisp_Object noerror, Lisp_Object count) | 2245 | (Lisp_Object string, Lisp_Object bound, Lisp_Object noerror, Lisp_Object count) |
| 2236 | { | 2246 | { |
| 2237 | return search_command (wordify (string, 0), bound, noerror, count, 1, 1, 0); | 2247 | return search_command (Fword_search_regexp (string, Qnil), bound, noerror, count, 1, 1, 0); |
| 2238 | } | 2248 | } |
| 2239 | 2249 | ||
| 2240 | DEFUN ("word-search-backward-lax", Fword_search_backward_lax, Sword_search_backward_lax, 1, 4, | 2250 | DEFUN ("word-search-backward-lax", Fword_search_backward_lax, Sword_search_backward_lax, 1, 4, |
| @@ -2249,10 +2259,14 @@ An optional second argument bounds the search; it is a buffer position. | |||
| 2249 | The match found must not extend before that position. | 2259 | The match found must not extend before that position. |
| 2250 | Optional third argument, if t, means if fail just return nil (no error). | 2260 | Optional third argument, if t, means if fail just return nil (no error). |
| 2251 | If not nil and not t, move to limit of search and return nil. | 2261 | If not nil and not t, move to limit of search and return nil. |
| 2252 | Optional fourth argument is repeat count--search for successive occurrences. */) | 2262 | Optional fourth argument is repeat count--search for successive occurrences. |
| 2263 | |||
| 2264 | Relies on the function `word-search-regexp' to convert a sequence | ||
| 2265 | of words in STRING to a regexp used to search words without regard | ||
| 2266 | to punctuation. */) | ||
| 2253 | (Lisp_Object string, Lisp_Object bound, Lisp_Object noerror, Lisp_Object count) | 2267 | (Lisp_Object string, Lisp_Object bound, Lisp_Object noerror, Lisp_Object count) |
| 2254 | { | 2268 | { |
| 2255 | return search_command (wordify (string, 1), bound, noerror, count, -1, 1, 0); | 2269 | return search_command (Fword_search_regexp (string, Qt), bound, noerror, count, -1, 1, 0); |
| 2256 | } | 2270 | } |
| 2257 | 2271 | ||
| 2258 | DEFUN ("word-search-forward-lax", Fword_search_forward_lax, Sword_search_forward_lax, 1, 4, | 2272 | DEFUN ("word-search-forward-lax", Fword_search_forward_lax, Sword_search_forward_lax, 1, 4, |
| @@ -2267,10 +2281,14 @@ An optional second argument bounds the search; it is a buffer position. | |||
| 2267 | The match found must not extend after that position. | 2281 | The match found must not extend after that position. |
| 2268 | Optional third argument, if t, means if fail just return nil (no error). | 2282 | Optional third argument, if t, means if fail just return nil (no error). |
| 2269 | If not nil and not t, move to limit of search and return nil. | 2283 | If not nil and not t, move to limit of search and return nil. |
| 2270 | Optional fourth argument is repeat count--search for successive occurrences. */) | 2284 | Optional fourth argument is repeat count--search for successive occurrences. |
| 2285 | |||
| 2286 | Relies on the function `word-search-regexp' to convert a sequence | ||
| 2287 | of words in STRING to a regexp used to search words without regard | ||
| 2288 | to punctuation. */) | ||
| 2271 | (Lisp_Object string, Lisp_Object bound, Lisp_Object noerror, Lisp_Object count) | 2289 | (Lisp_Object string, Lisp_Object bound, Lisp_Object noerror, Lisp_Object count) |
| 2272 | { | 2290 | { |
| 2273 | return search_command (wordify (string, 1), bound, noerror, count, 1, 1, 0); | 2291 | return search_command (Fword_search_regexp (string, Qt), bound, noerror, count, 1, 1, 0); |
| 2274 | } | 2292 | } |
| 2275 | 2293 | ||
| 2276 | DEFUN ("re-search-backward", Fre_search_backward, Sre_search_backward, 1, 4, | 2294 | DEFUN ("re-search-backward", Fre_search_backward, Sre_search_backward, 1, 4, |
| @@ -3229,6 +3247,7 @@ is to bind it with `let' around a small expression. */); | |||
| 3229 | defsubr (&Sposix_string_match); | 3247 | defsubr (&Sposix_string_match); |
| 3230 | defsubr (&Ssearch_forward); | 3248 | defsubr (&Ssearch_forward); |
| 3231 | defsubr (&Ssearch_backward); | 3249 | defsubr (&Ssearch_backward); |
| 3250 | defsubr (&Sword_search_regexp); | ||
| 3232 | defsubr (&Sword_search_forward); | 3251 | defsubr (&Sword_search_forward); |
| 3233 | defsubr (&Sword_search_backward); | 3252 | defsubr (&Sword_search_backward); |
| 3234 | defsubr (&Sword_search_forward_lax); | 3253 | defsubr (&Sword_search_forward_lax); |
diff --git a/src/sysdep.c b/src/sysdep.c index ae200308bf3..b111fa1324c 100644 --- a/src/sysdep.c +++ b/src/sysdep.c | |||
| @@ -433,7 +433,7 @@ child_setup_tty (int out) | |||
| 433 | #endif /* AIX */ | 433 | #endif /* AIX */ |
| 434 | 434 | ||
| 435 | /* We originally enabled ICANON (and set VEOF to 04), and then had | 435 | /* We originally enabled ICANON (and set VEOF to 04), and then had |
| 436 | proces.c send additional EOF chars to flush the output when faced | 436 | process.c send additional EOF chars to flush the output when faced |
| 437 | with long lines, but this leads to weird effects when the | 437 | with long lines, but this leads to weird effects when the |
| 438 | subprocess has disabled ICANON and ends up seeing those spurious | 438 | subprocess has disabled ICANON and ends up seeing those spurious |
| 439 | extra EOFs. So we don't send EOFs any more in | 439 | extra EOFs. So we don't send EOFs any more in |
diff --git a/src/term.c b/src/term.c index 4a671d048c4..ae505f020f2 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -3236,7 +3236,7 @@ use the Bourne shell command `TERM=... export TERM' (C-shell:\n\ | |||
| 3236 | MultiLeft (tty) = tgetstr ("LE", address); | 3236 | MultiLeft (tty) = tgetstr ("LE", address); |
| 3237 | MultiRight (tty) = tgetstr ("RI", address); | 3237 | MultiRight (tty) = tgetstr ("RI", address); |
| 3238 | 3238 | ||
| 3239 | /* SVr4/ANSI color suppert. If "op" isn't available, don't support | 3239 | /* SVr4/ANSI color support. If "op" isn't available, don't support |
| 3240 | color because we can't switch back to the default foreground and | 3240 | color because we can't switch back to the default foreground and |
| 3241 | background. */ | 3241 | background. */ |
| 3242 | tty->TS_orig_pair = tgetstr ("op", address); | 3242 | tty->TS_orig_pair = tgetstr ("op", address); |
diff --git a/src/w32fns.c b/src/w32fns.c index 7a17c108d4d..822e3530bb6 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -2417,7 +2417,7 @@ complete_deferred_msg (HWND hwnd, UINT msg, LRESULT result) | |||
| 2417 | deferred_msg * msg_buf = find_deferred_msg (hwnd, msg); | 2417 | deferred_msg * msg_buf = find_deferred_msg (hwnd, msg); |
| 2418 | 2418 | ||
| 2419 | if (msg_buf == NULL) | 2419 | if (msg_buf == NULL) |
| 2420 | /* Message may have been cancelled, so don't abort. */ | 2420 | /* Message may have been canceled, so don't abort. */ |
| 2421 | return; | 2421 | return; |
| 2422 | 2422 | ||
| 2423 | msg_buf->result = result; | 2423 | msg_buf->result = result; |
| @@ -2538,7 +2538,7 @@ post_character_message (HWND hwnd, UINT msg, | |||
| 2538 | the lisp thread to respond. | 2538 | the lisp thread to respond. |
| 2539 | 2539 | ||
| 2540 | Note that we don't want to block the input thread waiting for | 2540 | Note that we don't want to block the input thread waiting for |
| 2541 | a reponse from the lisp thread (although that would at least | 2541 | a response from the lisp thread (although that would at least |
| 2542 | solve the deadlock problem above), because we want to be able | 2542 | solve the deadlock problem above), because we want to be able |
| 2543 | to receive C-g to interrupt the lisp thread. */ | 2543 | to receive C-g to interrupt the lisp thread. */ |
| 2544 | cancel_all_deferred_msgs (); | 2544 | cancel_all_deferred_msgs (); |
| @@ -3749,7 +3749,7 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) | |||
| 3749 | flags |= TPM_RIGHTBUTTON; | 3749 | flags |= TPM_RIGHTBUTTON; |
| 3750 | 3750 | ||
| 3751 | /* Remember we did a SetCapture on the initial mouse down event, | 3751 | /* Remember we did a SetCapture on the initial mouse down event, |
| 3752 | so for safety, we make sure the capture is cancelled now. */ | 3752 | so for safety, we make sure the capture is canceled now. */ |
| 3753 | ReleaseCapture (); | 3753 | ReleaseCapture (); |
| 3754 | button_state = 0; | 3754 | button_state = 0; |
| 3755 | 3755 | ||
| @@ -4951,7 +4951,7 @@ If TYPE is nil or omitted, get the property as a string. | |||
| 4951 | Otherwise TYPE is the name of the atom that denotes the type expected. | 4951 | Otherwise TYPE is the name of the atom that denotes the type expected. |
| 4952 | If SOURCE is non-nil, get the property on that window instead of from | 4952 | If SOURCE is non-nil, get the property on that window instead of from |
| 4953 | FRAME. The number 0 denotes the root window. | 4953 | FRAME. The number 0 denotes the root window. |
| 4954 | If DELETE_P is non-nil, delete the property after retreiving it. | 4954 | If DELETE_P is non-nil, delete the property after retrieving it. |
| 4955 | If VECTOR_RET_P is non-nil, don't return a string but a vector of values. | 4955 | If VECTOR_RET_P is non-nil, don't return a string but a vector of values. |
| 4956 | 4956 | ||
| 4957 | Value is nil if FRAME hasn't a property with name PROP or if PROP has | 4957 | Value is nil if FRAME hasn't a property with name PROP or if PROP has |
| @@ -6032,7 +6032,7 @@ Otherwise, if ONLY-DIR-P is non-nil, the user can only select directories. */) | |||
| 6032 | 6032 | ||
| 6033 | file = DECODE_FILE (build_string (filename)); | 6033 | file = DECODE_FILE (build_string (filename)); |
| 6034 | } | 6034 | } |
| 6035 | /* User cancelled the dialog without making a selection. */ | 6035 | /* User canceled the dialog without making a selection. */ |
| 6036 | else if (!CommDlgExtendedError ()) | 6036 | else if (!CommDlgExtendedError ()) |
| 6037 | file = Qnil; | 6037 | file = Qnil; |
| 6038 | /* An error occurred, fallback on reading from the mini-buffer. */ | 6038 | /* An error occurred, fallback on reading from the mini-buffer. */ |
diff --git a/src/w32term.h b/src/w32term.h index 6c73daba601..f587ee11af9 100644 --- a/src/w32term.h +++ b/src/w32term.h | |||
| @@ -229,7 +229,7 @@ enum | |||
| 229 | { | 229 | { |
| 230 | /* Values for focus_state, used as bit mask. | 230 | /* Values for focus_state, used as bit mask. |
| 231 | EXPLICIT means we received a FocusIn for the frame and know it has | 231 | EXPLICIT means we received a FocusIn for the frame and know it has |
| 232 | the focus. IMPLICIT means we recevied an EnterNotify and the frame | 232 | the focus. IMPLICIT means we received an EnterNotify and the frame |
| 233 | may have the focus if no window manager is running. | 233 | may have the focus if no window manager is running. |
| 234 | FocusOut and LeaveNotify clears EXPLICIT/IMPLICIT. */ | 234 | FocusOut and LeaveNotify clears EXPLICIT/IMPLICIT. */ |
| 235 | FOCUS_NONE = 0, | 235 | FOCUS_NONE = 0, |
diff --git a/src/widget.c b/src/widget.c index 181811b8369..96bfd4787e9 100644 --- a/src/widget.c +++ b/src/widget.c | |||
| @@ -476,6 +476,9 @@ update_wm_hints (EmacsFrame ew) | |||
| 476 | int base_height; | 476 | int base_height; |
| 477 | int min_rows = 0, min_cols = 0; | 477 | int min_rows = 0, min_cols = 0; |
| 478 | 478 | ||
| 479 | /* This happens when the frame is just created. */ | ||
| 480 | if (! wmshell) return; | ||
| 481 | |||
| 479 | #if 0 | 482 | #if 0 |
| 480 | check_frame_size (ew->emacs_frame.frame, &min_rows, &min_cols); | 483 | check_frame_size (ew->emacs_frame.frame, &min_rows, &min_cols); |
| 481 | #endif | 484 | #endif |
| @@ -506,6 +509,14 @@ update_wm_hints (EmacsFrame ew) | |||
| 506 | NULL); | 509 | NULL); |
| 507 | } | 510 | } |
| 508 | 511 | ||
| 512 | void | ||
| 513 | widget_update_wm_size_hints (Widget widget) | ||
| 514 | { | ||
| 515 | EmacsFrame ew = (EmacsFrame)widget; | ||
| 516 | update_wm_hints (ew); | ||
| 517 | } | ||
| 518 | |||
| 519 | |||
| 509 | #if 0 | 520 | #if 0 |
| 510 | 521 | ||
| 511 | static void | 522 | static void |
diff --git a/src/widget.h b/src/widget.h index b5b4147b167..11041d54ad0 100644 --- a/src/widget.h +++ b/src/widget.h | |||
| @@ -95,5 +95,6 @@ extern struct _DisplayContext* display_context; | |||
| 95 | /* Special entry points */ | 95 | /* Special entry points */ |
| 96 | void EmacsFrameSetCharSize (Widget, int, int); | 96 | void EmacsFrameSetCharSize (Widget, int, int); |
| 97 | void widget_store_internal_border (Widget widget); | 97 | void widget_store_internal_border (Widget widget); |
| 98 | void widget_update_wm_size_hints (Widget widget); | ||
| 98 | 99 | ||
| 99 | #endif /* _EmacsFrame_h */ | 100 | #endif /* _EmacsFrame_h */ |
diff --git a/src/window.c b/src/window.c index af4fad054a2..b908749ea4a 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -5767,7 +5767,7 @@ get_leaf_windows (struct window *w, struct window **flat, int i) | |||
| 5767 | 5767 | ||
| 5768 | 5768 | ||
| 5769 | /* Return a pointer to the glyph W's physical cursor is on. Value is | 5769 | /* Return a pointer to the glyph W's physical cursor is on. Value is |
| 5770 | null if W's current matrix is invalid, so that no meaningfull glyph | 5770 | null if W's current matrix is invalid, so that no meaningful glyph |
| 5771 | can be returned. */ | 5771 | can be returned. */ |
| 5772 | struct glyph * | 5772 | struct glyph * |
| 5773 | get_phys_cursor_glyph (struct window *w) | 5773 | get_phys_cursor_glyph (struct window *w) |
diff --git a/src/window.h b/src/window.h index df29ca1368f..b4e268b1a34 100644 --- a/src/window.h +++ b/src/window.h | |||
| @@ -877,7 +877,7 @@ extern int buffer_shared; | |||
| 877 | extern void check_frame_size (struct frame *frame, int *rows, int *cols); | 877 | extern void check_frame_size (struct frame *frame, int *rows, int *cols); |
| 878 | 878 | ||
| 879 | /* Return a pointer to the glyph W's physical cursor is on. Value is | 879 | /* Return a pointer to the glyph W's physical cursor is on. Value is |
| 880 | null if W's current matrix is invalid, so that no meaningfull glyph | 880 | null if W's current matrix is invalid, so that no meaningful glyph |
| 881 | can be returned. */ | 881 | can be returned. */ |
| 882 | 882 | ||
| 883 | struct glyph *get_phys_cursor_glyph (struct window *w); | 883 | struct glyph *get_phys_cursor_glyph (struct window *w); |
diff --git a/src/xdisp.c b/src/xdisp.c index c9b9b5c5e88..52f73785e2d 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -4093,26 +4093,37 @@ handle_invisible_prop (struct it *it) | |||
| 4093 | if (it->bidi_p && newpos < ZV) | 4093 | if (it->bidi_p && newpos < ZV) |
| 4094 | { | 4094 | { |
| 4095 | EMACS_INT bpos = CHAR_TO_BYTE (newpos); | 4095 | EMACS_INT bpos = CHAR_TO_BYTE (newpos); |
| 4096 | 4096 | int on_newline = FETCH_BYTE (bpos) == '\n'; | |
| 4097 | if (FETCH_BYTE (bpos) == '\n' | 4097 | int after_newline = |
| 4098 | || (newpos > BEGV && FETCH_BYTE (bpos - 1) == '\n')) | 4098 | newpos <= BEGV || FETCH_BYTE (bpos - 1) == '\n'; |
| 4099 | |||
| 4100 | /* If the invisible text ends on a newline or on a | ||
| 4101 | character after a newline, we can avoid the costly, | ||
| 4102 | character by character, bidi iteration to NEWPOS, and | ||
| 4103 | instead simply reseat the iterator there. That's | ||
| 4104 | because all bidi reordering information is tossed at | ||
| 4105 | the newline. This is a big win for modes that hide | ||
| 4106 | complete lines, like Outline, Org, etc. */ | ||
| 4107 | if (on_newline || after_newline) | ||
| 4099 | { | 4108 | { |
| 4100 | /* If the invisible text ends on a newline or the | ||
| 4101 | character after a newline, we can avoid the | ||
| 4102 | costly, character by character, bidi iteration to | ||
| 4103 | newpos, and instead simply reseat the iterator | ||
| 4104 | there. That's because all bidi reordering | ||
| 4105 | information is tossed at the newline. This is a | ||
| 4106 | big win for modes that hide complete lines, like | ||
| 4107 | Outline, Org, etc. (Implementation note: the | ||
| 4108 | call to reseat_1 is necessary, because it signals | ||
| 4109 | to the bidi iterator that it needs to reinit its | ||
| 4110 | internal information when the next element for | ||
| 4111 | display is requested. */ | ||
| 4112 | struct text_pos tpos; | 4109 | struct text_pos tpos; |
| 4110 | bidi_dir_t pdir = it->bidi_it.paragraph_dir; | ||
| 4113 | 4111 | ||
| 4114 | SET_TEXT_POS (tpos, newpos, bpos); | 4112 | SET_TEXT_POS (tpos, newpos, bpos); |
| 4115 | reseat_1 (it, tpos, 0); | 4113 | reseat_1 (it, tpos, 0); |
| 4114 | /* If we reseat on a newline, we need to prep the | ||
| 4115 | bidi iterator for advancing to the next character | ||
| 4116 | after the newline, keeping the current paragraph | ||
| 4117 | direction (so that PRODUCE_GLYPHS does TRT wrt | ||
| 4118 | prepending/appending glyphs to a glyph row). */ | ||
| 4119 | if (on_newline) | ||
| 4120 | { | ||
| 4121 | it->bidi_it.first_elt = 0; | ||
| 4122 | it->bidi_it.paragraph_dir = pdir; | ||
| 4123 | it->bidi_it.ch = '\n'; | ||
| 4124 | it->bidi_it.nchars = 1; | ||
| 4125 | it->bidi_it.ch_len = 1; | ||
| 4126 | } | ||
| 4116 | } | 4127 | } |
| 4117 | else /* Must use the slow method. */ | 4128 | else /* Must use the slow method. */ |
| 4118 | { | 4129 | { |
| @@ -4121,11 +4132,11 @@ handle_invisible_prop (struct it *it) | |||
| 4121 | non-base embedding level. Therefore, we need to | 4132 | non-base embedding level. Therefore, we need to |
| 4122 | skip invisible text using the bidi iterator, | 4133 | skip invisible text using the bidi iterator, |
| 4123 | starting at IT's current position, until we find | 4134 | starting at IT's current position, until we find |
| 4124 | ourselves outside the invisible text. Skipping | 4135 | ourselves outside of the invisible text. |
| 4125 | invisible text _after_ bidi iteration avoids | 4136 | Skipping invisible text _after_ bidi iteration |
| 4126 | affecting the visual order of the displayed text | 4137 | avoids affecting the visual order of the |
| 4127 | when invisible properties are added or | 4138 | displayed text when invisible properties are |
| 4128 | removed. */ | 4139 | added or removed. */ |
| 4129 | if (it->bidi_it.first_elt && it->bidi_it.charpos < ZV) | 4140 | if (it->bidi_it.first_elt && it->bidi_it.charpos < ZV) |
| 4130 | { | 4141 | { |
| 4131 | /* If we were `reseat'ed to a new paragraph, | 4142 | /* If we were `reseat'ed to a new paragraph, |
| @@ -10223,7 +10234,7 @@ current_message_1 (EMACS_INT a1, Lisp_Object a2, EMACS_INT a3, EMACS_INT a4) | |||
| 10223 | } | 10234 | } |
| 10224 | 10235 | ||
| 10225 | 10236 | ||
| 10226 | /* Push the current message on Vmessage_stack for later restauration | 10237 | /* Push the current message on Vmessage_stack for later restoration |
| 10227 | by restore_message. Value is non-zero if the current message isn't | 10238 | by restore_message. Value is non-zero if the current message isn't |
| 10228 | empty. This is a relatively infrequent operation, so it's not | 10239 | empty. This is a relatively infrequent operation, so it's not |
| 10229 | worth optimizing. */ | 10240 | worth optimizing. */ |
| @@ -15606,7 +15617,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p) | |||
| 15606 | pt_offset = float_amount * WINDOW_BOX_TEXT_HEIGHT (w); | 15617 | pt_offset = float_amount * WINDOW_BOX_TEXT_HEIGHT (w); |
| 15607 | if (pt_offset == 0 && float_amount > 0) | 15618 | if (pt_offset == 0 && float_amount > 0) |
| 15608 | pt_offset = 1; | 15619 | pt_offset = 1; |
| 15609 | if (pt_offset) | 15620 | if (pt_offset && margin > 0) |
| 15610 | margin -= 1; | 15621 | margin -= 1; |
| 15611 | } | 15622 | } |
| 15612 | /* Compute how much to move the window start backward from | 15623 | /* Compute how much to move the window start backward from |
diff --git a/src/xfns.c b/src/xfns.c index 323b272e9f0..95154395e9c 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -4286,7 +4286,7 @@ If TYPE is nil or omitted, get the property as a string. | |||
| 4286 | Otherwise TYPE is the name of the atom that denotes the type expected. | 4286 | Otherwise TYPE is the name of the atom that denotes the type expected. |
| 4287 | If SOURCE is non-nil, get the property on that window instead of from | 4287 | If SOURCE is non-nil, get the property on that window instead of from |
| 4288 | FRAME. The number 0 denotes the root window. | 4288 | FRAME. The number 0 denotes the root window. |
| 4289 | If DELETE_P is non-nil, delete the property after retreiving it. | 4289 | If DELETE_P is non-nil, delete the property after retrieving it. |
| 4290 | If VECTOR_RET_P is non-nil, don't return a string but a vector of values. | 4290 | If VECTOR_RET_P is non-nil, don't return a string but a vector of values. |
| 4291 | 4291 | ||
| 4292 | Value is nil if FRAME hasn't a property with name PROP or if PROP has | 4292 | Value is nil if FRAME hasn't a property with name PROP or if PROP has |
diff --git a/src/xterm.c b/src/xterm.c index e41af2b2870..290acdd9ca4 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -9561,6 +9561,14 @@ x_wm_set_size_hint (struct frame *f, long flags, int user_position) | |||
| 9561 | XSizeHints size_hints; | 9561 | XSizeHints size_hints; |
| 9562 | Window window = FRAME_OUTER_WINDOW (f); | 9562 | Window window = FRAME_OUTER_WINDOW (f); |
| 9563 | 9563 | ||
| 9564 | #ifdef USE_X_TOOLKIT | ||
| 9565 | if (f->output_data.x->widget) | ||
| 9566 | { | ||
| 9567 | widget_update_wm_size_hints (f->output_data.x->widget); | ||
| 9568 | return; | ||
| 9569 | } | ||
| 9570 | #endif | ||
| 9571 | |||
| 9564 | /* Setting PMaxSize caused various problems. */ | 9572 | /* Setting PMaxSize caused various problems. */ |
| 9565 | size_hints.flags = PResizeInc | PMinSize /* | PMaxSize */; | 9573 | size_hints.flags = PResizeInc | PMinSize /* | PMaxSize */; |
| 9566 | 9574 | ||
diff --git a/src/xterm.h b/src/xterm.h index 4385b1a467d..9e0e1acca92 100644 --- a/src/xterm.h +++ b/src/xterm.h | |||
| @@ -643,7 +643,7 @@ enum | |||
| 643 | { | 643 | { |
| 644 | /* Values for focus_state, used as bit mask. | 644 | /* Values for focus_state, used as bit mask. |
| 645 | EXPLICIT means we received a FocusIn for the frame and know it has | 645 | EXPLICIT means we received a FocusIn for the frame and know it has |
| 646 | the focus. IMPLICIT means we recevied an EnterNotify and the frame | 646 | the focus. IMPLICIT means we received an EnterNotify and the frame |
| 647 | may have the focus if no window manager is running. | 647 | may have the focus if no window manager is running. |
| 648 | FocusOut and LeaveNotify clears EXPLICIT/IMPLICIT. */ | 648 | FocusOut and LeaveNotify clears EXPLICIT/IMPLICIT. */ |
| 649 | FOCUS_NONE = 0, | 649 | FOCUS_NONE = 0, |