auctex-devel
[Top][All Lists]
Advanced

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

[AUCTeX-devel] Re: Activation of the LaTeX tool bar


From: Ralf Angeli
Subject: [AUCTeX-devel] Re: Activation of the LaTeX tool bar
Date: Fri, 17 Mar 2006 21:08:24 +0100

* Reiner Steib (2006-03-17) writes:

> 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.
> `----

I know, I read the thread before I made the recent changes. (c:

> BTW: I don't quite understand parts of your recent change.
[...]
> 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.

It was just a precaution.  Mode hooks should be run as late as
possible.  Otherwise this might defeat their purpose of providing a
means for the user to override values set by the mode.
`TeX-set-mode-name' has to be run after those hooks, however, because
they may activate minor modes which have to be indicated by the mode
name.

> 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)
>         tool-bar-mode)
>     (LaTeX-maybe-install-toolbar))
>
> [ pretty-printed version of your code ;-) ]

Pff, waste of space. (c;

> 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.

In my case it wasn't.  I started Emacs with the tool bar disabled,
loaded a LaTeX file and typed `M-x tool-bar-mode RET'.  Then the LaTeX
tool bar appeared.  But when I loaded a new LaTeX file after that I
got a regular tool bar.  I guess `LaTeX-maybe-install-toolbar' was
only run once when the tool bar was activated while it has to be run
every time LaTeX mode is being activated.

-- 
Ralf





reply via email to

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