From 8302f8d3086025ff54964593999b0b592dcd9d6d Mon Sep 17 00:00:00 2001 From: Steve Purcell Date: Sun, 7 Apr 2013 11:02:27 +0100 Subject: [PATCH] Save upstream Version header line as X-Original-Version Closes #659 --- package-build.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/package-build.el b/package-build.el index c0b9361b..c286062f 100644 --- a/package-build.el +++ b/package-build.el @@ -505,7 +505,12 @@ The file is written to `package-build-working-dir'." "Ensure current buffer has a \"Version: VERSION\" header." (goto-char (point-min)) (if (re-search-forward "^;;;* *Version: *" nil t) - (kill-whole-line) + (progn + (move-beginning-of-line nil) + (search-forward "Version" nil t) + (backward-word) + (insert "X-Original-") + (move-beginning-of-line nil)) (forward-line)) (insert (format ";; Version: %s" version)) (newline))