* bug#6761: 23.2; flyspell-prog-mode in TeX mode
@ 2010-07-30 5:26 Leo
2010-11-12 16:59 ` Agustin Martin
0 siblings, 1 reply; 3+ messages in thread
From: Leo @ 2010-07-30 5:26 UTC (permalink / raw)
To: 6761
When flyspell-prog-mode is turned on a TeX buffer, anything that has a
trailing % will be checked, for example
bookmarksnumbered%
This is incorrect as the word is neither doc string nor comment. I run
into this bug fairly often in LaTeX class and style files.
Leo
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#6761: 23.2; flyspell-prog-mode in TeX mode
2010-07-30 5:26 bug#6761: 23.2; flyspell-prog-mode in TeX mode Leo
@ 2010-11-12 16:59 ` Agustin Martin
2010-11-15 13:28 ` Agustin Martin
0 siblings, 1 reply; 3+ messages in thread
From: Agustin Martin @ 2010-11-12 16:59 UTC (permalink / raw)
To: Leo, 6761
[-- Attachment #1: Type: text/plain, Size: 910 bytes --]
On Fri, Jul 30, 2010 at 06:26:00AM +0100, Leo wrote:
> When flyspell-prog-mode is turned on a TeX buffer, anything that has a
> trailing % will be checked, for example
>
> bookmarksnumbered%
>
> This is incorrect as the word is neither doc string nor comment. I run
> into this bug fairly often in LaTeX class and style files.
I finally had time to look at this and seems I found the problem.
flyspell-prog-mode just checks that face is not one of the faces selected as
text faces, but does that in the char right after the word, so in
auto%
checks face in the % char getting font-lock-comment-face instead of nil as
should be for a not-to-be-checked word.
I am playing with attached patch that tries to make sure that check is done
in the final character of the word, not in the next char outside it.
Will test a bit more and commit if no problems are found.
Thanks for your feedback,
--
Agustin
[-- Attachment #2: flyspell-prog-mode.0.diff --]
[-- Type: text/x-diff, Size: 542 bytes --]
--- flyspell.el.orig 2010-10-20 13:56:38.000000000 +0200
+++ flyspell.el 2010-11-12 17:15:52.000000000 +0100
@@ -1063,7 +1063,9 @@
start end poss word ispell-filter)
(if (or (eq flyspell-word nil)
(and (fboundp flyspell-generic-check-word-predicate)
- (not (funcall flyspell-generic-check-word-predicate))))
+ (save-excursion
+ (goto-char (- (nth 2 flyspell-word) 1))
+ (not (funcall flyspell-generic-check-word-predicate)))))
t
(progn
;; destructure return flyspell-word info list.
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#6761: 23.2; flyspell-prog-mode in TeX mode
2010-11-12 16:59 ` Agustin Martin
@ 2010-11-15 13:28 ` Agustin Martin
0 siblings, 0 replies; 3+ messages in thread
From: Agustin Martin @ 2010-11-15 13:28 UTC (permalink / raw)
To: Leo, 6761-done
On Fri, Nov 12, 2010 at 05:59:14PM +0100, Agustin Martin wrote:
> On Fri, Jul 30, 2010 at 06:26:00AM +0100, Leo wrote:
> > When flyspell-prog-mode is turned on a TeX buffer, anything that has a
> > trailing % will be checked, for example
> >
> > bookmarksnumbered%
> >
> > This is incorrect as the word is neither doc string nor comment. I run
> > into this bug fairly often in LaTeX class and style files.
>
> I finally had time to look at this and seems I found the problem.
> flyspell-prog-mode just checks that face is not one of the faces selected as
> text faces, but does that in the char right after the word, so in
>
> auto%
>
> checks face in the % char getting font-lock-comment-face instead of nil as
> should be for a not-to-be-checked word.
Committed a change that should fix this, so closing this bug report.
Just made sure that (flyspell-prog-mode) checks inside the word.
--
Agustin
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-11-15 13:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-30 5:26 bug#6761: 23.2; flyspell-prog-mode in TeX mode Leo
2010-11-12 16:59 ` Agustin Martin
2010-11-15 13:28 ` Agustin Martin
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).