]> code.delx.au - gnu-emacs/blobdiff - src/w16select.c
(custom-save-all): Use find-file-visit-truename for visiting the custom file.
[gnu-emacs] / src / w16select.c
index 6c6038994b918600538fe28b22b9f0f58b9310b4..cd3098bae52a3e04b5437b372345dd0a11e954e3 100644 (file)
@@ -1,5 +1,6 @@
 /* 16-bit Windows Selection processing for emacs on MS-Windows
-   Copyright (C) 1996, 1997, 2001 Free Software Foundation.
+   Copyright (C) 1996, 1997, 2001, 2002, 2003, 2004,
+                 2005, 2006 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -15,8 +16,8 @@ GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with GNU Emacs; see the file COPYING.  If not, write to
-the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.  */
+the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+Boston, MA 02110-1301, USA.  */
 
 /* These functions work by using WinOldAp interface.  WinOldAp
    (WINOLDAP.MOD) is a Microsoft Windows extension supporting
@@ -40,6 +41,7 @@ Boston, MA 02111-1307, USA.  */
 #include "buffer.h"
 #include "charset.h"
 #include "coding.h"
+#include "composite.h"
 
 /* If ever some function outside this file will need to call any
    clipboard-related function, the following prototypes and constants
@@ -500,12 +502,12 @@ DEFUN ("w16-set-clipboard-data", Fw16_set_clipboard_data, Sw16_set_clipboard_dat
 
   BLOCK_INPUT;
 
-  nbytes = STRING_BYTES (XSTRING (string));
-  src = XSTRING (string)->data;
+  nbytes = SBYTES (string);
+  src = SDATA (string);
 
   /* Since we are now handling multilingual text, we must consider
      encoding text for the clipboard.  */
-  charset_info = find_charset_in_text (src, XSTRING (string)->size, nbytes,
+  charset_info = find_charset_in_text (src, SCHARS (string), nbytes,
                                       NULL, Qnil);
 
   if (charset_info == 0)
@@ -530,8 +532,8 @@ DEFUN ("w16-set-clipboard-data", Fw16_set_clipboard_data, Sw16_set_clipboard_dat
          && !NILP (Ffboundp (coding.pre_write_conversion)))
        {
          string = run_pre_post_conversion_on_str (string, &coding, 1);
-         src = XSTRING (string)->data;
-         nbytes = STRING_BYTES (XSTRING (string));
+         src = SDATA (string);
+         nbytes = SBYTES (string);
        }
       coding.src_multibyte = 1;
       coding.dst_multibyte = 0;
@@ -747,14 +749,14 @@ syms_of_win16select ()
               doc: /* Coding system for communicating with other X clients.
 When sending or receiving text via cut_buffer, selection, and clipboard,
 the text is encoded or decoded by this coding system.
-A default value is `iso-latin-1-dos'.  */);
-  Vselection_coding_system=intern ("iso-latin-1-dos");
+The default value is `iso-latin-1-dos'.  */);
+  Vselection_coding_system = intern ("iso-latin-1-dos");
 
   DEFVAR_LISP ("next-selection-coding-system", &Vnext_selection_coding_system,
               doc: /* Coding system for the next communication with other X clients.
 Usually, `selection-coding-system' is used for communicating with
-other X clients.   But, if this variable is set, it is used for the
-next communication only.   After the communication, this variable is
+other X clients.  But, if this variable is set, it is used for the
+next communication only.  After the communication, this variable is
 set to nil.  */);
   Vnext_selection_coding_system = Qnil;
 
@@ -763,3 +765,6 @@ set to nil.  */);
 }
 
 #endif /* MSDOS */
+
+/* arch-tag: 085a22c8-7324-436e-a6da-102464ce95d8
+   (do not change this comment) */