diff options
Diffstat (limited to 'lisp/textmodes')
| -rw-r--r-- | lisp/textmodes/flyspell.el | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index 33fa551c8a4..156a7e532e8 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el | |||
| @@ -739,7 +739,10 @@ before the current command." | |||
| 739 | (eq flyspell-pre-pre-buffer flyspell-pre-buffer)) | 739 | (eq flyspell-pre-pre-buffer flyspell-pre-buffer)) |
| 740 | nil) | 740 | nil) |
| 741 | ((or (and (= flyspell-pre-point (- (point) 1)) | 741 | ((or (and (= flyspell-pre-point (- (point) 1)) |
| 742 | (eq (char-syntax (char-after flyspell-pre-point)) ?w)) | 742 | (or (eq (char-syntax (char-after flyspell-pre-point)) ?w) |
| 743 | (string-match-p (ispell-get-otherchars) | ||
| 744 | (buffer-substring-no-properties | ||
| 745 | flyspell-pre-point (1+ flyspell-pre-point))))) | ||
| 743 | (= flyspell-pre-point (point)) | 746 | (= flyspell-pre-point (point)) |
| 744 | (= flyspell-pre-point (+ (point) 1))) | 747 | (= flyspell-pre-point (+ (point) 1))) |
| 745 | nil) | 748 | nil) |
| @@ -753,7 +756,10 @@ before the current command." | |||
| 753 | ;; If other post-command-hooks change the buffer, | 756 | ;; If other post-command-hooks change the buffer, |
| 754 | ;; flyspell-pre-point can lie past eob (bug#468). | 757 | ;; flyspell-pre-point can lie past eob (bug#468). |
| 755 | (null (char-after flyspell-pre-point)) | 758 | (null (char-after flyspell-pre-point)) |
| 756 | (eq (char-syntax (char-after flyspell-pre-point)) ?w))) | 759 | (or (eq (char-syntax (char-after flyspell-pre-point)) ?w) |
| 760 | (string-match-p (ispell-get-otherchars) | ||
| 761 | (buffer-substring-no-properties | ||
| 762 | flyspell-pre-point (1+ flyspell-pre-point)))))) | ||
| 757 | nil) | 763 | nil) |
| 758 | ((not (eq (current-buffer) flyspell-pre-buffer)) | 764 | ((not (eq (current-buffer) flyspell-pre-buffer)) |
| 759 | t) | 765 | t) |
| @@ -815,6 +821,7 @@ Mostly we check word delimiters." | |||
| 815 | (save-excursion | 821 | (save-excursion |
| 816 | (backward-char 1) | 822 | (backward-char 1) |
| 817 | (and (looking-at (flyspell-get-not-casechars)) | 823 | (and (looking-at (flyspell-get-not-casechars)) |
| 824 | (not (looking-at (ispell-get-otherchars))) | ||
| 818 | (or flyspell-consider-dash-as-word-delimiter-flag | 825 | (or flyspell-consider-dash-as-word-delimiter-flag |
| 819 | (not (looking-at "-")))))) | 826 | (not (looking-at "-")))))) |
| 820 | ;; yes because we have reached or typed a word delimiter. | 827 | ;; yes because we have reached or typed a word delimiter. |
| @@ -880,6 +887,7 @@ Mostly we check word delimiters." | |||
| 880 | (save-excursion | 887 | (save-excursion |
| 881 | (backward-char 1) | 888 | (backward-char 1) |
| 882 | (and (and (looking-at (flyspell-get-not-casechars)) 1) | 889 | (and (and (looking-at (flyspell-get-not-casechars)) 1) |
| 890 | (not (looking-at (ispell-get-otherchars))) | ||
| 883 | (and (or flyspell-consider-dash-as-word-delimiter-flag | 891 | (and (or flyspell-consider-dash-as-word-delimiter-flag |
| 884 | (not (looking-at "\\-"))) 2)))))) | 892 | (not (looking-at "\\-"))) 2)))))) |
| 885 | c)))) | 893 | c)))) |
| @@ -895,6 +903,7 @@ Mostly we check word delimiters." | |||
| 895 | (save-excursion | 903 | (save-excursion |
| 896 | (backward-char 1) | 904 | (backward-char 1) |
| 897 | (and (looking-at (flyspell-get-not-casechars)) | 905 | (and (looking-at (flyspell-get-not-casechars)) |
| 906 | (not (looking-at (ispell-get-otherchars))) | ||
| 898 | (or flyspell-consider-dash-as-word-delimiter-flag | 907 | (or flyspell-consider-dash-as-word-delimiter-flag |
| 899 | (not (looking-at "\\-")))))))) | 908 | (not (looking-at "\\-")))))))) |
| 900 | c)) | 909 | c)) |