* bug#21157: 24.5; Flyspell does not highlight repeated words
@ 2015-07-29 16:11 Florent Marchand de Kerchove
2015-07-29 17:53 ` Eli Zaretskii
0 siblings, 1 reply; 2+ messages in thread
From: Florent Marchand de Kerchove @ 2015-07-29 16:11 UTC (permalink / raw)
To: 21157
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#21157: 24.5; Flyspell does not highlight repeated words
2015-07-29 16:11 bug#21157: 24.5; Flyspell does not highlight repeated words Florent Marchand de Kerchove
@ 2015-07-29 17:53 ` Eli Zaretskii
0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2015-07-29 17:53 UTC (permalink / raw)
To: Florent Marchand de Kerchove; +Cc: 21157-done
> Date: Wed, 29 Jul 2015 18:11:39 +0200
> From: Florent Marchand de Kerchove <fmdkdd@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@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)))))
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-07-29 17:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-29 16:11 bug#21157: 24.5; Flyspell does not highlight repeated words Florent Marchand de Kerchove
2015-07-29 17:53 ` Eli Zaretskii
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.