diff options
| author | Glenn Morris | 2011-01-02 16:35:01 -0800 |
|---|---|---|
| committer | Glenn Morris | 2011-01-02 16:35:01 -0800 |
| commit | 287d4c2ca317cf6427ddd9202c104c5be2f8a9af (patch) | |
| tree | c8c7170cc0c569ba3887a075b868e2953684ff79 /admin/admin.el | |
| parent | ca7e8408638af626cd0cd544ae0bfd2d1ad6399f (diff) | |
| download | emacs-287d4c2ca317cf6427ddd9202c104c5be2f8a9af.tar.gz emacs-287d4c2ca317cf6427ddd9202c104c5be2f8a9af.zip | |
* admin/admin.el (set-copyright): Also handle \year in refcards/*.tex.
Diffstat (limited to 'admin/admin.el')
| -rw-r--r-- | admin/admin.el | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/admin/admin.el b/admin/admin.el index a28dea71bd1..b792287596b 100644 --- a/admin/admin.el +++ b/admin/admin.el | |||
| @@ -1,7 +1,7 @@ | |||
| 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, 2010, 2011 | 3 | ;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, |
| 4 | ;; Free Software Foundation, Inc. | 4 | ;; 2010, 2011 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; This file is part of GNU Emacs. | 6 | ;; This file is part of GNU Emacs. |
| 7 | 7 | ||
| @@ -172,7 +172,6 @@ Root must be the root of an Emacs source tree." | |||
| 172 | version (rx (and "Version=" (submatch (1+ (in "0-9."))))))) | 172 | version (rx (and "Version=" (submatch (1+ (in "0-9."))))))) |
| 173 | 173 | ||
| 174 | ;; Note this makes some assumptions about form of short copyright. | 174 | ;; Note this makes some assumptions about form of short copyright. |
| 175 | ;; FIXME add the \year in the refcards/*.tex files. | ||
| 176 | (defun set-copyright (root copyright) | 175 | (defun set-copyright (root copyright) |
| 177 | "Set Emacs short copyright to COPYRIGHT in relevant files under ROOT. | 176 | "Set Emacs short copyright to COPYRIGHT in relevant files under ROOT. |
| 178 | Root must be the root of an Emacs source tree." | 177 | Root must be the root of an Emacs source tree." |
| @@ -185,17 +184,17 @@ Root must be the root of an Emacs source tree." | |||
| 185 | (unless (file-exists-p (expand-file-name "src/emacs.c" root)) | 184 | (unless (file-exists-p (expand-file-name "src/emacs.c" root)) |
| 186 | (error "%s doesn't seem to be the root of an Emacs source tree" root)) | 185 | (error "%s doesn't seem to be the root of an Emacs source tree" root)) |
| 187 | (set-version-in-file root "lisp/version.el" copyright | 186 | (set-version-in-file root "lisp/version.el" copyright |
| 188 | (rx (and "emacs-copyright" (0+ space) | 187 | (rx (and "emacs-copyright" (0+ space) |
| 189 | ?\" (submatch (1+ (not (in ?\")))) ?\"))) | 188 | ?\" (submatch (1+ (not (in ?\")))) ?\"))) |
| 190 | (set-version-in-file root "lib-src/ebrowse.c" copyright | 189 | (set-version-in-file root "lib-src/ebrowse.c" copyright |
| 191 | (rx (and "emacs_copyright" (0+ (not (in ?\"))) | 190 | (rx (and "emacs_copyright" (0+ (not (in ?\"))) |
| 192 | ?\" (submatch (1+ (not (in ?\")))) ?\"))) | 191 | ?\" (submatch (1+ (not (in ?\")))) ?\"))) |
| 193 | (set-version-in-file root "lib-src/etags.c" copyright | 192 | (set-version-in-file root "lib-src/etags.c" copyright |
| 194 | (rx (and "emacs_copyright" (0+ (not (in ?\"))) | 193 | (rx (and "emacs_copyright" (0+ (not (in ?\"))) |
| 195 | ?\" (submatch (1+ (not (in ?\")))) ?\"))) | 194 | ?\" (submatch (1+ (not (in ?\")))) ?\"))) |
| 196 | (set-version-in-file root "lib-src/rcs2log" copyright | 195 | (set-version-in-file root "lib-src/rcs2log" copyright |
| 197 | (rx (and "Copyright" (0+ space) ?= (0+ space) | 196 | (rx (and "Copyright" (0+ space) ?= (0+ space) |
| 198 | ?\' (submatch (1+ nonl))))) | 197 | ?\' (submatch (1+ nonl))))) |
| 199 | ;; This one is a nuisance, as it needs to be split over two lines. | 198 | ;; This one is a nuisance, as it needs to be split over two lines. |
| 200 | (string-match "\\(.*[0-9]\\{4\\} *\\)\\(.*\\)" copyright) | 199 | (string-match "\\(.*[0-9]\\{4\\} *\\)\\(.*\\)" copyright) |
| 201 | ;; nextstep. | 200 | ;; nextstep. |
| @@ -211,9 +210,19 @@ Root must be the root of an Emacs source tree." | |||
| 211 | (set-version-in-file | 210 | (set-version-in-file |
| 212 | root "nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist" | 211 | root "nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist" |
| 213 | copyright (rx (and "Copyright" (0+ space) ?\= (0+ space) | 212 | copyright (rx (and "Copyright" (0+ space) ?\= (0+ space) |
| 214 | ?\" (submatch (1+ (not (in ?\")))))))) | 213 | ?\" (submatch (1+ (not (in ?\"))))))) |
| 214 | (when (string-match "\\([0-9]\\{4\\}\\)" copyright) | ||
| 215 | (setq copyright (match-string 1 copyright)) | ||
| 216 | (dolist (file (directory-files (expand-file-name "etc/refcards" root) | ||
| 217 | t "\\.tex\\'")) | ||
| 218 | (unless (string-match "gnus-refcard\\.tex" file) | ||
| 219 | (set-version-in-file | ||
| 220 | root file copyright | ||
| 221 | (concat (if (string-match "ru-refcard\\.tex" file) | ||
| 222 | "\\\\newcommand{\\\\cyear}\\[0\\]{" | ||
| 223 | "\\\\def\\\\year{") | ||
| 224 | "\\([0-9]\\{4\\}\\)}.+%.+copyright year")))))) | ||
| 215 | 225 | ||
| 216 | (provide 'admin) | 226 | (provide 'admin) |
| 217 | 227 | ||
| 218 | ;; arch-tag: 4ea83636-2293-408b-884e-ad64f22a3bf5 | ||
| 219 | ;;; admin.el ends here | 228 | ;;; admin.el ends here |