unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Jari Aalto <jari.aalto@cante.net>
To: submit@emacsbugs.donarmstrong.com
Subject: bug#4578: [PATCH] Emacs CVS: ispell.el (ispell-get-decoded-string): signal an error if no slot found
Date: Mon, 28 Sep 2009 14:39:07 +0300	[thread overview]
Message-ID: <87k4zjwb6s.fsf@jondo.cante.net> (raw)

[-- 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


             reply	other threads:[~2009-09-28 11:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <j18wfag1g1.fsf@fencepost.gnu.org>
2009-09-28 11:39 ` Jari Aalto [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k4zjwb6s.fsf@jondo.cante.net \
    --to=jari.aalto@cante.net \
    --cc=4578@emacsbugs.donarmstrong.com \
    --cc=submit@emacsbugs.donarmstrong.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).