aboutsummaryrefslogtreecommitdiffstats
path: root/admin/admin.el
diff options
context:
space:
mode:
authorMiles Bader2007-06-11 00:58:11 +0000
committerMiles Bader2007-06-11 00:58:11 +0000
commitfb9a13e3dca1685b81fcf4d345133fb34911594d (patch)
tree181797239f450c33ca8fd0d4d18686bbfc68859d /admin/admin.el
parent4d3e23e3e8273e820d69e0ecca0f409c4b9a179e (diff)
parent2d715b39ea1c89066f469405d065dd1a6631d28e (diff)
downloademacs-fb9a13e3dca1685b81fcf4d345133fb34911594d.tar.gz
emacs-fb9a13e3dca1685b81fcf4d345133fb34911594d.zip
Merge from emacs--devo--0
Patches applied: * emacs--devo--0 (patch 781-792) - Update from CVS - Merge from gnus--rel--5.10 - Merge from emacs--rel--22 * emacs--rel--22 (patch 33-41) * gnus--rel--5.10 (patch 226-228) - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-219
Diffstat (limited to 'admin/admin.el')
-rw-r--r--admin/admin.el47
1 files changed, 47 insertions, 0 deletions
diff --git a/admin/admin.el b/admin/admin.el
index 342b40f9bde..175eb6ded1b 100644
--- a/admin/admin.el
+++ b/admin/admin.el
@@ -24,6 +24,8 @@
24 24
25;; add-release-logs Add ``Version X released'' change log entries. 25;; add-release-logs Add ``Version X released'' change log entries.
26;; set-version Change Emacs version number in source tree. 26;; set-version Change Emacs version number in source tree.
27;; set-copyright Change emacs short copyright string (eg as
28;; printed by --version) in source tree.
27 29
28;;; Code: 30;;; Code:
29 31
@@ -158,5 +160,50 @@ Root must be the root of an Emacs source tree."
158 (rx (and (submatch (1+ (in "a-z"))) (0+ space) ?\, (0+ space) 160 (rx (and (submatch (1+ (in "a-z"))) (0+ space) ?\, (0+ space)
159 "/* development, alpha, beta, or final (release) */")))))) 161 "/* development, alpha, beta, or final (release) */"))))))
160 162
163;; Note this makes some assumptions about form of short copyright.
164(defun set-copyright (root copyright)
165 "Set Emacs short copyright to COPYRIGHT in relevant files under ROOT.
166Root must be the root of an Emacs source tree."
167 (interactive (list
168 (read-directory-name "Emacs root directory: " nil nil t)
169 (read-string
170 "Short copyright string: "
171 (format "Copyright (C) %s Free Software Foundation, Inc."
172 (format-time-string "%Y")))))
173 (unless (file-exists-p (expand-file-name "src/emacs.c" root))
174 (error "%s doesn't seem to be the root of an Emacs source tree" root))
175 (set-version-in-file root "lisp/version.el" copyright
176 (rx (and "emacs-copyright" (0+ space)
177 ?\" (submatch (1+ (not (in ?\")))) ?\")))
178 (set-version-in-file root "lib-src/etags.c" copyright
179 (rx (and "emacs_copyright" (0+ (not (in ?\")))
180 ?\" (submatch (1+ (not (in ?\")))) ?\")))
181 (set-version-in-file root "lib-src/rcs2log" copyright
182 (rx (and "Copyright" (0+ space) ?= (0+ space)
183 ?\' (submatch (1+ nonl)))))
184 (set-version-in-file
185 root "mac/Emacs.app/Contents/Resources/English.lproj/InfoPlist.strings"
186 copyright (rx (and "CFBundleGetInfoString" (0+ space) ?= (0+ space) ?\"
187 (1+ anything)
188 (submatch "Copyright" (1+ (not (in ?\")))))))
189 ;; This one is a nuisance, as it needs to be split over two lines.
190 (string-match "\\(.*[0-9]\\{4\\} *\\)\\(.*\\)" copyright)
191 (let ((csign "\\0xa9")
192 (cyear (match-string 1 copyright)) ; "Copyright (C) 2007 "
193 (owner (match-string 2 copyright))) ; "Free Software Foundation, Inc."
194 (set-version-in-file root "mac/src/Emacs.r"
195 (regexp-quote
196 (replace-regexp-in-string "(C)"
197 (regexp-quote csign) cyear))
198 (rx (and
199 (submatch "Copyright" (0+ space) (eval csign)
200 (0+ space) (= 4 num)
201 (0+ (not (in ?\")))) ?\")))
202 (set-version-in-file root "mac/src/Emacs.r" owner
203 (rx (and ?\"
204 (submatch (1+ (not (in ?\"))))
205 ?\" (0+ space)
206 "/* Long version number */")))))
207
161;;; arch-tag: 4ea83636-2293-408b-884e-ad64f22a3bf5 208;;; arch-tag: 4ea83636-2293-408b-884e-ad64f22a3bf5
162;; admin.el ends here. 209;; admin.el ends here.