Sorry to be barging on on the list like that, but Stephen chastised
me on comp.emacs.xemacs for discussing specifiers there and told me
that was a topic only suitable for this list.
With his help, I managed to stick up an icon into the toolbar with
the following code (which appears to work with XEmacs 21.4.8):
(defvar preview-icon-toolbar-button
(vector (list preview-icon)
#'preview-at-point
t
"Preview on/off at point"))
;preview-icon is a glyph
Then in the LaTeX-mode-hook, the following gets called (about which I
happen to be entirely clueless).
(let ((tb (cdadar (or (specifier-spec-list default-toolbar (current-buffer))
(specifier-spec-list default-toolbar 'global)))))
(unless (assq preview-icon-toolbar-button tb)
(set-specifier default-toolbar
(append tb (list preview-icon-toolbar-button))
(current-buffer))))
Now there is one smaller problem: the glyph is generated from a PNG
file with transparent colors. Displayed in the text, the transparent
color is the text background color. Displayed in the toolbar, the
transparent color is black instead of the toolbar color.
But what is more annoying is the following report:
<#mml type=message/rfc822 disposition=inline>
Date: Wed, 27 Nov 2002 12:36:20 +0100
From: Jan-Ake Larsson <jalar(a)mai.liu.se>
To: David Kastrup <David.Kastrup(a)t-online.de>
Cc: preview-latex-devel(a)lists.sourceforge.net
Subject: Re: [preview-latex-devel] 0.7.4 should now be ready to be released
Message-ID: <20021127113620.GB11317(a)mai.liu.se>
David Kastrup wrote:
I have after yelping for help on
comp.emacs.xemacs and making a royal fool of myself also managed to
get this icon up into the toolbar where it sorely sticks out because
of color and missing transparency, but let the XEmacs fans volunteer
to fix that.
On my system (xemacs 21.1.13) it also appears twice.
<#/mml>
So would anybody have an idea how to add a button to the toolbar in a
way that does not make it appear twice under XEmacs 21.1.13? Or can
this with reasonable confidence be classified solely as an XEmacs bug
for which we need not supply anything more than "upgrade XEmacs" from
our side?
This happens with preview-latex version 0.7.4 available from
<
URL:http://dl.sf.net/preview-latex>.
Thanks,
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum