unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#4578: [PATCH] Emacs CVS: ispell.el (ispell-get-decoded-string): signal an error if no slot found
@ 2009-09-28 11:39 ` Jari Aalto
  2009-10-17  3:20   ` bug#4578: marked as done ([PATCH] Emacs CVS: ispell.el (ispell-get-decoded-string): signal an error if no slot found) Emacs bug Tracking System
  0 siblings, 1 reply; 2+ messages in thread
From: Jari Aalto @ 2009-09-28 11:39 UTC (permalink / raw)
  To: submit

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

Tags: patch

If the empty slot is not checked, the spell checking breaks in myterious
errors. E.g. flyspell-get-casechars returns nil, which breaks all of
flyspell.

2009-09-28  Jari Aalto  <jari.aalto@cante.net>

        * textmodes/ispell.el (ispell-get-decoded-string): signal an error
        if no matching slot is found from `ispell-current-dictionary'


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-lisp-textmodes-ispell.el-ispell-get-decoded-string-s.patch --]
[-- Type: text/x-diff, Size: 1071 bytes --]

From b301e76fdf3e83de88101891a3cd7ea13f5fba14 Mon Sep 17 00:00:00 2001
From: Jari Aalto <jari.aalto@cante.net>
Date: Mon, 28 Sep 2009 14:35:21 +0300
Subject: [PATCH] lisp/textmodes/ispell.el: (ispell-get-decoded-string): signal an error if no slot found


Signed-off-by: Jari Aalto <jari.aalto@cante.net>
---
 lisp/textmodes/ispell.el |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index 6d02cf9..729122b 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -1289,7 +1289,8 @@ Protects against bogus binding of `enable-multibyte-characters' in XEmacs."
 (defun ispell-get-decoded-string (n)
   (let* ((slot (or
 		(assoc ispell-current-dictionary ispell-local-dictionary-alist)
-		(assoc ispell-current-dictionary ispell-dictionary-alist)))
+		(assoc ispell-current-dictionary ispell-dictionary-alist)
+		(error "No slot match in ispell-current-dictionary")))
 	 (str (nth n slot)))
     (when (and (> (length str) 0)
 	       (not (multibyte-string-p str)))
-- 
1.6.3.3


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

* bug#4578: marked as done ([PATCH] Emacs CVS: ispell.el (ispell-get-decoded-string): signal an error if no slot found)
  2009-09-28 11:39 ` bug#4578: [PATCH] Emacs CVS: ispell.el (ispell-get-decoded-string): signal an error if no slot found Jari Aalto
@ 2009-10-17  3:20   ` Emacs bug Tracking System
  0 siblings, 0 replies; 2+ messages in thread
From: Emacs bug Tracking System @ 2009-10-17  3:20 UTC (permalink / raw)
  To: Glenn Morris

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

Your message dated Fri, 16 Oct 2009 23:10:38 -0400
with message-id <j18wfag1g1.fsf@fencepost.gnu.org>
and subject line Re: Bug#4578: ispell.el (ispell-get-decoded-string): signal an error if no slot found
has caused the Emacs bug report #4578,
regarding [PATCH] Emacs CVS: ispell.el (ispell-get-decoded-string): signal an error if no slot found
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.)


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

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

[-- Attachment #2.1.1: Type: text/plain, Size: 360 bytes --]

Tags: patch

If the empty slot is not checked, the spell checking breaks in myterious
errors. E.g. flyspell-get-casechars returns nil, which breaks all of
flyspell.

2009-09-28  Jari Aalto  <jari.aalto@cante.net>

        * textmodes/ispell.el (ispell-get-decoded-string): signal an error
        if no matching slot is found from `ispell-current-dictionary'


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2.1.2: 0001-lisp-textmodes-ispell.el-ispell-get-decoded-string-s.patch --]
[-- Type: text/x-diff, Size: 1071 bytes --]

From b301e76fdf3e83de88101891a3cd7ea13f5fba14 Mon Sep 17 00:00:00 2001
From: Jari Aalto <jari.aalto@cante.net>
Date: Mon, 28 Sep 2009 14:35:21 +0300
Subject: [PATCH] lisp/textmodes/ispell.el: (ispell-get-decoded-string): signal an error if no slot found


Signed-off-by: Jari Aalto <jari.aalto@cante.net>
---
 lisp/textmodes/ispell.el |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index 6d02cf9..729122b 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -1289,7 +1289,8 @@ Protects against bogus binding of `enable-multibyte-characters' in XEmacs."
 (defun ispell-get-decoded-string (n)
   (let* ((slot (or
 		(assoc ispell-current-dictionary ispell-local-dictionary-alist)
-		(assoc ispell-current-dictionary ispell-dictionary-alist)))
+		(assoc ispell-current-dictionary ispell-dictionary-alist)
+		(error "No slot match in ispell-current-dictionary")))
 	 (str (nth n slot)))
     (when (and (> (length str) 0)
 	       (not (multibyte-string-p str)))
-- 
1.6.3.3


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

From: Glenn Morris <rgm@gnu.org>
To: 4578-done@emacsbugs.donarmstrong.com
Subject: Re: Bug#4578: ispell.el (ispell-get-decoded-string): signal an error if no slot found
Date: Fri, 16 Oct 2009 23:10:38 -0400
Message-ID: <j18wfag1g1.fsf@fencepost.gnu.org>


Thanks; applied.

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

end of thread, other threads:[~2009-10-17  3:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <j18wfag1g1.fsf@fencepost.gnu.org>
2009-09-28 11:39 ` bug#4578: [PATCH] Emacs CVS: ispell.el (ispell-get-decoded-string): signal an error if no slot found Jari Aalto
2009-10-17  3:20   ` bug#4578: marked as done ([PATCH] Emacs CVS: ispell.el (ispell-get-decoded-string): signal an error if no slot found) 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).