[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ELisp Multiline Comments
From: |
Christopher Dimech |
Subject: |
Re: ELisp Multiline Comments |
Date: |
Sat, 10 Oct 2020 18:07:06 +0200 |
Have tried using the following for writing multiline comments, but has
worked.
(defmacro multic (&rest _) nil)
;;; gungadin-frame.el --- Customisations for Emacs Frame
( multic
* Copyright and License
;;;;
====================================================================
;;;; Copyright and License
;;;;
====================================================================
___ _ _
/ __|_ __ _ _ | | (_)__
| (__| '_ \ '_| | |__| / _|
\___| .__/_| |____|_\__|
|_|
)
;; Copyright 2017 Christopher Dimech
;; GNU Affero General Public License, Version 3 or any later version
Sent: Saturday, October 10, 2020 at 4:46 PM
From: "Stefan Monnier" <monnier@iro.umontreal.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: ELisp Multiline Comments
> 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