|
|
1.1 ! root 1: ;; Load this file to increment the recorded Emacs version number. ! 2: ;; Copyright (C) 1985 Richard M. Stallman. ! 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: (save-excursion ! 26: (save-restriction ! 27: (narrow-to-region (point) ! 28: (progn (skip-chars-backward "0-9") (point))) ! 29: (goto-char (point-min)) ! 30: (let ((version (read (current-buffer)))) ! 31: (delete-region (point-min) (point-max)) ! 32: (prin1 (1+ version) (current-buffer))))) ! 33: (skip-chars-backward "^\"") ! 34: (message "New Emacs version will be %s" ! 35: (buffer-substring (point) ! 36: (progn (skip-chars-forward "^\"") (point)))) ! 37: ! 38: ! 39: (write-region (point-min) (point-max) "../lisp/version.el" nil 'nomsg) ! 40: (erase-buffer) ! 41: (set-buffer-modified-p nil) ! 42: ! 43: (kill-emacs)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.