Now on revision 113884. ------------------------------------------------------------ revno: 113884 committer: Glenn Morris branch nick: trunk timestamp: Wed 2013-08-14 23:38:44 -0700 message: Stop keeping etc/refcards generated PDFs in the repository They are on the gnu.org website and will be in the release tarfiles. * admin/make-tarball.txt: Mention generating pdfs in etc/refcards. * etc/refcards/calccard.pdf, etc/refcards/cs-dired-ref.pdf: * etc/refcards/cs-refcard.pdf, etc/refcards/de-refcard.pdf: * etc/refcards/dired-ref.pdf, etc/refcards/fr-dired-ref.pdf: * etc/refcards/fr-refcard.pdf, etc/refcards/gnus-booklet.pdf: * etc/refcards/gnus-refcard.pdf, etc/refcards/orgcard.pdf: * etc/refcards/pl-refcard.pdf, etc/refcards/pt-br-refcard.pdf: * etc/refcards/refcard.pdf, etc/refcards/ru-refcard.pdf: * etc/refcards/sk-dired-ref.pdf, etc/refcards/sk-refcard.pdf: Remove generated files from repository. diff: === modified file 'admin/ChangeLog' --- admin/ChangeLog 2013-08-15 06:23:40 +0000 +++ admin/ChangeLog 2013-08-15 06:38:44 +0000 @@ -1,3 +1,7 @@ +2013-08-15 Glenn Morris + + * make-tarball.txt: Mention generating pdfs in etc/refcards. + 2013-08-15 Xue Fuqiao * notes/hydra: More information about Hydra. === modified file 'admin/make-tarball.txt' --- admin/make-tarball.txt 2013-08-05 16:18:57 +0000 +++ admin/make-tarball.txt 2013-08-15 06:38:44 +0000 @@ -61,6 +61,9 @@ 5. autoreconf -i -I m4 --force make bootstrap + make -C etc/refcards + make -C etc/refcards clean + 6. Copy lisp/loaddefs.el to lisp/ldefs-boot.el. Commit etc/AUTHORS, lisp/ldefs-boot.el, and the files changed === modified file 'etc/ChangeLog' --- etc/ChangeLog 2013-08-15 06:31:14 +0000 +++ etc/ChangeLog 2013-08-15 06:38:44 +0000 @@ -1,5 +1,15 @@ 2013-08-15 Glenn Morris + * refcards/calccard.pdf, refcards/cs-dired-ref.pdf: + * refcards/cs-refcard.pdf, refcards/de-refcard.pdf: + * refcards/dired-ref.pdf, refcards/fr-dired-ref.pdf: + * refcards/fr-refcard.pdf, refcards/gnus-booklet.pdf: + * refcards/gnus-refcard.pdf, refcards/orgcard.pdf: + * refcards/pl-refcard.pdf, refcards/pt-br-refcard.pdf: + * refcards/refcard.pdf, refcards/ru-refcard.pdf: + * refcards/sk-dired-ref.pdf, refcards/sk-refcard.pdf: + Remove generated files from repository. + * refcards/Makefile: Rewrite to use portable Makefile syntax. Add language-specific targets. (distclean, extraclean): New rules. === removed file 'etc/refcards/calccard.pdf' Binary files etc/refcards/calccard.pdf 2013-01-03 02:11:33 +0000 and etc/refcards/calccard.pdf 1970-01-01 00:00:00 +0000 differ === removed file 'etc/refcards/cs-dired-ref.pdf' Binary files etc/refcards/cs-dired-ref.pdf 2013-01-03 02:11:33 +0000 and etc/refcards/cs-dired-ref.pdf 1970-01-01 00:00:00 +0000 differ === removed file 'etc/refcards/cs-refcard.pdf' Binary files etc/refcards/cs-refcard.pdf 2013-01-03 02:11:33 +0000 and etc/refcards/cs-refcard.pdf 1970-01-01 00:00:00 +0000 differ === removed file 'etc/refcards/de-refcard.pdf' Binary files etc/refcards/de-refcard.pdf 2013-01-03 02:11:33 +0000 and etc/refcards/de-refcard.pdf 1970-01-01 00:00:00 +0000 differ === removed file 'etc/refcards/dired-ref.pdf' Binary files etc/refcards/dired-ref.pdf 2013-01-03 02:11:33 +0000 and etc/refcards/dired-ref.pdf 1970-01-01 00:00:00 +0000 differ === removed file 'etc/refcards/fr-dired-ref.pdf' Binary files etc/refcards/fr-dired-ref.pdf 2013-01-03 02:11:33 +0000 and etc/refcards/fr-dired-ref.pdf 1970-01-01 00:00:00 +0000 differ === removed file 'etc/refcards/fr-refcard.pdf' Binary files etc/refcards/fr-refcard.pdf 2013-01-03 02:11:33 +0000 and etc/refcards/fr-refcard.pdf 1970-01-01 00:00:00 +0000 differ === removed file 'etc/refcards/gnus-booklet.pdf' Binary files etc/refcards/gnus-booklet.pdf 2013-01-03 02:11:33 +0000 and etc/refcards/gnus-booklet.pdf 1970-01-01 00:00:00 +0000 differ === removed file 'etc/refcards/gnus-refcard.pdf' Binary files etc/refcards/gnus-refcard.pdf 2013-01-03 02:11:33 +0000 and etc/refcards/gnus-refcard.pdf 1970-01-01 00:00:00 +0000 differ === removed file 'etc/refcards/orgcard.pdf' Binary files etc/refcards/orgcard.pdf 2013-01-08 14:27:18 +0000 and etc/refcards/orgcard.pdf 1970-01-01 00:00:00 +0000 differ === removed file 'etc/refcards/pl-refcard.pdf' Binary files etc/refcards/pl-refcard.pdf 2013-01-03 02:11:33 +0000 and etc/refcards/pl-refcard.pdf 1970-01-01 00:00:00 +0000 differ === removed file 'etc/refcards/pt-br-refcard.pdf' Binary files etc/refcards/pt-br-refcard.pdf 2013-01-03 02:11:33 +0000 and etc/refcards/pt-br-refcard.pdf 1970-01-01 00:00:00 +0000 differ === removed file 'etc/refcards/refcard.pdf' Binary files etc/refcards/refcard.pdf 2013-01-03 02:11:33 +0000 and etc/refcards/refcard.pdf 1970-01-01 00:00:00 +0000 differ === removed file 'etc/refcards/ru-refcard.pdf' Binary files etc/refcards/ru-refcard.pdf 2013-01-03 02:11:33 +0000 and etc/refcards/ru-refcard.pdf 1970-01-01 00:00:00 +0000 differ === removed file 'etc/refcards/sk-dired-ref.pdf' Binary files etc/refcards/sk-dired-ref.pdf 2013-01-03 02:11:33 +0000 and etc/refcards/sk-dired-ref.pdf 1970-01-01 00:00:00 +0000 differ === removed file 'etc/refcards/sk-refcard.pdf' Binary files etc/refcards/sk-refcard.pdf 2013-01-03 02:11:33 +0000 and etc/refcards/sk-refcard.pdf 1970-01-01 00:00:00 +0000 differ ------------------------------------------------------------ revno: 113883 committer: Glenn Morris branch nick: trunk timestamp: Wed 2013-08-14 23:31:14 -0700 message: Cleanup for etc/refcards/Makefile and related items * .bzrignore: Unignore etc/refcards/Makefile. * make-dist: Do not distribute etc/refcards TeX intermediate files. * Makefile.in (install-arch-indep): Do not install etc/refcards TeX intermediate files. * etc/refcards/Makefile: Rewrite to use portable Makefile syntax. Add language-specific targets. (distclean, extraclean): New rules. * etc/refcards/README: Add copyright and license. Add Makefile details. Mention http and FSF store versions. diff: === modified file '.bzrignore' --- .bzrignore 2013-08-12 00:09:11 +0000 +++ .bzrignore 2013-08-15 06:31:14 +0000 @@ -80,6 +80,7 @@ !doc/lispintro/drawers.pdf !doc/lispintro/lambda-*.pdf etc/emacs.tmpdesktop +!etc/refcards/Makefile etc/refcards/*.aux etc/refcards/*.log info/*.info === modified file 'ChangeLog' --- ChangeLog 2013-08-14 02:15:01 +0000 +++ ChangeLog 2013-08-15 06:31:14 +0000 @@ -1,3 +1,9 @@ +2013-08-15 Glenn Morris + + * make-dist: Do not distribute etc/refcards TeX intermediate files. + * Makefile.in (install-arch-indep): + Do not install etc/refcards TeX intermediate files. + 2013-08-14 Ulrich Müller * configure.ac (EMACS_CONFIGURATION): Escape backslashes. (Bug#15091) === modified file 'Makefile.in' --- Makefile.in 2013-08-12 00:04:15 +0000 +++ Makefile.in 2013-08-15 06:31:14 +0000 @@ -543,6 +543,11 @@ ## deleted the entire installed etc/ directory and recreated it. ## install-etcdoc installs the relevant DOC. +## Note that we install etc/refcards/*.ps if present. +## TODO we should compress these if GZIP_PROG is set. +## It would be simpler to have a separate install rule for etc/refcards +## (maybe move it to doc/refcards?). + ## Note that the Makefiles in the etc directory are potentially useful ## in an installed Emacs, so should not be excluded. @@ -578,7 +583,12 @@ (cd $${dir}; tar -chf - . ) \ | (cd $${dest}; umask 022; \ tar -xvf - && cat > /dev/null) || exit 1; \ - [ "$${dir}" != "${srcdir}/etc" ] || rm -f $${dest}/DOC* ; \ + if [ "$${dir}" = "${srcdir}/etc" ]; then \ + rm -f $${dest}/DOC* ; \ + rm -f $${dest}/refcards/*.aux $${dest}/refcards/*.dvi; \ + rm -f $${dest}/refcards/*.log; \ + else true; \ + fi; \ for subdir in `find $${dest} -type d -print` ; do \ chmod a+rx $${subdir} ; \ rm -f $${subdir}/.gitignore ; \ === modified file 'etc/ChangeLog' --- etc/ChangeLog 2013-08-13 07:02:00 +0000 +++ etc/ChangeLog 2013-08-15 06:31:14 +0000 @@ -1,3 +1,9 @@ +2013-08-15 Glenn Morris + + * refcards/Makefile: Rewrite to use portable Makefile syntax. + Add language-specific targets. + (distclean, extraclean): New rules. + 2013-08-13 Glenn Morris * refcards/Makefile (all_pdf, all_ps, fr-survival.ps, dist): === modified file 'etc/refcards/Makefile' --- etc/refcards/Makefile 2013-08-12 01:14:23 +0000 +++ etc/refcards/Makefile 2013-08-15 06:31:14 +0000 @@ -17,128 +17,321 @@ ## You should have received a copy of the GNU General Public License ## along with GNU Emacs. If not, see . - -## Top-level targets. - -## PDF files that are included with Emacs. -all: refcards_pdf dired-refcards_pdf misc-refcards_pdf - -all_pdf: all survival-cards_pdf viper-cards_pdf -all_ps: refcards_ps dired-refcards_ps misc-refcards_ps survival-cards_ps \ - viper-cards_ps - -REFCARDS_PDF = refcard.pdf cs-refcard.pdf de-refcard.pdf fr-refcard.pdf \ - pl-refcard.pdf pt-br-refcard.pdf ru-refcard.pdf sk-refcard.pdf -refcards_pdf: ${REFCARDS_PDF} -refcards_ps: ${REFCARDS_PDF:.pdf=.ps} - -DIRED_REFCARDS_PDF = dired-ref.pdf cs-dired-ref.pdf fr-dired-ref.pdf \ - sk-dired-ref.pdf -dired-refcards_pdf: ${DIRED_REFCARDS_PDF} -dired-refcards_ps: ${DIRED_REFCARDS_PDF:.pdf=.ps} - -MISC_REFCARDS_PDF = calccard.pdf gnus-booklet.pdf gnus-refcard.pdf orgcard.pdf -misc-refcards_pdf: ${MISC_REFCARDS_PDF} -misc-refcards_ps: ${MISC_REFCARDS_PDF:.pdf=.ps} - - -## The following files are not included with Emacs. -SURVIVAL_CARDS_PDF = survival.pdf cs-survival.pdf fr-survival.pdf sk-survival.pdf -survival-cards_pdf: ${SURVIVAL_CARDS_PDF} -survival-cards_ps: ${SURVIVAL_CARDS_PDF:.pdf=.ps} - -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 emacsver.tex - if pdfcsplain --version > /dev/null 2> /dev/null; then \ - ${ENVADD} pdfcsplain $<; \ +### Commentary: + +## See README for details. + +PDF_ENGLISH = \ + calccard.pdf \ + dired-ref.pdf \ + gnus-booklet.pdf \ + gnus-refcard.pdf \ + orgcard.pdf \ + refcard.pdf \ + survival.pdf \ + vipcard.pdf \ + viperCard.pdf + +PDF_CZECH = \ + cs-dired-ref.pdf \ + cs-refcard.pdf \ + cs-survival.pdf + +PDF_FRENCH = \ + fr-dired-ref.pdf \ + fr-refcard.pdf \ + fr-survival.pdf \ + +PDF_GERMAN = de-refcard.pdf + +PDF_POLISH = pl-refcard.pdf + +PDF_PORTUGUESE = pt-br-refcard.pdf + +PDF_RUSSIAN = ru-refcard.pdf + +PDF_SLOVAKIAN = \ + sk-dired-ref.pdf \ + sk-refcard.pdf \ + sk-survival.pdf + +PDF_TARGETS = $(PDF_ENGLISH) $(PDF_CZECH) $(PDF_FRENCH) $(PDF_GERMAN) \ + $(PDF_POLISH) $(PDF_PORTUGUESE) $(PDF_RUSSIAN) $(PDF_SLOVAKIAN) + +PS_ENGLISH = \ + calccard.ps \ + dired-ref.ps \ + gnus-booklet.ps \ + gnus-refcard.ps \ + orgcard.ps \ + refcard.ps \ + survival.ps \ + vipcard.ps \ + viperCard.ps + +PS_CZECH = \ + cs-dired-ref.ps \ + cs-refcard.ps \ + cs-survival.ps + +PS_FRENCH = \ + fr-dired-ref.ps \ + fr-refcard.ps \ + fr-survival.ps \ + +PS_GERMAN = de-refcard.ps + +PS_POLISH = pl-refcard.ps + +PS_PORTUGUESE = pt-br-refcard.ps + +PS_RUSSIAN = ru-refcard.ps + +PS_SLOVAKIAN = \ + sk-dired-ref.ps \ + sk-refcard.ps \ + sk-survival.ps + +PS_TARGETS = $(PS_ENGLISH) $(PS_CZECH) $(PS_FRENCH) $(PS_GERMAN) \ + $(PS_POLISH) $(PS_PORTUGUESE) $(PS_RUSSIAN) $(PS_SLOVAKIAN) + + +## For emacsver.tex. +ENVADD = TEXINPUTS=".:$(TEXINPUTS)" + + +.PHONY: all pdf ps + +all: pdf +pdf: $(PDF_TARGETS) +ps: $(PS_TARGETS) + + +.PHONY: english czech french german polish portuguese russian slovakian +english: $(PDF_ENGLISH) +czech: $(PDF_CZECH) +french: $(PDF_FRENCH) +german: $(PDF_GERMAN) +polish: $(PDF_POLISH) +portuguese: $(PDF_PORTUGUESE) +russian: $(PDF_RUSSIAN) +slovakian: $(PDF_SLOVAKIAN) + +.PHONY: english-ps czech-ps french-ps german-ps polish-ps portuguese-ps russian-ps slovakian-ps +english-ps: $(PS_ENGLISH) +czech-ps: $(PS_CZECH) +french-ps: $(PS_FRENCH) +german-ps: $(PS_GERMAN) +polish-ps: $(PS_POLISH) +portuguese-ps: $(PS_PORTUGUESE) +russian-ps: $(PS_RUSSIAN) +slovakian-ps: $(PS_SLOVAKIAN) + + +## Default for file that do not use a different paper size. +.SUFFIXES: .ps .dvi +.dvi.ps: + dvips -t letter -o $@ $< + + +make_cs=if pdfcsplain --version > /dev/null 2> /dev/null; then \ + $(ENVADD) pdfcsplain $$input; \ else \ - ${ENVADD} csplain "\pdfoutput=1\input $<"; \ + $(ENVADD) csplain "\pdfoutput=1\input $$input"; \ fi +## For pdf output, the page layouts (a4/letter) are written directly +## in the .tex files. + +## For PostScript output, note that some of the tex files (refcard, +## de-refcard, fr-refcard, pt-br-refcard) have settings for letter or +## a4 paper. The Following are the default paper sizes (letter for English, +## A4 for translations). +## FIXME orgcard.ps does not fit on letter (see orgcard.tex). + +## A4, landscape: de-refcard, fr-refcard, pt-br-refcard orgcard +## A4, portrait: cs-*, fr-dired-ref, sk-*, pl-refcard, ru-refcard +## Letter, landscape: calccard, refcard +## Letter, portrait (suffix rule): diref-ref, gnus-*, survival, vip* + +calccard_deps = calccard.tex emacsver.tex pdflayout.sty +calccard.pdf: $(calccard_deps) + $(ENVADD) pdftex calccard.tex +calccard.dvi: $(calccard_deps) + $(ENVADD) tex calccard.tex +calccard.ps: calccard.dvi + dvips -t letter -t landscape -o $@ calccard.dvi + +cs_dired_ref_deps = cs-dired-ref.tex emacsver.tex pdflayout.sty +cs-dired-ref.pdf: $(cs_dired_ref_deps) + input=cs-dired-ref.tex; $(make_cs) +cs-dired-ref.dvi: $(cs_dired_ref_deps) + $(ENVADD) csplain cs-dired-ref.tex +cs-dired-ref.ps: cs-dired-ref.dvi + dvips -t a4 -o $@ cs-dired-ref.dvi + +cs_refcard_deps = cs-refcard.tex emacsver.tex pdflayout.sty +cs-refcard.pdf: $(cs_refcard_deps) + input=cs-refcard.tex; $(make_cs) +cs-refcard.dvi: $(cs_refcard_deps) + $(ENVADD) csplain cs-refcard.tex +cs-refcard.ps: cs-refcard.dvi + dvips -t a4 -o $@ cs-refcard.dvi + +cs_survival_deps = cs-survival.tex emacsver.tex pdflayout.sty +cs-survival.pdf: $(cs_survival_deps) + input=cs-survival.tex; $(make_cs) +cs-survival.dvi: $(cs_survival_deps) + $(ENVADD) csplain cs-survival.tex +cs-survival.ps: cs-survival.dvi + dvips -t a4 -o $@ cs-survival.dvi + +de_refcard_deps = de-refcard.tex emacsver.tex pdflayout.sty +de-refcard.pdf: $(de_refcard_deps) + $(ENVADD) pdftex de-refcard.tex +de-refcard.dvi: $(de_refcard_deps) + $(ENVADD) tex de-refcard.tex +de-refcard.ps: de-refcard.dvi + dvips -t a4 -t landscape -o $@ de-refcard.dvi + +dired_ref_deps = dired-ref.tex emacsver.tex pdflayout.sty +dired-ref.pdf: $(dired_ref_deps) + $(ENVADD) pdftex dired-ref.tex +dired-ref.dvi: $(dired_ref_deps) + $(ENVADD) tex dired-ref.tex + +fr_dired_ref_deps = fr-dired-ref.tex emacsver.tex pdflayout.sty +fr-dired-ref.pdf: $(fr_dired_ref_deps) + $(ENVADD) pdftex fr-dired-ref.tex +fr-dired-ref.dvi: $(fr_dired_ref_deps) + $(ENVADD) tex fr-dired-ref.tex +fr-dired-ref.ps: fr-dired-ref.dvi + dvips -t a4 -o $@ fr-dired-ref.dvi + +fr_refcard_deps = fr-refcard.tex emacsver.tex pdflayout.sty +fr-refcard.pdf: $(fr_refcard_deps) + $(ENVADD) pdftex fr-refcard.tex +fr-refcard.dvi: $(fr_refcard_deps) + $(ENVADD) tex fr-refcard.tex +fr-refcard.ps: fr-refcard.dvi + dvips -t a4 -t landscape -o $@ fr-refcard.dvi + +fr_survival_deps = fr-survival.tex emacsver.tex pdflayout.sty +fr-survival.pdf: $(fr_survival_deps) + $(ENVADD) pdftex fr-survival.tex +fr-survival.dvi: $(fr_survival_deps) + $(ENVADD) tex fr-survival.tex +fr-survival.ps: fr-survival.dvi + dvips -t a4 -o $@ fr-survival.dvi + +## No dependency on emacsver.tex, pdflayout.sty; no need for ENVADD. +gnus_booklet_deps = gnus-refcard.tex gnus-logo.pdf +gnus-booklet.pdf: $(gnus_booklet_deps) + pdflatex -jobname=gnus-booklet '\def\booklettrue{}\def\letterpapertrue{}\input{gnus-refcard}' +gnus-booklet.dvi: gnus-refcard.tex gnus-logo.eps + latex '\def\booklettrue{}\def\letterpapertrue{}\input{gnus-refcard}' + mv gnus-refcard.dvi $@ + +###gnus-logo.pdf: gnus-logo.eps +### ps2pdf gnus-logo.eps + +## No dependency on emacsver.tex, pdflayout.sty; no need for ENVADD. +gnus_refcard_deps = gnus-refcard.tex gnus-logo.pdf +gnus-refcard.pdf: $(gnus_refcard_deps) + pdflatex gnus-refcard.tex +gnus-refcard.dvi: $(gnus_refcard_deps) + latex gnus-refcard.tex + +orgcard_deps = orgcard.tex emacsver.tex pdflayout.sty +orgcard.pdf: $(orgcard_deps) + $(ENVADD) pdftex orgcard.tex +orgcard.dvi: $(orgcard_deps) + $(ENVADD) tex orgcard.tex +orgcard.ps: orgcard.dvi + dvips -t a4 -t landscape -o $@ orgcard.dvi + +pl_refcard_deps = pl-refcard.tex emacsver.tex pdflayout.sty ## Some versions of pdfmex seem to create dvi by default, hence output-format. -pl-refcard.pdf: %.pdf: %.tex emacsver.tex +pl-refcard.pdf: $(pl_refcard_deps) if ! kpsewhich -format=fmt mex > /dev/null && \ ! pdfmex --version > /dev/null 2> /dev/null; then \ echo "No mex format found."; false; \ fi - ${ENVADD} pdftex -output-format=pdf $< - -ru-refcard.pdf: %.pdf: %.tex - pdflatex $< - -#gnus-logo.pdf: %.pdf: %.eps -# ps2pdf $< - -gnus-refcard.pdf: %.pdf: %.tex gnus-logo.pdf - pdflatex $< - -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 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 emacsver.tex - ${ENVADD} csplain $< - -pl-refcard.dvi: %.dvi: %.tex emacsver.tex + $(ENVADD) pdftex -output-format=pdf pl-refcard.tex +pl-refcard.dvi: $(pl_refcard_deps) if ! kpsewhich -format=fmt mex > /dev/null; then \ echo "No mex format found."; false; \ fi - ${ENVADD} tex $< - -ru-refcard.dvi gnus-refcard.dvi: %.dvi: %.tex - latex $< - -gnus-booklet.dvi: gnus-refcard.tex - latex '\def\booklettrue{}\def\letterpapertrue{}\input{gnus-refcard}' - mv gnus-refcard.dvi $@ - -## Everything not explicitly listed above. -%.dvi: %.tex emacsver.tex - ${ENVADD} tex $< - - -## PostScript files. - -## Note that some of the tex files (refcard, de-refcard, fr-refcard, -## pt-br-refcard) have settings for letter or a4 paper. Following are -## the default paper sizes (letter for English, A4 for translations). -## FIXME orgcard.ps does not fit on letter (see orgcard.tex). - -## A4, landscape. -de-refcard.ps fr-refcard.ps fr-survival.ps pt-br-refcard.ps orgcard.ps: %.ps: %.dvi - dvips -t a4 -t landscape $< -o $@ - -## A4, portrait. -cs-dired-ref.ps cs-refcard.ps cs-survival.ps fr-dired-ref.ps \ -pl-refcard.ps ru-refcard.ps \ -sk-dired-ref.ps sk-refcard.ps sk-survival.ps: %.ps: %.dvi - dvips -t a4 $< -o $@ - -## letter, landscape. -calccard.ps refcard.ps: %.ps: %.dvi - dvips -t letter -t landscape $< -o $@ - -## letter, portrait. -dired-ref.ps gnus-booklet.ps gnus-refcard.ps survival.ps vipcard.ps \ -viperCard.ps: %.ps: %.dvi - dvips -t letter $< -o $@ + $(ENVADD) tex pl-refcard.tex +pl-refcard.ps: pl-refcard.dvi + dvips -t a4 -o $@ pl-refcard.dvi + +pt_br_refcard_deps = pt-br-refcard.tex emacsver.tex pdflayout.sty +pt-br-refcard.pdf: $(pt_br_refcard_deps) + $(ENVADD) pdftex pt-br-refcard.tex +pt-br-refcard.dvi: $(pt_br_refcard_deps) + $(ENVADD) tex pt-br-refcard.tex +pt-br-refcard.ps: pt-br-refcard.dvi + dvips -t a4 -t landscape -o $@ pt-br-refcard.dvi + +refcard_deps = refcard.tex emacsver.tex pdflayout.sty +refcard.pdf: $(refcard_deps) + $(ENVADD) pdftex refcard.tex +refcard.dvi: $(refcard_deps) + $(ENVADD) tex refcard.tex +refcard.ps: refcard.dvi + dvips -t letter -t landscape -o $@ refcard.dvi + +## No dependency on emacsver.tex, pdflayout.sty; no need for ENVADD. +ru_refcard_deps = ru-refcard.tex +ru-refcard.pdf: $(ru_refcard_deps) + pdflatex ru-refcard.tex +ru-refcard.dvi: $(ru_refcard_deps) + latex ru-refcard.tex +ru-refcard.ps: ru-refcard.dvi + dvips -t a4 -o $@ ru-refcard.dvi + +sk_dired_ref_deps = sk-dired-ref.tex emacsver.tex pdflayout.sty +sk-dired-ref.pdf: $(sk_dired_ref_deps) + input=sk-dired-ref.tex; $(make_cs) +sk-dired-ref.dvi: $(sk_dired_ref_deps) + $(ENVADD) csplain sk-dired-ref.tex +sk-dired-ref.ps: sk-dired-ref.dvi + dvips -t a4 -o $@ sk-dired-ref.dvi + +sk_refcard_deps = sk-refcard.tex emacsver.tex pdflayout.sty +sk-refcard.pdf: $(sk_refcard_deps) + input=sk-refcard.tex; $(make_cs) +sk-refcard.dvi: $(sk_refcard_deps) + $(ENVADD) csplain sk-refcard.tex +sk-refcard.ps: sk-refcard.dvi + dvips -t a4 -o $@ sk-refcard.dvi + +sk_survival_deps = sk-survival.tex emacsver.tex pdflayout.sty +sk-survival.pdf: $(sk_survival_deps) + input=sk-survival.tex; $(make_cs) +sk-survival.dvi: $(sk_survival_deps) + $(ENVADD) csplain sk-survival.tex +sk-survival.ps: sk-survival.dvi + dvips -t a4 -o $@ sk-survival.dvi + +survival_deps = survival.tex emacsver.tex pdflayout.sty +survival.pdf: $(survival_deps) + $(ENVADD) pdftex survival.tex +survival.dvi: $(survival_deps) + $(ENVADD) tex survival.tex + +vipcard_deps = vipcard.tex emacsver.tex pdflayout.sty +vipcard.pdf: $(vipcard_deps) + $(ENVADD) pdftex vipcard.tex +vipcard.dvi: $(vipcard_deps) + $(ENVADD) tex vipcard.tex + +vipercard_deps = viperCard.tex emacsver.tex pdflayout.sty +viperCard.pdf: $(vipercard_deps) + $(ENVADD) pdftex viperCard.tex +viperCard.dvi: $(vipercard_deps) + $(ENVADD) tex viperCard.tex .PHONY: clean @@ -146,6 +339,13 @@ clean: -rm -f *.dvi *.log *.aux +distclean: clean + +## This should really by maintainer-clean, but the handling of the +## refcards is funny. So abuse extraclean for this. +extraclean: clean + -rm -f $(PDF_TARGETS) $(PS_TARGETS) + ## For the Emacs website. dist: rm -rf emacs-refcards === modified file 'etc/refcards/README' --- etc/refcards/README 2013-01-01 09:11:05 +0000 +++ etc/refcards/README 2013-08-15 06:31:14 +0000 @@ -1,5 +1,11 @@ +Copyright (C) 2013 Free Software Foundation, Inc. +See the end of the file for license conditions. + + +REFERENCE CARDS FOR GNU EMACS + To generate these refcards, you need to install the TeX document -production system. For example, http://www.tug.org/texlive/ . +production system. For example, . All modern GNU/Linux distributions provide TeX packages, so the easiest way is just to install those. Your distribution may have @@ -7,7 +13,18 @@ separate, optional packages such as: texlive-lang-cyrillic, texlive-lang-czechslovak, texlive-lang-german, and texlive-lang-polish. - +Type `make all' (or `make pdf') to generate PDF versions of all the cards. +For PostScript format, use `make ps'. +To only generate the cards for a specific language, use e.g. +`make french' or `make french-ps'. As mentioned above, you may need +to install extra TeX packages for some languages. + +PDF and PS copies of these cards are also available at +. The FSF online +store sometimes has printed copies for sale. + + + COPYRIGHT AND LICENSE INFORMATION FOR IMAGE FILES The file gnus-logo.eps contains copyright and license information, but @@ -17,3 +34,20 @@ Author: Luis Fernandes Copyright (C) 2001-2013 Free Software Foundation, Inc. License: GNU General Public License version 3 or later (see COPYING) + + + +This file is part of GNU Emacs. + +GNU Emacs is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +GNU Emacs is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Emacs. If not, see . === modified file 'make-dist' --- make-dist 2013-07-25 07:10:56 +0000 +++ make-dist 2013-08-15 06:31:14 +0000 @@ -476,6 +476,9 @@ for f in `find etc -type f`; do case $f in etc/DOC*|etc/*.pyc) continue ;; + ## Arguably we should not exclude *.ps. + etc/refcards/*.aux|etc/refcards/*.dvi|etc/refcards/*.log|etc/refcards/*.ps) + continue ;; esac ln $f $tempdir/$f done ------------------------------------------------------------ revno: 113882 committer: Xue Fuqiao branch nick: trunk timestamp: Thu 2013-08-15 14:23:40 +0800 message: * admin/notes/hydra: More information about Hydra. diff: === modified file 'admin/ChangeLog' --- admin/ChangeLog 2013-08-10 22:54:32 +0000 +++ admin/ChangeLog 2013-08-15 06:23:40 +0000 @@ -1,3 +1,7 @@ +2013-08-15 Xue Fuqiao + + * notes/hydra: More information about Hydra. + 2013-08-10 Xue Fuqiao * notes/hydra: New file. === modified file 'admin/notes/hydra' --- admin/notes/hydra 2013-08-10 22:54:32 +0000 +++ admin/notes/hydra 2013-08-15 06:23:40 +0000 @@ -16,8 +16,10 @@ x86_64-linux * Mail notifications -Hydra sends notifications about build breakages in Emacs trunk to -emacs-buildstatus@gnu.org. +In addition to the web interface, Hydra can send notifications by +email when the build status of a project changes—e.g., from +`SUCCEEDED' to `FAILED'. It sends notifications about build status in +Emacs trunk to emacs-buildstatus@gnu.org. If you want to receive these notifications, please subscribe at http://lists.gnu.org/mailman/listinfo/emacs-buildstatus @@ -30,16 +32,24 @@ ** The `build' job which gets the result of the tarball job as input, together with -system identifier, this job basically does a normal make, make check, -make install. +system identifier, this job basically does a normal make and make install. ** The 'coverage' job is now running `make check'. -* Other GNU packages +* Nix expressions +The recipe for GNU Emacs are available via Git: +http://git.savannah.gnu.org/cgit/hydra-recipes.git/tree/emacs + +To modify the build job, email the patch to hydra-users@gnu.org. The +build recipes are written in the Nix language. + +* Other Information For a list of other GNU packages that have a continuous build on Hydra, see http://hydra.nixos.org/project/gnu +See http://www.gnu.org/software/devel.html#Hydra for more information. + This file is part of GNU Emacs. ------------------------------------------------------------ revno: 113881 committer: Dmitry Antipov branch nick: trunk timestamp: Thu 2013-08-15 09:23:40 +0400 message: * term.c (get_named_tty, create_tty_output, tty_free_frame_resources) (tty_free_frame_resources, delete_tty): Prefer eassert to emacs_abort. * image.c (make_image_cache): For struct image_cache, prefer xmalloc to xzalloc and so avoid redundant call to memset. * xterm.c (x_term_init): Avoid unnecessary initializations of dpyinfo members because it is allocated with xzalloc and so already zeroed. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-14 19:09:51 +0000 +++ src/ChangeLog 2013-08-15 05:23:40 +0000 @@ -1,3 +1,12 @@ +2013-08-15 Dmitry Antipov + + * term.c (get_named_tty, create_tty_output, tty_free_frame_resources) + (tty_free_frame_resources, delete_tty): Prefer eassert to emacs_abort. + * image.c (make_image_cache): For struct image_cache, prefer xmalloc + to xzalloc and so avoid redundant call to memset. + * xterm.c (x_term_init): Avoid unnecessary initializations of dpyinfo + members because it is allocated with xzalloc and so already zeroed. + 2013-08-14 Ken Brown * gmalloc.c (memalign) [CYGWIN]: Rename to emacs_memalign === modified file 'src/image.c' --- src/image.c 2013-08-14 16:36:16 +0000 +++ src/image.c 2013-08-15 05:23:40 +0000 @@ -1360,14 +1360,12 @@ struct image_cache * make_image_cache (void) { - struct image_cache *c = xzalloc (sizeof *c); - int size; + struct image_cache *c = xmalloc (sizeof *c); - size = 50; - c->images = xmalloc (size * sizeof *c->images); - c->size = size; - size = IMAGE_CACHE_BUCKETS_SIZE * sizeof *c->buckets; - c->buckets = xzalloc (size); + c->size = 50; + c->used = c->refcount = 0; + c->images = xmalloc (c->size * sizeof *c->images); + c->buckets = xzalloc (IMAGE_CACHE_BUCKETS_SIZE * sizeof *c->buckets); return c; } === modified file 'src/term.c' --- src/term.c 2013-08-03 03:29:03 +0000 +++ src/term.c 2013-08-15 05:23:40 +0000 @@ -2233,8 +2233,7 @@ { struct terminal *t; - if (!name) - emacs_abort (); + eassert (name); for (t = terminal_list; t; t = t->next_terminal) { @@ -2786,8 +2785,7 @@ { struct tty_output *t = xzalloc (sizeof *t); - if (! FRAME_TERMCAP_P (f)) - emacs_abort (); + eassert (FRAME_TERMCAP_P (f)); t->display_info = FRAME_TERMINAL (f)->display_info.tty; @@ -2799,8 +2797,7 @@ static void tty_free_frame_resources (struct frame *f) { - if (! FRAME_TERMCAP_P (f)) - emacs_abort (); + eassert (FRAME_TERMCAP_P (f)); if (FRAME_FACE_CACHE (f)) free_frame_faces (f); @@ -2815,8 +2812,7 @@ static void tty_free_frame_resources (struct frame *f) { - if (! FRAME_TERMCAP_P (f) && ! FRAME_MSDOS_P (f)) - emacs_abort (); + eassert (FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f)); if (FRAME_FACE_CACHE (f)) free_frame_faces (f); @@ -3443,8 +3439,7 @@ if (!terminal->name) return; - if (terminal->type != output_termcap) - emacs_abort (); + eassert (terminal->type == output_termcap); tty = terminal->display_info.tty; === modified file 'src/xterm.c' --- src/xterm.c 2013-08-14 16:36:16 +0000 +++ src/xterm.c 2013-08-15 05:23:40 +0000 @@ -10080,33 +10080,15 @@ select_visual (dpyinfo); dpyinfo->cmap = DefaultColormapOfScreen (dpyinfo->screen); dpyinfo->root_window = RootWindowOfScreen (dpyinfo->screen); - dpyinfo->client_leader_window = 0; - dpyinfo->grabbed = 0; - dpyinfo->reference_count = 0; dpyinfo->icon_bitmap_id = -1; - dpyinfo->n_fonts = 0; - dpyinfo->bitmaps = 0; - dpyinfo->bitmaps_size = 0; - dpyinfo->bitmaps_last = 0; - dpyinfo->scratch_cursor_gc = 0; - hlinfo->mouse_face_mouse_frame = 0; hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = -1; hlinfo->mouse_face_end_row = hlinfo->mouse_face_end_col = -1; hlinfo->mouse_face_face_id = DEFAULT_FACE_ID; hlinfo->mouse_face_window = Qnil; hlinfo->mouse_face_overlay = Qnil; - hlinfo->mouse_face_mouse_x = hlinfo->mouse_face_mouse_y = 0; - hlinfo->mouse_face_defer = 0; - hlinfo->mouse_face_hidden = 0; - dpyinfo->x_focus_frame = 0; - dpyinfo->x_focus_event_frame = 0; - dpyinfo->x_highlight_frame = 0; dpyinfo->wm_type = X_WMTYPE_UNKNOWN; /* See if we can construct pixel values from RGB values. */ - dpyinfo->red_bits = dpyinfo->blue_bits = dpyinfo->green_bits = 0; - dpyinfo->red_offset = dpyinfo->blue_offset = dpyinfo->green_offset = 0; - if (dpyinfo->visual->class == TrueColor) { get_bits_and_offset (dpyinfo->visual->red_mask, @@ -10267,14 +10249,9 @@ } dpyinfo->x_dnd_atoms_size = 8; - dpyinfo->x_dnd_atoms_length = 0; dpyinfo->x_dnd_atoms = xmalloc (sizeof *dpyinfo->x_dnd_atoms * dpyinfo->x_dnd_atoms_size); - dpyinfo->net_supported_atoms = NULL; - dpyinfo->nr_net_supported_atoms = 0; - dpyinfo->net_supported_window = 0; - connection = ConnectionNumber (dpyinfo->display); dpyinfo->connection = connection; dpyinfo->gray ------------------------------------------------------------ revno: 113880 committer: Ken Brown branch nick: trunk timestamp: Wed 2013-08-14 15:09:51 -0400 message: * src/gmalloc.c [CYGWIN]: Rename memalign (Bug#15094). diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-14 16:36:16 +0000 +++ src/ChangeLog 2013-08-14 19:09:51 +0000 @@ -1,3 +1,8 @@ +2013-08-14 Ken Brown + + * gmalloc.c (memalign) [CYGWIN]: Rename to emacs_memalign + (Bug#15094). + 2013-08-14 Dmitry Antipov Utility function and macro to copy Lisp string to C string. === modified file 'src/gmalloc.c' --- src/gmalloc.c 2013-01-02 16:13:04 +0000 +++ src/gmalloc.c 2013-08-14 19:09:51 +0000 @@ -1558,6 +1558,15 @@ void *(*__memalign_hook) (size_t size, size_t alignment); +/* As of version 1.7.24, Cygwin allows applications to provide their + own posix_memalign (but not memalign). But posix_memalign as + defined in this file calls memalign, so we have to rename the + latter in order to make sure that posix_memalign calls Emacs's + memalign. */ +#ifdef CYGWIN +#define memalign emacs_memalign +#endif + void * memalign (size_t alignment, size_t size) { ------------------------------------------------------------ revno: 113879 committer: Dmitry Antipov branch nick: trunk timestamp: Wed 2013-08-14 20:36:16 +0400 message: Utility function and macro to copy Lisp string to C string. * lisp.h (xlispstrdupa): New macro. (xlispstrdup): New prototype. * alloc.c (xlispstrdup): New function. * callint.c (Fcall_interactively): * fileio.c (Ffile_name_directory, Fexpand_file_name) (Fsubstitute_in_file_name): * frame.c (Fmake_terminal_frame): Use xlispstrdupa. * image.c (x_create_bitmap_from_file): * w32term.c (w32_term_init): * xterm.c (x_term_init): Use xlispstrdup. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-14 13:58:25 +0000 +++ src/ChangeLog 2013-08-14 16:36:16 +0000 @@ -1,3 +1,17 @@ +2013-08-14 Dmitry Antipov + + Utility function and macro to copy Lisp string to C string. + * lisp.h (xlispstrdupa): New macro. + (xlispstrdup): New prototype. + * alloc.c (xlispstrdup): New function. + * callint.c (Fcall_interactively): + * fileio.c (Ffile_name_directory, Fexpand_file_name) + (Fsubstitute_in_file_name): + * frame.c (Fmake_terminal_frame): Use xlispstrdupa. + * image.c (x_create_bitmap_from_file): + * w32term.c (w32_term_init): + * xterm.c (x_term_init): Use xlispstrdup. + 2013-08-14 Lars Magne Ingebrigtsen * image.c (imagemagick_load_image): Make animated pictures work. === modified file 'src/alloc.c' --- src/alloc.c 2013-08-11 01:30:20 +0000 +++ src/alloc.c 2013-08-14 16:36:16 +0000 @@ -802,6 +802,15 @@ return memcpy (xmalloc (size), s, size); } +/* Like above, but duplicates Lisp string to C string. */ + +char * +xlispstrdup (Lisp_Object string) +{ + ptrdiff_t size = SBYTES (string) + 1; + return memcpy (xmalloc (size), SSDATA (string), size); +} + /* Like putenv, but (1) use the equivalent of xmalloc and (2) the argument is a const pointer. */ === modified file 'src/callint.c' --- src/callint.c 2013-08-11 01:30:20 +0000 +++ src/callint.c 2013-08-14 16:36:16 +0000 @@ -331,12 +331,9 @@ /* If SPECS is set to a string, use it as an interactive prompt. */ if (STRINGP (specs)) - { - /* Make a copy of string so that if a GC relocates specs, - `string' will still be valid. */ - string = alloca (SBYTES (specs) + 1); - memcpy (string, SSDATA (specs), SBYTES (specs) + 1); - } + /* Make a copy of string so that if a GC relocates specs, + `string' will still be valid. */ + string = xlispstrdupa (specs); else { Lisp_Object input; === modified file 'src/fileio.c' --- src/fileio.c 2013-08-12 07:12:07 +0000 +++ src/fileio.c 2013-08-14 16:36:16 +0000 @@ -366,8 +366,7 @@ } #ifdef DOS_NT - beg = alloca (SBYTES (filename) + 1); - memcpy (beg, SSDATA (filename), SBYTES (filename) + 1); + beg = xlispstrdupa (filename); #else beg = SSDATA (filename); #endif @@ -944,8 +943,7 @@ #endif /* Make a local copy of nm[] to protect it from GC in DECODE_FILE below. */ - nm = alloca (SBYTES (name) + 1); - memcpy (nm, SSDATA (name), SBYTES (name) + 1); + nm = xlispstrdupa (name); #ifdef DOS_NT /* Note if special escape prefix is present, but remove for now. */ @@ -1693,8 +1691,7 @@ /* Always work on a copy of the string, in case GC happens during decode of environment variables, causing the original Lisp_String data to be relocated. */ - nm = alloca (SBYTES (filename) + 1); - memcpy (nm, SDATA (filename), SBYTES (filename) + 1); + nm = xlispstrdupa (filename); #ifdef DOS_NT dostounix_filename (nm, multibyte); === modified file 'src/frame.c' --- src/frame.c 2013-08-11 01:30:20 +0000 +++ src/frame.c 2013-08-14 16:36:16 +0000 @@ -692,22 +692,14 @@ ? FRAME_TTY (XFRAME (selected_frame))->name : NULL)); if (!NILP (tty)) - { - name = alloca (SBYTES (tty) + 1); - memcpy (name, SSDATA (tty), SBYTES (tty)); - name[SBYTES (tty)] = 0; - } + name = xlispstrdupa (tty); tty_type = get_future_frame_param (Qtty_type, parms, (FRAME_TERMCAP_P (XFRAME (selected_frame)) ? FRAME_TTY (XFRAME (selected_frame))->type : NULL)); if (!NILP (tty_type)) - { - type = alloca (SBYTES (tty_type) + 1); - memcpy (type, SSDATA (tty_type), SBYTES (tty_type)); - type[SBYTES (tty_type)] = 0; - } + type = xlispstrdupa (tty_type); t = init_tty (name, type, 0); /* Errors are not fatal. */ } === modified file 'src/image.c' --- src/image.c 2013-08-14 13:50:03 +0000 +++ src/image.c 2013-08-14 16:36:16 +0000 @@ -302,11 +302,10 @@ id = x_allocate_bitmap_record (f); dpyinfo->bitmaps[id - 1].img = bitmap; dpyinfo->bitmaps[id - 1].refcount = 1; - dpyinfo->bitmaps[id - 1].file = xmalloc (SBYTES (file) + 1); + dpyinfo->bitmaps[id - 1].file = xlispstrdup (file); dpyinfo->bitmaps[id - 1].depth = 1; dpyinfo->bitmaps[id - 1].height = ns_image_width (bitmap); dpyinfo->bitmaps[id - 1].width = ns_image_height (bitmap); - strcpy (dpyinfo->bitmaps[id - 1].file, SSDATA (file)); return id; #endif @@ -345,11 +344,10 @@ dpyinfo->bitmaps[id - 1].pixmap = bitmap; dpyinfo->bitmaps[id - 1].have_mask = 0; dpyinfo->bitmaps[id - 1].refcount = 1; - dpyinfo->bitmaps[id - 1].file = xmalloc (SBYTES (file) + 1); + dpyinfo->bitmaps[id - 1].file = xlispstrdup (file); dpyinfo->bitmaps[id - 1].depth = 1; dpyinfo->bitmaps[id - 1].height = height; dpyinfo->bitmaps[id - 1].width = width; - strcpy (dpyinfo->bitmaps[id - 1].file, SSDATA (file)); return id; #endif /* HAVE_X_WINDOWS */ === modified file 'src/lisp.h' --- src/lisp.h 2013-08-12 07:12:07 +0000 +++ src/lisp.h 2013-08-14 16:36:16 +0000 @@ -4255,10 +4255,17 @@ extern void *xpalloc (void *, ptrdiff_t *, ptrdiff_t, ptrdiff_t, ptrdiff_t); extern char *xstrdup (const char *); +extern char *xlispstrdup (Lisp_Object); extern void xputenv (const char *); extern char *egetenv (const char *); +/* Copy Lisp string to temporary (allocated on stack) C string. */ + +#define xlispstrdupa(string) \ + memcpy (alloca (SBYTES (string) + 1), \ + SSDATA (string), SBYTES (string) + 1) + /* Set up the name of the machine we're running on. */ extern void init_system_name (void); === modified file 'src/w32term.c' --- src/w32term.c 2013-08-13 18:01:18 +0000 +++ src/w32term.c 2013-08-14 16:36:16 +0000 @@ -6463,9 +6463,7 @@ terminal = w32_create_terminal (dpyinfo); /* Set the name of the terminal. */ - terminal->name = xmalloc (SBYTES (display_name) + 1); - strncpy (terminal->name, SDATA (display_name), SBYTES (display_name)); - terminal->name[SBYTES (display_name)] = 0; + terminal->name = xlispstrdup (display_name); dpyinfo->xrdb = xrm_option ? w32_make_rdb (xrm_option) : NULL; === modified file 'src/xterm.c' --- src/xterm.c 2013-08-13 15:29:25 +0000 +++ src/xterm.c 2013-08-14 16:36:16 +0000 @@ -10038,9 +10038,7 @@ dpyinfo->display = dpy; /* Set the name of the terminal. */ - terminal->name = xmalloc (SBYTES (display_name) + 1); - memcpy (terminal->name, SSDATA (display_name), SBYTES (display_name)); - terminal->name[SBYTES (display_name)] = 0; + terminal->name = xlispstrdup (display_name); #if 0 XSetAfterFunction (x_current_display, x_trace_wire); ------------------------------------------------------------ revno: 113878 committer: Xue Fuqiao branch nick: trunk timestamp: Wed 2013-08-14 22:02:46 +0800 message: Refine previous change. diff: === modified file 'src/marker.c' --- src/marker.c 2013-08-14 13:58:25 +0000 +++ src/marker.c 2013-08-14 14:02:46 +0000 @@ -536,8 +536,11 @@ DEFUN ("set-marker", Fset_marker, Sset_marker, 2, 3, 0, doc: /* Position MARKER before character number POSITION in BUFFER. If BUFFER is omitted or nil, it defaults to the current buffer. If -POSITION is nil, makes marker point nowhere so it no longer slows down -editing in any buffer. Returns MARKER. */) +POSITION is less than 1, MARKER is moved to the beginning of the +buffer. If POSITION is greater than the size of the buffer, marker is +moved to the end of the buffer. If POSITION is nil, makes marker +point nowhere so it no longer slows down editing in any buffer. +Returns MARKER. */) (Lisp_Object marker, Lisp_Object position, Lisp_Object buffer) { return set_marker_internal (marker, position, buffer, 0); ------------------------------------------------------------ revno: 113877 committer: Xue Fuqiao branch nick: trunk timestamp: Wed 2013-08-14 21:58:25 +0800 message: * src/marker.c (set_marker): Reformat documentation. diff: === modified file 'doc/lispref/markers.texi' --- doc/lispref/markers.texi 2013-01-01 09:11:05 +0000 +++ doc/lispref/markers.texi 2013-08-14 13:58:25 +0000 @@ -279,6 +279,8 @@ This function returns the buffer that @var{marker} points into, or @code{nil} if it points nowhere. +@c FIXME: The `buffer' argument of `set-marker' already defaults to +@c the current buffer, why use `(current-buffer)' explicitly here? @example @group (setq m (make-marker)) @@ -384,6 +386,7 @@ @node The Mark @section The Mark @cindex mark, the +@c @cindex the mark? @cindex mark ring Each buffer has a special marker, which is designated @dfn{the === modified file 'doc/lispref/positions.texi' --- doc/lispref/positions.texi 2013-08-13 14:26:39 +0000 +++ doc/lispref/positions.texi 2013-08-14 13:58:25 +0000 @@ -805,7 +805,7 @@ buffer, use @code{save-current-buffer} or @code{with-current-buffer} instead (@pxref{Current Buffer}). If you need to save or restore window configurations, see the forms described in @ref{Window -Configurations} and in @ref{Frame Configurations}. +Configurations} and in @ref{Frame Configurations}. @c frameset? @defspec save-excursion body@dots{} @cindex mark excursion === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-14 13:50:03 +0000 +++ src/ChangeLog 2013-08-14 13:58:25 +0000 @@ -6,6 +6,10 @@ * decompress.c (unwind_decompress): Always restore point. +2013-08-14 Xue Fuqiao + + * marker.c (set_marker): Reformat documentation. + 2013-08-14 Paul Eggert * xdisp.c (cursor_type_changed): Now static. === modified file 'src/marker.c' --- src/marker.c 2013-06-17 06:03:19 +0000 +++ src/marker.c 2013-08-14 13:58:25 +0000 @@ -534,9 +534,9 @@ } DEFUN ("set-marker", Fset_marker, Sset_marker, 2, 3, 0, - doc: /* Position MARKER before character number POSITION in BUFFER, -which defaults to the current buffer. If POSITION is nil, -makes marker point nowhere so it no longer slows down + doc: /* Position MARKER before character number POSITION in BUFFER. +If BUFFER is omitted or nil, it defaults to the current buffer. If +POSITION is nil, makes marker point nowhere so it no longer slows down editing in any buffer. Returns MARKER. */) (Lisp_Object marker, Lisp_Object position, Lisp_Object buffer) { ------------------------------------------------------------ revno: 113876 fixes bug: http://debbugs.gnu.org/14700 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Wed 2013-08-14 15:50:03 +0200 message: * image.c (imagemagick_load_image): Make animated pictures work. There's still some problems with background color settings, though. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-14 12:47:05 +0000 +++ src/ChangeLog 2013-08-14 13:50:03 +0000 @@ -1,5 +1,9 @@ 2013-08-14 Lars Magne Ingebrigtsen + * image.c (imagemagick_load_image): Make animated pictures work. + There's still some problems with background color settings, though + (bug#14700). + * decompress.c (unwind_decompress): Always restore point. 2013-08-14 Paul Eggert === modified file 'src/image.c' --- src/image.c 2013-08-14 07:00:25 +0000 +++ src/image.c 2013-08-14 13:50:03 +0000 @@ -7967,6 +7967,16 @@ goto imagemagick_error; } + /* If we have an animated image, get the new wand based on the + "super-wand". */ + if (ino > 0) + { + MagickWand *super_wand = image_wand; + MagickSetIteratorIndex (super_wand, ino); + image_wand = MagickGetImage (super_wand); + DestroyMagickWand (super_wand); + } + /* Retrieve the frame's background color, for use later. */ { XColor bgcolor; ------------------------------------------------------------ revno: 113875 committer: Juanma Barranquero branch nick: trunk timestamp: Wed 2013-08-14 15:41:02 +0200 message: lisp/frameset.el: Allow orphaned minibufferless frames. (frameset-filter-minibuffer): Deal with the case that the minibuffer parameter was already set in FILTERED. Doc fix. (frameset--record-minibuffer-relationships): Allow saving a minibufferless frame without its corresponding minibuffer frame. (frameset--reuse-frame): Accept a match from an orphaned minibufferless frame, if the frame id matches. (frameset--minibufferless-last-p): Sort non-orphaned minibufferless frames before orphaned ones. (frameset-restore): Warn about orphaned windows, instead of error out. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-08-14 13:30:13 +0000 +++ lisp/ChangeLog 2013-08-14 13:41:02 +0000 @@ -2,6 +2,15 @@ * frameset.el (frameset--prop-setter): New function. (frameset-prop): Add gv-setter declaration. + (frameset-filter-minibuffer): Deal with the case that the minibuffer + parameter was already set in FILTERED. Doc fix. + (frameset--record-minibuffer-relationships): Allow saving a + minibufferless frame without its corresponding minibuffer frame. + (frameset--reuse-frame): Accept a match from an orphaned minibufferless + frame, if the frame id matches. + (frameset--minibufferless-last-p): Sort non-orphaned minibufferless + frames before orphaned ones. + (frameset-restore): Warn about orphaned windows, instead of error out. 2013-08-14 Martin Rudalics === modified file 'lisp/frameset.el' --- lisp/frameset.el 2013-08-14 13:30:13 +0000 +++ lisp/frameset.el 2013-08-14 13:41:02 +0000 @@ -570,15 +570,22 @@ (not (stringp (cdr current))) (not (string-match-p "^unspecified-[fb]g$" (cdr current))))) -(defun frameset-filter-minibuffer (current _filtered _parameters saving) - "When saving, convert (minibuffer . #) to (minibuffer . t). +(defun frameset-filter-minibuffer (current filtered _parameters saving) + "Force the minibuffer parameter to have a sensible value. + +When saving, convert (minibuffer . #) to (minibuffer . t). +When restoring, if there are two copies, keep the one pointing to +a live window. For the meaning of CURRENT, FILTERED, PARAMETERS and SAVING, see `frameset-filter-alist'." - (or (not saving) - (if (windowp (cdr current)) - '(minibuffer . t) - t))) + (let ((value (cdr current)) mini) + (cond (saving + (if (windowp value) '(minibuffer . t) t)) + ((setq mini (assq 'minibuffer filtered)) + (when (windowp value) (setcdr mini value)) + nil) + (t t)))) (defun frameset-filter-shelve-param (current _filtered parameters saving &optional prefix) @@ -721,16 +728,18 @@ (dolist (frame frame-list) (unless (frame-parameter frame 'frameset--mini) (frameset--set-id frame) - (let* ((mb-frame (window-frame (minibuffer-window frame))) - (id (and mb-frame (frameset-frame-id mb-frame)))) - (if (null id) - (error "Minibuffer frame %S for %S is not being saved" mb-frame frame) - ;; For minibufferless frames, frameset--mini is a cons - ;; (nil . FRAME-ID), where FRAME-ID is the frameset--id - ;; of the frame containing its minibuffer window. - (set-frame-parameter frame - 'frameset--mini - (cons nil id))))))) + (let ((mb-frame (window-frame (minibuffer-window frame)))) + ;; For minibufferless frames, frameset--mini is a cons + ;; (nil . FRAME-ID), where FRAME-ID is the frameset--id of + ;; the frame containing its minibuffer window. + ;; FRAME-ID can be set to nil, if FRAME-LIST doesn't contain + ;; the minibuffer frame of a minibufferless frame; we allow + ;; it without trying to second-guess the user. + (set-frame-parameter frame + 'frameset--mini + (cons nil + (and mb-frame + (frameset-frame-id mb-frame)))))))) ;;;###autoload (cl-defun frameset-save (frame-list @@ -909,10 +918,12 @@ (setq frame (frameset--find-frame-if (lambda (f id mini-id) (and (frameset-frame-id-equal-p f id) - (frameset-frame-id-equal-p (window-frame - (minibuffer-window f)) - mini-id))) - display (cdr (assq 'frameset--id parameters)) (cdr mini)))) + (or (null mini-id) ; minibuffer frame not saved + (frameset-frame-id-equal-p + (window-frame (minibuffer-window f)) + mini-id)))) + display + (cdr (assq 'frameset--id parameters)) (cdr mini)))) (t ;; Default to just finding a frame in the same display. (setq frame (frameset--find-frame-if nil display)))) @@ -1007,7 +1018,7 @@ (cond ((eq id-def1 t) t) ((eq id-def2 t) nil) ((not (eq hasmini1 hasmini2)) (eq hasmini1 t)) - ((eq hasmini1 nil) (string< id-def1 id-def2)) + ((eq hasmini1 nil) (or id-def1 id-def2)) (t t)))) (defun frameset-keep-original-display-p (force-display) @@ -1098,7 +1109,7 @@ (condition-case-unless-debug err (let* ((d-mini (cdr (assq 'frameset--mini frame-cfg))) (mb-id (cdr d-mini)) - (default (and (booleanp mb-id) mb-id)) + (default (and (car d-mini) mb-id)) (force-display (if (functionp force-display) (funcall force-display frame-cfg window-cfg) force-display)) @@ -1142,16 +1153,22 @@ (setq frame-cfg (append '((tool-bar-lines . 0) (menu-bar-lines . 0)) frame-cfg)))) (t ;; Frame depends on other frame's minibuffer window. - (let* ((mb-frame (or (frameset-frame-with-id mb-id) - (error "Minibuffer frame %S not found" mb-id))) - (mb-param (assq 'minibuffer frame-cfg)) - (mb-window (minibuffer-window mb-frame))) - (unless (and (window-live-p mb-window) - (window-minibuffer-p mb-window)) - (error "Not a minibuffer window %s" mb-window)) - (if mb-param - (setcdr mb-param mb-window) - (push (cons 'minibuffer mb-window) frame-cfg))))) + (when mb-id + (let ((mb-frame (frameset-frame-with-id mb-id)) + (mb-window nil)) + (if (not mb-frame) + (delay-warning 'frameset + (format "Minibuffer frame %S not found" mb-id) + :warning) + (setq mb-window (minibuffer-window mb-frame)) + (unless (and (window-live-p mb-window) + (window-minibuffer-p mb-window)) + (delay-warning 'frameset + (format "Not a minibuffer window %s" mb-window) + :warning) + (setq mb-window nil))) + (when mb-window + (push (cons 'minibuffer mb-window) frame-cfg)))))) ;; OK, we're ready at last to create (or reuse) a frame and ;; restore the window config. (setq frame (frameset--restore-frame frame-cfg window-cfg ------------------------------------------------------------ revno: 113874 committer: Juanma Barranquero branch nick: trunk timestamp: Wed 2013-08-14 15:30:13 +0200 message: lisp/frameset.el: Use gv-setter declaration. (frameset--prop-setter): New function. (frameset-prop): Add gv-setter declaration. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-08-14 09:14:32 +0000 +++ lisp/ChangeLog 2013-08-14 13:30:13 +0000 @@ -1,3 +1,8 @@ +2013-08-14 Juanma Barranquero + + * frameset.el (frameset--prop-setter): New function. + (frameset-prop): Add gv-setter declaration. + 2013-08-14 Martin Rudalics * window.el (window-make-atom): Don't overwrite parameter === modified file 'lisp/frameset.el' --- lisp/frameset.el 2013-08-13 13:47:54 +0000 +++ lisp/frameset.el 2013-08-14 13:30:13 +0000 @@ -156,7 +156,13 @@ (let ((states (frameset-states object))) (and (listp states) (cl-every #'consp (frameset-states object)))) - (frameset-version object))) ; And VERSION is non-nil. + (frameset-version object))) ; And VERSION is non-nil. + +(defun frameset--prop-setter (frameset property value) + "Setter function for `frameset-prop'. Internal use only." + (setf (frameset-properties frameset) + (plist-put (frameset-properties frameset) property value)) + value) ;; A setf'able accessor to the frameset's properties (defun frameset-prop (frameset property) @@ -165,15 +171,9 @@ Properties can be set with (setf (frameset-prop FRAMESET PROPERTY) NEW-VALUE)" + (declare (gv-setter frameset--prop-setter)) (plist-get (frameset-properties frameset) property)) -(gv-define-setter frameset-prop (val fs prop) - (macroexp-let2 nil v val - `(progn - (setf (frameset-properties ,fs) - (plist-put (frameset-properties ,fs) ,prop ,v)) - ,v))) - ;; Filtering ------------------------------------------------------------ revno: 113873 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Wed 2013-08-14 15:03:25 +0200 message: * url-http.el (url-http-parse-headers): Always place point at the start of the buffer instead of just 80% of the time. diff: === modified file 'lisp/url/ChangeLog' --- lisp/url/ChangeLog 2013-08-12 17:02:31 +0000 +++ lisp/url/ChangeLog 2013-08-14 13:03:25 +0000 @@ -1,3 +1,8 @@ +2013-08-14 Lars Magne Ingebrigtsen + + * url-http.el (url-http-parse-headers): Always place point at the + start of the buffer instead of just 80% of the time. + 2013-08-12 Lars Magne Ingebrigtsen * url-http.el (url-handle-content-transfer-encoding): Renamed === modified file 'lisp/url/url-http.el' --- lisp/url/url-http.el 2013-08-12 17:02:31 +0000 +++ lisp/url/url-http.el 2013-08-14 13:03:25 +0000 @@ -855,6 +855,7 @@ (url-handle-content-transfer-encoding)) (url-http-debug "Finished parsing HTTP headers: %S" success) (widen) + (goto-char (point-min)) success)) (defun url-handle-content-transfer-encoding () ------------------------------------------------------------ revno: 113872 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Wed 2013-08-14 14:47:05 +0200 message: * decompress.c (unwind_decompress): Always restore point. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-14 07:25:45 +0000 +++ src/ChangeLog 2013-08-14 12:47:05 +0000 @@ -1,3 +1,7 @@ +2013-08-14 Lars Magne Ingebrigtsen + + * decompress.c (unwind_decompress): Always restore point. + 2013-08-14 Paul Eggert * xdisp.c (cursor_type_changed): Now static. === modified file 'src/decompress.c' --- src/decompress.c 2013-08-13 21:17:09 +0000 +++ src/decompress.c 2013-08-14 12:47:05 +0000 @@ -95,12 +95,14 @@ struct decompress_unwind_data *data = ddata; fn_inflateEnd (data->stream); - /* Delete any uncompressed data already inserted and restore point. */ + /* Delete any uncompressed data already inserted on error. */ if (data->start) - { - del_range (data->start, PT); - SET_PT (data->old_point); - } + del_range (data->start, PT); + + /* Put point where it was, or if the buffer has shrunk because the + compressed data is bigger than the uncompressed, at + point-max. */ + SET_PT (min (data->old_point, ZV)); } DEFUN ("zlib-available-p", Fzlib_available_p, Szlib_available_p, 0, 0, 0, ------------------------------------------------------------ revno: 113871 committer: Xue Fuqiao branch nick: trunk timestamp: Wed 2013-08-14 18:45:10 +0800 message: * doc/emacs/files.texi (Filesets): Add an index. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2013-08-12 00:09:11 +0000 +++ doc/emacs/ChangeLog 2013-08-14 10:45:10 +0000 @@ -1,3 +1,7 @@ +2013-08-14 Xue Fuqiao + + * files.texi (Filesets): Add an index. + 2013-08-12 Glenn Morris * macos.texi (GNUstep Support): === modified file 'doc/emacs/files.texi' --- doc/emacs/files.texi 2013-06-24 06:58:52 +0000 +++ doc/emacs/files.texi 2013-08-14 10:45:10 +0000 @@ -1982,6 +1982,7 @@ @node Filesets @section Filesets @cindex filesets +@cindex sets of files @findex filesets-init If you regularly edit a certain group of files, you can define them ------------------------------------------------------------ revno: 113870 committer: Glenn Morris branch nick: trunk timestamp: Wed 2013-08-14 06:17:37 -0400 message: Auto-commit of generated files. diff: === modified file 'autogen/configure' --- autogen/configure 2013-08-13 10:17:42 +0000 +++ autogen/configure 2013-08-14 10:17:37 +0000 @@ -17169,7 +17169,7 @@ #define EMACS_CONFIGURATION "${canonical}" _ACEOF -emacs_config_options=`echo "$emacs_config_options " | sed -e 's/--no-create //' -e 's/--no-recursion //' -e 's/ *$//' -e "s/\"/'/g"` +emacs_config_options=`echo "$emacs_config_options " | sed -e 's/--no-create //' -e 's/--no-recursion //' -e 's/ *$//' -e "s/\"/'/g" -e 's/\\\\/\\\\\\\\/g'` cat >>confdefs.h <<_ACEOF #define EMACS_CONFIG_OPTIONS "${emacs_config_options}" ------------------------------------------------------------ revno: 113869 committer: martin rudalics branch nick: trunk timestamp: Wed 2013-08-14 11:14:32 +0200 message: Fix some issues in window.el. * window.el (window-make-atom): Don't overwrite parameter already present. (display-buffer-in-atom-window): Handle special case where we split an already atomic window. (window--major-non-side-window, display-buffer-in-side-window) (window--side-check): Ignore minibuffer window when walking window tree. (window-deletable-p): Return 'frame only if no other frame uses our minibuffer window. (record-window-buffer): Run buffer-list-update-hook. (split-window): Make sure window--check-frame won't destroy an existing atomic window in case the new window gets nested inside. (display-buffer-at-bottom): Ignore minibuffer window when walking window tree. Don't split a side window. (pop-to-buffer): Don't set-buffer here, the select-window call should do that. (mouse-autoselect-window-select): Autoselect only if we are in the text portion of the window. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-08-13 18:09:50 +0000 +++ lisp/ChangeLog 2013-08-14 09:14:32 +0000 @@ -1,3 +1,25 @@ +2013-08-14 Martin Rudalics + + * window.el (window-make-atom): Don't overwrite parameter + already present. + (display-buffer-in-atom-window): Handle special case where we + split an already atomic window. + (window--major-non-side-window, display-buffer-in-side-window) + (window--side-check): Ignore minibuffer window when walking + window tree. + (window-deletable-p): Return 'frame only if no other frame uses + our minibuffer window. + (record-window-buffer): Run buffer-list-update-hook. + (split-window): Make sure window--check-frame won't destroy an + existing atomic window in case the new window gets nested + inside. + (display-buffer-at-bottom): Ignore minibuffer window when + walking window tree. Don't split a side window. + (pop-to-buffer): Don't set-buffer here, the select-window call + should do that. + (mouse-autoselect-window-select): Autoselect only if we are in the + text portion of the window. + 2013-08-13 Lars Magne Ingebrigtsen * net/shr.el (shr-parse-image-data): New function to grab both the === modified file 'lisp/window.el' --- lisp/window.el 2013-08-08 23:59:14 +0000 +++ lisp/window.el 2013-08-14 09:14:32 +0000 @@ -477,7 +477,8 @@ (error "Window %s is not an internal window" window) (walk-window-subtree (lambda (window) - (set-window-parameter window 'window-atom t)) + (unless (window-parameter window 'window-atom) + (set-window-parameter window 'window-atom t))) window t) window)) @@ -498,24 +499,39 @@ sibling of an atomic window's root. If an internal window is specified here, all children of that window become part of the atomic window too. If no window is specified, the new window - becomes a sibling of the selected window. + becomes a sibling of the selected window. By default, the + `window-atom' parameter of the existing window is set to `main' + provided it is live and was not set before. `side' denotes the side of the existing window where the new window shall be located. Valid values are `below', `right', - `above' and `left'. The default is `below'. + `above' and `left'. The default is `below'. By default, the + `window-atom' parameter of the new window is set to this value. The return value is the new window, nil when creating that window failed." - (let ((ignore-window-parameters t) - (window-combination-limit t) - (window (cdr (assq 'window alist))) - (side (cdr (assq 'side alist))) - new) + (let* ((ignore-window-parameters t) + (window-combination-limit t) + (window-combination-resize 'atom) + (window (cdr (assq 'window alist))) + (side (cdr (assq 'side alist))) + (atom (when window (window-parameter window 'window-atom))) + root new) (setq window (window-normalize-window window)) - ;; Split off new window + (setq root (window-atom-root window)) + ;; Split off new window. (when (setq new (split-window window nil side)) - ;; Make sure we have a valid atomic window. - (window-make-atom (window-parent window)) + (window-make-atom + (if (and root (not (eq root window))) + ;; When WINDOW was part of an atomic window and we did not + ;; split its root, root atomic window at old root. + root + ;; Otherwise, root atomic window at WINDOW's new parent. + (window-parent window))) + ;; Assign `window-atom' parameters, if needed. + (when (and (not atom) (window-live-p window)) + (set-window-parameter window 'window-atom 'main)) + (set-window-parameter new 'window-atom side) ;; Display BUFFER in NEW and return NEW. (window--display-buffer buffer new 'window alist display-buffer-mark-dedicated)))) @@ -631,7 +647,7 @@ (and (setq sibling (window-next-sibling window)) (window-parameter sibling 'window-side))) (setq major window))) - frame t) + frame t 'nomini) (or major (frame-root-window frame)))) (defun window--major-side-window (side) @@ -762,7 +778,8 @@ (walk-window-tree (lambda (window) (when (eq (window-parameter window 'window-side) side) - (setq windows (cons window windows))))) + (setq windows (cons window windows)))) + nil nil 'nomini) (nreverse windows)))) (slots (when major (max 1 (window-child-count major)))) (max-slots @@ -919,14 +936,14 @@ (if bottom (throw 'reset t) (setq bottom t))) (t (throw 'reset t)))) - frame t)) + frame t 'nomini)) ;; If there's a side window, there must be at least one ;; non-side window. (and (or left top right bottom) (not none))) (walk-window-tree (lambda (window) (set-window-parameter window 'window-side nil)) - frame t)))) + frame t 'nomini)))) (defun window--check (&optional frame) "Check atomic and side windows on FRAME. @@ -980,8 +997,8 @@ (setq value (+ value (window--min-size-1 sub horizontal ignore))) (setq sub (window-right sub))) - ;; The minimum size of an ortho-combination is the maximum of - ;; the minimum sizes of its child windows. + ;; The minimum size of an ortho-combination is the maximum + ;; of the minimum sizes of its child windows. (while sub (setq value (max value (window--min-size-1 sub horizontal ignore))) @@ -2808,10 +2825,11 @@ (defun window-deletable-p (&optional window) "Return t if WINDOW can be safely deleted from its frame. WINDOW must be a valid window and defaults to the selected one. -Return `frame' if deleting WINDOW should also delete its frame." +Return 'frame if deleting WINDOW should also delete its frame." (setq window (window-normalize-window window)) - (unless ignore-window-parameters + (unless (or ignore-window-parameters + (eq (window-parameter window 'delete-window) t)) ;; Handle atomicity. (when (window-parameter window 'window-atom) (setq window (window-atom-root window)))) @@ -2823,6 +2841,14 @@ ;; on the same terminal, and it does not contain the active ;; minibuffer. (unless (or (eq frame (next-frame frame 0)) + ;; We can delete our frame only if no other frame + ;; currently uses our minibuffer window. + (catch 'other + (dolist (other (frame-list)) + (when (and (not (eq other frame)) + (eq (window-frame (minibuffer-window other)) + frame)) + (throw 'other t)))) (let ((minibuf (active-minibuffer-window))) (and minibuf (eq frame (window-frame minibuf))))) 'frame)) @@ -3060,7 +3086,9 @@ ;; (Bug#12588). point window-point-insertion-type))))) (set-window-prev-buffers - window (cons entry (window-prev-buffers window)))))))) + window (cons entry (window-prev-buffers window))))) + + (run-hooks 'buffer-list-update-hook)))) (defun unrecord-window-buffer (&optional window buffer) "Unrecord BUFFER in WINDOW. @@ -3894,7 +3922,8 @@ (let* ((new (split-window-internal window new-size side new-normal))) ;; Assign window-side parameters, if any. - (when (eq window-combination-resize 'side) + (cond + ((eq window-combination-resize 'side) (let ((window-side (cond (window-side window-side) @@ -3908,6 +3937,14 @@ ;; new parent the same window-side parameter. (set-window-parameter (window-parent new) 'window-side window-side)))) + ((eq window-combination-resize 'atom) + ;; Make sure `window--check-frame' won't destroy an existing + ;; atomic window in case the new window gets nested inside. + (unless (window-parameter window 'window-atom) + (set-window-parameter window 'window-atom t)) + (when new-parent + (set-window-parameter (window-parent new) 'window-atom t)) + (set-window-parameter new 'window-atom t))) (run-window-configuration-change-hook frame) (window--check frame) @@ -5676,7 +5713,8 @@ frame's root window, or reuses an existing window at the bottom of the selected frame." (let (bottom-window window) - (walk-window-tree (lambda (window) (setq bottom-window window))) + (walk-window-tree + (lambda (window) (setq bottom-window window)) nil nil 'nomini) (or (and (not (frame-parameter nil 'unsplittable)) (setq window (window--try-to-split-window bottom-window alist)) (window--display-buffer @@ -5684,7 +5722,7 @@ (and (not (frame-parameter nil 'unsplittable)) (setq window (condition-case nil - (split-window (frame-root-window)) + (split-window (window--major-non-side-window)) (error nil))) (window--display-buffer buffer window 'window alist display-buffer-mark-dedicated)) @@ -5803,7 +5841,8 @@ (interactive (list (read-buffer "Pop to buffer: " (other-buffer)) (if current-prefix-arg t))) (setq buffer (window-normalize-buffer-to-switch-to buffer)) - (set-buffer buffer) + ;; This should be done by `select-window' below. + ;; (set-buffer buffer) (let* ((old-frame (selected-frame)) (window (display-buffer buffer action)) (frame (window-frame window))) @@ -6641,9 +6680,10 @@ (cond ((or (menu-or-popup-active-p) (and window - (not (coordinates-in-window-p (cdr mouse-position) window)))) - ;; A menu / popup dialog is active or the mouse is on the scroll-bar - ;; of WINDOW, temporarily suspend delayed autoselection. + (not (consp (coordinates-in-window-p + (cdr mouse-position) window))))) + ;; A menu / popup dialog is active or the mouse is not on the + ;; text region of WINDOW: Suspend autoselection temporarily. (mouse-autoselect-window-start mouse-position nil t)) ((eq mouse-autoselect-window-state 'suspend) ;; Delayed autoselection was temporarily suspended, reenable it. ------------------------------------------------------------ revno: 113868 committer: Dmitry Antipov branch nick: trunk timestamp: Wed 2013-08-14 11:25:45 +0400 message: * xdisp.c (redisplay_window): If window_end_valid is cleared due to non-zero windows_or_buffers_changed, clear current_matrix_up_to_date_p and so do not call to try_cursor_movement for that window. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-14 07:05:54 +0000 +++ src/ChangeLog 2013-08-14 07:25:45 +0000 @@ -10,6 +10,9 @@ * xdisp.c (adjust_window_ends): Move duplicated code to new function. (try_window, try_window_reusing_current_matrix, try_window_id): Use it. + (redisplay_window): If window_end_valid is cleared due to non-zero + windows_or_buffers_changed, clear current_matrix_up_to_date_p and + so do not call to try_cursor_movement for that window. 2013-08-14 Dmitry Antipov === modified file 'src/xdisp.c' --- src/xdisp.c 2013-08-14 07:05:54 +0000 +++ src/xdisp.c 2013-08-14 07:25:45 +0000 @@ -15449,8 +15449,8 @@ && !current_buffer->clip_changed && !window_outdated (w)); - /* When windows_or_buffers_changed is non-zero, we can't rely on - the window end being valid, so set it to nil there. */ + /* When windows_or_buffers_changed is non-zero, we can't rely + on the window end being valid, so set it to zero there. */ if (windows_or_buffers_changed) { /* If window starts on a continuation line, maybe adjust the @@ -15459,6 +15459,9 @@ compute_window_start_on_continuation_line (w); w->window_end_valid = 0; + /* If so, we also can't rely on current matrix + and should not fool try_cursor_movement below. */ + current_matrix_up_to_date_p = 0; } /* Some sanity checks. */ ------------------------------------------------------------ revno: 113867 committer: Paul Eggert branch nick: trunk timestamp: Wed 2013-08-14 00:05:54 -0700 message: * xdisp.c (cursor_type_changed): Now static. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-14 07:00:25 +0000 +++ src/ChangeLog 2013-08-14 07:05:54 +0000 @@ -1,5 +1,7 @@ 2013-08-14 Paul Eggert + * xdisp.c (cursor_type_changed): Now static. + * image.c (imagemagick_filename_hint): New arg HINT_BUFFER. Use changed. This avoids the need to call xmalloc and for the caller to call xfree, and avoids memory leaks in some situations. === modified file 'src/window.h' --- src/window.h 2013-08-14 05:41:48 +0000 +++ src/window.h 2013-08-14 07:05:54 +0000 @@ -906,10 +906,6 @@ extern int windows_or_buffers_changed; -/* Nonzero means a frame's cursor type has been changed. */ - -extern int cursor_type_changed; - /* If *ROWS or *COLS are too small a size for FRAME, set them to the minimum allowable size. */ === modified file 'src/xdisp.c' --- src/xdisp.c 2013-08-14 06:06:56 +0000 +++ src/xdisp.c 2013-08-14 07:05:54 +0000 @@ -524,7 +524,7 @@ /* Nonzero means a frame's cursor type has been changed. */ -int cursor_type_changed; +static int cursor_type_changed; /* Nonzero after display_mode_line if %l was used and it displayed a line number. */ ------------------------------------------------------------ revno: 113866 committer: Paul Eggert branch nick: trunk timestamp: Wed 2013-08-14 00:00:25 -0700 message: * image.c (imagemagick_filename_hint): New arg HINT_BUFFER. Use changed. This avoids the need to call xmalloc and for the caller to call xfree, and avoids memory leaks in some situations. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-14 06:06:56 +0000 +++ src/ChangeLog 2013-08-14 07:00:25 +0000 @@ -1,3 +1,9 @@ +2013-08-14 Paul Eggert + + * image.c (imagemagick_filename_hint): New arg HINT_BUFFER. + Use changed. This avoids the need to call xmalloc and for the + caller to call xfree, and avoids memory leaks in some situations. + 2013-08-14 Dmitry Antipov * xdisp.c (adjust_window_ends): Move duplicated code to new function. === modified file 'src/image.c' --- src/image.c 2013-08-14 04:27:32 +0000 +++ src/image.c 2013-08-14 07:00:25 +0000 @@ -7845,35 +7845,27 @@ } /* Possibly give ImageMagick some extra help to determine the image - type by supplying a "dummy" filename based on the Content-Type. */ + type by supplying a "dummy" filename based on the Content-Type. */ -static char* -imagemagick_filename_hint (Lisp_Object spec) +static char * +imagemagick_filename_hint (Lisp_Object spec, char hint_buffer[MaxTextExtent]) { - Lisp_Object format = image_spec_value (spec, intern (":format"), NULL); - Lisp_Object val, symbol = intern ("image-format-suffixes"); - const char *prefix = "/tmp/foo."; - char *name; - - if (NILP (Fboundp (symbol))) - return NULL; - - val = Fassq (format, Fsymbol_value (symbol)); - if (! CONSP (val)) - return NULL; - - val = Fcdr (val); - if (! CONSP (val)) - return NULL; - - val = Fcar (val); + Lisp_Object symbol = intern ("image-format-suffixes"); + Lisp_Object val = find_symbol_value (symbol); + Lisp_Object format; + + if (! CONSP (val)) + return NULL; + + format = image_spec_value (spec, intern (":format"), NULL); + val = Fcar_safe (Fcdr_safe (Fassq (format, val))); if (! STRINGP (val)) return NULL; - name = xmalloc (strlen (prefix) + SBYTES (val) + 1); - strcpy (name, prefix); - strcat (name, SSDATA (val)); - return name; + /* It's OK to truncate the hint if it has MaxTextExtent or more bytes, + as ImageMagick would ignore the extra bytes anyway. */ + snprintf (hint_buffer, MaxTextExtent, "/tmp/foo.%s", SSDATA (val)); + return hint_buffer; } /* Helper function for imagemagick_load, which does the actual loading @@ -7909,6 +7901,7 @@ int desired_width, desired_height; double rotation; int pixelwidth; + char hint_buffer[MaxTextExtent]; char *filename_hint = NULL; /* Handle image index for image types who can contain more than one image. @@ -7923,15 +7916,14 @@ ping_wand = NewMagickWand (); /* MagickSetResolution (ping_wand, 2, 2); (Bug#10112) */ - if (! filename) - filename_hint = imagemagick_filename_hint (img->spec); - - if (filename_hint) - MagickSetFilename (ping_wand, filename_hint); - - status = filename - ? MagickPingImage (ping_wand, filename) - : MagickPingImageBlob (ping_wand, contents, size); + if (filename) + status = MagickPingImage (ping_wand, filename); + else + { + filename_hint = imagemagick_filename_hint (img->spec, hint_buffer); + MagickSetFilename (ping_wand, filename_hint); + status = MagickPingImageBlob (ping_wand, contents, size); + } if (status == MagickFalse) { @@ -7961,13 +7953,15 @@ image_wand = NewMagickWand (); - if (filename_hint) - MagickSetFilename (image_wand, filename_hint); + if (filename) + status = MagickReadImage (image_wand, filename); + else + { + MagickSetFilename (image_wand, filename_hint); + status = MagickReadImageBlob (image_wand, contents, size); + } - if ((filename - ? MagickReadImage (image_wand, filename) - : MagickReadImageBlob (image_wand, contents, size)) - == MagickFalse) + if (status == MagickFalse) { imagemagick_error (image_wand); goto imagemagick_error; @@ -8207,16 +8201,11 @@ /* `MagickWandTerminus' terminates the imagemagick environment. */ MagickWandTerminus (); - if (filename_hint) - free (filename_hint); - return 1; imagemagick_error: DestroyMagickWand (image_wand); if (bg_wand) DestroyPixelWand (bg_wand); - if (filename_hint) - free (filename_hint); MagickWandTerminus (); /* TODO more cleanup. */ ------------------------------------------------------------ revno: 113865 committer: Dmitry Antipov branch nick: trunk timestamp: Wed 2013-08-14 10:06:56 +0400 message: * xdisp.c (adjust_window_ends): Move duplicated code to new function. (try_window, try_window_reusing_current_matrix, try_window_id): Use it. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-14 05:41:48 +0000 +++ src/ChangeLog 2013-08-14 06:06:56 +0000 @@ -1,5 +1,10 @@ 2013-08-14 Dmitry Antipov + * xdisp.c (adjust_window_ends): Move duplicated code to new function. + (try_window, try_window_reusing_current_matrix, try_window_id): Use it. + +2013-08-14 Dmitry Antipov + * window.h (struct window): Convert window_end_pos and window_end_vpos from Lisp_Object to ptrdiff_t and int, respectively. (wset_window_end_pos, wset_window_end_vpos): Remove. === modified file 'src/xdisp.c' --- src/xdisp.c 2013-08-14 05:41:48 +0000 +++ src/xdisp.c 2013-08-14 06:06:56 +0000 @@ -2461,7 +2461,16 @@ #endif /* HAVE_WINDOW_SYSTEM */ - +static void +adjust_window_ends (struct window *w, struct glyph_row *row, bool current) +{ + eassert (w); + w->window_end_pos = Z - MATRIX_ROW_END_CHARPOS (row); + w->window_end_bytepos = Z_BYTE - MATRIX_ROW_END_BYTEPOS (row); + w->window_end_vpos + = MATRIX_ROW_VPOS (row, current ? w->current_matrix : w->desired_matrix); +} + /*********************************************************************** Lisp form evaluation ***********************************************************************/ @@ -16291,9 +16300,7 @@ if (last_text_row) { eassert (MATRIX_ROW_DISPLAYS_TEXT_P (last_text_row)); - w->window_end_bytepos = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row); - w->window_end_pos = Z - MATRIX_ROW_END_CHARPOS (last_text_row); - w->window_end_vpos = MATRIX_ROW_VPOS (last_text_row, w->desired_matrix); + adjust_window_ends (w, last_text_row, 0); eassert (MATRIX_ROW_DISPLAYS_TEXT_P (MATRIX_ROW (w->desired_matrix, w->window_end_vpos))); @@ -16526,23 +16533,9 @@ The value of last_text_row is the last displayed line containing text. */ if (last_reused_text_row) - { - w->window_end_bytepos - = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_reused_text_row); - w->window_end_pos - = Z - MATRIX_ROW_END_CHARPOS (last_reused_text_row); - w->window_end_vpos - = MATRIX_ROW_VPOS (last_reused_text_row, w->current_matrix); - } + adjust_window_ends (w, last_reused_text_row, 1); else if (last_text_row) - { - w->window_end_bytepos - = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row); - w->window_end_pos - = Z - MATRIX_ROW_END_CHARPOS (last_text_row); - w->window_end_vpos - = MATRIX_ROW_VPOS (last_text_row, w->desired_matrix); - } + adjust_window_ends (w, last_text_row, 0); else { /* This window must be completely empty. */ @@ -16733,14 +16726,7 @@ the window end is in reused rows which in turn means that only its vpos can have changed. */ if (last_text_row) - { - w->window_end_bytepos - = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row); - w->window_end_pos - = Z - MATRIX_ROW_END_CHARPOS (last_text_row); - w->window_end_vpos - = MATRIX_ROW_VPOS (last_text_row, w->desired_matrix); - } + adjust_window_ends (w, last_text_row, 0); else w->window_end_vpos -= nrows_scrolled; @@ -17748,21 +17734,13 @@ row = find_last_row_displaying_text (w->current_matrix, &it, first_unchanged_at_end_row); eassert (row && MATRIX_ROW_DISPLAYS_TEXT_P (row)); - - w->window_end_pos = Z - MATRIX_ROW_END_CHARPOS (row); - w->window_end_bytepos = Z_BYTE - MATRIX_ROW_END_BYTEPOS (row); - w->window_end_vpos = MATRIX_ROW_VPOS (row, w->current_matrix); + adjust_window_ends (w, row, 1); eassert (w->window_end_bytepos >= 0); IF_DEBUG (debug_method_add (w, "A")); } else if (last_text_row_at_end) { - w->window_end_pos - = Z - MATRIX_ROW_END_CHARPOS (last_text_row_at_end); - w->window_end_bytepos - = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row_at_end); - w->window_end_vpos - = MATRIX_ROW_VPOS (last_text_row_at_end, desired_matrix); + adjust_window_ends (w, last_text_row_at_end, 0); eassert (w->window_end_bytepos >= 0); IF_DEBUG (debug_method_add (w, "B")); } @@ -17771,11 +17749,7 @@ /* We have displayed either to the end of the window or at the end of the window, i.e. the last row with text is to be found in the desired matrix. */ - w->window_end_pos - = Z - MATRIX_ROW_END_CHARPOS (last_text_row); - w->window_end_bytepos - = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row); - w->window_end_vpos = MATRIX_ROW_VPOS (last_text_row, desired_matrix); + adjust_window_ends (w, last_text_row, 0); eassert (w->window_end_bytepos >= 0); } else if (first_unchanged_at_end_row == NULL