=== modified file 'lisp/term/ns-win.el' --- lisp/term/ns-win.el 2010-07-13 10:41:49 +0000 +++ lisp/term/ns-win.el 2010-08-06 10:52:23 +0000 @@ -1003,7 +1003,7 @@ (defun ns-get-pasteboard () "Returns the value of the pasteboard." - (ns-get-cut-buffer-internal 'PRIMARY)) + (ns-get-cut-buffer-internal 'CLIPBOARD)) (declare-function ns-store-cut-buffer-internal "nsselect.m" (buffer string)) @@ -1011,7 +1011,7 @@ "Store STRING into the pasteboard of the Nextstep display server." ;; Check the data type of STRING. (if (not (stringp string)) (error "Nonstring given to pasteboard")) - (ns-store-cut-buffer-internal 'PRIMARY string)) + (ns-store-cut-buffer-internal 'CLIPBOARD string)) ;; We keep track of the last text selected here, so we can check the ;; current selection against it, and avoid passing back our own text === modified file 'src/nsselect.m' --- src/nsselect.m 2010-07-08 21:25:08 +0000 +++ src/nsselect.m 2010-08-06 10:46:52 +0000 @@ -36,7 +36,7 @@ #define CUT_BUFFER_SUPPORT -Lisp_Object QPRIMARY, QSECONDARY, QTEXT, QFILE_NAME; +Lisp_Object QCLIPBOARD, QPRIMARY, QSECONDARY, QTEXT, QFILE_NAME; static Lisp_Object Vns_sent_selection_hooks; static Lisp_Object Vns_lost_selection_hooks; @@ -45,6 +45,8 @@ static Lisp_Object Qforeign_selection; +/* NSGeneralPboard is pretty much analogous to X11 CLIPBOARD */ +NSString *NXPrimaryPboard; NSString *NXSecondaryPboard; @@ -60,7 +62,8 @@ symbol_to_nsstring (Lisp_Object sym) { CHECK_SYMBOL (sym); - if (EQ (sym, QPRIMARY)) return NSGeneralPboard; + if (EQ (sym, QCLIPBOARD)) return NSGeneralPboard; + if (EQ (sym, QPRIMARY)) return NXPrimaryPboard; if (EQ (sym, QSECONDARY)) return NXSecondaryPboard; if (EQ (sym, QTEXT)) return NSStringPboardType; return [NSString stringWithUTF8String: SDATA (XSYMBOL (sym)->xname)]; @@ -71,6 +74,8 @@ ns_string_to_symbol (NSString *t) { if ([t isEqualToString: NSGeneralPboard]) + return QCLIPBOARD; + if ([t isEqualToString: NXPrimaryPboard]) return QPRIMARY; if ([t isEqualToString: NXSecondaryPboard]) return QSECONDARY; @@ -536,12 +541,14 @@ void nxatoms_of_nsselect (void) { - NXSecondaryPboard = @"Selection"; + NXPrimaryPboard = @"PrimarySelection"; + NXSecondaryPboard = @"SecondarySelection"; } void syms_of_nsselect (void) { + QCLIPBOARD = intern ("CLIPBOARD"); staticpro (&QCLIPBOARD); QPRIMARY = intern ("PRIMARY"); staticpro (&QPRIMARY); QSECONDARY = intern ("SECONDARY"); staticpro (&QSECONDARY); QTEXT = intern ("TEXT"); staticpro (&QTEXT);