[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ELisp Multiline Comments
From: |
Stefan Monnier |
Subject: |
Re: ELisp Multiline Comments |
Date: |
Sat, 10 Oct 2020 10:46:08 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
> I need to use Multiline Comments in my Elisp Codes so I can insert
> Org-Mode Commands,
> and read you can use
>
> #|
> Multiline Comment
> |#
>
> What are the options
ELisp does not support multiline comments.
You have two options:
- Use `;;` and make sure to either ignore them or strip them when using the
comments's content:
;; Multiline
;; Comment
- Use unused arguments, e.g.:
(defmacro multiline-comment (&rest _) nil)
...
(multiline-comment
Multiline
Comment
)
and then make sure you use those uses of `multiline-comment` only
occur where an ELisp expression is expected (e.g. not within the
arglist of a function) and make sure the text of those multiline
comments corresponds to a valid read syntax of some ELisp data
(e.g. properly matched parentheses and double quotes (but without
counting those parens that occur after a semi-colon), no single quote
just before an open paren, ...).
I'd go with the first option.
Stefan