[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#12622: replace-regexp-in-string
From: |
Andreas Schwab |
Subject: |
bug#12622: replace-regexp-in-string |
Date: |
Thu, 11 Oct 2012 18:52:46 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) |
Andreas Röhler <andreas.roehler@easy-emacs.de> writes:
> (setq mystring "[.A foobar] [.B baz]")
> (replace-regexp-in-string "\\_<\\w+\\_>" (concat "\\\\"
> (match-string-no-properties 0)) mystring) ==>
>
> "[.A \\ext in that fi] [.B \\ext in that fi]"
>
> for example,
>
> Docstring says:
>
> "If it is a function, it is called with the actual text of each
> match, and its value is used as the replacement text."
>
> Which is not the case AFAIS.
You are not passing a function.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
- bug#12622: replace-regexp-in-string, Andreas Röhler, 2012/10/11
- bug#12622: replace-regexp-in-string, Andreas Schwab, 2012/10/11
- bug#12622: replace-regexp-in-string, Andreas Röhler, 2012/10/11
- bug#12622: replace-regexp-in-string,
Andreas Schwab <=
- bug#12622: replace-regexp-in-string, Andreas Röhler, 2012/10/12
- bug#12622: replace-regexp-in-string, Andreas Schwab, 2012/10/12
- bug#12622: replace-regexp-in-string, Stefan Monnier, 2012/10/12
- bug#12622: replace-regexp-in-string, Andreas Röhler, 2012/10/12
- bug#12622: replace-regexp-in-string, Stefan Monnier, 2012/10/12