diff options
Diffstat (limited to 'admin/admin.el')
| -rw-r--r-- | admin/admin.el | 96 |
1 files changed, 27 insertions, 69 deletions
diff --git a/admin/admin.el b/admin/admin.el index 6d729214bd0..862e5aed6c1 100644 --- a/admin/admin.el +++ b/admin/admin.el | |||
| @@ -26,6 +26,8 @@ | |||
| 26 | 26 | ||
| 27 | ;;; Code: | 27 | ;;; Code: |
| 28 | 28 | ||
| 29 | (defvar add-log-time-format) ; in add-log | ||
| 30 | |||
| 29 | (defun add-release-logs (root version) | 31 | (defun add-release-logs (root version) |
| 30 | "Add \"Version VERSION released.\" change log entries in ROOT. | 32 | "Add \"Version VERSION released.\" change log entries in ROOT. |
| 31 | Root must be the root of an Emacs source tree." | 33 | Root must be the root of an Emacs source tree." |
| @@ -126,39 +128,16 @@ Root must be the root of an Emacs source tree." | |||
| 126 | (set-version-in-file root "nt/emacsclient.rc" comma-space-version | 128 | (set-version-in-file root "nt/emacsclient.rc" comma-space-version |
| 127 | (rx (and "\"ProductVersion\"" (0+ space) ?, | 129 | (rx (and "\"ProductVersion\"" (0+ space) ?, |
| 128 | (0+ space) ?\" (submatch (1+ (in "0-9, "))) | 130 | (0+ space) ?\" (submatch (1+ (in "0-9, "))) |
| 129 | "\\0\"")))) | 131 | "\\0\""))) |
| 130 | ;; nextstep. | 132 | (when (string-match "\\([0-9]\\{2,\\}\\)" version) |
| 131 | (set-version-in-file | 133 | (setq version (match-string 1 version)) |
| 132 | root "nextstep/Cocoa/Emacs.base/Contents/Info.plist" | 134 | (set-version-in-file root "etc/refcards/ru-refcard.tex" version |
| 133 | version (rx (and "CFBundleGetInfoString" (1+ anything) "Emacs" (1+ space) | 135 | "\\\\newcommand{\\\\versionemacs}\\[0\\]\ |
| 134 | (submatch (1+ (in "0-9.")))))) | 136 | {\\([0-9]\\{2,\\}\\)}.+%.+version of Emacs") |
| 135 | (set-version-in-file | 137 | (set-version-in-file root "etc/refcards/emacsver.tex" version |
| 136 | root "nextstep/Cocoa/Emacs.base/Contents/Info.plist" | 138 | "\\\\def\\\\versionemacs\ |
| 137 | version (rx (and "CFBundleShortVersionString" (1+ not-newline) ?\n | 139 | {\\([0-9]\\{2,\\}\\)}.+%.+version of Emacs")))) |
| 138 | (0+ not-newline) "<string>" (0+ space) | 140 | |
| 139 | (submatch (1+ (in "0-9.")))))) | ||
| 140 | (set-version-in-file | ||
| 141 | root "nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings" | ||
| 142 | version (rx (and "CFBundleShortVersionString" (0+ space) ?= (0+ space) | ||
| 143 | ?\" (0+ space) "Version" (1+ space) | ||
| 144 | (submatch (1+ (in "0-9.")))))) | ||
| 145 | (set-version-in-file | ||
| 146 | root "nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings" | ||
| 147 | version (rx (and "CFBundleGetInfoString" (0+ space) ?= (0+ space) | ||
| 148 | ?\" (0+ space) "Emacs version" (1+ space) | ||
| 149 | (submatch (1+ (in "0-9.")))))) | ||
| 150 | (set-version-in-file | ||
| 151 | root "nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist" | ||
| 152 | version (rx (and "ApplicationRelease" (0+ space) ?= (0+ space) | ||
| 153 | ?\" (0+ space) (submatch (1+ (in "0-9.")))))) | ||
| 154 | (set-version-in-file | ||
| 155 | root "nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist" | ||
| 156 | version (rx (and "FullVersionID" (0+ space) ?= (0+ space) | ||
| 157 | ?\" (0+ space) "Emacs" (1+ space) | ||
| 158 | (submatch (1+ (in "0-9.")))))) | ||
| 159 | (set-version-in-file | ||
| 160 | root "nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop" | ||
| 161 | version (rx (and "Version=" (submatch (1+ (in "0-9."))))))) | ||
| 162 | 141 | ||
| 163 | ;; Note this makes some assumptions about form of short copyright. | 142 | ;; Note this makes some assumptions about form of short copyright. |
| 164 | (defun set-copyright (root copyright) | 143 | (defun set-copyright (root copyright) |
| @@ -172,45 +151,24 @@ Root must be the root of an Emacs source tree." | |||
| 172 | (format-time-string "%Y"))))) | 151 | (format-time-string "%Y"))))) |
| 173 | (unless (file-exists-p (expand-file-name "src/emacs.c" root)) | 152 | (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)) | 153 | (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 | 154 | (set-version-in-file root "configure.ac" copyright |
| 176 | (rx (and "emacs_copyright" (0+ (not (in ?\"))) | 155 | (rx (and bol "copyright" (0+ (not (in ?\"))) |
| 177 | ?\" (submatch (1+ (not (in ?\")))) ?\"))) | ||
| 178 | (set-version-in-file root "lib-src/ebrowse.c" copyright | ||
| 179 | (rx (and "emacs_copyright" (0+ (not (in ?\"))) | ||
| 180 | ?\" (submatch (1+ (not (in ?\")))) ?\"))) | ||
| 181 | (set-version-in-file root "lib-src/etags.c" copyright | ||
| 182 | (rx (and "emacs_copyright" (0+ (not (in ?\"))) | ||
| 183 | ?\" (submatch (1+ (not (in ?\")))) ?\"))) | 156 | ?\" (submatch (1+ (not (in ?\")))) ?\"))) |
| 157 | (set-version-in-file root "nt/config.nt" copyright | ||
| 158 | (rx (and bol "#" (0+ blank) "define" (1+ blank) | ||
| 159 | "COPYRIGHT" (1+ blank) | ||
| 160 | ?\" (submatch (1+ (not (in ?\")))) ?\"))) | ||
| 184 | (set-version-in-file root "lib-src/rcs2log" copyright | 161 | (set-version-in-file root "lib-src/rcs2log" copyright |
| 185 | (rx (and "Copyright" (0+ space) ?= (0+ space) | 162 | (rx (and "Copyright" (0+ space) ?= (0+ space) |
| 186 | ?\' (submatch (1+ nonl))))) | 163 | ?\' (submatch (1+ nonl))))) |
| 187 | ;; This one is a nuisance, as it needs to be split over two lines. | ||
| 188 | (string-match "\\(.*[0-9]\\{4\\} *\\)\\(.*\\)" copyright) | ||
| 189 | ;; nextstep. | ||
| 190 | (set-version-in-file | ||
| 191 | root "nextstep/Cocoa/Emacs.base/Contents/Info.plist" | ||
| 192 | copyright (rx (and "CFBundleGetInfoString" (1+ anything) "Emacs" (1+ space) | ||
| 193 | (1+ (in "0-9.")) (1+ space) | ||
| 194 | (submatch (1+ (not (in ?\<))))))) | ||
| 195 | (set-version-in-file | ||
| 196 | root "nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings" | ||
| 197 | copyright (rx (and "NSHumanReadableCopyright" (0+ space) ?\= (0+ space) | ||
| 198 | ?\" (submatch (1+ (not (in ?\"))))))) | ||
| 199 | (set-version-in-file | ||
| 200 | root "nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist" | ||
| 201 | copyright (rx (and "Copyright" (0+ space) ?\= (0+ space) | ||
| 202 | ?\" (submatch (1+ (not (in ?\"))))))) | ||
| 203 | (when (string-match "\\([0-9]\\{4\\}\\)" copyright) | 164 | (when (string-match "\\([0-9]\\{4\\}\\)" copyright) |
| 204 | (setq copyright (match-string 1 copyright)) | 165 | (setq copyright (match-string 1 copyright)) |
| 205 | (dolist (file (directory-files (expand-file-name "etc/refcards" root) | 166 | (set-version-in-file root "etc/refcards/ru-refcard.tex" copyright |
| 206 | t "\\.tex\\'")) | 167 | "\\\\newcommand{\\\\cyear}\\[0\\]\ |
| 207 | (unless (string-match "gnus-refcard\\.tex" file) | 168 | {\\([0-9]\\{4\\}\\)}.+%.+copyright year") |
| 208 | (set-version-in-file | 169 | (set-version-in-file root "etc/refcards/emacsver.tex" copyright |
| 209 | root file copyright | 170 | "\\\\def\\\\year\ |
| 210 | (concat (if (string-match "ru-refcard\\.tex" file) | 171 | {\\([0-9]\\{4\\}\\)}.+%.+copyright year"))) |
| 211 | "\\\\newcommand{\\\\cyear}\\[0\\]{" | ||
| 212 | "\\\\def\\\\year{") | ||
| 213 | "\\([0-9]\\{4\\}\\)}.+%.+copyright year")))))) | ||
| 214 | 172 | ||
| 215 | ;;; Various bits of magic for generating the web manuals | 173 | ;;; Various bits of magic for generating the web manuals |
| 216 | 174 | ||
| @@ -459,7 +417,7 @@ Also generate PostScript output in PS-DEST." | |||
| 459 | (setq done t)) | 417 | (setq done t)) |
| 460 | (t | 418 | (t |
| 461 | (if (eobp) | 419 | (if (eobp) |
| 462 | (error "Parse error in %s" f)) | 420 | (error "Parse error in %s" f)) ; f is bound in manual-html-node |
| 463 | (unless open-td | 421 | (unless open-td |
| 464 | (setq done t)))) | 422 | (setq done t)))) |
| 465 | (forward-line 1)))) | 423 | (forward-line 1)))) |
| @@ -491,7 +449,7 @@ If optional argument OLD is non-nil, also scan for defvars." | |||
| 491 | (let ((m (format "Scanning %s..." file)) | 449 | (let ((m (format "Scanning %s..." file)) |
| 492 | (re (format "^[ \t]*\\((def%s\\)[ \t\n]" | 450 | (re (format "^[ \t]*\\((def%s\\)[ \t\n]" |
| 493 | (if old "\\(?:custom\\|var\\)" "custom"))) | 451 | (if old "\\(?:custom\\|var\\)" "custom"))) |
| 494 | alist var ver) | 452 | alist var ver form) |
| 495 | (message "%s" m) | 453 | (message "%s" m) |
| 496 | (with-temp-buffer | 454 | (with-temp-buffer |
| 497 | (insert-file-contents file) | 455 | (insert-file-contents file) |
| @@ -550,7 +508,7 @@ changes (in a non-trivial way). This function does not check for that." | |||
| 550 | (mapcar | 508 | (mapcar |
| 551 | (lambda (file) | 509 | (lambda (file) |
| 552 | (cons file (cusver-scan file))) newfiles))) | 510 | (cons file (cusver-scan file))) newfiles))) |
| 553 | oldcus result thisfile) | 511 | oldcus result thisfile file) |
| 554 | (message "Reading old defcustoms...") | 512 | (message "Reading old defcustoms...") |
| 555 | (dolist (file oldfiles) | 513 | (dolist (file oldfiles) |
| 556 | (setq oldcus (append oldcus (cusver-scan file t)))) | 514 | (setq oldcus (append oldcus (cusver-scan file t)))) |