[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Regexp with comment character of buffer
From: |
Heime |
Subject: |
Re: Regexp with comment character of buffer |
Date: |
Mon, 12 Aug 2024 17:50:52 +0000 |
On Tuesday, August 13th, 2024 at 5:11 AM, Yuri Khan <yuri.v.khan@gmail.com>
wrote:
> On Mon, 12 Aug 2024 at 19:36, Heime heimeborgia@protonmail.com wrote:
>
> > > > (let* ((comment-char (regexp-quote (string-trim comment-start)))
> > > > (three-comment-chars (make-string 3 (string-to-char comment-char)))
>
> > Is a string-trim required for comment-start ?
>
>
> Required for comment-start? No. What does the docstring for
> comment-start tell you?
>
> String to insert to start a new comment, or[…]
>
> The space is there so that when the string is inserted, the user will
> be able to start typing the comment text and it will be separated from
> the delimiter.
Is the space part of 'comment-start'. It is difficult to say from the code.
Can I just use `comment-start` without trimming it ?
> # comment in shell or Python
> ; comment in Elisp
> // comment in C++
> /* comment in C */
> <!-- comment in HTML -->
>
>
>
> Required for your use of comment-start? Maybe.
>
> Anyway, what’s your plan for modes whose comment-start is longer than
> a single character after trimming the space?
Currently I support modes with single character comments.
- Regexp with comment character of buffer, Heime, 2024/08/12
- Re: Regexp with comment character of buffer, Yuri Khan, 2024/08/12
- Re: Regexp with comment character of buffer, Heime, 2024/08/12
- Re: Regexp with comment character of buffer, Yuri Khan, 2024/08/12
- Re: Regexp with comment character of buffer, Heime, 2024/08/12
- Re: Regexp with comment character of buffer, Yuri Khan, 2024/08/12
- Re: Regexp with comment character of buffer,
Heime <=
- Re: Regexp with comment character of buffer, Yuri Khan, 2024/08/12
- Re: Regexp with comment character of buffer, Heime, 2024/08/12
- Re: Regexp with comment character of buffer, Heime, 2024/08/12