emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/src/w32select.c


From: Jason Rumney
Subject: [Emacs-diffs] Changes to emacs/src/w32select.c
Date: Sat, 23 Feb 2002 13:12:30 -0500

Index: emacs/src/w32select.c
diff -c emacs/src/w32select.c:1.22 emacs/src/w32select.c:1.23
*** emacs/src/w32select.c:1.22  Mon Nov 12 18:53:33 2001
--- emacs/src/w32select.c       Sat Feb 23 13:12:30 2002
***************
*** 197,202 ****
--- 197,209 ----
          Vnext_selection_coding_system = Vselection_coding_system;
        setup_coding_system
          (Fcheck_coding_system (Vnext_selection_coding_system), &coding);
+       if (SYMBOLP (coding.pre_write_conversion)
+           && !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));
+         }
        coding.src_multibyte = 1;
        coding.dst_multibyte = 0;
        Vnext_selection_coding_system = Qnil;
***************
*** 294,321 ****
          && memcmp(last_clipboard_text, src, nbytes) == 0)
        goto closeclip;
  
!     if (
! #if 1
!       1
! #else
!       ! NILP (buffer_defaults.enable_multibyte_characters)
! #endif
!       )
!       {
!       /* If the clipboard data contains any non-ascii code, we
!          need to decode it.  */
!       int i;
  
-       for (i = 0; i < nbytes; i++)
-         {
-           if (src[i] >= 0x80)
-             {
-               require_decoding = 1;
-               break;
-             }
-         }
-       }
-     
      if (require_decoding)
        {
        int bufsize;
--- 301,321 ----
          && memcmp(last_clipboard_text, src, nbytes) == 0)
        goto closeclip;
  
!     {
!       /* If the clipboard data contains any non-ascii code, we
!        need to decode it.  */
!       int i;
! 
!       for (i = 0; i < nbytes; i++)
!       {
!         if (src[i] >= 0x80)
!           {
!             require_decoding = 1;
!             break;
!           }
!       }
!     }
  
      if (require_decoding)
        {
        int bufsize;
***************
*** 337,342 ****
--- 337,345 ----
          ret = make_string_from_bytes ((char *) buf,
                                        coding.produced_char, coding.produced);
        xfree (buf);
+       if (SYMBOLP (coding.post_read_conversion)
+           && !NILP (Ffboundp (coding.post_read_conversion)))
+         ret = run_pre_post_conversion_on_str (ret, &coding, 0);
        }
      else
        {



reply via email to

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