[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#21484: 25.0.50.1; reftex-extra-bindings is ignored
From: |
Tassilo Horn |
Subject: |
bug#21484: 25.0.50.1; reftex-extra-bindings is ignored |
Date: |
Tue, 15 Sep 2015 17:21:07 +0200 |
User-agent: |
Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux) |
Uwe Brauer <address@hidden> writes:
> Hm, so my setting
>
> (require 'reftex)
> (add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode
> (setq reftex-plug-into-AUCTeX t)
> (setq reftex-initialize-temporary-buffers t)
> (setq reftex-use-itimer-in-xemacs t)
> (setq reftex-extra-bindings t)
> is not correct?
Exactly.
> It should be
>
> (setq reftex-extra-bindings t)
> (require 'reftex)
> (add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode
> (setq reftex-plug-into-AUCTeX t)
> (setq reftex-initialize-temporary-buffers t)
> (setq reftex-use-itimer-in-xemacs t)
Right. And I don't see why you want to require reftex explicitly in the
first place. `turn-on-reftex' is an autoloaded function, so reftex will
be loaded automatically when you find a latex file because you added it
to `LaTeX-mode-hook'. And you can set variables just fine without
having loaded the files with the corresponding `defvar' forms. When
those are evaluated later, they won't override the value you have set
previously.
The only reason for requiring a file explicitly in ~/.emacs is that you
want to call a non-autoloaded function provided by it right now.
> I say this is contra intuitive.
> https://www.gnu.org/software/emacs/manual/html_node/reftex/Key-Bindings.html
> does not say anything about it,
Indeed, that's not specified in all details. I think the assumption has
simply been that users don't load reftex explicitly in their ~/.emacs.
> Maybe I should put that into the
> reftex-load-hook?
No. The manual says that you should use that for keybindings because
that runs *after* the original keys have been instantiated (+ optionally
the extra keys). So when you change assign keys there, you can be sure
they won't be overridden. But I don't see why that would be better than
`with-eval-after-load'. That hook is probably some historical relict.
> > What is resetting?
>
> reftex-reset-mode is an interactive compiled Lisp function in
> ‘reftex.el’.
>
> It is bound to <menu-bar> <Ref> <Reset RefTeX Mode>.
>
> (reftex-reset-mode)
>
> Reset RefTeX Mode.
> This will re-compile the configuration information and remove all
> current scanning information and the parse file to enforce a rescan
> on next use.
>
> Maybe I misunderstood the phrase re-compiling.
Yes. This has nothing to do with reftex's own configuration. It just
recomputes several regular expressions used for identifying labels and
references and reparses the file anew.
Bye,
Tassilo
bug#21484: [[SOLVED]] (was: bug#21484: 25.0.50.1; reftex-extra-bindings is ignored), Uwe Brauer, 2015/09/15