diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 26 | ||||
| -rw-r--r-- | src/keyboard.c | 13 | ||||
| -rw-r--r-- | src/minibuf.c | 16 | ||||
| -rw-r--r-- | src/nsselect.m | 4 | ||||
| -rw-r--r-- | src/w32fns.c | 10 |
5 files changed, 52 insertions, 17 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 3aef0c729f6..72e78724bab 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,29 @@ +2014-05-08 Paul Eggert <eggert@cs.ucla.edu> + + * minibuf.c (read_minibuf): Avoid C99ism in previous patch (Bug#17430). + +2014-05-08 Jarek Czekalski <jarekczek@poczta.onet.pl> + + Fix initialization of minibuffer history variable (Bug#17430). + * minibuf.c (read_minibuf): Initialize histval to Qnil if unbound. + Move the initialization up to prevent any "value void" message. + +2014-05-08 Samuel Bronson <naesten@gmail.com> + + * keyboard.c (Frecursive_edit): Ensure inc&dec of command_loop_level + are matched (bug#17413). + +2014-05-08 Jarek Czekalski <jarekczek@poczta.onet.pl> + + Stop tooltips pulling Emacs window to front (Bug#17408). + * w32fns.c (Fx_show_tip): Add SWP_NOOWNERZORDER flag to + SetWindowPos invocations. + +2014-05-08 Jan Djärv <jan.h.d@swipnet.se> + + * nsselect.m (Fx_selection_exists_p): Just return Qnil if window system + not initialized (Bug#17398). + 2014-05-07 Paul Eggert <eggert@cs.ucla.edu> * image.c: Include <png.h> before <setjmp.h> (Bug#17429). diff --git a/src/keyboard.c b/src/keyboard.c index d52483e6a18..a5a9ad93047 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -825,22 +825,25 @@ This function is called by the editor initialization to begin editing. */) if (input_blocked_p ()) return Qnil; - command_loop_level++; - update_mode_lines = 17; - - if (command_loop_level + if (command_loop_level >= 0 && current_buffer != XBUFFER (XWINDOW (selected_window)->contents)) buffer = Fcurrent_buffer (); else buffer = Qnil; + /* Don't do anything interesting between the increment and the + record_unwind_protect! Otherwise, we could get distracted and + never decrement the counter again. */ + command_loop_level++; + update_mode_lines = 17; + record_unwind_protect (recursive_edit_unwind, buffer); + /* If we leave recursive_edit_1 below with a `throw' for instance, like it is done in the splash screen display, we have to make sure that we restore single_kboard as command_loop_1 would have done if it were left normally. */ if (command_loop_level > 0) temporarily_switch_to_single_kboard (SELECTED_FRAME ()); - record_unwind_protect (recursive_edit_unwind, buffer); recursive_edit_1 (); return unbind_to (count, Qnil); diff --git a/src/minibuf.c b/src/minibuf.c index 8b742cf88ca..06fe0c07df6 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -384,6 +384,7 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt, EMACS_INT pos = 0; /* String to add to the history. */ Lisp_Object histstring; + Lisp_Object histval; Lisp_Object empty_minibuf; Lisp_Object dummy, frame; @@ -535,6 +536,14 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt, if (!NILP (Vminibuffer_completing_file_name)) Vminibuffer_completing_file_name = Qlambda; + /* If variable is unbound, make it nil. */ + histval = find_symbol_value (Vminibuffer_history_variable); + if (EQ (histval, Qunbound)) + { + Fset (Vminibuffer_history_variable, Qnil); + histval = Qnil; + } + if (inherit_input_method) { /* `current-input-method' is buffer local. So, remember it in @@ -703,13 +712,6 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt, { /* If the caller wanted to save the value read on a history list, then do so if the value is not already the front of the list. */ - Lisp_Object histval; - - /* If variable is unbound, make it nil. */ - - histval = find_symbol_value (Vminibuffer_history_variable); - if (EQ (histval, Qunbound)) - Fset (Vminibuffer_history_variable, Qnil); /* The value of the history variable must be a cons or nil. Other values are unacceptable. We silently ignore these values. */ diff --git a/src/nsselect.m b/src/nsselect.m index f4713cb5e10..038849c0aed 100644 --- a/src/nsselect.m +++ b/src/nsselect.m @@ -429,7 +429,9 @@ On Nextstep, TERMINAL is unused. */) id pb; NSArray *types; - check_window_system (NULL); + if (!window_system_available (NULL)) + return Qnil; + CHECK_SYMBOL (selection); if (EQ (selection, Qnil)) selection = QPRIMARY; if (EQ (selection, Qt)) selection = QSECONDARY; diff --git a/src/w32fns.c b/src/w32fns.c index 77476757c2f..fa988583f33 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -6035,12 +6035,13 @@ Text larger than the specified size is clipped. */) /* Put tooltip in topmost group and in position. */ SetWindowPos (FRAME_W32_WINDOW (f), HWND_TOPMOST, root_x, root_y, 0, 0, - SWP_NOSIZE | SWP_NOACTIVATE); + SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOOWNERZORDER); /* Ensure tooltip is on top of other topmost windows (eg menus). */ SetWindowPos (FRAME_W32_WINDOW (f), HWND_TOP, 0, 0, 0, 0, - SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); + SWP_NOMOVE | SWP_NOSIZE + | SWP_NOACTIVATE | SWP_NOOWNERZORDER); unblock_input (); goto start_timer; @@ -6238,12 +6239,13 @@ Text larger than the specified size is clipped. */) SetWindowPos (FRAME_W32_WINDOW (f), HWND_TOPMOST, root_x, root_y, rect.right - rect.left + FRAME_COLUMN_WIDTH (f), - rect.bottom - rect.top, SWP_NOACTIVATE); + rect.bottom - rect.top, SWP_NOACTIVATE | SWP_NOOWNERZORDER); /* Ensure tooltip is on top of other topmost windows (eg menus). */ SetWindowPos (FRAME_W32_WINDOW (f), HWND_TOP, 0, 0, 0, 0, - SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); + SWP_NOMOVE | SWP_NOSIZE + | SWP_NOACTIVATE | SWP_NOOWNERZORDER); /* Let redisplay know that we have made the frame visible already. */ SET_FRAME_VISIBLE (f, 1); |
