Mercurial > emacs
comparison src/xselect.c @ 109600:52a2d97e28e4
Adapt mouse-3 behavior to recent selection changes (Bug#6701).
* lisp/mouse.el (mouse-save-then-kill): Doc fix. Deactivate mark
before killing to preserve the primary selection.
* lisp/term/x-win.el (x-select-text): Doc fix.
* src/xselect.c (x_own_selection): Use list4.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Sat, 31 Jul 2010 17:26:56 -0400 |
parents | 05e7e7c46ff0 |
children | 14830418f9fc |
comparison
equal
deleted
inserted
replaced
109599:c18dffa2ba46 | 109600:52a2d97e28e4 |
---|---|
390 return; | 390 return; |
391 | 391 |
392 selecting_window = FRAME_X_WINDOW (sf); | 392 selecting_window = FRAME_X_WINDOW (sf); |
393 display = FRAME_X_DISPLAY (sf); | 393 display = FRAME_X_DISPLAY (sf); |
394 dpyinfo = FRAME_X_DISPLAY_INFO (sf); | 394 dpyinfo = FRAME_X_DISPLAY_INFO (sf); |
395 | 395 |
396 CHECK_SYMBOL (selection_name); | 396 CHECK_SYMBOL (selection_name); |
397 selection_atom = symbol_to_x_atom (dpyinfo, display, selection_name); | 397 selection_atom = symbol_to_x_atom (dpyinfo, display, selection_name); |
398 | 398 |
399 BLOCK_INPUT; | 399 BLOCK_INPUT; |
400 x_catch_errors (display); | 400 x_catch_errors (display); |
408 Lisp_Object selection_time; | 408 Lisp_Object selection_time; |
409 Lisp_Object selection_data; | 409 Lisp_Object selection_data; |
410 Lisp_Object prev_value; | 410 Lisp_Object prev_value; |
411 | 411 |
412 selection_time = long_to_cons ((unsigned long) time); | 412 selection_time = long_to_cons ((unsigned long) time); |
413 selection_data = Fcons (selection_name, | 413 selection_data = list4 (selection_name, selection_value, |
414 Fcons (selection_value, | 414 selection_time, selected_frame); |
415 Fcons (selection_time, | |
416 Fcons (selected_frame, Qnil)))); | |
417 prev_value = assq_no_quit (selection_name, Vselection_alist); | 415 prev_value = assq_no_quit (selection_name, Vselection_alist); |
418 | 416 |
419 Vselection_alist = Fcons (selection_data, Vselection_alist); | 417 Vselection_alist = Fcons (selection_data, Vselection_alist); |
420 | 418 |
421 /* If we already owned the selection, remove the old selection data. | 419 /* If we already owned the selection, remove the old selection data. |
1013 UNBLOCK_INPUT; | 1011 UNBLOCK_INPUT; |
1014 return; | 1012 return; |
1015 } | 1013 } |
1016 } | 1014 } |
1017 UNBLOCK_INPUT; | 1015 UNBLOCK_INPUT; |
1018 | 1016 |
1019 selection_symbol = x_atom_to_symbol (display, selection); | 1017 selection_symbol = x_atom_to_symbol (display, selection); |
1020 | 1018 |
1021 local_selection_data = assq_no_quit (selection_symbol, Vselection_alist); | 1019 local_selection_data = assq_no_quit (selection_symbol, Vselection_alist); |
1022 | 1020 |
1023 /* Well, we already believe that we don't own it, so that's just fine. */ | 1021 /* Well, we already believe that we don't own it, so that's just fine. */ |
2414 { | 2412 { |
2415 Window window; | 2413 Window window; |
2416 Atom props[8]; | 2414 Atom props[8]; |
2417 Display *display; | 2415 Display *display; |
2418 struct frame *sf = SELECTED_FRAME (); | 2416 struct frame *sf = SELECTED_FRAME (); |
2419 | 2417 |
2420 check_x (); | 2418 check_x (); |
2421 | 2419 |
2422 if (! FRAME_X_P (sf)) | 2420 if (! FRAME_X_P (sf)) |
2423 return Qnil; | 2421 return Qnil; |
2424 | 2422 |