Back out of fancy with/end different processing
[hcoop/domtool2.git] / elisp / domtool-mode.el
index 8e77d7d..c05fabd 100644 (file)
          (font-lock-syntactic-keywords
           . domtool-font-lock-syntactic-keywords)
          (font-lock-syntactic-face-function
-          . domtool-font-lock-syntactic-face-function))))
+          . domtool-font-lock-syntactic-face-function)))
+  (set (make-local-variable 'comment-start) "(* ")
+  (set (make-local-variable 'comment-end) " *)")
+  (set (make-local-variable 'comment-nested) t))
 
 (defun domtool-indent-line ()
   (let ((savep (> (current-column) (current-indentation)))
 
     0))
 
-(defun until-closed (is-with)
+(defun until-closed ()
   (save-excursion
-    (if is-with
-       (until-closed-helper 1)
-      (until-closed-helper 0))))
+    (until-closed-helper 0)))
 
 (defun domtool-calculate-indent ()
   (save-excursion
           'noindent)
          ((nth 4 state)
           (domtool-calculate-comment-indent state))
-         ((looking-at "\\_<\\(with\\)\\_>")
-          (until-closed t))
-         ((looking-at "\\_<\\(end\\)\\_>")
-          (until-closed nil))
+         ((looking-at "\\_<\\(with\\|end\\)\\_>")
+          (until-closed))
          ((not previous-keyword)
           base-indent)
          ((string= previous-keyword "end")