unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Agustin Martin <agustin.martin@hispalinux.es>
Subject: flyspell.el [1.90->1.91] flyspell-large-region-beg should be moved after good match
Date: Fri, 16 Dec 2005 13:42:35 +0100	[thread overview]
Message-ID: <20051216124235.GA3357@agmartin.aq.upm.es> (raw)

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

Hi,

Just noticed commit of flyspell.el 1.91 and a problem in it. In function
flyspell-external-point-words flyspell-large-region-beg is not moved
after successful match. That makes that for buffers like 

ispella
ispella
ispella

only first match is found and tagged as misspelled since all further
searches start from the same point.

I am attaching a possible patch for that,

-- 
Agustin

[-- Attachment #2: flyspell.el.fly-ext-poi-words.diff --]
[-- Type: text/plain, Size: 816 bytes --]

--- flyspell.el.orig	2005-12-16 12:10:52.000000000 +0100
+++ flyspell.el	2005-12-16 13:18:59.000000000 +0100
@@ -1334,7 +1334,8 @@
 				    flyspell-large-region-end t)
 		    (save-excursion
 		      (goto-char (- (point) 1))
-		      (let* ((flyword-prev-l (flyspell-get-word nil))
+		      (let* ((match-point (+ (point) 1))
+			     (flyword-prev-l (flyspell-get-word nil))
 			     (flyword-prev (car flyword-prev-l))
 			     (size-match (= (length flyword-prev) (length word))))
 			(when (or
@@ -1361,7 +1362,7 @@
 			  (setq keep nil)
 			  (flyspell-word)
 			  ;; Next search will begin from end of last match
-			  )))
+			  (setq flyspell-large-region-beg match-point))))
 		  ;; Record if misspelling is not found and try new one
 		  (add-to-list 'words-not-found
 			       (concat " -> " word " - "

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

             reply	other threads:[~2005-12-16 12:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-16 12:42 Agustin Martin [this message]
2005-12-17  1:03 ` flyspell.el [1.90->1.91] flyspell-large-region-beg should be moved after good match Richard M. Stallman
2005-12-19  0:41   ` Agustin Martin
2005-12-19  1:28     ` Agustin Martin
2005-12-22 13:02       ` Agustin Martin

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=20051216124235.GA3357@agmartin.aq.upm.es \
    --to=agustin.martin@hispalinux.es \
    /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).