emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r118244: * lisp/select.el (gui-get-selection): Comme


From: Jan D.
Subject: [Emacs-diffs] trunk r118244: * lisp/select.el (gui-get-selection): Comment: data-type ignored on NS.
Date: Sat, 01 Nov 2014 11:37:20 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 118244
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/18911
committer: Jan Djärv <address@hidden>
branch nick: trunk
timestamp: Sat 2014-11-01 12:37:14 +0100
message:
  * lisp/select.el (gui-get-selection): Comment: data-type ignored on NS.
  
  * src/nsselect.m (ns_get_local_selection): Remove calling of
  functions in Vselection_converter_alist.
  (syms_of_nsselect): Remove Vselection_converter_alist.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/select.el                 select.el-20091113204419-o5vbwnq5f7feedwu-550
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/nsselect.m                 nsselect.m-20091113204419-o5vbwnq5f7feedwu-8745
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-11-01 10:36:43 +0000
+++ b/lisp/ChangeLog    2014-11-01 11:37:14 +0000
@@ -1,3 +1,7 @@
+2014-11-01  Jan Djärv  <address@hidden>
+
+       * select.el (gui-get-selection): Comment: data-type ignored on NS.
+
 2014-10-31  Stefan Monnier  <address@hidden>
 
        * emacs-lisp/macroexp.el (macroexpand-1): New function (bug#18821).

=== modified file 'lisp/select.el'
--- a/lisp/select.el    2014-10-23 01:38:59 +0000
+++ b/lisp/select.el    2014-11-01 11:37:14 +0000
@@ -293,7 +293,7 @@
 
 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)

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2014-10-31 11:09:00 +0000
+++ b/src/ChangeLog     2014-11-01 11:37:14 +0000
@@ -1,3 +1,9 @@
+2014-11-01  Jan Djärv  <address@hidden>
+
+       * 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  <address@hidden>
 
        * font.c (copy_font_spec): Redesign to avoid Fcopy_alist

=== modified file 'src/nsselect.m'
--- a/src/nsselect.m    2014-10-25 13:56:22 +0000
+++ b/src/nsselect.m    2014-11-01 11:37:14 +0000
@@ -211,45 +211,8 @@
                        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 @@
 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\


reply via email to

[Prev in Thread] Current Thread [Next in Thread]