bug-auctex
[Top][All Lists]
Advanced

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

bug#19714: reftex under Xemacs 21.5.33 Mule


From: Tassilo Horn
Subject: bug#19714: reftex under Xemacs 21.5.33 Mule
Date: Thu, 29 Jan 2015 15:54:25 +0100
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux)

Uwe Brauer <address@hidden> writes:

>    >   2. remove `reftex-label-regexps' and stick to matching only
>    >      \label{...} labels without being able to match other things that
>    >      also produce labels
>
>    >      (or even simpler: remove the "?1" from the first regexp in
>    >      `reftex-label-regexps' and delete the second regexp.  Also make it
>    >      to a `defconst' to indicate that nobody should touch it.)
>
> Do you mean a split in code here?
>
> wrapped around a 
>
>  (when (featurep 'xemacs)
> Simplified version
> )
>
> something like this?

What I mean is exactly this:

--8<---------------cut here---------------start------------->8---
(if (featurep 'xemacs)
    (defconst reftex-label-regexps '("\\\\label{\\([^}]*\\)}"))
  (defcustom reftex-label-regexps
    '(;; Normal \\label{foo} labels
      "\\\\label{\\(?1:[^}]*\\)}"
      ;; keyvals [..., label = {foo}, ...] forms used by ctable,
      ;; listings, minted, ...
      "\\[[^]]*\\<label[[:space:]]*=[[:space:]]*{?\\(?1:[^],}]+\\)}?")
    "List of regexps matching \\label definitions.
The default value matches usual \\label{...} definitions and
keyval style [..., label = {...}, ...] label definitions.  It is
assumed that the regexp group 1 matches the label text, so you
have to define it using \\(?1:...\\) when adding new regexps.

When changed from Lisp, make sure to call
`reftex-compile-variables' afterwards to make the change
effective."
    :version "24.4"
    :set (lambda (symbol value)
           (set symbol value)
           (when (fboundp 'reftex-compile-variables)
             (reftex-compile-variables)))
    :group 'reftex-defining-label-environments
    :type '(repeat (regexp :tag "Regular Expression"))))
--8<---------------cut here---------------end--------------->8---

> Suppose I come up with a solution the way you suggest it.  Would you
> then include the corresponding patch to reftex?

I've already committed the above to the emacs-24 branch which is synced
also to master regularly.

I'm closing this bug.

Bye,
Tassilo

Attachment: signature.asc
Description: PGP signature


reply via email to

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