[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r108251: textmodes/flyspell.el: Delay
From: |
Agustin Martin |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r108251: textmodes/flyspell.el: Delay for otherchars as for normal word components. |
Date: |
Wed, 16 May 2012 10:35:11 +0200 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 108251
committer: Agustin Martin <address@hidden>
branch nick: trunk
timestamp: Wed 2012-05-16 10:35:11 +0200
message:
textmodes/flyspell.el: Delay for otherchars as for normal word components.
(flyspell-check-pre-word-p,
flyspell-check-word-p,
flyspell-debug-signal-word-checked):
Use for otherchars the same delay used for other word components, so word
is not inmediately checked unless we are in a char that is neither a normal
word component nor an otherchar.
modified:
lisp/ChangeLog
lisp/textmodes/flyspell.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-05-16 01:57:20 +0000
+++ b/lisp/ChangeLog 2012-05-16 08:35:11 +0000
@@ -1,3 +1,9 @@
+2012-05-16 Agustín Martín Domingo <address@hidden>
+
+ * flyspell.el (flyspell-check-pre-word-p, flyspell-check-word-p)
+ (flyspell-debug-signal-word-checked): Delay for otherchars as for
+ normal word components.
+
2012-05-16 Stefan Monnier <address@hidden>
* minibuffer.el (completion--sifn-requote): Fix last change.
=== modified file 'lisp/textmodes/flyspell.el'
--- a/lisp/textmodes/flyspell.el 2012-04-23 10:33:25 +0000
+++ b/lisp/textmodes/flyspell.el 2012-05-16 08:35:11 +0000
@@ -739,7 +739,10 @@
(eq flyspell-pre-pre-buffer flyspell-pre-buffer))
nil)
((or (and (= flyspell-pre-point (- (point) 1))
- (eq (char-syntax (char-after flyspell-pre-point)) ?w))
+ (or (eq (char-syntax (char-after flyspell-pre-point)) ?w)
+ (string-match-p (ispell-get-otherchars)
+ (buffer-substring-no-properties
+ flyspell-pre-point (1+ flyspell-pre-point)))))
(= flyspell-pre-point (point))
(= flyspell-pre-point (+ (point) 1)))
nil)
@@ -753,7 +756,10 @@
;; If other post-command-hooks change the buffer,
;; flyspell-pre-point can lie past eob (bug#468).
(null (char-after flyspell-pre-point))
- (eq (char-syntax (char-after flyspell-pre-point)) ?w)))
+ (or (eq (char-syntax (char-after flyspell-pre-point)) ?w)
+ (string-match-p (ispell-get-otherchars)
+ (buffer-substring-no-properties
+ flyspell-pre-point (1+
flyspell-pre-point))))))
nil)
((not (eq (current-buffer) flyspell-pre-buffer))
t)
@@ -815,6 +821,7 @@
(save-excursion
(backward-char 1)
(and (looking-at (flyspell-get-not-casechars))
+ (not (looking-at (ispell-get-otherchars)))
(or flyspell-consider-dash-as-word-delimiter-flag
(not (looking-at "-"))))))
;; yes because we have reached or typed a word delimiter.
@@ -880,6 +887,7 @@
(save-excursion
(backward-char 1)
(and (and (looking-at
(flyspell-get-not-casechars)) 1)
+ (not (looking-at
(ispell-get-otherchars)))
(and (or
flyspell-consider-dash-as-word-delimiter-flag
(not (looking-at "\\-")))
2))))))
c))))
@@ -895,6 +903,7 @@
(save-excursion
(backward-char 1)
(and (looking-at
(flyspell-get-not-casechars))
+ (not (looking-at
(ispell-get-otherchars)))
(or
flyspell-consider-dash-as-word-delimiter-flag
(not (looking-at "\\-"))))))))
c))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r108251: textmodes/flyspell.el: Delay for otherchars as for normal word components.,
Agustin Martin <=