AUCTeX doesn't reliably install its tool-bars because it erroneously checks `tool-bar-mode' and uses a non-existing (Emacs 22/23) `tool-bar-mode-on-hook'.
Note that the tool-bar can easily be enabled via frame parameter and also via the UI (for one frame) without ever touching `tool-bar-mode'. I'm installing the change below in Aquamacs; let me know if you see a problem with it. Note that the tool-bar is still conditional (via the enable-toolbar AUCTeX option) so that users can speed up things that way, if speed was the concern here. PS.: toolbarx has caused me a lot of pain in the past and is continuing to be a nuisance, simply because it uses quite a low-level interface that doesn't allow other Lisp code to add its configuration to the toolbar via the standard keymap means of Emacs. It would be nice if you got rid of it. ==== commit abb51f94176cad3d729fbedbde232aa5f77e27bf Author: David Reitter <[email protected]> Date: Sat May 22 09:45:31 2010 -0400 latex-mode/tex-mode: install toolbar independently of `tool-bar-mode' The tool-bar can be enabled via the frame-parameter `tool-bar-lines'; checking `tool-bar-mode' is not a reliable way to check for the presence of a tool-bar; `tool-bar-mode-on-hook' is not a hook (at least not in GNU Emacs) diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/latex.el b/aquamacs/src/site-lisp/edit-modes/auctex/latex.el index 23297a6..430a374 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/latex.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/latex.el @@ -4921,10 +4921,9 @@ of `LaTeX-mode-hook'." (setq major-mode 'latex-mode) (setq TeX-command-default "LaTeX") (setq TeX-sentinel-default-function 'TeX-LaTeX-sentinel) - (add-hook 'tool-bar-mode-on-hook 'LaTeX-maybe-install-toolbar nil t) (when (if (featurep 'xemacs) (featurep 'toolbar) - (and (boundp 'tool-bar-mode) tool-bar-mode)) + (boundp 'tool-bar-mode)) (LaTeX-maybe-install-toolbar)) (TeX-run-mode-hooks 'text-mode-hook 'TeX-mode-hook 'LaTeX-mode-hook) (TeX-set-mode-name) diff --git a/aquamacs/src/site-lisp/edit-modes/auctex/plain-tex.el b/aquamacs/src/site-lisp/edit-modes/auctex/plain-tex.el index 6c365d3..a4196cc 100644 --- a/aquamacs/src/site-lisp/edit-modes/auctex/plain-tex.el +++ b/aquamacs/src/site-lisp/edit-modes/auctex/plain-tex.el @@ -128,10 +128,9 @@ of plain-TeX-mode-hook." (setq TeX-base-mode-name "TeX") (setq TeX-command-default "TeX") (setq TeX-sentinel-default-function 'TeX-TeX-sentinel) - (add-hook 'tool-bar-mode-on-hook 'plain-TeX-maybe-install-toolbar nil t) (when (if (featurep 'xemacs) (featurep 'toolbar) - (and (boundp 'tool-bar-mode) tool-bar-mode)) + (boundp 'tool-bar-mode)) (plain-TeX-maybe-install-toolbar)) (TeX-run-mode-hooks 'text-mode-hook 'TeX-mode-hook 'plain-TeX-mode-hook) (TeX-set-mode-name)) _______________________________________________ bug-auctex mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-auctex
