diff options
author | Agustín Martín <agustin.martin@hispalinux.es> | 2011-05-03 13:08:15 +0200 |
---|---|---|
committer | Agustín Martín <agustin.martin@hispalinux.es> | 2011-05-03 13:08:15 +0200 |
commit | bf242939d9cf16868e55e9c346eeb222cc3ffc6a (patch) | |
tree | a53aad1c61a0b03ee0702e19e5e0865df1bc508b /lisp/textmodes | |
parent | f927985e87724306e8eb0827feb3f51c964561f5 (diff) | |
download | emacs-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.el | 20 |
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))))) |