aboutsummaryrefslogtreecommitdiffstats
path: root/src/macselect.c
diff options
context:
space:
mode:
authorKaroly Lorentey2005-05-09 16:13:15 +0000
committerKaroly Lorentey2005-05-09 16:13:15 +0000
commit85dc59a9ff65aaf6b8e6a0c4452f74b7dade88fd (patch)
tree85aebc58216ed19de18354b3d9974942eea621d5 /src/macselect.c
parentc25b55138a36cf5f334070baf79ce61c1e956eed (diff)
parentc7bda15b58de3efcf856786167f11f5b4175e30b (diff)
downloademacs-85dc59a9ff65aaf6b8e6a0c4452f74b7dade88fd.tar.gz
emacs-85dc59a9ff65aaf6b8e6a0c4452f74b7dade88fd.zip
Merged from miles@gnu.org--gnu-2005 (patch 292-295)
Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-292 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-293 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-294 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-295 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-342
Diffstat (limited to 'src/macselect.c')
-rw-r--r--src/macselect.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/macselect.c b/src/macselect.c
index 49246f7eddc..a115c9b3229 100644
--- a/src/macselect.c
+++ b/src/macselect.c
@@ -98,8 +98,10 @@ static Lisp_Object Vselection_converter_alist;
98 selection type with a scrap flavor type via `mac-ostype'. */ 98 selection type with a scrap flavor type via `mac-ostype'. */
99static Lisp_Object Qmac_scrap_name, Qmac_ostype; 99static Lisp_Object Qmac_scrap_name, Qmac_ostype;
100 100
101#ifdef MAC_OSX
101/* Selection name for communication via Services menu. */ 102/* Selection name for communication via Services menu. */
102static Lisp_Object Vmac_services_selection; 103static Lisp_Object Vmac_services_selection;
104#endif
103 105
104/* Get a reference to the scrap corresponding to the symbol SYM. The 106/* Get a reference to the scrap corresponding to the symbol SYM. The
105 reference is set to *SCRAP, and it becomes NULL if there's no 107 reference is set to *SCRAP, and it becomes NULL if there's no
@@ -455,9 +457,11 @@ x_own_selection (selection_name, selection_value)
455 value = call3 (handler_fn, selection_name, 457 value = call3 (handler_fn, selection_name,
456 type, selection_value); 458 type, selection_value);
457 459
458 if (CONSP (value) 460 if (STRINGP (value))
459 && EQ (XCAR (value), type) 461 err = put_scrap_string (scrap, type, value);
460 && STRINGP (XCDR (value))) 462 else if (CONSP (value)
463 && EQ (XCAR (value), type)
464 && STRINGP (XCDR (value)))
461 err = put_scrap_string (scrap, type, XCDR (value)); 465 err = put_scrap_string (scrap, type, XCDR (value));
462 } 466 }
463 467
@@ -622,7 +626,8 @@ x_clear_frame_selections (f)
622 hooks = Vx_lost_selection_functions; 626 hooks = Vx_lost_selection_functions;
623 selection_symbol = Fcar (Fcar (Vselection_alist)); 627 selection_symbol = Fcar (Fcar (Vselection_alist));
624 628
625 if (!EQ (hooks, Qunbound)) 629 if (!EQ (hooks, Qunbound)
630 && !NILP (Fx_selection_owner_p (selection_symbol)))
626 { 631 {
627 for (; CONSP (hooks); hooks = Fcdr (hooks)) 632 for (; CONSP (hooks); hooks = Fcdr (hooks))
628 call1 (Fcar (hooks), selection_symbol); 633 call1 (Fcar (hooks), selection_symbol);
@@ -646,7 +651,8 @@ x_clear_frame_selections (f)
646 hooks = Vx_lost_selection_functions; 651 hooks = Vx_lost_selection_functions;
647 selection_symbol = Fcar (Fcar (XCDR (rest))); 652 selection_symbol = Fcar (Fcar (XCDR (rest)));
648 653
649 if (!EQ (hooks, Qunbound)) 654 if (!EQ (hooks, Qunbound)
655 && !NILP (Fx_selection_owner_p (selection_symbol)))
650 { 656 {
651 for (; CONSP (hooks); hooks = Fcdr (hooks)) 657 for (; CONSP (hooks); hooks = Fcdr (hooks))
652 call1 (Fcar (hooks), selection_symbol); 658 call1 (Fcar (hooks), selection_symbol);