[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 16:44:03 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) |
Andreas Röhler <andreas.roehler@easy-emacs.de> writes:
> Also would expect a respective form working with replace-regexp-in-string
>
> (setq mystring "[.A foobar] [.B baz]")
> (replace-regexp-in-string "\\_<\\w+\\_>" (concat "\\\\"
> (match-string-no-properties 0) ) mystring)
>
> but it fails.
Fails in which way? What do you expect, and what do you get?
> When commenting "(match-string 0 str)" as follows it subr.el it works
>
> (setq matches
> (cons (replace-match (if (stringp rep)
> rep
> (funcall rep
> ;; (match-string 0 str)
> ))
> fixedcase literal str subexp)
>
> Which has some plausibility: when receiving a user-specified function, there
> must not be that argument.
Why? That's what the doc string documents.
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 <=
- 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/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