changeset 109832:98f2d1d177a5

Merge from mainline.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Wed, 18 Aug 2010 07:43:30 +0000
parents aa32976d0c44 (current diff) 2110ce0ca5bc (diff)
children 5883fc00b976
files
diffstat 6 files changed, 35 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/etc/NEWS	Wed Aug 18 06:23:18 2010 +0000
+++ b/etc/NEWS	Wed Aug 18 07:43:30 2010 +0000
@@ -214,7 +214,7 @@
 
 * Changes in Specialized Modes and Packages in Emacs 24.1
 
-** FIXME: xdg-open for browse-url and reportbug, 2010/08.
+** FIXME: xdg-open for browse-url and reportbug, 2010/08.  (Close bug#4546?)
 
 ** Archive Mode has basic support to browse 7z archives.
 
--- a/lisp/ChangeLog	Wed Aug 18 06:23:18 2010 +0000
+++ b/lisp/ChangeLog	Wed Aug 18 07:43:30 2010 +0000
@@ -1,3 +1,8 @@
+2010-08-18  Jan Djärv  <jan.h.d@swipnet.se>
+
+	* term/ns-win.el (ns-get-pasteboard, ns-set-pasteboard): Use
+	QCLIPBOARD instead of QPRIMARY (Bug#6677).
+
 2010-08-17  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* emacs-lisp/lisp.el (up-list): Obey forward-sexp-function if set.
--- a/lisp/term/ns-win.el	Wed Aug 18 06:23:18 2010 +0000
+++ b/lisp/term/ns-win.el	Wed Aug 18 07:43:30 2010 +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
--- a/src/ChangeLog	Wed Aug 18 06:23:18 2010 +0000
+++ b/src/ChangeLog	Wed Aug 18 07:43:30 2010 +0000
@@ -1,3 +1,18 @@
+2010-08-18  Jan Djärv  <jan.h.d@swipnet.se>
+
+	* gtkutil.c (update_frame_tool_bar): Literal stings are const char*.
+
+2010-08-18  David De La Harpe Golden  <david@harpegolden.net>
+
+	* nsselect.m (QCLIPBOARD, NXPrimaryPboard): Define.
+	(symbol_to_nsstring): Map QCLIPBOARD => NSGeneralPboard,
+	QPRIMARY => NXPrimaryPboard.
+	(ns_string_to_symbol): NSGeneralPboard => QCLIPBOARD,
+	NXPrimaryPboard => QPRIMARY.
+	(nxatoms_of_nsselect): NXPrimaryPboard = PrimarySelection,
+	NXSecondaryPboard = SecondarySelection.
+	(syms_of_nsselect): Intern QCLIPBOARD (Bug#6677).
+
 2010-08-17  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* gtkutil.c (update_frame_tool_bar): Don't assume TOOL_BAR_ITEM_LABEL
--- a/src/gtkutil.c	Wed Aug 18 06:23:18 2010 +0000
+++ b/src/gtkutil.c	Wed Aug 18 07:43:30 2010 +0000
@@ -4292,8 +4292,8 @@
       GtkWidget *wbutton = NULL;
       GtkWidget *weventbox;
       Lisp_Object specified_file;
-      char *label = (STRINGP (PROP (TOOL_BAR_ITEM_LABEL))
-		     ? SSDATA (PROP (TOOL_BAR_ITEM_LABEL)) : "");
+      const char *label = (STRINGP (PROP (TOOL_BAR_ITEM_LABEL))
+                           ? SSDATA (PROP (TOOL_BAR_ITEM_LABEL)) : "");
       
       ti = gtk_toolbar_get_nth_item (GTK_TOOLBAR (wtoolbar), i);
 
--- a/src/nsselect.m	Wed Aug 18 06:23:18 2010 +0000
+++ b/src/nsselect.m	Wed Aug 18 07:43:30 2010 +0000
@@ -37,7 +37,7 @@
 
 #define CUT_BUFFER_SUPPORT
 
-Lisp_Object QSECONDARY, QTEXT, QFILE_NAME;
+Lisp_Object QCLIPBOARD, QSECONDARY, QTEXT, QFILE_NAME;
 
 static Lisp_Object Vns_sent_selection_hooks;
 static Lisp_Object Vns_lost_selection_hooks;
@@ -46,6 +46,8 @@
 
 static Lisp_Object Qforeign_selection;
 
+/* NSGeneralPboard is pretty much analogous to X11 CLIPBOARD */
+NSString *NXPrimaryPboard;
 NSString *NXSecondaryPboard;
 
 
@@ -61,7 +63,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)];
@@ -72,6 +75,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;
@@ -537,12 +542,14 @@
 void
 nxatoms_of_nsselect (void)
 {
-  NXSecondaryPboard = @"Selection";
+  NXPrimaryPboard = @"PrimarySelection";
+  NXSecondaryPboard = @"SecondarySelection";
 }
 
 void
 syms_of_nsselect (void)
 {
+  QCLIPBOARD = intern ("CLIPBOARD");	staticpro (&QCLIPBOARD);
   QSECONDARY = intern ("SECONDARY");	staticpro (&QSECONDARY);
   QTEXT      = intern ("TEXT"); 	staticpro (&QTEXT);
   QFILE_NAME = intern ("FILE_NAME"); 	staticpro (&QFILE_NAME);