Commit 65034a51 authored by Agustín Martín's avatar Agustín Martín
Browse files

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.
parent 27cb7be2
2012-05-16 Agustín Martín Domingo <agustin.martin@hispalinux.es>
* 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 <monnier@iro.umontreal.ca>
* minibuffer.el (completion--sifn-requote): Fix last change.
......
......@@ -739,7 +739,10 @@ before the current command."
(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 @@ before the current command."
;; 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 @@ Mostly we check word delimiters."
(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 @@ Mostly we check word delimiters."
(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 @@ Mostly we check word delimiters."
(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))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment