[Top][All Lists]

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

[Bug-AUCTeX] 11.86; forgets to install tool-bar

From: David Reitter
Subject: [Bug-AUCTeX] 11.86; forgets to install tool-bar
Date: Sat, 22 May 2010 09:53:46 -0400

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 

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 <address@hidden>
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 

diff --git a/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))
   (TeX-run-mode-hooks 'text-mode-hook 'TeX-mode-hook 'LaTeX-mode-hook)
diff --git a/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))
   (TeX-run-mode-hooks 'text-mode-hook 'TeX-mode-hook 'plain-TeX-mode-hook)

reply via email to

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