bug-auctex
[Top][All Lists]
Advanced

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

[Bug-AUCTeX] Re: 11.84; Wrong toolbar items [patch]


From: David Reitter
Subject: [Bug-AUCTeX] Re: 11.84; Wrong toolbar items [patch]
Date: Sat, 21 Apr 2007 13:35:49 +0100

On 19 Apr 2007, at 18:12, David Reitter wrote:

`latex-mode', however, doesn't seem to respect these changes. Rather than hiding some less important icons to make room for additional icons, it replaces the toolbar with some icons assumed to be standard icons with other functionalities than what I had defined in my `tool-bar-map'.

I addressed the problem with some code that converts an Emacs keymap into a "meaning alist" for toolbar-x. I then set `TeX-bar-TeX-all- button-alists' and `TeX-bar-TeX-buttons' to what I need.

I also had to patch toolbar-x.el to be able to deal with image specifications that consist of a vector of four image specs. (disabled/selected/regular). This seems to be a legal way of specifying images at least in Emacs 22. (Emacs doesn't seem to support the "selected" variant in toolbars, though.)

The patch follows.



*** toolbar-x.el        15 Mar 2007 18:57:55 +0000      1.5
--- toolbar-x.el        21 Apr 2007 12:23:58 +0100      
***************
*** 1,6 ****
  ;;; toolbar-x.el --- fancy toolbar handling in Emacs and XEmacs

! ;; Copyright (C) 2004, 2005 Free Software Foundation, Inc.

  ;; This program is free software; you can redistribute it and/or
  ;; modify it under the terms of the GNU General Public License as
--- 1,6 ----
  ;;; toolbar-x.el --- fancy toolbar handling in Emacs and XEmacs

! ;; Copyright (C) 2004, 2005,2007 Free Software Foundation, Inc.

  ;; This program is free software; you can redistribute it and/or
  ;; modify it under the terms of the GNU General Public License as
***************
*** 502,511 ****
                                            ; (defined with `defimage')
                              (consp (eval val))
                              (eq (car (eval val)) 'image))
!                        (and (listp val) ; or list with 4 strings or
!                                         ; image descriptors
                              (= (length val) 4)
!                             (dolist (i val all-obj-ok)
                                (setq all-obj-ok
                                      (and all-obj-ok
                                           (or (stringp i)
--- 502,511 ----
                                            ; (defined with `defimage')
                              (consp (eval val))
                              (eq (car (eval val)) 'image))
!                        (and (sequencep val) ; or list or vector with
!                                         ; 4 strings or image descriptors
                              (= (length val) 4)
!                             (dolist (i (append val nil) all-obj-ok)
                                (setq all-obj-ok
                                      (and all-obj-ok
                                           (or (stringp i)






reply via email to

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