changeset 22716:2d00337b7152

(selection_data_to_lisp_data): Set Vlast_coding_system_used. (lisp_data_to_selection_data): Likewize.
author Kenichi Handa <handa@m17n.org>
date Thu, 09 Jul 1998 02:02:33 +0000
parents c015f24cda4c
children 3e3949ac4cfb
files src/xselect.c
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/xselect.c	Wed Jul 08 02:55:50 1998 +0000
+++ b/src/xselect.c	Thu Jul 09 02:02:33 1998 +0000
@@ -1494,7 +1494,10 @@
 	    }
 	}
       if (!require_encoding)
-	str = make_unibyte_string ((char *) data, size);
+	{
+	  str = make_unibyte_string ((char *) data, size);
+	  Vlast_coding_system_used = Qraw_text;
+	}
       else
 	{
 	  int bufsize;
@@ -1512,6 +1515,7 @@
 		  : coding.produced_char);
 	  str = make_string_from_bytes ((char *) buf, size, coding.produced);
 	  xfree (buf);
+	  Vlast_coding_system_used = coding.symbol;
 	}
       return str;
     }
@@ -1627,6 +1631,7 @@
 	  /* No multibyte character in OBJ.  We need not encode it.  */
 	  *nofree_ret = 1;
 	  if (NILP (type)) type = QSTRING;
+	  Vlast_coding_system_used = Qraw_text;
 	}
       else
 	{
@@ -1657,6 +1662,7 @@
 	      /* We must return it as `COMPOUND_TEXT'.  */
 	      if (NILP (type)) type = QCOMPOUND_TEXT;
 	    }
+	  Vlast_coding_system_used = coding.symbol;
 	}
     }
   else if (SYMBOLP (obj))