unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Peter Tury" <tury.peter@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: font-lock-defaults doesn't work??
Date: 14 Apr 2007 03:13:28 -0700	[thread overview]
Message-ID: <1176545608.261298.25180@w1g2000hsg.googlegroups.com> (raw)
In-Reply-To: <87fy73wavo.fsf@lion.rapttech.com.au>


Tim X:
> You are also re-inventing a wheel to some extent. Use define-derived-mode

If I remember well, define-derived-mode is for very simple new major
modes what practically doesn't do more than fontification, new key
bindings and so. However, I plan to add (much?) more staff later. What
I sent above is the minimal extract from the current code what can be
used to check if it works in the same way for you, than for me.

Have you tried it? Does it work well for you even without the
"secretly must-to-have parts"? Anyway it looks strange for me if
fontification works (almost) well, but syntax parsing doesn't -- I
think they should be in sync. in any (normal) cases...

> from memory, I don't htink this bit is correct and you shouldn't need it. See
> the example on the eamcs wiki. Comment font locking is driven by the comment
> characters defined in the syntax table. You shouldn't need to also set them
> explicitly in the font-lock stuff.

I thought the other way (according to emacs help, what I showed
previously): I planned to use _only_ font-lock-defaults and thought it
sets the syntax table for me. I need syntax properties as well anyway,
so I don't plan to deal too much with the syntax-table: only comment
delimiters seems to be in the right place there in my case...

> have a look at a fairly simple mode and see how they do the font-lock stuff.

Yes, I searched for "official" settings in my elisp directory, but I
afraid all of what I checked are old, so maybe they don't use new(?)
possibilities. Thus I tried what I could understand from the actual
emacs documentation...

> I found sql.el quite useful (part of emacs). Again, look at the emacs wikki,
> there is some really useful ifo there.

I'll check sql.el also, thanks for the tip. What emacswiki page you
think?

\bye
P

  reply	other threads:[~2007-04-14 10:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-13 15:35 font-lock-defaults doesn't work?? Peter Tury
2007-04-14  9:42 ` Tim X
2007-04-14 10:13   ` Peter Tury [this message]
2007-04-14 10:47     ` Lennart Borgman (gmail)
2007-04-15  3:54     ` Tim X
2007-04-16 10:07 ` Peter Tury
  -- strict thread matches above, loose matches on Subject: below --
2007-04-15  7:48 martin rudalics

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1176545608.261298.25180@w1g2000hsg.googlegroups.com \
    --to=tury.peter@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).