[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs pretest 22.1.91

From: Stefan Monnier
Subject: Re: Emacs pretest 22.1.91
Date: Wed, 27 Feb 2008 23:59:22 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

>> In this case, I believe the solution is to setup the tool-bar-map at the
>> very beginning (maybe even before dumping), and then have a function
>> (run after the .emacs) that can fix up the tool-bar-map by replacing the
>> default image choice with the preferred images for the current setup (so
>> it can obey image-library-alist, display-color-p, etc..).

> Can you (or someone else) explain why is it necessary to set up
> tool-bar-map so early?  Why not set it up where you suggest to ``fix''
> it?

So code can refer to it (e.g. compile.el builds a tool-bar-map of its
own based on the pre-existing one and this is done when loading

Actually, looking at how compile.el uses tool-bar-map, I see that if
compile.el gets loaded before tool-bar-map is "adjusted" (images chosen
depending on the display and libs), then compile's own tool-bar will
lack this adjustment.

So maybe the choice of which image to use should be done in the :filter
function (currently trivial) defined in tool-bar.el as:

(global-set-key [tool-bar]
                '(menu-item "tool bar" ignore
                            :filter (lambda (ignore) tool-bar-map)))

I.e. basically extend the format allowed in tool-bar-map to include
various images and let the image be chosen later on by
the :filter function.  Of course, maybe this filter gets run early on
as well...


reply via email to

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