Commit dcf8834b authored by Glenn Morris's avatar Glenn Morris

Reduce version number duplication in etc/refcards

* etc/refcards/emacsver.tex: New file.
* etc/refcards/calccard.tex, etc/refcards/cs-dired-ref.tex:
* etc/refcards/cs-refcard.tex, etc/refcards/cs-survival.tex:
* etc/refcards/de-refcard.tex, etc/refcards/dired-ref.tex:
* refcards/emacsver.tex, etc/refcards/fr-dired-ref.tex:
* etc/refcards/fr-refcard.tex, etc/refcards/fr-survival.tex:
* etc/refcards/orgcard.tex, etc/refcards/pl-refcard.tex:
* etc/refcards/pt-br-refcard.tex, etc/refcards/refcard.tex:
* etc/refcards/sk-dired-ref.tex, etc/refcards/sk-refcard.tex:
* etc/refcards/sk-survival.tex, etc/refcards/survival.tex:
* etc/refcards/vipcard.tex, etc/refcards/viperCard.tex: Include emacsver.tex.
* refcards/calccard.tex (\emacsversionnumber):
Rename to \versionemacs, same as all the other refcards.
* etc/refcards/Makefile (ENVADD): New variable.
(sk-dired-ref.pdf, sk-survival.pdf, pl-refcard.pdf)
(%.pdf, %,dvi, sk-dired-ref.dvi, sk-survival.dvi, pl-refcard.dvi):
Depend on emacsver.tex.  Add "." to TEXINPUTS for TeX commands.

* admin/admin.el (set-version): Set major version in
etc/refcards/ru-refcard.tex and etc/refcards/emacsver.tex.
(set-copyright): In etc/refcards, only change ru-refcard.tex
and emacsver.tex.

* admin.el (cusver-scan, cusver-check): Bind local variables.

* .bzrignore: Add etc/refcards TeX intermediate files.
parent 865fe16f
2012-09-17 Glenn Morris <rgm@gnu.org>
* admin.el (cusver-scan, cusver-check): Bind local variables.
* admin.el (set-version): Set major version in
etc/refcards/ru-refcard.tex and etc/refcards/emacsver.tex.
(set-copyright): In etc/refcards, only change ru-refcard.tex
and emacsver.tex.
* admin.el (set-copyright): No more need to set copyrights for
nextstep, or .c files. Add configure.ac and config.nt.
......
......@@ -126,7 +126,16 @@ Root must be the root of an Emacs source tree."
(set-version-in-file root "nt/emacsclient.rc" comma-space-version
(rx (and "\"ProductVersion\"" (0+ space) ?,
(0+ space) ?\" (submatch (1+ (in "0-9, ")))
"\\0\"")))))
"\\0\"")))
(when (string-match "\\([0-9]\\{2,\\}\\)" version)
(setq version (match-string 1 version))
(set-version-in-file root "etc/refcards/ru-refcard.tex" version
"\\\\newcommand{\\\\versionemacs}\\[0\\]\
{\\([0-9]\\{2,\\}\\)}.+%.+version of Emacs")
(set-version-in-file root "etc/refcards/emacsver.tex" version
"\\\\def\\\\versionemacs\
{\\([0-9]\\{2,\\}\\)}.+%.+version of Emacs"))))
;; Note this makes some assumptions about form of short copyright.
(defun set-copyright (root copyright)
......@@ -150,19 +159,14 @@ Root must be the root of an Emacs source tree."
(set-version-in-file root "lib-src/rcs2log" copyright
(rx (and "Copyright" (0+ space) ?= (0+ space)
?\' (submatch (1+ nonl)))))
;; This one is a nuisance, as it needs to be split over two lines.
(string-match "\\(.*[0-9]\\{4\\} *\\)\\(.*\\)" copyright)
(when (string-match "\\([0-9]\\{4\\}\\)" copyright)
(setq copyright (match-string 1 copyright))
(dolist (file (directory-files (expand-file-name "etc/refcards" root)
t "\\.tex\\'"))
(unless (string-match "gnus-refcard\\.tex" file)
(set-version-in-file
root file copyright
(concat (if (string-match "ru-refcard\\.tex" file)
"\\\\newcommand{\\\\cyear}\\[0\\]{"
"\\\\def\\\\year{")
"\\([0-9]\\{4\\}\\)}.+%.+copyright year"))))))
(set-version-in-file root "etc/refcards/ru-refcard.tex" copyright
"\\\\newcommand{\\\\cyear}\\[0\\]\
{\\([0-9]\\{4\\}\\)}.+%.+copyright year")
(set-version-in-file root "etc/refcards/emacsver.tex" copyright
"\\\\def\\\\year\
{\\([0-9]\\{4\\}\\)}.+%.+copyright year")))
;;; Various bits of magic for generating the web manuals
......@@ -443,7 +447,7 @@ If optional argument OLD is non-nil, also scan for defvars."
(let ((m (format "Scanning %s..." file))
(re (format "^[ \t]*\\((def%s\\)[ \t\n]"
(if old "\\(?:custom\\|var\\)" "custom")))
alist var ver)
alist var ver form)
(message "%s" m)
(with-temp-buffer
(insert-file-contents file)
......@@ -502,7 +506,7 @@ changes (in a non-trivial way). This function does not check for that."
(mapcar
(lambda (file)
(cons file (cusver-scan file))) newfiles)))
oldcus result thisfile)
oldcus result thisfile file)
(message "Reading old defcustoms...")
(dolist (file oldfiles)
(setq oldcus (append oldcus (cusver-scan file t))))
......
2012-09-17 Glenn Morris <rgm@gnu.org>
* refcards/emacsver.tex: New file.
* refcards/calccard.tex, refcards/cs-dired-ref.tex:
* refcards/cs-refcard.tex, refcards/cs-survival.tex:
* refcards/de-refcard.tex, refcards/dired-ref.tex:
* refcards/emacsver.tex, refcards/fr-dired-ref.tex:
* refcards/fr-refcard.tex, refcards/fr-survival.tex:
* refcards/orgcard.tex, refcards/pl-refcard.tex:
* refcards/pt-br-refcard.tex, refcards/refcard.tex:
* refcards/sk-dired-ref.tex, refcards/sk-refcard.tex:
* refcards/sk-survival.tex, refcards/survival.tex:
* refcards/vipcard.tex, refcards/viperCard.tex: Include emacsver.tex.
* refcards/calccard.tex (\emacsversionnumber):
Rename to \versionemacs, same as all the other refcards.
* refcards/Makefile (ENVADD): New variable.
(sk-dired-ref.pdf, sk-survival.pdf, pl-refcard.pdf)
(%.pdf, %,dvi, sk-dired-ref.dvi, sk-survival.dvi, pl-refcard.dvi):
Depend on emacsver.tex. Add "." to TEXINPUTS for TeX commands.
2012-09-16 Paul Eggert <eggert@cs.ucla.edu>
Remove configure's --without-sync-input option (Bug#12450).
......
......@@ -47,26 +47,27 @@ VIPER_CARDS_PDF = vipcard.pdf viperCard.pdf
viper-cards_pdf: ${VIPER_CARDS_PDF}
viper-cards_ps: ${VIPER_CARDS_PDF:.pdf=.ps}
ENVADD = TEXINPUTS=".:"
## PDF files.
## The page layouts (a4/letter) are written directly in the .tex files.
cs-refcard.pdf cs-dired-ref.pdf cs-survival.pdf sk-refcard.pdf \
sk-dired-ref.pdf sk-survival.pdf: %.pdf: %.tex
sk-dired-ref.pdf sk-survival.pdf: %.pdf: %.tex emacsver.tex
if pdfcsplain --version > /dev/null 2> /dev/null; then \
pdfcsplain $<; \
${ENVADD} pdfcsplain $<; \
else \
csplain "\pdfoutput=1\input $<"; \
${ENVADD} csplain "\pdfoutput=1\input $<"; \
fi
## Some versions of pdfmex seem to create dvi by default, hence output-format.
pl-refcard.pdf: %.pdf: %.tex
pl-refcard.pdf: %.pdf: %.tex emacsver.tex
if ! kpsewhich -format=fmt mex > /dev/null && \
! pdfmex --version > /dev/null 2> /dev/null; then \
echo "No mex format found."; false; \
fi
pdftex -output-format=pdf $<
${ENVADD} pdftex -output-format=pdf $<
ru-refcard.pdf: %.pdf: %.tex
pdflatex $<
......@@ -81,21 +82,21 @@ gnus-booklet.pdf: gnus-refcard.tex gnus-logo.pdf
pdflatex -jobname=gnus-booklet '\def\booklettrue{}\def\letterpapertrue{}\input{gnus-refcard}'
## Everything not explicitly listed above.
%.pdf: %.tex
pdftex $<
%.pdf: %.tex emacsver.tex
${ENVADD} pdftex $<
## dvi files.
cs-refcard.dvi cs-dired-ref.dvi cs-survival.dvi sk-refcard.dvi \
sk-dired-ref.dvi sk-survival.dvi: %.dvi: %.tex
csplain $<
sk-dired-ref.dvi sk-survival.dvi: %.dvi: %.tex emacsver.tex
${ENVADD} csplain $<
pl-refcard.dvi: %.dvi: %.tex
pl-refcard.dvi: %.dvi: %.tex emacsver.tex
if ! kpsewhich -format=fmt mex > /dev/null; then \
echo "No mex format found."; false; \
fi
tex $<
${ENVADD} tex $<
ru-refcard.dvi gnus-refcard.dvi: %.dvi: %.tex
latex $<
......@@ -105,8 +106,8 @@ gnus-booklet.dvi: gnus-refcard.tex
mv gnus-refcard.dvi $@
## Everything not explicitly listed above.
%.dvi: %.tex
tex $<
%.dvi: %.tex emacsver.tex
${ENVADD} tex $<
## PostScript files.
......
......@@ -63,8 +63,7 @@
% UUCP: mit-erl!gildea
% Internet: gildea@stop.mail-abuse.org
\def\emacsversionnumber{24}
\def\year{2012} % latest copyright year
\input emacsver.tex
\def\shortcopyrightnotice{\vskip 1ex plus 2 fill
\centerline{\small \copyright\ \year\ Free Software Foundation, Inc.
......@@ -276,7 +275,7 @@
\title{GNU Calc Reference Card}
\centerline{(for GNU Emacs version \emacsversionnumber)}
\centerline{(for GNU Emacs version \versionemacs)}
\section{Starting and Stopping}
......
......@@ -41,8 +41,7 @@
\input pdflayout.sty
\pdflayout=(0)
\def\versionemacs{24} % version of Emacs this is for
\def\year{2012} % latest copyright year
\input emacsver.tex
% Nothing else needs to be changed.
......
......@@ -59,8 +59,7 @@
\input pdflayout.sty
\pdflayout=(0)
\def\versionemacs{24} % version of Emacs this is for
\def\year{2012} % latest copyright year
\input emacsver.tex
% Nothing else needs to be changed.
......
......@@ -54,8 +54,7 @@
% Czech hyphenation rules applied
\chyph
\def\versionemacs{24} % version of Emacs this is for
\def\year{2012} % latest copyright year
\input emacsver.tex
\def\copyrightnotice{\penalty-1\vfill
\vbox{\smallfont\baselineskip=0.8\baselineskip\raggedcenter
......
......@@ -60,8 +60,7 @@
\input german.sty
\mdqoff % deactivates the "-char
\def\versionemacs{24} % version of Emacs this is for
\def\year{2012} % latest copyright year
\input emacsver.tex
% Nothing else needs to be changed below this line.
......
......@@ -43,8 +43,7 @@
\input pdflayout.sty
\pdflayout=(1)
\def\versionemacs{24} % version of Emacs this is for
\def\year{2012} % latest copyright year
\input emacsver.tex
% Nothing else needs to be changed.
......
%% This file is not generated by configure, because then the provided
%% pdf files would always appear out-of-date.
\def\versionemacs{24} % major version of emacs
\def\year{2012} % latest copyright year
......@@ -35,8 +35,7 @@
\input pdflayout.sty
\pdflayout=(0)
\def\versionemacs{24} % version of Emacs this is for
\def\year{2012} % latest copyright year
\input emacsver.tex
% Nothing else needs to be changed.
......
......@@ -56,8 +56,7 @@
\input pdflayout.sty
\pdflayout=(0l)
\def\versionemacs{24} % version of Emacs this is for
\def\year{2012} % latest copyright year
\input emacsver.tex
% Nothing else needs to be changed below this line.
......
......@@ -49,8 +49,7 @@
\input pdflayout.sty
\pdflayout=(0)
\def\versionemacs{24} % version of Emacs this is for
\def\year{2012} % latest copyright year
\input emacsver.tex
\def\copyrightnotice{\penalty-1\vfill
\vbox{\smallfont\baselineskip=0.8\baselineskip\raggedcenter
......
% Reference Card for Org Mode
\def\orgversionnumber{7.8.11}
\def\versionyear{2012} % latest update
\def\year{2012} % latest copyright year
\input emacsver.tex
%**start of header
\newcount\columnsperpage
......
......@@ -69,8 +69,7 @@
\input pdflayout.sty
\pdflayout=(0)
\def\versionemacs{24} % version of Emacs this is for
\def\year{2012} % latest copyright year
\input emacsver.tex
% Nothing else needs to be changed.
......
......@@ -62,8 +62,7 @@
\input pdflayout.sty
\pdflayout=(0l)
\def\versionemacs{24} % version of Emacs this is for
\def\year{2012} % latest copyright year
\input emacsver.tex
% Nothing else needs to be changed below this line.
......
......@@ -63,8 +63,7 @@
% Nothing else needs to be changed below this line.
\def\versionemacs{24} % version of Emacs this is for
\def\year{2012} % copyright year
\input emacsver.tex
\def\shortcopyrightnotice{\vskip 1ex plus 2 fill
\centerline{\small \copyright\ \year\ Free Software Foundation, Inc.
......
......@@ -42,8 +42,7 @@
\input pdflayout.sty
\pdflayout=(0)
\def\versionemacs{24} % version of Emacs this is for
\def\year{2012} % latest copyright year
\input emacsver.tex
% Nothing else needs to be changed.
......
......@@ -60,8 +60,7 @@
\input pdflayout.sty
\pdflayout=(0)
\def\versionemacs{24} % version of Emacs this is for
\def\year{2012} % latest copyright year
\input emacsver.tex
% Nothing else needs to be changed.
......
......@@ -55,8 +55,7 @@
% Slovak hyphenation rules applied
\shyph
\def\versionemacs{24} % version of Emacs this is for
\def\year{2012} % latest copyright year
\input emacsver.tex
\def\copyrightnotice{\penalty-1\vfill
\vbox{\smallfont\baselineskip=0.8\baselineskip\raggedcenter
......
......@@ -44,8 +44,7 @@
\input pdflayout.sty
\pdflayout=(1)
\def\versionemacs{24} % version of Emacs this is for
\def\year{2012} % latest copyright year
\input emacsver.tex
\def\copyrightnotice{\penalty-1\vfill
\vbox{\smallfont\baselineskip=0.8\baselineskip\raggedcenter
......
......@@ -49,8 +49,8 @@
\input pdflayout.sty
\pdflayout=(1)
\input emacsver.tex
\def\versionemacs{18} % version of Emacs this is for
\def\year{2012} % latest copyright year
\def\versionvip{3.5}
% Nothing else needs to be changed.
......
......@@ -52,8 +52,8 @@
\input pdflayout.sty
\pdflayout=(1)
\input emacsver.tex
\def\versionemacs{21} % version of Emacs this is for
\def\year{2012} % latest copyright year
\def\versionxemacs{20} % version of XEmacs this is for
\def\versionviper{3.0} % version of Viper this is for
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment