aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/textmodes/ispell.el20
2 files changed, 17 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 7470a0677b2..31f300b542d 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -13,6 +13,9 @@
13 (ispell-buffer-with-debug): New function that creates a debugging 13 (ispell-buffer-with-debug): New function that creates a debugging
14 buffer and calls `ispell-buffer' with debugging enabled. 14 buffer and calls `ispell-buffer' with debugging enabled.
15 15
16 * textmodes/ispell.el (ispell-region): Do not prefix sent string by
17 comment in autoconf mode. (Bug#12768)
18
162012-11-06 Dmitry Antipov <dmantipov@yandex.ru> 192012-11-06 Dmitry Antipov <dmantipov@yandex.ru>
17 20
18 * emacs-lisp/byte-opt.el (toplevel): Add compare-window-configurations, 21 * emacs-lisp/byte-opt.el (toplevel): Add compare-window-configurations,
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)