aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChong Yidong2010-11-21 13:16:19 -0500
committerChong Yidong2010-11-21 13:16:19 -0500
commit35f1de62f2ab87e39c4a058cb34668727e9a9c42 (patch)
tree7f744c6d1b12551d879d1316f39d341e29e009fa /src
parent3e99b8257bc97f34595128b200e25b76a2fe560f (diff)
downloademacs-35f1de62f2ab87e39c4a058cb34668727e9a9c42.tar.gz
emacs-35f1de62f2ab87e39c4a058cb34668727e9a9c42.zip
* editfns.c (Fbyte_to_string): Signal an error if arg is not a byte.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/editfns.c4
2 files changed, 7 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 4655ea714ad..f986c03cc14 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
12010-11-21 Chong Yidong <cyd@stupidchicken.com>
2
3 * editfns.c (Fbyte_to_string): Signal an error arg is not a byte.
4
12010-11-20 Jan Djärv <jan.h.d@swipnet.se> 52010-11-20 Jan Djärv <jan.h.d@swipnet.se>
2 6
3 * gtkutil.c (menubar_map_cb): New function (Bug#7425). 7 * gtkutil.c (menubar_map_cb): New function (Bug#7425).
diff --git a/src/editfns.c b/src/editfns.c
index ea279a462f2..910fd13aed4 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -222,12 +222,14 @@ usage: (char-to-string CHAR) */)
222} 222}
223 223
224DEFUN ("byte-to-string", Fbyte_to_string, Sbyte_to_string, 1, 1, 0, 224DEFUN ("byte-to-string", Fbyte_to_string, Sbyte_to_string, 1, 1, 0,
225 doc: /* Convert arg BYTE to a string containing that byte. */) 225 doc: /* Convert arg BYTE to a unibyte string containing that byte. */)
226 (byte) 226 (byte)
227 Lisp_Object byte; 227 Lisp_Object byte;
228{ 228{
229 unsigned char b; 229 unsigned char b;
230 CHECK_NUMBER (byte); 230 CHECK_NUMBER (byte);
231 if (XINT (byte) < 0 || XINT (byte) > 255)
232 error ("Invalid byte");
231 b = XINT (byte); 233 b = XINT (byte);
232 return make_string_from_bytes (&b, 1, 1); 234 return make_string_from_bytes (&b, 1, 1);
233} 235}