|
|
1.1 root 1: ;; Load this file to increment the recorded Emacs version number.
2: ;; Copyright (C) 1985, 1986 Free Software Foundation, Inc.
3:
4: ;; This file is part of GNU Emacs.
5:
6: ;; GNU Emacs is distributed in the hope that it will be useful,
7: ;; but WITHOUT ANY WARRANTY. No author or distributor
8: ;; accepts responsibility to anyone for the consequences of using it
9: ;; or for whether it serves any particular purpose or works at all,
10: ;; unless he says so in writing. Refer to the GNU Emacs General Public
11: ;; License for full details.
12:
13: ;; Everyone is granted permission to copy, modify and redistribute
14: ;; GNU Emacs, but only under the conditions described in the
15: ;; GNU Emacs General Public License. A copy of this license is
16: ;; supposed to have been given to you along with GNU Emacs so you
17: ;; can know your rights and responsibilities. It should be in a
18: ;; file named COPYING. Among other things, the copyright notice
19: ;; and this notice must be preserved on all copies.
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)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.