changeset 54279:41d93a97701d

(comment-normalize-vars): Check the user-specified comment start marker.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Thu, 04 Mar 2004 20:02:52 +0000
parents e83b2d0cd614
children bfa320f698d6
files lisp/newcomment.el
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/newcomment.el	Thu Mar 04 19:58:24 2004 +0000
+++ b/lisp/newcomment.el	Thu Mar 04 20:02:52 2004 +0000
@@ -251,8 +251,10 @@
 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)