]> git.eshelyaron.com Git - emacs.git/commitdiff
ispell.el (ispell-add-per-file-word-list): Protect against `nil' value of `comment...
authorAgustín Martín <agustin.martin@hispalinux.es>
Tue, 3 May 2011 11:08:15 +0000 (13:08 +0200)
committerAgustín Martín <agustin.martin@hispalinux.es>
Tue, 3 May 2011 11:08:15 +0000 (13:08 +0200)
lisp/ChangeLog
lisp/textmodes/ispell.el

index aa9052adfb4e8236f86cefd64fb0c23fbfae77f7..460c62ca23e37045ae4a83fc0f844768ed845b6c 100644 (file)
@@ -1,3 +1,8 @@
+2011-05-03  Dirk Ullrich  <dirk.ullrich@googlemail.com>  (tiny change)
+
+        * textmodes/ispell.el (ispell-add-per-file-word-list):
+        Protect against `nil' value of `comment-start' (Bug#8579).
+
 2011-05-03  Leo Liu  <sdl.web@gmail.com>
 
        * isearch.el (isearch-yank-pop): New command.
index 35409d64289579cf112c5ab2a1b986938c07f867..a65ed227124aad8b8426d51179e64c1043ecf55a 100644 (file)
@@ -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)))))