unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#4325: 23.1; kp-0 in ispell
@ 2009-09-03  9:02 ` Per Starbäck
  2009-09-03  9:35   ` Andreas Schwab
  2009-09-13 20:40   ` bug#4325: marked as done (23.1; kp-0 in ispell) Emacs bug Tracking System
  0 siblings, 2 replies; 5+ messages in thread
From: Per Starbäck @ 2009-09-03  9:02 UTC (permalink / raw)
  To: bug-gnu-emacs, ispell-el-bugs

In GNU Emacs 23.1.1 (i686-pc-linux-gnu, GTK+ Version 2.10.4)

emacs -Q
t e h M-x ispell-buffer RET kp-0

Expected result: Changing "teh" into "the" (like I had pressed "0" instead)
Actual result: Spell-checking suspended; use C-u M-$ to resume

Suggested fix:
$ diff -u ispell.el.~1~ ispell.el
--- ispell.el.~1~	2009-06-24 19:54:28.000000000 +0200
+++ ispell.el	2009-09-03 10:51:58.000000000 +0200
@@ -1943,6 +1943,9 @@
 		    ;; ignore mouse events occuring in the same frame.
 		    (while (and input-valid (not (characterp char)))
 		      (setq char (read-event))
+		      ;; Convert kp-0 to ?0, etc.
+		      (when (symbolp char)
+			(setq char (get char 'ascii-character)))
 		      (setq input-valid
 			    (or (characterp char)
 				(and (mouse-event-p char)

2009-09-03  Per Starbäck  <per@starback.se>

	* textmodes/ispell.el (ispell-command-loop): Accept keypad digits
	as alternative to ordinary digits.






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

* bug#4325: 23.1; kp-0 in ispell
  2009-09-03  9:02 ` bug#4325: 23.1; kp-0 in ispell Per Starbäck
@ 2009-09-03  9:35   ` Andreas Schwab
  2009-09-03  9:43     ` Per Starbäck
  2009-09-13 20:40   ` bug#4325: marked as done (23.1; kp-0 in ispell) Emacs bug Tracking System
  1 sibling, 1 reply; 5+ messages in thread
From: Andreas Schwab @ 2009-09-03  9:35 UTC (permalink / raw)
  To: Per Starbäck; +Cc: bug-gnu-emacs, ispell-el-bugs, 4325

Per Starbäck <per@starback.se> writes:

> +		      ;; Convert kp-0 to ?0, etc.
> +		      (when (symbolp char)
> +			(setq char (get char 'ascii-character)))

			(setq char (or (get char 'ascii-character) char)))

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."






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

* bug#4325: 23.1; kp-0 in ispell
  2009-09-03  9:35   ` Andreas Schwab
@ 2009-09-03  9:43     ` Per Starbäck
  2009-09-03 13:58       ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Per Starbäck @ 2009-09-03  9:43 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: bug-gnu-emacs, ispell-el-bugs, 4325

2009/9/3 Andreas Schwab <schwab@linux-m68k.org>:
> Per Starbäck <per@starback.se> writes:
>
>> +                   ;; Convert kp-0 to ?0, etc.
>> +                   (when (symbolp char)
>> +                     (setq char (get char 'ascii-character)))
>
>                        (setq char (or (get char 'ascii-character) char)))

Yes, that is maybe clearer (I'm not sure really), even though it's
unnecessary. (Any other
symbol will immediately trigger input-invalid anyway, so nil is as
good as the previous value.)





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

* bug#4325: 23.1; kp-0 in ispell
  2009-09-03  9:43     ` Per Starbäck
@ 2009-09-03 13:58       ` Stefan Monnier
  0 siblings, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2009-09-03 13:58 UTC (permalink / raw)
  To: Per Starbäck; +Cc: Andreas Schwab, ispell-el-bugs, 4325

Does the patch below work as well?


        Stefan


=== modified file 'lisp/textmodes/ispell.el'
--- lisp/textmodes/ispell.el	2009-08-29 18:06:59 +0000
+++ lisp/textmodes/ispell.el	2009-09-03 13:56:59 +0000
@@ -1958,7 +1958,7 @@
 		    ;; event), stop ispell.  As a special exception,
 		    ;; ignore mouse events occuring in the same frame.
 		    (while (and input-valid (not (characterp char)))
-		      (setq char (read-event))
+		      (setq char (read-key))
 		      (setq input-valid
 			    (or (characterp char)
 				(and (mouse-event-p char)







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

* bug#4325: marked as done (23.1; kp-0 in ispell)
  2009-09-03  9:02 ` bug#4325: 23.1; kp-0 in ispell Per Starbäck
  2009-09-03  9:35   ` Andreas Schwab
@ 2009-09-13 20:40   ` Emacs bug Tracking System
  1 sibling, 0 replies; 5+ messages in thread
From: Emacs bug Tracking System @ 2009-09-13 20:40 UTC (permalink / raw)
  To: Chong Yidong

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

Your message dated Sun, 13 Sep 2009 16:36:10 -0400
with message-id <87d45umvk5.fsf@cyd.mit.edu>
and subject line Re: 23.1; kp-0 in ispell
has caused the Emacs bug report #4325,
regarding 23.1; kp-0 in ispell
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 owner@emacsbugs.donarmstrong.com
immediately.)


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

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

From: "Per Starbäck" <per@starback.se>
To: bug-gnu-emacs@gnu.org, ispell-el-bugs@itcorp.com
Subject: 23.1; kp-0 in ispell
Date: Thu, 3 Sep 2009 11:02:50 +0200
Message-ID: <912155b0909030202ra3c56b8ya2b37cef57302984@mail.gmail.com>

In GNU Emacs 23.1.1 (i686-pc-linux-gnu, GTK+ Version 2.10.4)

emacs -Q
t e h M-x ispell-buffer RET kp-0

Expected result: Changing "teh" into "the" (like I had pressed "0" instead)
Actual result: Spell-checking suspended; use C-u M-$ to resume

Suggested fix:
$ diff -u ispell.el.~1~ ispell.el
--- ispell.el.~1~	2009-06-24 19:54:28.000000000 +0200
+++ ispell.el	2009-09-03 10:51:58.000000000 +0200
@@ -1943,6 +1943,9 @@
 		    ;; ignore mouse events occuring in the same frame.
 		    (while (and input-valid (not (characterp char)))
 		      (setq char (read-event))
+		      ;; Convert kp-0 to ?0, etc.
+		      (when (symbolp char)
+			(setq char (get char 'ascii-character)))
 		      (setq input-valid
 			    (or (characterp char)
 				(and (mouse-event-p char)

2009-09-03  Per Starbäck  <per@starback.se>

	* textmodes/ispell.el (ispell-command-loop): Accept keypad digits
	as alternative to ordinary digits.



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

From: Chong Yidong <cyd@stupidchicken.com>
To: "Per Starbäck" <per@starback.se>
Cc: 4325-done@emacsbugs.donarmstrong.com
Subject: Re: 23.1; kp-0 in ispell
Date: Sun, 13 Sep 2009 16:36:10 -0400
Message-ID: <87d45umvk5.fsf@cyd.mit.edu>

> emacs -Q
> t e h M-x ispell-buffer RET kp-0

> Expected result: Changing "teh" into "the" (like I had pressed "0"
> instead)
> Actual result: Spell-checking suspended; use C-u M-$ to resume

Thanks for spotting this.  I've checked in your suggested fix.

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

end of thread, other threads:[~2009-09-13 20:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <87d45umvk5.fsf@cyd.mit.edu>
2009-09-03  9:02 ` bug#4325: 23.1; kp-0 in ispell Per Starbäck
2009-09-03  9:35   ` Andreas Schwab
2009-09-03  9:43     ` Per Starbäck
2009-09-03 13:58       ` Stefan Monnier
2009-09-13 20:40   ` bug#4325: marked as done (23.1; kp-0 in ispell) 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).