[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r110817: ispell.el (ispell-region): D
From: |
Agustin Martin |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r110817: ispell.el (ispell-region): Do not prefix sent string by comment in autoconf mode |
Date: |
Tue, 06 Nov 2012 17:33:56 +0100 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 110817
fixes bug: http://debbugs.gnu.org/12768
committer: Agustin Martin <address@hidden>
branch nick: trunk
timestamp: Tue 2012-11-06 17:33:56 +0100
message:
ispell.el (ispell-region): Do not prefix sent string by comment in autoconf
mode
This commit changes some of the `in-comment' ocurrences to more specific
`add-comment', set only if comment prefix is to be added.
When in comment, old code prefixed string by comment string to let ispell
know this is part of a comment string.
This is only supported in some modes. In particular, this is not supported in
autoconf mode where adding the comment string messes everything up because
ispell tries to spellcheck the `dnl' string header causing misalignments in
some cases (debbugs.gnu.org: #12768).
modified:
lisp/ChangeLog
lisp/textmodes/ispell.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-11-06 16:22:09 +0000
+++ b/lisp/ChangeLog 2012-11-06 16:33:56 +0000
@@ -13,6 +13,9 @@
(ispell-buffer-with-debug): New function that creates a debugging
buffer and calls `ispell-buffer' with debugging enabled.
+ * textmodes/ispell.el (ispell-region): Do not prefix sent string by
+ comment in autoconf mode. (Bug#12768)
+
2012-11-06 Dmitry Antipov <address@hidden>
* emacs-lisp/byte-opt.el (toplevel): Add compare-window-configurations,
=== modified file 'lisp/textmodes/ispell.el'
--- a/lisp/textmodes/ispell.el 2012-11-06 16:22:09 +0000
+++ b/lisp/textmodes/ispell.el 2012-11-06 16:33:56 +0000
@@ -3006,15 +3006,23 @@
(marker-position ispell-region-end))))
(let* ((ispell-start (point))
(ispell-end (min (point-at-eol) reg-end))
+ ;; See if line must be prefixed by comment string to let
ispell know this is
+ ;; part of a comment string. This is only supported in
some modes.
+ ;; In particular, this is not supported in autoconf mode
where adding the
+ ;; comment string messes everything up because ispell
tries to spellcheck the
+ ;; `dnl' string header causing misalignments in some
cases (debbugs.gnu.org: #12768).
+ (add-comment (and in-comment
+ (not (string= in-comment "dnl "))
+ in-comment))
(string (ispell-get-line
- ispell-start ispell-end in-comment)))
+ ispell-start ispell-end add-comment)))
(ispell-print-if-debug
(format
- "ispell-region: string pos (%s->%s), eol: %s, [in-comment]:
[%s], [string]: [%s]\n"
- ispell-start ispell-end (point-at-eol) in-comment string))
- (if in-comment ; account for comment chars
added
- (setq ispell-start (- ispell-start (length in-comment))
- in-comment nil))
+ "ispell-region: string pos (%s->%s), eol: %s, [in-comment]:
[%s], [add-comment]: [%s], [string]: [%s]\n"
+ ispell-start ispell-end (point-at-eol) in-comment
add-comment string))
+ (if add-comment ; account for comment chars
added
+ (setq ispell-start (- ispell-start (length add-comment))
+ add-comment nil))
(setq ispell-end (point)) ; "end" tracks region retrieved.
(if string ; there is something to spell check!
;; (special start end)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r110817: ispell.el (ispell-region): Do not prefix sent string by comment in autoconf mode,
Agustin Martin <=