aboutsummaryrefslogtreecommitdiffstats
path: root/src/keyboard.c
diff options
context:
space:
mode:
authorPaul Eggert2012-04-09 15:54:59 -0700
committerPaul Eggert2012-04-09 15:54:59 -0700
commit45e9f7da84c1bd3fc0d36d05c5708ed3b2d3a193 (patch)
tree5bc87a8b5a3c754b8eb44a612cc6c03561d6b968 /src/keyboard.c
parent9d6b4d53469a9ffd67bd770fabc6fe254e35c21d (diff)
parent05920a43fc18e696b464387e781e7cfdcea5b5af (diff)
downloademacs-45e9f7da84c1bd3fc0d36d05c5708ed3b2d3a193.tar.gz
emacs-45e9f7da84c1bd3fc0d36d05c5708ed3b2d3a193.zip
Merge from trunk.
Diffstat (limited to 'src/keyboard.c')
-rw-r--r--src/keyboard.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index eb9152f2c6c..bad91ea3f72 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -241,6 +241,7 @@ Lisp_Object internal_last_event_frame;
241Time last_event_timestamp; 241Time last_event_timestamp;
242 242
243static Lisp_Object Qx_set_selection, Qhandle_switch_frame; 243static Lisp_Object Qx_set_selection, Qhandle_switch_frame;
244static Lisp_Object Qhandle_select_window;
244Lisp_Object QPRIMARY; 245Lisp_Object QPRIMARY;
245 246
246static Lisp_Object Qself_insert_command; 247static Lisp_Object Qself_insert_command;
@@ -1645,7 +1646,8 @@ command_loop_1 (void)
1645 ? EQ (CAR_SAFE (Vtransient_mark_mode), Qonly) 1646 ? EQ (CAR_SAFE (Vtransient_mark_mode), Qonly)
1646 : (!NILP (Vselect_active_regions) 1647 : (!NILP (Vselect_active_regions)
1647 && !NILP (Vtransient_mark_mode))) 1648 && !NILP (Vtransient_mark_mode)))
1648 && !EQ (Vthis_command, Qhandle_switch_frame)) 1649 && NILP (Fmemq (Vthis_command,
1650 Vselection_inhibit_update_commands)))
1649 { 1651 {
1650 ptrdiff_t beg = 1652 ptrdiff_t beg =
1651 XINT (Fmarker_position (BVAR (current_buffer, mark))); 1653 XINT (Fmarker_position (BVAR (current_buffer, mark)));
@@ -1877,7 +1879,7 @@ safe_run_hooks_error (Lisp_Object error_data)
1877 = CONSP (Vinhibit_quit) ? XCAR (Vinhibit_quit) : Vinhibit_quit; 1879 = CONSP (Vinhibit_quit) ? XCAR (Vinhibit_quit) : Vinhibit_quit;
1878 Lisp_Object fun = CONSP (Vinhibit_quit) ? XCDR (Vinhibit_quit) : Qnil; 1880 Lisp_Object fun = CONSP (Vinhibit_quit) ? XCDR (Vinhibit_quit) : Qnil;
1879 Lisp_Object args[4]; 1881 Lisp_Object args[4];
1880 args[0] = build_string ("Error in %s (%s): %s"); 1882 args[0] = build_string ("Error in %s (%s): %S");
1881 args[1] = hook; 1883 args[1] = hook;
1882 args[2] = fun; 1884 args[2] = fun;
1883 args[3] = error_data; 1885 args[3] = error_data;
@@ -11654,6 +11656,7 @@ syms_of_keyboard (void)
11654 DEFSYM (Qx_set_selection, "x-set-selection"); 11656 DEFSYM (Qx_set_selection, "x-set-selection");
11655 DEFSYM (QPRIMARY, "PRIMARY"); 11657 DEFSYM (QPRIMARY, "PRIMARY");
11656 DEFSYM (Qhandle_switch_frame, "handle-switch-frame"); 11658 DEFSYM (Qhandle_switch_frame, "handle-switch-frame");
11659 DEFSYM (Qhandle_select_window, "handle-select-window");
11657 11660
11658 DEFSYM (Qinput_method_function, "input-method-function"); 11661 DEFSYM (Qinput_method_function, "input-method-function");
11659 DEFSYM (Qinput_method_exit_on_first_char, "input-method-exit-on-first-char"); 11662 DEFSYM (Qinput_method_exit_on_first_char, "input-method-exit-on-first-char");
@@ -12170,7 +12173,7 @@ whenever `deferred-action-list' is non-nil. */);
12170 Vdeferred_action_function = Qnil; 12173 Vdeferred_action_function = Qnil;
12171 12174
12172 DEFVAR_LISP ("delayed-warnings-list", Vdelayed_warnings_list, 12175 DEFVAR_LISP ("delayed-warnings-list", Vdelayed_warnings_list,
12173 doc: /* List of warnings to be displayed as soon as possible. 12176 doc: /* List of warnings to be displayed after this command.
12174Each element must be a list (TYPE MESSAGE [LEVEL [BUFFER-NAME]]), 12177Each element must be a list (TYPE MESSAGE [LEVEL [BUFFER-NAME]]),
12175as per the args of `display-warning' (which see). 12178as per the args of `display-warning' (which see).
12176If this variable is non-nil, `delayed-warnings-hook' will be run 12179If this variable is non-nil, `delayed-warnings-hook' will be run
@@ -12290,6 +12293,16 @@ text in the region before modifying the buffer. The next
12290`deactivate-mark' call uses this to set the window selection. */); 12293`deactivate-mark' call uses this to set the window selection. */);
12291 Vsaved_region_selection = Qnil; 12294 Vsaved_region_selection = Qnil;
12292 12295
12296 DEFVAR_LISP ("selection-inhibit-update-commands",
12297 Vselection_inhibit_update_commands,
12298 doc: /* List of commands which should not update the selection.
12299Normally, if `select-active-regions' is non-nil and the mark remains
12300active after a command (i.e. the mark was not deactivated), the Emacs
12301command loop sets the selection to the text in the region. However,
12302if the command is in this list, the selection is not updated. */);
12303 Vselection_inhibit_update_commands
12304 = list2 (Qhandle_switch_frame, Qhandle_select_window);
12305
12293 DEFVAR_LISP ("debug-on-event", 12306 DEFVAR_LISP ("debug-on-event",
12294 Vdebug_on_event, 12307 Vdebug_on_event,
12295 doc: /* Enter debugger on this event. When Emacs 12308 doc: /* Enter debugger on this event. When Emacs