>> "Tassilo" == Tassilo Horn <[email protected]> writes:

   > Uwe Brauer <[email protected]> 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 now that 
`define-minor-mode' always was sort of problematic in Xemacs, for
example I almost never got an entry in the modline, although the mode
was on.
That is  why I CC to Xemcas-beta.

   > For (at least recent) Emacs versions, all minor mode obey this calling
   > convention:

   > ,----
   > | When called from Lisp, the mode command toggles the mode if the
   > | argument is `toggle', disables the mode if the argument is a
   > | non-positive integer, and enables the mode otherwise (including
   > | if the argument is omitted or nil or a positive integer).
   > `----

   > I think with older emacs versions and XEmacs, calling a minor mode
   > function without argument toggles it.  So maybe you have
   > `TeX-source-correlate-mode' in two hooks that are run for tex files,
   > e.g., in both `TeX-mode-hook' and `LaTeX-mode-hook', so that the first
   > toggles it on and the second off again?

No, this is not the case and as I said I did what you to, 
xemacs -q evaluate the line with the hook and the mode is *not* turned
on.

Uwe 

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
auctex-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/auctex-devel

Reply via email to