help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Regexp with comment character of buffer


From: Yuri Khan
Subject: Re: Regexp with comment character of buffer
Date: Tue, 13 Aug 2024 02:13:19 +0700

On Tue, 13 Aug 2024 at 00:50, Heime <heimeborgia@protonmail.com> wrote:

> Is the space part of 'comment-start'.  It is difficult to say from the code.

You do not have to say that from code. You activate a buffer and do an
M-: comment-start RET, and look at the result in the echo area. Repeat
with a different mode.

Alternatively, you read Emacs sources, see that many but not all modes
set comment-start with a trailing space.

> Can I just use `comment-start` without trimming it ?

Since you’re using string-to-char which is documented to return only
the first character of the input string, it does not matter if you
trim the original string beforehand.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]