auctex-devel
[Top][All Lists]
Advanced

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

Re: [AUCTeX-devel] [define-minor-mode] (was: [hook does not work])


From: Mosè Giordano
Subject: Re: [AUCTeX-devel] [define-minor-mode] (was: [hook does not work])
Date: Mon, 28 Jul 2014 00:19:22 +0200

Hi Uwe,

2014-07-27 18:49 GMT+02:00 Uwe Brauer <address@hidden>:
>>> "Tassilo" == Tassilo Horn <address@hidden> writes:
>
>    > Uwe Brauer <address@hidden> writes:
>    > Hi Uwe,
>
>    >> Well well
>    >>
>    >> (add-hook 'LaTeX-mode-hook 'TeX-source-correlate-mode)
>    >>
>    >> This does not work
>    >> ,----
>    >> |
>    >> | `LaTeX-mode-hook' is a variable declared in Lisp.
>    >> |   -- loaded from "latex"
>    >> |
>    >> | Value: (preview-mode-setup turn-on-auto-revert-mode
>    >> | turn-on-my-footnote-mode turn-on-flyspell my-install-latex-toolbar
>    >> | my-set-auto-capitalize turn-on-auto-capitalize-mode turn-on-cdlatex
>    >> | my-latex-xsymbol-8bit turn-on-reftex my-LaTeX-TeX-add-symbols
>    >> | TeX-source-correlate-mode my-latex-mode-key)
>    >> |
>    >> | Documentation:
>    >> | A hook run in LaTeX mode buffers.
>    >> `----
>    >>
>    >> But in a Latex buffer I obtain
>    >>
>    >> ,----
>    >> |
>    >> | `TeX-source-correlate-mode' is a variable declared in Lisp.
>    >> |   -- loaded from "tex"
>    >> |
>    >> | Value: nil
>    >> |
>    >> | Documentation:
>    >> | Non-nil if Tex-Source-Correlate mode is enabled.
>    >> | See the command `TeX-source-correlate-mode' for a description of this 
> minor-mode.
>    >> | Setting this variable directly does not take effect;
>    >> | use either M-? C or the function `TeX-source-correlate-mode'.
>    >> `----
>    >>
>    >> Is this a bug?
>
>    > I can't reproduce that.  With a fresh emacs on a test account with
>    > auctex from ELPA, with no settings in ~/.emacs except for
>
>    >   (add-hook 'LaTeX-mode-hook 'TeX-source-correlate-mode)
>
>    > emacs foo.tex will activate `TeX-source-correlate-mode', i.e., its value
>    > is t.
>
>    > Could be a specific of XEmacs maybe?
>
>
> I did the same as you did for emacs, and indeed it is different
> TeX-source-correlate-mode is nil!

I confirm

    (add-hook 'LaTeX-mode-hook 'TeX-source-correlate-mode)

doesn't work on XEmacs 21.4.22, but

    (add-hook 'LaTeX-mode-hook (lambda () (TeX-source-correlate-mode 1)))

does the trick.

Bye,
Mosè



reply via email to

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