[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
replace-regexp question
From: |
Neon Absentius |
Subject: |
replace-regexp question |
Date: |
Wed, 26 Oct 2005 17:15:57 +0000 |
User-agent: |
Mutt/1.4.2.1i |
Is there a way to use the command replace-regexp to replace a number with
that number increased, say, by 15? I tried
C-M-% -?[0-9]+ RET (number-to-string (+ (string-to-number "\&") 15)) RET
but it doesn't work because emacs interprets the second input to be a string
and so it doesn't evaluate it. So I guess the question is how can we use
the result of evaluating a sexp for replacement text?
Any help and/or pointers to documentation will be greatly appreciated.
--
There is no national science just as there is no national
multiplication table; what is national is no longer science.
-- Anton Checov