unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#638: 23.0.60; read-char evaluates to unexpected non-character value
@ 2008-08-01 11:55 ` Markus Triska
  2008-08-01 12:49   ` Lawrence Mitchell
  2008-08-14 19:35   ` bug#638: marked as done (23.0.60; read-char evaluates to unexpected non-character value) Emacs bug Tracking System
  0 siblings, 2 replies; 3+ messages in thread
From: Markus Triska @ 2008-08-01 11:55 UTC (permalink / raw)
  To: emacs-pretest-bug

When I do:

   $ emacs -Q --eval "(insert (format \"%s\" (read-char nil nil 0.1))))"

The content of *scratch* is:

   7340161

whereas it is "nil" in Emacs 22.2.

In GNU Emacs 23.0.60.3 (i386-apple-darwin8.11.1, GTK+ Version 2.12.9)
 of 2008-07-25 on pnsgw3-client030.demo.tuwien.ac.at
Windowing system distributor `The XFree86 Project, Inc', version 11.0.40400000
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: nil
  default-enable-multibyte-characters: t






^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#638: 23.0.60; read-char evaluates to unexpected non-character value
  2008-08-01 11:55 ` bug#638: 23.0.60; read-char evaluates to unexpected non-character value Markus Triska
@ 2008-08-01 12:49   ` Lawrence Mitchell
  2008-08-14 19:35   ` bug#638: marked as done (23.0.60; read-char evaluates to unexpected non-character value) Emacs bug Tracking System
  1 sibling, 0 replies; 3+ messages in thread
From: Lawrence Mitchell @ 2008-08-01 12:49 UTC (permalink / raw)
  To: emacs-pretest-bug; +Cc: bug-gnu-emacs

Markus Triska wrote:
> When I do:

>    $ emacs -Q --eval "(insert (format \"%s\" (read-char nil nil 0.1))))"

> The content of *scratch* is:

>    7340161

This is due to the following change:

2008-03-05  Kenichi Handa  <handa@ni.aist.go.jp>

	* lread.c (Fread_char): Resolve modifiers.
	(Fread_char_exclusive): Likewise.

It unconditionally resolves modifiers even if read_filtered_event
returns nil.  The following patch fixes things, I think.

2008-08-01  Lawrence Mitchell  <wence@gmx.li>

	* lread.c (Fread_char, Fread_char_exclusive): If no character
	event is read before timeout is reached, return nil, rather than
	converting to a number.


diff --git a/src/lread.c b/src/lread.c
index f36162b..97b22d5 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -796,6 +796,8 @@ floating-point value.  */)
   if (! NILP (prompt))
     message_with_string ("%s", prompt, 0);
   val = read_filtered_event (1, 1, 1, ! NILP (inherit_input_method), seconds);
+  if ( NILP (val) )
+    return Qnil;
   c = XINT (val);
   return make_number (char_resolve_modifier_mask (c));
 }
@@ -841,6 +843,8 @@ floating-point value.  */)
   if (! NILP (prompt))
     message_with_string ("%s", prompt, 0);
   val = read_filtered_event (1, 1, 0, ! NILP (inherit_input_method), seconds);
+  if ( NILP (val) )
+    return Qnil;
   c = XINT (val);
   return make_number (char_resolve_modifier_mask (c));
 }
-- 
1.5.6.GIT



-- 
Lawrence Mitchell <wence@gmx.li>







^ permalink raw reply related	[flat|nested] 3+ messages in thread

* bug#638: marked as done (23.0.60; read-char evaluates to  unexpected non-character value)
  2008-08-01 11:55 ` bug#638: 23.0.60; read-char evaluates to unexpected non-character value Markus Triska
  2008-08-01 12:49   ` Lawrence Mitchell
@ 2008-08-14 19:35   ` Emacs bug Tracking System
  1 sibling, 0 replies; 3+ messages in thread
From: Emacs bug Tracking System @ 2008-08-14 19:35 UTC (permalink / raw)
  To: Chong Yidong

[-- Attachment #1: Type: text/plain, Size: 889 bytes --]


Your message dated Thu, 14 Aug 2008 15:27:19 -0400
with message-id <87fxp7s8h4.fsf@stupidchicken.com>
and subject line Re: 23.0.60; read-char evaluates to unexpected non-character value
has caused the Emacs bug report #638,
regarding 23.0.60; read-char evaluates to unexpected non-character value
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact don@donarmstrong.com
immediately.)


-- 
638: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=638
Emacs Bug Tracking System
Contact don@donarmstrong.com with problems

[-- Attachment #2: Type: message/rfc822, Size: 2799 bytes --]

From: Markus Triska <markus.triska@gmx.at>
To: emacs-pretest-bug@gnu.org
Subject: 23.0.60; read-char evaluates to unexpected non-character value
Date: Fri, 01 Aug 2008 13:55:22 +0200
Message-ID: <m163qlkl05.fsf@pnsgw1-client097.demo.tuwien.ac.at>

When I do:

   $ emacs -Q --eval "(insert (format \"%s\" (read-char nil nil 0.1))))"

The content of *scratch* is:

   7340161

whereas it is "nil" in Emacs 22.2.

In GNU Emacs 23.0.60.3 (i386-apple-darwin8.11.1, GTK+ Version 2.12.9)
 of 2008-07-25 on pnsgw3-client030.demo.tuwien.ac.at
Windowing system distributor `The XFree86 Project, Inc', version 11.0.40400000
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: nil
  default-enable-multibyte-characters: t



[-- Attachment #3: Type: message/rfc822, Size: 1534 bytes --]

From: Chong Yidong <cyd@stupidchicken.com>
To: Lawrence Mitchell <wence@gmx.li>
Cc: 638-done@emacsbugs.donarmstrong.com
Subject: Re: 23.0.60; read-char evaluates to unexpected non-character value
Date: Thu, 14 Aug 2008 15:27:19 -0400
Message-ID: <87fxp7s8h4.fsf@stupidchicken.com>

Lawrence Mitchell wrote:

> > When I do:
> >
> >    $ emacs -Q --eval "(insert (format \"%s\" (read-char nil nil 0.1))))"
> >
> > The content of *scratch* is:
> >
> >    7340161
>
> This is due to the following change:
>
> 2008-03-05  Kenichi Handa  <handa@ni.aist.go.jp>
>
> 	* lread.c (Fread_char): Resolve modifiers.
> 	(Fread_char_exclusive): Likewise.
>
> It unconditionally resolves modifiers even if read_filtered_event
> returns nil.  The following patch fixes things, I think.

I've checked your patch into CVS.  Thanks for debugging and fixing this.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-08-14 19:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <87fxp7s8h4.fsf@stupidchicken.com>
2008-08-01 11:55 ` bug#638: 23.0.60; read-char evaluates to unexpected non-character value Markus Triska
2008-08-01 12:49   ` Lawrence Mitchell
2008-08-14 19:35   ` bug#638: marked as done (23.0.60; read-char evaluates to unexpected non-character value) Emacs bug Tracking System

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).