Uwe Brauer <[email protected]> writes:

> Fair enough, but then you might try later to add some modified reftex
> support? I will try to send a patch later (against the latest master).

There is really no need to add modified RefTeX support.  Suppose you
write a refcount.el which looks like this:

--8<---------------cut here---------------start------------->8---
(TeX-add-style-hook
 "refcount"
 (lambda ()
   (TeX-add-symbol
    '("setcounterref" TeX-arg-counter TeX-arg-ref)
    '("getrefbykeydefault"
      TeX-arg-ref
      (TeX-arg-completing-read ("page" "title" "name" "anchor" "url"))
      "Default")))
 ;; RefTeX reference style
 (and LaTeX-reftex-ref-style-auto-activate
      (fboundp 'reftex-ref-style-activate)
      (reftex-ref-style-activate "Refcount"))
 TeX-dialect)
--8<---------------cut here---------------end--------------->8---

You only need to adjust `reftex-ref-style-alist' via customize or the
code you sent, say in your init file:

  (add-to-list 'reftex-ref-style-alist
               '("Refcount" "refcount" (("\\getrefbykeydefault" ?G)))
               t)

For you, it should work, and for others without this entry, RefTeX
should discard to code in the .el file silently (at least this is the
theory).

> BTW I had no time to test your patch for which you called for testers,
> sorry.

No problem, our usual process is to put code into testing via an ELPA
release ;-)

> I know you and others are not very fond of the idea to mix reftex code
> into auctex, but then nobody is forced to use that code....

The point is that I'm not fond of the idea to add a hard-coded entry to
a user custom variable, in this case ?G for instance.  Others may use ?G
for a different macro, how do we make sure there is no such clash?


Reply via email to