What is the correct method to define multi-line comments in an emacs mode (Like C / / * / /)? The Ellisp example I see are for comments that begin with a delimiter and end at the end of the line (like C ++ 's // or perl's #).
It is such:
(define-derived-mode my -Mod awk-mode "my" "my mode" (setq comment-multi-line zero); Maybe (setc comment-start "/ *") (set comment-end "* /"))
but there are subtleties; Maybe you want
/ * line one * / / * line two * / / * line three * /
or you want
/ * line one line two line three * /
This is affected by your comment-style
, which you can customize ( MX custom-variable comment-style
). For the first example, choose something like indent
, for the second example, additional line
.
All this is defined in newcomment.el
, which you can read if you type Mx description-variable comment-start
Comments
Post a Comment