From: Dmitry Gutov <dgutov@yandex.ru>
To: source liu <sourceonly@gmail.com>
Cc: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: Re: A problem in using font-lock-add-keywords
Date: Tue, 05 Mar 2013 14:14:18 +0400 [thread overview]
Message-ID: <5135C57A.5060601@yandex.ru> (raw)
In-Reply-To: <CAAzVxgMu3EnA1_FMG9oLshCxhPV03=qkVNoWKhygUJKa8C6DwA@mail.gmail.com>
On 05.03.2013 13:33, source liu wrote:
> My value of `blink-matching-paren-distance' is 102400
> and when I type M-102400 C-f, it jump to the very place from where it
> can't match ")",
That's to be expected, see the description of the above variable.
it failed "M-x eval-buff" when the chars are beyond
> the range
This isn't. Works for me, I don't have any problems with evaluating your
buffer.
> Come back to font-lock problem, i can customize the font-lock
> keywords when the list is short, but it is not the case when i use the
> list defined in my attach.
> if you have time, please take a look at it. many thanks
>
> in my .emacs file, i wrote
> ================================================================
> (load-file "~/.hyperworks.el")
> (add-hook 'tcl-mode-hook
> (lambda ()
> (font-lock-add-keywords nil
> `((,(regexp-opt hypermesh-command-list2 t) . font-lock-constant-face)))))
>
> (display-time)
> =================================================================
>
> and hypermesh-command-list2 is defined in .hyperworks.el, in the attach file.
>
> The case is that, when i use `hypermesh-command-list2', it works ok,
> and i changed to `hypermesh-command-list1', it doesn't work, and it
> ruined the default font-lock-mode in tcl-mode. the only deference
> between the two list is list length, i think.
>
> could you help? many thanks.
Here's how I debugged it:
1. Have the buggy buffer selected.
2. M-x toggle-debug-on-error
3. M-: (font-lock-fontify-region (point-min) (point-max))
At this point you should see the backtrace and that `re-search-forward'
aborts complaining that the regexp is too big. It's not a restriction on
the size of any Emacs primitive, the restriction is in the regexp engine.
I'm sure what to recommend here. Split the list into several, maybe.
prev parent reply other threads:[~2013-03-05 10:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-05 2:54 A problem in using font-lock-add-keywords source liu
2013-03-05 4:58 ` Dmitry Gutov
2013-03-05 7:34 ` source liu
2013-03-05 8:50 ` Dmitry Gutov
[not found] ` <CAAzVxgMu3EnA1_FMG9oLshCxhPV03=qkVNoWKhygUJKa8C6DwA@mail.gmail.com>
2013-03-05 10:14 ` Dmitry Gutov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5135C57A.5060601@yandex.ru \
--to=dgutov@yandex.ru \
--cc=help-gnu-emacs@gnu.org \
--cc=sourceonly@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.