unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Chong Yidong <cyd@stupidchicken.com>
Cc: emacs-devel@gnu.org
Subject: Re: [agustin.martin@hispalinux.es: Re: flyspell.el: patch for doublons checking from flyspell-large-region]
Date: Sat, 16 Sep 2006 11:06:15 -0400	[thread overview]
Message-ID: <87fyer6ec8.fsf@furball.mit.edu> (raw)
In-Reply-To: <E1GO49t-0006G9-U0@fencepost.gnu.org> (Richard Stallman's message of "Thu\, 14 Sep 2006 23\:14\:29 -0400")

Richard Stallman <rms@gnu.org> writes:

> Would someone please install this?

Done.

> From: Agustin Martin <agustin.martin@hispalinux.es>
> Subject: Re: flyspell.el: patch for doublons checking from flyspell-large-region
> To: Richard Stallman <rms@gnu.org>
>
> - --- flyspell.el.orig	2006-06-28 12:01:43.000000000 +0200
> +++ flyspell.el	2006-06-29 11:33:46.000000000 +0200
> @@ -1455,6 +1455,21 @@
>  	    (while (re-search-forward regexp nil t)
>  	      (delete-region (match-beginning 0) (match-end 0)))))))))
>  
> +;;* ---------------------------------------------------------------
> +;;*     flyspell-check-region-doublons
> +;;* ---------------------------------------------------------------
> +(defun flyspell-check-region-doublons (beg end)
> +  "Check for adjacent duplicated words (doublons) in the given region."
> +  (save-excursion
> +    (goto-char beg)
> +    (flyspell-word)     ; Make sure current word is checked
> +    (backward-word 1)
> +    (while (and (< (point) end)
> +		(re-search-forward "\\b\\([^ \n\t]+\\)[ \n\t]+\\1\\b" end 'move))
> +      (flyspell-word)
> +      (backward-word 1))
> +    (flyspell-word)))
> +
>  ;;*---------------------------------------------------------------------*/
>  ;;*    flyspell-large-region ...                                        */
>  ;;*---------------------------------------------------------------------*/
> @@ -1499,7 +1514,8 @@
>  	  (progn
>  	    (flyspell-process-localwords buffer)
>  	    (with-current-buffer curbuf
> - -	      (flyspell-delete-region-overlays beg end))
> +	      (flyspell-delete-region-overlays beg end)
> +	      (flyspell-check-region-doublons beg end))
>  	    (flyspell-external-point-words))
>  	(error "Can't check region...")))))
>  
>

      reply	other threads:[~2006-09-16 15:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-15  3:14 [agustin.martin@hispalinux.es: Re: flyspell.el: patch for doublons checking from flyspell-large-region] Richard Stallman
2006-09-16 15:06 ` Chong Yidong [this message]

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=87fyer6ec8.fsf@furball.mit.edu \
    --to=cyd@stupidchicken.com \
    --cc=emacs-devel@gnu.org \
    /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).