[Top][All Lists]

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

[AUCTeX-devel] Activation of the LaTeX tool bar (was: auctex 11.82 and c

From: Reiner Steib
Subject: [AUCTeX-devel] Activation of the LaTeX tool bar (was: auctex 11.82 and carbon xemacs)
Date: Fri, 17 Mar 2006 19:59:22 +0100
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

On Wed, Mar 15 2006, Ralf Angeli wrote:

> The activation is done via `tool-bar-mode-on-hook' and therefore
> fails in XEmacs.

| From: Reiner Steib <address@hidden>
| Subject: Re: LaTeX tool bar on by default?
| Newsgroups: gmane.emacs.auctex.general
| Date: Fri, 03 Feb 2006 16:36:53 +0100
| Message-ID: <address@hidden>
| > So perhaps we should register LaTeX-maybe-install-toolbar into
| > tool-bar-mode-on-hook [...]
| Committed.  Seems to work in Emacs 21 and 22.  Dunno about XEmacs; I
| couldn't figure out quickly how to en-/disable tool bars in XEmacs.

BTW: I don't quite understand parts of your recent change.

--8<---------------cut here---------------start------------->8---
--- latex.el    14 Mar 2006 09:03:35 -0000      5.401
+++ latex.el    15 Mar 2006 20:36:02 -0000      5.402
@@ -4687,10 +4687,12 @@
   (setq TeX-base-mode-name "LaTeX")
   (setq major-mode 'latex-mode)
   (setq TeX-command-default "LaTeX")
-  (TeX-run-mode-hooks 'text-mode-hook 'TeX-mode-hook 'LaTeX-mode-hook)
-  (TeX-set-mode-name)
   (setq TeX-sentinel-default-function 'TeX-LaTeX-sentinel)
   (add-hook 'tool-bar-mode-on-hook 'LaTeX-maybe-install-toolbar)
+  (when (if (featurep 'xemacs) (featurep 'toolbar) tool-bar-mode)
+    (LaTeX-maybe-install-toolbar))
+  (TeX-run-mode-hooks 'text-mode-hook 'TeX-mode-hook 'LaTeX-mode-hook)
+  (TeX-set-mode-name)
   ;; Defeat filladapt
   (if (and (boundp 'filladapt-mode)
--8<---------------cut here---------------end--------------->8---

Why did you need to move `TeX-run-mode-hooks' and `TeX-set-mode-name'?
If it's necessary, we should maybe add a comment.

I don't understand why we need a second call of
`LaTeX-maybe-install-toolbar' here when (featurep 'xemacs) is nil and
tool-bar-mode is non-nil:

  (when (if (featurep 'xemacs)
            (featurep 'toolbar)

[ pretty-printed version of your code ;-) ]

When I installed the `LaTeX-maybe-install-toolbar' code, I tested it
in various combinations (w/ and w/o tool bar in Emacs 21 and 22),
IIRC, and (add-hook 'tool-bar-mode-on-hook
'LaTeX-maybe-install-toolbar) was sufficient.

Bye, Reiner.
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |

reply via email to

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