* data-directory
@ 2008-07-11 9:20 Kazu Yamamoto
2008-07-11 13:36 ` data-directory Stefan Monnier
0 siblings, 1 reply; 3+ messages in thread
From: Kazu Yamamoto @ 2008-07-11 9:20 UTC (permalink / raw)
To: emacs-devel
Hello all,
My program creates a tool-bar as follows:
(defun mew-toolbar-make (map alist)
(let ((tool-bar-map (make-sparse-keymap)) ;; for tool-bar-add-item-from-menu
(data-directory mew-icon-directory))
(dolist (a alist)
(if (fboundp 'tool-bar-local-item-from-menu)
;; Emacs 21.3.50 or later
(tool-bar-local-item-from-menu (car a) (cdr a) tool-bar-map map)
;; Emacs 21.3 or earlier
;; The target map is tool-bar-map
(tool-bar-add-item-from-menu (car a) (cdr a) map)))
tool-bar-map))
On Emacs 22, the tool-bar is created correctly. However, on CVS HEAD
Emacs, icon images are not displayed.
image-load-path contains the data-directory symbol. So, I think the
locally bound value to data-directory should be used.
Is this behavior change intentional? Or just a bug?
--Kazu
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: data-directory
2008-07-11 9:20 data-directory Kazu Yamamoto
@ 2008-07-11 13:36 ` Stefan Monnier
2008-07-24 15:35 ` data-directory Stefan Monnier
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2008-07-11 13:36 UTC (permalink / raw)
To: Kazu Yamamoto; +Cc: emacs-devel
> (defun mew-toolbar-make (map alist)
> (let ((tool-bar-map (make-sparse-keymap)) ;; for tool-bar-add-item-from-menu
> (data-directory mew-icon-directory))
> (dolist (a alist)
> (if (fboundp 'tool-bar-local-item-from-menu)
> ;; Emacs 21.3.50 or later
> (tool-bar-local-item-from-menu (car a) (cdr a) tool-bar-map map)
> ;; Emacs 21.3 or earlier
> ;; The target map is tool-bar-map
> (tool-bar-add-item-from-menu (car a) (cdr a) map)))
> tool-bar-map))
> On Emacs 22, the tool-bar is created correctly. However, on CVS HEAD
> Emacs, icon images are not displayed.
> image-load-path contains the data-directory symbol. So, I think the
> locally bound value to data-directory should be used.
> Is this behavior change intentional? Or just a bug?
It's neither a bug nor intentional. ;-)
The image selection has now been postponed to the point when the toolbar
is displayed, which is outside of the scope of the let.
I'll see how we can try and remember the data-directory.
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: data-directory
2008-07-11 13:36 ` data-directory Stefan Monnier
@ 2008-07-24 15:35 ` Stefan Monnier
0 siblings, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2008-07-24 15:35 UTC (permalink / raw)
To: Kazu Yamamoto; +Cc: emacs-devel
>> (defun mew-toolbar-make (map alist)
>> (let ((tool-bar-map (make-sparse-keymap)) ;; for tool-bar-add-item-from-menu
>> (data-directory mew-icon-directory))
>> (dolist (a alist)
>> (if (fboundp 'tool-bar-local-item-from-menu)
>> ;; Emacs 21.3.50 or later
>> (tool-bar-local-item-from-menu (car a) (cdr a) tool-bar-map map)
>> ;; Emacs 21.3 or earlier
>> ;; The target map is tool-bar-map
>> (tool-bar-add-item-from-menu (car a) (cdr a) map)))
>> tool-bar-map))
>> On Emacs 22, the tool-bar is created correctly. However, on CVS HEAD
>> Emacs, icon images are not displayed.
>> image-load-path contains the data-directory symbol. So, I think the
>> locally bound value to data-directory should be used.
>> Is this behavior change intentional? Or just a bug?
> It's neither a bug nor intentional. ;-)
> The image selection has now been postponed to the point when the toolbar
> is displayed, which is outside of the scope of the let.
> I'll see how we can try and remember the data-directory.
Could you explain why you let-bind data-directory rather than
image-load-path?
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-07-24 15:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-11 9:20 data-directory Kazu Yamamoto
2008-07-11 13:36 ` data-directory Stefan Monnier
2008-07-24 15:35 ` data-directory Stefan Monnier
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.