* Thomas A. Schmitz (2006-03-17) writes:

>> Then it is probably due to preview-latex adding its button to the tool
>> bar.  Can you provoke the error by inserting
>>
>> (let ((tb (cdadar (specifier-spec-list default-toolbar 'global))))
>>   (set-specifier default-toolbar (append tb (list (car tb)))  
>> (current-buffer)))
>>
>> into the *scratch* buffer and typing `C-j' with point after the last
>> parenthesis?
>
> OK, when I do that, I get this output:
>
> (let ((tb (cdadar (specifier-spec-list default-toolbar 'global))))
>    (set-specifier default-toolbar (append tb (list (car tb)))  
> (current-buffer)))
> ([toolbar-file-icon toolbar-open t "Open a file"] [toolbar-folder- 

No error, I assume?  Do you get an additional "Open" button in the
tool bar?

What happens if you evaluate the following statement in a freshly
started XEmacs?

(progn
  (require 'preview)
  (require 'prv-xemacs)
  (let ((icon (vector (list (preview-filter-specs preview-tb-icon-specs))
                      #'preview-at-point t "foo"))
        (tb (cdadar (specifier-spec-list default-toolbar 'global))))
    (set-specifier default-toolbar (append tb (list icon)) (current-buffer))))

In my case (recent CVS XEmacs 21.5) there is no error and a new button
appears in the tool bar.  It's empty, however, because the respective
image cannot be found.  I don't know if this is just my installation
which is broken or if other people can confirm this.  The following
hackish code makes a button with an image appear in my case:

(progn
  (require 'preview)
  (require 'prv-xemacs)
  (let* ((preview-datadir (concat (file-name-directory
                                   (locate-library "preview"))
                                  "../../etc/auctex"))
         (icon (vector (list (preview-filter-specs preview-tb-icon-specs))
                       #'preview-at-point t "foo"))
         (tb (cdadar (specifier-spec-list default-toolbar 'global))))
    (set-specifier default-toolbar (append tb (list icon)) (current-buffer))))

You can evaluate the above with `C-x C-e' instead of `C-j' because the
return value is not so important at the moment.

-- 
Ralf


_______________________________________________
auctex mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/auctex

Reply via email to