*** empty log message ***
[emacs.git] / lisp / inc-vers.el
blob1eed7b35940680f448291121a664a4481ce32aed
1 ;;; inc-vers.el --- load this to increment the recorded Emacs version number.
3 ;; Copyright (C) 1985, 1986 Free Software Foundation, Inc.
5 ;; This file is part of GNU Emacs.
7 ;; GNU Emacs is free software; you can redistribute it and/or modify
8 ;; it under the terms of the GNU General Public License as published by
9 ;; the Free Software Foundation; either version 1, or (at your option)
10 ;; any later version.
12 ;; GNU Emacs is distributed in the hope that it will be useful,
13 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;; GNU General Public License for more details.
17 ;; You should have received a copy of the GNU General Public License
18 ;; along with GNU Emacs; see the file COPYING. If not, write to
19 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
22 (insert-file-contents "../lisp/version.el")
24 (re-search-forward "emacs-version \"[^\"]*[0-9]+\"")
25 (forward-char -1)
26 (save-excursion
27 (save-restriction
28 (narrow-to-region (point)
29 (progn (skip-chars-backward "0-9") (point)))
30 (goto-char (point-min))
31 (let ((version (read (current-buffer))))
32 (delete-region (point-min) (point-max))
33 (prin1 (1+ version) (current-buffer)))))
34 (skip-chars-backward "^\"")
35 (message "New Emacs version will be %s"
36 (buffer-substring (point)
37 (progn (skip-chars-forward "^\"") (point))))
40 (write-region (point-min) (point-max) "../lisp/version.el" nil 'nomsg)
41 (erase-buffer)
42 (set-buffer-modified-p nil)
44 (kill-emacs)
46 ;;; inc-vers.el ends here