* 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 <[EMAIL PROTECTED]> > | Subject: Re: LaTeX tool bar on by default? > | Newsgroups: gmane.emacs.auctex.general > | Date: Fri, 03 Feb 2006 16:36:53 +0100 > | Message-ID: <[EMAIL PROTECTED]> > | > | > 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 _______________________________________________ auctex-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/auctex-devel
