diff options
| author | Agustín Martín | 2011-05-03 13:08:15 +0200 |
|---|---|---|
| committer | Agustín Martín | 2011-05-03 13:08:15 +0200 |
| commit | bf242939d9cf16868e55e9c346eeb222cc3ffc6a (patch) | |
| tree | a53aad1c61a0b03ee0702e19e5e0865df1bc508b | |
| parent | f927985e87724306e8eb0827feb3f51c964561f5 (diff) | |
| download | emacs-bf242939d9cf16868e55e9c346eeb222cc3ffc6a.tar.gz emacs-bf242939d9cf16868e55e9c346eeb222cc3ffc6a.zip | |
ispell.el (ispell-add-per-file-word-list): Protect against `nil' value of `comment-start' (Bug#8579).
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/textmodes/ispell.el | 20 |
2 files changed, 17 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index aa9052adfb4..460c62ca23e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2011-05-03 Dirk Ullrich <dirk.ullrich@googlemail.com> (tiny change) | ||
| 2 | |||
| 3 | * textmodes/ispell.el (ispell-add-per-file-word-list): | ||
| 4 | Protect against `nil' value of `comment-start' (Bug#8579). | ||
| 5 | |||
| 1 | 2011-05-03 Leo Liu <sdl.web@gmail.com> | 6 | 2011-05-03 Leo Liu <sdl.web@gmail.com> |
| 2 | 7 | ||
| 3 | * isearch.el (isearch-yank-pop): New command. | 8 | * isearch.el (isearch-yank-pop): New command. |
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." | |||
| 3915 | (progn | 3915 | (progn |
| 3916 | (open-line 1) | 3916 | (open-line 1) |
| 3917 | (unless found (newline)) | 3917 | (unless found (newline)) |
| 3918 | (insert (if (fboundp 'comment-padright) | 3918 | (insert (if comment-start |
| 3919 | ;; Try and use the proper comment marker, | 3919 | (progn |
| 3920 | ;; e.g. ";;" rather than ";". | 3920 | (if (fboundp 'comment-padright) |
| 3921 | (comment-padright comment-start | 3921 | ;; Try and use the proper comment marker, |
| 3922 | (comment-add nil)) | 3922 | ;; e.g. ";;" rather than ";". |
| 3923 | comment-start) | 3923 | (comment-padright comment-start |
| 3924 | " " ispell-words-keyword) | 3924 | (comment-add nil)) |
| 3925 | (if (> (length comment-end) 0) | 3925 | comment-start) |
| 3926 | " ") | ||
| 3927 | "") | ||
| 3928 | ispell-words-keyword) | ||
| 3929 | (if (and comment-end (> (length comment-end) 0)) | ||
| 3926 | (save-excursion | 3930 | (save-excursion |
| 3927 | (newline) | 3931 | (newline) |
| 3928 | (insert comment-end))))) | 3932 | (insert comment-end))))) |