diff --git a/ChangeLog b/ChangeLog index b1b4a39e1fb..ab69ce7b457 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,22 @@ +2010-05-14 Glenn Morris + + * configure.in (cpp_undefs): Add mktime, register, X11. + + * configure.in (GPM_MOUSE_SUPPORT): Remove. + (MOUSE_SUPPORT, TOOLTIP_SUPPORT, WINDOW_SUPPORT): New output variables. + (HAVE_WINDOW_SYSTEM, HAVE_MOUSE): Move out of AC_BOTTOM. + + * configure.in (NS_IMPL_GNUSTEP_INC): New output variable. + (GNUSTEP_MAKEFILES): Do not output. + +2010-05-13 Glenn Morris + + * configure.in: Fix some paren typos. + + * configure.in (OLDXMENU, LIBXMENU): Set to empty if !HAVE_MENUS. + + * configure.in (LD_SWITCH_X_SITE, C_SWITCH_X_SITE): Do not define. + 2010-05-12 Glenn Morris * configure.in (LIB_SRC_EXTRA_INSTALLABLES): Remove, unused. diff --git a/admin/CPP-DEFINES b/admin/CPP-DEFINES index d4776c9b755..1f42eeb9528 100644 --- a/admin/CPP-DEFINES +++ b/admin/CPP-DEFINES @@ -22,7 +22,6 @@ NS_IMPL_GNUSTEP Compile support for GNUstep implementation of NS GUI API. NS_IMPL_COCOA Compile support for Cocoa (Apple) implementation of NS GUI API. HAVE_X11 Compile support for the X11 GUI. HAVE_X_WINDOWS Compile support for X Window system -X11 ?? Makefile.in suggests it's equivalent to HAVE_X11 USE_LUCID Use the Lucid toolkit for menus&scrollbars. Requires HAVE_X11. USE_MOTIF Use the Motif toolkit for menus&scrollbars. Requires HAVE_X11. USE_GTK Use the Gtk toolkit for menus&scrollbars. Requires HAVE_X11. @@ -84,6 +83,9 @@ BCOPY_DOWNWARD_SAFE BCOPY_UPWARD_SAFE BITS_PER_EMACS_INT BITS_PER_LONG +BITS_PER_CHAR +BITS_PER_SHORT +BITS_PER_INT BROKEN_DATAGRAM_SOCKETS BROKEN_FIONREAD BROKEN_GET_CURRENT_DIR_NAME @@ -98,7 +100,6 @@ BSD4_2 BSD4_3 BSD_SYSTEM CLASH_DETECTION -C_SWITCH_X_SYSTEM DATA_SEG_BITS DATA_START DBL_MIN_REPLACEMENT @@ -114,7 +115,6 @@ EMACS_CONFIGURATION EMACS_CONFIG_OPTIONS EMACS_INT EMACS_UINT -END_FILES_1 FILE_SYSTEM_CASE FLOAT_CHECK_DOMAIN FSCALE @@ -133,7 +133,6 @@ HAVE_BCMP HAVE_BCOPY HAVE_CBRT HAVE_CLOSEDIR -HAVE_CRTIN HAVE_DUP2 HAVE_EUIDACCESS HAVE_FMOD @@ -154,9 +153,6 @@ HAVE_INDEX HAVE_INET_SOCKETS HAVE_INVERSE_HYPERBOLIC HAVE_LIBKSTAT -HAVE_LIBNCURSES -HAVE_LIBPTHREADS -HAVE_LIBXMU HAVE_LIMITS_H HAVE_LINUX_VERSION_H HAVE_LOGB @@ -266,8 +262,6 @@ SIGQUIT SIGTRAP SIGTYPE SOLARIS2 -START_FILES -START_FILES_1 STDC_HEADERS SYMS_SYSTEM SYSTEM_PURESIZE_EXTRA diff --git a/configure b/configure index fc9096b6783..0a1c2ee3d3b 100755 --- a/configure +++ b/configure @@ -717,6 +717,7 @@ SET_MAKE XMKMF LD_SWITCH_X_SITE_AUX LD_SWITCH_X_SITE_AUX_RPATH +NS_IMPL_GNUSTEP_INC NS_OBJ NS_SUPPORT LIB_STANDARD @@ -751,7 +752,6 @@ LIBPNG LIBTIFF LIBGIF LIBGPM -GPM_MOUSE_SUPPORT LIBXSM ALLOCA liblockfile @@ -796,7 +796,6 @@ ns_appdir ns_appbindir ns_appresdir ns_appsrc -GNUSTEP_MAKEFILES GNUSTEP_SYSTEM_HEADERS GNUSTEP_SYSTEM_LIBRARIES GNU_OBJC_CFLAGS @@ -815,6 +814,9 @@ POST_ALLOC_OBJ LD_SWITCH_SYSTEM_TEMACS LD_SWITCH_SYSTEM_EXTRA LIB_GCC +MOUSE_SUPPORT +TOOLTIP_SUPPORT +WINDOW_SUPPORT LTLIBOBJS' ac_subst_files='' ac_user_opts=' @@ -6484,7 +6486,7 @@ case $opsys in START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o' ;; netbsd | openbsd ) - if test -f $(CRT_DIR)/crti.o; then + if test -f $CRT_DIR/crti.o; then LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o' START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o' else @@ -9929,6 +9931,7 @@ fi HAVE_NS=no NS_IMPL_COCOA=no NS_IMPL_GNUSTEP=no +NS_IMPL_GNUSTEP_INC= tmp_CPPFLAGS="$CPPFLAGS" tmp_CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS -x objective-c" @@ -9949,6 +9952,13 @@ if test "${with_ns}" != no; then GNUSTEP_MAKEFILES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_MAKEFILES)" GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)" GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)" + ## Pull in stuff from GNUstep-make. + NS_IMPL_GNUSTEP_INC="FOUNDATION_LIB=gnu +GUI_LIB=gnu +include $GNUSTEP_MAKEFILES/Additional/base.make +include $GNUSTEP_MAKEFILES/Additional/gui.make +shared=no +" CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS}" CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}" REAL_CFLAGS="$REAL_CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}" @@ -10141,6 +10151,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi fi + NS_OBJ= NS_SUPPORT= if test "${HAVE_NS}" = yes; then @@ -15991,7 +16002,7 @@ fi ### Use -lgpm if available, unless `--with-gpm=no'. HAVE_GPM=no LIBGPM= -GPM_MOUSE_SUPPORT= +MOUSE_SUPPORT= if test "${with_gpm}" != "no"; then if test "${ac_cv_header_gpm_h+set}" = set; then { $as_echo "$as_me:$LINENO: checking for gpm.h" >&5 @@ -16201,12 +16212,12 @@ cat >>confdefs.h <<\_ACEOF _ACEOF LIBGPM=-lgpm - GPM_MOUSE_SUPPORT="\${lispsource}mouse.elc" + ## May be reset below. + MOUSE_SUPPORT="\$(GPM_MOUSE_SUPPORT)" fi fi - if test "${ac_cv_header_malloc_malloc_h+set}" = set; then { $as_echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5 $as_echo_n "checking for malloc/malloc.h... " >&6; } @@ -26313,6 +26324,7 @@ fi ### Use configuration here uncanonicalized to avoid exceeding size limits. +## Unused? @@ -26334,6 +26346,9 @@ fi +## FIXME? Nothing uses @LD_SWITCH_X_SITE@. +## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the +## end of LIBX_BASE, but nothing ever set it. @@ -26353,7 +26368,6 @@ fi - cat >>confdefs.h <<_ACEOF #define EMACS_CONFIGURATION "${canonical}" _ACEOF @@ -26374,16 +26388,6 @@ cat >>confdefs.h <<_ACEOF _ACEOF -cat >>confdefs.h <<_ACEOF -#define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE} -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define C_SWITCH_X_SITE ${C_SWITCH_X_SITE} -_ACEOF - - XMENU_OBJ= XOBJ= if test "${HAVE_X_WINDOWS}" = "yes" ; then @@ -26480,7 +26484,7 @@ else LIBX_OTHER= fi -if test "$HAVE_GTK" = "yes"; then +if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then OLDXMENU= LIBXMENU= fi @@ -26584,17 +26588,44 @@ if test "x$GCC" = "xyes"; then ## FIXME? s/gnu-linux.h used to define LIB_GCC as below, then ## immediately undefine it again and redefine it to empty. ## Was the C_SWITCH_X_SITE part really necessary? -## LIB_GCC=`$(CC) $(C_SWITCH_X_SITE) -print-libgcc-file-name` +## LIB_GCC=`$CC $C_SWITCH_X_SITE -print-libgcc-file-name` LIB_GCC= fi ;; ## Ask GCC where to find libgcc.a. - *) LIB_GCC=`$(CC) -print-libgcc-file-name 2> /dev/null` ;; + *) LIB_GCC=`$CC -print-libgcc-file-name 2> /dev/null` ;; esac fi +TOOLTIP_SUPPORT= +WINDOW_SUPPORT= +## If we're using X11/GNUstep, define some consequences. +if test "$HAVE_X_WINDOWS" = "yes" || test "$HAVE_NS" = "yes"; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_WINDOW_SYSTEM 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MOUSE 1 +_ACEOF + + MOUSE_SUPPORT="\$(REAL_MOUSE_SUPPORT)" + TOOLTIP_SUPPORT="\${lispsource}mouse.elc" + + WINDOW_SUPPORT="\$(BASE_WINDOW_SUPPORT)" + test "$HAVE_X_WINDOWS" = "yes" && \ + WINDOW_SUPPORT="$WINDOW_SUPPORT \$(X_WINDOW_SUPPORT)" + +fi + + + + + @@ -26691,7 +26722,7 @@ test "${exec_prefix}" != NONE && # the C preprocessor to some helpful value like 1, or maybe the empty # string. Needless to say consequent macro substitutions are less # than conducive to the makefile finding the correct directory. -cpp_undefs="`echo $srcdir $configuration $canonical unix | +cpp_undefs="`echo $srcdir $configuration $canonical unix mktime register X11 | sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \ -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g'`" diff --git a/configure.in b/configure.in index 491c3af9dce..2475caae053 100644 --- a/configure.in +++ b/configure.in @@ -1094,7 +1094,7 @@ case $opsys in START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o' ;; netbsd | openbsd ) - if test -f $(CRT_DIR)/crti.o; then + if test -f $CRT_DIR/crti.o; then LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o' START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o' else @@ -1452,6 +1452,7 @@ fi HAVE_NS=no NS_IMPL_COCOA=no NS_IMPL_GNUSTEP=no +NS_IMPL_GNUSTEP_INC= tmp_CPPFLAGS="$CPPFLAGS" tmp_CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS -x objective-c" @@ -1473,6 +1474,13 @@ if test "${with_ns}" != no; then GNUSTEP_MAKEFILES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_MAKEFILES)" GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)" GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)" + ## Pull in stuff from GNUstep-make. + NS_IMPL_GNUSTEP_INC="FOUNDATION_LIB=gnu +GUI_LIB=gnu +include $GNUSTEP_MAKEFILES/Additional/base.make +include $GNUSTEP_MAKEFILES/Additional/gui.make +shared=no +" CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS}" CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}" REAL_CFLAGS="$REAL_CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}" @@ -1491,6 +1499,7 @@ if test "${with_ns}" != no; then NS_HAVE_NSINTEGER=no fi fi +AC_SUBST(NS_IMPL_GNUSTEP_INC) NS_OBJ= NS_SUPPORT= @@ -2391,7 +2400,7 @@ fi ### Use -lgpm if available, unless `--with-gpm=no'. HAVE_GPM=no LIBGPM= -GPM_MOUSE_SUPPORT= +MOUSE_SUPPORT= if test "${with_gpm}" != "no"; then AC_CHECK_HEADER(gpm.h, [AC_CHECK_LIB(gpm, Gpm_Open, HAVE_GPM=yes)]) @@ -2399,11 +2408,11 @@ if test "${with_gpm}" != "no"; then if test "${HAVE_GPM}" = "yes"; then AC_DEFINE(HAVE_GPM, 1, [Define to 1 if you have the gpm library (-lgpm).]) LIBGPM=-lgpm - GPM_MOUSE_SUPPORT="\${lispsource}mouse.elc" + ## May be reset below. + MOUSE_SUPPORT="\$(GPM_MOUSE_SUPPORT)" fi fi AC_SUBST(LIBGPM) -AC_SUBST(GPM_MOUSE_SUPPORT) dnl Check for malloc/malloc.h on darwin AC_CHECK_HEADER(malloc/malloc.h, [AC_DEFINE(HAVE_MALLOC_MALLOC_H, 1, [Define to 1 if you have the header file.])]) @@ -3012,6 +3021,7 @@ fi ### Use configuration here uncanonicalized to avoid exceeding size limits. AC_SUBST(version) AC_SUBST(configuration) +## Unused? AC_SUBST(canonical) AC_SUBST(srcdir) AC_SUBST(prefix) @@ -3033,6 +3043,9 @@ AC_SUBST(bitmapdir) AC_SUBST(gamedir) AC_SUBST(gameuser) AC_SUBST(unexec) +## FIXME? Nothing uses @LD_SWITCH_X_SITE@. +## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the +## end of LIBX_BASE, but nothing ever set it. AC_SUBST(LD_SWITCH_X_SITE) AC_SUBST(C_SWITCH_X_SITE) AC_SUBST(C_SWITCH_X_SYSTEM) @@ -3046,7 +3059,6 @@ AC_SUBST(ns_appdir) AC_SUBST(ns_appbindir) AC_SUBST(ns_appresdir) AC_SUBST(ns_appsrc) -AC_SUBST(GNUSTEP_MAKEFILES) AC_SUBST(GNUSTEP_SYSTEM_HEADERS) AC_SUBST(GNUSTEP_SYSTEM_LIBRARIES) AC_SUBST(GNU_OBJC_CFLAGS) @@ -3060,18 +3072,6 @@ AC_DEFINE_UNQUOTED(config_machfile, "${machfile}", [Define to the used machine dependent file.]) AC_DEFINE_UNQUOTED(config_opsysfile, "${opsysfile}", [Define to the used os dependent file.]) -AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE, ${LD_SWITCH_X_SITE}, -[Define LD_SWITCH_X_SITE to contain any special flags your loader - may need to deal with X Windows. For instance, if you've defined - HAVE_X_WINDOWS above and your X libraries aren't in a place that - your loader can find on its own, you might want to add "-L/..." or - something similar.]) -AC_DEFINE_UNQUOTED(C_SWITCH_X_SITE, ${C_SWITCH_X_SITE}, -[Define C_SWITCH_X_SITE to contain any special flags your compiler - may need to deal with X Windows. For instance, if you've defined - HAVE_X_WINDOWS above and your X include files aren't in a place - that your compiler can find on its own, you might want to add - "-I/..." or something similar.]) XMENU_OBJ= XOBJ= @@ -3152,7 +3152,7 @@ else LIBX_OTHER= fi -if test "$HAVE_GTK" = "yes"; then +if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then OLDXMENU= LIBXMENU= fi @@ -3250,18 +3250,37 @@ if test "x$GCC" = "xyes"; then ## FIXME? s/gnu-linux.h used to define LIB_GCC as below, then ## immediately undefine it again and redefine it to empty. ## Was the C_SWITCH_X_SITE part really necessary? -## LIB_GCC=`$(CC) $(C_SWITCH_X_SITE) -print-libgcc-file-name` +## LIB_GCC=`$CC $C_SWITCH_X_SITE -print-libgcc-file-name` LIB_GCC= fi ;; ## Ask GCC where to find libgcc.a. - *) LIB_GCC=`$(CC) -print-libgcc-file-name 2> /dev/null` ;; + *) LIB_GCC=`$CC -print-libgcc-file-name 2> /dev/null` ;; esac fi dnl if $GCC AC_SUBST(LIB_GCC) +TOOLTIP_SUPPORT= +WINDOW_SUPPORT= +## If we're using X11/GNUstep, define some consequences. +if test "$HAVE_X_WINDOWS" = "yes" || test "$HAVE_NS" = "yes"; then + AC_DEFINE(HAVE_WINDOW_SYSTEM, 1, [Define if you have a window system.]) + AC_DEFINE(HAVE_MOUSE, 1, [Define if you have mouse support.]) + MOUSE_SUPPORT="\$(REAL_MOUSE_SUPPORT)" + TOOLTIP_SUPPORT="\${lispsource}mouse.elc" + + WINDOW_SUPPORT="\$(BASE_WINDOW_SUPPORT)" + test "$HAVE_X_WINDOWS" = "yes" && \ + WINDOW_SUPPORT="$WINDOW_SUPPORT \$(X_WINDOW_SUPPORT)" + +fi +AC_SUBST(MOUSE_SUPPORT) +AC_SUBST(TOOLTIP_SUPPORT) +AC_SUBST(WINDOW_SUPPORT) + + AH_TOP([/* GNU Emacs site configuration template file. Copyright (C) 1988, 1993, 1994, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. @@ -3290,12 +3309,6 @@ along with GNU Emacs. If not, see . */ ])dnl AH_BOTTOM([ -/* If we're using X11/Carbon/GNUstep, define some consequences. */ -#if defined(HAVE_X_WINDOWS) || defined(HAVE_NS) -#define HAVE_WINDOW_SYSTEM -#define HAVE_MOUSE -#endif - /* Define AMPERSAND_FULL_NAME if you use the convention that & in the full name stands for the login id. */ /* Turned on June 1996 supposing nobody will mind it. */ @@ -3320,7 +3333,7 @@ AH_BOTTOM([ #endif #endif /* __FreeBSD__ || __NetBSD__ || __linux__ */ -/* If using GNU, then support inline function declarations. */ +/* If using GNU, then support inline function declarations. */ /* Don't try to switch on inline handling as detected by AC_C_INLINE generally, because even if non-gcc compilers accept `inline', they may reject `extern inline'. */ @@ -3345,7 +3358,7 @@ AH_BOTTOM([ /* Set up some defines, C and LD flags for NeXTstep interface on GNUstep. (There is probably a better place to do this, but right now the Cocoa side does this in s/darwin.h and we cannot - parallel this exactly since GNUstep is multi-OS. */ + parallel this exactly since GNUstep is multi-OS. */ #ifdef HAVE_NS # ifdef NS_IMPL_GNUSTEP /* GNUstep needs a bit more pure memory. Of the existing knobs, @@ -3442,7 +3455,7 @@ extern char *getenv (); #include "string.h" #endif #ifdef HAVE_STRINGS_H -#include "strings.h" /* May be needed for bcopy & al. */ +#include "strings.h" /* May be needed for bcopy & al. */ #endif #ifdef HAVE_STDLIB_H #include @@ -3609,7 +3622,10 @@ test "${exec_prefix}" != NONE && # the C preprocessor to some helpful value like 1, or maybe the empty # string. Needless to say consequent macro substitutions are less # than conducive to the makefile finding the correct directory. -[cpp_undefs="`echo $srcdir $configuration $canonical unix | +# src/Makefile.in used to treat X11 as equivalent to HAVE_X11. +# But nothing in Emacs defines X11, and everywhere else uses HAVE_X11, +# so that cannot have been doing anything. +[cpp_undefs="`echo $srcdir $configuration $canonical unix mktime register X11 | sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \ -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g'`"] diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 85bf897f41f..c6d3c1be498 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,7 @@ +2010-05-13 Jay Belanger + + * calc.texi: Remove "\turnoffactive" commands througout. + 2010-05-08 Štěpán Němec (tiny change) * url.texi (HTTP language/coding, Customization): diff --git a/doc/misc/calc.texi b/doc/misc/calc.texi index 96075b6710d..c578e919612 100644 --- a/doc/misc/calc.texi +++ b/doc/misc/calc.texi @@ -76,7 +76,6 @@ @newcount@calcpageno @newtoks@calcoldeverypar @calcoldeverypar=@everypar @everypar={@calceverypar@the@calcoldeverypar} -@ifx@turnoffactive@undefinedzzz@def@turnoffactive{}@fi @ifx@ninett@undefinedzzz@font@ninett=cmtt9@fi @catcode`@\=0 \catcode`\@=11 \r@ggedbottomtrue @@ -1804,7 +1803,6 @@ or, in large mathematical notation, @end example @end ifnottex @tex -\turnoffactive \beforedisplay $$ 2 + { 3 \times 4 \times 5 \over 6 \times 7^8 } - 9 $$ \afterdisplay @@ -3358,7 +3356,6 @@ Suppose we had the following set of equations: @end group @end ifnottex @tex -\turnoffactive \beforedisplayh $$ \openup1\jot \tabskip=0pt plus1fil \halign to\displaywidth{\tabskip=0pt @@ -3385,7 +3382,6 @@ This can be cast into the matrix equation, @end group @end ifnottex @tex -\turnoffactive \beforedisplay $$ \pmatrix{ 1 & 2 & 3 \cr 4 & 5 & 6 \cr 7 & 6 & 0 } \times @@ -3457,7 +3453,6 @@ in terms of @expr{a} and @expr{b}. @end group @end ifnottex @tex -\turnoffactive \beforedisplay $$ \eqalign{ x &+ a y = 6 \cr x &+ b y = 10} @@ -3483,7 +3478,6 @@ on the left by the transpose of @expr{A}: @samp{trn(A)*A*X = trn(A)*B}. @end ifnottex @tex -\turnoffactive $A^T A \, X = A^T B$, where $A^T$ is the transpose \samp{trn(A)}. @end tex Now @@ -3506,7 +3500,6 @@ system: @end group @end ifnottex @tex -\turnoffactive \beforedisplayh $$ \openup1\jot \tabskip=0pt plus1fil \halign to\displaywidth{\tabskip=0pt @@ -3778,7 +3771,6 @@ m = (N sum(x y) - sum(x) sum(y)) / (N sum(x^2) - sum(x)^2) @end example @end ifnottex @tex -\turnoffactive \beforedisplay $$ m = {N \sum x y - \sum x \sum y \over N \sum x^2 - \left( \sum x \right)^2} $$ @@ -3820,7 +3812,6 @@ respectively. (We could have used @kbd{*} to compute @samp{sum(x^2)} and @samp{sum(x y)}.) @end ifnottex @tex -\turnoffactive These are $\sum x$, $\sum x^2$, $\sum y$, and $\sum x y$, respectively. (We could have used \kbd{*} to compute $\sum x^2$ and $\sum x y$.) @@ -3874,7 +3865,6 @@ b = (sum(y) - m sum(x)) / N @end example @end ifnottex @tex -\turnoffactive \beforedisplay $$ b = {\sum y - m \sum x \over N} $$ \afterdisplay @@ -5223,7 +5213,6 @@ down to the formula, @end example @end ifnottex @tex -\turnoffactive \beforedisplay $$ \displaylines{ \qquad {h \over 3} (f(a) + 4 f(a+h) + 2 f(a+2h) + 4 f(a+3h) + \cdots @@ -5245,7 +5234,6 @@ h * (f(a) + f(a+h) + f(a+2h) + f(a+3h) + ... @end example @end ifnottex @tex -\turnoffactive \beforedisplay $$ h (f(a) + f(a+h) + f(a+2h) + f(a+3h) + \cdots + f(a+(n-2)h) + f(a+(n-1)h)) $$ @@ -5686,7 +5674,6 @@ cos(x) = 1 - x^2 / 2! + x^4 / 4! - x^6 / 6! + ... @end example @end ifnottex @tex -\turnoffactive \beforedisplay $$ \cos x = 1 - {x^2 \over 2!} + {x^4 \over 4!} - {x^6 \over 6!} + \cdots $$ \afterdisplay @@ -5704,7 +5691,6 @@ cos(x) = 1 - x^2 / 2! + O(x^3) @end example @end ifnottex @tex -\turnoffactive \beforedisplay $$ \cos x = 1 - {x^2 \over 2!} + O(x^3) $$ \afterdisplay @@ -6336,7 +6322,6 @@ s(n+1,m) = s(n,m-1) - n s(n,m) for n >= m >= 1. @end example @end ifnottex @tex -\turnoffactive \beforedisplay $$ \eqalign{ s(n,n) &= 1 \qquad \hbox{for } n \ge 0, \cr s(n,0) &= 0 \qquad \hbox{for } n > 0, \cr @@ -6875,7 +6860,6 @@ get the row sum. Similarly, use @kbd{[1 1] r 4 *} to get the column sum. @end example @end ifnottex @tex -\turnoffactive \beforedisplay $$ \eqalign{ x &+ a y = 6 \cr x &+ b y = 10} @@ -6939,7 +6923,6 @@ which we can solve using Calc's @samp{/} command. @end example @end ifnottex @tex -\turnoffactive \beforedisplayh $$ \openup1\jot \tabskip=0pt plus1fil \halign to\displaywidth{\tabskip=0pt @@ -7074,7 +7057,6 @@ the first job is to form the matrix that describes the problem. @end example @end ifnottex @tex -\turnoffactive \beforedisplay $$ m \times x + b \times 1 = y $$ \afterdisplay @@ -7865,7 +7847,6 @@ So the result when we take the modulo after every step is, @end example @end ifnottex @tex -\turnoffactive \beforedisplay $$ 3 (3 a + b - 511 m) + c - 511 n $$ \afterdisplay @@ -7881,7 +7862,6 @@ the distributive law yields @end example @end ifnottex @tex -\turnoffactive \beforedisplay $$ 9 a + 3 b + c - 511\times3 m - 511 n $$ \afterdisplay @@ -7899,7 +7879,6 @@ term. So we can take it out to get an equivalent formula with @end example @end ifnottex @tex -\turnoffactive \beforedisplay $$ 9 a + 3 b + c - 511 n^{\prime} $$ \afterdisplay @@ -14408,7 +14387,6 @@ $$ \sin\left( a^2 \over b_i \right) $$ @end group @end example @tex -\turnoffactive $$ [3 + 4i, {3 \over 4}, 3 \pm 4, [ 3 \ldots \infty)] $$ @end tex @sp 1 @@ -14434,7 +14412,6 @@ $$ [|a|, \left| a \over b \right|, @end group @end example @tex -\turnoffactive $$ [\sin{a}, \sin{2 a}, \sin(2 + a), \sin\left( {a \over b} \right)] $$ @end tex @sp 2 @@ -14467,7 +14444,6 @@ First with @samp{\def\evalto@{@}}, then with @samp{\def\evalto#1\to@{@}}: @end group @end example @tex -\turnoffactive $$ 2 + 3 \to 5 $$ $$ 5 $$ @end tex @@ -14482,7 +14458,6 @@ First with standard @code{\to}, then with @samp{\let\to\Rightarrow}: @end group @end example @tex -\turnoffactive $$ [{2 + 3 \to 5}, {{a \over 2} \to {b + c \over 2}}] $$ {\let\to\Rightarrow $$ [{2 + 3 \to 5}, {{a \over 2} \to {b + c \over 2}}] $$} @@ -14499,7 +14474,6 @@ Matrices normally, then changing @code{\matrix} to @code{\pmatrix}: @end group @end example @tex -\turnoffactive $$ \matrix{ {a \over b} & 0 \cr 0 & 2^{(x + 1)} } $$ $$ \pmatrix{ {a \over b} & 0 \cr 0 & 2^{(x + 1)} } $$ @end tex @@ -17935,7 +17909,6 @@ ddb(cost, salv, life, per) = --------, book = cost - depreciation so far @end example @end ifnottex @tex -\turnoffactive $$ \code{fv}(r, n, p) = p { (1 + r)^n - 1 \over r } $$ $$ \code{fvb}(r, n, p) = p { ((1 + r)^n - 1) (1 + r) \over r } $$ $$ \code{fvl}(r, n, p) = p (1 + r)^n $$ @@ -18591,7 +18564,6 @@ letter gamma). You can obtain these using the @kbd{H f G} [@code{gammag}] and @kbd{H I f G} [@code{gammaG}] commands. @end ifnottex @tex -\turnoffactive The functions corresponding to the integrals that define $P(a,x)$ and $Q(a,x)$ but without the normalizing $1/\Gamma(a)$ factor are called $\gamma(a,x)$ and $\Gamma(a,x)$, respectively. @@ -20559,7 +20531,6 @@ this is the weighted mean of the @expr{x} values with weights @texline @math{1 /\sigma^2}. @infoline @expr{1 / s^2}. @tex -\turnoffactive $$ \mu = { \displaystyle \sum { x_i \over \sigma_i^2 } \over \displaystyle \sum { 1 \over \sigma_i^2 } } $$ @end tex @@ -20593,7 +20564,6 @@ root of the reciprocal of the sum of the reciprocals of the squares of the input errors. (I.e., the variance is the reciprocal of the sum of the reciprocals of the variances.) @tex -\turnoffactive $$ \sigma_\mu^2 = {1 \over \displaystyle \sum {1 \over \sigma_i^2}} $$ @end tex If the inputs are plain @@ -20603,7 +20573,6 @@ out to be equivalent to calculating the standard deviation and then assuming each value's error is equal to this standard deviation.) @tex -\turnoffactive $$ \sigma_\mu^2 = {\sigma^2 \over N} $$ @end tex @@ -20636,7 +20605,6 @@ command computes the harmonic mean of the data values. This is defined as the reciprocal of the arithmetic mean of the reciprocals of the values. @tex -\turnoffactive $$ { N \over \displaystyle \sum {1 \over x_i} } $$ @end tex @@ -20650,7 +20618,6 @@ is the @var{n}th root of the product of the values. This is also equal to the @code{exp} of the arithmetic mean of the logarithms of the data values. @tex -\turnoffactive $$ \exp \left ( \sum { \ln x_i } \right ) = \left ( \prod { x_i } \right)^{1 / N} $$ @end tex @@ -20662,7 +20629,6 @@ mean'' of two numbers taken from the stack. This is computed by replacing the two numbers with their arithmetic mean and geometric mean, then repeating until the two values converge. @tex -\turnoffactive $$ a_{i+1} = { a_i + b_i \over 2 } , \qquad b_{i+1} = \sqrt{a_i b_i} $$ @end tex @@ -20685,7 +20651,6 @@ deviation, whose value is the square root of the sum of the squares of the differences between the values and the mean of the @expr{N} values, divided by @expr{N-1}. @tex -\turnoffactive $$ \sigma^2 = {1 \over N - 1} \sum (x_i - \mu)^2 $$ @end tex @@ -20712,7 +20677,6 @@ is used when the input represents a sample of the set of all data values, so that the mean computed from the input is itself only an estimate of the true mean. @tex -\turnoffactive $$ \sigma^2 = {1 \over N} \sum (x_i - \mu)^2 $$ @end tex @@ -20777,7 +20741,6 @@ are composed of error forms, the error for a given data point is taken as the square root of the sum of the squares of the two input errors. @tex -\turnoffactive $$ \sigma_{x\!y}^2 = {1 \over N-1} \sum (x_i - \mu_x) (y_i - \mu_y) $$ $$ \sigma_{x\!y}^2 = {\displaystyle {1 \over N-1} @@ -20805,7 +20768,6 @@ This is defined by the covariance of the vectors divided by the product of their standard deviations. (There is no difference between sample or population statistics here.) @tex -\turnoffactive $$ r_{x\!y} = { \sigma_{x\!y}^2 \over \sigma_x^2 \sigma_y^2 } $$ @end tex @@ -24361,8 +24323,6 @@ For example, suppose the data matrix @end example @end ifnottex @tex -\turnoffactive -\turnoffactive \beforedisplay $$ \pmatrix{ 1 & 2 & 3 & 4 & 5 \cr 5 & 7 & 9 & 11 & 13 } @@ -24422,7 +24382,6 @@ chi^2 = sum((y_i - (a + b x_i))^2, i, 1, N) @end example @end ifnottex @tex -\turnoffactive \beforedisplay $$ \chi^2 = \sum_{i=1}^N (y_i - (a + b x_i))^2 $$ \afterdisplay @@ -24613,7 +24572,6 @@ chi^2 = sum(((y_i - (a + b x_i)) / sigma_i)^2, i, 1, N) @end example @end ifnottex @tex -\turnoffactive \beforedisplay $$ \chi^2 = \sum_{i=1}^N \left(y_i - (a + b x_i) \over \sigma_i\right)^2 $$ \afterdisplay @@ -25388,7 +25346,6 @@ any later ones are answered by reading additional elements from the stack. Thus, @kbd{' k^2 @key{RET} ' k @key{RET} 1 @key{RET} 5 @key{RET} a + @key{RET}} produces the result 55. @tex -\turnoffactive $$ \sum_{k=1}^5 k^2 = 55 $$ @end tex diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e0cbf007771..484ae6529c3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,48 @@ +2010-05-13 Chong Yidong + + Add TeX open-block and close-block keybindings to SGML, and vice + versa. + + * textmodes/tex-mode.el (tex-mode-map): Bind C-c C-t to + latex-open-block and C-c / to latex-close-block. + + * textmodes/sgml-mode.el (sgml-mode-map): Bind C-c C-o to sgml-tag + and C-c C-e to sgml-close-tag. + +2010-05-13 Michael Albinus + + * net/tramp.el (with-progress-reporter): Create reporter object + only when the message would be displayed. Handled nested calls. + (tramp-handle-load, tramp-handle-file-local-copy) + (tramp-handle-insert-file-contents, tramp-handle-write-region) + (tramp-maybe-send-script, tramp-find-shell): Use + `with-progress-reporter'. + (tramp-handle-dired-compress-file, tramp-maybe-open-connection): + Fix message text. + + * net/tramp-smb.el (tramp-smb-handle-copy-file) + (tramp-smb-handle-file-local-copy, tramp-smb-handle-rename-file) + (tramp-smb-handle-write-region, tramp-smb-maybe-open-connection): + Use `with-progress-reporter'. + +2010-05-13 Agustín Martín + + * ispell.el (ispell-init-process): Do not kill ispell process + everytime when spellchecking from the minibuffer (bug#6143). + +2010-05-13 Stefan Monnier + + * progmodes/sh-script.el (sh-mode): Use define-derived-mode. + + * dos-fns.el: Add "dos-" prefix for namespace control. + (convert-standard-filename): Define as alias for + dos-convert-standard-filename but only if applicable. + +2010-05-12 Alan Mackenzie + + * progmodes/cc-cmds.el (c-beginning-of-defun, c-end-of-defun): + Push the mark at the start of these functions when appropriate. + 2010-05-12 Stefan Monnier * minibuffer.el (completion-cycle-threshold): New custom var. diff --git a/lisp/dos-fns.el b/lisp/dos-fns.el index c1c2517bc22..5834afae8bc 100644 --- a/lisp/dos-fns.el +++ b/lisp/dos-fns.el @@ -31,7 +31,7 @@ (declare-function msdos-long-file-names "msdos.c") ;; This overrides a trivial definition in files.el. -(defun convert-standard-filename (filename) +(defun dos-convert-standard-filename (filename) "Convert a standard file's name to something suitable for the current OS. This means to guarantee valid names and perhaps to canonicalize certain patterns. @@ -48,7 +48,7 @@ shell requires it (see `w32-shell-dos-semantics')." (let ((flen (length filename))) ;; If FILENAME has a trailing slash, remove it and recurse. (if (memq (aref filename (1- flen)) '(?/ ?\\)) - (concat (convert-standard-filename + (concat (dos-convert-standard-filename (substring filename 0 (1- flen))) "/") (let* (;; ange-ftp gets in the way for names like "/foo:bar". @@ -122,12 +122,17 @@ shell requires it (see `w32-shell-dos-semantics')." (aset string (1- (length string)) lastchar)))) (concat (if (and (stringp dir) (memq (aref dir dlen-m-1) '(?/ ?\\))) - (concat (convert-standard-filename + (concat (dos-convert-standard-filename (substring dir 0 dlen-m-1)) "/") - (convert-standard-filename dir)) + (dos-convert-standard-filename dir)) string)))))) +;; Only redirect convert-standard-filename if it has a chance of working, +;; otherwise loading dos-fns.el might make your non-DOS Emacs misbehave. +(when (fboundp 'msdos-long-file-names) + (defalias 'convert-standard-filename 'dos-convert-standard-filename)) + (defun dos-8+3-filename (filename) "Truncate FILENAME to DOS 8+3 limits." (if (or (not (stringp filename)) @@ -188,12 +193,12 @@ shell requires it (see `w32-shell-dos-semantics')." ;; This is for the sake of standard file names elsewhere in Emacs that ;; are defined as constant strings or via defconst, and whose -;; conversion via `convert-standard-filename' does not give good +;; conversion via `dos-convert-standard-filename' does not give good ;; enough results. (defun dosified-file-name (file-name) "Return a variant of FILE-NAME that is valid on MS-DOS filesystems. -This function is for those rare cases where `convert-standard-filename' +This function is for those rare cases where `dos-convert-standard-filename' does not do a job that is good enough, e.g. if you need to preserve the file-name extension. It recognizes only certain specific file names that are used in Emacs Lisp sources; any other file name will be @@ -209,13 +214,13 @@ returned unaltered." (defvar msdos-shells) ;; Override settings chosen at startup. -(defun set-default-process-coding-system () +(defun dos-set-default-process-coding-system () (setq default-process-coding-system (if (default-value 'enable-multibyte-characters) '(undecided-dos . undecided-dos) '(raw-text-dos . raw-text-dos)))) -(add-hook 'before-init-hook 'set-default-process-coding-system) +(add-hook 'before-init-hook 'dos-set-default-process-coding-system) ;; File names defined in preloaded packages can be incorrect or ;; invalid if long file names were available during dumping, but not @@ -232,17 +237,17 @@ returned unaltered." (add-hook 'before-init-hook 'dos-reevaluate-defcustoms) -(defvar register-name-alist +(defvar dos-register-name-alist '((ax . 0) (bx . 1) (cx . 2) (dx . 3) (si . 4) (di . 5) (cflag . 6) (flags . 7) (al . (0 . 0)) (bl . (1 . 0)) (cl . (2 . 0)) (dl . (3 . 0)) (ah . (0 . 1)) (bh . (1 . 1)) (ch . (2 . 1)) (dh . (3 . 1)))) -(defun make-register () +(defun dos-make-register () (make-vector 8 0)) -(defun register-value (regs name) - (let ((where (cdr (assoc name register-name-alist)))) +(defun dos-register-value (regs name) + (let ((where (cdr (assoc name dos-register-name-alist)))) (cond ((consp where) (let ((tem (aref regs (car where)))) (if (zerop (cdr where)) @@ -252,10 +257,10 @@ returned unaltered." (aref regs where)) (t nil)))) -(defun set-register-value (regs name value) +(defun dos-set-register-value (regs name value) (and (numberp value) (>= value 0) - (let ((where (cdr (assoc name register-name-alist)))) + (let ((where (cdr (assoc name dos-register-name-alist)))) (cond ((consp where) (let ((tem (aref regs (car where))) (value (logand value 255))) @@ -268,18 +273,18 @@ returned unaltered." (aset regs where (logand value 65535)))))) regs) -(defsubst intdos (regs) +(defsubst dos-intdos (regs) (int86 33 regs)) ;; Backward compatibility for obsolescent functions which ;; set screen size. -(defun mode25 () +(defun dos-mode25 () "Changes the number of screen rows to 25." (interactive) (set-frame-size (selected-frame) 80 25)) -(defun mode4350 () +(defun dos-mode4350 () "Changes the number of rows to 43 or 50. Emacs always tries to set the screen height to 50 rows first. If this fails, it will try to set it to 43 rows, on the assumption diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 194d2036c3f..0b7eaf7ed72 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,25 @@ +2010-05-13 Katsumi Yamaoka + + * mml1991.el (mml1991-mailcrypt-encrypt, mml1991-gpg-encrypt) + * mml2015.el (mml2015-gpg-encrypt): Disable multibyte in buffers + generated within the mm-with-unibyte-current-buffer macro. + +2010-05-13 Katsumi Yamaoka + + * gnus-art.el (gnus-bind-safe-url-regexp): Bind mm-w3m-safe-url-regexp + to nil when we're in a mml-preview buffer and no group is selected. + +2010-05-12 Andreas Seltenreich + + * gnus-sum.el (gnus-summary-read-group-1): Don't jump to next group + when catching the `C-g'. Reported by: "Leo" + +2010-05-12 Katsumi Yamaoka + + * message.el (message-forward-make-body-plain) + (message-forward-make-body-mml): Use mm-multibyte-string-p instead of + multibyte-string-p. + 2010-05-12 Katsumi Yamaoka * message.el (message-forward-make-body-mml): Assume original message diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 5f899b3067a..0659ee893de 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -4822,7 +4822,11 @@ General format specifiers can also be used. See Info node (with-current-buffer gnus-article-current-summary gnus-newsgroup-name) gnus-newsgroup-name))) - (if (cond ((stringp gnus-safe-html-newsgroups) + (if (cond ((not group) + ;; Maybe we're in a mml-preview buffer + ;; and no group is selected. + t) + ((stringp gnus-safe-html-newsgroups) (string-match gnus-safe-html-newsgroups group)) ((consp gnus-safe-html-newsgroups) (member group gnus-safe-html-newsgroups))) diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index a0943493844..3a2c944ed2f 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -3931,7 +3931,6 @@ If NO-DISPLAY, don't generate a summary buffer." (progn (set-buffer gnus-group-buffer) (gnus-group-jump-to-group group) - (gnus-group-next-unread-group 1) (gnus-configure-windows 'group 'force)) (gnus-handle-ephemeral-exit quit-config)) ;; Finally signal the quit. diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 897fe695288..947b1bd53e8 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -7165,7 +7165,7 @@ Optional DIGEST will use digest to forward." (contents (with-current-buffer forward-buffer (buffer-string))) e) (unless (featurep 'xemacs) - (unless (multibyte-string-p contents) + (unless (mm-multibyte-string-p contents) (error "Attempt to insert unibyte string from the buffer \"%s\"\ to the multibyte buffer \"%s\"" (if (bufferp forward-buffer) @@ -7220,7 +7220,7 @@ Optional DIGEST will use digest to forward." (if (not message-forward-decoded-p) (let ((contents (with-current-buffer forward-buffer (buffer-string)))) (unless (featurep 'xemacs) - (unless (multibyte-string-p contents) + (unless (mm-multibyte-string-p contents) (error "Attempt to insert unibyte string from the buffer \"%s\"\ to the multibyte buffer \"%s\"" (if (bufferp forward-buffer) diff --git a/lisp/gnus/mml1991.el b/lisp/gnus/mml1991.el index a3ada29fa66..3ba479574fd 100644 --- a/lisp/gnus/mml1991.el +++ b/lisp/gnus/mml1991.el @@ -145,6 +145,7 @@ Whether the passphrase is cached at all is controlled by (delete-region (point-min) (point))) (mm-with-unibyte-current-buffer (with-temp-buffer + (inline (mm-disable-multibyte)) (setq cipher (current-buffer)) (insert-buffer-substring text) (unless (mc-encrypt-generic @@ -225,6 +226,7 @@ Whether the passphrase is cached at all is controlled by (delete-region (point-min) (point))) (mm-with-unibyte-current-buffer (with-temp-buffer + (inline (mm-disable-multibyte)) (flet ((gpg-encrypt-func (sign plaintext ciphertext result recipients &optional passphrase sign-with-key armor textmode) diff --git a/lisp/gnus/mml2015.el b/lisp/gnus/mml2015.el index 130a3ca86a5..977f4dabb67 100644 --- a/lisp/gnus/mml2015.el +++ b/lisp/gnus/mml2015.el @@ -680,6 +680,7 @@ Whether the passphrase is cached at all is controlled by cipher) (mm-with-unibyte-current-buffer (with-temp-buffer + (mm-disable-multibyte) ;; set up a function to call the correct gpg encrypt routine ;; with the right arguments. (FIXME: this should be done ;; differently.) diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el index 434c2bad20d..00b282b83e3 100644 --- a/lisp/net/tramp-smb.el +++ b/lisp/net/tramp-smb.el @@ -334,41 +334,41 @@ KEEP-DATE is not handled in case NEWNAME resides on an SMB server. PRESERVE-UID-GID is completely ignored." (setq filename (expand-file-name filename) newname (expand-file-name newname)) + (with-progress-reporter + (tramp-dissect-file-name (if (file-remote-p filename) filename newname)) + 0 (format "Copying %s to %s" filename newname) - (let ((tmpfile (file-local-copy filename))) + (let ((tmpfile (file-local-copy filename))) - (if tmpfile - ;; Remote filename. - (condition-case err - (rename-file tmpfile newname ok-if-already-exists) - ((error quit) - (tramp-compat-delete-file tmpfile 'force) - (signal (car err) (cdr err)))) + (if tmpfile + ;; Remote filename. + (condition-case err + (rename-file tmpfile newname ok-if-already-exists) + ((error quit) + (tramp-compat-delete-file tmpfile 'force) + (signal (car err) (cdr err)))) - ;; Remote newname. - (when (file-directory-p newname) - (setq newname (expand-file-name - (file-name-nondirectory filename) newname))) + ;; Remote newname. + (when (file-directory-p newname) + (setq newname + (expand-file-name (file-name-nondirectory filename) newname))) - (with-parsed-tramp-file-name newname nil - (when (and (not ok-if-already-exists) - (file-exists-p newname)) - (tramp-error v 'file-already-exists newname)) + (with-parsed-tramp-file-name newname nil + (when (and (not ok-if-already-exists) + (file-exists-p newname)) + (tramp-error v 'file-already-exists newname)) - ;; We must also flush the cache of the directory, because - ;; `file-attributes' reads the values from there. - (tramp-flush-file-property v (file-name-directory localname)) - (tramp-flush-file-property v localname) - (unless (tramp-smb-get-share v) - (tramp-error - v 'file-error "Target `%s' must contain a share name" newname)) - (tramp-message v 0 "Copying file %s to file %s..." filename newname) - (if (tramp-smb-send-command - v (format "put \"%s\" \"%s\"" - filename (tramp-smb-get-localname v))) - (tramp-message - v 0 "Copying file %s to file %s...done" filename newname) - (tramp-error v 'file-error "Cannot copy `%s'" filename))))) + ;; We must also flush the cache of the directory, because + ;; `file-attributes' reads the values from there. + (tramp-flush-file-property v (file-name-directory localname)) + (tramp-flush-file-property v localname) + (unless (tramp-smb-get-share v) + (tramp-error + v 'file-error "Target `%s' must contain a share name" newname)) + (unless (tramp-smb-send-command + v (format "put \"%s\" \"%s\"" + filename (tramp-smb-get-localname v))) + (tramp-error v 'file-error "Cannot copy `%s'" filename)))))) ;; KEEP-DATE handling. (when keep-date (set-file-times newname (nth 5 (file-attributes filename))))) @@ -605,15 +605,15 @@ PRESERVE-UID-GID is completely ignored." v 'file-error "Cannot make local copy of non-existing file `%s'" filename)) (let ((tmpfile (tramp-compat-make-temp-file filename))) - (tramp-message v 4 "Fetching %s to tmp file %s..." filename tmpfile) - (if (tramp-smb-send-command - v (format "get \"%s\" \"%s\"" (tramp-smb-get-localname v) tmpfile)) - (tramp-message - v 4 "Fetching %s to tmp file %s...done" filename tmpfile) - ;; Oops, an error. We shall cleanup. - (tramp-compat-delete-file tmpfile 'force) - (tramp-error - v 'file-error "Cannot make local copy of file `%s'" filename)) + (with-progress-reporter + v 3 (format "Fetching %s to tmp file %s" filename tmpfile) + (unless (tramp-smb-send-command + v (format "get \"%s\" \"%s\"" + (tramp-smb-get-localname v) tmpfile)) + ;; Oops, an error. We shall cleanup. + (tramp-compat-delete-file tmpfile 'force) + (tramp-error + v 'file-error "Cannot make local copy of file `%s'" filename))) tmpfile))) ;; This function should return "foo/" for directories and "bar" for @@ -850,38 +850,39 @@ target of the symlink differ." "Like `rename-file' for Tramp files." (setq filename (expand-file-name filename) newname (expand-file-name newname)) + (with-progress-reporter + (tramp-dissect-file-name (if (file-remote-p filename) filename newname)) + 0 (format "Renaming %s to %s" filename newname) - (let ((tmpfile (file-local-copy filename))) + (let ((tmpfile (file-local-copy filename))) - (if tmpfile - ;; Remote filename. - (condition-case err - (rename-file tmpfile newname ok-if-already-exists) - ((error quit) - (tramp-compat-delete-file tmpfile 'force) - (signal (car err) (cdr err)))) + (if tmpfile + ;; Remote filename. + (condition-case err + (rename-file tmpfile newname ok-if-already-exists) + ((error quit) + (tramp-compat-delete-file tmpfile 'force) + (signal (car err) (cdr err)))) - ;; Remote newname. - (when (file-directory-p newname) - (setq newname (expand-file-name - (file-name-nondirectory filename) newname))) + ;; Remote newname. + (when (file-directory-p newname) + (setq newname (expand-file-name + (file-name-nondirectory filename) newname))) - (with-parsed-tramp-file-name newname nil - (when (and (not ok-if-already-exists) - (file-exists-p newname)) - (tramp-error v 'file-already-exists newname)) - ;; We must also flush the cache of the directory, because - ;; `file-attributes' reads the values from there. - (tramp-flush-file-property v (file-name-directory localname)) - (tramp-flush-file-property v localname) - (tramp-message v 0 "Copying file %s to file %s..." filename newname) - (if (tramp-smb-send-command - v (format "put %s \"%s\"" filename (tramp-smb-get-localname v))) - (tramp-message - v 0 "Copying file %s to file %s...done" filename newname) - (tramp-error v 'file-error "Cannot rename `%s'" filename))))) + (with-parsed-tramp-file-name newname nil + (when (and (not ok-if-already-exists) + (file-exists-p newname)) + (tramp-error v 'file-already-exists newname)) + ;; We must also flush the cache of the directory, because + ;; `file-attributes' reads the values from there. + (tramp-flush-file-property v (file-name-directory localname)) + (tramp-flush-file-property v localname) + (unless (tramp-smb-send-command + v (format "put %s \"%s\"" + filename (tramp-smb-get-localname v))) + (tramp-error v 'file-error "Cannot rename `%s'" filename))))) - (tramp-compat-delete-file filename 'force)) + (tramp-compat-delete-file filename 'force))) (defun tramp-smb-handle-set-file-modes (filename mode) "Like `set-file-modes' for Tramp files." @@ -938,14 +939,14 @@ errors for shares like \"C$/\", which are common in Microsoft Windows." (list start end tmpfile append 'no-message lockname confirm) (list start end tmpfile append 'no-message lockname))) - (tramp-message v 5 "Writing tmp file %s to file %s..." tmpfile filename) - (unwind-protect - (if (tramp-smb-send-command - v (format "put %s \"%s\"" tmpfile (tramp-smb-get-localname v))) - (tramp-message - v 5 "Writing tmp file %s to file %s...done" tmpfile filename) - (tramp-error v 'file-error "Cannot write `%s'" filename)) - (tramp-compat-delete-file tmpfile 'force)) + (with-progress-reporter + v 3 (format "Moving tmp file %s to %s" tmpfile filename) + (unwind-protect + (unless (tramp-smb-send-command + v (format "put %s \"%s\"" + tmpfile (tramp-smb-get-localname v))) + (tramp-error v 'file-error "Cannot write `%s'" filename)) + (tramp-compat-delete-file tmpfile 'force))) (unless (equal curbuf (current-buffer)) (tramp-error @@ -1302,60 +1303,57 @@ connection if a previous connection has died for some reason." (setq args (append args (list "-s" tramp-smb-conf)))) ;; OK, let's go. - (tramp-message - vec 3 "Opening connection for //%s%s/%s..." - (if (not (zerop (length user))) (concat user "@") "") - host (or share "")) + (with-progress-reporter + vec 3 + (format "Opening connection for //%s%s/%s" + (if (not (zerop (length user))) (concat user "@") "") + host (or share "")) - (let* ((coding-system-for-read nil) - (process-connection-type tramp-process-connection-type) - (p (let ((default-directory - (tramp-compat-temporary-file-directory))) - (apply #'start-process - (tramp-buffer-name vec) (tramp-get-buffer vec) - tramp-smb-program args)))) + (let* ((coding-system-for-read nil) + (process-connection-type tramp-process-connection-type) + (p (let ((default-directory + (tramp-compat-temporary-file-directory))) + (apply #'start-process + (tramp-buffer-name vec) (tramp-get-buffer vec) + tramp-smb-program args)))) - (tramp-message - vec 6 "%s" (mapconcat 'identity (process-command p) " ")) - (tramp-set-process-query-on-exit-flag p nil) + (tramp-message + vec 6 "%s" (mapconcat 'identity (process-command p) " ")) + (tramp-set-process-query-on-exit-flag p nil) - ;; Set variables for computing the prompt for reading password. - (setq tramp-current-method tramp-smb-method - tramp-current-user user - tramp-current-host host) + ;; Set variables for computing the prompt for reading password. + (setq tramp-current-method tramp-smb-method + tramp-current-user user + tramp-current-host host) - ;; Play login scenario. - (tramp-process-actions - p vec - (if share - tramp-smb-actions-with-share - tramp-smb-actions-without-share)) + ;; Play login scenario. + (tramp-process-actions + p vec + (if share + tramp-smb-actions-with-share + tramp-smb-actions-without-share)) - ;; Check server version. - (with-current-buffer (tramp-get-connection-buffer vec) - (goto-char (point-min)) - (search-forward-regexp - "Domain=\\[[^]]*\\] OS=\\[[^]]*\\] Server=\\[[^]]*\\]" nil t) - (let ((smbserver-version (match-string 0))) - (unless - (string-equal - smbserver-version - (tramp-get-connection-property - vec "smbserver-version" smbserver-version)) - (tramp-flush-directory-property vec "") - (tramp-flush-connection-property vec)) - (tramp-set-connection-property - vec "smbserver-version" smbserver-version))) + ;; Check server version. + (with-current-buffer (tramp-get-connection-buffer vec) + (goto-char (point-min)) + (search-forward-regexp + "Domain=\\[[^]]*\\] OS=\\[[^]]*\\] Server=\\[[^]]*\\]" nil t) + (let ((smbserver-version (match-string 0))) + (unless + (string-equal + smbserver-version + (tramp-get-connection-property + vec "smbserver-version" smbserver-version)) + (tramp-flush-directory-property vec "") + (tramp-flush-connection-property vec)) + (tramp-set-connection-property + vec "smbserver-version" smbserver-version))) - ;; Set chunksize. Otherwise, `tramp-send-string' might - ;; try it itself. - (tramp-set-connection-property p "smb-share" share) - (tramp-set-connection-property p "chunksize" tramp-chunksize) - - (tramp-message - vec 3 "Opening connection for //%s%s/%s...done" - (if (not (zerop (length user))) (concat user "@") "") - host (or share "")))))))) + ;; Set chunksize. Otherwise, `tramp-send-string' might + ;; try it itself. + (tramp-set-connection-property p "smb-share" share) + (tramp-set-connection-property + p "chunksize" tramp-chunksize)))))))) ;; We don't use timeouts. If needed, the caller shall wrap around. (defun tramp-smb-wait-for-output (vec) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 2da11bda834..c5addae8e5d 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -2271,14 +2271,18 @@ FILE must be a local file name on a connection identified via VEC." (tramp-message ,vec ,level "%s..." ,message) ;; We start a pulsing progress reporter after 3 seconds. Feature ;; introduced in Emacs 24.1. - (when (<= ,level tramp-verbose) + (when (and tramp-message-show-message + ;; Display only when there is a minimum level. + (<= ,level (min tramp-verbose 3))) (condition-case nil (setq pr (tramp-compat-funcall 'make-progress-reporter ,message) tm (if pr (run-at-time 3 0.1 'progress-reporter-update pr))) (error nil))) (unwind-protect ;; Execute the body. - (progn ,@body) + (let ((tramp-message-show-message + (and tramp-message-show-message (not tm)))) + ,@body) ;; Stop progress reporter. (if tm (tramp-compat-funcall 'cancel-timer tm)) (tramp-message ,vec ,level "%s...done" ,message)))) @@ -2558,13 +2562,13 @@ target of the symlink differ." (tramp-error v 'file-error "Cannot load nonexistent file `%s'" file))) (if (not (file-exists-p file)) nil - (unless nomessage (tramp-message v 0 "Loading %s..." file)) - (let ((local-copy (file-local-copy file))) - ;; MUST-SUFFIX doesn't exist on XEmacs, so let it default to nil. - (unwind-protect - (load local-copy noerror t t) - (tramp-compat-delete-file local-copy 'force))) - (unless nomessage (tramp-message v 0 "Loading %s...done" file)) + (let ((tramp-message-show-message (not nomessage))) + (with-progress-reporter v 0 (format "Loading %s" file) + (let ((local-copy (file-local-copy file))) + ;; MUST-SUFFIX doesn't exist on XEmacs, so let it default to nil. + (unwind-protect + (load local-copy noerror t t) + (tramp-compat-delete-file local-copy 'force))))) t))) ;; Localname manipulation functions that grok Tramp localnames... @@ -4153,7 +4157,7 @@ This is like `dired-recursive-delete-directory' for Tramp files." nil) ((and suffix (nth 2 suffix)) ;; We found an uncompression rule. - (with-progress-reporter v 0 (format "Uncompressing %s..." file) + (with-progress-reporter v 0 (format "Uncompressing %s" file) (when (zerop (tramp-send-command-and-check v (concat (nth 2 suffix) " " @@ -4165,7 +4169,7 @@ This is like `dired-recursive-delete-directory' for Tramp files." (t ;; We don't recognize the file as compressed, so compress it. ;; Try gzip. - (with-progress-reporter v 0 (format "Compressing %s..." file) + (with-progress-reporter v 0 (format "Compressing %s" file) (when (zerop (tramp-send-command-and-check v (concat "gzip -f " @@ -4747,11 +4751,11 @@ Lisp error raised when PROGRAM is nil is trapped also, returning 1." ;; Use inline encoding for file transfer. (rem-enc (save-excursion - (tramp-message v 5 "Encoding remote file %s..." filename) - (tramp-barf-unless-okay - v (format rem-enc (tramp-shell-quote-argument localname)) - "Encoding remote file failed") - (tramp-message v 5 "Encoding remote file %s...done" filename) + (with-progress-reporter + v 5 (format "Encoding remote file %s" filename) + (tramp-barf-unless-okay + v (format rem-enc (tramp-shell-quote-argument localname)) + "Encoding remote file failed")) (if (functionp loc-dec) ;; If local decoding is a function, we call it. We @@ -4761,15 +4765,15 @@ Lisp error raised when PROGRAM is nil is trapped also, returning 1." (with-temp-buffer (set-buffer-multibyte nil) (insert-buffer-substring (tramp-get-buffer v)) - (tramp-message - v 5 "Decoding remote file %s with function %s..." - filename loc-dec) - (funcall loc-dec (point-min) (point-max)) - ;; Unset `file-name-handler-alist'. Otherwise, - ;; epa-file gets confused. - (let (file-name-handler-alist - (coding-system-for-write 'binary)) - (write-region (point-min) (point-max) tmpfile))) + (with-progress-reporter + v 3 (format "Decoding remote file %s with function %s" + filename loc-dec) + (funcall loc-dec (point-min) (point-max)) + ;; Unset `file-name-handler-alist'. Otherwise, + ;; epa-file gets confused. + (let (file-name-handler-alist + (coding-system-for-write 'binary)) + (write-region (point-min) (point-max) tmpfile)))) ;; If tramp-decoding-function is not defined for this ;; method, we invoke tramp-decoding-command instead. @@ -4779,14 +4783,14 @@ Lisp error raised when PROGRAM is nil is trapped also, returning 1." (let (file-name-handler-alist (coding-system-for-write 'binary)) (write-region (point-min) (point-max) tmpfile2)) - (tramp-message - v 5 "Decoding remote file %s with command %s..." - filename loc-dec) - (unwind-protect - (tramp-call-local-coding-command loc-dec tmpfile2 tmpfile) - (tramp-compat-delete-file tmpfile2 'force)))) + (with-progress-reporter + v 3 (format "Decoding remote file %s with command %s" + filename loc-dec) + (unwind-protect + (tramp-call-local-coding-command + loc-dec tmpfile2 tmpfile) + (tramp-compat-delete-file tmpfile2 'force))))) - (tramp-message v 5 "Decoding remote file %s...done" filename) ;; Set proper permissions. (set-file-modes tmpfile (tramp-default-file-modes filename)) ;; Set local user ownership. @@ -4842,7 +4846,7 @@ coding system might not be determined. This function repairs it." "Like `insert-file-contents' for Tramp files." (barf-if-buffer-read-only) (setq filename (expand-file-name filename)) - (let (coding-system-used result local-copy remote-copy) + (let (result local-copy remote-copy) (with-parsed-tramp-file-name filename nil (unwind-protect (if (not (file-exists-p filename)) @@ -4913,27 +4917,16 @@ coding system might not be determined. This function repairs it." (setq tramp-temp-buffer-file-name local-copy) (put 'tramp-temp-buffer-file-name 'permanent-local t)) - (tramp-message - v 4 "Inserting local temp file `%s'..." local-copy) - - ;; We must ensure that `file-coding-system-alist' - ;; matches `local-copy'. - (let ((file-coding-system-alist - (tramp-find-file-name-coding-system-alist - filename local-copy))) - (setq result - (insert-file-contents - local-copy nil nil nil replace)) - ;; Now `last-coding-system-used' has right value. - ;; Remember it. - (when (boundp 'last-coding-system-used) - (setq coding-system-used - (symbol-value 'last-coding-system-used)))) - - (tramp-message - v 4 "Inserting local temp file `%s'...done" local-copy) - (when (boundp 'last-coding-system-used) - (set 'last-coding-system-used coding-system-used)))) + (with-progress-reporter + v 3 (format "Inserting local temp file `%s'" local-copy) + ;; We must ensure that `file-coding-system-alist' + ;; matches `local-copy'. + (let ((file-coding-system-alist + (tramp-find-file-name-coding-system-alist + filename local-copy))) + (setq result + (insert-file-contents + local-copy nil nil nil replace)))))) ;; Save exit. (progn @@ -5193,15 +5186,14 @@ Returns a file name in `tramp-auto-save-directory' for autosaving this file." ;; Use inline file transfer. (rem-dec ;; Encode tmpfile. - (tramp-message v 5 "Encoding region...") (unwind-protect (with-temp-buffer (set-buffer-multibyte nil) ;; Use encoding function or command. (if (functionp loc-enc) - (progn - (tramp-message - v 5 "Encoding region using function `%s'..." loc-enc) + (with-progress-reporter + v 3 (format "Encoding region using function `%s'" + loc-enc) (let ((coding-system-for-read 'binary)) (insert-file-contents-literally tmpfile)) ;; The following `let' is a workaround for the @@ -5217,59 +5209,61 @@ Returns a file name in `tramp-auto-save-directory' for autosaving this file." (tramp-compat-temporary-file-directory))) (funcall loc-enc (point-min) (point-max)))) - (tramp-message - v 5 "Encoding region using command `%s'..." loc-enc) - (unless (zerop (tramp-call-local-coding-command - loc-enc tmpfile t)) - (tramp-error - v 'file-error - "Cannot write to `%s', local encoding command `%s' failed" - filename loc-enc))) + (with-progress-reporter + v 3 (format "Encoding region using command `%s'" + loc-enc) + (unless (zerop (tramp-call-local-coding-command + loc-enc tmpfile t)) + (tramp-error + v 'file-error + (concat "Cannot write to `%s', " + "local encoding command `%s' failed") + filename loc-enc)))) ;; Send buffer into remote decoding command which ;; writes to remote file. Because this happens on ;; the remote host, we cannot use the function. - (goto-char (point-max)) - (unless (bolp) (newline)) - (tramp-message - v 5 "Decoding region into remote file %s..." filename) - (tramp-send-command - v - (format - (concat rem-dec " <<'EOF'\n%sEOF") - (tramp-shell-quote-argument localname) - (buffer-string))) - (tramp-barf-unless-okay - v nil - "Couldn't write region to `%s', decode using `%s' failed" - filename rem-dec) - ;; When `file-precious-flag' is set, the region is - ;; written to a temporary file. Check that the - ;; checksum is equal to that from the local tmpfile. - (when file-precious-flag - (erase-buffer) - (and - ;; cksum runs locally, if possible. - (zerop (tramp-local-call-process "cksum" tmpfile t)) - ;; cksum runs remotely. - (zerop - (tramp-send-command-and-check - v - (format - "cksum <%s" (tramp-shell-quote-argument localname)))) - ;; ... they are different. - (not - (string-equal - (buffer-string) - (with-current-buffer (tramp-get-buffer v) - (buffer-string)))) - (tramp-error - v 'file-error - (concat "Couldn't write region to `%s'," - " decode using `%s' failed") - filename rem-dec))) - (tramp-message - v 5 "Decoding region into remote file %s...done" filename)) + (with-progress-reporter + v 3 + (format "Decoding region into remote file %s" filename) + (goto-char (point-max)) + (unless (bolp) (newline)) + (tramp-send-command + v + (format + (concat rem-dec " <<'EOF'\n%sEOF") + (tramp-shell-quote-argument localname) + (buffer-string))) + (tramp-barf-unless-okay + v nil + "Couldn't write region to `%s', decode using `%s' failed" + filename rem-dec) + ;; When `file-precious-flag' is set, the region is + ;; written to a temporary file. Check that the + ;; checksum is equal to that from the local tmpfile. + (when file-precious-flag + (erase-buffer) + (and + ;; cksum runs locally, if possible. + (zerop (tramp-local-call-process "cksum" tmpfile t)) + ;; cksum runs remotely. + (zerop + (tramp-send-command-and-check + v + (format + "cksum <%s" + (tramp-shell-quote-argument localname)))) + ;; ... they are different. + (not + (string-equal + (buffer-string) + (with-current-buffer (tramp-get-buffer v) + (buffer-string)))) + (tramp-error + v 'file-error + (concat "Couldn't write region to `%s'," + " decode using `%s' failed") + filename rem-dec))))) ;; Save exit. (tramp-compat-delete-file tmpfile 'force))) @@ -6286,14 +6280,13 @@ Only send the definition if it has not already been done." (let* ((p (tramp-get-connection-process vec)) (scripts (tramp-get-connection-property p "scripts" nil))) (unless (member name scripts) - (tramp-message vec 5 "Sending script `%s'..." name) - ;; The script could contain a call of Perl. This is masked with `%s'. - (tramp-send-command-and-check - vec - (format "%s () {\n%s\n}" name - (format script (tramp-get-remote-perl vec)))) - (tramp-set-connection-property p "scripts" (cons name scripts)) - (tramp-message vec 5 "Sending script `%s'...done." name)))) + (with-progress-reporter vec 5 (format "Sending script `%s'" name) + ;; The script could contain a call of Perl. This is masked with `%s'. + (tramp-send-command-and-check + vec + (format "%s () {\n%s\n}" name + (format script (tramp-get-remote-perl vec)))) + (tramp-set-connection-property p "scripts" (cons name scripts)))))) (defun tramp-set-auto-save () (when (and ;; ange-ftp has its own auto-save mechanism @@ -6572,7 +6565,7 @@ file exists and nonzero exit status otherwise." (setq extra-args (cdr item)))) (when extra-args (setq shell (concat shell " " extra-args)))) (tramp-message - vec 5 "Starting remote shell `%s' for tilde expansion..." shell) + vec 5 "Starting remote shell `%s' for tilde expansion" shell) (let ((tramp-end-of-output tramp-initial-end-of-output)) (tramp-send-command vec @@ -6580,13 +6573,12 @@ file exists and nonzero exit status otherwise." (shell-quote-argument tramp-end-of-output) shell) t)) ;; Setting prompts. - (tramp-message vec 5 "Setting remote shell prompt...") - (tramp-send-command - vec (format "PS1=%s" (shell-quote-argument tramp-end-of-output)) t) - (tramp-send-command vec "PS2=''" t) - (tramp-send-command vec "PS3=''" t) - (tramp-send-command vec "PROMPT_COMMAND=''" t) - (tramp-message vec 5 "Setting remote shell prompt...done")) + (with-progress-reporter vec 5 (format "Setting remote shell prompt") + (tramp-send-command + vec (format "PS1=%s" (shell-quote-argument tramp-end-of-output)) t) + (tramp-send-command vec "PS2=''" t) + (tramp-send-command vec "PS3=''" t) + (tramp-send-command vec "PROMPT_COMMAND=''" t))) (t (tramp-message vec 5 "Remote `%s' groks tilde expansion, good" @@ -7423,11 +7415,11 @@ connection if a previous connection has died for some reason." (tramp-get-buffer vec) (if (zerop (length (tramp-file-name-user vec))) (tramp-message - vec 3 "Opening connection for %s using %s..." + vec 3 "Opening connection for %s using %s" (tramp-file-name-host vec) (tramp-file-name-method vec)) (tramp-message - vec 3 "Opening connection for %s@%s using %s..." + vec 3 "Opening connection for %s@%s using %s" (tramp-file-name-user vec) (tramp-file-name-host vec) (tramp-file-name-method vec))) diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el index 56fc8032541..10267a6b2dc 100644 --- a/lisp/progmodes/cc-cmds.el +++ b/lisp/progmodes/cc-cmds.el @@ -1501,6 +1501,11 @@ defun." (interactive "p") (or arg (setq arg 1)) + (or (not (eq this-command 'c-beginning-of-defun)) + (eq last-command 'c-beginning-of-defun) + (and transient-mark-mode mark-active) + (push-mark)) + (c-save-buffer-state (beginning-of-defun-function end-of-defun-function (start (point)) @@ -1604,6 +1609,11 @@ the open-parenthesis that starts a defun; see `beginning-of-defun'." (interactive "p") (or arg (setq arg 1)) + (or (not (eq this-command 'c-end-of-defun)) + (eq last-command 'c-end-of-defun) + (and transient-mark-mode mark-active) + (push-mark)) + (c-save-buffer-state (beginning-of-defun-function end-of-defun-function (start (point)) diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 610fa14489a..eca6d5fbe7b 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -1480,7 +1480,7 @@ frequently editing existing scripts with different styles.") ;; mode-command and utility functions ;;;###autoload -(defun sh-mode () +(define-derived-mode sh-mode prog-mode "Shell-script" "Major mode for editing shell scripts. This mode works for many shells, since they all have roughly the same syntax, as far as commands, arguments, variables, pipes, comments etc. are concerned. @@ -1533,11 +1533,6 @@ indicate what shell it is use `sh-alias-alist' to translate. If your shell gives error messages with line numbers, you can use \\[executable-interpret] with your script for an edit-interpret-debug cycle." - (interactive) - (kill-all-local-variables) - (setq major-mode 'sh-mode - mode-name "Shell-script") - (use-local-map sh-mode-map) (make-local-variable 'skeleton-end-hook) (make-local-variable 'paragraph-start) (make-local-variable 'paragraph-separate) @@ -1613,8 +1608,7 @@ with your script for an edit-interpret-debug cycle." "sh") (t sh-shell-file)) - nil nil) - (run-mode-hooks 'sh-mode-hook)) + nil nil)) ;;;###autoload (defalias 'shell-script-mode 'sh-mode) diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index c88b32f64cc..94eb721e4cf 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -2630,11 +2630,22 @@ Keeps argument list for future ispell invocations for no async support." (or ispell-local-dictionary ispell-dictionary "default")) (sit-for 0) (setq ispell-library-directory (ispell-check-version) - ispell-process-directory default-directory ispell-process (ispell-start-process) ispell-filter nil - ispell-filter-continue nil - ispell-process-buffer-name (buffer-name)) + ispell-filter-continue nil) + ;; When spellchecking minibuffer contents, make sure ispell process + ;; is not restarted every time the minibuffer is killed. + (if (window-minibuffer-p) + (if (fboundp 'minibuffer-selected-window) + ;; Assign ispell process to parent buffer + (setq ispell-process-directory default-directory + ispell-process-buffer-name (window-buffer (minibuffer-selected-window))) + ;; Force `ispell-process-directory' to $HOME and use a dummy name + (setq ispell-process-directory (expand-file-name "~/") + ispell-process-buffer-name " * Minibuffer-has-spellcheck-enabled")) + ;; Not in a minibuffer + (setq ispell-process-directory default-directory + ispell-process-buffer-name (buffer-name))) (if ispell-async-processp (set-process-filter ispell-process 'ispell-filter)) ;; protect against bogus binding of `enable-multibyte-characters' in XEmacs diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el index b9d52acdeba..6cd4121bd10 100644 --- a/lisp/textmodes/sgml-mode.el +++ b/lisp/textmodes/sgml-mode.el @@ -101,6 +101,11 @@ This takes effect when first loading the `sgml-mode' library.") (define-key map "\C-c\^?" 'sgml-delete-tag) (define-key map "\C-c?" 'sgml-tag-help) (define-key map "\C-c/" 'sgml-close-tag) + + ;; Redundant keybindings, for consistency with TeX mode. + (define-key map "\C-c\C-o" 'sgml-tag) + (define-key map "\C-c\C-e" 'sgml-close-tag) + (define-key map "\C-c8" 'sgml-name-8bit-mode) (define-key map "\C-c\C-v" 'sgml-validate) (when sgml-quick-keys diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 5fc92a92d37..da0c5396f2c 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -808,6 +808,11 @@ END is the position of the first delimiter after \verb." (define-key map "\C-c\C-c" 'tex-compile) (define-key map "\C-c\C-i" 'tex-bibtex-file) (define-key map "\C-c\C-o" 'latex-insert-block) + + ;; Redundant keybindings, for consistency with SGML mode. + (define-key map "\C-c\C-t" 'latex-insert-block) + (define-key map "\C-c/" 'latex-close-block) + (define-key map "\C-c\C-e" 'latex-close-block) (define-key map "\C-c\C-u" 'tex-goto-last-unclosed-latex-block) (define-key map "\C-c\C-m" 'tex-feed-input) diff --git a/lwlib/ChangeLog b/lwlib/ChangeLog index 8543b2336c0..dfa61888467 100644 --- a/lwlib/ChangeLog +++ b/lwlib/ChangeLog @@ -1,3 +1,7 @@ +2010-05-13 Jan Djärv + + * lwlib-Xaw.c (make_dialog): Remove extra arg to XtVaGetSubresources. + 2010-05-08 Jan Djärv * xlwmenu.c (XlwMenuDestroy): Remove XtDestroyWidget on subwidgets diff --git a/lwlib/lwlib-Xaw.c b/lwlib/lwlib-Xaw.c index d31b4602147..eaaf2b46d4e 100644 --- a/lwlib/lwlib-Xaw.c +++ b/lwlib/lwlib-Xaw.c @@ -664,7 +664,7 @@ make_dialog (name, parent, pop_up_p, shell_title, icon_name, text_input_slot, (XtPointer)"Sans-14" }}; char *faceName; XtVaGetSubresources (dialog, &faceName, "Dialog", "dialog", - rec, 1, 0, NULL); + rec, 1, (String)NULL); if (strcmp ("none", faceName) != 0) xft_font = openFont (dialog, faceName); if (xft_font) diff --git a/msdos/ChangeLog b/msdos/ChangeLog index e4e77c5f101..780ec198d47 100644 --- a/msdos/ChangeLog +++ b/msdos/ChangeLog @@ -1,3 +1,33 @@ +2010-05-14 Glenn Morris + + * sed1v2.inp (MSDOS_OBJ): Edit to dosfns.o msdos.o. + (MSDOS_SUPPORT): Edit to $(MSDOS_SUPPORT_REAL). + * sed1x.inp (MSDOS_X_OBJ): Edit to w16select.o termcap.o. + + * sed2x.inp (HAVE_WINDOW_SYSTEM): Define. + * sed1x.inp (TOOLTIP_SUPPORT): Edit to ${lispsource}tooltip.elc. + (WINDOW_SUPPORT): Edit to $(BASE_WINDOW_SUPPORT) $(X_WINDOW_SUPPORT). + * sed1v2.inp (MOUSE_SUPPORT): Edit to $(REAL_MOUSE_SUPPORT). + (TOOLTIP_SUPPORT, WINDOW_SUPPORT): Edit to empty. + + * sed1v2.inp (FONT_OBJ): Use the plain X version (no XFT, Freetype). + + * sed1v2.inp (@NS_IMPL_GNUSTEP_INC@): Edit to nil. + +2010-05-13 Glenn Morris + + * sed1x.inp (OLDXMENU): Edit to ${oldXMenudir}libXMenu11.a. + (LIBXMENU): Edit to ${OLDXMENU}. + (LIBX_OTHER): Edit to ${LIBXT} ${LIBX_EXTRA}. + + * sed1v2.inp (C_SWITCH_X_SYSTEM, C_SWITCH_X_SITE, LIB_STANDARD) + (FONTCONFIG_CFLAGS, FONTCONFIG_LIBS, FREETYPE_CFLAGS, FREETYPE_LIBS) + (LIBOTF_CFLAGS, LIBOTF_LIBS, M17N_FLT_CFLAGS, M17N_FLT_LIBS) + (GNU_OBJC_CFLAGS, GNUSTEP_SYSTEM_LIBRARIES, LIBRESOLV, LIBGPM): + Edit to empty, + (LIB_MATH): Edit to -lm. + (UNEXEC_OBJ): Edit to unexec.o. + 2010-05-12 Glenn Morris * sed3v2.inp (INSTALLABLES): No more @LIB_SRC_EXTRA_INSTALLABLES@. diff --git a/msdos/sed1v2.inp b/msdos/sed1v2.inp index f0e057c6b28..5ebaba06f60 100644 --- a/msdos/sed1v2.inp +++ b/msdos/sed1v2.inp @@ -38,13 +38,15 @@ s/\.h\.in/.h-in/ /^CPPFLAGS *=/s/@[^@\n]*@// /^LDFLAGS *=/s/@[^@\n]*@// /^LIBS *=/s/@[^@\n]*@// -s/@LIB_MATH@/-lm/ /^LIBES *=/,/^ *$/ { s/@[^@\n]*@//g } /^LIBOBJS *=/s/@[^@\n]*@/getloadavg.o/ /^C_SWITCH_MACHINE *=/s/@C_SWITCH_MACHINE@// /^C_SWITCH_SYSTEM *=/s/@C_SWITCH_SYSTEM@// +/^C_SWITCH_X_SYSTEM *=/s/@C_SWITCH_X_SYSTEM@// +/^C_SWITCH_X_SITE *=/s/@C_SWITCH_X_SITE@// +#/^LD_SWITCH_X_SITE *=/s/@LD_SWITCH_X_SITE@// /^LD_SWITCH_SYSTEM_TEMACS *=/s/@LD_SWITCH_SYSTEM_TEMACS@// /^LD_SWITCH_X_SITE_AUX *=/s/@LD_SWITCH_X_SITE_AUX@// /^LD_SWITCH_X_SITE_AUX_RPATH *=/s/@LD_SWITCH_X_SITE_AUX_RPATH@// @@ -52,12 +54,22 @@ s/@LIB_MATH@/-lm/ /^LD_SWITCH_SYSTEM_EXTRA *=/s/@LD_SWITCH_SYSTEM_EXTRA@// /^LIBS_SYSTEM *=/s/@LIBS_SYSTEM@// /^LIB_GCC *=/s/@LIB_GCC@/-Lgcc/ +/^LIB_STANDARD *=/s/@LIB_STANDARD@// +/^LIB_MATH *=/s/@LIB_MATH@/-lm/ /^LIBTIFF *=/s/@LIBTIFF@// /^LIBJPEG *=/s/@LIBJPEG@// /^LIBPNG *=/s/@LIBPNG@// /^LIBGIF *=/s/@LIBGIF@// /^LIBXPM *=/s/@LIBXPM@// /^XFT_LIBS *=/s/@XFT_LIBS@// +/^FONTCONFIG_CFLAGS *=/s/@FONTCONFIG_CFLAGS@// +/^FONTCONFIG_LIBS *=/s/@FONTCONFIG_LIBS@// +/^FREETYPE_CFLAGS *=/s/@FREETYPE_CFLAGS@// +/^FREETYPE_LIBS *=/s/@FREETYPE_LIBS@// +/^LIBOTF_CFLAGS *=/s/@LIBOTF_CFLAGS@// +/^LIBOTF_LIBS *=/s/@LIBOTF_LIBS@// +/^M17N_FLT_CFLAGS *=/s/@M17N_FLT_CFLAGS@// +/^M17N_FLT_LIBS *=/s/@M17N_FLT_LIBS@// /^DBUS_CFLAGS *=/s/@DBUS_CFLAGS@// /^DBUS_LIBS *=/s/@DBUS_LIBS@// /^DBUS_OBJ *=/s/@DBUS_OBJ@// @@ -77,22 +89,32 @@ s/@LIB_MATH@/-lm/ /^RSVG_CFLAGS *=/s/@RSVG_CFLAGS@// /^WIDGET_OBJ *=/s/@WIDGET_OBJ@// /^CYGWIN_OBJ *=/s/@CYGWIN_OBJ@// +/^MSDOS_OBJ *=/s/= */= dosfns.o msdos.o/ +/^MSDOS_SUPPORT *=/s/= */= $(MSDOS_SUPPORT_REAL)/ /^NS_OBJ *=/s/@NS_OBJ@// /^NS_SUPPORT *=/s/@NS_SUPPORT@// +/^GNU_OBJC_CFLAGS*=/s/@GNU_OBJC_CFLAGS@// +/^GNUSTEP_SYSTEM_LIBRARIES *=/s/@GNUSTEP_SYSTEM_LIBRARIES@// +/^LIBRESOLV *=/s/@LIBRESOLV@// /^LIBSELINUX_LIBS *=/s/@LIBSELINUX_LIBS@// /^GETLOADAVG_LIBS *=/s/@[^@\n]*@// /^START_FILES *=/s/@START_FILES@// /^OTHER_FILES *=/s/@OTHER_FILES@// /^XMENU_OBJ *=/s/@XMENU_OBJ@/xmenu.o/ -/^FONT_OBJ *=/s/@FONT_OBJ@/xfont.o ftfont.o xftfont.o ftxfont.o/ +/^FONT_OBJ *=/s/@FONT_OBJ@/xfont.o/ +/^MOUSE_SUPPORT *=/s/@MOUSE_SUPPORT@/$(REAL_MOUSE_SUPPORT)/ +/^TOOLTIP_SUPPORT *=/s/@TOOLTIP_SUPPORT@// +/^WINDOW_SUPPORT *=/s/@WINDOW_SUPPORT@// +/^LIBGPM *=/s/@LIBGPM@// /^EXEEXT *=/s/@EXEEXT@/.exe/ /^PRE_ALLOC_OBJ *=/s/@PRE_ALLOC_OBJ@/lastfile.o/ /^POST_ALLOC_OBJ *=/s/@POST_ALLOC_OBJ@/$(vmlimitobj)/ -s/@unexec@/unexec.o/g +/^UNEXEC_OBJ *=/s/@unexec@/unexec.o/ /^version *=/s/@[^@\n]*@// /^M_FILE *=/s!@[^@\n]*@!m/intel386.h! /^S_FILE *=/s!@[^@\n]*@!s/msdos.h! /^@SET_MAKE@$/s/@SET_MAKE@// +/^@NS_IMPL_GNUSTEP_INC@/s/@NS_IMPL_GNUSTEP_INC@// /^.\${libsrc}make-docfile.*>/s!make-docfile!make-docfile -o ../etc/DOC! /^.\${libsrc}make-doc/s!>.*$!! /^[ ]*$/d diff --git a/msdos/sed1x.inp b/msdos/sed1x.inp index 8be94aafa03..bcdb0fec0ed 100644 --- a/msdos/sed1x.inp +++ b/msdos/sed1x.inp @@ -4,8 +4,13 @@ s!^ cd \${oldXMenudir}; \${MAKE}.*$! ${MAKE} -C ${oldXMenudir}.! s!^ @true *$! @rem! s/DOC/DOC-X/g -#/^LIBXMENU *=/s!= *!= ../oldxmenu/! +/^OLDXMENU *=/s!@OLDXMENU@!${oldXMenudir}libXMenu11.a! +/^LIBXMENU *=/s!@LIBXMENU@!${OLDXMENU}! +/^LIBX_OTHER *=/s!@LIBX_OTHER@!${LIBXT} ${LIBX_EXTRA}! /^LIBS_SYSTEM *=/s!= *!= -lxext -lsys! +/^MSDOS_X_OBJ *=/s!= *!= w16select.o termcap.o! +/^TOOLTIP_SUPPORT *=/s!= *!= ${lispsource}tooltip.elc! +/^WINDOW_SUPPORT *=/s!= *!= $(BASE_WINDOW_SUPPORT) $(X_WINDOW_SUPPORT)! /^temacs *:/s!OLDXMENU!LIBXMENU! # arch-tag: 3e8a78f2-3dec-44f3-81f6-3785a562da19 diff --git a/msdos/sed2x.inp b/msdos/sed2x.inp index 64d138e1b09..d17dd85ace6 100644 --- a/msdos/sed2x.inp +++ b/msdos/sed2x.inp @@ -2,8 +2,8 @@ # Extra configuration script for src/config.h for DesqView/X # ---------------------------------------------------------------------- # -# Copyright (C) 1994, 2001, 2002, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +# Copyright (C) 1994, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, +# 2009, 2010 Free Software Foundation, Inc. # # This file is part of GNU Emacs. # @@ -17,6 +17,7 @@ # # ---------------------------------------------------------------------- /^#undef HAVE_X_WINDOWS *$/s/undef/define/ +/^#undef HAVE_WINDOW_SYSTEM *$/s/undef/define/ /^#undef HAVE_X11 *$/s/undef/define/ /^#undef HAVE_X_MENU *$/s/undef/define/ /^#undef HAVE_XSCREENNUMBEROFSCREEN *$/s/undef/define/ diff --git a/nt/ChangeLog b/nt/ChangeLog index 3be9a7f61d4..6db0eb744c9 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,7 @@ +2010-05-13 Glenn Morris + + * config.nt (LD_SWITCH_X_SITE, C_SWITCH_X_SITE): Remove undefs. + 2010-05-07 Chong Yidong * Version 23.2 released. diff --git a/nt/config.nt b/nt/config.nt index 9e223573ea3..7ec98fb7666 100644 --- a/nt/config.nt +++ b/nt/config.nt @@ -1,6 +1,7 @@ /* GNU Emacs site configuration template file. -*- C -*- - Copyright (C) 1988, 1993, 1994, 2001, 2002, 2003, 2004, 2005, 2006, - 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + +Copyright (C) 1988, 1993, 1994, 2001, 2002, 2003, 2004, 2005, 2006, + 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -318,20 +319,6 @@ along with GNU Emacs. If not, see . */ #define subprocesses -/* Define LD_SWITCH_X_SITE to contain any special flags your loader - may need to deal with X Windows. For instance, if you've defined - HAVE_X_WINDOWS above and your X libraries aren't in a place that - your loader can find on its own, you might want to add "-L/..." or - something similar. */ -#undef LD_SWITCH_X_SITE - -/* Define C_SWITCH_X_SITE to contain any special flags your compiler - may need to deal with X Windows. For instance, if you've defined - HAVE_X_WINDOWS above and your X include files aren't in a place - that your compiler can find on its own, you might want to add - "-I/..." or something similar. */ -#undef C_SWITCH_X_SITE - /* Define STACK_DIRECTION here, but not if m/foo.h did. */ #ifndef STACK_DIRECTION #undef STACK_DIRECTION diff --git a/src/ChangeLog b/src/ChangeLog index f759d0cebcd..7ffb5800753 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -3,6 +3,54 @@ * font.c (font_range): Return the range for the font found at first. +2010-05-14 Glenn Morris + + * Makefile.in (mktime, X11, register): Move undefs to configure. + + * Makefile.in (MSDOS_OBJ): Default to empty, let msdos scripts set it. + (MSDOS_X_OBJ): New variable. + (MSDOS_SUPPORT_REAL): New constant. + (MSDOS_SUPPORT): Set as a variable, not with cpp. + (obj): Use MSDOS_X_OBJ. + (lisp): Use MSDOS_SUPPORT as a variable. + + * Makefile.in (REAL_MOUSE_SUPPORT): New constant. + (GPM_MOUSE_SUPPORT): Now it's a constant. + (MOUSE_SUPPORT, TOOLTIP_SUPPORT, WINDOW_SUPPORT): Set with configure, + not cpp. + + * Makefile.in (@NS_IMPL_GNUSTEP_INC@): Use in place of #ifdef. + (ns_appresdir): Remove, unused. + + * Makefile.in (SHELL): Move outside cpp section. + + * s/netbsd.h (AMPERSAND_FULL_NAME): Remove (defined in AH_BOTTOM). + +2010-05-13 Glenn Morris + + * Makefile.in (FONT_DRIVERS): Place with other HAVE_X_WINDOWS stuff. + (TOOLTIP_SUPPORT): Place with other HAVE_WINDOW_SYSTEM stuff. + + * Makefile.in (FONT_DRIVERS): If HAVE_X_WINDOWS is defined, + HAVE_WINDOW_SYSTEM must be too. + + * Makefile.in (WINNT_SUPPORT): Remove, nt build does not use this file. + (lisp): Remove WINNT_SUPPORT. + + * Makefile.in (OLDXMENU, LIBXMENU) [!HAVE_MENUS]: + Let configure set these variables (to empty) in this case as well. + + * Makefile.in (LD_SWITCH_X_SITE): Define as a variable, not via cpp. + (LIBX_BASE): Use $LD_SWITCH_X_SITE. + + * Makefile.in (C_SWITCH_X_SYSTEM, C_SWITCH_X_SITE, LIB_STANDARD) + (LIB_MATH, FONTCONFIG_CFLAGS, FONTCONFIG_LIBS, FREETYPE_CFLAGS) + (FREETYPE_LIBS, LIBOTF_CFLAGS, LIBOTF_LIBS, M17N_FLT_CFLAGS) + (M17N_FLT_LIBS, GNU_OBJC_CFLAGS, GNUSTEP_SYSTEM_LIBRARIES, LIBGPM) + (LIBRESOLV, UNEXEC_OBJ): For clarity, define variables to hold + the values output by configure. + (ALL_CFLAGS, obj, LIBES, temacs${EXEEXT}): Use the above variables. + 2010-05-12 Glenn Morris * Makefile.in (YMF_PASS_LDFLAGS, LD, LINKER): Simplify the logic. diff --git a/src/Makefile.in b/src/Makefile.in index 46d4e0c2878..3a0339a3f70 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -30,6 +30,7 @@ # Some of the conditionals might be dead now. Finding them and # deleting them would be fine. +SHELL = /bin/sh # Here are the things that we expect ../configure to edit. # We use $(srcdir) explicitly in dependencies so as not to depend on VPATH. @@ -72,19 +73,44 @@ CRT_DIR=@CRT_DIR@ C_SWITCH_MACHINE=@C_SWITCH_MACHINE@ ## System-specific CFLAGS. C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@ + +## Currently only set if NS_IMPL_GNUSTEP. +## C_SWITCH_X_SITE may override this. +C_SWITCH_X_SYSTEM=@C_SWITCH_X_SYSTEM@ + +## Define C_SWITCH_X_SITE to contain any special flags your compiler +## may need to deal with X Windows. For instance, if you've defined +## HAVE_X_WINDOWS and your X include files aren't in a place that your +## compiler can find on its own, you might want to add "-I/..." or +## something similar. This is normally set by configure. +## This is used before C_SWITCH_X_SYSTEM and may override it. +C_SWITCH_X_SITE=@C_SWITCH_X_SITE@ + +## Define LD_SWITCH_X_SITE to contain any special flags your loader +## may need to deal with X Windows. For instance, if your X libraries +## aren't in a place that your loader can find on its own, you might +## want to add "-L/..." or something similar. Only used if +## HAVE_X_WINDOWS. +## FIXME? configure sets a value for this, but it has never been +## substituted in this or any other Makefile. Cf C_SWITCH_X_SITE. +LD_SWITCH_X_SITE= + ## This holds any special options for linking temacs only (ie, not ## used by configure). Not used elsewhere because it sometimes ## contains options that have to do with using Emacs's crt0, ## which are only good with temacs. LD_SWITCH_SYSTEM_TEMACS=@LD_SWITCH_SYSTEM_TEMACS@ + ## Next two must come before LD_SWITCH_SYSTEM. ## If needed, a -R option that says where to find X windows at run time. LD_SWITCH_X_SITE_AUX=@LD_SWITCH_X_SITE_AUX@ ## As above, but using -rpath instead. LD_SWITCH_X_SITE_AUX_RPATH=@LD_SWITCH_X_SITE_AUX_RPATH@ + ## System-specific LDFLAGS. LD_SWITCH_SYSTEM=@LD_SWITCH_SYSTEM@ LD_SWITCH_SYSTEM_EXTRA=@LD_SWITCH_SYSTEM_EXTRA@ + ## Flags to pass to ld only for temacs. TEMACS_LDFLAGS = $(LD_SWITCH_SYSTEM) $(LD_SWITCH_SYSTEM_EXTRA) $(LD_SWITCH_SYSTEM_TEMACS) @@ -94,6 +120,12 @@ LIBS_SYSTEM=@LIBS_SYSTEM@ ## Where to find libgcc.a, if using gcc and necessary. LIB_GCC=@LIB_GCC@ +## May use $CRT_DIR. +LIB_STANDARD=@LIB_STANDARD@ + +## -lm, or empty. +LIB_MATH=@LIB_MATH@ + LIBTIFF=@LIBTIFF@ LIBJPEG=@LIBJPEG@ LIBPNG=@LIBPNG@ @@ -102,6 +134,15 @@ LIBXPM=@LIBXPM@ XFT_LIBS=@XFT_LIBS@ LIBX_EXTRA=$(LIBTIFF) $(LIBJPEG) $(LIBPNG) $(LIBGIF) $(LIBXPM) -lX11 $(XFT_LIBS) +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +LIBOTF_CFLAGS = @LIBOTF_CFLAGS@ +LIBOTF_LIBS = @LIBOTF_LIBS@ +M17N_FLT_CFLAGS = @M17N_FLT_CFLAGS@ +M17N_FLT_LIBS = @M17N_FLT_LIBS@ + DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DBUS_OBJ = @DBUS_OBJ@ @@ -143,15 +184,36 @@ WIDGET_OBJ=@WIDGET_OBJ@ ## sheap.o if CYGWIN, otherwise empty. CYGWIN_OBJ=@CYGWIN_OBJ@ +## dosfns.o msdos.o if MSDOS. +MSDOS_OBJ = +## w16select.o termcap.o if MSDOS && HAVE_X_WINDOWS. +MSDOS_X_OBJ = +MSDOS_SUPPORT_REAL = ${lispsource}ls-lisp.elc ${lispsource}disp-table.elc \ + ${lispsource}dos-fns.elc ${lispsource}dos-w32.elc ${lispsource}dos-vars.elc \ + ${lispsource}term/internal.elc ${lispsource}term/pc-win.elc +## $MSDOS_SUPPORT_REAL if MSDOS. +MSDOS_SUPPORT = + NS_OBJ=@NS_OBJ@ NS_SUPPORT=@NS_SUPPORT@ +## Next two only set if NS_IMPL_GNUSTEP. +GNU_OBJC_CFLAGS=@GNU_OBJC_CFLAGS@ +GNUSTEP_SYSTEM_LIBRARIES=@GNUSTEP_SYSTEM_LIBRARIES@ -## Only used if HAVE_X_WINDOWS and HAVE_WINDOW_SYSTEM. +## Only used if HAVE_X_WINDOWS. FONT_OBJ=@FONT_OBJ@ -## ${lispsource}mouse.elc if HAVE_GPM, otherwise empty. -## Not used if HAVE_MOUSE. -GPM_MOUSE_SUPPORT=@GPM_MOUSE_SUPPORT@ +## Used if HAVE_MOUSE. +REAL_MOUSE_SUPPORT=${lispsource}mouse.elc ${lispsource}select.elc \ + ${lispsource}scroll-bar.elc +## Used if HAVE_GPM && !HAVE_MOUSE +GPM_MOUSE_SUPPORT=${lispsource}mouse.elc +LIBGPM = @LIBGPM@ +## Either of the two preceding options, or empty. +MOUSE_SUPPORT=@MOUSE_SUPPORT@ + +## ${lispsource}tooltip.elc if HAVE_WINDOW_SYSTEM, else empty. +TOOLTIP_SUPPORT=@TOOLTIP_SUPPORT@ BASE_WINDOW_SUPPORT=${lispsource}fringe.elc ${lispsource}image.elc \ ${lispsource}international/fontset.elc ${lispsource}dnd.elc \ @@ -160,6 +222,13 @@ BASE_WINDOW_SUPPORT=${lispsource}fringe.elc ${lispsource}image.elc \ X_WINDOW_SUPPORT=${lispsource}x-dnd.elc ${lispsource}term/common-win.elc \ ${lispsource}term/x-win.elc ${lispsource}dynamic-setting.elc +## If HAVE_X_WINDOWS, both the above +## else if HAVE_WINDOW_SYSTEM (ie, HAVE_NS) just the former; else empty. +WINDOW_SUPPORT=@WINDOW_SUPPORT@ + +## -lresolv, or empty. +LIBRESOLV = @LIBRESOLV@ + LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ INTERVALS_H = dispextern.h intervals.h composite.h @@ -170,12 +239,11 @@ RUN_TEMACS = `/bin/pwd`/temacs START_FILES = @START_FILES@ +UNEXEC_OBJ = @unexec@ + # ========================== start of cpp stuff ======================= /* From here on, comments must be done in C syntax. */ -/* just to be sure the sh is used */ -SHELL=/bin/sh - #define NOT_C_CODE #include "config.h" @@ -183,42 +251,13 @@ SHELL=/bin/sh DEPFLAGS = -MMD -MF deps/$*.d #endif -/* Do not let the file name mktime.c get messed up. */ -#ifdef mktime -#undef mktime -#endif - -/* Use HAVE_X11 as an alias for X11 in this file - to avoid problems with X11 as a subdirectory name - in -I and other such options which pass through this file. */ - -#ifdef X11 -#define HAVE_X11 -#undef X11 -#endif - -/* On some machines #define register is done in config; - do not let it interfere with this file. */ -#undef register - -/* This macro is for switches specifically related to X Windows. */ -#ifndef LD_SWITCH_X_SITE -#define LD_SWITCH_X_SITE -#endif - -#ifdef NS_IMPL_GNUSTEP -/* Pull in stuff from GNUstep-make. */ -FOUNDATION_LIB=gnu -GUI_LIB=gnu -include @GNUSTEP_MAKEFILES@/Additional/base.make -include @GNUSTEP_MAKEFILES@/Additional/gui.make -shared=no -#endif +/* If NS_IMPL_GNUSTEP, some definitions and includes are expanded here. */ +@NS_IMPL_GNUSTEP_INC@ /* DO NOT use -R. There is a special hack described in lastfile.c which is used instead. Some initialized data areas are modified at initial startup, then labeled as part of the text area when - Emacs is dumped for the first time, and never changed again. */ + Emacs is dumped for the first time, and never changed again. */ /* -Demacs is needed to make some files produce the correct version for use in Emacs. @@ -227,10 +266,10 @@ shared=no the information in ``config.h''. */ /* C_SWITCH_X_SITE must come before C_SWITCH_X_SYSTEM - since it may have -I options that should override those two. */ + since it may have -I options that should override those. */ /* MYCPPFLAGS only referenced in etc/DEBUG. */ -ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(MYCPPFLAGS) -I. -I${srcdir} ${C_SWITCH_MACHINE} ${C_SWITCH_SYSTEM} @C_SWITCH_X_SITE@ @C_SWITCH_X_SYSTEM@ ${CFLAGS_SOUND} ${RSVG_CFLAGS} ${DBUS_CFLAGS} ${GCONF_CFLAGS} ${CFLAGS} @FREETYPE_CFLAGS@ @FONTCONFIG_CFLAGS@ @LIBOTF_CFLAGS@ @M17N_FLT_CFLAGS@ ${DEPFLAGS} -ALL_OBJC_CFLAGS=$(ALL_CFLAGS) @GNU_OBJC_CFLAGS@ +ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(MYCPPFLAGS) -I. -I${srcdir} ${C_SWITCH_MACHINE} ${C_SWITCH_SYSTEM} ${C_SWITCH_X_SITE} ${C_SWITCH_X_SYSTEM} ${CFLAGS_SOUND} ${RSVG_CFLAGS} ${DBUS_CFLAGS} ${GCONF_CFLAGS} ${CFLAGS} ${FREETYPE_CFLAGS} ${FONTCONFIG_CFLAGS} ${LIBOTF_CFLAGS} ${M17N_FLT_CFLAGS} ${DEPFLAGS} +ALL_OBJC_CFLAGS=$(ALL_CFLAGS) $(GNU_OBJC_CFLAGS) .SUFFIXES: .m .c.o: @@ -245,20 +284,13 @@ ALL_OBJC_CFLAGS=$(ALL_CFLAGS) @GNU_OBJC_CFLAGS@ $(CC) -c $(CPPFLAGS) $(ALL_OBJC_CFLAGS) $< #ifdef HAVE_X_WINDOWS -/* This test needs to say in cpp for the time being, since s/msdos.h - defines HAVE_MENUS, and does not use the configure script. */ -#ifdef HAVE_MENUS OLDXMENU=@OLDXMENU@ LIBXMENU=@LIBXMENU@ -#else /* not HAVE_MENUS */ -OLDXMENU= -LIBXMENU= -#endif /* not HAVE_MENUS */ - LIBXT=$(TOOLKIT_LIBW) $(LIBXT_OTHER) -LIBX_BASE=$(LIBXMENU) LD_SWITCH_X_SITE +LIBX_BASE=$(LIBXMENU) $(LD_SWITCH_X_SITE) LIBX_OTHER=@LIBX_OTHER@ -#endif /* not HAVE_X_WINDOWS */ +FONT_DRIVERS=$(FONT_OBJ) +#endif /* HAVE_X_WINDOWS */ /* A macro which other sections of Makefile can redefine to munge the @@ -301,30 +333,14 @@ LD=ld #endif /* not ORDINARY_LINK */ - -#ifdef MSDOS -#ifdef HAVE_X_WINDOWS -MSDOS_OBJ = dosfns.o msdos.o -#else -MSDOS_OBJ = dosfns.o msdos.o w16select.o termcap.o -#endif -#endif - #ifdef HAVE_NS ns_appdir=@ns_appdir@/ ns_appbindir=@ns_appbindir@/ -ns_appresdir=@ns_appresdir@/ ns_appsrc=@ns_appsrc@ #endif /* HAVE_NS */ -#ifdef HAVE_WINDOW_SYSTEM -#ifdef HAVE_X_WINDOWS -FONT_DRIVERS=$(FONT_OBJ) -#endif /* HAVE_X_WINDOWS */ -#endif /* HAVE_WINDOW_SYSTEM */ - -/* lastfile must follow all files - whose initialized data areas should be dumped as pure by dump-emacs. */ +/* lastfile must follow all files whose initialized data areas should + be dumped as pure by dump-emacs. */ obj= dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o \ charset.o coding.o category.o ccl.o character.o chartab.o bidi.o \ cm.o term.o terminal.o xfaces.o $(XOBJ) $(GTK_OBJ) $(DBUS_OBJ) \ @@ -334,15 +350,14 @@ obj= dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o \ cmds.o casetab.o casefiddle.o indent.o search.o regex.o undo.o \ alloc.o data.o doc.o editfns.o callint.o \ eval.o floatfns.o fns.o font.o print.o lread.o \ - syntax.o @unexec@ bytecode.o \ + syntax.o $(UNEXEC_OBJ) bytecode.o \ process.o callproc.o \ region-cache.o sound.o atimer.o \ doprnt.o strftime.o intervals.o textprop.o composite.o md5.o \ - $(MSDOS_OBJ) $(NS_OBJ) $(CYGWIN_OBJ) $(FONT_DRIVERS) + $(MSDOS_OBJ) $(MSDOS_X_OBJ) $(NS_OBJ) $(CYGWIN_OBJ) $(FONT_DRIVERS) /* Object files used on some machine or other. - These go in the DOC file on all machines - in case they are needed there. */ + These go in the DOC file on all machines in case they are needed. */ SOME_MACHINE_OBJECTS = dosfns.o msdos.o \ xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o fringe.o image.o \ fontset.o dbusbind.o \ @@ -374,47 +389,6 @@ POST_ALLOC_OBJ=@POST_ALLOC_OBJ@ otherobj= $(TERMCAP_OBJ) $(PRE_ALLOC_OBJ) $(gmallocobj) $(rallocobj) \ $(POST_ALLOC_OBJ) $(WIDGET_OBJ) $(LIBOBJS) -#ifdef HAVE_MOUSE -#define MOUSE_SUPPORT ${lispsource}mouse.elc \ - ${lispsource}select.elc ${lispsource}scroll-bar.elc -#else -#define MOUSE_SUPPORT $(GPM_MOUSE_SUPPORT) -#endif - -#ifdef MSDOS -#define MSDOS_SUPPORT ${lispsource}ls-lisp.elc ${lispsource}disp-table.elc \ - ${lispsource}dos-fns.elc ${lispsource}dos-w32.elc ${lispsource}dos-vars.elc \ - ${lispsource}term/internal.elc ${lispsource}term/pc-win.elc - -#else -#define MSDOS_SUPPORT -#endif - -#ifdef HAVE_WINDOW_SYSTEM -#ifdef HAVE_X_WINDOWS -#define WINDOW_SUPPORT $(BASE_WINDOW_SUPPORT) $(X_WINDOW_SUPPORT) -#else -#define WINDOW_SUPPORT $(BASE_WINDOW_SUPPORT) -#endif -#else -#define WINDOW_SUPPORT -#endif - -#ifdef WINDOWSNT -#define WINNT_SUPPORT ${lispsource}ls-lisp.elc ${lispsource}disp-table.elc \ - ${lispsource}dos-w32.elc ${lispsource}w32-vars.elc \ - ${lispsource}w32-fns.elc ${lispsource}term/common-win.elc \ - ${lispsource}term/w32-win.elc -#else -#define WINNT_SUPPORT -#endif - -#ifdef HAVE_WINDOW_SYSTEM -#define TOOLTIP_SUPPORT ${lispsource}tooltip.elc -#else -#define TOOLTIP_SUPPORT -#endif - /* This is the platform-specific list of Lisp files loaded into the dumped Emacs. It is arranged like this because it is easier to generate it semi-mechanically from loadup.el this way. @@ -448,7 +422,7 @@ lisp= \ ${lispsource}files.elc \ ${lispsource}format.elc \ ${lispsource}facemenu.elc \ - MOUSE_SUPPORT \ + ${MOUSE_SUPPORT} \ ${lispsource}emacs-lisp/float-sup.elc \ ${lispsource}frame.elc \ ${lispsource}help.elc \ @@ -511,10 +485,9 @@ lisp= \ ${lispsource}vc-hooks.elc \ ${lispsource}ediff-hook.elc \ ${lispsource}epa-hook.elc \ - TOOLTIP_SUPPORT \ - MSDOS_SUPPORT \ - WINNT_SUPPORT \ - WINDOW_SUPPORT \ + ${TOOLTIP_SUPPORT} \ + ${MSDOS_SUPPORT} \ + ${WINDOW_SUPPORT} \ ${NS_SUPPORT} \ ${lispsource}widget.elc \ ${lispsource}window.elc \ @@ -634,10 +607,10 @@ SOME_MACHINE_LISP = ../lisp/mouse.elc \ with GCC, we might need gnulib again after them. */ LIBES = $(LOADLIBES) $(LIBS) $(LIBX_BASE) $(LIBX_OTHER) $(LIBSOUND) \ - $(RSVG_LIBS) $(DBUS_LIBS) @LIBGPM@ @LIBRESOLV@ $(LIBS_SYSTEM) \ + $(RSVG_LIBS) $(DBUS_LIBS) $(LIBGPM) $(LIBRESOLV) $(LIBS_SYSTEM) \ $(LIBS_TERMCAP) $(GETLOADAVG_LIBS) ${GCONF_LIBS} ${LIBSELINUX_LIBS} \ - @FREETYPE_LIBS@ @FONTCONFIG_LIBS@ @LIBOTF_LIBS@ @M17N_FLT_LIBS@ \ - $(GNULIB_VAR) @LIB_MATH@ @LIB_STANDARD@ $(GNULIB_VAR) + $(FREETYPE_LIBS) $(FONTCONFIG_LIBS) $(LIBOTF_LIBS) $(M17N_FLT_LIBS) \ + $(GNULIB_VAR) $(LIB_MATH) $(LIB_STANDARD) $(GNULIB_VAR) all: emacs${EXEEXT} $(OTHER_FILES) @@ -682,7 +655,7 @@ buildobj.h: Makefile temacs${EXEEXT}: $(LOCALCPP) $(START_FILES) stamp-oldxmenu ${obj} ${otherobj} prefix-args${EXEEXT} #ifdef NS_IMPL_GNUSTEP $(CC) -rdynamic YMF_PASS_LDFLAGS ( ${TEMACS_LDFLAGS} \ - -L@GNUSTEP_SYSTEM_LIBRARIES@ -lgnustep-gui -lgnustep-base \ + -L$(GNUSTEP_SYSTEM_LIBRARIES) -lgnustep-gui -lgnustep-base \ -lobjc $(CONFIG_SYSTEM_LIBS) -lpthread ) -o temacs \ ${obj} ${otherobj} ${LIBES} #else @@ -696,9 +669,8 @@ prefix-args${EXEEXT}: prefix-args.o $(config_h) #if defined (HAVE_X_WINDOWS) && defined (HAVE_X11) && defined (HAVE_MENUS) && ! defined (USE_GTK) -/* We use stamp-xmenu with these two deps - to both ensure that lwlib gets remade based on its dependencies - in its own makefile, +/* We use stamp-xmenu with these two deps to both ensure that lwlib + gets remade based on its dependencies in its own makefile, and remake temacs if lwlib gets changed by this. */ stamp-oldxmenu: ${OLDXMENU} ../src/$(OLDXMENU) touch stamp-oldxmenu @@ -752,6 +724,8 @@ doc.o: buildobj.h Eg callproc.c only depends on w32.h for WINDOWSNT builds. One way to fix this would be to replace w32.h (etc) by $(W32_H), a variable set by configure. Does not seem worth the trouble. +Since the w32 build does not even use this file, you might ask +why these dependencies are here at all... nsgui.h: In fact, every .o file depends directly or indirectly on dispextern.h and hence nsgui.h under NS. But the ones that actually @@ -961,8 +935,8 @@ xsmfns.o: xsmfns.c lisp.h $(config_h) systime.h sysselect.h termhooks.h xterm.h xsettings.o: xterm.h xsettings.h lisp.h frame.h termhooks.h $(config_h) \ dispextern.h keyboard.h systime.h coding.h composite.h blockinput.h atimer.h \ termopts.h -/* The files of Lisp proper */ +/* The files of Lisp proper. */ alloc.o: alloc.c process.h frame.h window.h buffer.h puresize.h syssignal.h \ keyboard.h blockinput.h atimer.h systime.h character.h lisp.h $(config_h) \ $(INTERVALS_H) termhooks.h @@ -984,7 +958,7 @@ lread.o: lread.c commands.h keyboard.h buffer.h epaths.h character.h \ charset.h lisp.h $(config_h) $(INTERVALS_H) termhooks.h coding.h msdos.h \ systime.h frame.h blockinput.h atimer.h -/* Text properties support */ +/* Text properties support. */ composite.o: composite.c buffer.h character.h coding.h font.h ccl.h \ frame.h termhooks.h $(INTERVALS_H) window.h lisp.h $(config_h) intervals.o: intervals.c buffer.h $(INTERVALS_H) keyboard.h puresize.h \ @@ -995,8 +969,7 @@ textprop.o: textprop.c buffer.h window.h $(INTERVALS_H) \ #endif /* ! AUTO_DEPEND */ /* System-specific programs to be made. - OTHER_FILES - select which of these should be compiled. */ + OTHER_FILES select which of these should be compiled. */ #ifdef HAVE_NS ${ns_appdir}: ${ns_appsrc} diff --git a/src/config.in b/src/config.in index 5fb0cd7d569..35530943682 100644 --- a/src/config.in +++ b/src/config.in @@ -44,12 +44,6 @@ along with GNU Emacs. If not, see . */ /* Define to 1 if using `getloadavg.c'. */ #undef C_GETLOADAVG -/* Define C_SWITCH_X_SITE to contain any special flags your compiler may need - to deal with X Windows. For instance, if you've defined HAVE_X_WINDOWS - above and your X include files aren't in a place that your compiler can - find on its own, you might want to add "-I/..." or something similar. */ -#undef C_SWITCH_X_SITE - /* Define to 1 for DGUX with . */ #undef DGUX @@ -488,6 +482,9 @@ along with GNU Emacs. If not, see . */ /* Define to 1 if you have a working `mmap' system call. */ #undef HAVE_MMAP +/* Define if you have mouse support. */ +#undef HAVE_MOUSE + /* Define to 1 if you have the `mremap' function. */ #undef HAVE_MREMAP @@ -743,6 +740,9 @@ along with GNU Emacs. If not, see . */ /* Define to 1 if you have the header file. */ #undef HAVE_VFORK_H +/* Define if you have a window system. */ +#undef HAVE_WINDOW_SYSTEM + /* Define to 1 if `fork' works. */ #undef HAVE_WORKING_FORK @@ -804,12 +804,6 @@ along with GNU Emacs. If not, see . */ /* Define to use Kerberos 5 instead of Kerberos 4. */ #undef KERBEROS5 -/* Define LD_SWITCH_X_SITE to contain any special flags your loader may need - to deal with X Windows. For instance, if you've defined HAVE_X_WINDOWS - above and your X libraries aren't in a place that your loader can find on - its own, you might want to add "-L/..." or something similar. */ -#undef LD_SWITCH_X_SITE - /* Define to 1 if localtime caches TZ. */ #undef LOCALTIME_CACHE @@ -1016,12 +1010,6 @@ along with GNU Emacs. If not, see . */ #undef volatile -/* If we're using X11/Carbon/GNUstep, define some consequences. */ -#if defined(HAVE_X_WINDOWS) || defined(HAVE_NS) -#define HAVE_WINDOW_SYSTEM -#define HAVE_MOUSE -#endif - /* Define AMPERSAND_FULL_NAME if you use the convention that & in the full name stands for the login id. */ /* Turned on June 1996 supposing nobody will mind it. */ @@ -1046,7 +1034,7 @@ along with GNU Emacs. If not, see . */ #endif #endif /* __FreeBSD__ || __NetBSD__ || __linux__ */ -/* If using GNU, then support inline function declarations. */ +/* If using GNU, then support inline function declarations. */ /* Don't try to switch on inline handling as detected by AC_C_INLINE generally, because even if non-gcc compilers accept `inline', they may reject `extern inline'. */ @@ -1071,7 +1059,7 @@ along with GNU Emacs. If not, see . */ /* Set up some defines, C and LD flags for NeXTstep interface on GNUstep. (There is probably a better place to do this, but right now the Cocoa side does this in s/darwin.h and we cannot - parallel this exactly since GNUstep is multi-OS. */ + parallel this exactly since GNUstep is multi-OS. */ #ifdef HAVE_NS # ifdef NS_IMPL_GNUSTEP /* GNUstep needs a bit more pure memory. Of the existing knobs, @@ -1168,7 +1156,7 @@ extern char *getenv (); #include "string.h" #endif #ifdef HAVE_STRINGS_H -#include "strings.h" /* May be needed for bcopy & al. */ +#include "strings.h" /* May be needed for bcopy & al. */ #endif #ifdef HAVE_STDLIB_H #include diff --git a/src/s/netbsd.h b/src/s/netbsd.h index b8df9014ecc..4874ec9af56 100644 --- a/src/s/netbsd.h +++ b/src/s/netbsd.h @@ -26,8 +26,6 @@ along with GNU Emacs. If not, see . */ #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base) -#define AMPERSAND_FULL_NAME - /* On post 1.3 releases of NetBSD, gcc -nostdlib also clears the library search parth, i.e. it won't search /usr/lib for libc and friends. Using -nostartfiles instead avoids