Mercurial > emacs
annotate admin/admin.el @ 104794:84caf35eb99a
Comment.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Wed, 02 Sep 2009 03:17:18 +0000 |
parents | 37e835e25528 |
children | 1d1d5d9bd884 |
rev | line source |
---|---|
40063 | 1 ;;; admin.el --- utilities for Emacs administration |
2 | |
100971 | 3 ;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 |
75348 | 4 ;; Free Software Foundation, Inc. |
40063 | 5 |
6 ;; This file is part of GNU Emacs. | |
7 | |
94833
e6db9ee945b8
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
87632
diff
changeset
|
8 ;; GNU Emacs is free software: you can redistribute it and/or modify |
40063 | 9 ;; it under the terms of the GNU General Public License as published by |
94833
e6db9ee945b8
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
87632
diff
changeset
|
10 ;; the Free Software Foundation, either version 3 of the License, or |
e6db9ee945b8
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
87632
diff
changeset
|
11 ;; (at your option) any later version. |
40063 | 12 |
13 ;; GNU Emacs is distributed in the hope that it will be useful, | |
14 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 ;; GNU General Public License for more details. | |
17 | |
18 ;; You should have received a copy of the GNU General Public License | |
94833
e6db9ee945b8
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
87632
diff
changeset
|
19 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
40063 | 20 |
21 ;;; Commentary: | |
22 | |
61547
1926d92f781e
(add-release-logs): Fix require call.
Lute Kamstra <lute@gnu.org>
parents:
52401
diff
changeset
|
23 ;; add-release-logs Add ``Version X released'' change log entries. |
1926d92f781e
(add-release-logs): Fix require call.
Lute Kamstra <lute@gnu.org>
parents:
52401
diff
changeset
|
24 ;; set-version Change Emacs version number in source tree. |
81229
fd5ff936aab8
(set-copyright): New function.
Glenn Morris <rgm@gnu.org>
parents:
75348
diff
changeset
|
25 ;; set-copyright Change emacs short copyright string (eg as |
fd5ff936aab8
(set-copyright): New function.
Glenn Morris <rgm@gnu.org>
parents:
75348
diff
changeset
|
26 ;; printed by --version) in source tree. |
40063 | 27 |
28 ;;; Code: | |
29 | |
30 (defun add-release-logs (root version) | |
31 "Add \"Version VERSION released.\" change log entries in ROOT. | |
32 Root must be the root of an Emacs source tree." | |
33 (interactive "DEmacs root directory: \nNVersion number: ") | |
49298
bb7bf9ff7c97
(add-release-logs): Expand the directory name before calling find(1).
Francesco Potortì <pot@gnu.org>
parents:
40161
diff
changeset
|
34 (setq root (expand-file-name root)) |
40063 | 35 (unless (file-exists-p (expand-file-name "src/emacs.c" root)) |
36 (error "%s doesn't seem to be the root of an Emacs source tree" root)) | |
61547
1926d92f781e
(add-release-logs): Fix require call.
Lute Kamstra <lute@gnu.org>
parents:
52401
diff
changeset
|
37 (require 'add-log) |
40063 | 38 (let* ((logs (process-lines "find" root "-name" "ChangeLog")) |
39 (entry (format "%s %s <%s>\n\n\t* Version %s released.\n\n" | |
49298
bb7bf9ff7c97
(add-release-logs): Expand the directory name before calling find(1).
Francesco Potortì <pot@gnu.org>
parents:
40161
diff
changeset
|
40 (funcall add-log-time-format) |
bb7bf9ff7c97
(add-release-logs): Expand the directory name before calling find(1).
Francesco Potortì <pot@gnu.org>
parents:
40161
diff
changeset
|
41 (or add-log-full-name (user-full-name)) |
bb7bf9ff7c97
(add-release-logs): Expand the directory name before calling find(1).
Francesco Potortì <pot@gnu.org>
parents:
40161
diff
changeset
|
42 (or add-log-mailing-address user-mail-address) |
bb7bf9ff7c97
(add-release-logs): Expand the directory name before calling find(1).
Francesco Potortì <pot@gnu.org>
parents:
40161
diff
changeset
|
43 version))) |
40063 | 44 (dolist (log logs) |
40084
1f20d08b9da5
(add-release-logs): Put the log entry in lispref, too.
Gerd Moellmann <gerd@gnu.org>
parents:
40063
diff
changeset
|
45 (unless (string-match "/gnus/" log) |
40063 | 46 (find-file log) |
47 (goto-char (point-min)) | |
48 (insert entry))))) | |
49 | |
50 (defun set-version-in-file (root file version rx) | |
51 (find-file (expand-file-name file root)) | |
52 (goto-char (point-min)) | |
53 (unless (re-search-forward rx nil t) | |
54 (error "Version not found in %s" file)) | |
55 (replace-match (format "%s" version) nil nil nil 1)) | |
56 | |
57 (defun set-version (root version) | |
58 "Set Emacs version to VERSION in relevant files under ROOT. | |
59 Root must be the root of an Emacs source tree." | |
40161
795c8ca09f8b
(set-version): Use `s' interactive spec for
Gerd Moellmann <gerd@gnu.org>
parents:
40084
diff
changeset
|
60 (interactive "DEmacs root directory: \nsVersion number: ") |
40063 | 61 (unless (file-exists-p (expand-file-name "src/emacs.c" root)) |
62 (error "%s doesn't seem to be the root of an Emacs source tree" root)) | |
63 (set-version-in-file root "lisp/version.el" version | |
64 (rx (and "emacs-version" (0+ space) | |
65 ?\" (submatch (1+ (not (in ?\")))) ?\"))) | |
66 (set-version-in-file root "README" version | |
67 (rx (and "version" (1+ space) | |
68 (submatch (1+ (in "0-9.")))))) | |
87055
09f5a2d2bbcf
(set-version): Handle configure.in. Adapt for doc/ directory layout
Glenn Morris <rgm@gnu.org>
parents:
86173
diff
changeset
|
69 (set-version-in-file root "configure.in" version |
09f5a2d2bbcf
(set-version): Handle configure.in. Adapt for doc/ directory layout
Glenn Morris <rgm@gnu.org>
parents:
86173
diff
changeset
|
70 (rx (and "AC_INIT" (1+ (not (in ?,))) |
09f5a2d2bbcf
(set-version): Handle configure.in. Adapt for doc/ directory layout
Glenn Morris <rgm@gnu.org>
parents:
86173
diff
changeset
|
71 ?, (0+ space) |
09f5a2d2bbcf
(set-version): Handle configure.in. Adapt for doc/ directory layout
Glenn Morris <rgm@gnu.org>
parents:
86173
diff
changeset
|
72 (submatch (1+ (in "0-9.")))))) |
09f5a2d2bbcf
(set-version): Handle configure.in. Adapt for doc/ directory layout
Glenn Morris <rgm@gnu.org>
parents:
86173
diff
changeset
|
73 (set-version-in-file root "doc/emacs/emacs.texi" version |
40063 | 74 (rx (and "EMACSVER" (1+ space) |
63217
3ef574f6b152
(set-version): Set version in lisp manual too.
Lute Kamstra <lute@gnu.org>
parents:
61547
diff
changeset
|
75 (submatch (1+ (in "0-9.")))))) |
87055
09f5a2d2bbcf
(set-version): Handle configure.in. Adapt for doc/ directory layout
Glenn Morris <rgm@gnu.org>
parents:
86173
diff
changeset
|
76 (set-version-in-file root "doc/lispref/elisp.texi" version |
63217
3ef574f6b152
(set-version): Set version in lisp manual too.
Lute Kamstra <lute@gnu.org>
parents:
61547
diff
changeset
|
77 (rx (and "EMACSVER" (1+ space) |
65774
ffd4e3fb1637
(set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents:
64079
diff
changeset
|
78 (submatch (1+ (in "0-9.")))))) |
95989
95f012d6bfcd
(set-version): Add doc/lispref/vol1.texi,vol2.texi.
Glenn Morris <rgm@gnu.org>
parents:
95943
diff
changeset
|
79 (set-version-in-file root "doc/lispref/vol1.texi" version |
40063 | 80 (rx (and "EMACSVER" (1+ space) |
63217
3ef574f6b152
(set-version): Set version in lisp manual too.
Lute Kamstra <lute@gnu.org>
parents:
61547
diff
changeset
|
81 (submatch (1+ (in "0-9.")))))) |
95989
95f012d6bfcd
(set-version): Add doc/lispref/vol1.texi,vol2.texi.
Glenn Morris <rgm@gnu.org>
parents:
95943
diff
changeset
|
82 (set-version-in-file root "doc/lispref/vol2.texi" version |
63217
3ef574f6b152
(set-version): Set version in lisp manual too.
Lute Kamstra <lute@gnu.org>
parents:
61547
diff
changeset
|
83 (rx (and "EMACSVER" (1+ space) |
65774
ffd4e3fb1637
(set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents:
64079
diff
changeset
|
84 (submatch (1+ (in "0-9.")))))) |
95992
b0696de9e16a
(set-version): Add doc/lispref/book-spine.texinfo.
Glenn Morris <rgm@gnu.org>
parents:
95989
diff
changeset
|
85 (set-version-in-file root "doc/lispref/book-spine.texinfo" version |
b0696de9e16a
(set-version): Add doc/lispref/book-spine.texinfo.
Glenn Morris <rgm@gnu.org>
parents:
95989
diff
changeset
|
86 (rx (and "Emacs Version" (1+ space) |
b0696de9e16a
(set-version): Add doc/lispref/book-spine.texinfo.
Glenn Morris <rgm@gnu.org>
parents:
95989
diff
changeset
|
87 (submatch (1+ (in "0-9.")))))) |
87628
83bc2894885f
(set-version): Add doc/man/emacs.1.
Glenn Morris <rgm@gnu.org>
parents:
87553
diff
changeset
|
88 (set-version-in-file root "doc/man/emacs.1" version |
83bc2894885f
(set-version): Add doc/man/emacs.1.
Glenn Morris <rgm@gnu.org>
parents:
87553
diff
changeset
|
89 (rx (and ".TH EMACS" (1+ not-newline) |
83bc2894885f
(set-version): Add doc/man/emacs.1.
Glenn Morris <rgm@gnu.org>
parents:
87553
diff
changeset
|
90 "GNU Emacs" (1+ space) |
83bc2894885f
(set-version): Add doc/man/emacs.1.
Glenn Morris <rgm@gnu.org>
parents:
87553
diff
changeset
|
91 (submatch (1+ (in "0-9.")))))) |
95943
4e411168887d
(set-version): Add doc/misc/faq.texi.
Glenn Morris <rgm@gnu.org>
parents:
94833
diff
changeset
|
92 (set-version-in-file root "doc/misc/faq.texi" version |
4e411168887d
(set-version): Add doc/misc/faq.texi.
Glenn Morris <rgm@gnu.org>
parents:
94833
diff
changeset
|
93 (rx (and "VER" (1+ space) |
4e411168887d
(set-version): Add doc/misc/faq.texi.
Glenn Morris <rgm@gnu.org>
parents:
94833
diff
changeset
|
94 (submatch (1+ (in "0-9.")))))) |
74187
b7548a5c934e
(set-version): Set version number in lib-src/makefile.w32-in.
Juanma Barranquero <lekktu@gmail.com>
parents:
73372
diff
changeset
|
95 (set-version-in-file root "lib-src/makefile.w32-in" version |
b7548a5c934e
(set-version): Set version number in lib-src/makefile.w32-in.
Juanma Barranquero <lekktu@gmail.com>
parents:
73372
diff
changeset
|
96 (rx (and "VERSION" (0+ space) "=" (0+ space) |
b7548a5c934e
(set-version): Set version number in lib-src/makefile.w32-in.
Juanma Barranquero <lekktu@gmail.com>
parents:
73372
diff
changeset
|
97 (submatch (1+ (in "0-9.")))))) |
65774
ffd4e3fb1637
(set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents:
64079
diff
changeset
|
98 ;; nt/emacs.rc also contains the version number, but in an awkward |
ffd4e3fb1637
(set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents:
64079
diff
changeset
|
99 ;; format. It must contain four components, separated by commas, and |
ffd4e3fb1637
(set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents:
64079
diff
changeset
|
100 ;; in two places those commas are followed by space, in two other |
ffd4e3fb1637
(set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents:
64079
diff
changeset
|
101 ;; places they are not. |
ffd4e3fb1637
(set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents:
64079
diff
changeset
|
102 (let* ((version-components (append (split-string version "\\.") |
ffd4e3fb1637
(set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents:
64079
diff
changeset
|
103 '("0" "0"))) |
ffd4e3fb1637
(set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents:
64079
diff
changeset
|
104 (comma-version |
ffd4e3fb1637
(set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents:
64079
diff
changeset
|
105 (concat (car version-components) "," |
ffd4e3fb1637
(set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents:
64079
diff
changeset
|
106 (cadr version-components) "," |
73372
726551ae0c3e
(set-version): Set version numbers in "mac" subdirectory.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents:
65774
diff
changeset
|
107 (cadr (cdr version-components)) "," |
65774
ffd4e3fb1637
(set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents:
64079
diff
changeset
|
108 (cadr (cdr (cdr version-components))))) |
ffd4e3fb1637
(set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents:
64079
diff
changeset
|
109 (comma-space-version |
ffd4e3fb1637
(set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents:
64079
diff
changeset
|
110 (concat (car version-components) ", " |
ffd4e3fb1637
(set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents:
64079
diff
changeset
|
111 (cadr version-components) ", " |
73372
726551ae0c3e
(set-version): Set version numbers in "mac" subdirectory.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents:
65774
diff
changeset
|
112 (cadr (cdr version-components)) ", " |
65774
ffd4e3fb1637
(set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents:
64079
diff
changeset
|
113 (cadr (cdr (cdr version-components)))))) |
ffd4e3fb1637
(set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents:
64079
diff
changeset
|
114 (set-version-in-file root "nt/emacs.rc" comma-version |
ffd4e3fb1637
(set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents:
64079
diff
changeset
|
115 (rx (and "FILEVERSION" (1+ space) |
ffd4e3fb1637
(set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents:
64079
diff
changeset
|
116 (submatch (1+ (in "0-9,")))))) |
ffd4e3fb1637
(set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents:
64079
diff
changeset
|
117 (set-version-in-file root "nt/emacs.rc" comma-version |
ffd4e3fb1637
(set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents:
64079
diff
changeset
|
118 (rx (and "PRODUCTVERSION" (1+ space) |
ffd4e3fb1637
(set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents:
64079
diff
changeset
|
119 (submatch (1+ (in "0-9,")))))) |
ffd4e3fb1637
(set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents:
64079
diff
changeset
|
120 (set-version-in-file root "nt/emacs.rc" comma-space-version |
ffd4e3fb1637
(set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents:
64079
diff
changeset
|
121 (rx (and "\"FileVersion\"" (0+ space) ?, (0+ space) |
ffd4e3fb1637
(set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents:
64079
diff
changeset
|
122 ?\" (submatch (1+ (in "0-9, "))) "\\0\""))) |
ffd4e3fb1637
(set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents:
64079
diff
changeset
|
123 (set-version-in-file root "nt/emacs.rc" comma-space-version |
ffd4e3fb1637
(set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents:
64079
diff
changeset
|
124 (rx (and "\"ProductVersion\"" (0+ space) ?, |
ffd4e3fb1637
(set-version): Set version numbers in nt/emacs.rc.
Jason Rumney <jasonr@gnu.org>
parents:
64079
diff
changeset
|
125 (0+ space) ?\" (submatch (1+ (in "0-9, "))) |
73372
726551ae0c3e
(set-version): Set version numbers in "mac" subdirectory.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents:
65774
diff
changeset
|
126 "\\0\""))) |
80731
0b6e7c19f082
(set-version): Set version in nt/emacsclient.rc
Jason Rumney <jasonr@gnu.org>
parents:
79744
diff
changeset
|
127 ;; Likewise for emacsclient.rc |
0b6e7c19f082
(set-version): Set version in nt/emacsclient.rc
Jason Rumney <jasonr@gnu.org>
parents:
79744
diff
changeset
|
128 (set-version-in-file root "nt/emacsclient.rc" comma-version |
0b6e7c19f082
(set-version): Set version in nt/emacsclient.rc
Jason Rumney <jasonr@gnu.org>
parents:
79744
diff
changeset
|
129 (rx (and "FILEVERSION" (1+ space) |
0b6e7c19f082
(set-version): Set version in nt/emacsclient.rc
Jason Rumney <jasonr@gnu.org>
parents:
79744
diff
changeset
|
130 (submatch (1+ (in "0-9,")))))) |
0b6e7c19f082
(set-version): Set version in nt/emacsclient.rc
Jason Rumney <jasonr@gnu.org>
parents:
79744
diff
changeset
|
131 (set-version-in-file root "nt/emacsclient.rc" comma-version |
0b6e7c19f082
(set-version): Set version in nt/emacsclient.rc
Jason Rumney <jasonr@gnu.org>
parents:
79744
diff
changeset
|
132 (rx (and "PRODUCTVERSION" (1+ space) |
0b6e7c19f082
(set-version): Set version in nt/emacsclient.rc
Jason Rumney <jasonr@gnu.org>
parents:
79744
diff
changeset
|
133 (submatch (1+ (in "0-9,")))))) |
0b6e7c19f082
(set-version): Set version in nt/emacsclient.rc
Jason Rumney <jasonr@gnu.org>
parents:
79744
diff
changeset
|
134 (set-version-in-file root "nt/emacsclient.rc" comma-space-version |
0b6e7c19f082
(set-version): Set version in nt/emacsclient.rc
Jason Rumney <jasonr@gnu.org>
parents:
79744
diff
changeset
|
135 (rx (and "\"FileVersion\"" (0+ space) ?, (0+ space) |
0b6e7c19f082
(set-version): Set version in nt/emacsclient.rc
Jason Rumney <jasonr@gnu.org>
parents:
79744
diff
changeset
|
136 ?\" (submatch (1+ (in "0-9, "))) "\\0\""))) |
0b6e7c19f082
(set-version): Set version in nt/emacsclient.rc
Jason Rumney <jasonr@gnu.org>
parents:
79744
diff
changeset
|
137 (set-version-in-file root "nt/emacsclient.rc" comma-space-version |
0b6e7c19f082
(set-version): Set version in nt/emacsclient.rc
Jason Rumney <jasonr@gnu.org>
parents:
79744
diff
changeset
|
138 (rx (and "\"ProductVersion\"" (0+ space) ?, |
0b6e7c19f082
(set-version): Set version in nt/emacsclient.rc
Jason Rumney <jasonr@gnu.org>
parents:
79744
diff
changeset
|
139 (0+ space) ?\" (submatch (1+ (in "0-9, "))) |
97043
9592c50233ab
Remove support for Mac Carbon.
Dan Nicolaescu <dann@ics.uci.edu>
parents:
96690
diff
changeset
|
140 "\\0\"")))) |
96686
78f1f6985e22
(set-version, set-copyright): Add nextstep/ files.
Glenn Morris <rgm@gnu.org>
parents:
95992
diff
changeset
|
141 ;; nextstep. |
78f1f6985e22
(set-version, set-copyright): Add nextstep/ files.
Glenn Morris <rgm@gnu.org>
parents:
95992
diff
changeset
|
142 (set-version-in-file |
78f1f6985e22
(set-version, set-copyright): Add nextstep/ files.
Glenn Morris <rgm@gnu.org>
parents:
95992
diff
changeset
|
143 root "nextstep/Cocoa/Emacs.base/Contents/Info.plist" |
78f1f6985e22
(set-version, set-copyright): Add nextstep/ files.
Glenn Morris <rgm@gnu.org>
parents:
95992
diff
changeset
|
144 version (rx (and "CFBundleGetInfoString" (1+ anything) "Emacs" (1+ space) |
78f1f6985e22
(set-version, set-copyright): Add nextstep/ files.
Glenn Morris <rgm@gnu.org>
parents:
95992
diff
changeset
|
145 (submatch (1+ (in "0-9.")))))) |
78f1f6985e22
(set-version, set-copyright): Add nextstep/ files.
Glenn Morris <rgm@gnu.org>
parents:
95992
diff
changeset
|
146 (set-version-in-file |
78f1f6985e22
(set-version, set-copyright): Add nextstep/ files.
Glenn Morris <rgm@gnu.org>
parents:
95992
diff
changeset
|
147 root "nextstep/Cocoa/Emacs.base/Contents/Info.plist" |
99066
5f5e406e8a00
(set-version): Add doc/misc/ns-emacs.texi.
Glenn Morris <rgm@gnu.org>
parents:
97535
diff
changeset
|
148 version (rx (and "CFBundleShortVersionString" (1+ not-newline) ?\n |
5f5e406e8a00
(set-version): Add doc/misc/ns-emacs.texi.
Glenn Morris <rgm@gnu.org>
parents:
97535
diff
changeset
|
149 (0+ not-newline) "<string>" (0+ space) |
96686
78f1f6985e22
(set-version, set-copyright): Add nextstep/ files.
Glenn Morris <rgm@gnu.org>
parents:
95992
diff
changeset
|
150 (submatch (1+ (in "0-9.")))))) |
78f1f6985e22
(set-version, set-copyright): Add nextstep/ files.
Glenn Morris <rgm@gnu.org>
parents:
95992
diff
changeset
|
151 (set-version-in-file |
78f1f6985e22
(set-version, set-copyright): Add nextstep/ files.
Glenn Morris <rgm@gnu.org>
parents:
95992
diff
changeset
|
152 root "nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings" |
78f1f6985e22
(set-version, set-copyright): Add nextstep/ files.
Glenn Morris <rgm@gnu.org>
parents:
95992
diff
changeset
|
153 version (rx (and "CFBundleShortVersionString" (0+ space) ?= (0+ space) |
78f1f6985e22
(set-version, set-copyright): Add nextstep/ files.
Glenn Morris <rgm@gnu.org>
parents:
95992
diff
changeset
|
154 ?\" (0+ space) "Version" (1+ space) |
78f1f6985e22
(set-version, set-copyright): Add nextstep/ files.
Glenn Morris <rgm@gnu.org>
parents:
95992
diff
changeset
|
155 (submatch (1+ (in "0-9.")))))) |
78f1f6985e22
(set-version, set-copyright): Add nextstep/ files.
Glenn Morris <rgm@gnu.org>
parents:
95992
diff
changeset
|
156 (set-version-in-file |
78f1f6985e22
(set-version, set-copyright): Add nextstep/ files.
Glenn Morris <rgm@gnu.org>
parents:
95992
diff
changeset
|
157 root "nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings" |
78f1f6985e22
(set-version, set-copyright): Add nextstep/ files.
Glenn Morris <rgm@gnu.org>
parents:
95992
diff
changeset
|
158 version (rx (and "CFBundleGetInfoString" (0+ space) ?= (0+ space) |
78f1f6985e22
(set-version, set-copyright): Add nextstep/ files.
Glenn Morris <rgm@gnu.org>
parents:
95992
diff
changeset
|
159 ?\" (0+ space) "Emacs version" (1+ space) |
78f1f6985e22
(set-version, set-copyright): Add nextstep/ files.
Glenn Morris <rgm@gnu.org>
parents:
95992
diff
changeset
|
160 (submatch (1+ (in "0-9.")))))) |
78f1f6985e22
(set-version, set-copyright): Add nextstep/ files.
Glenn Morris <rgm@gnu.org>
parents:
95992
diff
changeset
|
161 (set-version-in-file |
78f1f6985e22
(set-version, set-copyright): Add nextstep/ files.
Glenn Morris <rgm@gnu.org>
parents:
95992
diff
changeset
|
162 root "nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist" |
99066
5f5e406e8a00
(set-version): Add doc/misc/ns-emacs.texi.
Glenn Morris <rgm@gnu.org>
parents:
97535
diff
changeset
|
163 version (rx (and "ApplicationRelease" (0+ space) ?= (0+ space) |
5f5e406e8a00
(set-version): Add doc/misc/ns-emacs.texi.
Glenn Morris <rgm@gnu.org>
parents:
97535
diff
changeset
|
164 ?\" (0+ space) (submatch (1+ (in "0-9.")))))) |
5f5e406e8a00
(set-version): Add doc/misc/ns-emacs.texi.
Glenn Morris <rgm@gnu.org>
parents:
97535
diff
changeset
|
165 (set-version-in-file |
5f5e406e8a00
(set-version): Add doc/misc/ns-emacs.texi.
Glenn Morris <rgm@gnu.org>
parents:
97535
diff
changeset
|
166 root "nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist" |
96686
78f1f6985e22
(set-version, set-copyright): Add nextstep/ files.
Glenn Morris <rgm@gnu.org>
parents:
95992
diff
changeset
|
167 version (rx (and "FullVersionID" (0+ space) ?= (0+ space) |
78f1f6985e22
(set-version, set-copyright): Add nextstep/ files.
Glenn Morris <rgm@gnu.org>
parents:
95992
diff
changeset
|
168 ?\" (0+ space) "Emacs" (1+ space) |
99066
5f5e406e8a00
(set-version): Add doc/misc/ns-emacs.texi.
Glenn Morris <rgm@gnu.org>
parents:
97535
diff
changeset
|
169 (submatch (1+ (in "0-9.")))))) |
5f5e406e8a00
(set-version): Add doc/misc/ns-emacs.texi.
Glenn Morris <rgm@gnu.org>
parents:
97535
diff
changeset
|
170 (set-version-in-file |
5f5e406e8a00
(set-version): Add doc/misc/ns-emacs.texi.
Glenn Morris <rgm@gnu.org>
parents:
97535
diff
changeset
|
171 root "nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop" |
5f5e406e8a00
(set-version): Add doc/misc/ns-emacs.texi.
Glenn Morris <rgm@gnu.org>
parents:
97535
diff
changeset
|
172 version (rx (and "Version=" (submatch (1+ (in "0-9."))))))) |
49298
bb7bf9ff7c97
(add-release-logs): Expand the directory name before calling find(1).
Francesco Potortì <pot@gnu.org>
parents:
40161
diff
changeset
|
173 |
81229
fd5ff936aab8
(set-copyright): New function.
Glenn Morris <rgm@gnu.org>
parents:
75348
diff
changeset
|
174 ;; Note this makes some assumptions about form of short copyright. |
87632 | 175 ;; FIXME add the \year in the refcards/*.tex files. |
81229
fd5ff936aab8
(set-copyright): New function.
Glenn Morris <rgm@gnu.org>
parents:
75348
diff
changeset
|
176 (defun set-copyright (root copyright) |
fd5ff936aab8
(set-copyright): New function.
Glenn Morris <rgm@gnu.org>
parents:
75348
diff
changeset
|
177 "Set Emacs short copyright to COPYRIGHT in relevant files under ROOT. |
fd5ff936aab8
(set-copyright): New function.
Glenn Morris <rgm@gnu.org>
parents:
75348
diff
changeset
|
178 Root must be the root of an Emacs source tree." |
fd5ff936aab8
(set-copyright): New function.
Glenn Morris <rgm@gnu.org>
parents:
75348
diff
changeset
|
179 (interactive (list |
fd5ff936aab8
(set-copyright): New function.
Glenn Morris <rgm@gnu.org>
parents:
75348
diff
changeset
|
180 (read-directory-name "Emacs root directory: " nil nil t) |
fd5ff936aab8
(set-copyright): New function.
Glenn Morris <rgm@gnu.org>
parents:
75348
diff
changeset
|
181 (read-string |
fd5ff936aab8
(set-copyright): New function.
Glenn Morris <rgm@gnu.org>
parents:
75348
diff
changeset
|
182 "Short copyright string: " |
fd5ff936aab8
(set-copyright): New function.
Glenn Morris <rgm@gnu.org>
parents:
75348
diff
changeset
|
183 (format "Copyright (C) %s Free Software Foundation, Inc." |
fd5ff936aab8
(set-copyright): New function.
Glenn Morris <rgm@gnu.org>
parents:
75348
diff
changeset
|
184 (format-time-string "%Y"))))) |
fd5ff936aab8
(set-copyright): New function.
Glenn Morris <rgm@gnu.org>
parents:
75348
diff
changeset
|
185 (unless (file-exists-p (expand-file-name "src/emacs.c" root)) |
fd5ff936aab8
(set-copyright): New function.
Glenn Morris <rgm@gnu.org>
parents:
75348
diff
changeset
|
186 (error "%s doesn't seem to be the root of an Emacs source tree" root)) |
fd5ff936aab8
(set-copyright): New function.
Glenn Morris <rgm@gnu.org>
parents:
75348
diff
changeset
|
187 (set-version-in-file root "lisp/version.el" copyright |
fd5ff936aab8
(set-copyright): New function.
Glenn Morris <rgm@gnu.org>
parents:
75348
diff
changeset
|
188 (rx (and "emacs-copyright" (0+ space) |
fd5ff936aab8
(set-copyright): New function.
Glenn Morris <rgm@gnu.org>
parents:
75348
diff
changeset
|
189 ?\" (submatch (1+ (not (in ?\")))) ?\"))) |
87553
a2a4811dccdc
(set-copyright): Add lib-src/ebrowse.c.
Glenn Morris <rgm@gnu.org>
parents:
87055
diff
changeset
|
190 (set-version-in-file root "lib-src/ebrowse.c" copyright |
a2a4811dccdc
(set-copyright): Add lib-src/ebrowse.c.
Glenn Morris <rgm@gnu.org>
parents:
87055
diff
changeset
|
191 (rx (and "emacs_copyright" (0+ (not (in ?\"))) |
a2a4811dccdc
(set-copyright): Add lib-src/ebrowse.c.
Glenn Morris <rgm@gnu.org>
parents:
87055
diff
changeset
|
192 ?\" (submatch (1+ (not (in ?\")))) ?\"))) |
81229
fd5ff936aab8
(set-copyright): New function.
Glenn Morris <rgm@gnu.org>
parents:
75348
diff
changeset
|
193 (set-version-in-file root "lib-src/etags.c" copyright |
fd5ff936aab8
(set-copyright): New function.
Glenn Morris <rgm@gnu.org>
parents:
75348
diff
changeset
|
194 (rx (and "emacs_copyright" (0+ (not (in ?\"))) |
fd5ff936aab8
(set-copyright): New function.
Glenn Morris <rgm@gnu.org>
parents:
75348
diff
changeset
|
195 ?\" (submatch (1+ (not (in ?\")))) ?\"))) |
fd5ff936aab8
(set-copyright): New function.
Glenn Morris <rgm@gnu.org>
parents:
75348
diff
changeset
|
196 (set-version-in-file root "lib-src/rcs2log" copyright |
fd5ff936aab8
(set-copyright): New function.
Glenn Morris <rgm@gnu.org>
parents:
75348
diff
changeset
|
197 (rx (and "Copyright" (0+ space) ?= (0+ space) |
fd5ff936aab8
(set-copyright): New function.
Glenn Morris <rgm@gnu.org>
parents:
75348
diff
changeset
|
198 ?\' (submatch (1+ nonl))))) |
fd5ff936aab8
(set-copyright): New function.
Glenn Morris <rgm@gnu.org>
parents:
75348
diff
changeset
|
199 ;; This one is a nuisance, as it needs to be split over two lines. |
fd5ff936aab8
(set-copyright): New function.
Glenn Morris <rgm@gnu.org>
parents:
75348
diff
changeset
|
200 (string-match "\\(.*[0-9]\\{4\\} *\\)\\(.*\\)" copyright) |
96686
78f1f6985e22
(set-version, set-copyright): Add nextstep/ files.
Glenn Morris <rgm@gnu.org>
parents:
95992
diff
changeset
|
201 ;; nextstep. |
78f1f6985e22
(set-version, set-copyright): Add nextstep/ files.
Glenn Morris <rgm@gnu.org>
parents:
95992
diff
changeset
|
202 (set-version-in-file |
78f1f6985e22
(set-version, set-copyright): Add nextstep/ files.
Glenn Morris <rgm@gnu.org>
parents:
95992
diff
changeset
|
203 root "nextstep/Cocoa/Emacs.base/Contents/Info.plist" |
78f1f6985e22
(set-version, set-copyright): Add nextstep/ files.
Glenn Morris <rgm@gnu.org>
parents:
95992
diff
changeset
|
204 copyright (rx (and "CFBundleGetInfoString" (1+ anything) "Emacs" (1+ space) |
78f1f6985e22
(set-version, set-copyright): Add nextstep/ files.
Glenn Morris <rgm@gnu.org>
parents:
95992
diff
changeset
|
205 (1+ (in "0-9.")) (1+ space) |
78f1f6985e22
(set-version, set-copyright): Add nextstep/ files.
Glenn Morris <rgm@gnu.org>
parents:
95992
diff
changeset
|
206 (submatch (1+ (not (in ?\<))))))) |
78f1f6985e22
(set-version, set-copyright): Add nextstep/ files.
Glenn Morris <rgm@gnu.org>
parents:
95992
diff
changeset
|
207 (set-version-in-file |
78f1f6985e22
(set-version, set-copyright): Add nextstep/ files.
Glenn Morris <rgm@gnu.org>
parents:
95992
diff
changeset
|
208 root "nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings" |
78f1f6985e22
(set-version, set-copyright): Add nextstep/ files.
Glenn Morris <rgm@gnu.org>
parents:
95992
diff
changeset
|
209 copyright (rx (and "NSHumanReadableCopyright" (0+ space) ?\= (0+ space) |
96690
53126b877e24
(set-copyright): Add nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist.
Glenn Morris <rgm@gnu.org>
parents:
96686
diff
changeset
|
210 ?\" (submatch (1+ (not (in ?\"))))))) |
53126b877e24
(set-copyright): Add nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist.
Glenn Morris <rgm@gnu.org>
parents:
96686
diff
changeset
|
211 (set-version-in-file |
53126b877e24
(set-copyright): Add nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist.
Glenn Morris <rgm@gnu.org>
parents:
96686
diff
changeset
|
212 root "nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist" |
53126b877e24
(set-copyright): Add nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist.
Glenn Morris <rgm@gnu.org>
parents:
96686
diff
changeset
|
213 copyright (rx (and "Copyright" (0+ space) ?\= (0+ space) |
53126b877e24
(set-copyright): Add nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist.
Glenn Morris <rgm@gnu.org>
parents:
96686
diff
changeset
|
214 ?\" (submatch (1+ (not (in ?\")))))))) |
81229
fd5ff936aab8
(set-copyright): New function.
Glenn Morris <rgm@gnu.org>
parents:
75348
diff
changeset
|
215 |
82926 | 216 (provide 'admin) |
217 | |
96686
78f1f6985e22
(set-version, set-copyright): Add nextstep/ files.
Glenn Morris <rgm@gnu.org>
parents:
95992
diff
changeset
|
218 ;; arch-tag: 4ea83636-2293-408b-884e-ad64f22a3bf5 |
78f1f6985e22
(set-version, set-copyright): Add nextstep/ files.
Glenn Morris <rgm@gnu.org>
parents:
95992
diff
changeset
|
219 ;;; admin.el ends here |