emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#15033: closed ([PATCH] Fix display of symbols cont


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#15033: closed ([PATCH] Fix display of symbols containing backslashes)
Date: Tue, 06 Aug 2013 22:05:02 +0000

Your message dated Tue, 06 Aug 2013 18:04:18 -0400
with message-id <address@hidden>
and subject line Re: bug#15033: [PATCH] Fix display of symbols containing 
backslashes
has caused the debbugs.gnu.org bug report #15033,
regarding [PATCH] Fix display of symbols containing backslashes
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
15033: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15033
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: [PATCH] Fix display of symbols containing backslashes Date: Tue, 6 Aug 2013 15:44:08 +0200
Symbols printed with `#{...#}' notation need to double backslashes when
displaying as they serve as escape characters when reading.  The
behavior before this patch is clearly erroneous:

GNU Guile 2.0.7
[...]
scheme@(guile-user)> (string->symbol "\\(")
$1 = #{\\x28;}#
scheme@(guile-user)> (symbol->string '#{\\x28;}#)
$2 = "\\x28;"
---
 libguile/print.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libguile/print.c b/libguile/print.c
index 50f5a3e..bb7fd84 100644
--- a/libguile/print.c
+++ b/libguile/print.c
@@ -448,7 +448,8 @@ print_extended_symbol (SCM sym, SCM port)
                                             SUBSEQUENT_IDENTIFIER_MASK
                                             | UC_CATEGORY_MASK_Zs))
         {
-          if (!display_character (c, port, strategy))
+          if (!display_character (c, port, strategy)
+             || (c == '\\' && !display_character (c, port, strategy)))
             scm_encoding_error ("print_extended_symbol", errno,
                                 "cannot convert to output locale",
                                 port, SCM_MAKE_CHAR (c));
-- 
1.8.1.2




--- End Message ---
--- Begin Message --- Subject: Re: bug#15033: [PATCH] Fix display of symbols containing backslashes Date: Tue, 06 Aug 2013 18:04:18 -0400 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)
David Kastrup <address@hidden> writes:

> Symbols printed with `#{...#}' notation need to double backslashes when
> displaying as they serve as escape characters when reading.  The
> behavior before this patch is clearly erroneous:
>
> GNU Guile 2.0.7
> [...]
> scheme@(guile-user)> (string->symbol "\\(")
> $1 = #{\\x28;}#
> scheme@(guile-user)> (symbol->string '#{\\x28;}#)
> $2 = "\\x28;"
> ---
>  libguile/print.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/libguile/print.c b/libguile/print.c
> index 50f5a3e..bb7fd84 100644
> --- a/libguile/print.c
> +++ b/libguile/print.c
> @@ -448,7 +448,8 @@ print_extended_symbol (SCM sym, SCM port)
>                                              SUBSEQUENT_IDENTIFIER_MASK
>                                              | UC_CATEGORY_MASK_Zs))
>          {
> -          if (!display_character (c, port, strategy))
> +          if (!display_character (c, port, strategy)
> +           || (c == '\\' && !display_character (c, port, strategy)))
>              scm_encoding_error ("print_extended_symbol", errno,
>                                  "cannot convert to output locale",
>                                  port, SCM_MAKE_CHAR (c));

Applied in b4a099883d20d7852c95acf07ab6cbc56bce18c4.

     Thanks!
       Mark


--- End Message ---

reply via email to

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