GNU bug report logs - #21157
24.5; Flyspell does not highlight repeated words

Previous Next

Package: emacs;

Reported by: Florent Marchand de Kerchove <fmdkdd <at> gmail.com>

Date: Wed, 29 Jul 2015 16:28:02 UTC

Severity: normal

Tags: confirmed

Found in version 24.5

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 21157 in the body.
You can then email your comments to 21157 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#21157; Package emacs. (Wed, 29 Jul 2015 16:28:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Florent Marchand de Kerchove <fmdkdd <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 29 Jul 2015 16:28:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Florent Marchand de Kerchove <fmdkdd <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.5; Flyspell does not highlight repeated words
Date: Wed, 29 Jul 2015 18:11:39 +0200
Start `emacs -Q', and turn on flyspell-mode with `M-x flyspell-mode 
RET'.  Type `the the '.

The second `the' should be automatically highlighted by Flyspell as a
repeated word (red squiggles under the word).  Under 24.5.1, there is no
highlighting.

In GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8)
 of 2015-04-20 on portinfo73
Windowing system distributor `The X.Org Foundation', version 11.0.11501000
System Description:	Ubuntu 14.04.2 LTS

Important settings:
  value of $LC_MONETARY: fr_FR.UTF-8
  value of $LC_NUMERIC: fr_FR.UTF-8
  value of $LC_TIME: fr_FR.UTF-8
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  flyspell-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
Checking 24 files in /usr/local/share/emacs/24.5/lisp/cedet...
Checking 57 files in /usr/local/share/emacs/24.5/lisp/calendar...
Checking 87 files in /usr/local/share/emacs/24.5/lisp/calc...
Checking 111 files in /usr/local/share/emacs/24.5/lisp/obsolete...
Checking for load-path shadows...done
Auto-saving...
End of buffer
Beginning of buffer [12 times]
Quit
Starting new Ispell process /usr/bin/aspell with default dictionary...

Load-path shadows:
None found.

Features:
(flyspell ispell pp shadow sort gnus-util mail-extr emacsbug message
format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util help-fns mail-prsvr mail-utils help-mode easymenu
time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment lisp-mode prog-mode register page menu-bar
rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax
facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak
czech european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button
faces cus-face macroexp files text-properties overlay sha1 md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process dbusbind gfilenotify dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty emacs)

Memory information:
((conses 16 78612 7826)
 (symbols 48 18168 0)
 (miscs 40 47 174)
 (strings 32 11016 5290)
 (string-bytes 1 305291)
 (vectors 16 10095)
 (vector-slots 8 393430 12633)
 (floats 8 70 291)
 (intervals 56 223 18)
 (buffers 960 13)
 (heap 1024 17151 1070))

-- 
fmdkdd




Added indication that bug 21157 blocks19759 Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 29 Jul 2015 16:52:01 GMT) Full text and rfc822 format available.

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Wed, 29 Jul 2015 17:55:01 GMT) Full text and rfc822 format available.

Notification sent to Florent Marchand de Kerchove <fmdkdd <at> gmail.com>:
bug acknowledged by developer. (Wed, 29 Jul 2015 17:55:02 GMT) Full text and rfc822 format available.

Message #12 received at 21157-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Florent Marchand de Kerchove <fmdkdd <at> gmail.com>
Cc: 21157-done <at> debbugs.gnu.org
Subject: Re: bug#21157: 24.5; Flyspell does not highlight repeated words
Date: Wed, 29 Jul 2015 20:53:57 +0300
> Date: Wed, 29 Jul 2015 18:11:39 +0200
> From: Florent Marchand de Kerchove <fmdkdd <at> gmail.com>
> 
> Start `emacs -Q', and turn on flyspell-mode with `M-x flyspell-mode 
> RET'.  Type `the the '.
> 
> The second `the' should be automatically highlighted by Flyspell as a
> repeated word (red squiggles under the word).  Under 24.5.1, there is no
> highlighting.

Thanks, fixed with the patch below.

commit 33b779a11fb6785944383aeeae44f77cb580ee37
Author: Eli Zaretskii <eliz <at> gnu.org>
Date:   Wed Jul 29 20:52:23 2015 +0300

    Resurrect highlighting of repeated words by Flyspell Mode
    
    * lisp/textmodes/flyspell.el (flyspell-word): Leave some non-word
    characters between point and the doublon candidate, so that
    flyspell-word-search-backward finds it.  (Bug#21157)

diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index 2329f29..e074918 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -1119,7 +1119,8 @@ (defun flyspell-word (&optional following known-misspelling)
 		   (let* ((bound
 			   (- start
 			      (- end start)
-			      (- (skip-chars-backward " \t\n\f"))))
+			      (- (save-excursion
+                                   (skip-chars-backward " \t\n\f")))))
 			  (p (when (>= bound (point-min))
 			       (flyspell-word-search-backward word bound t))))
 		     (and p (/= p start)))))




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 27 Aug 2015 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 360 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.