]> git.eshelyaron.com Git - emacs.git/commitdiff
(comment-normalize-vars): Check the user-specified comment start marker.
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 4 Mar 2004 20:02:52 +0000 (20:02 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Thu, 4 Mar 2004 20:02:52 +0000 (20:02 +0000)
lisp/newcomment.el

index 9f0aeabe21f86933db62567ff813b8f81b0e2347..1c9c0dfd4b6d43253a22c771eec52c1f51de4b70 100644 (file)
@@ -251,8 +251,10 @@ this function before any other, so the rest of the code can assume that
 the variables are properly set."
   (unless (and (not comment-start) noerror)
     (unless comment-start
-      (set (make-local-variable 'comment-start)
-          (read-string "No comment syntax is defined.  Use: ")))
+      (let ((cs (read-string "No comment syntax is defined.  Use: ")))
+       (if (zerop (length cs))
+           (error "No comment syntax defined")
+         (set (make-local-variable 'comment-start) cs))))
     ;; comment-use-syntax
     (when (eq comment-use-syntax 'undecided)
       (set (make-local-variable 'comment-use-syntax)