diff options
Diffstat (limited to 'lisp/textmodes')
| -rw-r--r-- | lisp/textmodes/ispell.el | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 424a83c1713..f667525397c 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el | |||
| @@ -3006,15 +3006,23 @@ amount for last line processed." | |||
| 3006 | (marker-position ispell-region-end)))) | 3006 | (marker-position ispell-region-end)))) |
| 3007 | (let* ((ispell-start (point)) | 3007 | (let* ((ispell-start (point)) |
| 3008 | (ispell-end (min (point-at-eol) reg-end)) | 3008 | (ispell-end (min (point-at-eol) reg-end)) |
| 3009 | ;; See if line must be prefixed by comment string to let ispell know this is | ||
| 3010 | ;; part of a comment string. This is only supported in some modes. | ||
| 3011 | ;; In particular, this is not supported in autoconf mode where adding the | ||
| 3012 | ;; comment string messes everything up because ispell tries to spellcheck the | ||
| 3013 | ;; `dnl' string header causing misalignments in some cases (debbugs.gnu.org: #12768). | ||
| 3014 | (add-comment (and in-comment | ||
| 3015 | (not (string= in-comment "dnl ")) | ||
| 3016 | in-comment)) | ||
| 3009 | (string (ispell-get-line | 3017 | (string (ispell-get-line |
| 3010 | ispell-start ispell-end in-comment))) | 3018 | ispell-start ispell-end add-comment))) |
| 3011 | (ispell-print-if-debug | 3019 | (ispell-print-if-debug |
| 3012 | (format | 3020 | (format |
| 3013 | "ispell-region: string pos (%s->%s), eol: %s, [in-comment]: [%s], [string]: [%s]\n" | 3021 | "ispell-region: string pos (%s->%s), eol: %s, [in-comment]: [%s], [add-comment]: [%s], [string]: [%s]\n" |
| 3014 | ispell-start ispell-end (point-at-eol) in-comment string)) | 3022 | ispell-start ispell-end (point-at-eol) in-comment add-comment string)) |
| 3015 | (if in-comment ; account for comment chars added | 3023 | (if add-comment ; account for comment chars added |
| 3016 | (setq ispell-start (- ispell-start (length in-comment)) | 3024 | (setq ispell-start (- ispell-start (length add-comment)) |
| 3017 | in-comment nil)) | 3025 | add-comment nil)) |
| 3018 | (setq ispell-end (point)) ; "end" tracks region retrieved. | 3026 | (setq ispell-end (point)) ; "end" tracks region retrieved. |
| 3019 | (if string ; there is something to spell check! | 3027 | (if string ; there is something to spell check! |
| 3020 | ;; (special start end) | 3028 | ;; (special start end) |