summaryrefslogtreecommitdiff
path: root/lisp/textmodes
diff options
context:
space:
mode:
authorAgustín Martín <agustin.martin@hispalinux.es>2011-05-03 13:08:15 +0200
committerAgustín Martín <agustin.martin@hispalinux.es>2011-05-03 13:08:15 +0200
commitbf242939d9cf16868e55e9c346eeb222cc3ffc6a (patch)
treea53aad1c61a0b03ee0702e19e5e0865df1bc508b /lisp/textmodes
parentf927985e87724306e8eb0827feb3f51c964561f5 (diff)
downloademacs-bf242939d9cf16868e55e9c346eeb222cc3ffc6a.tar.gz
ispell.el (ispell-add-per-file-word-list): Protect against `nil' value of `comment-start' (Bug#8579).
Diffstat (limited to 'lisp/textmodes')
-rw-r--r--lisp/textmodes/ispell.el20
1 files changed, 12 insertions, 8 deletions
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index 35409d64289..a65ed227124 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -3915,14 +3915,18 @@ Both should not be used to define a buffer-local dictionary."
(progn
(open-line 1)
(unless found (newline))
- (insert (if (fboundp 'comment-padright)
- ;; Try and use the proper comment marker,
- ;; e.g. ";;" rather than ";".
- (comment-padright comment-start
- (comment-add nil))
- comment-start)
- " " ispell-words-keyword)
- (if (> (length comment-end) 0)
+ (insert (if comment-start
+ (progn
+ (if (fboundp 'comment-padright)
+ ;; Try and use the proper comment marker,
+ ;; e.g. ";;" rather than ";".
+ (comment-padright comment-start
+ (comment-add nil))
+ comment-start)
+ " ")
+ "")
+ ispell-words-keyword)
+ (if (and comment-end (> (length comment-end) 0))
(save-excursion
(newline)
(insert comment-end)))))