305 |
(set (make-local-variable 'indent-line-function) 'sml-indent-line) |
(set (make-local-variable 'indent-line-function) 'sml-indent-line) |
306 |
(set (make-local-variable 'comment-start) "(* ") |
(set (make-local-variable 'comment-start) "(* ") |
307 |
(set (make-local-variable 'comment-end) " *)") |
(set (make-local-variable 'comment-end) " *)") |
308 |
|
;;(set (make-local-variable 'block-comment-start) "* ") |
309 |
|
;;(set (make-local-variable 'block-comment-end) "") |
310 |
(set (make-local-variable 'comment-column) 40) |
(set (make-local-variable 'comment-column) 40) |
311 |
(set (make-local-variable 'comment-start-skip) "(\\*+[ \t]?") |
(set (make-local-variable 'comment-start-skip) "(\\*+\\s-*") |
312 |
(set (make-local-variable 'comment-indent-function) 'sml-comment-indent) |
(set (make-local-variable 'comment-indent-function) 'sml-comment-indent) |
313 |
(set (make-local-variable 'font-lock-defaults) sml-font-lock-defaults)) |
(set (make-local-variable 'font-lock-defaults) sml-font-lock-defaults)) |
314 |
|
|
442 |
(sml-with-ist |
(sml-with-ist |
443 |
;; Indentation for comments alone on a line, matches the |
;; Indentation for comments alone on a line, matches the |
444 |
;; proper indentation of the next line. |
;; proper indentation of the next line. |
445 |
(when (looking-at comment-start-skip) (sml-forward-spaces)) |
(when (looking-at "(\\*") (sml-forward-spaces)) |
446 |
(let (data |
(let (data |
447 |
(sml-point (point)) |
(sml-point (point)) |
448 |
(sym (save-excursion (sml-forward-sym)))) |
(sym (save-excursion (sml-forward-sym)))) |
449 |
(or |
(or |
450 |
;; allow the user to override the indentation |
;; allow the user to override the indentation |
451 |
(when (looking-at sml-fixindent-re) (current-indentation)) |
(when (looking-at (concat ".*" (regexp-quote comment-start) |
452 |
|
"[ \t]*fixindent[ \t]*" |
453 |
|
(regexp-quote comment-end))) |
454 |
|
(current-indentation)) |
455 |
|
|
456 |
;; continued comment |
;; continued comment |
457 |
(and (looking-at "\\*") (sml-find-comment-indent)) |
(and (looking-at "\\*") (sml-find-comment-indent)) |