emacs-devel
[Top][All Lists]
Advanced

[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 14:21:30 -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 12:20:20 -0500
> * Honorable "Stefan Monnier" <monnier+gnu/address@hidden> writes:
>
> > Unfortunately, I do not observe this.
> > The following:
> > 
> > (define-derived-mode d-mode c-mode "D"
> 
> Note that c-mode still uses font-lock-defaults-alist.  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.

great, this explains the reason for the bug, but not how to work around
it without using `font-lock-defaults-alist'.

> And no, derived.el does not need to do anything special for
> font-lock-defaults to be inherited.  That's why it's "the right way"
> (as opposed to font-lock-defaults-alist where you need to inherit
> things explicitly, as shown in your example).

fine - but you ignored my question from the previous messages:

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)

in particular, what is wrong with using symbol properties, like
        (get 'c-mode 'font-lock-defaults)

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/>
If your VCR is still blinking 12:00, you don't want Linux.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]