------------------------------------------------------------ revno: 117333 committer: Glenn Morris branch nick: trunk timestamp: Fri 2014-06-13 19:05:00 -0400 message: With GNU make, MFLAGS is not needed * Makefile.in (CC, CFLAGS, LDFLAGS, CPPFLAGS, abs_top_srcdir): Remove, no longer used. (lib, lib-src, lisp, nt, src, blessmail, install-arch-dep) (install-nt, install-strip, uninstall, uninstall-nt) (mostlyclean, clean, distclean, bootstrap-clean) (maintainer-clean, extraclean, TAGS, tags, check, $(DOCS)): ($(INSTALL_DOC), $(UNINSTALL_DOC), info, bootstrap, check-declare): GNU make automatically passes command-line arguments to sub-makes. * admin/unidata/Makefile.in (${DSTDIR}/charprop.el): GNU make automatically passes command-line arguments to sub-makes. * lib-src/Makefile.in (../lib/libgnu.a): GNU make automatically passes command-line arguments to sub-makes. * lisp/Makefile.in ($(lisp)/cus-load.el, $(lisp)/finder-inf.el) (autoloads, $(lisp)/subdirs.el, compile-main, leim, semantic, compile) (compile-always): GNU make automatically passes command-line arguments to sub-makes. * lwlib/Makefile.in ($(globals_h)): GNU make automatically passes command-line arguments to sub-makes. * src/Makefile.in ($(leimdir)/leim-list.el, $(srcdir)/macuvs.h) ($(lispsource)/international/charprop.el) ($(libsrc)/make-docfile$(EXEEXT), $(lwlibdir)/liblw.a) ($(oldXMenudir)/libXMenu11.a, ns-app, .el.elc) ($(lispsource)/loaddefs.el, bootstrap-emacs$(EXEEXT)): GNU make automatically passes command-line arguments to sub-makes. * test/automated/Makefile.in (compile-main): GNU make automatically passes command-line arguments to sub-makes. diff: === modified file 'ChangeLog' --- ChangeLog 2014-06-11 17:51:27 +0000 +++ ChangeLog 2014-06-13 23:05:00 +0000 @@ -1,3 +1,14 @@ +2014-06-13 Glenn Morris + + * Makefile.in (CC, CFLAGS, LDFLAGS, CPPFLAGS, abs_top_srcdir): + Remove, no longer used. + (lib, lib-src, lisp, nt, src, blessmail, install-arch-dep) + (install-nt, install-strip, uninstall, uninstall-nt) + (mostlyclean, clean, distclean, bootstrap-clean) + (maintainer-clean, extraclean, TAGS, tags, check, $(DOCS)): + ($(INSTALL_DOC), $(UNINSTALL_DOC), info, bootstrap, check-declare): + GNU make automatically passes command-line arguments to sub-makes. + 2014-06-11 Paul Eggert Use a shell function in configure.ac to cut down on code duplication. === modified file 'Makefile.in' --- Makefile.in 2014-06-10 02:15:49 +0000 +++ Makefile.in 2014-06-13 23:05:00 +0000 @@ -81,10 +81,6 @@ AUTOHEADER = @AUTOHEADER@ ACLOCAL = @ACLOCAL@ -CC=@CC@ -CFLAGS=@CFLAGS@ -LDFLAGS=@LDFLAGS@ -CPPFLAGS=@CPPFLAGS@ EXEEXT=@EXEEXT@ ### These help us choose version- and architecture-specific directories @@ -170,8 +166,6 @@ # We use $(srcdir) explicitly in dependencies so as not to depend on VPATH. srcdir=@srcdir@ abs_srcdir=@abs_srcdir@ -# MinGW CPPFLAGS may use this. -abs_top_srcdir=@abs_top_srcdir@ # Where the manpage source files are kept. mansrcdir=$(srcdir)/doc/man @@ -364,9 +358,7 @@ # These targets should be "${SUBDIR} without `src'". lib lib-src lisp nt: Makefile - cd $@ && $(MAKE) all $(MFLAGS) \ - CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' \ - LDFLAGS='${LDFLAGS}' MAKE='${MAKE}' + cd $@ && $(MAKE) all # Pass to src/Makefile.in an additional BOOTSTRAPEMACS variable which # is either set to bootstrap-emacs (in case bootstrap-emacs has not been @@ -389,14 +381,10 @@ cd $@ || exit; \ boot=bootstrap-emacs$(EXEEXT); \ [ ! -x "$$boot" ] || boot=''; \ - $(MAKE) all $(MFLAGS) \ - CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' \ - LDFLAGS='${LDFLAGS}' MAKE='${MAKE}' BOOTSTRAPEMACS="$$boot" \ - VCSWITNESS="$$vcswitness" + $(MAKE) all BOOTSTRAPEMACS="$$boot" VCSWITNESS="$$vcswitness" blessmail: Makefile src - cd lib-src && $(MAKE) maybe-blessmail $(MFLAGS) \ - MAKE='${MAKE}' archlibdir='$(archlibdir)' + cd lib-src && $(MAKE) maybe-blessmail # We used to have one rule per */Makefile.in, but that leads to race # conditions with parallel makes, so let's assume that the time stamp on @@ -489,11 +477,7 @@ ### Lisp files and DOC file to work properly. install-arch-dep: src install-arch-indep install-etcdoc install-$(NTDIR) umask 022; ${MKDIR_P} "$(DESTDIR)${bindir}" - cd lib-src && \ - $(MAKE) install $(MFLAGS) prefix="${prefix}" \ - exec_prefix="${exec_prefix}" bindir="${bindir}" \ - libexecdir="${libexecdir}" archlibdir="${archlibdir}" \ - INSTALL_STRIP=${INSTALL_STRIP} + cd lib-src && $(MAKE) install if test "${ns_self_contained}" = "no"; then \ ${INSTALL_PROGRAM} $(INSTALL_STRIP) src/emacs${EXEEXT} "$(DESTDIR)${bindir}/$(EMACSFULL)" || exit 1 ; \ chmod 1755 "$(DESTDIR)${bindir}/$(EMACSFULL)" || true; \ @@ -511,12 +495,7 @@ ### in nt/, and its Posix do-nothing shadow. install-: install-nt: - cd $(NTDIR) && \ - $(MAKE) install $(MFLAGS) prefix="${prefix}" \ - exec_prefix="${exec_prefix}" bindir="${bindir}" \ - libexecdir="${libexecdir}" archlibdir="${archlibdir}" \ - datadir="${datadir}" \ - INSTALL_STRIP=${INSTALL_STRIP} + cd $(NTDIR) && $(MAKE) install ## In the share directory, we are deleting: ## applications (with emacs.desktop, also found in etc/) @@ -729,19 +708,14 @@ ### Build Emacs and install it, stripping binaries while installing them. install-strip: - $(MAKE) $(MFLAGS) INSTALL_STRIP=-s install + $(MAKE) INSTALL_STRIP=-s install ### Delete all the installed files that the `install' target would ### create (but not the noninstalled files such as `make all' would create). ### ### Don't delete the lisp and etc directories if they're in the source tree. uninstall: uninstall-$(NTDIR) uninstall-doc - cd lib-src && \ - $(MAKE) $(MFLAGS) uninstall \ - prefix="${prefix}" exec_prefix="${exec_prefix}" \ - bindir="${bindir}" libexecdir="${libexecdir}" \ - archlibdir="${archlibdir}" - + cd lib-src && $(MAKE) uninstall -unset CDPATH; \ for dir in "$(DESTDIR)${lispdir}" "$(DESTDIR)${etcdir}" ; do \ if [ -d "$${dir}" ]; then \ @@ -790,11 +764,7 @@ ### in nt/, and its Posix do-nothing shadow. uninstall-: uninstall-nt: - cd $(NTDIR) && \ - $(MAKE) $(MFLAGS) uninstall \ - prefix="${prefix}" exec_prefix="${exec_prefix}" \ - bindir="${bindir}" libexecdir="${libexecdir}" \ - archlibdir="${archlibdir}" + cd $(NTDIR) && $(MAKE) uninstall # ==================== Cleaning up and miscellanea ==================== @@ -806,16 +776,16 @@ ### target for GCC does not delete `libgcc.a', because recompiling it ### is rarely necessary and takes a lot of time. mostlyclean: - cd src && $(MAKE) $(MFLAGS) mostlyclean - cd oldXMenu && $(MAKE) $(MFLAGS) mostlyclean - cd lwlib && $(MAKE) $(MFLAGS) mostlyclean - cd lib && $(MAKE) $(MFLAGS) mostlyclean - cd lib-src && $(MAKE) $(MFLAGS) mostlyclean - cd nt && $(MAKE) $(MFLAGS) mostlyclean - -cd doc/emacs && $(MAKE) $(MFLAGS) mostlyclean - -cd doc/misc && $(MAKE) $(MFLAGS) mostlyclean - -cd doc/lispref && $(MAKE) $(MFLAGS) mostlyclean - -cd doc/lispintro && $(MAKE) $(MFLAGS) mostlyclean + cd src && $(MAKE) mostlyclean + cd oldXMenu && $(MAKE) mostlyclean + cd lwlib && $(MAKE) mostlyclean + cd lib && $(MAKE) mostlyclean + cd lib-src && $(MAKE) mostlyclean + cd nt && $(MAKE) mostlyclean + -cd doc/emacs && $(MAKE) mostlyclean + -cd doc/misc && $(MAKE) mostlyclean + -cd doc/lispref && $(MAKE) mostlyclean + -cd doc/lispintro && $(MAKE) mostlyclean ### `clean' ### Delete all files from the current directory that are normally @@ -827,17 +797,17 @@ ### Delete `.dvi' files here if they are not part of the distribution. clean: -rm -f etc/emacs.tmpdesktop - cd src && $(MAKE) $(MFLAGS) clean - cd oldXMenu && $(MAKE) $(MFLAGS) clean - cd lwlib && $(MAKE) $(MFLAGS) clean - cd lib && $(MAKE) $(MFLAGS) clean - cd lib-src && $(MAKE) $(MFLAGS) clean - cd nt && $(MAKE) $(MFLAGS) clean - -cd doc/emacs && $(MAKE) $(MFLAGS) clean - -cd doc/misc && $(MAKE) $(MFLAGS) clean - -cd doc/lispref && $(MAKE) $(MFLAGS) clean - -cd doc/lispintro && $(MAKE) $(MFLAGS) clean - cd nextstep && $(MAKE) $(MFLAGS) clean + cd src && $(MAKE) clean + cd oldXMenu && $(MAKE) clean + cd lwlib && $(MAKE) clean + cd lib && $(MAKE) clean + cd lib-src && $(MAKE) clean + cd nt && $(MAKE) clean + -cd doc/emacs && $(MAKE) clean + -cd doc/misc && $(MAKE) clean + -cd doc/lispref && $(MAKE) clean + -cd doc/lispintro && $(MAKE) clean + cd nextstep && $(MAKE) clean ### `bootclean' ### Delete all files that need to be remade for a clean bootstrap. @@ -853,21 +823,21 @@ ${top_bootclean}; \ rm -f config.status config.log~ Makefile stamp-h1 ${SUBDIR_MAKEFILES} distclean: - cd src && $(MAKE) $(MFLAGS) distclean - cd oldXMenu && $(MAKE) $(MFLAGS) distclean - cd lwlib && $(MAKE) $(MFLAGS) distclean - cd lib && $(MAKE) $(MFLAGS) distclean - cd lib-src && $(MAKE) $(MFLAGS) distclean - cd nt && $(MAKE) $(MFLAGS) distclean - cd doc/emacs && $(MAKE) $(MFLAGS) distclean - cd doc/misc && $(MAKE) $(MFLAGS) distclean - cd doc/lispref && $(MAKE) $(MFLAGS) distclean - cd doc/lispintro && $(MAKE) $(MFLAGS) distclean - cd leim && $(MAKE) $(MFLAGS) distclean - cd lisp && $(MAKE) $(MFLAGS) distclean - cd nextstep && $(MAKE) $(MFLAGS) distclean + cd src && $(MAKE) distclean + cd oldXMenu && $(MAKE) distclean + cd lwlib && $(MAKE) distclean + cd lib && $(MAKE) distclean + cd lib-src && $(MAKE) distclean + cd nt && $(MAKE) distclean + cd doc/emacs && $(MAKE) distclean + cd doc/misc && $(MAKE) distclean + cd doc/lispref && $(MAKE) distclean + cd doc/lispintro && $(MAKE) distclean + cd leim && $(MAKE) distclean + cd lisp && $(MAKE) distclean + cd nextstep && $(MAKE) distclean for dir in test/automated admin/grammars admin/unidata; do \ - [ ! -d $$dir ] || (cd $$dir && $(MAKE) $(MFLAGS) distclean); \ + [ ! -d $$dir ] || (cd $$dir && $(MAKE) distclean); \ done ${top_distclean} @@ -875,21 +845,21 @@ ### Delete everything that can be reconstructed by `make' and that ### needs to be deleted in order to force a bootstrap from a clean state. bootstrap-clean: - cd src && $(MAKE) $(MFLAGS) bootstrap-clean - cd oldXMenu && $(MAKE) $(MFLAGS) maintainer-clean - cd lwlib && $(MAKE) $(MFLAGS) maintainer-clean - cd lib && $(MAKE) $(MFLAGS) maintainer-clean - cd lib-src && $(MAKE) $(MFLAGS) maintainer-clean - cd nt && $(MAKE) $(MFLAGS) maintainer-clean - -cd doc/emacs && $(MAKE) $(MFLAGS) maintainer-clean - -cd doc/misc && $(MAKE) $(MFLAGS) maintainer-clean - -cd doc/lispref && $(MAKE) $(MFLAGS) maintainer-clean - -cd doc/lispintro && $(MAKE) $(MFLAGS) maintainer-clean - cd leim && $(MAKE) $(MFLAGS) bootstrap-clean - cd lisp && $(MAKE) $(MFLAGS) bootstrap-clean - cd nextstep && $(MAKE) $(MFLAGS) maintainer-clean + cd src && $(MAKE) bootstrap-clean + cd oldXMenu && $(MAKE) maintainer-clean + cd lwlib && $(MAKE) maintainer-clean + cd lib && $(MAKE) maintainer-clean + cd lib-src && $(MAKE) maintainer-clean + cd nt && $(MAKE) maintainer-clean + -cd doc/emacs && $(MAKE) maintainer-clean + -cd doc/misc && $(MAKE) maintainer-clean + -cd doc/lispref && $(MAKE) maintainer-clean + -cd doc/lispintro && $(MAKE) maintainer-clean + cd leim && $(MAKE) bootstrap-clean + cd lisp && $(MAKE) bootstrap-clean + cd nextstep && $(MAKE) maintainer-clean for dir in test/automated admin/grammars admin/unidata; do \ - [ ! -d $$dir ] || (cd $$dir && $(MAKE) $(MFLAGS) bootstrap-clean); \ + [ ! -d $$dir ] || (cd $$dir && $(MAKE) bootstrap-clean); \ done [ ! -f config.log ] || mv -f config.log config.log~ rm -rf ${srcdir}/info @@ -910,11 +880,11 @@ ${top_distclean}; \ rm -fr autom4te.cache maintainer-clean: bootstrap-clean - cd src && $(MAKE) $(MFLAGS) maintainer-clean - cd leim && $(MAKE) $(MFLAGS) maintainer-clean - cd lisp && $(MAKE) $(MFLAGS) maintainer-clean + cd src && $(MAKE) maintainer-clean + cd leim && $(MAKE) maintainer-clean + cd lisp && $(MAKE) maintainer-clean for dir in test/automated admin/grammars admin/unidata; do \ - [ ! -d $$dir ] || (cd $$dir && $(MAKE) $(MFLAGS) maintainer-clean); \ + [ ! -d $$dir ] || (cd $$dir && $(MAKE) maintainer-clean); \ done ${top_maintainer_clean} @@ -923,7 +893,7 @@ ### the coding standards seem to come from. It's like distclean, but ### it deletes backup and autosave files too. extraclean: - for i in ${SUBDIR}; do (cd $$i; $(MAKE) $(MFLAGS) extraclean); done + for i in ${SUBDIR}; do (cd $$i; $(MAKE) extraclean); done ${top_maintainer_clean} -rm -f config-tmp-* -rm -f *~ \#* @@ -932,14 +902,14 @@ # even when the build directory and source dir are different. .PHONY: TAGS tags TAGS tags: lib lib-src src - cd src; $(MAKE) $(MFLAGS) tags + cd src && $(MAKE) tags check: all @if test ! -d test/automated; then \ echo "You do not seem to have the test/ directory."; \ echo "Maybe you are using a release tarfile, rather than a repository checkout."; \ else \ - cd test/automated && $(MAKE) $(MFLAGS) check; \ + cd test/automated && $(MAKE) check; \ fi dist: @@ -953,7 +923,7 @@ DOCS = $(DVIS) $(HTMLS) $(INFOS) $(PDFS) $(PSS) $(DOCS): - t=$@; IFS=-; set $$t; IFS=; cd doc/$$1 && $(MAKE) $(MFLAGS) $$2 + t=$@; IFS=-; set $$t; IFS=; cd doc/$$1 && $(MAKE) $$2 .PHONY: $(DOCS) docs pdf ps .PHONY: info dvi dist check html info-real info-dir check-info @@ -1002,7 +972,7 @@ ## Install non .info forms of the documentation. ## TODO add etc/refcards. $(INSTALL_DOC): - t=$@; IFS=-; set $$t; IFS=; cd doc/$$2 && $(MAKE) $(MFLAGS) $$1-$$3 + t=$@; IFS=-; set $$t; IFS=; cd doc/$$2 && $(MAKE) $$1-$$3 .PHONY: $(INSTALL_DOC) install-doc .PHONY: install-dvi install-html install-pdf install-ps @@ -1025,7 +995,7 @@ UNINSTALL_DOC = $(UNINSTALL_DVI) $(UNINSTALL_HTML) $(UNINSTALL_PDF) $(UNINSTALL_PS) $(UNINSTALL_DOC): - t=$@; IFS=-; set $$t; IFS=; cd doc/$$2 && $(MAKE) $(MFLAGS) $$1-$$3 + t=$@; IFS=-; set $$t; IFS=; cd doc/$$2 && $(MAKE) $$1-$$3 .PHONY: $(UNINSTALL_DOC) uninstall-doc .PHONY: uninstall-dvi uninstall-html uninstall-pdf uninstall-ps @@ -1052,7 +1022,7 @@ @if test "$(HAVE_MAKEINFO)" = "no"; then \ echo "Configured --without-makeinfo, not building manuals" ; \ else \ - $(MAKE) $(MFLAGS) info-real info-dir; \ + $(MAKE) info-real info-dir; \ fi ## build-aux/make-info-dir expects only certain dircategories. @@ -1092,8 +1062,8 @@ # * Do the actual build. bootstrap: bootstrap-clean cd $(srcdir) && ./autogen.sh - $(MAKE) $(MFLAGS) MAKEFILE_NAME=force-Makefile force-Makefile - $(MAKE) $(MFLAGS) all + $(MAKE) MAKEFILE_NAME=force-Makefile force-Makefile + $(MAKE) all .PHONY: check-declare @@ -1102,4 +1072,4 @@ echo "You must build Emacs to use this command"; \ exit 1; \ fi - cd lisp && $(MAKE) $(MFLAGS) $@ + cd lisp && $(MAKE) $@ === modified file 'admin/ChangeLog' --- admin/ChangeLog 2014-06-02 00:18:22 +0000 +++ admin/ChangeLog 2014-06-13 23:05:00 +0000 @@ -1,3 +1,8 @@ +2014-06-13 Glenn Morris + + * unidata/Makefile.in (${DSTDIR}/charprop.el): + GNU make automatically passes command-line arguments to sub-makes. + 2014-06-02 Paul Eggert Include sources used to create macuvs.h. === modified file 'admin/unidata/Makefile.in' --- admin/unidata/Makefile.in 2014-05-26 15:48:28 +0000 +++ admin/unidata/Makefile.in 2014-06-13 23:05:00 +0000 @@ -52,7 +52,7 @@ ## uni-*.el files just because .elc is missing. ## Same for UnicodeData.txt v unidata.txt. ${DSTDIR}/charprop.el: ${srcdir}/unidata-gen.el ${srcdir}/UnicodeData.txt - ${MAKE} ${MFLAGS} compile unidata.txt EMACS="${EMACS}" + ${MAKE} compile unidata.txt EMACS="${EMACS}" -if [ -f "$@" ]; then \ cd ${DSTDIR} && chmod +w charprop.el `sed -n 's/^;; FILE: //p' < charprop.el`; \ fi === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2014-05-26 16:55:28 +0000 +++ lib-src/ChangeLog 2014-06-13 23:05:00 +0000 @@ -1,3 +1,8 @@ +2014-06-13 Glenn Morris + + * Makefile.in (../lib/libgnu.a): + GNU make automatically passes command-line arguments to sub-makes. + 2014-05-26 Eli Zaretskii * ntlib.h (lseek): Don't redirect to _lseek. === modified file 'lib-src/Makefile.in' --- lib-src/Makefile.in 2014-05-18 18:57:04 +0000 +++ lib-src/Makefile.in 2014-06-13 23:05:00 +0000 @@ -304,7 +304,7 @@ etags *.[ch] ../lib/libgnu.a: $(config_h) - cd ../lib && $(MAKE) $(MFLAGS) libgnu.a + cd ../lib && $(MAKE) libgnu.a regex.o: $(srcdir)/../src/regex.c $(srcdir)/../src/regex.h $(config_h) ${CC} -c ${CPP_CFLAGS} ${srcdir}/../src/regex.c === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-06-13 19:37:52 +0000 +++ lisp/ChangeLog 2014-06-13 23:05:00 +0000 @@ -1,5 +1,10 @@ 2014-06-13 Glenn Morris + * Makefile.in ($(lisp)/cus-load.el, $(lisp)/finder-inf.el) + (autoloads, $(lisp)/subdirs.el, compile-main, leim, semantic, compile) + (compile-always): GNU make automatically passes + command-line arguments to sub-makes. + * calendar/calendar.el (calendar-generate-window): Remove pointless call to font-lock-fontify-buffer. === modified file 'lisp/Makefile.in' --- lisp/Makefile.in 2014-06-02 01:10:47 +0000 +++ lisp/Makefile.in 2014-06-13 23:05:00 +0000 @@ -168,7 +168,7 @@ # since they will never contain any useful information # (see finder-no-scan-regexp and custom-dependencies-no-scan-regexp). $(lisp)/cus-load.el: - $(MAKE) $(MFLAGS) custom-deps + $(MAKE) custom-deps custom-deps: doit $(setwins_almost); \ echo Directories: $$wins; \ @@ -177,7 +177,7 @@ -f custom-make-dependencies $$wins $(lisp)/finder-inf.el: - $(MAKE) $(MFLAGS) finder-data + $(MAKE) finder-data finder-data: doit $(setwins_finder); \ echo Directories: $$wins; \ @@ -200,7 +200,7 @@ --eval '(setq autoload-builtin-package-versions t)' \ --eval '(setq generated-autoload-file (expand-file-name (unmsys--file-name "$(srcdir)/loaddefs.el")))' \ -f batch-update-autoloads $$wins - $(MAKE) $(MFLAGS) obsolete-autoloads + $(MAKE) obsolete-autoloads # The obsolete/ subdirectory is normally not scanned for autoloads. # Sometimes we still want to autoload something from that directory, @@ -215,7 +215,7 @@ # This is required by the bootstrap-emacs target in ../src/Makefile, so # we know that if we have an emacs executable, we also have a subdirs.el. $(lisp)/subdirs.el: - $(MAKE) $(MFLAGS) update-subdirs + $(MAKE) update-subdirs update-subdirs: doit $(setwins_for_subdirs); \ for file in $$wins; do \ @@ -307,7 +307,7 @@ compile-first: $(COMPILE_FIRST) # In `compile-main' we could directly do -# ... | xargs $(MAKE) $(MFLAGS) EMACS="$(EMACS)" +# ... | xargs $(MAKE) EMACS="$(EMACS)" # and it works, but it generates a lot of messages like # make[2]: gnus/gnus-mlspl.elc is up to date. # so instead, we use "xargs echo" to split the list of file into manageable @@ -331,7 +331,7 @@ echo "$${el}c"; \ done | xargs $(XARGS_LIMIT) echo) | \ while read chunk; do \ - $(MAKE) $(MFLAGS) compile-targets EMACS="$(EMACS)" TARGETS="$$chunk"; \ + $(MAKE) compile-targets EMACS="$(EMACS)" TARGETS="$$chunk"; \ done .PHONY: compile-clean @@ -348,7 +348,7 @@ .PHONY: leim semantic leim: - cd ../leim && $(MAKE) $(MFLAGS) all EMACS="$(EMACS)" + cd ../leim && $(MAKE) all EMACS="$(EMACS)" # FIXME. Yuck. semantic: @@ -356,7 +356,7 @@ .*) EMACS="../${EMACS}" ;; \ *) EMACS="${EMACS}" ;; \ esac; \ - cd ../admin/grammars && $(MAKE) $(MFLAGS) all EMACS="$${EMACS}" + cd ../admin/grammars && $(MAKE) all EMACS="$${EMACS}" # Compile all Lisp files, but don't recompile those that are up to # date. Some .el files don't get compiled because they set the @@ -365,14 +365,14 @@ # Explicitly pass EMACS (sometimes ../src/bootstrap-emacs) to those # sub-makes that run rules that use it, for the sake of some non-GNU makes. compile: $(LOADDEFS) autoloads compile-first - $(MAKE) $(MFLAGS) compile-main EMACS="$(EMACS)" + $(MAKE) compile-main EMACS="$(EMACS)" # Compile all Lisp files. This is like `compile' but compiles files # unconditionally. Some files don't actually get compiled because they # set the local variable no-byte-compile. compile-always: doit cd $(lisp) && rm -f *.elc */*.elc */*/*.elc */*/*/*.elc - $(MAKE) $(MFLAGS) compile EMACS="$(EMACS)" + $(MAKE) compile EMACS="$(EMACS)" .PHONY: backup-compiled-files compile-after-backup === modified file 'lwlib/ChangeLog' --- lwlib/ChangeLog 2014-06-04 03:20:11 +0000 +++ lwlib/ChangeLog 2014-06-13 23:05:00 +0000 @@ -1,3 +1,8 @@ +2014-06-13 Glenn Morris + + * Makefile.in ($(globals_h)): + GNU make automatically passes command-line arguments to sub-makes. + 2014-06-04 Dmitry Antipov * lwlib-widget.h (widget_value) [USE_X_TOOLKIT]: Use X toolkit === modified file 'lwlib/Makefile.in' --- lwlib/Makefile.in 2014-01-01 07:43:34 +0000 +++ lwlib/Makefile.in 2014-06-13 23:05:00 +0000 @@ -80,7 +80,7 @@ src_h = $(config_h) $(lisp_h) $(globals_h) $(globals_h): - cd ../src && $(MAKE) $(MFLAGS) globals.h + cd ../src && $(MAKE) globals.h lwlib-utils.o: $(src_h) lwlib-utils.c lwlib-utils.h lwlib.h lwlib.o: $(src_h) lwlib.c lwlib.h lwlib-int.h lwlib-utils.h \ === modified file 'src/ChangeLog' --- src/ChangeLog 2014-06-13 15:55:48 +0000 +++ src/ChangeLog 2014-06-13 23:05:00 +0000 @@ -1,3 +1,12 @@ +2014-06-13 Glenn Morris + + * Makefile.in ($(leimdir)/leim-list.el, $(srcdir)/macuvs.h) + ($(lispsource)/international/charprop.el) + ($(libsrc)/make-docfile$(EXEEXT), $(lwlibdir)/liblw.a) + ($(oldXMenudir)/libXMenu11.a, ns-app, .el.elc) + ($(lispsource)/loaddefs.el, bootstrap-emacs$(EXEEXT)): + GNU make automatically passes command-line arguments to sub-makes. + 2014-06-13 Paul Eggert Avoid hangs in accept-process-output (Bug#17647). === modified file 'src/Makefile.in' --- src/Makefile.in 2014-06-03 07:28:07 +0000 +++ src/Makefile.in 2014-06-13 23:05:00 +0000 @@ -414,11 +414,11 @@ .PHONY: all $(leimdir)/leim-list.el: bootstrap-emacs$(EXEEXT) - cd ../leim && $(MAKE) $(MFLAGS) leim-list.el EMACS="$(bootstrap_exe)" + cd ../leim && $(MAKE) leim-list.el EMACS="$(bootstrap_exe)" $(srcdir)/macuvs.h $(lispsource)/international/charprop.el: \ bootstrap-emacs$(EXEEXT) - cd ../admin/unidata && $(MAKE) $(MFLAGS) all EMACS="../$(bootstrap_exe)" + cd ../admin/unidata && $(MAKE) all EMACS="../$(bootstrap_exe)" ## The dumped Emacs is as functional and more efficient than ## bootstrap-emacs, so we replace the latter with the former. @@ -459,7 +459,7 @@ $(libsrc)/make-docfile -a $(etc)/DOC -d $(lispsource) `sed -n -e 's| \\\\||' -e 's|^[ ]*$$(lispsource)/||p' $(srcdir)/lisp.mk` $(libsrc)/make-docfile$(EXEEXT): - cd $(libsrc); $(MAKE) $(MFLAGS) make-docfile$(EXEEXT) + cd $(libsrc); $(MAKE) make-docfile$(EXEEXT) buildobj.h: Makefile for i in $(ALLOBJS); do \ @@ -499,13 +499,9 @@ ## The following oldxmenu-related rules are only (possibly) used if ## HAVE_X11 && !USE_GTK, but there is no harm in always defining them. $(lwlibdir)/liblw.a: $(config_h) globals.h lisp.h FORCE - cd $(lwlibdir) && \ - $(MAKE) $(MFLAGS) CC='$(CC)' CFLAGS='$(CFLAGS)' MAKE='$(MAKE)' \ - liblw.a + cd $(lwlibdir) && $(MAKE) liblw.a $(oldXMenudir)/libXMenu11.a: FORCE - cd $(oldXMenudir) && \ - $(MAKE) $(MFLAGS) CC='$(CC)' CFLAGS='$(CFLAGS)' MAKE='$(MAKE)' \ - libXMenu11.a + cd $(oldXMenudir) && $(MAKE) libXMenu11.a FORCE: .PHONY: FORCE @@ -523,7 +519,7 @@ -o $@ $(ntsource)/emacs.rc ns-app: emacs$(EXEEXT) - cd ../nextstep && $(MAKE) $(MFLAGS) all + cd ../nextstep && $(MAKE) all .PHONY: mostlyclean clean bootstrap-clean distclean maintainer-clean .PHONY: versionclean extraclean @@ -621,7 +617,7 @@ ## separately below. ## With GNU Make, we would just say "%.el : %.elc $(BOOTSTRAPEMACS)" .el.elc: - @cd ../lisp; $(MAKE) $(MFLAGS) compile-onefile \ + @cd ../lisp && $(MAKE) compile-onefile \ THEFILE=$< EMACS="$(bootstrap_exe)" ## Since the .el.elc rule cannot specify an extra dependency, we do it here. @@ -633,12 +629,12 @@ VCSWITNESS = $(lispsource)/loaddefs.el: $(BOOTSTRAPEMACS) $(VCSWITNESS) - cd ../lisp; $(MAKE) $(MFLAGS) autoloads EMACS="$(bootstrap_exe)" + cd ../lisp && $(MAKE) autoloads EMACS="$(bootstrap_exe)" ## Dump an Emacs executable named bootstrap-emacs containing the ## files from loadup.el in source form. bootstrap-emacs$(EXEEXT): temacs$(EXEEXT) - cd ../lisp; $(MAKE) $(MFLAGS) update-subdirs + cd ../lisp && $(MAKE) update-subdirs if test "$(CANNOT_DUMP)" = "yes"; then \ rm -f bootstrap-emacs$(EXEEXT); \ ln temacs$(EXEEXT) bootstrap-emacs$(EXEEXT); \ @@ -648,7 +644,7 @@ mv -f emacs$(EXEEXT) bootstrap-emacs$(EXEEXT); \ fi @: Compile some files earlier to speed up further compilation. - cd ../lisp; $(MAKE) $(MFLAGS) compile-first EMACS="$(bootstrap_exe)" + cd ../lisp && $(MAKE) compile-first EMACS="$(bootstrap_exe)" ## Insert either autodeps.mk (if AUTO_DEPEND), else deps.mk. @deps_frag@ === modified file 'test/ChangeLog' --- test/ChangeLog 2014-06-05 14:42:45 +0000 +++ test/ChangeLog 2014-06-13 23:05:00 +0000 @@ -1,3 +1,8 @@ +2014-06-13 Glenn Morris + + * automated/Makefile.in (compile-main): + GNU make automatically passes command-line arguments to sub-makes. + 2014-06-05 Michal Nazarewicz * automated/tildify-tests.el (tildify-test--test): Optimise the test === modified file 'test/automated/Makefile.in' --- test/automated/Makefile.in 2014-04-11 06:51:49 +0000 +++ test/automated/Makefile.in 2014-06-13 23:05:00 +0000 @@ -84,7 +84,7 @@ echo "$${el}c"; \ done | xargs $(XARGS_LIMIT) echo | \ while read chunk; do \ - $(MAKE) $(MFLAGS) compile-targets EMACS="$(EMACS)" TARGETS="$$chunk"; \ + $(MAKE) compile-targets EMACS="$(EMACS)" TARGETS="$$chunk"; \ done # Erase left-over .elc files that do not have a corresponding .el file. ------------------------------------------------------------ revno: 117332 committer: Glenn Morris branch nick: trunk timestamp: Fri 2014-06-13 15:40:42 -0400 message: * lisp/eshell/eshell.el: Remove old comment. diff: === modified file 'lisp/eshell/eshell.el' --- lisp/eshell/eshell.el 2014-01-01 07:43:34 +0000 +++ lisp/eshell/eshell.el 2014-06-13 19:40:42 +0000 @@ -170,56 +170,7 @@ ;; @ 4nt ;; @ csh -;;;_* Speeding up load time -;; -;; If you find that Eshell loads too slowly, there is something you -;; can do to speed it up. -;; -;; Create a file, named /tmp/elc, containing this filelist: -;; -;; esh-util.elc -;; eshell.elc -;; esh-module.elc -;; esh-var.elc -;; esh-proc.elc -;; esh-arg.elc -;; esh-io.elc -;; esh-ext.elc -;; esh-cmd.elc -;; esh-mode.elc -;; esh-opt.elc -;; em-alias.elc -;; em-banner.elc -;; em-basic.elc -;; em-cmpl.elc -;; em-dirs.elc -;; em-pred.elc -;; em-glob.elc -;; em-hist.elc -;; em-ls.elc -;; em-prompt.elc -;; em-rebind.elc -;; em-script.elc -;; em-smart.elc -;; em-term.elc -;; em-unix.elc -;; em-xtra.elc -;; -;; The order is very important. Remove from the filelist any features -;; you don't use. These all begin with "em-". If you don't use -;; Eshell's key rebinding module, you can remove "em-rebind.elc" from -;; the filelist. The modules you are currently using are listed in -;; `eshell-modules-list'. -;; -;; Now, concatenating all of the above mentioned .elc files, in that -;; order, to another file. Here is how to do this on UNIX: -;; -;; cat `cat /tmp/elc` > tmp.elc ; mv tmp.elc eshell.elc -;; -;; Now your eshell.elc file contains all of the .elc files that make -;; up Eshell, in the right load order. When you next load Eshell, it -;; will only have to read in this one file, which will greatly speed -;; things up. +;;; Code: (eval-when-compile (require 'cl-lib)) ------------------------------------------------------------ revno: 117331 committer: Glenn Morris branch nick: trunk timestamp: Fri 2014-06-13 15:39:12 -0400 message: * frame.el: Remove old comment. diff: === modified file 'lisp/frame.el' --- lisp/frame.el 2014-05-21 16:35:31 +0000 +++ lisp/frame.el 2014-06-13 19:39:12 +0000 @@ -1,7 +1,6 @@ ;;; frame.el --- multi-frame management independent of window systems -;; Copyright (C) 1993-1994, 1996-1997, 2000-2014 Free Software -;; Foundation, Inc. +;; Copyright (C) 1993-1994, 1996-1997, 2000-2014 Free Software Foundation, Inc. ;; Maintainer: emacs-devel@gnu.org ;; Keywords: internal @@ -149,12 +148,6 @@ ;; 3) Once the init file is done, we apply any newly set parameters ;; in initial-frame-alist to the frame. -;; These are now called explicitly at the proper times, -;; since that is easier to understand. -;; Actually using hooks within Emacs is bad for future maintenance. --rms. -;; (add-hook 'before-init-hook 'frame-initialize) -;; (add-hook 'window-setup-hook 'frame-notice-user-settings) - ;; If we create the initial frame, this is it. (defvar frame-initial-frame nil) ------------------------------------------------------------ revno: 117330 committer: Glenn Morris branch nick: trunk timestamp: Fri 2014-06-13 15:37:52 -0400 message: Remove pointless code in calendar-generate-window * lisp/calendar/calendar.el (calendar-generate-window): Remove pointless call to font-lock-fontify-buffer. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-06-13 15:50:38 +0000 +++ lisp/ChangeLog 2014-06-13 19:37:52 +0000 @@ -1,3 +1,8 @@ +2014-06-13 Glenn Morris + + * calendar/calendar.el (calendar-generate-window): + Remove pointless call to font-lock-fontify-buffer. + 2014-06-13 Matthias Meulien * simple.el (completion-list-mode-map): Navigate with tab and backtab === modified file 'lisp/calendar/calendar.el' --- lisp/calendar/calendar.el 2014-05-29 03:45:29 +0000 +++ lisp/calendar/calendar.el 2014-06-13 19:37:52 +0000 @@ -1,7 +1,6 @@ ;;; calendar.el --- calendar functions -;; Copyright (C) 1988-1995, 1997, 2000-2014 Free Software Foundation, -;; Inc. +;; Copyright (C) 1988-1995, 1997, 2000-2014 Free Software Foundation, Inc. ;; Author: Edward M. Reingold ;; Maintainer: Glenn Morris @@ -1474,8 +1473,6 @@ ;; combined don't fit height to that of its buffer. (set-window-vscroll nil 0)) (sit-for 0)) - (and (bound-and-true-p font-lock-mode) - (font-lock-fontify-buffer)) ;FIXME: Why? (and calendar-mark-holidays-flag ;; (calendar-date-is-valid-p today) ; useful for BC dates (calendar-mark-holidays) ------------------------------------------------------------ revno: 117329 committer: Glenn Morris branch nick: trunk timestamp: Fri 2014-06-13 11:09:06 -0700 message: NEWS copyedits diff: === modified file 'etc/NEWS' --- etc/NEWS 2014-06-11 21:51:44 +0000 +++ etc/NEWS 2014-06-13 18:09:06 +0000 @@ -62,38 +62,38 @@ * Editing Changes in Emacs 24.5 -Emacs now supports "bracketed paste mode" when running on a terminal +** Emacs now supports "bracketed paste mode" when running on a terminal that supports it. This facility allows Emacs to understand pasted -chunks of text as strings to be inserted instead of interpreting each -character in the pasted text as actual user input, resulting in a -paste experience similar to that under a window system and significant +chunks of text as strings to be inserted, instead of interpreting each +character in the pasted text as actual user input. This results in a +paste experience similar to that under a window system, and significant performance improvements when pasting large amounts of text. * Changes in Specialized Modes and Packages in Emacs 24.5 -** rectangle-mark-mode can now have corners past EOL or in the middle of a TAB +** Rectangle Mark mode can now have corners past EOL or in the middle of a TAB. Also C-x C-x in rectangle-mark-mode now cycles through the four corners. -** font-lock -*** New functions font-lock-ensure and font-lock-flush that should be used -instead of font-lock-fontify-buffer when called from Elisp. - ---- -** The Rmail commands d, C-d and u now handle repeat counts -to delete or undelete multiple messages. +** New font-lock functions font-lock-ensure and font-lock-flush, which +should be used instead of font-lock-fontify-buffer when called from Elisp. ** Calendar and diary +++ *** New commands to insert diary entries with Chinese dates: `diary-chinese-insert-anniversary-entry' `diary-chinese-insert-entry' -`diary-chinese-insert-monthly-entry' -`diary-chinese-insert-yearly-entry' +`diary-chinese-insert-monthly-entry', `diary-chinese-insert-yearly-entry'. +++ -*** Calendar can list and mark diary entries with Chinese dates: -`diary-chinese-list-entries' and `diary-chinese-mark-entries'. +*** Calendar can list and mark diary entries with Chinese dates. +See `diary-chinese-list-entries' and `diary-chinese-mark-entries'. + +--- +** The Rmail commands d, C-d and u now handle repeat counts to delete or +undelete multiple messages. + +** SES now supports local printer functions; see `ses-define-local-printer'. ** In sh-mode, you can now use `sh-shell' as a file-local variable to specify the type of shell in use (bash, csh, etc). @@ -108,27 +108,27 @@ *** gulp.el --- -*** vi.el, vip.el (try M-x viper instead) - ---- *** crisp.el, tpu-edt.el, ws-mode.el These emulations of old editors are believed to be no longer relevant - contact emacs-devel@gnu.org if you disagree. +--- +*** vi.el, vip.el (try M-x viper instead) + * New Modes and Packages in Emacs 24.5 * Incompatible Lisp Changes in Emacs 24.5 -** window-configurations do not record the buffers's marks any more. +** window-configurations no longer record the buffers's marks. -** inhibit-modification-hooks now also inhibits lock-file checks as well as +** inhibit-modification-hooks now also inhibits lock-file checks, as well as active region handling. ** deactivate-mark is now buffer-local. -** cl-the now asserts that its argument is of the given type. +** `cl-the' now asserts that its argument is of the given type. +++ ** Mouse click events on mode line or header line no longer include @@ -147,7 +147,7 @@ +++ ** New properties that can be specified with `declare': -*** (interactive-only INSTEAD), tells to use INSTEAD for non-interactive use. +*** (interactive-only INSTEAD), says to use INSTEAD for non-interactive use. *** (pure VAL), if VAL is non-nil, indicates the function is pure. *** (side-effect-free VAL), if VAL is non-nil, indicates the function does not have side effects. ------------------------------------------------------------ revno: 117328 fixes bug: http://debbugs.gnu.org/17647 committer: Paul Eggert branch nick: trunk timestamp: Fri 2014-06-13 08:55:48 -0700 message: Avoid hangs in accept-process-output. * lisp.h, process.c (wait_reading_process_input): Return int, not bool. All uses changed. * process.c (SELECT_CANT_DO_WRITE_MASK): Remove macro, replacing with ... (SELECT_CAN_DO_WRITE_MASK): ... new constant, with inverted sense. All uses changed. (status_notify): New arg WAIT_PROC. Return int, not void. All uses changed. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2014-06-13 14:42:43 +0000 +++ src/ChangeLog 2014-06-13 15:55:48 +0000 @@ -1,3 +1,15 @@ +2014-06-13 Paul Eggert + + Avoid hangs in accept-process-output (Bug#17647). + * lisp.h, process.c (wait_reading_process_input): + Return int, not bool. All uses changed. + * process.c (SELECT_CANT_DO_WRITE_MASK): + Remove macro, replacing with ... + (SELECT_CAN_DO_WRITE_MASK): ... new constant, with inverted sense. + All uses changed. + (status_notify): New arg WAIT_PROC. Return int, not void. + All uses changed. + 2014-06-13 Eli Zaretskii * menu.c (Fx_popup_menu): Don't call the frame's menu_show_hook if === modified file 'src/lisp.h' --- src/lisp.h 2014-06-08 18:27:22 +0000 +++ src/lisp.h 2014-06-13 15:55:48 +0000 @@ -4178,10 +4178,8 @@ /* Defined in process.c. */ extern Lisp_Object QCtype, Qlocal; extern void kill_buffer_processes (Lisp_Object); -extern bool wait_reading_process_output (intmax_t, int, int, bool, - Lisp_Object, - struct Lisp_Process *, - int); +extern int wait_reading_process_output (intmax_t, int, int, bool, Lisp_Object, + struct Lisp_Process *, int); /* Max value for the first argument of wait_reading_process_output. */ #if __GNUC__ == 3 || (__GNUC__ == 4 && __GNUC_MINOR__ <= 5) /* Work around a bug in GCC 3.4.2, known to be fixed in GCC 4.6.3. === modified file 'src/process.c' --- src/process.c 2014-06-09 20:31:06 +0000 +++ src/process.c 2014-06-13 15:55:48 +0000 @@ -224,8 +224,9 @@ /* Only W32 has this, it really means that select can't take write mask. */ #ifdef BROKEN_NON_BLOCKING_CONNECT #undef NON_BLOCKING_CONNECT -#define SELECT_CANT_DO_WRITE_MASK +enum { SELECT_CAN_DO_WRITE_MASK = false }; #else +enum { SELECT_CAN_DO_WRITE_MASK = true }; #ifndef NON_BLOCKING_CONNECT #ifdef HAVE_SELECT #if defined (HAVE_GETPEERNAME) || defined (GNU_LINUX) @@ -281,7 +282,7 @@ static bool keyboard_bit_set (fd_set *); #endif static void deactivate_process (Lisp_Object); -static void status_notify (struct Lisp_Process *); +static int status_notify (struct Lisp_Process *, struct Lisp_Process *); static int read_process_output (Lisp_Object, int); static void handle_child_signal (int); static void create_pty (Lisp_Object); @@ -860,7 +861,7 @@ { pset_status (p, list2 (Qexit, make_number (0))); p->tick = ++process_tick; - status_notify (p); + status_notify (p, NULL); redisplay_preserve_echo_area (13); } else @@ -880,7 +881,7 @@ pset_status (p, list2 (Qsignal, make_number (SIGKILL))); p->tick = ++process_tick; - status_notify (p); + status_notify (p, NULL); redisplay_preserve_echo_area (13); } } @@ -3986,12 +3987,13 @@ nsecs = 0; return - (wait_reading_process_output (secs, nsecs, 0, 0, + ((wait_reading_process_output (secs, nsecs, 0, 0, Qnil, !NILP (process) ? XPROCESS (process) : NULL, NILP (just_this_one) ? 0 : !INTEGERP (just_this_one) ? 1 : -1) - ? Qt : Qnil); + <= 0) + ? Qnil : Qt); } /* Accept a connection for server process SERVER on CHANNEL. */ @@ -4262,10 +4264,11 @@ (suspending output from other processes). A negative value means don't run any timers either. - Return true if we received input from WAIT_PROC, or from any - process if WAIT_PROC is null. */ + Return positive if we received input from WAIT_PROC (or from any + process if WAIT_PROC is null), zero if we attempted to receive + input but got none, and negative if we didn't even try. */ -bool +int wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, bool do_display, Lisp_Object wait_for_cell, @@ -4280,8 +4283,7 @@ int xerrno; Lisp_Object proc; struct timespec timeout, end_time; - int wait_channel = -1; - bool got_some_input = 0; + int got_some_input = -1; ptrdiff_t count = SPECPDL_INDEX (); FD_ZERO (&Available); @@ -4292,10 +4294,6 @@ && EQ (XCAR (wait_proc->status), Qexit))) message1 ("Blocking call to accept-process-output with quit inhibited!!"); - /* If wait_proc is a process to watch, set wait_channel accordingly. */ - if (wait_proc != NULL) - wait_channel = wait_proc->infd; - record_unwind_protect_int (wait_reading_process_output_unwind, waiting_for_user_input_p); waiting_for_user_input_p = read_kbd; @@ -4332,6 +4330,10 @@ if (! NILP (wait_for_cell) && ! NILP (XCAR (wait_for_cell))) break; + /* After reading input, vacuum up any leftovers without waiting. */ + if (0 <= got_some_input) + nsecs = -1; + /* Compute time from now till when time limit is up. */ /* Exit if already run out. */ if (nsecs < 0) @@ -4450,7 +4452,7 @@ /* It's okay for us to do this and then continue with the loop, since timeout has already been zeroed out. */ clear_waiting_for_input (); - status_notify (NULL); + got_some_input = status_notify (NULL, wait_proc); if (do_display) redisplay_preserve_echo_area (13); } } @@ -4472,18 +4474,23 @@ while (wait_proc->infd >= 0) { int nread = read_process_output (proc, wait_proc->infd); - - if (nread == 0) - break; - - if (nread > 0) - got_some_input = read_some_bytes = 1; - else if (nread == -1 && (errno == EIO || errno == EAGAIN)) - break; + if (nread < 0) + { + if (errno == EIO || errno == EAGAIN) + break; #ifdef EWOULDBLOCK - else if (nread == -1 && EWOULDBLOCK == errno) - break; + if (errno == EWOULDBLOCK) + break; #endif + } + else + { + if (got_some_input < nread) + got_some_input = nread; + if (nread == 0) + break; + read_some_bytes = true; + } } if (read_some_bytes && do_display) redisplay_preserve_echo_area (10); @@ -4514,12 +4521,8 @@ else Available = input_wait_mask; Writeok = write_mask; -#ifdef SELECT_CANT_DO_WRITE_MASK - check_write = 0; -#else - check_write = 1; -#endif - check_delay = wait_channel >= 0 ? 0 : process_output_delay_count; + check_delay = wait_proc ? 0 : process_output_delay_count; + check_write = SELECT_CAN_DO_WRITE_MASK; } /* If frame size has changed or the window is newly mapped, @@ -4545,6 +4548,7 @@ { nfds = read_kbd ? 0 : 1; no_avail = 1; + FD_ZERO (&Available); } if (!no_avail) @@ -4554,7 +4558,7 @@ /* Set the timeout for adaptive read buffering if any process has non-zero read_output_skip and non-zero read_output_delay, and we are not reading output for a - specific wait_channel. It is not executed if + specific process. It is not executed if Vprocess_adaptive_read_buffering is nil. */ if (process_output_skip && check_delay > 0) { @@ -4667,12 +4671,6 @@ report_file_errno ("Failed select", Qnil, xerrno); } - if (no_avail) - { - FD_ZERO (&Available); - check_write = 0; - } - /* Check for keyboard input */ /* If there is any, return immediately to give it higher priority than subprocesses */ @@ -4739,9 +4737,6 @@ handle_input_available_signal (SIGIO); #endif - if (! wait_proc) - got_some_input |= nfds > 0; - /* If checking input just got us a size-change event from X, obey it now if we should. */ if (read_kbd || ! NILP (wait_for_cell)) @@ -4773,12 +4768,6 @@ /* If waiting for this channel, arrange to return as soon as no more input to be processed. No more waiting. */ - if (wait_channel == channel) - { - wait_channel = -1; - nsecs = -1; - got_some_input = 1; - } proc = chan_process[channel]; if (NILP (proc)) continue; @@ -4794,6 +4783,8 @@ buffered-ahead character if we have one. */ nread = read_process_output (proc, channel); + if ((!wait_proc || wait_proc == XPROCESS (proc)) && got_some_input < nread) + got_some_input = nread; if (nread > 0) { /* Since read_process_output can run a filter, @@ -5814,7 +5805,7 @@ p->tick = ++process_tick; if (!nomsg) { - status_notify (NULL); + status_notify (NULL, NULL); redisplay_preserve_echo_area (13); } } @@ -6337,14 +6328,20 @@ /* Report all recent events of a change in process status (either run the sentinel or output a message). This is usually done while Emacs is waiting for keyboard input - but can be done at other times. */ - -static void -status_notify (struct Lisp_Process *deleting_process) + but can be done at other times. + + Return positive if any input was received from WAIT_PROC (or from + any process if WAIT_PROC is null), zero if input was attempted but + none received, and negative if we didn't even try. */ + +static int +status_notify (struct Lisp_Process *deleting_process, + struct Lisp_Process *wait_proc) { - register Lisp_Object proc; + Lisp_Object proc; Lisp_Object tail, msg; struct gcpro gcpro1, gcpro2; + int got_some_input = -1; tail = Qnil; msg = Qnil; @@ -6374,8 +6371,14 @@ /* Network or serial process not stopped: */ && ! EQ (p->command, Qt) && p->infd >= 0 - && p != deleting_process - && read_process_output (proc, p->infd) > 0); + && p != deleting_process) + { + int nread = read_process_output (proc, p->infd); + if (got_some_input < nread) + got_some_input = nread; + if (nread <= 0) + break; + } /* Get the text to use for the message. */ if (p->raw_status_new) @@ -6407,6 +6410,7 @@ update_mode_lines = 24; /* In case buffers use %s in mode-line-format. */ UNGCPRO; + return got_some_input; } DEFUN ("internal-default-process-sentinel", Finternal_default_process_sentinel, @@ -6618,9 +6622,11 @@ DO_DISPLAY means redisplay should be done to show subprocess output that arrives. - Return true if we received input from any process. */ + Return positive if we received input from WAIT_PROC (or from any + process if WAIT_PROC is null), zero if we attempted to receive + input but got none, and negative if we didn't even try. */ -bool +int wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, bool do_display, Lisp_Object wait_for_cell, @@ -6808,7 +6814,7 @@ start_polling (); - return 0; + return -1; } #endif /* not subprocesses */ ------------------------------------------------------------ revno: 117327 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17767 author: Matthias Meulien committer: Stefan Monnier branch nick: trunk timestamp: Fri 2014-06-13 11:50:38 -0400 message: * lisp/simple.el (completion-list-mode-map): Navigate with tab and backtab. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-06-12 15:54:37 +0000 +++ lisp/ChangeLog 2014-06-13 15:50:38 +0000 @@ -1,3 +1,12 @@ +2014-06-13 Matthias Meulien + + * simple.el (completion-list-mode-map): Navigate with tab and backtab + (bug#17767). + +2014-06-13 Stefan Monnier + + * simple.el (set-mark-command): Simplify a bit. + 2014-06-12 Nicolas Richard * help.el (help--key-binding-keymap): New function. === modified file 'lisp/simple.el' --- lisp/simple.el 2014-06-02 00:18:22 +0000 +++ lisp/simple.el 2014-06-13 15:50:38 +0000 @@ -3842,7 +3842,7 @@ ;; Add that string to the kill ring, one way or another. (if (eq last-command 'kill-region) (kill-append string (< end beg)) - (kill-new string nil))) + (kill-new string))) (when (or string (eq last-command 'kill-region)) (setq this-command 'kill-region)) (setq deactivate-mark t) @@ -4742,15 +4742,13 @@ (pop-to-mark-command) (push-mark-command t))) ((and set-mark-command-repeat-pop - (eq last-command 'pop-to-mark-command)) - (setq this-command 'pop-to-mark-command) - (pop-to-mark-command)) - ((and set-mark-command-repeat-pop (eq last-command 'pop-global-mark) (not arg)) (setq this-command 'pop-global-mark) (pop-global-mark)) - (arg + ((or (and set-mark-command-repeat-pop + (eq last-command 'pop-to-mark-command)) + arg) (setq this-command 'pop-to-mark-command) (pop-to-mark-command)) ((eq last-command 'set-mark-command) @@ -6977,6 +6975,8 @@ (define-key map "\e\e\e" 'delete-completion-window) (define-key map [left] 'previous-completion) (define-key map [right] 'next-completion) + (define-key map [?\t] 'next-completion) + (define-key map [backtab] 'previous-completion) (define-key map "q" 'quit-window) (define-key map "z" 'kill-this-buffer) map) ------------------------------------------------------------ revno: 117326 committer: Eli Zaretskii branch nick: trunk timestamp: Fri 2014-06-13 17:42:43 +0300 message: Don't try to display menus and dialogs in an 'initial' frame. src/menu.c (Fx_popup_menu): Don't call the frame's menu_show_hook if the frame is the initial frame, because the hook is not set up then, and Emacs crashes. Reported by Fabrice Popineau . diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2014-06-12 14:55:48 +0000 +++ src/ChangeLog 2014-06-13 14:42:43 +0000 @@ -1,3 +1,10 @@ +2014-06-13 Eli Zaretskii + + * menu.c (Fx_popup_menu): Don't call the frame's menu_show_hook if + the frame is the initial frame, because the hook is not set up + then, and Emacs crashes. + Reported by Fabrice Popineau . + 2014-06-12 Stefan Monnier * keymap.c (silly_event_symbol_error): Don't recommend the use === modified file 'src/menu.c' --- src/menu.c 2014-06-08 18:27:22 +0000 +++ src/menu.c 2014-06-13 14:42:43 +0000 @@ -1410,9 +1410,12 @@ record_unwind_protect_void (discard_menu_items); #endif - /* Display them in a menu. */ - selection = FRAME_TERMINAL (f)->menu_show_hook (f, xpos, ypos, menuflags, - title, &error_name); + /* Display them in a menu, but not if F is the initial frame that + doesn't have its hooks set (e.g., in a batch session), because + such a frame cannot display menus. */ + if (!FRAME_INITIAL_P (f)) + selection = FRAME_TERMINAL (f)->menu_show_hook (f, xpos, ypos, menuflags, + title, &error_name); #ifdef HAVE_NS unbind_to (specpdl_count, Qnil); ------------------------------------------------------------ revno: 117325 committer: Bastien Guerry branch nick: trunk timestamp: Fri 2014-06-13 11:00:08 +0200 message: Fix previous revision (117324) diff: === modified file 'lisp/help.el' --- lisp/help.el 2014-06-12 15:54:37 +0000 +++ lisp/help.el 2014-06-13 09:00:08 +0000 @@ -666,16 +666,16 @@ (not no-remap) (command-remapping found)) ;; The user might want to know in which map the binding is - ;; found, or in which map the remapping is found. The + ;; found, or in which map the remapping is found. The ;; default is to show the latter. - (key-binding-keymap (vector 'remap found)) + (help--key-binding-keymap (vector 'remap found)) map)))) (defun help--binding-locus (key position) "Describe in which keymap KEY is defined. Return a symbol pointing to that keymap if one exists ; otherwise return nil." - (let ((map (key-binding-keymap key t nil position))) + (let ((map (help--key-binding-keymap key t nil position))) (when map (catch 'found (let ((advertised-syms (nconc ------------------------------------------------------------ revno: 117324 fixes bug: http://debbugs.gnu.org/13948 committer: Nicolas Richard branch nick: trunk timestamp: Thu 2014-06-12 17:54:37 +0200 message: (describe-key) Mention the keymap in which the binding was found. * lisp/help.el (help--key-binding-keymap): New function. (help--binding-locus): New function. (describe-key): Mention the keymap in which the binding was found. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-06-12 14:35:09 +0000 +++ lisp/ChangeLog 2014-06-12 15:54:37 +0000 @@ -1,3 +1,10 @@ +2014-06-12 Nicolas Richard + + * help.el (help--key-binding-keymap): New function. + (help--binding-locus): New function. + (describe-key): Mention the keymap in which the binding was + found. (bug#13948) + 2014-06-12 Stefan Monnier * hippie-exp.el (he--all-buffers): New function. === modified file 'lisp/help.el' --- lisp/help.el 2014-06-12 02:18:54 +0000 +++ lisp/help.el 2014-06-12 15:54:37 +0000 @@ -646,6 +646,68 @@ (princ (format "%s%s is undefined" key-desc mouse-msg)) (princ (format "%s%s runs the command %S" key-desc mouse-msg defn))))) +(defun help--key-binding-keymap (key &optional accept-default no-remap position) + "Return a keymap holding a binding for KEY within current keymaps. +The effect of the arguments KEY, ACCEPT-DEFAULT, NO-REMAP and +POSITION is as documented in the function `key-binding'." + (let* ((active-maps (current-active-maps t position)) + map found) + ;; We loop over active maps like key-binding does. + (while (and + (not found) + (setq map (pop active-maps))) + (setq found (lookup-key map key accept-default)) + (when (integerp found) + ;; The first `found' characters of KEY were found but not the + ;; whole sequence. + (setq found nil))) + (when found + (if (and (symbolp found) + (not no-remap) + (command-remapping found)) + ;; The user might want to know in which map the binding is + ;; found, or in which map the remapping is found. The + ;; default is to show the latter. + (key-binding-keymap (vector 'remap found)) + map)))) + +(defun help--binding-locus (key position) + "Describe in which keymap KEY is defined. +Return a symbol pointing to that keymap if one exists ; otherwise +return nil." + (let ((map (key-binding-keymap key t nil position))) + (when map + (catch 'found + (let ((advertised-syms (nconc + (list 'overriding-terminal-local-map + 'overriding-local-map) + (delq nil + (mapcar + (lambda (mode-and-map) + (let ((mode (car mode-and-map))) + (when (symbol-value mode) + (intern-soft + (format "%s-map" mode))))) + minor-mode-map-alist)) + (list 'global-map + (intern-soft (format "%s-map" major-mode))))) + found) + ;; Look into these advertised symbols first. + (dolist (sym advertised-syms) + (when (and + (boundp sym) + (eq map (symbol-value sym))) + (throw 'found sym))) + ;; Only look in other symbols otherwise. + (mapatoms + (lambda (x) + (when (and (boundp x) + ;; Avoid let-bound symbols. + (special-variable-p x) + (eq (symbol-value x) map)) + (throw 'found x)))) + nil))))) + (defun describe-key (&optional key untranslated up-event) "Display documentation of the function invoked by KEY. KEY can be any kind of a key sequence; it can include keyboard events, @@ -708,6 +770,7 @@ (mouse-msg (if (or (memq 'click modifiers) (memq 'down modifiers) (memq 'drag modifiers)) " at that spot" "")) (defn (key-binding key t)) + key-locus key-locus-up key-locus-up-tricky defn-up defn-up-tricky ev-type mouse-1-remapped mouse-1-tricky) @@ -746,15 +809,19 @@ (setcar up-event (elt mouse-1-remapped 0))) (t (setcar up-event 'mouse-2)))) (setq defn-up (key-binding sequence nil nil (event-start up-event))) + (setq key-locus-up (help--binding-locus sequence (event-start up-event))) (when mouse-1-tricky (setq sequence (vector up-event)) (aset sequence 0 'mouse-1) - (setq defn-up-tricky (key-binding sequence nil nil (event-start up-event)))))) + (setq defn-up-tricky (key-binding sequence nil nil (event-start up-event))) + (setq key-locus-up-tricky (help--binding-locus sequence (event-start up-event)))))) + (setq key-locus (help--binding-locus key (event-start event))) (with-help-window (help-buffer) (princ (help-key-description key untranslated)) - (princ (format "\ -%s runs the command %S, which is " - mouse-msg defn)) + (princ (format "%s runs the command %S%s, which is " + mouse-msg defn (if key-locus + (format " (found in %s)" key-locus) + ""))) (describe-function-1 defn) (when up-event (unless (or (null defn-up) @@ -764,13 +831,15 @@ ----------------- up-event %s---------------- -%s%s%s runs the command %S, which is " +%s%s%s runs the command %S%s, which is " (if mouse-1-tricky "(short click) " "") (key-description (vector up-event)) mouse-msg (if mouse-1-remapped " is remapped to , which" "") - defn-up)) + defn-up (if key-locus-up + (format " (found in %s)" key-locus-up) + ""))) (describe-function-1 defn-up)) (unless (or (null defn-up-tricky) (integerp defn-up-tricky) @@ -780,10 +849,12 @@ ----------------- up-event (long click) ---------------- Pressing <%S>%s for longer than %d milli-seconds -runs the command %S, which is " +runs the command %S%s, which is " ev-type mouse-msg mouse-1-click-follows-link - defn-up-tricky)) + defn-up-tricky (if key-locus-up-tricky + (format " (found in %s)" key-locus-up-tricky) + ""))) (describe-function-1 defn-up-tricky))))))) (defun describe-mode (&optional buffer)