Mercurial > emacs
annotate lisp/=inc-vers.el @ 738:81cd2a003397
*** empty log message ***
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 04 Jul 1992 00:01:45 +0000 |
parents | 08eb386dd0f3 |
children | 4f28bd14272c |
rev | line source |
---|---|
660
08eb386dd0f3
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
35
diff
changeset
|
1 ;;; inc-vers.el --- load this to increment the recorded Emacs version number. |
08eb386dd0f3
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
35
diff
changeset
|
2 |
35 | 3 ;; Copyright (C) 1985, 1986 Free Software Foundation, Inc. |
4 | |
5 ;; This file is part of GNU Emacs. | |
6 | |
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. | |
11 | |
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. | |
16 | |
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. | |
20 | |
21 | |
22 (insert-file-contents "../lisp/version.el") | |
23 | |
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)))) | |
38 | |
39 | |
40 (write-region (point-min) (point-max) "../lisp/version.el" nil 'nomsg) | |
41 (erase-buffer) | |
42 (set-buffer-modified-p nil) | |
43 | |
44 (kill-emacs) | |
660
08eb386dd0f3
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
35
diff
changeset
|
45 |
08eb386dd0f3
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
35
diff
changeset
|
46 ;;; inc-vers.el ends here |