auctex-devel
[Top][All Lists]
Advanced

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

[AUCTeX-devel] RefTeX reference format selection window


From: Mosè Giordano
Subject: [AUCTeX-devel] RefTeX reference format selection window
Date: Tue, 30 Jul 2013 13:53:02 +0200

Hi all,

in recent RefTeX versions has been introduced a new reference format
selection window when one runs `C-c )'.  Personally, I don't like it
very much because I find in most cases it just adds a useless step,
but I can disable it and it's fine with me.

It it's enabled, this window appears also when one runs, e. g., `C-c
C-m ref RET' and I don't think this is the expected behavior: if one
explicitly insert a reference macro probably don't want to select
another time the reference format.  Moreover, in this case it's
completely useless since the selected format is ignored.

What I suggest is to define a new function which let-binds
`reftex-ref-macro-prompt' to nil and then call `TeX-arg-label'.
Currently `TeX-arg-ref' is an alias for `TeX-arg-label', we could
redefine it something like
--8<---------------cut here---------------start------------->8---
(defun TeX-arg-ref (optional &optional prompt definition)
  "Let-bind `reftex-ref-macro-prompt' to nil and pass arguments
to `TeX-arg-label'.

See the documentation of `TeX-arg-label' for details on the
arguments: OPTIONAL, PROMPT, and DEFINITION."
  (let ((reftex-ref-macro-prompt nil))
    (TeX-arg-label optional prompt definition)))
--8<---------------cut here---------------end--------------->8---
Then, this should became the function actually called by the macros,
instead of `TeX-arg-label'.  Comments?

Bye,
Mosè



reply via email to

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