[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: |
Mon, 12 Aug 2024 19:26:03 +0700 |
On Mon, 12 Aug 2024 at 18:41, Heime <heimeborgia@protonmail.com> wrote:
> > > How can I change the regexp so that instead of the beginning ;;;
> > > I use the comment character of the current buffer, replicated three
> > > times ?
> > >
> > > (let ( (heading-regexp "^;;;\\s-+\\([HM][[:digit:]]\\)\\s-")
> Have done the following. Do I really need all this or are there better ways ?
>
> (let* ((comment-char (regexp-quote (string-trim comment-start)))
> (three-comment-chars (make-string 3 (string-to-char comment-char)))
Does that work for you? (If not, go back to solving the problem.)
Does that work in all scenarios that are important to you? (If not, go
back to solving the problem in a more general way.)
What aspects of the working solution seem unsatisfactory to you?
What hypothetical capabilities would you require in order to improve
those aspects?
- 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 <=
- 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, 2024/08/12
- Re: Regexp with comment character of buffer, Heime, 2024/08/12