diff lisp/generic.el @ 58473:9aacf8e5ae58

(generic-mode-set-comments): Accept an empty comment-end.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Wed, 24 Nov 2004 15:20:38 +0000
parents 5bd3a1e1dfe5
children 275bfc016770
line wrap: on
line diff
--- a/lisp/generic.el	Wed Nov 24 11:29:46 2004 +0000
+++ b/lisp/generic.el	Wed Nov 24 15:20:38 2004 +0000
@@ -289,13 +289,15 @@
 
     ;; Go through all the comments
     (dolist (start comment-list)
-      (let ((end ?\n) (comstyle ""))
+      (let ((end nil) (comstyle ""))
 	;; Normalize
 	(when (consp start)
 	  (setq end (or (cdr start) end))
 	  (setq start (car start)))
 	(when (char-valid-p start) (setq start (char-to-string start)))
-	(when (char-valid-p end)   (setq end (char-to-string end)))
+	(cond
+	 ((char-valid-p end)   (setq end (char-to-string end)))
+	 ((zerop (length end)) (setq end "\n")))
 
 	;; Setup the vars for `comment-region'
 	(if comment-start
@@ -414,5 +416,5 @@
 
 (provide 'generic)
 
-;;; arch-tag: 239c1fc4-1303-48d9-9ac0-657d655669ea
+;; arch-tag: 239c1fc4-1303-48d9-9ac0-657d655669ea
 ;;; generic.el ends here