bug-auctex
[Top][All Lists]
Advanced

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

Re: [Bug-AUCTeX] Re: 11.84; texinfo mode provided by AUCTeX is not activ


From: Ralf Angeli
Subject: Re: [Bug-AUCTeX] Re: 11.84; texinfo mode provided by AUCTeX is not activated.
Date: Sat, 02 Feb 2008 19:28:33 +0100

* David Kastrup (2008-02-02) writes:

> Ralf Angeli <address@hidden> writes:
>
>> ,----[ <mid:address@hidden> ]
[...]
>> | 3. Then texinfo.el, bundled with emacs, is loaded, resulting in that the
>> |    above defalias for texinfo-mode is overwritten by
>> | (define-derived-mode texinfo-mode text-mode "Texinfo"
>> |    in texinfo.el.
>> | 4. Therefore, the overwritten function definition is used for M-x
>> |    texinfo-mode, ignoring the TeX-texinfo-mode defined in tex-info.el.
>> `----
>
> What happens if one just repeats the defalias after (require 'texinfo)?
> Some infinite loop or something?  I'd like the simplest version to be
> used.  This might be just (TeX-modes-set 'TeX-modes TeX-modes) or so
> (the t argument definitely looks dangerous, anybody remember why this
> argument is available in the first place?  Probably to supersede
> autoloads, but it would appear to affect other modes).

A simple `defalias' works.  The following works as well and is probably
safer:

(when (and (boundp 'TeX-modes)
           (memq 'texinfo-mode TeX-modes))
  (defalias 'texinfo-mode 'TeX-texinfo-mode))

Note that this is only an issue in Emacs 21.

I don't know about the argument of `TeX-modes-set'.  This is something
you did on your own as far as I remember.

By the way, the value of the `tex-saved' property of `texinfo-mode' is
awfully big after loading a Texinfo in CVS Emacs (probably a whole
function definition).  The values of such properties on
e.g. `latex-mode' are also different compared to the case of loading a
LaTeX file: `TeX-latex-mode' compared to `(autoload "tex-mode" 1725277 t
nil)'.  So somehow `TeX-modes-set' is called in the Texinfo case (even
without the case above) and overwrites the property values.  This is no
problem in Emacs 21.  But then again, I haven't looked what these
properties are for.

-- 
Ralf




reply via email to

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