]> code.delx.au - gnu-emacs/blobdiff - src/w16select.c
Load system's default trusted Certificate Authorities if available.
[gnu-emacs] / src / w16select.c
index 3bcc663e5650f810a284b120b322dea99a8446e5..2403a9be1e0e0b39fafa20170d53e88d166ec8c6 100644 (file)
@@ -1,6 +1,6 @@
 /* 16-bit Windows Selection processing for emacs on MS-Windows
 
-Copyright (C) 1996-1997, 2001-2013 Free Software Foundation, Inc.
+Copyright (C) 1996-1997, 2001-2014 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -452,11 +452,7 @@ DEFUN ("w16-set-clipboard-data", Fw16_set_clipboard_data, Sw16_set_clipboard_dat
 
   CHECK_STRING (string);
 
-  if (NILP (frame))
-    frame = Fselected_frame ();
-
-  CHECK_LIVE_FRAME (frame);
-  if ( !FRAME_MSDOS_P (XFRAME (frame)))
+  if (!FRAME_MSDOS_P (decode_live_frame (frame)))
     goto done;
 
   block_input ();
@@ -558,11 +554,7 @@ DEFUN ("w16-get-clipboard-data", Fw16_get_clipboard_data, Sw16_get_clipboard_dat
   Lisp_Object ret = Qnil;
   int require_decoding = 0;
 
-  if (NILP (frame))
-    frame = Fselected_frame ();
-
-  CHECK_LIVE_FRAME (frame);
-  if ( !FRAME_MSDOS_P (XFRAME (frame)))
+  if (!FRAME_MSDOS_P (decode_live_frame (frame)))
     goto done;
 
   block_input ();
@@ -608,7 +600,7 @@ DEFUN ("w16-get-clipboard-data", Fw16_get_clipboard_data, Sw16_get_clipboard_dat
       coding.mode |= CODING_MODE_LAST_BLOCK;
       /* We explicitly disable composition handling because selection
         data should not contain any composition sequence.  */
-      coding.mode &= CODING_ANNOTATION_MASK;
+      coding.common_flags &= ~CODING_ANNOTATION_MASK;
       decode_coding_object (&coding, Qnil, 0, 0, truelen, truelen, Qt);
       ret = coding.dst_object;
       Vlast_coding_system_used = CODING_ID_NAME (coding.id);
@@ -633,9 +625,9 @@ DEFUN ("w16-get-clipboard-data", Fw16_get_clipboard_data, Sw16_get_clipboard_dat
   return (ret);
 }
 
-/* Support checking for a clipboard selection. */
+/* Support checking for a clipboard selection.  */
 
-DEFUN ("x-selection-exists-p", Fx_selection_exists_p, Sx_selection_exists_p,
+DEFUN ("w16-selection-exists-p", Fw16_selection_exists_p, Sw16_selection_exists_p,
        0, 2, 0,
        doc: /* Whether there is an owner for the given X selection.
 SELECTION should be the name of the selection in question, typically
@@ -685,7 +677,7 @@ syms_of_win16select (void)
 {
   defsubr (&Sw16_set_clipboard_data);
   defsubr (&Sw16_get_clipboard_data);
-  defsubr (&Sx_selection_exists_p);
+  defsubr (&Sw16_selection_exists_p);
 
   DEFVAR_LISP ("selection-coding-system", Vselection_coding_system,
               doc: /* Coding system for communicating with other programs.