]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/select.el (gui-get-selection): Comment: data-type ignored on NS.
authorJan Djärv <jan.h.d@swipnet.se>
Sat, 1 Nov 2014 11:37:14 +0000 (12:37 +0100)
committerJan Djärv <jan.h.d@swipnet.se>
Sat, 1 Nov 2014 11:37:14 +0000 (12:37 +0100)
* src/nsselect.m (ns_get_local_selection): Remove calling of
functions in Vselection_converter_alist.
(syms_of_nsselect): Remove Vselection_converter_alist.

Fixes: debbugs:18911
lisp/ChangeLog
lisp/select.el
src/ChangeLog
src/nsselect.m

index a2fd7eed8d31b70958e3db98c5d44f57e3f6ef52..11c789a962501f6932d08ff183a4bbcf8dd750da 100644 (file)
@@ -1,3 +1,7 @@
+2014-11-01  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * select.el (gui-get-selection): Comment: data-type ignored on NS.
+
 2014-10-31  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * emacs-lisp/macroexp.el (macroexpand-1): New function (bug#18821).
index 2ce0ef0d7e6feeeb1d53394400a57447d2755877..5a10756ea486f3b5c1e9dfdbe9da8ccf434ee36e 100644 (file)
@@ -293,7 +293,7 @@ all upper-case names.  The most often used ones, in addition to
 
 DATA-TYPE is usually `STRING', but can also be one of the symbols
 in `selection-converter-alist', which see.  This argument is
-ignored on MS-Windows and MS-DOS."
+ignored on NS, MS-Windows and MS-DOS."
   (let ((data (gui-call gui-get-selection (or type 'PRIMARY)
                         (or data-type 'STRING))))
     (when (and (stringp data)
index 4337a3f1e6702b6d79ee4b2dcfa56310ff5ede6c..6580ce2d7ac7dd77d99b63c049499f6f7fa4f0bf 100644 (file)
@@ -1,3 +1,9 @@
+2014-11-01  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * nsselect.m (ns_get_local_selection): Remove calling of
+       functions in Vselection_converter_alist (Bug#18911).
+       (syms_of_nsselect): Remove Vselection_converter_alist.
+
 2014-10-31  Dmitry Antipov  <dmantipov@yandex.ru>
 
        * font.c (copy_font_spec): Redesign to avoid Fcopy_alist
index 904b3b2e17fffb92b32e90a286927e84fb81491a..8d3b567e79666a769c56ebf5561a336614ad7a2e 100644 (file)
@@ -211,45 +211,8 @@ ns_get_local_selection (Lisp_Object selection_name,
                        Lisp_Object target_type)
 {
   Lisp_Object local_value;
-  Lisp_Object handler_fn, value, check;
-  ptrdiff_t count = specpdl_ptr - specpdl;
-
   local_value = assq_no_quit (selection_name, Vselection_alist);
-
-  if (NILP (local_value)) return Qnil;
-
-  specbind (Qinhibit_quit, Qt);
-  CHECK_SYMBOL (target_type);
-  handler_fn = Fcdr (Fassq (target_type, Vselection_converter_alist));
-  if (!NILP (handler_fn))
-    value = call3 (handler_fn, selection_name, target_type,
-                XCAR (XCDR (local_value)));
-  else
-    value = Qnil;
-  unbind_to (count, Qnil);
-
-  check = value;
-  if (CONSP (value) && SYMBOLP (XCAR (value)))
-    {
-      check = XCDR (value);
-    }
-
-  if (STRINGP (check) || VECTORP (check) || SYMBOLP (check)
-      || INTEGERP (check) || NILP (value))
-    return value;
-
-  if (CONSP (check)
-      && INTEGERP (XCAR (check))
-      && (INTEGERP (XCDR (check))
-         || (CONSP (XCDR (check))
-             && INTEGERP (XCAR (XCDR (check)))
-             && NILP (XCDR (XCDR (check))))))
-    return value;
-
-  Fsignal (Qerror,
-          list3 (build_string ("invalid data returned by"
-                               " selection-conversion function"),
-                 handler_fn, value));
+  return local_value;
 }
 
 
@@ -571,21 +534,6 @@ This hook doesn't let you change the behavior of Emacs's selection replies,\n\
 it merely informs you that they have happened.");
   Vns_sent_selection_hooks = Qnil;
 
-  DEFVAR_LISP ("selection-converter-alist", Vselection_converter_alist,
-               "An alist associating X Windows selection-types with functions.\n\
-These functions are called to convert the selection, with three args:\n\
-the name of the selection (typically `PRIMARY', `SECONDARY', or `CLIPBOARD');\n\
-a desired type to which the selection should be converted;\n\
-and the local selection value (whatever was given to `x-own-selection').\n\
-\n\
-The function should return the value to send to the X server\n\
-\(typically a string).  A return value of nil\n\
-means that the conversion could not be done.\n\
-A return value which is the symbol `NULL'\n\
-means that a side-effect was executed,\n\
-and there is no meaningful selection value.");
-  Vselection_converter_alist = Qnil;
-
   DEFVAR_LISP ("ns-lost-selection-hooks", Vns_lost_selection_hooks,
                "A list of functions to be called when Emacs loses an X selection.\n\
 \(This happens when some other X client makes its own selection\n\