[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 50fd04c: Avoid infloop in 'ispell-region'
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] master 50fd04c: Avoid infloop in 'ispell-region' |
Date: |
Sat, 7 Jan 2017 11:03:41 +0000 (UTC) |
branch: master
commit 50fd04cd4b831a166db30292c4dc0c24be8e6e9d
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Avoid infloop in 'ispell-region'
* lisp/textmodes/ispell.el (ispell-begin-skip-region-regexp):
Protect against 'ispell-skip-region-alist' being nil. Reported by
Ernest Adrogué <address@hidden>, see
http://lists.gnu.org/archive/html/help-gnu-emacs/2017-01/msg00007.html.
---
lisp/textmodes/ispell.el | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index 27ee5d3..9747bd6 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -3133,7 +3133,14 @@ Must be called after `ispell-buffer-local-parsing' due
to dependence on mode."
(if (string= "" comment-end) "^" (regexp-quote comment-end)))
(if (and (null ispell-check-comments) comment-start)
(regexp-quote comment-start))
- (ispell-begin-skip-region ispell-skip-region-alist)
+ ;; If they set ispell-skip-region-alist to nil, mapconcat
+ ;; will produce an empty string, which will then match
+ ;; anything without moving point, something
+ ;; ispell-skip-region doesn't expect. Perhaps we should be
+ ;; more defensive and delq "" above as well, in addition to
+ ;; deleting nil elements.
+ (if ispell-skip-region-alist
+ (ispell-begin-skip-region ispell-skip-region-alist))
(ispell--make-filename-or-URL-re)))
"\\|"))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 50fd04c: Avoid infloop in 'ispell-region',
Eli Zaretskii <=