aboutsummaryrefslogtreecommitdiffstats
path: root/admin/admin.el
diff options
context:
space:
mode:
Diffstat (limited to 'admin/admin.el')
-rw-r--r--admin/admin.el35
1 files changed, 21 insertions, 14 deletions
diff --git a/admin/admin.el b/admin/admin.el
index 7cd2c02fb58..9f87e9b2590 100644
--- a/admin/admin.el
+++ b/admin/admin.el
@@ -1,7 +1,6 @@
1;;; admin.el --- utilities for Emacs administration 1;;; admin.el --- utilities for Emacs administration
2 2
3;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 3;; Copyright (C) 2001-2011 Free Software Foundation, Inc.
4;; 2010 Free Software Foundation, Inc.
5 4
6;; This file is part of GNU Emacs. 5;; This file is part of GNU Emacs.
7 6
@@ -60,9 +59,6 @@ Root must be the root of an Emacs source tree."
60 (interactive "DEmacs root directory: \nsVersion number: ") 59 (interactive "DEmacs root directory: \nsVersion number: ")
61 (unless (file-exists-p (expand-file-name "src/emacs.c" root)) 60 (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)) 61 (error "%s doesn't seem to be the root of an Emacs source tree" root))
63 (set-version-in-file root "src/emacs.c" version
64 (rx (and "emacs_version" (0+ (not (in ?\")))
65 ?\" (submatch (1+ (not (in ?\")))) ?\")))
66 (set-version-in-file root "README" version 62 (set-version-in-file root "README" version
67 (rx (and "version" (1+ space) 63 (rx (and "version" (1+ space)
68 (submatch (1+ (in "0-9.")))))) 64 (submatch (1+ (in "0-9."))))))
@@ -77,8 +73,9 @@ Root must be the root of an Emacs source tree."
77 (rx (and ".TH EMACS" (1+ not-newline) 73 (rx (and ".TH EMACS" (1+ not-newline)
78 "GNU Emacs" (1+ space) 74 "GNU Emacs" (1+ space)
79 (submatch (1+ (in "0-9.")))))) 75 (submatch (1+ (in "0-9."))))))
80 (set-version-in-file root "lib-src/makefile.w32-in" version 76 (set-version-in-file root "nt/config.nt" version
81 (rx (and "VERSION" (0+ space) "=" (0+ space) 77 (rx (and bol "#" (0+ blank) "define" (1+ blank)
78 "VERSION" (1+ blank)
82 (submatch (1+ (in "0-9.")))))) 79 (submatch (1+ (in "0-9."))))))
83 (set-version-in-file root "nt/makefile.w32-in" version 80 (set-version-in-file root "nt/makefile.w32-in" version
84 (rx (and "VERSION" (0+ space) "=" (0+ space) 81 (rx (and "VERSION" (0+ space) "=" (0+ space)
@@ -160,7 +157,6 @@ Root must be the root of an Emacs source tree."
160 version (rx (and "Version=" (submatch (1+ (in "0-9."))))))) 157 version (rx (and "Version=" (submatch (1+ (in "0-9.")))))))
161 158
162;; Note this makes some assumptions about form of short copyright. 159;; Note this makes some assumptions about form of short copyright.
163;; FIXME add the \year in the refcards/*.tex files.
164(defun set-copyright (root copyright) 160(defun set-copyright (root copyright)
165 "Set Emacs short copyright to COPYRIGHT in relevant files under ROOT. 161 "Set Emacs short copyright to COPYRIGHT in relevant files under ROOT.
166Root must be the root of an Emacs source tree." 162Root must be the root of an Emacs source tree."
@@ -174,16 +170,16 @@ Root must be the root of an Emacs source tree."
174 (error "%s doesn't seem to be the root of an Emacs source tree" root)) 170 (error "%s doesn't seem to be the root of an Emacs source tree" root))
175 (set-version-in-file root "src/emacs.c" copyright 171 (set-version-in-file root "src/emacs.c" copyright
176 (rx (and "emacs_copyright" (0+ (not (in ?\"))) 172 (rx (and "emacs_copyright" (0+ (not (in ?\")))
177 ?\" (submatch (1+ (not (in ?\")))) ?\"))) 173 ?\" (submatch (1+ (not (in ?\")))) ?\")))
178 (set-version-in-file root "lib-src/ebrowse.c" copyright 174 (set-version-in-file root "lib-src/ebrowse.c" copyright
179 (rx (and "emacs_copyright" (0+ (not (in ?\"))) 175 (rx (and "emacs_copyright" (0+ (not (in ?\")))
180 ?\" (submatch (1+ (not (in ?\")))) ?\"))) 176 ?\" (submatch (1+ (not (in ?\")))) ?\")))
181 (set-version-in-file root "lib-src/etags.c" copyright 177 (set-version-in-file root "lib-src/etags.c" copyright
182 (rx (and "emacs_copyright" (0+ (not (in ?\"))) 178 (rx (and "emacs_copyright" (0+ (not (in ?\")))
183 ?\" (submatch (1+ (not (in ?\")))) ?\"))) 179 ?\" (submatch (1+ (not (in ?\")))) ?\")))
184 (set-version-in-file root "lib-src/rcs2log" copyright 180 (set-version-in-file root "lib-src/rcs2log" copyright
185 (rx (and "Copyright" (0+ space) ?= (0+ space) 181 (rx (and "Copyright" (0+ space) ?= (0+ space)
186 ?\' (submatch (1+ nonl))))) 182 ?\' (submatch (1+ nonl)))))
187 ;; This one is a nuisance, as it needs to be split over two lines. 183 ;; This one is a nuisance, as it needs to be split over two lines.
188 (string-match "\\(.*[0-9]\\{4\\} *\\)\\(.*\\)" copyright) 184 (string-match "\\(.*[0-9]\\{4\\} *\\)\\(.*\\)" copyright)
189 ;; nextstep. 185 ;; nextstep.
@@ -199,7 +195,18 @@ Root must be the root of an Emacs source tree."
199 (set-version-in-file 195 (set-version-in-file
200 root "nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist" 196 root "nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist"
201 copyright (rx (and "Copyright" (0+ space) ?\= (0+ space) 197 copyright (rx (and "Copyright" (0+ space) ?\= (0+ space)
202 ?\" (submatch (1+ (not (in ?\")))))))) 198 ?\" (submatch (1+ (not (in ?\")))))))
199 (when (string-match "\\([0-9]\\{4\\}\\)" copyright)
200 (setq copyright (match-string 1 copyright))
201 (dolist (file (directory-files (expand-file-name "etc/refcards" root)
202 t "\\.tex\\'"))
203 (unless (string-match "gnus-refcard\\.tex" file)
204 (set-version-in-file
205 root file copyright
206 (concat (if (string-match "ru-refcard\\.tex" file)
207 "\\\\newcommand{\\\\cyear}\\[0\\]{"
208 "\\\\def\\\\year{")
209 "\\([0-9]\\{4\\}\\)}.+%.+copyright year"))))))
203 210
204(provide 'admin) 211(provide 'admin)
205 212