[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Font-lock with newcomment.el
From: |
David C Sterratt |
Subject: |
Re: Font-lock with newcomment.el |
Date: |
02 Jun 2003 11:06:01 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
>>>>> Kevin Rodgers writes:
> David C Sterratt wrote:
>>>>>>> Stefan Monnier writes:
>> > Oh, and David, regarding your mode: do a C-h f looking-at, that
>> > will save you a bunch of buffer-substrings.
>> Thanks for looking at the code. From the looking-at
>> documentation, it seems like it only matches regexps after the
>> point, whereas in the current way of doing indentation I need to
>> match symbols anywhere in the line, in most cases at least. So
>> it's not clear to me how looking-at will help, unless I rethink
>> the indentation code.
> I don't have your code in front of me, but it sounds like you're
> using buffer-substring to extract the current line and then
> string-match to recognize a pattern in it. Since looking-at only
> matches its REGEXP argument immediately after point, you can search
> for any pattern on the current line with (concat ".*" REGEXP),
> assuming you're at the beginning of the line -- if not, just wrap
> it in (save-excursion (beginning-of-line) ...).
Thanks for the advice. I may have to save it for a rainy day, as
I've got too much to do at the moment, but when I'm feeling like a
bit more elisp hacking I'll take a look at the indentation code
again.
David.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: Font-lock with newcomment.el,
David C Sterratt <=