From c3bb441dd072089f9e6815d9d41c27b5d84aebde Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 19 May 2010 11:23:53 -0400 Subject: [PATCH] * url-util.el (url-unhex-string): Don't accidentally decode as latin-1. * editfns.c (Fbyte_to_string): New function. * NEWS: Add sections for Emacs-23.3. --- etc/ChangeLog | 7 +++++-- etc/NEWS | 27 +++++++++++++++++++++++++++ lisp/url/ChangeLog | 4 ++++ lisp/url/url-util.el | 4 ++-- src/ChangeLog | 4 ++++ src/editfns.c | 11 +++++++++++ 6 files changed, 53 insertions(+), 4 deletions(-) diff --git a/etc/ChangeLog b/etc/ChangeLog index 083035717ba..96a5a85f325 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,7 @@ +2010-05-19 Stefan Monnier + + * NEWS: Add sections for Emacs-23.3. + 2010-05-07 Chong Yidong * Version 23.2 released. @@ -26,8 +30,7 @@ 2010-03-15 Francesc Rocher - * MORE.STUFF: Remove CEDET entry, now distributed as part of - Emacs. + * MORE.STUFF: Remove CEDET entry, now distributed as part of Emacs. 2010-03-06 Glenn Morris diff --git a/etc/NEWS b/etc/NEWS index b52b1f79f41..9124fe1c069 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -14,6 +14,33 @@ for changes in older Emacs versions. You can narrow news to a specific version by calling `view-emacs-news' with a prefix argument or by typing C-u C-h C-n. + +* Installation Changes in Emacs 23.3 + +* Startup Changes in Emacs 23.3 + +* Changes in Emacs 23.3 + + +* Editing Changes in Emacs 23.3 + + +* Changes in Specialized Modes and Packages in Emacs 23.3 + + +* New Modes and Packages in Emacs 23.3 + + +* Incompatible Lisp Changes in Emacs 23.3 + + +* Lisp changes in Emacs 23.3 + +** New function byte-to-string, like char-to-string but for bytes. + + +* Changes in Emacs 23.3 on non-free operating systems + * Installation Changes in Emacs 23.2 diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index a1b045213da..232259f39ea 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog @@ -1,3 +1,7 @@ +2010-05-19 Stefan Monnier + + * url-util.el (url-unhex-string): Don't accidentally decode as latin-1. + 2010-05-07 Chong Yidong * Version 23.2 released. diff --git a/lisp/url/url-util.el b/lisp/url/url-util.el index c0b2595a6e0..e92ccc76285 100644 --- a/lisp/url/url-util.el +++ b/lisp/url/url-util.el @@ -322,10 +322,10 @@ forbidden in URL encoding." tmp (substring str 0 start) (cond (allow-newlines - (char-to-string code)) + (byte-to-string code)) ((or (= code ?\n) (= code ?\r)) " ") - (t (char-to-string code)))) + (t (byte-to-string code)))) str (substring str (match-end 0))))) (setq tmp (concat tmp str)) tmp)) diff --git a/src/ChangeLog b/src/ChangeLog index 557cda8d4f9..6418e8af4a1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2010-05-19 Stefan Monnier + + * editfns.c (Fbyte_to_string): New function. + 2010-05-18 Chong Yidong * character.c (Fstring, Funibyte_string): Use SAFE_ALLOCA to diff --git a/src/editfns.c b/src/editfns.c index 9f30ea06411..caac2c5c199 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -220,6 +220,16 @@ usage: (char-to-string CHAR) */) return make_string_from_bytes (str, 1, len); } +DEFUN ("byte-to-string", Fbyte_to_string, Sbyte_to_string, 1, 1, 0, + doc: /* Convert arg BYTE to a string containing that byte. */) + (byte) + Lisp_Object byte; +{ + CHECK_NUMBER (byte); + unsigned char b = XINT (byte); + return make_string_from_bytes (&b, 1, 1); +} + DEFUN ("string-to-char", Fstring_to_char, Sstring_to_char, 1, 1, 0, doc: /* Convert arg STRING to a character, the first character of that string. A multibyte character is handled correctly. */) @@ -4686,6 +4696,7 @@ functions if all the text being accessed has this property. */); defsubr (&Sgoto_char); defsubr (&Sstring_to_char); defsubr (&Schar_to_string); + defsubr (&Sbyte_to_string); defsubr (&Sbuffer_substring); defsubr (&Sbuffer_substring_no_properties); defsubr (&Sbuffer_string); -- 2.39.2