summaryrefslogtreecommitdiff
path: root/lisp/newcomment.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2004-03-04 20:02:52 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2004-03-04 20:02:52 +0000
commit31df2900a4eff83b897549f093abb5a01ec3c91c (patch)
treebebda2013ef550011b647fd9529d6278fa83553f /lisp/newcomment.el
parentaa83be2adf1a889b0ad3fd2d43909e8b02edb3d4 (diff)
downloademacs-31df2900a4eff83b897549f093abb5a01ec3c91c.tar.gz
(comment-normalize-vars): Check the user-specified comment start marker.
Diffstat (limited to 'lisp/newcomment.el')
-rw-r--r--lisp/newcomment.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/newcomment.el b/lisp/newcomment.el
index 9f0aeabe21f..1c9c0dfd4b6 100644
--- a/lisp/newcomment.el
+++ b/lisp/newcomment.el
@@ -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)