aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2006-01-23 10:40:10 +0000
committerPascal Rigaux <pixel@mandriva.com>2006-01-23 10:40:10 +0000
commit4b9a2e7258a0ea307bb631a0fbc5a0b0564a1830 (patch)
tree0df33f358fdc35c9dcdf4ad125613de9127496b9
parent9a3e30fd6624c8c3305954f88904ced72ce7509b (diff)
downloadrpm-setup-4b9a2e7258a0ea307bb631a0fbc5a0b0564a1830.tar
rpm-setup-4b9a2e7258a0ea307bb631a0fbc5a0b0564a1830.tar.gz
rpm-setup-4b9a2e7258a0ea307bb631a0fbc5a0b0564a1830.tar.bz2
rpm-setup-4b9a2e7258a0ea307bb631a0fbc5a0b0564a1830.tar.xz
rpm-setup-4b9a2e7258a0ea307bb631a0fbc5a0b0564a1830.zip
handle increasing things like "%mkrel 2"
-rw-r--r--rpm-spec-mode.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/rpm-spec-mode.el b/rpm-spec-mode.el
index f3569af..eea9433 100644
--- a/rpm-spec-mode.el
+++ b/rpm-spec-mode.el
@@ -1308,7 +1308,10 @@ if one is present in the file."
(or (funcall increase-macro macros)
(and (search-forward-regexp
(concat "%define[ \t]+" macros "[ \t]+%mkrel[ \t]+%{rel}") nil t)
- (funcall increase-macro "rel"))))))))
+ (funcall increase-macro "rel"))
+ (and (search-forward-regexp "\\(%mkrel[ \t]+\\)\\([0-9]+\\)$" nil t)
+ (replace-match (concat (match-string 1) (int-to-string (1+ (string-to-int (match-string 2)))))))
+ ))))))
;;------------------------------------------------------------