[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: map: major-mode --> font-lock-defaults
From: |
Sam Steingold |
Subject: |
Re: map: major-mode --> font-lock-defaults |
Date: |
29 Jan 2001 16:35:52 -0500 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.0.97 |
> * In message <address@hidden>
> * On the subject of "Re: map: major-mode --> font-lock-defaults "
> * Sent on Mon, 29 Jan 2001 14:40:53 -0500
> * Honorable "Stefan Monnier" <monnier+gnu/address@hidden> writes:
>
> > great, this explains the reason for the bug, but not how to work around
> > it without using `font-lock-defaults-alist'.
>
> The "don't use" here means "don't put anything there" rather than
> "don't look at it".
You mean this is a "read-only" variable?
I thought that "obsolete" means that it will go away in a future
version, so one should not use it at all.
> > how do I get hold of the `font-lock-defaults' associated with a mode
> > without resorting to
> > (with-temp-buffer (c-mode) font-lock-defaults)
>
> That's the only generic way that I know of.
isn't this ugly and wasteful (having to create a buffer and set up a
mode just to get the `font-lock-defaults')?
shouldn't there be another way?
> > in particular, what is wrong with using symbol properties, like
> > (get 'c-mode 'font-lock-defaults)
>
> Nothing in particular except that it's not the way chosen by Emacs'
> font-lock and since Emacs' way has other advantages (such as the fact
> of being automatically inherited), there's little incentive to change.
wait a second: it was _not_ automatically inherited from c-mode to
d-mode (yes, you say the reason is administrative, not technical, but
the bottom line is: it is not _always_ automatically inherited!)
I admit that solving an administrative problem with technical might not
be quite right [even though RMS started FSF to solve an administrative
copyright problem by technical means of re-implementing everything
-- but I digress :-].
Nevertheless, the problem _does_ exist, and has to be addressed.
in the previous message, you wrote:
> This is because it's a bit more difficult to move it back into CC-mode
> (the font-lock regexps for it currently live in font-lock.el) because
> of the independent maintainership.
what about `lisp-mode' and `emacs-lisp-mode'?
they are mentioned in `font-lock-defaults-alist', but they are
maintained by the FSF, right?
Thanks for your help...
--
Sam Steingold (http://www.podval.org/~sds)
Support Israel's right to defend herself! <http://www.i-charity.com/go/israel>
Read what the Arab leaders say to their people on <http://www.memri.org/>
186,000 Miles per Second. It's not just a good idea. IT'S THE LAW.
- map: major-mode --> font-lock-defaults, Sam Steingold, 2001/01/28
- Re: map: major-mode --> font-lock-defaults, Stefan Monnier, 2001/01/29
- Re: map: major-mode --> font-lock-defaults, Sam Steingold, 2001/01/29
- Re: map: major-mode --> font-lock-defaults, Stefan Monnier, 2001/01/29
- Re: map: major-mode --> font-lock-defaults, Sam Steingold, 2001/01/29
- Re: map: major-mode --> font-lock-defaults, Stefan Monnier, 2001/01/29
- Re: map: major-mode --> font-lock-defaults,
Sam Steingold <=
- Re: map: major-mode --> font-lock-defaults, Stefan Monnier, 2001/01/29
- Re: map: major-mode --> font-lock-defaults, Sam Steingold, 2001/01/29