Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 103209. ------------------------------------------------------------ revno: 103209 committer: Glenn Morris branch nick: trunk timestamp: Wed 2011-02-09 21:03:29 -0800 message: lwlib/ trivia. * lwlib-Xaw.c, lwlib-Xlw.c, lwlib-Xm.c, lwlib-utils.c, lwlib.c, xlwmenu.c: Standardize on <> for includes from the ../src directory. diff: === modified file 'lwlib/ChangeLog' --- lwlib/ChangeLog 2011-02-09 03:25:07 +0000 +++ lwlib/ChangeLog 2011-02-10 05:03:29 +0000 @@ -1,9 +1,14 @@ +2011-02-10 Glenn Morris + + * lwlib-Xaw.c, lwlib-Xlw.c, lwlib-Xm.c, lwlib-utils.c, lwlib.c: + * xlwmenu.c: Standardize on <> for includes from the ../src directory. + 2011-02-09 Glenn Morris * Makefile.in (@SET_MAKE@): New, set by configure. (globals): New variable and rule. (lwlib-utils.o, lwlib.o, lwlib-Xlw.o, lwlib-Xaw.o, lwlib-Xm.o) - (xlwmenu.o): Add dependency on src/globals.h. + (xlwmenu.o): Add dependency on src/globals.h. 2011-01-31 Jan Djärv === modified file 'lwlib/lwlib-Xaw.c' --- lwlib/lwlib-Xaw.c 2011-01-25 04:08:28 +0000 +++ lwlib/lwlib-Xaw.c 2011-02-10 05:03:29 +0000 @@ -1,4 +1,5 @@ /* The lwlib interface to Athena widgets. + Copyright (C) 1993 Chuck Thompson Copyright (C) 1994, 2001-2011 Free Software Foundation, Inc. @@ -27,7 +28,7 @@ #include #include -#include "../src/lisp.h" +#include #include "lwlib-Xaw.h" @@ -833,4 +834,3 @@ {"main", xaw_create_main}, {NULL, NULL} }; - === modified file 'lwlib/lwlib-Xlw.c' --- lwlib/lwlib-Xlw.c 2011-01-25 04:08:28 +0000 +++ lwlib/lwlib-Xlw.c 2011-02-10 05:03:29 +0000 @@ -1,6 +1,7 @@ /* The lwlib interface to "xlwmenu" menus. - Copyright (C) 1992 Lucid, Inc. - Copyright (C) 1994, 2000-2011 Free Software Foundation, Inc. + +Copyright (C) 1992 Lucid, Inc. +Copyright (C) 1994, 2000-2011 Free Software Foundation, Inc. This file is part of the Lucid Widget Library. @@ -24,7 +25,7 @@ #endif #include -#include "lisp.h" +#include #include "lwlib-Xlw.h" #include @@ -272,4 +273,3 @@ if (instance->widget) XtDestroyWidget (instance->widget); } - === modified file 'lwlib/lwlib-Xm.c' --- lwlib/lwlib-Xm.c 2011-01-31 06:44:05 +0000 +++ lwlib/lwlib-Xm.c 2011-02-10 05:03:29 +0000 @@ -34,7 +34,7 @@ #include #include -#include "../src/lisp.h" +#include #include "lwlib-Xm.h" #include "lwlib-utils.h" @@ -1956,4 +1956,3 @@ { XtVaSetValues (w, XtNallowShellResize, flag, NULL); } - === modified file 'lwlib/lwlib-utils.c' --- lwlib/lwlib-utils.c 2011-01-31 06:44:05 +0000 +++ lwlib/lwlib-utils.c 2011-02-10 05:03:29 +0000 @@ -1,4 +1,5 @@ /* Defines some widget utility functions. + Copyright (C) 1992 Lucid, Inc. Copyright (C) 1994, 2001-2011 Free Software Foundation, Inc. @@ -31,7 +32,7 @@ #undef rindex #include -#include "../src/lisp.h" +#include #include #include @@ -173,4 +174,3 @@ abort (); #endif } - === modified file 'lwlib/lwlib.c' --- lwlib/lwlib.c 2011-01-31 06:44:05 +0000 +++ lwlib/lwlib.c 2011-02-10 05:03:29 +0000 @@ -1,4 +1,5 @@ /* A general interface to the widgets of different toolkits. + Copyright (C) 1992, 1993 Lucid, Inc. Copyright (C) 1994-1996, 1999-2011 Free Software Foundation, Inc. @@ -24,7 +25,7 @@ #endif #include -#include "../src/lisp.h" +#include #include #include @@ -1418,4 +1419,3 @@ return separator_p; } - === modified file 'lwlib/xlwmenu.c' --- lwlib/xlwmenu.c 2011-01-25 04:08:28 +0000 +++ lwlib/xlwmenu.c 2011-02-10 05:03:29 +0000 @@ -1,4 +1,5 @@ /* Implements a lightweight menubar widget. + Copyright (C) 1992 Lucid, Inc. Copyright (C) 1994-1995, 1997, 1999-2011 Free Software Foundation, Inc. @@ -26,7 +27,7 @@ #endif #include -#include "lisp.h" +#include #include #include @@ -56,7 +57,7 @@ extern int gray_bitmap_height; extern char *gray_bitmap_bits; -#include "xterm.h" +#include #else /* not emacs */ @@ -2689,4 +2690,3 @@ ((XMotionEvent*)event)->is_hint = 0; handle_motion_event (mw, (XMotionEvent*)event); } - ------------------------------------------------------------ revno: 103208 committer: Paul Eggert branch nick: trunk timestamp: Wed 2011-02-09 19:56:30 -0800 message: Undo my previous commit, as per Stefan. diff: === modified file 'ChangeLog' --- ChangeLog 2011-02-10 03:32:03 +0000 +++ ChangeLog 2011-02-10 03:56:30 +0000 @@ -9,6 +9,15 @@ * .bzrignore: Ignore globals.h and related stamp. +2011-02-09 Paul Eggert + + * lib/Makefile.in, lib/gnulib.mk: Regenerate. + This merges the following fix from gnulib: + + 2011-02-08 Bruno Haible + + Split large sed scripts, for HP-UX sed. + 2011-02-08 Tom Tromey * configure: Rebuild. @@ -16,12 +25,23 @@ 2011-02-06 Paul Eggert + gnulib: allow multiple gnulib generated replacements to coexist + This defines a few preprocessor symbols that should not affect Emacs. + * lib/getopt.in.h, lib/time.in.h, lib/unistd.in.h: Regenerate + via "make sync-from-gnulib". + gnulib: undo previous change The upstream _HEADERS change was backed out of gnulib (see the same thread). Stay in sync with gnulib. gnulib: adjust to upstream _HEADERS change - * c++defs.h: Regenerate. + * lib/Makefile.am (EXTRA_HEADERS, nodist_pkginclude_HEADERS): + New empty macros, to accommodate recent changes to gnulib. See + . + * c++defs.h, lib/Makefile.in, lib/ftoastr.h, lib/getopt.in.h: + * lib/gnulib.mk, lib/ignore-value.h, lib/stdbool.in.h, lib/stddef.in.h: + * lib/time.in.h, lib/unistd.in.h: + Regenerate. 2011-02-05 Paul Eggert @@ -38,13 +58,23 @@ allow C code to suppress warnings about ignored return values * Makefile.in (GNULIB_MODULES): Add ignore-value. - * configure, m4/gl-comp.m4: Regenerate. + * configure, lib/Makefile.in, lib/gnulib.mk, m4/gl-comp.m4: Regenerate. + * lib/ignore-value.h: New file. 2011-01-31 Chong Yidong * configure.in: Test existence of xaw3d library, not just the header (Bug#7642). +2011-01-31 Eli Zaretskii + + * lib/makefile.w32-in (GNULIBOBJS): Add $(BLD)/strftime.$(O) and + $(BLD)/time_r.$(O). + ($(BLD)/dtoastr.$(O)): Depend on $(EMACS_ROOT)/src/s/ms-w32.h and + $(EMACS_ROOT)/src/m/intel386.h. + ($(BLD)/strftime.$(O)): + ($(BLD)/time_r.$(O)): Define prerequisites. + 2011-01-31 Paul Eggert src/emacs.c now gets version number from configure.in @@ -59,8 +89,10 @@ * Makefile.in (GNULIB_MODULES): Add strftime. * configure.in (AC_FUNC_STRFTIME, my_strftime): Remove; no longer needed. - * aclocal.m4, configure, m4/gl-comp.m4: + * aclocal.m4, configure, lib/Makefile.in, lib/gnulib.mk, m4/gl-comp.m4: Regenerate. + * lib/strftime.c, lib/strftime.h, lib/stdbool.in.h: New files, + imported from gnulib. * m4/strftime.m4, m4/stdbool.m4, m4/tm_gmtoff.m4: Likewise. This incorporates many changes from gnulib, including simpler handling of multibyte formats, porting to mingw32 and other @@ -73,14 +105,65 @@ * configure: Regenerate from the following. + 2011-01-30 Paul Eggert + + mktime: clarify long_int width checking + * lib/mktime.c (long_int_is_wide_enough): Move this assertion to + the top level, to make it clearer that the assumption about + long_int width is being checked. See + . + 2011-01-29 Paul Eggert TYPE_MAXIMUM: avoid theoretically undefined behavior - * m4/mktime.m4 (AC_FUNC_MKTIME): Do not shift a + * lib/intprops.h (TYPE_MINIMUM, TYPE_MAXIMUM): Do not shift a negative number, which the C Standard says has undefined behavior. In practice this is not a problem, but might as well do it by the book. Reported by Rich Felker and Eric Blake; see . + * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise. + * lib/mktime.c (TYPE_MAXIMUM): Redo slightly to match the others. + + mktime: #undef mktime before #defining it + * lib/mktime.c (mktime) [DEBUG]: #undef mktime before #defining it. + + mktime: systematically normalize tm_isdst comparisons + * lib/mktime.c (isdst_differ): New function. + (__mktime_internal): Use it systematically for all isdst comparisons. + This completes the fix for libc BZ #6723, and removes the need for + normalizing tm_isdst. See + + (not_equal_tm) [DEBUG]: Use isdst_differ here, too. + + mktime: fix some integer overflow issues and sidestep the rest + + This was prompted by a bug report by Benjamin Lindner for MinGW + . + His bug is due to signed integer overflow (0 - INT_MIN), and I + I scanned through mktime.c looking for other integer overflow + problems, fixing all the bugs I found. + + Although the C Standard says the resulting code is still not safe + in the presence of integer overflow, in practice it should be good + enough for all real-world two's-complement implementations, except + for debugging environments that deliberately trap on integer + overflow (e.g., gcc -ftrapv). + + * lib/mktime.c (WRAPV): New macro. + (SHR): Also check that long_int and time_t shift right in the + usual way, before using the fast-but-unportable method. + (TYPE_ONES_COMPLEMENT, TYPE_SIGNED_MAGNITUDE): Remove, no longer + used. The code already assumed two's complement, so there's + no need to test for alternatives. All uses removed. + (TYPE_MAXIMUM): Don't rely here on overflow behavior not defined by + the C standard. Problem reported by Rich Felker in + . + (twos_complement_arithmetic): Also check long_int and time_t. + (time_t_avg, time_t_add_ok, time_t_int_add_ok): New functions. + (guess_time_tm, ranged_convert, __mktime_internal): Use them. + (__mktime_internal): Avoid integer overflow with unary subtraction + in two instances where -1 - X is an adequate replacement for -X, + since the calculations are approximate. 2011-01-29 Eric Blake @@ -89,6 +172,21 @@ type; behavior is still undefined but portable to all known targets. Reported by Rich Felker. + 2011-01-28 Paul Eggert + + mktime: avoid problems on NetBSD 5 / i386 + * lib/mktime.c (long_int): New type. This works around a problem + on NetBSD 5 / i386, where 'long int' and 'int' are both 32 bits + but time_t is 64 bits, and where I expect the existing code is + wrong in some cases. + (leapyear, ydhms_diff, guess_time_tm, __mktime_internal): Use it. + (ydhms_diff): Bring back the compile-time check for wide-enough + year and yday. + + mktime: fix misspelling in comment + * lib/mktime.c (__mktime_internal): Fix misspelling in comment. + This merges all recent glibc changes of importance. + 2011-01-28 Ralf Wildenhues move-if-change: cope with concurrent mv of identical file. @@ -100,6 +198,11 @@ parallel builds. Report from H.J. Lu against binutils in PR binutils/12283. +2011-01-29 Eli Zaretskii + + * lib/makefile.w32-in: + * lib/getopt_.h: New files. + 2011-01-28 Paul Eggert improve fix for MS-DOS file name clash @@ -119,7 +222,7 @@ it, it would also cause problems when extracting Emacs distribution tarballs on MS-DOS hosts. (ACLOCAL_INPUTS): Adjust to file renaming. - * aclocal.m4, configure, src/config.in: Regenerate. + * aclocal.m4, configure, lib/Makefile.in, src/config.in: Regenerate. * config.guess, config.sub: Sync from gnulib. * m4/gnulib-cache.m4: Remove from repository. * m4/gl-comp.m4: Rename from m4/gnulib-comp.m4. @@ -139,7 +242,7 @@ Remove HAVE_RAW_DECL_CHOWN etc. from config.h * Makefile.in (sync-from-gnulib): Remove m4/warn-on-use.m4, as it is no longer needed. - * aclocal.m4, configure, src/config.in: Regenerate. + * aclocal.m4, configure, lib/Makefile.in, src/config.in: Regenerate. * configure.in: Invoke the new gnulib macro gl_ASSERT_NO_GNULIB_POSIXCHECK, which removes the need for warn-on-use.m4 and for the HAVE_RAW_DECL_* symbols in config.h. @@ -233,13 +336,17 @@ host-dependent and are built as part of an ordinary 'make', and should not be checked in. + * lib/Makefile.in: Regenerate. + * lib/COPYING: New file, a copy of COPYING. + * configure: Regenerate. * configure.in (AC_USE_SYSTEM_EXTENSIONS): Remove: gnulib does this. Regenerate. - * m4/unistd_h.m4: - New file, copied from gnulib by gnulib-tool. - * aclocal.m4, configure, m4/getopt.m4: + * lib/getopt.c, lib/getopt.in.h, lib/getopt1.c, lib/getopt_int.h: + * lib/gettext.h, lib/unistd.in.h, m4/unistd_h.m4: + New files, copied from gnulib by gnulib-tool. + * aclocal.m4, configure, lib/Makefile.in, m4/getopt.m4: * m4/gnulib-cache.m4, m4/gnulib-comp.m4, src/config.in: Regenerate. @@ -252,14 +359,15 @@ getopt now, in lib. Regenerate. - * arg-nonnull.h, c++defs.h: + * arg-nonnull.h, c++defs.h, lib/mktime-internal.h, lib/mktime.c: + * lib/stddef.in.h, lib/time.h, lib/time.in.h, lib/time_r.c: * m4/extensions.m4, m4/include_next.m4, m4/mktime.m4: * m4/multiarch.m4, m4/stddef_h.m4, m4/time_h.m4, m4/time_r.m4: * m4/extensions.m4, m4/include_next.m4, m4/mktime.m4, m4/multiarch.m4: * m4/stddef_h.m4, m4/time_h.m4, m4/time_r.m4, m4/warn-on-use.m4: * m4/wchar_t.m4, warn-on-use.h: New files, copied from gnulib by gnulib-tool. - * aclocal.m4, configure: + * aclocal.m4, configure, lib/Makefile.in, lib/gnulib.mk: * m4/gnulib-cache.m4, m4/gnulib-comp.m4, src/config.in: Regenerate. @@ -276,9 +384,11 @@ and warn-on-use.h into the distribution. Regenerate. - * m4/c-strtod.m4: + * lib/dtoastr.c, lib/ftoastr.c, lib/ftoastr.h, lib/intprops.h: + * lib/ldtoastr.c, m4/c-strtod.m4: New files, copied from gnulib by gnulib-tool. - * aclocal.m4, configure: + * lib/dummy.c: Remove. + * aclocal.m4, configure, lib/Makefile.in, lib/gnulib.mk: * m4/gnulib-cache.m4, m4/gnulib-comp.m4, src/config.in: Regenerate. @@ -286,7 +396,8 @@ * Makefile.in (GNULIB_MODULES): Add ftoastr. Remove dummy. Regenerate. - * aclocal.m4, compile, depcomp, m4/00gnulib.m4, m4/gnulib-cache.m4: + * aclocal.m4, compile, depcomp, lib/Makefile.in, lib/dummy.c: + * lib/gnulib.mk, m4/00gnulib.m4, m4/gnulib-cache.m4: * m4/gnulib-common.m4, m4/gnulib-comp.m4, m4/gnulib-tool.m4, missing: New files, generated automatically, with 'make sync-from-gnulib' followed by 'make'. @@ -315,6 +426,7 @@ AM_INIT_AUTOMAKE, AM_PROG_CC_C_O, gl_EARLY, and gl_INIT. Output lib/Makefile, too. Use automake to build gnulib, as gnulib works more conveniently with automake. + * lib/Makefile.am: New file. * make-dist: Also put into the distribution aclocal.m4, compile, depcomp, missing, and the files under lib/. === removed file 'lib/ChangeLog' --- lib/ChangeLog 2011-02-10 03:32:03 +0000 +++ lib/ChangeLog 1970-01-01 00:00:00 +0000 @@ -1,186 +0,0 @@ -2011-02-09 Paul Eggert - - * Makefile.in, gnulib.mk: Regenerate. - This merges the following fix from gnulib: - - 2011-02-08 Bruno Haible - - Split large sed scripts, for HP-UX sed. - -2011-02-06 Paul Eggert - - gnulib: allow multiple gnulib generated replacements to coexist - This defines a few preprocessor symbols that should not affect Emacs. - * getopt.in.h, time.in.h, unistd.in.h: Regenerate - via "make sync-from-gnulib". - - gnulib: undo previous change - The upstream _HEADERS change was backed out of gnulib (see the - same thread). Stay in sync with gnulib. - - gnulib: adjust to upstream _HEADERS change - * Makefile.am (EXTRA_HEADERS, nodist_pkginclude_HEADERS): - New empty macros, to accommodate recent changes to gnulib. See - . - * Makefile.in, ftoastr.h, getopt.in.h: - * gnulib.mk, ignore-value.h, stdbool.in.h, stddef.in.h: - * time.in.h, unistd.in.h: - Regenerate. - -2011-02-03 Paul Eggert - - allow C code to suppress warnings about ignored return values - * Makefile.in, gnulib.mk: Regenerate. - * ignore-value.h: New file. - -2011-01-31 Eli Zaretskii - - * makefile.w32-in (GNULIBOBJS): Add $(BLD)/strftime.$(O) and - $(BLD)/time_r.$(O). - ($(BLD)/dtoastr.$(O)): Depend on $(EMACS_ROOT)/src/s/ms-w32.h and - $(EMACS_ROOT)/src/m/intel386.h. - ($(BLD)/strftime.$(O)): - ($(BLD)/time_r.$(O)): Define prerequisites. - -2011-01-30 Paul Eggert - - strftime: import from gnulib - * Makefile.in, gnulib.mk: - Regenerate. - * strftime.c, strftime.h, stdbool.in.h: New files, - imported from gnulib. - This incorporates many changes from gnulib, including simpler - handling of multibyte formats, porting to mingw32 and other - platforms, and support for higher-resolution time stamps. - Emacs does not yet use the higher-resolution interface. - -2011-01-30 Paul Eggert - - gnulib: import mktime and move-if-change fixes from gnulib - - * configure: Regenerate from the following. - - 2011-01-30 Paul Eggert - - mktime: clarify long_int width checking - * mktime.c (long_int_is_wide_enough): Move this assertion to - the top level, to make it clearer that the assumption about - long_int width is being checked. See - . - - 2011-01-29 Paul Eggert - - TYPE_MAXIMUM: avoid theoretically undefined behavior - * intprops.h (TYPE_MINIMUM, TYPE_MAXIMUM): Do not shift a - negative number, which the C Standard says has undefined behavior. - In practice this is not a problem, but might as well do it by the book. - Reported by Rich Felker and Eric Blake; see - . - * mktime.c (TYPE_MAXIMUM): Redo slightly to match the others. - - mktime: #undef mktime before #defining it - * mktime.c (mktime) [DEBUG]: #undef mktime before #defining it. - - mktime: systematically normalize tm_isdst comparisons - * mktime.c (isdst_differ): New function. - (__mktime_internal): Use it systematically for all isdst comparisons. - This completes the fix for libc BZ #6723, and removes the need for - normalizing tm_isdst. See - - (not_equal_tm) [DEBUG]: Use isdst_differ here, too. - - mktime: fix some integer overflow issues and sidestep the rest - - This was prompted by a bug report by Benjamin Lindner for MinGW - . - His bug is due to signed integer overflow (0 - INT_MIN), and I - I scanned through mktime.c looking for other integer overflow - problems, fixing all the bugs I found. - - Although the C Standard says the resulting code is still not safe - in the presence of integer overflow, in practice it should be good - enough for all real-world two's-complement implementations, except - for debugging environments that deliberately trap on integer - overflow (e.g., gcc -ftrapv). - - * mktime.c (WRAPV): New macro. - (SHR): Also check that long_int and time_t shift right in the - usual way, before using the fast-but-unportable method. - (TYPE_ONES_COMPLEMENT, TYPE_SIGNED_MAGNITUDE): Remove, no longer - used. The code already assumed two's complement, so there's - no need to test for alternatives. All uses removed. - (TYPE_MAXIMUM): Don't rely here on overflow behavior not defined by - the C standard. Problem reported by Rich Felker in - . - (twos_complement_arithmetic): Also check long_int and time_t. - (time_t_avg, time_t_add_ok, time_t_int_add_ok): New functions. - (guess_time_tm, ranged_convert, __mktime_internal): Use them. - (__mktime_internal): Avoid integer overflow with unary subtraction - in two instances where -1 - X is an adequate replacement for -X, - since the calculations are approximate. - - 2011-01-28 Paul Eggert - - mktime: avoid problems on NetBSD 5 / i386 - * mktime.c (long_int): New type. This works around a problem - on NetBSD 5 / i386, where 'long int' and 'int' are both 32 bits - but time_t is 64 bits, and where I expect the existing code is - wrong in some cases. - (leapyear, ydhms_diff, guess_time_tm, __mktime_internal): Use it. - (ydhms_diff): Bring back the compile-time check for wide-enough - year and yday. - - mktime: fix misspelling in comment - * mktime.c (__mktime_internal): Fix misspelling in comment. - This merges all recent glibc changes of importance. - -2011-01-29 Eli Zaretskii - - * makefile.w32-in: - * getopt_.h: New files. - -2011-01-27 Paul Eggert - - fix two m4/gnulib-*.m4 file names that clashed under MS-DOS - * Makefile.in: Regenerate. - -2011-01-24 Paul Eggert - - Remove HAVE_RAW_DECL_CHOWN etc. from config.h - * Makefile.in: Regenerate. - -2011-01-17 Paul Eggert - - Makefile.in: tidy up the building of lib - * Makefile.in: Regenerate. - * COPYING: New file, a copy of COPYING. - - Regenerate. - * getopt.c, getopt.in.h, getopt1.c, getopt_int.h: - * gettext.h, unistd.in.h: - New files, copied from gnulib by gnulib-tool. - * Makefile.in: - Regenerate. - - Regenerate. - * mktime-internal.h, mktime.c: - * stddef.in.h, time.h, time.in.h, time_r.c: - New files, copied from gnulib by gnulib-tool. - * Makefile.in, gnulib.mk: - Regenerate. - - Regenerate. - * dtoastr.c, ftoastr.c, ftoastr.h, intprops.h: - * ldtoastr.c: - New files, copied from gnulib by gnulib-tool. - * dummy.c: Remove. - * Makefile.in, gnulib.mk: - Regenerate. - - Regenerate. - * Makefile.in, dummy.c, gnulib.mk: - New files, generated automatically, with 'make sync-from-gnulib' - followed by 'make'. - - Automate syncing from gnulib. - * Makefile.am: New file. ------------------------------------------------------------ revno: 103207 committer: Paul Eggert branch nick: trunk timestamp: Wed 2011-02-09 19:32:03 -0800 message: New file lib/ChangeLog, with entries moved from ChangeLog diff: === modified file 'ChangeLog' --- ChangeLog 2011-02-10 03:16:11 +0000 +++ ChangeLog 2011-02-10 03:32:03 +0000 @@ -9,15 +9,6 @@ * .bzrignore: Ignore globals.h and related stamp. -2011-02-09 Paul Eggert - - * lib/Makefile.in, lib/gnulib.mk: Regenerate. - This merges the following fix from gnulib: - - 2011-02-08 Bruno Haible - - Split large sed scripts, for HP-UX sed. - 2011-02-08 Tom Tromey * configure: Rebuild. @@ -25,23 +16,12 @@ 2011-02-06 Paul Eggert - gnulib: allow multiple gnulib generated replacements to coexist - This defines a few preprocessor symbols that should not affect Emacs. - * lib/getopt.in.h, lib/time.in.h, lib/unistd.in.h: Regenerate - via "make sync-from-gnulib". - gnulib: undo previous change The upstream _HEADERS change was backed out of gnulib (see the same thread). Stay in sync with gnulib. gnulib: adjust to upstream _HEADERS change - * lib/Makefile.am (EXTRA_HEADERS, nodist_pkginclude_HEADERS): - New empty macros, to accommodate recent changes to gnulib. See - . - * c++defs.h, lib/Makefile.in, lib/ftoastr.h, lib/getopt.in.h: - * lib/gnulib.mk, lib/ignore-value.h, lib/stdbool.in.h, lib/stddef.in.h: - * lib/time.in.h, lib/unistd.in.h: - Regenerate. + * c++defs.h: Regenerate. 2011-02-05 Paul Eggert @@ -58,23 +38,13 @@ allow C code to suppress warnings about ignored return values * Makefile.in (GNULIB_MODULES): Add ignore-value. - * configure, lib/Makefile.in, lib/gnulib.mk, m4/gl-comp.m4: Regenerate. - * lib/ignore-value.h: New file. + * configure, m4/gl-comp.m4: Regenerate. 2011-01-31 Chong Yidong * configure.in: Test existence of xaw3d library, not just the header (Bug#7642). -2011-01-31 Eli Zaretskii - - * lib/makefile.w32-in (GNULIBOBJS): Add $(BLD)/strftime.$(O) and - $(BLD)/time_r.$(O). - ($(BLD)/dtoastr.$(O)): Depend on $(EMACS_ROOT)/src/s/ms-w32.h and - $(EMACS_ROOT)/src/m/intel386.h. - ($(BLD)/strftime.$(O)): - ($(BLD)/time_r.$(O)): Define prerequisites. - 2011-01-31 Paul Eggert src/emacs.c now gets version number from configure.in @@ -89,10 +59,8 @@ * Makefile.in (GNULIB_MODULES): Add strftime. * configure.in (AC_FUNC_STRFTIME, my_strftime): Remove; no longer needed. - * aclocal.m4, configure, lib/Makefile.in, lib/gnulib.mk, m4/gl-comp.m4: + * aclocal.m4, configure, m4/gl-comp.m4: Regenerate. - * lib/strftime.c, lib/strftime.h, lib/stdbool.in.h: New files, - imported from gnulib. * m4/strftime.m4, m4/stdbool.m4, m4/tm_gmtoff.m4: Likewise. This incorporates many changes from gnulib, including simpler handling of multibyte formats, porting to mingw32 and other @@ -105,65 +73,14 @@ * configure: Regenerate from the following. - 2011-01-30 Paul Eggert - - mktime: clarify long_int width checking - * lib/mktime.c (long_int_is_wide_enough): Move this assertion to - the top level, to make it clearer that the assumption about - long_int width is being checked. See - . - 2011-01-29 Paul Eggert TYPE_MAXIMUM: avoid theoretically undefined behavior - * lib/intprops.h (TYPE_MINIMUM, TYPE_MAXIMUM): Do not shift a + * m4/mktime.m4 (AC_FUNC_MKTIME): Do not shift a negative number, which the C Standard says has undefined behavior. In practice this is not a problem, but might as well do it by the book. Reported by Rich Felker and Eric Blake; see . - * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise. - * lib/mktime.c (TYPE_MAXIMUM): Redo slightly to match the others. - - mktime: #undef mktime before #defining it - * lib/mktime.c (mktime) [DEBUG]: #undef mktime before #defining it. - - mktime: systematically normalize tm_isdst comparisons - * lib/mktime.c (isdst_differ): New function. - (__mktime_internal): Use it systematically for all isdst comparisons. - This completes the fix for libc BZ #6723, and removes the need for - normalizing tm_isdst. See - - (not_equal_tm) [DEBUG]: Use isdst_differ here, too. - - mktime: fix some integer overflow issues and sidestep the rest - - This was prompted by a bug report by Benjamin Lindner for MinGW - . - His bug is due to signed integer overflow (0 - INT_MIN), and I - I scanned through mktime.c looking for other integer overflow - problems, fixing all the bugs I found. - - Although the C Standard says the resulting code is still not safe - in the presence of integer overflow, in practice it should be good - enough for all real-world two's-complement implementations, except - for debugging environments that deliberately trap on integer - overflow (e.g., gcc -ftrapv). - - * lib/mktime.c (WRAPV): New macro. - (SHR): Also check that long_int and time_t shift right in the - usual way, before using the fast-but-unportable method. - (TYPE_ONES_COMPLEMENT, TYPE_SIGNED_MAGNITUDE): Remove, no longer - used. The code already assumed two's complement, so there's - no need to test for alternatives. All uses removed. - (TYPE_MAXIMUM): Don't rely here on overflow behavior not defined by - the C standard. Problem reported by Rich Felker in - . - (twos_complement_arithmetic): Also check long_int and time_t. - (time_t_avg, time_t_add_ok, time_t_int_add_ok): New functions. - (guess_time_tm, ranged_convert, __mktime_internal): Use them. - (__mktime_internal): Avoid integer overflow with unary subtraction - in two instances where -1 - X is an adequate replacement for -X, - since the calculations are approximate. 2011-01-29 Eric Blake @@ -172,21 +89,6 @@ type; behavior is still undefined but portable to all known targets. Reported by Rich Felker. - 2011-01-28 Paul Eggert - - mktime: avoid problems on NetBSD 5 / i386 - * lib/mktime.c (long_int): New type. This works around a problem - on NetBSD 5 / i386, where 'long int' and 'int' are both 32 bits - but time_t is 64 bits, and where I expect the existing code is - wrong in some cases. - (leapyear, ydhms_diff, guess_time_tm, __mktime_internal): Use it. - (ydhms_diff): Bring back the compile-time check for wide-enough - year and yday. - - mktime: fix misspelling in comment - * lib/mktime.c (__mktime_internal): Fix misspelling in comment. - This merges all recent glibc changes of importance. - 2011-01-28 Ralf Wildenhues move-if-change: cope with concurrent mv of identical file. @@ -198,11 +100,6 @@ parallel builds. Report from H.J. Lu against binutils in PR binutils/12283. -2011-01-29 Eli Zaretskii - - * lib/makefile.w32-in: - * lib/getopt_.h: New files. - 2011-01-28 Paul Eggert improve fix for MS-DOS file name clash @@ -222,7 +119,7 @@ it, it would also cause problems when extracting Emacs distribution tarballs on MS-DOS hosts. (ACLOCAL_INPUTS): Adjust to file renaming. - * aclocal.m4, configure, lib/Makefile.in, src/config.in: Regenerate. + * aclocal.m4, configure, src/config.in: Regenerate. * config.guess, config.sub: Sync from gnulib. * m4/gnulib-cache.m4: Remove from repository. * m4/gl-comp.m4: Rename from m4/gnulib-comp.m4. @@ -242,7 +139,7 @@ Remove HAVE_RAW_DECL_CHOWN etc. from config.h * Makefile.in (sync-from-gnulib): Remove m4/warn-on-use.m4, as it is no longer needed. - * aclocal.m4, configure, lib/Makefile.in, src/config.in: Regenerate. + * aclocal.m4, configure, src/config.in: Regenerate. * configure.in: Invoke the new gnulib macro gl_ASSERT_NO_GNULIB_POSIXCHECK, which removes the need for warn-on-use.m4 and for the HAVE_RAW_DECL_* symbols in config.h. @@ -336,17 +233,13 @@ host-dependent and are built as part of an ordinary 'make', and should not be checked in. - * lib/Makefile.in: Regenerate. - * lib/COPYING: New file, a copy of COPYING. - * configure: Regenerate. * configure.in (AC_USE_SYSTEM_EXTENSIONS): Remove: gnulib does this. Regenerate. - * lib/getopt.c, lib/getopt.in.h, lib/getopt1.c, lib/getopt_int.h: - * lib/gettext.h, lib/unistd.in.h, m4/unistd_h.m4: - New files, copied from gnulib by gnulib-tool. - * aclocal.m4, configure, lib/Makefile.in, m4/getopt.m4: + * m4/unistd_h.m4: + New file, copied from gnulib by gnulib-tool. + * aclocal.m4, configure, m4/getopt.m4: * m4/gnulib-cache.m4, m4/gnulib-comp.m4, src/config.in: Regenerate. @@ -359,15 +252,14 @@ getopt now, in lib. Regenerate. - * arg-nonnull.h, c++defs.h, lib/mktime-internal.h, lib/mktime.c: - * lib/stddef.in.h, lib/time.h, lib/time.in.h, lib/time_r.c: + * arg-nonnull.h, c++defs.h: * m4/extensions.m4, m4/include_next.m4, m4/mktime.m4: * m4/multiarch.m4, m4/stddef_h.m4, m4/time_h.m4, m4/time_r.m4: * m4/extensions.m4, m4/include_next.m4, m4/mktime.m4, m4/multiarch.m4: * m4/stddef_h.m4, m4/time_h.m4, m4/time_r.m4, m4/warn-on-use.m4: * m4/wchar_t.m4, warn-on-use.h: New files, copied from gnulib by gnulib-tool. - * aclocal.m4, configure, lib/Makefile.in, lib/gnulib.mk: + * aclocal.m4, configure: * m4/gnulib-cache.m4, m4/gnulib-comp.m4, src/config.in: Regenerate. @@ -384,11 +276,9 @@ and warn-on-use.h into the distribution. Regenerate. - * lib/dtoastr.c, lib/ftoastr.c, lib/ftoastr.h, lib/intprops.h: - * lib/ldtoastr.c, m4/c-strtod.m4: + * m4/c-strtod.m4: New files, copied from gnulib by gnulib-tool. - * lib/dummy.c: Remove. - * aclocal.m4, configure, lib/Makefile.in, lib/gnulib.mk: + * aclocal.m4, configure: * m4/gnulib-cache.m4, m4/gnulib-comp.m4, src/config.in: Regenerate. @@ -396,8 +286,7 @@ * Makefile.in (GNULIB_MODULES): Add ftoastr. Remove dummy. Regenerate. - * aclocal.m4, compile, depcomp, lib/Makefile.in, lib/dummy.c: - * lib/gnulib.mk, m4/00gnulib.m4, m4/gnulib-cache.m4: + * aclocal.m4, compile, depcomp, m4/00gnulib.m4, m4/gnulib-cache.m4: * m4/gnulib-common.m4, m4/gnulib-comp.m4, m4/gnulib-tool.m4, missing: New files, generated automatically, with 'make sync-from-gnulib' followed by 'make'. @@ -426,7 +315,6 @@ AM_INIT_AUTOMAKE, AM_PROG_CC_C_O, gl_EARLY, and gl_INIT. Output lib/Makefile, too. Use automake to build gnulib, as gnulib works more conveniently with automake. - * lib/Makefile.am: New file. * make-dist: Also put into the distribution aclocal.m4, compile, depcomp, missing, and the files under lib/. === added file 'lib/ChangeLog' --- lib/ChangeLog 1970-01-01 00:00:00 +0000 +++ lib/ChangeLog 2011-02-10 03:32:03 +0000 @@ -0,0 +1,186 @@ +2011-02-09 Paul Eggert + + * Makefile.in, gnulib.mk: Regenerate. + This merges the following fix from gnulib: + + 2011-02-08 Bruno Haible + + Split large sed scripts, for HP-UX sed. + +2011-02-06 Paul Eggert + + gnulib: allow multiple gnulib generated replacements to coexist + This defines a few preprocessor symbols that should not affect Emacs. + * getopt.in.h, time.in.h, unistd.in.h: Regenerate + via "make sync-from-gnulib". + + gnulib: undo previous change + The upstream _HEADERS change was backed out of gnulib (see the + same thread). Stay in sync with gnulib. + + gnulib: adjust to upstream _HEADERS change + * Makefile.am (EXTRA_HEADERS, nodist_pkginclude_HEADERS): + New empty macros, to accommodate recent changes to gnulib. See + . + * Makefile.in, ftoastr.h, getopt.in.h: + * gnulib.mk, ignore-value.h, stdbool.in.h, stddef.in.h: + * time.in.h, unistd.in.h: + Regenerate. + +2011-02-03 Paul Eggert + + allow C code to suppress warnings about ignored return values + * Makefile.in, gnulib.mk: Regenerate. + * ignore-value.h: New file. + +2011-01-31 Eli Zaretskii + + * makefile.w32-in (GNULIBOBJS): Add $(BLD)/strftime.$(O) and + $(BLD)/time_r.$(O). + ($(BLD)/dtoastr.$(O)): Depend on $(EMACS_ROOT)/src/s/ms-w32.h and + $(EMACS_ROOT)/src/m/intel386.h. + ($(BLD)/strftime.$(O)): + ($(BLD)/time_r.$(O)): Define prerequisites. + +2011-01-30 Paul Eggert + + strftime: import from gnulib + * Makefile.in, gnulib.mk: + Regenerate. + * strftime.c, strftime.h, stdbool.in.h: New files, + imported from gnulib. + This incorporates many changes from gnulib, including simpler + handling of multibyte formats, porting to mingw32 and other + platforms, and support for higher-resolution time stamps. + Emacs does not yet use the higher-resolution interface. + +2011-01-30 Paul Eggert + + gnulib: import mktime and move-if-change fixes from gnulib + + * configure: Regenerate from the following. + + 2011-01-30 Paul Eggert + + mktime: clarify long_int width checking + * mktime.c (long_int_is_wide_enough): Move this assertion to + the top level, to make it clearer that the assumption about + long_int width is being checked. See + . + + 2011-01-29 Paul Eggert + + TYPE_MAXIMUM: avoid theoretically undefined behavior + * intprops.h (TYPE_MINIMUM, TYPE_MAXIMUM): Do not shift a + negative number, which the C Standard says has undefined behavior. + In practice this is not a problem, but might as well do it by the book. + Reported by Rich Felker and Eric Blake; see + . + * mktime.c (TYPE_MAXIMUM): Redo slightly to match the others. + + mktime: #undef mktime before #defining it + * mktime.c (mktime) [DEBUG]: #undef mktime before #defining it. + + mktime: systematically normalize tm_isdst comparisons + * mktime.c (isdst_differ): New function. + (__mktime_internal): Use it systematically for all isdst comparisons. + This completes the fix for libc BZ #6723, and removes the need for + normalizing tm_isdst. See + + (not_equal_tm) [DEBUG]: Use isdst_differ here, too. + + mktime: fix some integer overflow issues and sidestep the rest + + This was prompted by a bug report by Benjamin Lindner for MinGW + . + His bug is due to signed integer overflow (0 - INT_MIN), and I + I scanned through mktime.c looking for other integer overflow + problems, fixing all the bugs I found. + + Although the C Standard says the resulting code is still not safe + in the presence of integer overflow, in practice it should be good + enough for all real-world two's-complement implementations, except + for debugging environments that deliberately trap on integer + overflow (e.g., gcc -ftrapv). + + * mktime.c (WRAPV): New macro. + (SHR): Also check that long_int and time_t shift right in the + usual way, before using the fast-but-unportable method. + (TYPE_ONES_COMPLEMENT, TYPE_SIGNED_MAGNITUDE): Remove, no longer + used. The code already assumed two's complement, so there's + no need to test for alternatives. All uses removed. + (TYPE_MAXIMUM): Don't rely here on overflow behavior not defined by + the C standard. Problem reported by Rich Felker in + . + (twos_complement_arithmetic): Also check long_int and time_t. + (time_t_avg, time_t_add_ok, time_t_int_add_ok): New functions. + (guess_time_tm, ranged_convert, __mktime_internal): Use them. + (__mktime_internal): Avoid integer overflow with unary subtraction + in two instances where -1 - X is an adequate replacement for -X, + since the calculations are approximate. + + 2011-01-28 Paul Eggert + + mktime: avoid problems on NetBSD 5 / i386 + * mktime.c (long_int): New type. This works around a problem + on NetBSD 5 / i386, where 'long int' and 'int' are both 32 bits + but time_t is 64 bits, and where I expect the existing code is + wrong in some cases. + (leapyear, ydhms_diff, guess_time_tm, __mktime_internal): Use it. + (ydhms_diff): Bring back the compile-time check for wide-enough + year and yday. + + mktime: fix misspelling in comment + * mktime.c (__mktime_internal): Fix misspelling in comment. + This merges all recent glibc changes of importance. + +2011-01-29 Eli Zaretskii + + * makefile.w32-in: + * getopt_.h: New files. + +2011-01-27 Paul Eggert + + fix two m4/gnulib-*.m4 file names that clashed under MS-DOS + * Makefile.in: Regenerate. + +2011-01-24 Paul Eggert + + Remove HAVE_RAW_DECL_CHOWN etc. from config.h + * Makefile.in: Regenerate. + +2011-01-17 Paul Eggert + + Makefile.in: tidy up the building of lib + * Makefile.in: Regenerate. + * COPYING: New file, a copy of COPYING. + + Regenerate. + * getopt.c, getopt.in.h, getopt1.c, getopt_int.h: + * gettext.h, unistd.in.h: + New files, copied from gnulib by gnulib-tool. + * Makefile.in: + Regenerate. + + Regenerate. + * mktime-internal.h, mktime.c: + * stddef.in.h, time.h, time.in.h, time_r.c: + New files, copied from gnulib by gnulib-tool. + * Makefile.in, gnulib.mk: + Regenerate. + + Regenerate. + * dtoastr.c, ftoastr.c, ftoastr.h, intprops.h: + * ldtoastr.c: + New files, copied from gnulib by gnulib-tool. + * dummy.c: Remove. + * Makefile.in, gnulib.mk: + Regenerate. + + Regenerate. + * Makefile.in, dummy.c, gnulib.mk: + New files, generated automatically, with 'make sync-from-gnulib' + followed by 'make'. + + Automate syncing from gnulib. + * Makefile.am: New file. ------------------------------------------------------------ revno: 103206 committer: Glenn Morris branch nick: trunk timestamp: Wed 2011-02-09 19:20:52 -0800 message: * src/Makefile.in (really-lwlib): Depend on globals.h, for parallel builds. Otherwise, lwlib/ and src/ would try to run make-docfile at the same time, and one of them would lose when its output file disappeared. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-02-09 20:50:17 +0000 +++ src/ChangeLog 2011-02-10 03:20:52 +0000 @@ -1,7 +1,11 @@ +2011-02-10 Glenn Morris + + * Makefile.in (really-lwlib): Depend on globals.h, for parallel builds. + 2011-02-09 Eli Zaretskii - * makefile.w32-in (GLOBAL_SOURCES, SOME_MACHINE_OBJECTS, obj): New - macros. + * makefile.w32-in (GLOBAL_SOURCES, SOME_MACHINE_OBJECTS, obj): + New macros. (globals.h, gl-stamp): New targets. (clean): Clean gl-stamp and globals.h. === modified file 'src/Makefile.in' --- src/Makefile.in 2011-02-09 17:04:43 +0000 +++ src/Makefile.in 2011-02-10 03:20:52 +0000 @@ -669,7 +669,7 @@ ## The following oldxmenu-related rules are only (possibly) used if ## HAVE_X11 && !USE_GTK, but there is no harm in always defining them ## (provided we take a little care that OLDXMENU is never empty). -really-lwlib: +really-lwlib: globals.h cd $(lwlibdir); $(MAKE) $(MFLAGS) \ CC='$(CC)' CFLAGS='$(CFLAGS)' MAKE='$(MAKE)' @true # make -t should not create really-lwlib. ------------------------------------------------------------ revno: 103205 committer: Paul Eggert branch nick: trunk timestamp: Wed 2011-02-09 19:16:11 -0800 message: * arg-nonnull.h, c++defs.h, warn-on-use.h: Fix licenses. diff: === modified file 'ChangeLog' --- ChangeLog 2011-02-09 18:59:55 +0000 +++ ChangeLog 2011-02-10 03:16:11 +0000 @@ -1,3 +1,10 @@ +2011-02-10 Paul Eggert + + * arg-nonnull.h, c++defs.h, warn-on-use.h: Fix licenses. + Sync from gnulib, which has been patched to fix the problem + with the license notices. Problem reported by Glenn Morris in + . + 2011-02-09 Stefan Monnier * .bzrignore: Ignore globals.h and related stamp. === modified file 'arg-nonnull.h' --- arg-nonnull.h 2011-01-09 06:57:07 +0000 +++ arg-nonnull.h 2011-02-10 03:16:11 +0000 @@ -9,7 +9,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. + General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ === modified file 'c++defs.h' --- c++defs.h 2011-02-06 22:13:03 +0000 +++ c++defs.h 2011-02-10 03:16:11 +0000 @@ -9,7 +9,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. + General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ === modified file 'warn-on-use.h' --- warn-on-use.h 2011-01-09 06:57:07 +0000 +++ warn-on-use.h 2011-02-10 03:16:11 +0000 @@ -9,7 +9,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. + General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ ------------------------------------------------------------ revno: 103204 committer: Ken Manheimer branch nick: trunk timestamp: Wed 2011-02-09 19:33:34 -0500 message: * allout.el: Synopsis: Change allout user configuration so auto-activation is controlled solely by customization `allout-auto-activation'. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-02-09 18:59:55 +0000 +++ lisp/ChangeLog 2011-02-10 00:33:34 +0000 @@ -1,3 +1,26 @@ +2011-02-10 Ken Manheimer + + * allout.el: Synopsis: Change allout user configuration so + auto-activation is controlled solely by customization + `allout-auto-activation'. + + (allout-auto-activation-helper) (allout-setup): New autoloads + implement new custom set procedure for allout-auto-activation. + Also, explicitly invoke + (allout-setup) after allout-auto-activation is custom-defined, to + effect the settings in emacs sessions besides the few where + allout-auto-activation customization is donea. + (allout-auto-activation): Use allout-auto-activation-helper to + :set. Revise the docstring. + (allout-init): Reduce functionality to just customizing + allout-auto-activation, and mark obsolete. + (allout-mode): Respect string values for allout-auto-activation. + Run allout-after-copy-or-kill-hook without any args. + (allout-mode) (allout-layout) (allout-default-layout) + (outlineify-sticky): Adjust docstring for new scheme. + (allout-after-copy-or-kill-hook): No arguments - hook implementers + should concentrate on the kill ring. + 2011-02-09 Stefan Monnier * progmodes/sh-script.el (sh-font-lock-open-heredoc): Fix case ------------------------------------------------------------ revno: 103203 committer: Ken Manheimer branch nick: trunk timestamp: Wed 2011-02-09 19:31:18 -0500 message: Synopsis: Change allout user configuration so auto-activation is controlled solely by customization `allout-auto-activation'. (allout-auto-activation-helper) (allout-setup): New autoloads implement new custom set procedure for allout-auto-activation. Also, explicitly invoke (allout-setup) after allout-auto-activation is custom-defined, to effect the settings in emacs sessions besides the few where allout-auto-activation customization is donea. (allout-auto-activation): Use allout-auto-activation-helper to :set. Revise the docstring. (allout-init): Reduce functionality to just customizing allout-auto-activation, and mark obsolete. (allout-mode): Respect string values for allout-auto-activation. Run allout-after-copy-or-kill-hook without any args. (allout-mode) (allout-layout) (allout-default-layout) (outlineify-sticky): Adjust docstring for new scheme. (allout-after-copy-or-kill-hook): No arguments - hook implementers should concentrate on the kill ring. diff: === modified file 'lisp/allout.el' --- lisp/allout.el 2011-02-07 20:43:36 +0000 +++ lisp/allout.el 2011-02-10 00:31:18 +0000 @@ -62,18 +62,15 @@ ;; The latest development version and helpful notes are available at ;; http://myriadicity.net/Sundry/EmacsAllout . ;; -;; The outline menubar additions provide quick reference to many of -;; the features, and see the docstring of the variable `allout-init' -;; for instructions on priming your Emacs session for automatic -;; activation of allout-mode. -;; -;; See the docstring of the variables `allout-layout' and +;; The outline menubar additions provide quick reference to many of the +;; features. See the docstring of the variables `allout-layout' and ;; `allout-auto-activation' for details on automatic activation of -;; `allout-mode' as a minor mode. (It has changed since allout -;; 3.x, for those of you that depend on the old method.) +;; `allout-mode' as a minor mode. (`allout-init' is deprecated in favor of +;; a purely customization-based method.) ;; ;; Note -- the lines beginning with `;;;_' are outline topic headers. -;; Just `ESC-x eval-buffer' to give it a whirl. +;; Customize `allout-auto-activation' to enable, then revisit this +;; buffer to give it a whirl. ;; ken manheimer (ken dot manheimer at gmail dot com) @@ -271,35 +268,56 @@ :set 'allout-compose-and-institute-keymap ) +;;;_ > allout-auto-activation-helper (var value) +;;;###autoload +(defun allout-auto-activation-helper (var value) + "Institute `allout-auto-activation'. + +Intended to be used as the `allout-auto-activation' :set function." + (set-default var value) + (allout-setup)) +;;;_ > allout-setup () +;;;###autoload +(defun allout-setup () + "Do fundamental emacs session for allout auto-activation. + +Establishes allout processing as part of visiting a file if +`allout-auto-activation' is non-nil, or removes it otherwise. + +The proper way to use this is through customizing the setting of +`allout-auto-activation'." + (if (not allout-auto-activation) + (remove-hook 'find-file-hook 'allout-find-file-hook) + (add-hook 'find-file-hook 'allout-find-file-hook))) ;;;_ = allout-auto-activation +;;;###autoload (defcustom allout-auto-activation nil - "Regulates auto-activation modality of allout outlines -- see `allout-init'. - -Setq-default by `allout-init' to regulate whether or not allout -outline mode is automatically activated when the buffer-specific -variable `allout-layout' is non-nil, and whether or not the layout -dictated by `allout-layout' should be imposed on mode activation. - -With value t, auto-mode-activation and auto-layout are enabled. -\(This also depends on `allout-find-file-hook' being installed in -`find-file-hook', which is also done by `allout-init'.) - -With value `ask', auto-mode-activation is enabled, and endorsement for + "Configure allout outline mode auto-activation. + +Control whether and how allout outline mode is automatically +activated when files are visited with non-nil buffer-specific +file variable `allout-layout'. + +When allout-auto-activation is \"On\" \(t), allout mode is +activated in buffers with non-nil `allout-layout', and the +specified layout is applied. + +With value \"ask\", auto-mode-activation is enabled, and endorsement for performing auto-layout is asked of the user each time. -With value `activate', only auto-mode-activation is enabled, -auto-layout is not. +With value \"activate\", only auto-mode-activation is enabled. +Auto-layout is not. With value nil, neither auto-mode-activation nor auto-layout are -enabled. - -See the docstring for `allout-init' for the proper interface to -this variable." +enabled, and allout auto-activation processing is removed from +file visiting activities." + :set 'allout-auto-activation-helper :type '(choice (const :tag "On" t) (const :tag "Ask about layout" "ask") (const :tag "Mode only" "activate") (const :tag "Off" nil)) :group 'allout) +(allout-setup) ;;;_ = allout-default-layout (defcustom allout-default-layout '(-2 : 0) "Default allout outline layout specification. @@ -311,7 +329,7 @@ A list value specifies a default layout for the current buffer, to be applied upon activation of `allout-mode'. Any non-nil value will automatically trigger `allout-mode', provided -`allout-init' has been called to enable this behavior. +`allout-auto-activation' has been customized to enable it. The types of elements in the layout specification are: @@ -890,10 +908,10 @@ (defvar allout-layout nil ; LEAVE GLOBAL VALUE NIL -- see docstring. "Buffer-specific setting for allout layout. -In buffers where this is non-nil (and if `allout-init' has been run, to -enable this behavior), `allout-mode' will be automatically activated. The -layout dictated by the value will be used to set the initial exposure when -`allout-mode' is activated. +In buffers where this is non-nil \(and if `allout-auto-activation' +has been customized to enable this behavior), `allout-mode' will be +automatically activated. The layout dictated by the value will be used to +set the initial exposure when `allout-mode' is activated. \*You should not setq-default this variable non-nil unless you want every visited file to be treated as an allout file.* @@ -906,9 +924,9 @@ ;;;End: dictate activation of `allout-mode' mode when the file is visited -\(presuming allout-init was already run), followed by the -equivalent of `(allout-expose-topic 0 : -1 -1 0)'. (This is -the layout used for the allout.el source file.) +\(presuming proper `allout-auto-activation' customization), +followed by the equivalent of `(allout-expose-topic 0 : -1 -1 0)'. +\(This is the layout used for the allout.el source file.) `allout-default-layout' describes the specification format. `allout-layout' can additionally have the value `t', in which @@ -1441,9 +1459,7 @@ (defvar allout-after-copy-or-kill-hook nil "*Hook that's run after copying outline text. -Functions on the hook should take two arguments: - - START, END -- integers indicating the span containing the copied text.") +Functions on the hook should not take any arguments.") ;;;_ = allout-outside-normal-auto-fill-function (defvar allout-outside-normal-auto-fill-function nil "Value of normal-auto-fill-function outside of allout mode. @@ -1621,84 +1637,19 @@ "If t, `allout-mode's last deactivation was deliberate. So `allout-post-command-business' should not reactivate it...") (make-variable-buffer-local 'allout-explicitly-deactivated) -;;;_ > allout-init (&optional mode) -(defun allout-init (&optional mode) - "Prime `allout-mode' to enable/disable auto-activation, wrt `allout-layout'. - -MODE is one of the following symbols: - - - nil (or no argument) deactivate auto-activation/layout; - - `activate', enable auto-activation only; - - `ask', enable auto-activation, and enable auto-layout but with - confirmation for layout operation solicited from user each time; - - `report', just report and return the current auto-activation state; - - anything else (eg, t) for auto-activation and auto-layout, without - any confirmation check. - -Use this function to setup your Emacs session for automatic activation -of allout outline mode, contingent to the buffer-specific setting of -the `allout-layout' variable. (See `allout-layout' and -`allout-expose-topic' docstrings for more details on auto layout). - -`allout-init' works by setting up (or removing) the `allout-mode' -find-file-hook, and giving `allout-auto-activation' a suitable -setting. - -To prime your Emacs session for full auto-outline operation, include -the following two lines in your Emacs init file: - -\(require 'allout) -\(allout-init t)" - - (interactive) - (if (allout-called-interactively-p) - (progn - (setq mode - (completing-read - (concat "Select outline auto setup mode " - "(empty for report, ? for options) ") - '(("nil")("full")("activate")("deactivate") - ("ask") ("report") ("")) - nil - t)) - (if (string= mode "") - (setq mode 'report) - (setq mode (intern-soft mode))))) - (let - ;; convenience aliases, for consistent ref to respective vars: - ((hook 'allout-find-file-hook) - (find-file-hook-var-name (if (boundp 'find-file-hook) - 'find-file-hook - 'find-file-hooks)) - (curr-mode 'allout-auto-activation)) - - (cond ((not mode) - (set find-file-hook-var-name - (delq hook (symbol-value find-file-hook-var-name))) - (if (allout-called-interactively-p) - (message "Allout outline mode auto-activation inhibited."))) - ((eq mode 'report) - (if (not (memq hook (symbol-value find-file-hook-var-name))) - (allout-init nil) - ;; Just punt and use the reports from each of the modes: - (allout-init (symbol-value curr-mode)))) - (t (add-hook find-file-hook-var-name hook) - (set curr-mode ; `set', not `setq'! - (cond ((eq mode 'activate) - (message - "Outline mode auto-activation enabled.") - 'activate) - ((eq mode 'report) - ;; Return the current mode setting: - (allout-init mode)) - ((eq mode 'ask) - (message - (concat "Outline mode auto-activation and " - "-layout (upon confirmation) enabled.")) - 'ask) - ((message - "Outline mode auto-activation and -layout enabled.") - 'full))))))) +;;;_ > allout-init (mode) +(defun allout-init (mode) + "DEPRECATED - configure allout activation by customizing +`allout-auto-activation'. This function remains around, limited +from what it did before, for backwards compatability. + +MODE is the activation mode - see `allout-auto-activation' for +valid values." + + (custom-set-variables (list 'allout-auto-activation (format "%s" mode))) + (format "%s" mode)) +(make-obsolete 'allout-init + "customize 'allout-auto-activation' instead." "23.3") ;;;_ > allout-setup-menubar () (defun allout-setup-menubar () "Populate the current buffer's menubar with `allout-mode' stuff." @@ -1764,9 +1715,8 @@ Below is a description of the key bindings, and then description of special `allout-mode' features and terminology. See also the outline menubar additions for quick reference to many of the -features, and see the docstring of the function `allout-init' for -instructions on priming your emacs session for automatic -activation of `allout-mode'. +features. Customize `allout-auto-activation' to prepare your +emacs session for automatic activation of `allout-mode'. The bindings are those listed in `allout-prefixed-keybindings' and `allout-unprefixed-keybindings'. We recommend customizing @@ -1850,7 +1800,8 @@ Like above 'copy-exposed', but convert topic prefixes to section.subsection... numeric format. -\\[eval-expression] (allout-init t) Setup Emacs session for outline mode +\\[customize-variable] allout-auto-activation + Prepare Emacs session for allout outline mode auto-activation. Topic Encryption @@ -2092,8 +2043,8 @@ (when (and allout-layout allout-auto-activation use-layout - (and (not (eq allout-auto-activation 'activate)) - (if (eq allout-auto-activation 'ask) + (and (not (string= allout-auto-activation "activate")) + (if (string= allout-auto-activation "ask") (if (y-or-n-p (format "Expose %s with layout '%s'? " (buffer-name) use-layout)) @@ -3448,7 +3399,7 @@ (defun allout-find-file-hook () "Activate `allout-mode' on non-nil `allout-auto-activation', `allout-layout'. -See `allout-init' for setup instructions." +See `allout-auto-activation' for setup instructions." (if (and allout-auto-activation (not (allout-mode-p)) allout-layout) @@ -4394,7 +4345,7 @@ (if (and (not beg-hidden) (not end-hidden)) (allout-unprotected (kill-line arg)) (kill-line arg)) - (run-hook-with-args 'allout-after-copy-or-kill-hook beg end) + (run-hooks 'allout-after-copy-or-kill-hook) (allout-deannotate-hidden beg end) (if allout-numbered-bullet @@ -4446,7 +4397,7 @@ (unwind-protect ; for possible barf-if-buffer-read-only. (allout-unprotected (kill-region beg end)) (allout-deannotate-hidden beg end) - (run-hook-with-args 'allout-after-copy-or-kill-hook beg end) + (run-hooks 'allout-after-copy-or-kill-hook) (save-excursion (allout-renumber-to-depth depth)) @@ -4503,7 +4454,8 @@ (allout-unprotected (let ((inhibit-read-only t) (buffer-undo-list t)) - (remove-text-properties begin end '(allout-was-hidden t))))) + (remove-text-properties begin (min end (point-max)) + '(allout-was-hidden t))))) ;;;_ > allout-hide-by-annotation (begin end) (defun allout-hide-by-annotation (begin end) "Translate text properties indicating exposure status into actual exposure." @@ -6312,8 +6264,8 @@ (defun outlineify-sticky (&optional arg) "Activate outline mode and establish file var so it is started subsequently. -See doc-string for `allout-layout' and `allout-init' for details on -setup for auto-startup." +See `allout-layout' and customization of `allout-auto-activation' +for details on preparing emacs for automatic allout activation." (interactive "P") ------------------------------------------------------------ revno: 103202 author: Gnus developers committer: Katsumi Yamaoka branch nick: trunk timestamp: Wed 2011-02-09 22:16:29 +0000 message: Merge changes made in Gnus trunk. nntp.el (nntp-retrieve-group-data-early-disabled): Disable the async code for now, since it doesn't work for all users. message.el (message-options): Make message-options really buffer local. shr.el (shr-tag-body): Add support for text attribute in body markups. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-02-08 12:03:14 +0000 +++ lisp/gnus/ChangeLog 2011-02-09 22:16:29 +0000 @@ -1,5 +1,18 @@ +2011-02-09 Lars Ingebrigtsen + + * nntp.el (nntp-retrieve-group-data-early-disabled): Disable the async + code for now, since it doesn't work for all users. + +2011-02-09 Julien Danjou + + * message.el (message-options): Make message-options really buffer + local. + 2011-02-08 Julien Danjou + * shr.el (shr-tag-body): Add support for text attribute in body + markups. + * message.el (message-options): Make message-options a local variable. 2011-02-07 Lars Ingebrigtsen === modified file 'lisp/gnus/message.el' --- lisp/gnus/message.el 2011-02-08 12:03:14 +0000 +++ lisp/gnus/message.el 2011-02-09 22:16:29 +0000 @@ -1814,7 +1814,7 @@ (defvar message-options nil "Some saved answers when sending message.") -(make-local-variable 'message-options) +(make-variable-buffer-local 'message-options) (defvar message-send-mail-real-function nil "Internal send mail function.") === modified file 'lisp/gnus/nntp.el' --- lisp/gnus/nntp.el 2011-02-06 22:27:28 +0000 +++ lisp/gnus/nntp.el 2011-02-09 22:16:29 +0000 @@ -774,7 +774,7 @@ (nntp-copy-to-buffer nntp-server-buffer (point-min) (point-max)) 'headers))))) -(deffoo nntp-retrieve-group-data-early (server infos) +(deffoo nntp-retrieve-group-data-early-disabled (server infos) "Retrieve group info on INFOS." (nntp-with-open-group nil server (when (nntp-find-connection-buffer nntp-server-buffer) @@ -793,7 +793,7 @@ nil command (gnus-group-real-name (gnus-info-group info))))) (length infos))))) -(deffoo nntp-finish-retrieve-group-infos (server infos count) +(deffoo nntp-finish-retrieve-group-infos-disabled (server infos count) (nntp-with-open-group nil server (let ((buf (nntp-find-connection-buffer nntp-server-buffer)) (method (gnus-find-method-for-group === modified file 'lisp/gnus/shr.el' --- lisp/gnus/shr.el 2011-02-05 00:11:16 +0000 +++ lisp/gnus/shr.el 2011-02-09 22:16:29 +0000 @@ -696,7 +696,8 @@ (defun shr-tag-body (cont) (let* ((start (point)) - (fgcolor (cdr (assq :fgcolor cont))) + (fgcolor (cdr (or (assq :fgcolor cont) + (assq :text cont)))) (bgcolor (cdr (assq :bgcolor cont))) (shr-stylesheet (list (cons 'color fgcolor) (cons 'background-color bgcolor)))) ------------------------------------------------------------ revno: 103201 committer: Eli Zaretskii branch nick: trunk timestamp: Wed 2011-02-09 22:50:17 +0200 message: Update the Windows build according to revisions 103189 and 103199. src/makefile.w32-in (GLOBAL_SOURCES, SOME_MACHINE_OBJECTS, obj): New macros. (globals.h, gl-stamp): New targets. (clean): Clean gl-stamp and globals.h. nt/makefile.w32-in (bootstrap-nmake, bootstrap-gmake): Make the "make-docfile" target in lib-src, before bootstrapping the src directory. Needed since building in src needs to run make-docfile to produce globals.h. diff: === modified file 'nt/ChangeLog' --- nt/ChangeLog 2011-02-04 09:17:36 +0000 +++ nt/ChangeLog 2011-02-09 20:50:17 +0000 @@ -1,3 +1,10 @@ +2011-02-09 Eli Zaretskii + + * makefile.w32-in (bootstrap-nmake, bootstrap-gmake): Make the + "make-docfile" target in lib-src, before bootstrapping the src + directory. Needed since building in src needs to run make-docfile + to produce globals.h. + 2011-02-04 Eli Zaretskii * config.nt (inline) [__GNUC__]: Define (for gnulib). === modified file 'nt/makefile.w32-in' --- nt/makefile.w32-in 2011-01-29 13:41:34 +0000 +++ nt/makefile.w32-in 2011-02-09 20:50:17 +0000 @@ -160,7 +160,7 @@ cd ..\src $(MAKE) $(MFLAGS) clean cd ..\lib-src - $(MAKE) $(MFLAGS) clean + $(MAKE) $(MFLAGS) clean make-docfile cd ..\lib $(MAKE) $(MFLAGS) clean all cd ..\src @@ -177,7 +177,7 @@ bootstrap-gmake: addsection cmdproxy $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lisp bootstrap-clean $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src clean - $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib-src clean + $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib-src clean make-docfile $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib clean all $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src bootstrap $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src bootstrap-clean === modified file 'src/ChangeLog' --- src/ChangeLog 2011-02-09 17:04:43 +0000 +++ src/ChangeLog 2011-02-09 20:50:17 +0000 @@ -1,3 +1,10 @@ +2011-02-09 Eli Zaretskii + + * makefile.w32-in (GLOBAL_SOURCES, SOME_MACHINE_OBJECTS, obj): New + macros. + (globals.h, gl-stamp): New targets. + (clean): Clean gl-stamp and globals.h. + 2011-02-09 Andreas Schwab * Makefile.in (gl-stamp): Create globals.h here. === modified file 'src/makefile.w32-in' --- src/makefile.w32-in 2011-02-04 15:32:34 +0000 +++ src/makefile.w32-in 2011-02-09 20:50:17 +0000 @@ -203,6 +203,38 @@ echo $(OBJ2) '\' >> buildobj.h echo '$(DQUOTE)' >> buildobj.h +GLOBAL_SOURCES = dosfns.c msdos.c \ + xterm.c xfns.c xmenu.c xselect.c xrdb.c xsmfns.c fringe.c image.c \ + fontset.c menu.c dbusbind.c \ + w32.c w32console.c w32fns.c w32heap.c w32inevt.c \ + w32menu.c w32proc.c w32reg.c w32select.c w32term.c w32xfns.c \ + font.c w32font.c w32uniscribe.c \ + dispnew.c frame.c scroll.c xdisp.c window.c bidi.c \ + charset.c coding.c category.c ccl.c character.c chartab.c \ + cm.c term.c terminal.c xfaces.c \ + emacs.c keyboard.c macros.c keymap.c sysdep.c \ + buffer.c filelock.c insdel.c marker.c \ + minibuf.c fileio.c dired.c filemode.c \ + cmds.c casetab.c casefiddle.c indent.c search.c regex.c undo.c \ + alloc.c data.c doc.c editfns.c callint.c \ + eval.c floatfns.c fns.c print.c lread.c \ + syntax.c bytecode.c \ + process.c callproc.c unexw32.c \ + region-cache.c sound.c atimer.c \ + doprnt.c intervals.c textprop.c composite.c md5.c +SOME_MACHINE_OBJECTS = dosfns.o msdos.o \ + xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o dbusbind.o +obj = $(GLOBAL_SOURCES:.c=.o) + +globals.h: gl-stamp + +gl-stamp: ../lib-src/$(BLD)/make-docfile.exe $(GLOBAL_SOURCES) + - $(DEL) gl-tmp + "../lib-src/$(BLD)/make-docfile" -d . -g $(SOME_MACHINE_OBJECTS) $(obj) > gl-tmp + cmd /c "fc /b gl-tmp globals.h >nul 2>&1 || $(CP) gl-tmp globals.h" + - $(DEL) gl-tmp + echo timestamp > $@ + bootstrap: bootstrap-emacs # @@ -279,7 +311,7 @@ - $(DEL) "s/*.h~" "m/*.h~" - $(DEL) $(COMPILER_TEMP_FILES) - $(DEL_TREE) $(OBJDIR) - - $(DEL) stamp_BLD + - $(DEL) stamp_BLD gl-stamp globals.h - $(DEL) buildobj.h distclean: cleanall ------------------------------------------------------------ revno: 103200 committer: Stefan Monnier branch nick: trunk timestamp: Wed 2011-02-09 13:59:55 -0500 message: * lisp/progmodes/sh-script.el (sh-font-lock-open-heredoc): Fix case of here-doc that immediately follows a comment. * .bzrignore: Ignore globals.h and related stamp. * test/indent/shell.sh: * test/indent/shell.rc: New files. diff: === modified file '.bzrignore' --- .bzrignore 2011-01-22 07:18:23 +0000 +++ .bzrignore 2011-02-09 18:59:55 +0000 @@ -83,3 +83,5 @@ src/temacs test/indent/*.new +* +src/globals.h +src/gl-stamp === modified file 'ChangeLog' --- ChangeLog 2011-02-09 01:40:01 +0000 +++ ChangeLog 2011-02-09 18:59:55 +0000 @@ -1,3 +1,7 @@ +2011-02-09 Stefan Monnier + + * .bzrignore: Ignore globals.h and related stamp. + 2011-02-09 Paul Eggert * lib/Makefile.in, lib/gnulib.mk: Regenerate. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-02-09 01:22:26 +0000 +++ lisp/ChangeLog 2011-02-09 18:59:55 +0000 @@ -1,3 +1,8 @@ +2011-02-09 Stefan Monnier + + * progmodes/sh-script.el (sh-font-lock-open-heredoc): Fix case + of here-doc that immediately follows a comment. + 2011-02-09 Deniz Dogan * net/rcirc.el (rcirc-ctcp-sender-PING): Simplifying. === modified file 'lisp/progmodes/sh-script.el' --- lisp/progmodes/sh-script.el 2011-02-05 19:46:47 +0000 +++ lisp/progmodes/sh-script.el 2011-02-09 18:59:55 +0000 @@ -948,12 +948,12 @@ ;; We're looking at <" - (if (or (nth 5 ppss) (> (count-lines start (point)) 1)) + (put-text-property (1- eol) eol 'syntax-table '(12))) ;">" + (if (or (nth 5 ppss) (> (count-lines start eol) 1)) ;; If the sh-escaped-line-re part of sh-here-doc-open-re has matched ;; several lines, make sure we refontify them together. ;; Furthermore, if (nth 5 ppss) is non-nil (i.e. the \n is @@ -961,7 +961,7 @@ ;; Don't bother fixing it now, but place a multiline property so ;; that when jit-lock-context-* refontifies the rest of the ;; buffer, it also refontifies the current line with it. - (put-text-property start (point) 'syntax-multiline t)) + (put-text-property start (1+ eol) 'syntax-multiline t)) (put-text-property eol (1+ eol) 'sh-here-doc-marker str) (prog1 sh-here-doc-syntax (goto-char (+ 2 start)))))) @@ -1083,33 +1083,33 @@ (defun sh-syntax-propertize-function (start end) (goto-char start) (sh-syntax-propertize-here-doc end) - (funcall - (syntax-propertize-rules + (funcall + (syntax-propertize-rules (sh-here-doc-open-re (2 (sh-font-lock-open-heredoc (match-beginning 0) (match-string 1) (match-beginning 2)))) ("\\s|" (0 (prog1 nil (sh-syntax-propertize-here-doc end)))) - ;; A `#' begins a comment when it is unquoted and at the - ;; beginning of a word. In the shell, words are separated by - ;; metacharacters. The list of special chars is taken from - ;; the single-unix spec of the shell command language (under - ;; `quoting') but with `$' removed. - ("[^|&;<>()`\\\"' \t\n]\\(#+\\)" (1 "_")) - ;; In a '...' the backslash is not escaping. - ("\\(\\\\\\)'" (1 (sh-font-lock-backslash-quote))) - ;; Make sure $@ and $? are correctly recognized as sexps. - ("\\$\\([?@]\\)" (1 "_")) - ;; Distinguish the special close-paren in `case'. - (")" (0 (sh-font-lock-paren (match-beginning 0)))) - ;; Highlight (possibly nested) subshells inside "" quoted - ;; regions correctly. + ;; A `#' begins a comment when it is unquoted and at the + ;; beginning of a word. In the shell, words are separated by + ;; metacharacters. The list of special chars is taken from + ;; the single-unix spec of the shell command language (under + ;; `quoting') but with `$' removed. + ("[^|&;<>()`\\\"' \t\n]\\(#+\\)" (1 "_")) + ;; In a '...' the backslash is not escaping. + ("\\(\\\\\\)'" (1 (sh-font-lock-backslash-quote))) + ;; Make sure $@ and $? are correctly recognized as sexps. + ("\\$\\([?@]\\)" (1 "_")) + ;; Distinguish the special close-paren in `case'. + (")" (0 (sh-font-lock-paren (match-beginning 0)))) + ;; Highlight (possibly nested) subshells inside "" quoted + ;; regions correctly. ("\"\\(?:\\(?:[^\\\"]\\|\\)*?[^\\]\\(?:\\\\\\\\\\)*\\)??\\(\\$(\\|`\\)" - (1 (ignore - ;; Save excursion because we want to also apply other - ;; syntax-propertize rules within the affected region. + (1 (ignore + ;; Save excursion because we want to also apply other + ;; syntax-propertize rules within the affected region. (if (nth 8 (syntax-ppss)) (goto-char (1+ (match-beginning 0))) - (save-excursion + (save-excursion (sh-font-lock-quoted-subshell end))))))) (point) end)) === modified file 'test/ChangeLog' --- test/ChangeLog 2011-01-27 23:45:04 +0000 +++ test/ChangeLog 2011-02-09 18:59:55 +0000 @@ -1,3 +1,8 @@ +2011-02-09 Stefan Monnier + + * indent/shell.sh: + * indent/shell.rc: New files. + 2011-01-27 Chong Yidong * automated/font-parse-tests.el: Move from === added file 'test/indent/shell.rc' --- test/indent/shell.rc 1970-01-01 00:00:00 +0000 +++ test/indent/shell.rc 2011-02-09 18:59:55 +0000 @@ -0,0 +1,30 @@ +#!/bin/rc + +if (foo) { + echo 1 +} +if not { + echo 2 +} + +if (foo) + echo 3 # KNOWN INDENT BUG +if not + echo 4 # KNOWN INDENT BUG + +switch ($a) { + case 3 + echo 4 + case 5 + echo 7 + for (i in a b c) { + echo $i + } + for (i in a b c) + echo "$i" # KNOWN INDENT BUG + echo titi + + case * + echo other +} + === added file 'test/indent/shell.sh' --- test/indent/shell.sh 1970-01-01 00:00:00 +0000 +++ test/indent/shell.sh 2011-02-09 18:59:55 +0000 @@ -0,0 +1,98 @@ +#!/bin/sh + +setlock -n /tmp/getmail.lock && echo getmail isn\'t running + +# adsgsdg + +foo () { + + bar () { + blilbi + } + + case toto + in a) hello # KNOWN INDENT BUG + ;; b) hi # KNOWN INDENT BUG + esac + + case $toto in + a) echo 1;; b) echo 2;; + c) echo 3;; + esac + + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=/\\1=''/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add + # quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + cat # KNOWN INDENT BUG + + case toto in + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + 5) + hello ;; + 3) hello $(adfad) + echo esac ;; # KNOWN INDENT BUG + 5) hello ;; + 4) hello ;& + 4) hello ;;& + 5) hello ;; + 5) hello ;; + esac + + echo "'" wfgfe + + #!/bin/bash + cat << EOF \ + | cat sadfsafd \ + sadfsafd "KNOWN INDENT BUG" \ + | tee -a bug.txt +asdfsaf +This is a test case for a bug in bash shell mode text highlighting +EOF + + cat < branch nick: emacs timestamp: Wed 2011-02-09 18:04:43 +0100 message: * src/Makefile.in (gl-stamp): Create globals.h here. (globals.h): Don't do it here. (mostlyclean): Clean globals.h and gl-stamp. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-02-09 00:44:29 +0000 +++ src/ChangeLog 2011-02-09 17:04:43 +0000 @@ -1,3 +1,9 @@ +2011-02-09 Andreas Schwab + + * Makefile.in (gl-stamp): Create globals.h here. + (globals.h): Don't do it here. + (mostlyclean): Clean globals.h and gl-stamp. + 2011-02-09 Paul Eggert * Makefile.in ($(otherobj)): Depend on globals.h. === modified file 'src/Makefile.in' --- src/Makefile.in 2011-02-09 00:44:29 +0000 +++ src/Makefile.in 2011-02-09 17:04:43 +0000 @@ -647,15 +647,15 @@ buildobj.h: Makefile echo "#define BUILDOBJ \"$(obj) $(otherobj) " "\"" > buildobj.h -globals.h: gl-stamp - cp gl-stamp globals.h +globals.h: gl-stamp; @true GLOBAL_SOURCES = $(base_obj:.o=.c) $(NS_OBJC_OBJ:.o=.m) gl-stamp: $(libsrc)/make-docfile$(EXEEXT) $(GLOBAL_SOURCES) @rm -f gl-tmp $(libsrc)/make-docfile -d $(srcdir) -g $(SOME_MACHINE_OBJECTS) $(obj) > gl-tmp - $(srcdir)/../move-if-change gl-tmp gl-stamp + $(srcdir)/../move-if-change gl-tmp globals.h + echo timestamp > $@ $(obj) $(otherobj): globals.h @@ -713,6 +713,7 @@ rm -f ../etc/DOC rm -f bootstrap-emacs$(EXEEXT) emacs-$(version)$(EXEEXT) rm -f buildobj.h + rm -f globals.h gl-stamp clean: mostlyclean rm -f emacs-*.*.*$(EXEEXT) emacs$(EXEEXT) -rm -rf $(DEPDIR) ------------------------------------------------------------ revno: 103198 author: Julien Danjou committer: Chong Yidong branch nick: trunk timestamp: Tue 2011-02-08 23:08:25 -0500 message: Fix tracking visibility in ERC. * lisp/erc/erc-track.el (erc-window-configuration-change): New function. This will allow to track buffer visibility when a command is finished to executed. Idea stolen from rcirc. (track): Put erc-window-configuration-change in window-configuration-change-hook. (erc-modified-channels-update): Remove erc-modified-channels-update from post-command-hook after update. diff: === modified file 'lisp/erc/ChangeLog' --- lisp/erc/ChangeLog 2011-01-31 23:54:50 +0000 +++ lisp/erc/ChangeLog 2011-02-09 04:08:25 +0000 @@ -1,3 +1,13 @@ +2011-02-07 Julien Danjou + + * erc-track.el (erc-window-configuration-change): New function. + This will allow to track buffer visibility when a command is + finished to executed. Idea stolen from rcirc. + (track): Put erc-window-configuration-change in + window-configuration-change-hook. + (erc-modified-channels-update): Remove + erc-modified-channels-update from post-command-hook after update. + 2011-01-31 Antoine Levitt (tiny change) * erc-track.el (track): Don't reset erc-modified-channels-object === modified file 'lisp/erc/erc-track.el' --- lisp/erc/erc-track.el 2011-01-31 23:54:50 +0000 +++ lisp/erc/erc-track.el 2011-02-09 04:08:25 +0000 @@ -653,7 +653,7 @@ (defadvice switch-to-buffer (after erc-update (&rest args) activate) (erc-modified-channels-update)) (add-hook 'window-configuration-change-hook - 'erc-modified-channels-update)) + 'erc-window-configuration-change)) (add-hook 'erc-insert-post-hook 'erc-track-modified-channels) (add-hook 'erc-disconnected-hook 'erc-modified-channels-update)) ;; enable the tracking keybindings @@ -675,7 +675,7 @@ (if (featurep 'xemacs) (ad-disable-advice 'switch-to-buffer 'after 'erc-update) (remove-hook 'window-configuration-change-hook - 'erc-modified-channels-update)) + 'erc-window-configuration-change)) (remove-hook 'erc-disconnected-hook 'erc-modified-channels-update) (remove-hook 'erc-insert-post-hook 'erc-track-modified-channels)) ;; disable the tracking keybindings @@ -730,6 +730,12 @@ ;;; Tracking the channel modifications +(defun erc-window-configuration-change () + (unless (minibuffer-window-active-p (minibuffer-window)) + ;; delay this until command has finished to make sure window is + ;; actually visible before clearing activity + (add-hook 'post-command-hook 'erc-modified-channels-update))) + (defvar erc-modified-channels-update-inside nil "Variable to prevent running `erc-modified-channels-update' multiple times. Without it, you cannot debug `erc-modified-channels-display', @@ -757,8 +763,9 @@ (erc-modified-channels-remove-buffer buffer)))) erc-modified-channels-alist) (when removed-channel - (erc-modified-channels-display) - (force-mode-line-update t))))) + (erc-modified-channels-display) + (force-mode-line-update t))) + (remove-hook 'post-command-hook 'erc-modified-channels-update))) (defvar erc-track-mouse-face (if (featurep 'xemacs) 'modeline-mousable