Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 100434. ------------------------------------------------------------ revno: 100434 committer: Glenn Morris branch nick: trunk timestamp: Mon 2010-05-24 21:25:15 -0700 message: Relocate NS_IMPL_GNUSTEP_TEMACS_LDFLAGS. * src/Makefile.in (@NS_IMPL_GNUSTEP_INC@, NS_IMPL_GNUSTEP_TEMACS_LDFLAGS): Move before TEMACS_LDFLAGS. (TEMACS_LDFLAGS): Use $NS_IMPL_GNUSTEP_TEMACS_LDFLAGS. (temacs${EXEEXT}): Do not use $NS_IMPL_GNUSTEP_TEMACS_LDFLAGS. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-05-25 04:17:52 +0000 +++ src/ChangeLog 2010-05-25 04:25:15 +0000 @@ -1,5 +1,10 @@ 2010-05-25 Glenn Morris + * Makefile.in (@NS_IMPL_GNUSTEP_INC@, NS_IMPL_GNUSTEP_TEMACS_LDFLAGS): + Move before TEMACS_LDFLAGS. + (TEMACS_LDFLAGS): Use $NS_IMPL_GNUSTEP_TEMACS_LDFLAGS. + (temacs${EXEEXT}): Do not use $NS_IMPL_GNUSTEP_TEMACS_LDFLAGS. + * Makefile.in (NOT_C_CODE): No longer define. (config.h): No longer include. === modified file 'src/Makefile.in' --- src/Makefile.in 2010-05-25 04:17:52 +0000 +++ src/Makefile.in 2010-05-25 04:25:15 +0000 @@ -111,8 +111,14 @@ ## which are only good with temacs. LD_SWITCH_SYSTEM_TEMACS=@LD_SWITCH_SYSTEM_TEMACS@ +## If NS_IMPL_GNUSTEP, some definitions and includes are expanded here. +@NS_IMPL_GNUSTEP_INC@ + +## This uses ${CONFIG_SYSTEM_LIBS} from @NS_IMPL_GNUSTEP_INC@. +NS_IMPL_GNUSTEP_TEMACS_LDFLAGS=@NS_IMPL_GNUSTEP_TEMACS_LDFLAGS@ + ## Flags to pass to ld only for temacs. -TEMACS_LDFLAGS = $(LD_SWITCH_SYSTEM) $(LD_SWITCH_SYSTEM_TEMACS) +TEMACS_LDFLAGS = $(LD_SWITCH_SYSTEM) $(LD_SWITCH_SYSTEM_TEMACS) $(NS_IMPL_GNUSTEP_TEMACS_LDFLAGS) ## $LDFLAGS, or empty if NS_IMPL_GNUSTEP (for some reason). TEMACS_LDFLAGS2 = @TEMACS_LDFLAGS2@ @@ -301,13 +307,6 @@ # ========================== start of cpp stuff ======================= /* From here on, comments must be done in C syntax. */ -/* If NS_IMPL_GNUSTEP, some definitions and includes are expanded here. */ -@NS_IMPL_GNUSTEP_INC@ - -/* FIXME move to LD_SWITCH_SYSTEM_TEMACS? - This uses ${CONFIG_SYSTEM_LIBS}, presumably set by the above include. */ -NS_IMPL_GNUSTEP_TEMACS_LDFLAGS=@NS_IMPL_GNUSTEP_TEMACS_LDFLAGS@ - /* 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 @@ -644,8 +643,7 @@ #define YMF_PASS_LDFLAGS(flags) @YMF_PASS_LDFLAGS@ temacs${EXEEXT}: $(START_FILES) stamp-oldxmenu ${obj} ${otherobj} prefix-args${EXEEXT} - $(LD) YMF_PASS_LDFLAGS ( ${TEMACS_LDFLAGS} \ - ${NS_IMPL_GNUSTEP_TEMACS_LDFLAGS} ) \ + $(LD) YMF_PASS_LDFLAGS ( ${TEMACS_LDFLAGS} ) \ ${TEMACS_LDFLAGS2} \ -o temacs ${START_FILES} ${obj} ${otherobj} ${LIBES} ------------------------------------------------------------ revno: 100433 committer: Glenn Morris branch nick: trunk timestamp: Mon 2010-05-24 21:17:52 -0700 message: Do not include config.h in src/Makefile.in. * src/Makefile.in (NOT_C_CODE): No longer define. (config.h): No longer include. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-05-25 03:53:12 +0000 +++ src/ChangeLog 2010-05-25 04:17:52 +0000 @@ -1,5 +1,8 @@ 2010-05-25 Glenn Morris + * Makefile.in (NOT_C_CODE): No longer define. + (config.h): No longer include. + * Makefile.in (LD_SWITCH_SYSTEM_TEMACS): Move definition after some variables it may reference. === modified file 'src/Makefile.in' --- src/Makefile.in 2010-05-25 03:53:12 +0000 +++ src/Makefile.in 2010-05-25 04:17:52 +0000 @@ -301,9 +301,6 @@ # ========================== start of cpp stuff ======================= /* From here on, comments must be done in C syntax. */ -#define NOT_C_CODE -#include "config.h" - /* If NS_IMPL_GNUSTEP, some definitions and includes are expanded here. */ @NS_IMPL_GNUSTEP_INC@ ------------------------------------------------------------ revno: 100432 committer: Glenn Morris branch nick: trunk timestamp: Mon 2010-05-24 20:56:27 -0700 message: Regenerate configure. diff: === modified file 'configure' --- configure 2010-05-22 11:26:01 +0000 +++ configure 2010-05-25 03:56:27 +0000 @@ -820,7 +820,6 @@ PRE_ALLOC_OBJ POST_ALLOC_OBJ LD_SWITCH_SYSTEM_TEMACS -LD_SWITCH_SYSTEM_EXTRA YMF_PASS_LDFLAGS LINKER LIB_GCC @@ -5930,16 +5929,17 @@ ac_link="$ac_link $LD_SWITCH_SYSTEM" -## This is fun. Some settings of LD_SWITCH_SYSTEM reference -## LD_SWITCH_X_SITE_AUX, which has not been defined yet. When using -## cpp, it was expanded to null. Thus LD_SWITCH_SYSTEM had different -## values in configure and the Makefiles. How helpful. -## FIXME why not use LD_SWITCH_SYSTEM_TEMACS (or somesuch) instead? +## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_AUX, +## which has not been defined yet. When this was handled with cpp, +## it was expanded to null when configure sourced the s/*.h file. +## Thus LD_SWITCH_SYSTEM had different values in configure and the Makefiles. +## FIXME it would be cleaner to put this in LD_SWITCH_SYSTEM_TEMACS +## (or somesuch), but because it is supposed to go at the _front_ +## of LD_SWITCH_SYSTEM, we cannot do that in exactly the same way. +## Compare with the gnu-linux case below, which added to the end +## of LD_SWITCH_SYSTEM, and so can instead go at the front of +## LD_SWITCH_SYSTEM_TEMACS. case "$opsys" in - gnu-linux) - ## LD_SWITCH_X_SITE_AUX is a -R option saying where to find X at run-time. - LD_SWITCH_SYSTEM="$LD_SWITCH_SYSTEM \$(LD_SWITCH_X_SITE_AUX)" ;; - netbsd|openbsd) ## _AUX_RPATH is like _AUX, but uses -rpath instead of -R. LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_AUX_RPATH) $LD_SWITCH_SYSTEM" ;; @@ -26595,42 +26595,47 @@ aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;; darwin) - ## The -headerpad option tells ld (see man page) to leave room at the - ## end of the header for adding load commands. Needed for dumping. - ## 0x690 is the total size of 30 segment load commands (at 56 - ## each); under Cocoa 31 commands are required. - if test "$HAVE_NS" = "yes"; then - libs_nsgui="-framework AppKit" - headerpad_extra=6C8 - else - libs_nsgui= - headerpad_extra=690 - fi - LD_SWITCH_SYSTEM_TEMACS="-prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra" - ;; + ## The -headerpad option tells ld (see man page) to leave room at the + ## end of the header for adding load commands. Needed for dumping. + ## 0x690 is the total size of 30 segment load commands (at 56 + ## each); under Cocoa 31 commands are required. + if test "$HAVE_NS" = "yes"; then + libs_nsgui="-framework AppKit" + headerpad_extra=6C8 + else + libs_nsgui= + headerpad_extra=690 + fi + LD_SWITCH_SYSTEM_TEMACS="-prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra" + + ## This is here because src/Makefile.in did some extra fiddling around + ## with LD_SWITCH_SYSTEM. The cpp logic was: + ## #ifndef LD_SWITCH_SYSTEM + ## #if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF))) + ## Since all the *bsds define LD_SWITCH_SYSTEM, this simplifies to: + ## not using gcc, darwin system not on an alpha (ie darwin, since + ## darwin + alpha does not occur). + ## Because this was done in src/Makefile.in, the resulting part of + ## LD_SWITCH_SYSTEM was not used in configure (ie, in ac_link). + ## It therefore seems cleaner to put this in LD_SWITCH_SYSTEM_TEMACS, + ## rather than LD_SWITCH_SYSTEM. + test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \ + LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS" + ;; + + ## LD_SWITCH_X_SITE_AUX is a -R option saying where to find X at run-time. + ## When handled by cpp, this was in LD_SWITCH_SYSTEM. However, at + ## the point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_AUX + ## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM + ## had different values in configure (in ac_link) and src/Makefile.in. + ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS. + gnu-linux) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_AUX)" ;; *) LD_SWITCH_SYSTEM_TEMACS= ;; esac -## This exists because src/Makefile.in did some extra fiddling around -## with LD_SWITCH_SYSTEM. The cpp logic was: -## #ifndef LD_SWITCH_SYSTEM -## #if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF))) -## Since all the *bsds define LD_SWITCH_SYSTEM, this simplifies to: -## not using gcc, darwin system not on an alpha (ie darwin, since -## darwin + alpha does not occur). -## Note that unlike L_S_S, this is not used in ac_link. -if test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \ - test "$opsys" = "darwin"; then - LD_SWITCH_SYSTEM_EXTRA="-X" -else - LD_SWITCH_SYSTEM_EXTRA= -fi - - - LINKER= ORDINARY_LINK= case "$opsys" in @@ -28154,7 +28159,6 @@ done # Build src/Makefile from ${srcdir}/src/Makefile.c -# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c # This must be done after src/config.h is built, since we rely on that file. echo creating src/epaths.h ------------------------------------------------------------ revno: 100431 committer: Glenn Morris branch nick: trunk timestamp: Mon 2010-05-24 20:53:12 -0700 message: Move some stuff from LD_SWITCH_SYSTEM to LD_SWITCH_SYSTEM_TEMACS. * configure.in (LD_SWITCH_SYSTEM): Move some gnu-linux stuff... (LD_SWITCH_SYSTEM_TEMACS): ... to here. * src/Makefile.in (LD_SWITCH_SYSTEM_TEMACS): Move definition after some variables it may reference. diff: === modified file 'ChangeLog' --- ChangeLog 2010-05-25 03:46:15 +0000 +++ ChangeLog 2010-05-25 03:53:12 +0000 @@ -1,5 +1,8 @@ 2010-05-25 Glenn Morris + * configure.in (LD_SWITCH_SYSTEM): Move some gnu-linux stuff... + (LD_SWITCH_SYSTEM_TEMACS): ... to here. + * configure.in (LD_SWITCH_SYSTEM_EXTRA): Remove. (LD_SWITCH_SYSTEM_TEMACS): Put darwin stuff from LD_SWITCH_SYSTEM_EXTRA here instead. === modified file 'configure.in' --- configure.in 2010-05-25 03:46:15 +0000 +++ configure.in 2010-05-25 03:53:12 +0000 @@ -955,16 +955,17 @@ ac_link="$ac_link $LD_SWITCH_SYSTEM" -## This is fun. Some settings of LD_SWITCH_SYSTEM reference -## LD_SWITCH_X_SITE_AUX, which has not been defined yet. When using -## cpp, it was expanded to null. Thus LD_SWITCH_SYSTEM had different -## values in configure and the Makefiles. How helpful. -## FIXME why not use LD_SWITCH_SYSTEM_TEMACS (or somesuch) instead? +## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_AUX, +## which has not been defined yet. When this was handled with cpp, +## it was expanded to null when configure sourced the s/*.h file. +## Thus LD_SWITCH_SYSTEM had different values in configure and the Makefiles. +## FIXME it would be cleaner to put this in LD_SWITCH_SYSTEM_TEMACS +## (or somesuch), but because it is supposed to go at the _front_ +## of LD_SWITCH_SYSTEM, we cannot do that in exactly the same way. +## Compare with the gnu-linux case below, which added to the end +## of LD_SWITCH_SYSTEM, and so can instead go at the front of +## LD_SWITCH_SYSTEM_TEMACS. case "$opsys" in - gnu-linux) - ## LD_SWITCH_X_SITE_AUX is a -R option saying where to find X at run-time. - LD_SWITCH_SYSTEM="$LD_SWITCH_SYSTEM \$(LD_SWITCH_X_SITE_AUX)" ;; - netbsd|openbsd) ## _AUX_RPATH is like _AUX, but uses -rpath instead of -R. LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_AUX_RPATH) $LD_SWITCH_SYSTEM" ;; @@ -3272,33 +3273,41 @@ aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;; darwin) - ## The -headerpad option tells ld (see man page) to leave room at the - ## end of the header for adding load commands. Needed for dumping. - ## 0x690 is the total size of 30 segment load commands (at 56 - ## each); under Cocoa 31 commands are required. - if test "$HAVE_NS" = "yes"; then - libs_nsgui="-framework AppKit" - headerpad_extra=6C8 - else - libs_nsgui= - headerpad_extra=690 - fi - LD_SWITCH_SYSTEM_TEMACS="-prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra" + ## The -headerpad option tells ld (see man page) to leave room at the + ## end of the header for adding load commands. Needed for dumping. + ## 0x690 is the total size of 30 segment load commands (at 56 + ## each); under Cocoa 31 commands are required. + if test "$HAVE_NS" = "yes"; then + libs_nsgui="-framework AppKit" + headerpad_extra=6C8 + else + libs_nsgui= + headerpad_extra=690 + fi + LD_SWITCH_SYSTEM_TEMACS="-prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra" + + ## This is here because src/Makefile.in did some extra fiddling around + ## with LD_SWITCH_SYSTEM. The cpp logic was: + ## #ifndef LD_SWITCH_SYSTEM + ## #if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF))) + ## Since all the *bsds define LD_SWITCH_SYSTEM, this simplifies to: + ## not using gcc, darwin system not on an alpha (ie darwin, since + ## darwin + alpha does not occur). + ## Because this was done in src/Makefile.in, the resulting part of + ## LD_SWITCH_SYSTEM was not used in configure (ie, in ac_link). + ## It therefore seems cleaner to put this in LD_SWITCH_SYSTEM_TEMACS, + ## rather than LD_SWITCH_SYSTEM. + test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \ + LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS" + ;; - ## This is here because src/Makefile.in did some extra fiddling around - ## with LD_SWITCH_SYSTEM. The cpp logic was: - ## #ifndef LD_SWITCH_SYSTEM - ## #if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF))) - ## Since all the *bsds define LD_SWITCH_SYSTEM, this simplifies to: - ## not using gcc, darwin system not on an alpha (ie darwin, since - ## darwin + alpha does not occur). - ## Because this was done in src/Makefile.in, the resulting part of - ## LD_SWITCH_SYSTEM was not used in configure (ie, in ac_link). - ## It therefore seems cleaner to put this in LD_SWITCH_SYSTEM_TEMACS, - ## rather than LD_SWITCH_SYSTEM. - test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \ - LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS" - ;; + ## LD_SWITCH_X_SITE_AUX is a -R option saying where to find X at run-time. + ## When handled by cpp, this was in LD_SWITCH_SYSTEM. However, at + ## the point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_AUX + ## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM + ## had different values in configure (in ac_link) and src/Makefile.in. + ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS. + gnu-linux) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_AUX)" ;; *) LD_SWITCH_SYSTEM_TEMACS= ;; esac @@ -3783,7 +3792,6 @@ done # Build src/Makefile from ${srcdir}/src/Makefile.c -# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c # This must be done after src/config.h is built, since we rely on that file. echo creating src/epaths.h === modified file 'src/ChangeLog' --- src/ChangeLog 2010-05-25 03:46:15 +0000 +++ src/ChangeLog 2010-05-25 03:53:12 +0000 @@ -1,5 +1,8 @@ 2010-05-25 Glenn Morris + * Makefile.in (LD_SWITCH_SYSTEM_TEMACS): Move definition after some + variables it may reference. + * Makefile.in (LD_SWITCH_SYSTEM_EXTRA): Remove. (TEMACS_LDFLAGS): Remove LD_SWITCH_SYSTEM_EXTRA. === modified file 'src/Makefile.in' --- src/Makefile.in 2010-05-25 03:46:15 +0000 +++ src/Makefile.in 2010-05-25 03:53:12 +0000 @@ -96,12 +96,6 @@ ## 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@ @@ -111,6 +105,12 @@ ## System-specific LDFLAGS. LD_SWITCH_SYSTEM=@LD_SWITCH_SYSTEM@ +## 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@ + ## Flags to pass to ld only for temacs. TEMACS_LDFLAGS = $(LD_SWITCH_SYSTEM) $(LD_SWITCH_SYSTEM_TEMACS) ------------------------------------------------------------ revno: 100430 committer: Glenn Morris branch nick: trunk timestamp: Mon 2010-05-24 20:46:15 -0700 message: Remove LD_SWITCH_SYSTEM_EXTRA. * configure.in (LD_SWITCH_SYSTEM_EXTRA): Remove. (LD_SWITCH_SYSTEM_TEMACS): Put darwin stuff from LD_SWITCH_SYSTEM_EXTRA here instead. * src/Makefile.in (LD_SWITCH_SYSTEM_EXTRA): Remove. (TEMACS_LDFLAGS): Remove LD_SWITCH_SYSTEM_EXTRA. * msdos/sed1v2.inp (LD_SWITCH_SYSTEM_EXTRA): No longer present. diff: === modified file 'ChangeLog' --- ChangeLog 2010-05-24 11:35:41 +0000 +++ ChangeLog 2010-05-25 03:46:15 +0000 @@ -1,3 +1,9 @@ +2010-05-25 Glenn Morris + + * configure.in (LD_SWITCH_SYSTEM_EXTRA): Remove. + (LD_SWITCH_SYSTEM_TEMACS): Put darwin stuff from LD_SWITCH_SYSTEM_EXTRA + here instead. + 2010-05-24 Romain Francoise * make-dist: Look for version in src/emacs.c. === modified file 'configure.in' --- configure.in 2010-05-21 16:31:45 +0000 +++ configure.in 2010-05-25 03:46:15 +0000 @@ -3284,6 +3284,20 @@ headerpad_extra=690 fi LD_SWITCH_SYSTEM_TEMACS="-prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra" + + ## This is here because src/Makefile.in did some extra fiddling around + ## with LD_SWITCH_SYSTEM. The cpp logic was: + ## #ifndef LD_SWITCH_SYSTEM + ## #if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF))) + ## Since all the *bsds define LD_SWITCH_SYSTEM, this simplifies to: + ## not using gcc, darwin system not on an alpha (ie darwin, since + ## darwin + alpha does not occur). + ## Because this was done in src/Makefile.in, the resulting part of + ## LD_SWITCH_SYSTEM was not used in configure (ie, in ac_link). + ## It therefore seems cleaner to put this in LD_SWITCH_SYSTEM_TEMACS, + ## rather than LD_SWITCH_SYSTEM. + test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \ + LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS" ;; *) LD_SWITCH_SYSTEM_TEMACS= ;; @@ -3291,23 +3305,6 @@ AC_SUBST(LD_SWITCH_SYSTEM_TEMACS) -## This exists because src/Makefile.in did some extra fiddling around -## with LD_SWITCH_SYSTEM. The cpp logic was: -## #ifndef LD_SWITCH_SYSTEM -## #if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF))) -## Since all the *bsds define LD_SWITCH_SYSTEM, this simplifies to: -## not using gcc, darwin system not on an alpha (ie darwin, since -## darwin + alpha does not occur). -## Note that unlike L_S_S, this is not used in ac_link. -if test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \ - test "$opsys" = "darwin"; then - LD_SWITCH_SYSTEM_EXTRA="-X" -else - LD_SWITCH_SYSTEM_EXTRA= -fi -AC_SUBST(LD_SWITCH_SYSTEM_EXTRA) - - LINKER= ORDINARY_LINK= case "$opsys" in === modified file 'msdos/ChangeLog' --- msdos/ChangeLog 2010-05-21 00:48:14 +0000 +++ msdos/ChangeLog 2010-05-25 03:46:15 +0000 @@ -1,3 +1,7 @@ +2010-05-25 Glenn Morris + + * sed1v2.inp (LD_SWITCH_SYSTEM_EXTRA): No longer present. + 2010-05-21 Glenn Morris * sed1v2.inp(@ns_frag@): Edit to nothing. === modified file 'msdos/sed1v2.inp' --- msdos/sed1v2.inp 2010-05-21 00:48:14 +0000 +++ msdos/sed1v2.inp 2010-05-25 03:46:15 +0000 @@ -51,7 +51,6 @@ /^LD_SWITCH_X_SITE_AUX *=/s/@LD_SWITCH_X_SITE_AUX@// /^LD_SWITCH_X_SITE_AUX_RPATH *=/s/@LD_SWITCH_X_SITE_AUX_RPATH@// /^LD_SWITCH_SYSTEM *=/s/@LD_SWITCH_SYSTEM@// -/^LD_SWITCH_SYSTEM_EXTRA *=/s/@LD_SWITCH_SYSTEM_EXTRA@// /^TEMACS_LDFLAGS2 *=/s/@TEMACS_LDFLAGS2@/$(LDFLAGS)/ /^LIBS_SYSTEM *=/s/@LIBS_SYSTEM@// /^LIB_GCC *=/s/@LIB_GCC@/-Lgcc/ === modified file 'src/ChangeLog' --- src/ChangeLog 2010-05-25 01:03:44 +0000 +++ src/ChangeLog 2010-05-25 03:46:15 +0000 @@ -1,3 +1,8 @@ +2010-05-25 Glenn Morris + + * Makefile.in (LD_SWITCH_SYSTEM_EXTRA): Remove. + (TEMACS_LDFLAGS): Remove LD_SWITCH_SYSTEM_EXTRA. + 2010-05-25 Kenichi Handa * dispextern.h (struct composition_it): New members rule_idx and === modified file 'src/Makefile.in' --- src/Makefile.in 2010-05-21 16:31:45 +0000 +++ src/Makefile.in 2010-05-25 03:46:15 +0000 @@ -110,10 +110,9 @@ ## 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) +TEMACS_LDFLAGS = $(LD_SWITCH_SYSTEM) $(LD_SWITCH_SYSTEM_TEMACS) ## $LDFLAGS, or empty if NS_IMPL_GNUSTEP (for some reason). TEMACS_LDFLAGS2 = @TEMACS_LDFLAGS2@ ------------------------------------------------------------ revno: 100429 committer: Glenn Morris branch nick: trunk timestamp: Mon 2010-05-24 20:38:41 -0700 message: * net/rcirc.el (rcirc-default-user-name, rcirc-default-full-name): Add :version. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-05-25 03:35:31 +0000 +++ lisp/ChangeLog 2010-05-25 03:38:41 +0000 @@ -1,3 +1,8 @@ +2010-05-25 Glenn Morris + + * net/rcirc.el (rcirc-default-user-name, rcirc-default-full-name): + Add :version. + 2010-05-25 Ryan Yeske * net/rcirc.el (rcirc-server-alist): Add :pass. === modified file 'lisp/net/rcirc.el' --- lisp/net/rcirc.el 2010-05-25 03:35:31 +0000 +++ lisp/net/rcirc.el 2010-05-25 03:38:41 +0000 @@ -1,6 +1,7 @@ ;;; rcirc.el --- default, simple IRC client. -;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 +;; Free Software Foundation, Inc. ;; Author: Ryan Yeske ;; URL: http://www.nongnu.org/rcirc @@ -115,11 +116,13 @@ (defcustom rcirc-default-user-name "user" "Your user name sent to the server when connecting." + :version "24.1" ; changed default :type 'string :group 'rcirc) (defcustom rcirc-default-full-name "unknown" "The full name sent to the server when connecting." + :version "24.1" ; changed default :type 'string :group 'rcirc) ------------------------------------------------------------ revno: 100428 author: Ryan Yeske committer: Glenn Morris branch nick: trunk timestamp: Mon 2010-05-24 20:35:31 -0700 message: rcirc update. * lisp/net/rcirc.el (rcirc-server-alist): Add :pass. (rcirc-default-user-name): Change to "user". (rcirc-default-full-name): Change to "unknown". (rcirc-user-name-history): Add variable. (rcirc): When prompting for connection paramaters, also prompt for username and password. (rcirc-connect): Take a PASS argument. If PASS is non-nil, send value to server when connecting. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-05-25 02:32:40 +0000 +++ lisp/ChangeLog 2010-05-25 03:35:31 +0000 @@ -1,3 +1,14 @@ +2010-05-25 Ryan Yeske + + * net/rcirc.el (rcirc-server-alist): Add :pass. + (rcirc-default-user-name): Change to "user". + (rcirc-default-full-name): Change to "unknown". + (rcirc-user-name-history): Add variable. + (rcirc): When prompting for connection paramaters, also prompt for + username and password. + (rcirc-connect): Take a PASS argument. If PASS is non-nil, send + value to server when connecting. + 2010-05-25 Stefan Monnier * emacs-lisp/smie.el (smie-set-prec2tab): Check override before use. === modified file 'lisp/net/rcirc.el' --- lisp/net/rcirc.el 2010-05-25 02:11:08 +0000 +++ lisp/net/rcirc.el 2010-05-25 03:35:31 +0000 @@ -85,6 +85,10 @@ VALUE must be a string. If absent, `rcirc-default-full-name' is used. +`:pass' + +VALUE must be a string. + `:channels' VALUE must be a list of strings describing which channels to join @@ -95,6 +99,7 @@ (:port integer) (:user-name string) (:full-name string) + (:pass string) (:channels (repeat string))))) :group 'rcirc) @@ -108,14 +113,12 @@ :type 'string :group 'rcirc) -(defcustom rcirc-default-user-name (user-login-name) +(defcustom rcirc-default-user-name "user" "Your user name sent to the server when connecting." :type 'string :group 'rcirc) -(defcustom rcirc-default-full-name (if (string= (user-full-name) "") - rcirc-default-user-name - (user-full-name)) +(defcustom rcirc-default-full-name "unknown" "The full name sent to the server when connecting." :type 'string :group 'rcirc) @@ -369,6 +372,9 @@ (defvar rcirc-nick-name-history nil "History variable for \\[rcirc] call.") +(defvar rcirc-user-name-history nil + "History variable for \\[rcirc] call.") + ;;;###autoload (defun rcirc (arg) "Connect to all servers in `rcirc-server-alist'. @@ -393,6 +399,12 @@ (or (plist-get server-plist :nick) rcirc-default-nick) 'rcirc-nick-name-history)) + (user-name (read-string "IRC Username: " + (or (plist-get server-plist :user-name) + rcirc-default-user-name) + 'rcirc-user-name-history)) + (pass (read-passwd "IRC Password: " nil + (plist-get server-plist :pass))) (channels (split-string (read-string "IRC Channels: " (mapconcat 'identity @@ -400,7 +412,7 @@ :channels) " ")) "[, ]+" t))) - (rcirc-connect server port nick rcirc-default-user-name + (rcirc-connect server port nick user-name pass rcirc-default-full-name channels)) ;; connect to servers in `rcirc-server-alist' @@ -411,6 +423,7 @@ (port (or (plist-get (cdr c) :port) rcirc-default-port)) (user-name (or (plist-get (cdr c) :user-name) rcirc-default-user-name)) + (pass (plist-get (cdr c) :pass)) (full-name (or (plist-get (cdr c) :full-name) rcirc-default-full-name)) (channels (plist-get (cdr c) :channels))) @@ -421,7 +434,7 @@ (setq connected p))) (if (not connected) (condition-case e - (rcirc-connect server port nick user-name + (rcirc-connect server port nick user-name pass full-name channels) (quit (message "Quit connecting to %s" server))) (with-current-buffer (process-buffer connected) @@ -453,8 +466,8 @@ (defvar rcirc-process nil) ;;;###autoload -(defun rcirc-connect (server &optional port nick user-name full-name - startup-channels) +(defun rcirc-connect (server &optional port nick user-name pass + full-name startup-channels) (save-excursion (message "Connecting to %s..." server) (let* ((inhibit-eol-conversion) @@ -503,10 +516,11 @@ (add-hook 'auto-save-hook 'rcirc-log-write) ;; identify + (when pass + (rcirc-send-string process (concat "PASS " pass))) (rcirc-send-string process (concat "NICK " nick)) (rcirc-send-string process (concat "USER " user-name - " hostname servername :" - full-name)) + " 0 * :" full-name)) ;; setup ping timer if necessary (unless rcirc-keepalive-timer ------------------------------------------------------------ revno: 100427 committer: Stefan Monnier branch nick: trunk timestamp: Mon 2010-05-24 22:32:40 -0400 message: * emacs-lisp/smie.el (smie-set-prec2tab): Check override before use. (smie-merge-prec2s): Pass the tables as separate args. (smie-bnf-precedence-table): Adjust call accordingly. (smie-prec2-levels): Set levels at the end. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-05-25 02:11:08 +0000 +++ lisp/ChangeLog 2010-05-25 02:32:40 +0000 @@ -1,5 +1,10 @@ 2010-05-25 Stefan Monnier + * emacs-lisp/smie.el (smie-set-prec2tab): Check override before use. + (smie-merge-prec2s): Pass the tables as separate args. + (smie-bnf-precedence-table): Adjust call accordingly. + (smie-prec2-levels): Set levels at the end. + Replace Lisp calls to delete-backward-char by delete-char. * bs.el, expand.el, ido.el, image-dired.el, lpr.el, pcomplete.el, skeleton.el, term.el, time.el, wid-edit.el, woman.el, === modified file 'lisp/emacs-lisp/smie.el' --- lisp/emacs-lisp/smie.el 2010-05-18 19:24:24 +0000 +++ lisp/emacs-lisp/smie.el 2010-05-25 02:32:40 +0000 @@ -72,7 +72,7 @@ (let* ((key (cons x y)) (old (gethash key table))) (if (and old (not (eq old val))) - (if (gethash key override) + (if (and override (gethash key override)) ;; FIXME: The override is meant to resolve ambiguities, ;; but it also hides real conflicts. It would be great to ;; be able to distinguish the two cases so that overrides @@ -104,7 +104,7 @@ (smie-set-prec2tab prec2-table other-op op op1))))))) prec2-table)) -(defun smie-merge-prec2s (tables) +(defun smie-merge-prec2s (&rest tables) (if (null (cdr tables)) (car tables) (let ((prec2 (make-hash-table :test 'equal))) @@ -121,8 +121,8 @@ (first-nts-table ()) (last-nts-table ()) (prec2 (make-hash-table :test 'equal)) - (override (smie-merge-prec2s - (mapcar 'smie-precs-precedence-table precs))) + (override (apply 'smie-merge-prec2s + (mapcar 'smie-precs-precedence-table precs))) again) (dolist (rules bnf) (let ((nt (car rules)) @@ -234,7 +234,7 @@ (to (cdar eqs))) (setq eqs (cdr eqs)) (if (eq to from) - (debug) ;Can it happen? + nil ;Nothing to do. (dolist (other-eq eqs) (if (eq from (cdr other-eq)) (setcdr other-eq to)) (when (eq from (car other-eq)) @@ -271,16 +271,20 @@ (incf i 10)) ;; Propagate equalities back to their source. (dolist (eq (nreverse eqs)) - (assert (null (caar eq))) + (assert (or (null (caar eq)) (eq (car eq) (cdr eq)))) (setcar (car eq) (cadr eq))) ;; Finally, fill in the remaining vars (which only appeared on the ;; right side of the < constraints). - ;; Tho leaving them at nil is not a bad choice, since it makes - ;; it clear that these don't bind at all. - ;; (dolist (x table) - ;; (unless (nth 1 x) (setf (nth 1 x) i)) - ;; (unless (nth 2 x) (setf (nth 2 x) i))) - ) + (dolist (x table) + ;; When both sides are nil, it means this operator binds very + ;; very tight, but it's still just an operator, so we give it + ;; the highest precedence. + ;; OTOH if only one side is nil, it usually means it's like an + ;; open-paren, which is very important for indentation purposes, + ;; so we keep it nil, to make it easier to recognize. + (unless (or (nth 1 x) (nth 2 x)) + (setf (nth 1 x) i) + (setf (nth 2 x) i)))) table)) ;;; Parsing using a precedence level table. ------------------------------------------------------------ revno: 100426 committer: Stefan Monnier branch nick: trunk timestamp: Mon 2010-05-24 22:11:08 -0400 message: Replace Lisp calls to delete-backward-char by delete-char. * bs.el, expand.el, ido.el, image-dired.el, lpr.el, pcomplete.el, skeleton.el, term.el, time.el, wid-edit.el, woman.el, calc/calc-graph.el, calc/calc-help.el, calc/calc-incom.el, calc/calc.el, emacs-cl-extra.el, emacs-cl-loaddefs.el, emulation/cua-rect.el, emulation/viper-ex.el, eshell/esh-test.el, eshell/eshell.el, gnus/gnus-uu.el, gnus/nndoc.el, gnus/nnrss.el, gnus/rfc2047.el, gnus/utf7.el, international/utf-7.el, language/ethio-util.el, mh-e/mh-alias.el, mh-e/mh-search.el, net/imap.el, net/rcirc.el, obsolete/complete.el, play/decipher.el, progmodes/ada-mode.el, progmodes/cc-awk.el, progmodes/dcl-mode.el, progmodes/ps-mode.el, progmodes/verilog-mode.el, progmodes/vhdl-mode.el, textmodes/bibtex.el, textmodes/fill.el, textmodes/reftex-auc.el, textmodes/rst.el, textmodes/sgml-mode.el, textmodes/table.el, textmodes/texinfmt.el: Replace Lisp calls to delete-backward-char by calls to delete-char. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-05-25 01:25:08 +0000 +++ lisp/ChangeLog 2010-05-25 02:11:08 +0000 @@ -1,3 +1,22 @@ +2010-05-25 Stefan Monnier + + Replace Lisp calls to delete-backward-char by delete-char. + * bs.el, expand.el, ido.el, image-dired.el, lpr.el, pcomplete.el, + skeleton.el, term.el, time.el, wid-edit.el, woman.el, + calc/calc-graph.el, calc/calc-help.el, calc/calc-incom.el, + calc/calc.el, emacs-cl-extra.el, emacs-cl-loaddefs.el, + emulation/cua-rect.el, emulation/viper-ex.el, eshell/esh-test.el, + eshell/eshell.el, gnus/gnus-uu.el, gnus/nndoc.el, gnus/nnrss.el, + gnus/rfc2047.el, gnus/utf7.el, international/utf-7.el, + language/ethio-util.el, mh-e/mh-alias.el, mh-e/mh-search.el, + net/imap.el, net/rcirc.el, obsolete/complete.el, play/decipher.el, + progmodes/ada-mode.el, progmodes/cc-awk.el, progmodes/dcl-mode.el, + progmodes/ps-mode.el, progmodes/verilog-mode.el, + progmodes/vhdl-mode.el, textmodes/bibtex.el, textmodes/fill.el, + textmodes/reftex-auc.el, textmodes/rst.el, textmodes/sgml-mode.el, + textmodes/table.el, textmodes/texinfmt.el: Replace Lisp calls to + delete-backward-char by calls to delete-char. + 2010-05-25 Kenichi Handa * language/hebrew.el (hebrew-shape-gstring): New function. === modified file 'lisp/bs.el' --- lisp/bs.el 2010-01-13 08:35:10 +0000 +++ lisp/bs.el 2010-05-25 02:11:08 +0000 @@ -1152,7 +1152,7 @@ (dolist (buffer list) (bs--insert-one-entry buffer) (insert "\n")) - (delete-backward-char 1) + (delete-char -1) (bs--set-window-height) (bs--goto-current-buffer) (font-lock-fontify-buffer) === modified file 'lisp/calc/calc-graph.el' --- lisp/calc/calc-graph.el 2010-04-29 02:38:12 +0000 +++ lisp/calc/calc-graph.el 2010-05-25 02:11:08 +0000 @@ -433,7 +433,7 @@ (while (memq (preceding-char) '(?\s ?\t)) (forward-char -1)) (if (eq (preceding-char) ?\,) - (delete-backward-char 1)))) + (delete-char -1)))) (with-current-buffer calcbuf (setq cache-env (list calc-angle-mode calc-complex-mode === modified file 'lisp/calc/calc-help.el' --- lisp/calc/calc-help.el 2010-04-17 02:47:25 +0000 +++ lisp/calc/calc-help.el 2010-05-25 02:11:08 +0000 @@ -128,7 +128,7 @@ (dig2 (char-after (match-beginning 3)))) (delete-region (match-end 1) (match-end 0)) (goto-char (match-beginning 1)) - (delete-backward-char 1) + (delete-char -1) (delete-char 5) (insert (format "%c .. %c" (min dig1 dig2) (max dig1 dig2))))) (goto-char (point-min))))) === modified file 'lisp/calc/calc-incom.el' --- lisp/calc/calc-incom.el 2010-01-13 08:35:10 +0000 +++ lisp/calc/calc-incom.el 2010-05-25 02:11:08 +0000 @@ -176,9 +176,9 @@ (defun calc-digit-dots () (if (eq calc-prev-char ?.) (progn - (delete-backward-char 1) + (delete-char -1) (if (calc-minibuffer-contains ".*\\.\\'") - (delete-backward-char 1)) + (delete-char -1)) (setq calc-prev-char 'dots last-command-event 32) (if calc-prev-prev-char @@ -188,7 +188,7 @@ (erase-buffer)) (exit-minibuffer))) ;; just ignore extra decimal point, anticipating ".." - (delete-backward-char 1))) + (delete-char -1))) (defun calc-dots () (interactive) === modified file 'lisp/calc/calc.el' --- lisp/calc/calc.el 2010-05-15 04:50:25 +0000 +++ lisp/calc/calc.el 2010-05-25 02:11:08 +0000 @@ -2386,7 +2386,7 @@ (progn (require 'calc-ext) (calc-digit-dots)) - (delete-backward-char 1) + (delete-char -1) (beep) (calc-temp-minibuffer-message " [Bad format]")))))) (setq calc-prev-prev-char calc-prev-char === modified file 'lisp/emacs-lisp/cl-extra.el' --- lisp/emacs-lisp/cl-extra.el 2010-01-13 08:35:10 +0000 +++ lisp/emacs-lisp/cl-extra.el 2010-05-25 02:11:08 +0000 @@ -685,7 +685,7 @@ (setq last (point)) (goto-char (1+ pt)) (while (search-forward "(quote " last t) - (delete-backward-char 7) + (delete-char -7) (insert "'") (forward-sexp) (delete-char 1)) === modified file 'lisp/emacs-lisp/cl-loaddefs.el' --- lisp/emacs-lisp/cl-loaddefs.el 2010-05-20 01:32:08 +0000 +++ lisp/emacs-lisp/cl-loaddefs.el 2010-05-25 02:11:08 +0000 @@ -10,7 +10,7 @@ ;;;;;; ceiling* floor* isqrt lcm gcd cl-progv-before cl-set-frame-visible-p ;;;;;; cl-map-overlays cl-map-intervals cl-map-keymap-recursively ;;;;;; notevery notany every some mapcon mapcan mapl maplist map -;;;;;; cl-mapcar-many equalp coerce) "cl-extra" "cl-extra.el" "d93072a26c59f663a92b10df8bc28187") +;;;;;; cl-mapcar-many equalp coerce) "cl-extra" "cl-extra.el" "deb3495d75c36a222e5238eadb8e347c") ;;; Generated autoloads from cl-extra.el (autoload 'coerce "cl-extra" "\ === modified file 'lisp/emulation/cua-rect.el' --- lisp/emulation/cua-rect.el 2010-05-10 14:37:59 +0000 +++ lisp/emulation/cua-rect.el 2010-05-25 02:11:08 +0000 @@ -1344,7 +1344,7 @@ pad) (if (bolp) nil - (delete-backward-char 1) + (delete-char -1) (if (cua--rectangle-right-side t) (cua--rectangle-insert-col (current-column)) (setq indent (- l (current-column)))))) === modified file 'lisp/emulation/viper-ex.el' --- lisp/emulation/viper-ex.el 2010-01-13 08:35:10 +0000 +++ lisp/emulation/viper-ex.el 2010-05-25 02:11:08 +0000 @@ -750,7 +750,7 @@ (format "[^\\\\]\\(\\\\\\\\\\)*\\\\%c" c))) (setq cont nil) ;; we are at an escaped delimiter: unescape it and continue - (delete-backward-char 2) + (delete-char -2) (insert c) (if (eolp) ;; if at eol, exit loop and go to next line === modified file 'lisp/eshell/esh-test.el' --- lisp/eshell/esh-test.el 2010-01-13 08:35:10 +0000 +++ lisp/eshell/esh-test.el 2010-05-25 02:11:08 +0000 @@ -101,7 +101,7 @@ (eshell-redisplay)) (let ((truth (eval command))) (with-current-buffer test-buffer - (delete-backward-char 6) + (delete-char -6) (insert-before-markers "[" (let (str) (if truth === modified file 'lisp/eshell/eshell.el' --- lisp/eshell/eshell.el 2010-02-21 21:05:13 +0000 +++ lisp/eshell/eshell.el 2010-05-25 02:11:08 +0000 @@ -404,7 +404,7 @@ (assert (not (eshell-interactive-process))) (goto-char (point-max)) (while (and (bolp) (not (bobp))) - (delete-backward-char 1))) + (delete-char -1))) (assert (and buf (buffer-live-p buf))) (unless arg (let ((len (if (not intr) 2 === modified file 'lisp/expand.el' --- lisp/expand.el 2010-01-13 08:35:10 +0000 +++ lisp/expand.el 2010-05-25 02:11:08 +0000 @@ -368,7 +368,7 @@ nil)) (defun expand-do-expansion () - (delete-backward-char (length last-abbrev-text)) + (delete-char (- (length last-abbrev-text))) (let* ((vect (symbol-value last-abbrev)) (text (aref vect 0)) (position (aref vect 1)) === modified file 'lisp/gnus/gnus-uu.el' --- lisp/gnus/gnus-uu.el 2010-01-13 08:35:10 +0000 +++ lisp/gnus/gnus-uu.el 2010-05-25 02:11:08 +0000 @@ -1488,7 +1488,7 @@ (when gnus-uu-kill-carriage-return (save-excursion (while (search-forward "\r" nil t) - (delete-backward-char 1)))) + (delete-char -1)))) (while (or (re-search-forward gnus-uu-begin-string nil t) (re-search-forward gnus-uu-body-line nil t)) === modified file 'lisp/gnus/nndoc.el' --- lisp/gnus/nndoc.el 2010-01-13 08:35:10 +0000 +++ lisp/gnus/nndoc.el 2010-05-25 02:11:08 +0000 @@ -741,7 +741,7 @@ (setq p (1+ (nth 3 blk))))) (goto-char begin) (while (re-search-forward "\r$" nil t) - (delete-backward-char 1)) + (delete-char -1)) (when head (goto-char begin) (when (search-forward "\n\n" nil t) === modified file 'lisp/gnus/nnrss.el' --- lisp/gnus/nnrss.el 2010-04-18 23:24:22 +0000 +++ lisp/gnus/nnrss.el 2010-05-25 02:11:08 +0000 @@ -682,7 +682,7 @@ (rfc2047-encode-region (point-min) (point-max))) (goto-char (point-min)) (while (search-forward "\n" nil t) - (delete-backward-char 1)) + (delete-char -1)) (buffer-string))) ;;; Snarf functions === modified file 'lisp/gnus/rfc2047.el' --- lisp/gnus/rfc2047.el 2010-03-19 02:55:37 +0000 +++ lisp/gnus/rfc2047.el 2010-05-25 02:11:08 +0000 @@ -427,7 +427,7 @@ ;; since encoded words can't occur in quotes. (progn (goto-char end) - (delete-backward-char 1) + (delete-char -1) (goto-char start) (delete-char 1) (when last-encoded @@ -897,7 +897,7 @@ (goto-char beg) (while (search-forward "\\" nil 'move) (unless (memq (char-after) '(?\")) - (delete-backward-char 1)) + (delete-char -1)) (forward-char))) (forward-char)) (error === modified file 'lisp/gnus/utf7.el' --- lisp/gnus/utf7.el 2010-01-13 08:35:10 +0000 +++ lisp/gnus/utf7.el 2010-05-25 02:11:08 +0000 @@ -112,7 +112,7 @@ (skip-chars-forward not-direct-encoding-chars))) (if (and (= fc esc-char) (= run-length 1)) ; Lone esc-char? - (delete-backward-char 1) ; Now there's one too many + (delete-char -1) ; Now there's one too many (utf7-fragment-encode p (point) for-imap)) (insert "-"))))))) @@ -153,7 +153,7 @@ (save-excursion (utf7-fragment-decode p (point) for-imap) (goto-char p) - (delete-backward-char 1))))))))) + (delete-char -1))))))))) (defun utf7-fragment-decode (start end &optional for-imap) "Decode base64 encoded fragment from START to END of UTF-7 text in buffer. === modified file 'lisp/ido.el' --- lisp/ido.el 2010-04-29 15:41:23 +0000 +++ lisp/ido.el 2010-05-25 02:11:08 +0000 @@ -2815,7 +2815,7 @@ ((eq this-original-command 'viper-del-backward-char-in-insert) (funcall this-original-command)) (t - (delete-backward-char (prefix-numeric-value count))))) + (delete-char (- (prefix-numeric-value count)))))) (defun ido-delete-backward-word-updir (count) "Delete all chars backwards, or at beginning of buffer, go up one level." === modified file 'lisp/image-dired.el' --- lisp/image-dired.el 2010-03-22 16:50:29 +0000 +++ lisp/image-dired.el 2010-05-25 02:11:08 +0000 @@ -937,7 +937,7 @@ ;; If on empty line at end of buffer (when (and (eobp) (looking-at "^$")) - (delete-backward-char 1)))))) + (delete-char -1)))))) files) (save-buffer) (kill-buffer buf)))) === modified file 'lisp/international/utf-7.el' --- lisp/international/utf-7.el 2010-01-13 08:35:10 +0000 +++ lisp/international/utf-7.el 2010-05-25 02:11:08 +0000 @@ -62,7 +62,7 @@ (decode-coding-region p (point) 'utf-16be) (save-excursion (goto-char p) - (delete-backward-char 1))))))) + (delete-char -1))))))) (- (point-max) (point-min))))) ;;;###autoload === modified file 'lisp/language/ethio-util.el' --- lisp/language/ethio-util.el 2010-01-13 08:35:10 +0000 +++ lisp/language/ethio-util.el 2010-05-25 02:11:08 +0000 @@ -869,7 +869,7 @@ (goto-char (point-min)) (while (re-search-forward "[ሀ-፼]" nil t) (setq ucode (preceding-char)) - (delete-backward-char 1) + (delete-char -1) (insert (format (if ethio-java-save-lowercase "\\u%4x" "\\u%4X") ucode))))) === modified file 'lisp/lpr.el' --- lisp/lpr.el 2010-01-13 08:35:10 +0000 +++ lisp/lpr.el 2010-05-25 02:11:08 +0000 @@ -291,7 +291,7 @@ (let (c) (while (re-search-forward "[\^@-\^h\^k\^n-\^_\177-\377]" nil t) (setq c (preceding-char)) - (delete-backward-char 1) + (delete-char -1) (insert (if (< c ?\s) (format "\\^%c" (+ c ?@)) (format "\\%02x" c)))))))) === modified file 'lisp/mh-e/mh-alias.el' --- lisp/mh-e/mh-alias.el 2010-01-13 08:35:10 +0000 +++ lisp/mh-e/mh-alias.el 2010-05-25 02:11:08 +0000 @@ -234,7 +234,7 @@ (let ((user-arg (if user "-user" "-nouser"))) (mh-exec-cmd-quiet t "ali" user-arg "-nolist" alias)) (goto-char (point-max)) - (if (looking-at "^$") (delete-backward-char 1)) + (if (looking-at "^$") (delete-char -1)) (buffer-substring (point-min)(point-max))) (error (progn (message "%s" (error-message-string err)) === modified file 'lisp/mh-e/mh-search.el' --- lisp/mh-e/mh-search.el 2010-01-13 08:35:10 +0000 +++ lisp/mh-e/mh-search.el 2010-05-25 02:11:08 +0000 @@ -1511,7 +1511,7 @@ (delete-char 1)) (goto-char (point-max)) (while (and (not (bobp)) (memq (char-before) '(? ?\t ?\n ?\r ?_))) - (delete-backward-char 1)) + (delete-char -1)) (subst-char-in-region (point-min) (point-max) ? ?_ t) (subst-char-in-region (point-min) (point-max) ?\t ?_ t) (subst-char-in-region (point-min) (point-max) ?\n ?_ t) === modified file 'lisp/net/imap.el' --- lisp/net/imap.el 2010-05-07 06:58:17 +0000 +++ lisp/net/imap.el 2010-05-25 02:11:08 +0000 @@ -2095,7 +2095,7 @@ (while (setq end (imap-find-next-line)) (save-restriction (narrow-to-region (point-min) end) - (delete-backward-char (length imap-server-eol)) + (delete-char (- (length imap-server-eol))) (goto-char (point-min)) (unwind-protect (cond ((eq imap-state 'initial) === modified file 'lisp/net/rcirc.el' --- lisp/net/rcirc.el 2010-01-13 08:35:10 +0000 +++ lisp/net/rcirc.el 2010-05-25 02:11:08 +0000 @@ -1067,8 +1067,8 @@ (goto-char (point-max)) (when (not (equal 0 (- (point) rcirc-prompt-end-marker))) ;; delete a trailing newline - (when (eq (point) (point-at-bol)) - (delete-backward-char 1)) + (when (bolp) + (delete-char -1)) (let ((input (buffer-substring-no-properties rcirc-prompt-end-marker (point)))) (dolist (line (split-string input "\n")) === modified file 'lisp/obsolete/complete.el' --- lisp/obsolete/complete.el 2010-04-13 03:29:38 +0000 +++ lisp/obsolete/complete.el 2010-05-25 02:11:08 +0000 @@ -699,7 +699,7 @@ (if (and (eq mode 'word) (not PC-word-failed-flag)) (let ((PC-word-failed-flag t)) - (delete-backward-char 1) + (delete-char -1) (PC-do-completion 'word)) (when abbreviated (delete-region beg end) === modified file 'lisp/pcomplete.el' --- lisp/pcomplete.el 2010-05-15 03:50:26 +0000 +++ lisp/pcomplete.el 2010-05-25 02:11:08 +0000 @@ -553,7 +553,7 @@ pcomplete-expand-and-complete pcomplete-reverse))) (progn - (delete-backward-char pcomplete-last-completion-length) + (delete-char (- pcomplete-last-completion-length)) (if (eq this-command 'pcomplete-reverse) (progn (push (car (last pcomplete-current-completions)) @@ -616,7 +616,7 @@ (pcomplete) (when (and pcomplete-current-completions (> (length pcomplete-current-completions) 0)) ;?? - (delete-backward-char pcomplete-last-completion-length) + (delete-char (- pcomplete-last-completion-length)) (while pcomplete-current-completions (unless (pcomplete-insert-entry "" (car pcomplete-current-completions) t @@ -639,7 +639,7 @@ (when (and pcomplete-cycle-completions pcomplete-current-completions (eq last-command 'pcomplete-argument)) - (delete-backward-char pcomplete-last-completion-length) + (delete-char (- pcomplete-last-completion-length)) (setq pcomplete-current-completions nil pcomplete-last-completion-raw nil)) (let ((pcomplete-show-list t)) @@ -1207,7 +1207,7 @@ ;; FIXME: Here we presume that quoting `stub' gives us the exact ;; text in the buffer before point, which is not guaranteed; ;; e.g. it is not the case in eshell when completing ${FOO}tm[TAB]. - (delete-backward-char (length (pcomplete-quote-argument stub))) + (delete-char (- (length (pcomplete-quote-argument stub)))) ;; if there is already a backslash present to handle the first ;; character, don't bother quoting it (when (eq (char-before) ?\\) === modified file 'lisp/play/decipher.el' --- lisp/play/decipher.el 2010-01-13 08:35:10 +0000 +++ lisp/play/decipher.el 2010-05-25 02:11:08 +0000 @@ -1060,7 +1060,7 @@ ;; (insert ?\() ;; (while (setq undo-map (pop undo-rec)) ;; (insert (cdr undo-map) (car undo-map) ?\ )) -;; (delete-backward-char 1) +;; (delete-char -1) ;; (insert ")\n")))))) ;; arch-tag: 8f094d88-ffe1-4f99-afe3-a5e81dd939d9 === modified file 'lisp/progmodes/ada-mode.el' --- lisp/progmodes/ada-mode.el 2010-02-08 23:27:29 +0000 +++ lisp/progmodes/ada-mode.el 2010-05-25 02:11:08 +0000 @@ -1645,7 +1645,7 @@ (insert " ") (ada-adjust-case) ;; horrible dekludge - (delete-backward-char 1) + (delete-char -1) ;; some special keys and their bindings (cond ((eq lastk ?\n) === modified file 'lisp/progmodes/cc-awk.el' --- lisp/progmodes/cc-awk.el 2010-01-13 08:35:10 +0000 +++ lisp/progmodes/cc-awk.el 2010-05-25 02:11:08 +0000 @@ -244,7 +244,7 @@ ;; REGEXPS USED FOR FINDING THE POSITION OF A "virtual semicolon" (defconst c-awk-_-harmless-nonws-char-re "[^#/\"\\\\\n\r \t]") -;;;; NEW VERSION! (which will be restricted to the current line) +;; NEW VERSION! (which will be restricted to the current line) (defconst c-awk-one-line-non-syn-ws*-re (concat "\\([ \t]*" "\\(" c-awk-_-harmless-nonws-char-re "\\|" @@ -503,7 +503,7 @@ (insert-char ?\n 1) ; ...artificial eol is needed for comment detection. (setq extra-nl t)) (prog1 (c-awk-get-NL-prop-prev-line do-lim) - (if extra-nl (delete-backward-char 1)))))) + (if extra-nl (delete-char -1)))))) (defsubst c-awk-prev-line-incomplete-p (&optional do-lim) ;; Is there an incomplete statement at the end of the previous line? @@ -519,14 +519,14 @@ ;; This function might do hidden buffer changes. (memq (c-awk-get-NL-prop-cur-line do-lim) '(?\\ ?\{))) -;;;; NOTES ON "VIRTUAL SEMICOLONS" -;;;; -;;;; A "virtual semicolon" is what terminates a statement when there is no ; -;;;; or } to do the job. Like point, it is considered to lie _between_ two -;;;; characters. As from mid-March 2004, it is considered to lie just after -;;;; the last non-syntactic-whitespace character on the line; (previously, it -;;;; was considered an attribute of the EOL on the line). A real semicolon -;;;; never counts as a virtual one. +;; NOTES ON "VIRTUAL SEMICOLONS" +;; +;; A "virtual semicolon" is what terminates a statement when there is no ; +;; or } to do the job. Like point, it is considered to lie _between_ two +;; characters. As from mid-March 2004, it is considered to lie just after +;; the last non-syntactic-whitespace character on the line; (previously, it +;; was considered an attribute of the EOL on the line). A real semicolon +;; never counts as a virtual one. (defun c-awk-at-vsemi-p (&optional pos) ;; Is there a virtual semicolon at POS (or POINT)? === modified file 'lisp/progmodes/dcl-mode.el' --- lisp/progmodes/dcl-mode.el 2010-01-13 08:35:10 +0000 +++ lisp/progmodes/dcl-mode.el 2010-05-25 02:11:08 +0000 @@ -1549,13 +1549,11 @@ (interactive "*P") (delete-indentation arg) (let ((type (dcl-get-line-type))) - (if (and (or (equal type '$) - (equal type '-) - (equal type 'empty-$)) + (if (and (member type '($ - empty-$)) (not (bobp)) - (= (char-after (1- (point))) ?-)) + (= (char-before) ?-)) (progn - (delete-backward-char 1) + (delete-char -1) (fixup-whitespace))))) === modified file 'lisp/progmodes/ps-mode.el' --- lisp/progmodes/ps-mode.el 2010-01-13 08:35:10 +0000 +++ lisp/progmodes/ps-mode.el 2010-05-25 02:11:08 +0000 @@ -681,7 +681,7 @@ (if (or (not ps-mode-auto-indent) (< ps-mode-tab 1) (not (re-search-backward "^[ \t]+\\=" nil t))) - (delete-backward-char 1) + (call-interactively 'delete-backward-char) (setq target (ps-mode-target-column)) (while (> column target) (setq target (+ target ps-mode-tab))) === modified file 'lisp/progmodes/verilog-mode.el' --- lisp/progmodes/verilog-mode.el 2010-04-15 17:14:10 +0000 +++ lisp/progmodes/verilog-mode.el 2010-05-25 02:11:08 +0000 @@ -9305,11 +9305,11 @@ (delete-char 1) (insert ");") (search-forward "\n") ;; Added by inst-port - (delete-backward-char 1) + (delete-char -1) (if (search-forward ")" nil t) ;; From user, moved up a line - (delete-backward-char 1)) + (delete-char -1)) (if (search-forward ";" nil t) ;; Don't error if user had syntax error and forgot it - (delete-backward-char 1))))))))) + (delete-char -1))))))))) (defun verilog-auto-inst-param () "Expand AUTOINSTPARAM statements, as part of \\[verilog-auto]. @@ -9412,9 +9412,9 @@ (delete-char 1) (insert ")") (search-forward "\n") ;; Added by inst-port - (delete-backward-char 1) + (delete-char -1) (if (search-forward ")" nil t) ;; From user, moved up a line - (delete-backward-char 1))))))))) + (delete-char -1))))))))) (defun verilog-auto-reg () "Expand AUTOREG statements, as part of \\[verilog-auto]. === modified file 'lisp/progmodes/vhdl-mode.el' --- lisp/progmodes/vhdl-mode.el 2010-05-03 02:29:46 +0000 +++ lisp/progmodes/vhdl-mode.el 2010-05-25 02:11:08 +0000 @@ -7994,7 +7994,7 @@ (condition-case () (forward-sexp) (error (goto-char (point-max)))) (< (point) end)) - (delete-backward-char 1)) + (delete-char -1)) ;; add closing parenthesis (when (> (point) end) (goto-char end) @@ -8105,7 +8105,7 @@ (interactive "p") (if (and vhdl-stutter-mode (= count 1) (not (vhdl-in-literal))) (if (= (preceding-char) last-input-event) - (progn (delete-backward-char 1) (insert-char ?\" 1)) + (progn (delete-char -1) (insert-char ?\" 1)) (insert-char ?\' 1)) (self-insert-command count))) @@ -8172,7 +8172,7 @@ (unless (vhdl-template-field (concat "[type" (and (vhdl-standard-p 'ams) " or nature") "]") nil t) - (delete-backward-char 3)) + (delete-char -3)) (vhdl-insert-keyword " IS ") (vhdl-template-field "name" ";") (vhdl-comment-insert-inline)))) @@ -8536,7 +8536,7 @@ (vhdl-template-field "library name" "." nil nil nil nil (vhdl-work-library)) (vhdl-template-field "configuration name" ";")) - (t (delete-backward-char 1) (insert ";") t)))))) + (t (delete-char -1) (insert ";") t)))))) (defun vhdl-template-configuration-decl () @@ -8703,7 +8703,7 @@ (vhdl-insert-keyword " OPEN ") (unless (vhdl-template-field "[READ_MODE | WRITE_MODE | APPEND_MODE]" nil t) - (delete-backward-char 6))) + (delete-char -6))) (vhdl-insert-keyword " IS ") (when (vhdl-standard-p '87) (vhdl-template-field "[IN | OUT]" " " t)) @@ -9031,7 +9031,7 @@ (insert "\n") (indent-to margin)) (delete-region end-pos (point)) - (delete-backward-char 1) + (delete-char -1) (insert ")") (when vhdl-auto-align (vhdl-align-region-groups start (point) 1)) t) @@ -9405,7 +9405,7 @@ (vhdl-insert-keyword "REPORT ") (if (equal "\"\"" (vhdl-template-field "string expression" nil t start (point) t)) - (delete-backward-char 2) + (delete-char -2) (setq start (point)) (vhdl-insert-keyword " SEVERITY ") (unless (vhdl-template-field "[NOTE | WARNING | ERROR | FAILURE]" nil t) @@ -9553,7 +9553,7 @@ "[scalar type | ARRAY | RECORD | ACCESS | FILE]" nil t) "")))) (cond ((equal definition "") - (delete-backward-char 4) + (delete-char -4) (insert ";")) ((equal definition "ARRAY") (delete-region (point) (progn (forward-word -1) (point))) @@ -10053,13 +10053,13 @@ (if (not (or (and string (progn (insert string) t)) (vhdl-template-field "[comment]" nil t))) (delete-region position (point)) - (while (= (preceding-char) ? ) (delete-backward-char 1)) -; (when (> (current-column) end-comment-column) -; (setq position (point-marker)) -; (re-search-backward "-- ") -; (insert "\n") -; (indent-to comment-column) -; (goto-char position)) + (while (= (preceding-char) ?\ ) (delete-char -1)) + ;; (when (> (current-column) end-comment-column) + ;; (setq position (point-marker)) + ;; (re-search-backward "-- ") + ;; (insert "\n") + ;; (indent-to comment-column) + ;; (goto-char position)) )))) (defun vhdl-comment-block () @@ -10192,7 +10192,7 @@ (when semicolon-pos (goto-char semicolon-pos)) (if not-empty (progn (delete-char 1) (insert ")")) - (delete-backward-char 2)))) + (delete-char -2)))) (defun vhdl-template-generic-list (optional &optional no-value) "Read from user a generic spec argument list." === modified file 'lisp/skeleton.el' --- lisp/skeleton.el 2010-01-13 08:35:10 +0000 +++ lisp/skeleton.el 2010-05-25 02:11:08 +0000 @@ -358,7 +358,7 @@ (< element 0)) (if skeleton-untabify (backward-delete-char-untabify (- element)) - (delete-backward-char (- element))) + (delete-char element)) (insert (if (not literal) (funcall skeleton-transformation-function element) element)))) === modified file 'lisp/term.el' --- lisp/term.el 2010-01-20 17:14:37 +0000 +++ lisp/term.el 2010-05-25 02:11:08 +0000 @@ -1170,7 +1170,7 @@ (let* ((str (car cur)) (len (length str)) (start (- (point) len))) (if (and (>= start (point-min)) (string= str (buffer-substring start (point)))) - (progn (delete-backward-char len) + (progn (delete-char (- len)) (setq term-kill-echo-list (cdr cur)) (setq term-current-column nil) (setq term-current-row nil) === modified file 'lisp/textmodes/bibtex.el' --- lisp/textmodes/bibtex.el 2010-01-14 18:37:23 +0000 +++ lisp/textmodes/bibtex.el 2010-05-25 02:11:08 +0000 @@ -2094,7 +2094,7 @@ ;; if match not at left subfield boundary... (if (< (1+ (nth 1 bounds)) (match-beginning 0)) (insert (bibtex-field-right-delimiter) " # ") - (delete-backward-char 1)))))))) + (delete-char -1)))))))) ;; use book title of crossref'd entry (if (and (memq 'inherit-booktitle format) === modified file 'lisp/textmodes/fill.el' --- lisp/textmodes/fill.el 2010-05-19 03:51:55 +0000 +++ lisp/textmodes/fill.el 2010-05-25 02:11:08 +0000 @@ -657,7 +657,7 @@ (if (and oneleft (not (and use-hard-newlines (get-text-property (1- (point)) 'hard)))) - (delete-backward-char 1) + (delete-char -1) (backward-char 1) (setq oneleft t))) (setq to (copy-marker (point) t)) === modified file 'lisp/textmodes/reftex-auc.el' --- lisp/textmodes/reftex-auc.el 2010-01-13 08:35:10 +0000 +++ lisp/textmodes/reftex-auc.el 2010-05-25 02:11:08 +0000 @@ -58,7 +58,7 @@ ;; Create a new label, with a temporary brace for `reftex-what-macro' (unwind-protect (progn (insert "{") (setq label (or (reftex-label nil t) ""))) - (delete-backward-char 1))) + (delete-char -1))) ((and (not definition) (reftex-plug-flag 2)) ;; Reference a label with RefTeX (setq label (reftex-reference nil t))) === modified file 'lisp/textmodes/rst.el' --- lisp/textmodes/rst.el 2010-03-20 18:17:59 +0000 +++ lisp/textmodes/rst.el 2010-05-25 02:11:08 +0000 @@ -1787,7 +1787,7 @@ (delete-region init-point (+ init-point (length initial-indent))) ;; Delete the last newline added. - (delete-backward-char 1) + (delete-char -1) ))) (defun rst-toc-insert-node (node level indent pfx) === modified file 'lisp/textmodes/sgml-mode.el' --- lisp/textmodes/sgml-mode.el 2010-05-13 21:52:20 +0000 +++ lisp/textmodes/sgml-mode.el 2010-05-25 02:11:08 +0000 @@ -526,7 +526,7 @@ (insert-char ?/ 1) (indent-according-to-mode)) ((eq sgml-quick-keys 'close) - (delete-backward-char 1) + (delete-char -1) (sgml-close-tag)) (t (sgml-slash-matching arg)))) @@ -583,7 +583,7 @@ (insert ?&) (or char (setq char (read-quoted-char "Enter char or octal number"))) - (delete-backward-char 1) + (delete-char -1) (insert char) (undo-boundary) (sgml-namify-char)) @@ -601,7 +601,7 @@ ((encode-char char 'ucs))))) (if (not name) (error "Don't know the name of `%c'" char) - (delete-backward-char 1) + (delete-char -1) (insert (format (if (numberp name) "&#%d;" "&%s;") name))))) (defun sgml-name-self () @@ -707,7 +707,7 @@ (sgml-value (assoc (downcase attribute) alist)) (setq i (1- i)))) (if (eq (preceding-char) ?\s) - (delete-backward-char 1))) + (delete-char -1))) car))) (defun sgml-auto-attributes (arg) @@ -1117,7 +1117,7 @@ (setq alist (skeleton-read '(completing-read "Value: " (cdr alist)))) (if (string< "" alist) (insert alist ?\") - (delete-backward-char 2))) + (delete-char -2))) (insert "=\"") (if (cdr alist) (insert (skeleton-read '(completing-read "Value: " alist))) === modified file 'lisp/textmodes/table.el' --- lisp/textmodes/table.el 2010-03-12 17:47:22 +0000 +++ lisp/textmodes/table.el 2010-05-25 02:11:08 +0000 @@ -919,12 +919,12 @@ (defvar table-source-info-plist nil "General storage for temporary information used while generating source.") -;;; The following history containers not only keep the history of user -;;; entries but also serve as the default value providers. When an -;;; interactive command is invoked it offers a user the latest entry -;;; of the history as a default selection. Therefore the values below -;;; are the first default value when a command is invoked for the very -;;; first time when there is no real history existing yet. +;; The following history containers not only keep the history of user +;; entries but also serve as the default value providers. When an +;; interactive command is invoked it offers a user the latest entry +;; of the history as a default selection. Therefore the values below +;; are the first default value when a command is invoked for the very +;; first time when there is no real history existing yet. (defvar table-cell-span-direction-history '("right")) (defvar table-cell-split-orientation-history '("horizontally")) (defvar table-cell-split-contents-to-history '("split")) @@ -948,19 +948,19 @@ (defvar table-capture-columns-history '("")) (defvar table-target-history '("cell")) -;;; Some entries in `table-cell-bindings' are duplicated in -;;; `table-command-remap-alist'. There is a good reason for -;;; this. Common key like return key may be taken by some other -;;; function than normal `newline' function. Thus binding return key -;;; directly for `*table--cell-newline' ensures that the correct enter -;;; operation in a table cell. However -;;; `table-command-remap-alist' has an additional role than -;;; replacing commands. It is also used to construct a table command -;;; list. This list is very important because it is used to check if -;;; the previous command was one of them in this list or not. If the -;;; previous command is found in the list the current command will not -;;; refill the table cache. If the command were not listed fast -;;; typing can cause unwanted cache refill. +;; Some entries in `table-cell-bindings' are duplicated in +;; `table-command-remap-alist'. There is a good reason for +;; this. Common key like return key may be taken by some other +;; function than normal `newline' function. Thus binding return key +;; directly for `*table--cell-newline' ensures that the correct enter +;; operation in a table cell. However +;; `table-command-remap-alist' has an additional role than +;; replacing commands. It is also used to construct a table command +;; list. This list is very important because it is used to check if +;; the previous command was one of them in this list or not. If the +;; previous command is found in the list the current command will not +;; refill the table cache. If the command were not listed fast +;; typing can cause unwanted cache refill. (defconst table-cell-bindings '(([(control i)] . table-forward-cell) ([(control I)] . table-backward-cell) === modified file 'lisp/textmodes/texinfmt.el' --- lisp/textmodes/texinfmt.el 2010-01-13 08:35:10 +0000 +++ lisp/textmodes/texinfmt.el 2010-05-25 02:11:08 +0000 @@ -2507,7 +2507,7 @@ (error "Not found: @verb start brace")) (delete-region texinfo-command-start (+ 2 texinfo-command-end)) (search-forward delimiter)) - (delete-backward-char 1) + (delete-char -1) (unless (looking-at "}") (error "Not found: @verb end brace")) (delete-char 1)) === modified file 'lisp/time.el' --- lisp/time.el 2010-01-13 08:35:10 +0000 +++ lisp/time.el 2010-05-25 02:11:08 +0000 @@ -524,7 +524,7 @@ (insert (pop result) (make-string (1+ (- max-width (pop result))) ?\s) (pop result) "\n"))) - (delete-backward-char 1))) + (delete-char -1))) ;;;###autoload (defun display-time-world () === modified file 'lisp/wid-edit.el' --- lisp/wid-edit.el 2010-04-07 12:57:04 +0000 +++ lisp/wid-edit.el 2010-05-25 02:11:08 +0000 @@ -1334,7 +1334,7 @@ (goto-char end) (while (and (eq (preceding-char) ?\s) (> (point) begin)) - (delete-backward-char 1))))))) + (delete-char -1))))))) (widget-specify-secret field)) (widget-apply field :notify field)))) @@ -1477,7 +1477,7 @@ ;; Parse escapes in format. (while (re-search-forward "%\\(.\\)" nil t) (let ((escape (char-after (match-beginning 1)))) - (delete-backward-char 2) + (delete-char -2) (cond ((eq escape ?%) (insert ?%)) ((eq escape ?\[) @@ -1510,7 +1510,7 @@ (setq doc-begin (point)) (insert doc) (while (eq (preceding-char) ?\n) - (delete-backward-char 1)) + (delete-char -1)) (insert ?\n) (setq doc-end (point))))) ((eq escape ?h) @@ -2258,7 +2258,7 @@ ;; Parse % escapes in format. (while (re-search-forward "%\\([bv%]\\)" nil t) (let ((escape (char-after (match-beginning 1)))) - (delete-backward-char 2) + (delete-char -2) (cond ((eq escape ?%) (insert ?%)) ((eq escape ?b) @@ -2441,7 +2441,7 @@ ;; Parse % escapes in format. (while (re-search-forward "%\\([bv%]\\)" nil t) (let ((escape (char-after (match-beginning 1)))) - (delete-backward-char 2) + (delete-char -2) (cond ((eq escape ?%) (insert ?%)) ((eq escape ?b) @@ -2720,7 +2720,7 @@ ;; Parse % escapes in format. (while (re-search-forward "%\\(.\\)" nil t) (let ((escape (char-after (match-beginning 1)))) - (delete-backward-char 2) + (delete-char -2) (cond ((eq escape ?%) (insert ?%)) ((eq escape ?i) === modified file 'lisp/woman.el' --- lisp/woman.el 2010-04-14 15:07:53 +0000 +++ lisp/woman.el 2010-05-25 02:11:08 +0000 @@ -2443,7 +2443,7 @@ (while (and (<= (setq N (1+ N)) 0) (cond ((memq (preceding-char) '(?\ ?\t)) - (delete-backward-char 1) t) + (delete-char -1) t) ((memq (following-char) '(?\ ?\t)) (delete-char 1) t) (t nil)))) @@ -3121,7 +3121,7 @@ (if unquote (delete-char 1) (forward-char)) (re-search-forward "\"\\|$")) (if (eq (preceding-char) ?\") - (if unquote (delete-backward-char 1)) + (if unquote (delete-char -1)) (WoMan-warn "Unpaired \" in .%s arguments." request))) ;; (re-search-forward "[^\\\n] \\|$") ; inconsistent (skip-syntax-forward "^ ")) @@ -4346,7 +4346,7 @@ tab stop columns or pairs (COLUMN . TYPE) where TYPE is R or C." ;; Based on tab-to-tab-stop in indent.el. ;; R & C tabs probably not quite right! - (delete-backward-char 1) + (delete-char -1) (let ((tabs tab-stop-list)) (while (and tabs (>= (current-column) (woman-get-tab-stop (car tabs)))) @@ -4400,7 +4400,7 @@ (delete-char 1) (insert woman-unpadded-space-char) (goto-char (match-end 0)) - (delete-backward-char 1) + (delete-char -1) (insert-before-markers woman-unpadded-space-char) (subst-char-in-region (match-beginning 0) (match-end 0) ------------------------------------------------------------ revno: 100425 [merge] committer: Kenichi Handa branch nick: trunk timestamp: Tue 2010-05-25 10:26:03 +0900 message: Add Hebrew shaper. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-05-25 00:54:13 +0000 +++ lisp/ChangeLog 2010-05-25 01:25:08 +0000 @@ -1,3 +1,9 @@ +2010-05-25 Kenichi Handa + + * language/hebrew.el (hebrew-shape-gstring): New function. + Register it in composition-function-table for all Hebrew combining + characters. + 2010-05-24 Uday S Reddy (tiny change) * textmodes/fill.el (fill-region): Don't fill past the end (bug#6201). === modified file 'lisp/language/hebrew.el' --- lisp/language/hebrew.el 2010-05-15 13:50:16 +0000 +++ lisp/language/hebrew.el 2010-05-25 01:25:08 +0000 @@ -85,6 +85,35 @@ :mime-charset 'cp862) (define-coding-system-alias 'ibm862 'cp862) +;; Composition function for hebrew. +(defun hebrew-shape-gstring (gstring) + (setq gstring (font-shape-gstring gstring)) + (let ((header (lgstring-header gstring)) + (nchars (lgstring-char-len gstring)) + (nglyphs (lgstring-glyph-len gstring)) + (base-width (lglyph-width (lgstring-glyph gstring 0)))) + (while (> nglyphs 1) + (setq nglyphs (1- nglyphs)) + (let* ((glyph (lgstring-glyph gstring nglyphs)) + (adjust (and glyph (lglyph-adjustment glyph)))) + (if adjust + (setq nglyphs 0) + (if (>= (lglyph-lbearing glyph) 0) + (lglyph-set-adjustment glyph (- base-width) 0 0)))))) + gstring) + +(let ((pattern1 "[\u05D0-\u05F2][\u0591-\u05BF\u05C1-\u05C5\u05C7]+") + (pattern2 "[\u05D0-\u05F2]\u200D[\u0591-\u05BF\u05C1-\u05C5\u05C7]+")) + (set-char-table-range + composition-function-table '(#x591 . #x5C7) + (list (vector pattern2 2 'hebrew-shape-gstring) + (vector pattern1 1 'hebrew-shape-gstring) + ["[\u0591-\u05C7]" 0 font-shape-gstring])) + (set-char-table-range + composition-function-table #x5C0 nil) + (set-char-table-range + composition-function-table #x5C6 nil)) + (provide 'hebrew) ;; arch-tag: 3ca04f32-3f1e-498e-af46-8267498ba5d9 ------------------------------------------------------------ revno: 100424 [merge] committer: Kenichi Handa branch nick: trunk timestamp: Tue 2010-05-25 10:04:36 +0900 message: Fix bidi-composition interaction in backward scanning. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-05-25 00:54:13 +0000 +++ src/ChangeLog 2010-05-25 01:03:44 +0000 @@ -1,3 +1,26 @@ +2010-05-25 Kenichi Handa + + * dispextern.h (struct composition_it): New members rule_idx and + charpos. + + * xdisp.c (set_iterator_to_next): While scanning backward, assume + that the character positions of IT point the last character of the + current grapheme cluster. + (next_element_from_composition): Don't change character positions + of IT. + (append_composite_glyph): Set glyph->charpos to + it->cmp_it.charpos. + + * composite.c (autocmp_chars): Change the first argument to RULE, + and try composition with RULE only. + (composition_compute_stop_pos): Record the index number of the + composition rule in CMP_IT->rule_idx. + (composition_reseat_it): Call autocmp_chars repeatedly until the + correct rule of the composition is found. + (composition_update_it): Set CMP_IT->charpos. Assume the CHARPOS + is at the last character of the current grapheme cluster when + CMP_IT->reversed_p is nonzero. + 2010-05-24 Stefan Monnier * editfns.c (Fbyte_to_string): New function. === modified file 'src/composite.c' --- src/composite.c 2010-05-14 13:44:12 +0000 +++ src/composite.c 2010-05-25 00:32:24 +0000 @@ -915,15 +915,16 @@ } -/* Try to compose the characters at CHARPOS according to CFT_ELEMENT - which is an element of composition-function-table (which see). - LIMIT limits the characters to compose. STRING, if not nil, is a - target string. WIN is a window where the characters are being - displayed. */ +/* Try to compose the characters at CHARPOS according to composition + rule RULE ([PATTERN PREV-CHARS FUNC]). LIMIT limits the characters + to compose. STRING, if not nil, is a target string. WIN is a + window where the characters are being displayed. If characters are + successfully composed, return the composition as a glyph-string + object. Otherwise return nil. */ static Lisp_Object -autocmp_chars (cft_element, charpos, bytepos, limit, win, face, string) - Lisp_Object cft_element; +autocmp_chars (rule, charpos, bytepos, limit, win, face, string) + Lisp_Object rule; EMACS_INT charpos, bytepos, limit; struct window *win; struct face *face; @@ -932,90 +933,66 @@ int count = SPECPDL_INDEX (); FRAME_PTR f = XFRAME (win->frame); Lisp_Object pos = make_number (charpos); + EMACS_INT to; EMACS_INT pt = PT, pt_byte = PT_BYTE; - int lookback; + Lisp_Object re, font_object, lgstring; + int len; record_unwind_save_match_data (); - for (lookback = -1; CONSP (cft_element); cft_element = XCDR (cft_element)) + re = AREF (rule, 0); + if (NILP (re)) + len = 1; + else if (! STRINGP (re)) + return unbind_to (count, Qnil); + else if ((len = fast_looking_at (re, charpos, bytepos, limit, -1, string)) + > 0) { - Lisp_Object elt = XCAR (cft_element); - Lisp_Object re; - Lisp_Object font_object = Qnil, gstring; - EMACS_INT len, to; - - if (! VECTORP (elt) || ASIZE (elt) != 3) - continue; - if (lookback < 0) - { - lookback = XFASTINT (AREF (elt, 1)); - if (limit > charpos + MAX_COMPOSITION_COMPONENTS) - limit = charpos + MAX_COMPOSITION_COMPONENTS; - } - else if (lookback != XFASTINT (AREF (elt, 1))) - break; - re = AREF (elt, 0); - if (NILP (re)) - len = 1; - else if ((len = fast_looking_at (re, charpos, bytepos, limit, -1, string)) - > 0) - { - if (NILP (string)) - len = BYTE_TO_CHAR (bytepos + len) - charpos; - else - len = string_byte_to_char (string, bytepos + len) - charpos; - } - if (len > 0) - { - limit = to = charpos + len; + if (NILP (string)) + len = BYTE_TO_CHAR (bytepos + len) - charpos; + else + len = string_byte_to_char (string, bytepos + len) - charpos; + } + if (len <= 0) + return unbind_to (count, Qnil); + to = limit = charpos + len; #ifdef HAVE_WINDOW_SYSTEM - if (FRAME_WINDOW_P (f)) - { - font_object = font_range (charpos, &to, win, face, string); - if (! FONT_OBJECT_P (font_object) - || (! NILP (re) - && to < limit - && (fast_looking_at (re, charpos, bytepos, to, -1, string) <= 0))) - { - if (NILP (string)) - TEMP_SET_PT_BOTH (pt, pt_byte); - return unbind_to (count, Qnil); - } - } - else + if (FRAME_WINDOW_P (f)) + { + font_object = font_range (charpos, &to, win, face, string); + if (! FONT_OBJECT_P (font_object) + || (! NILP (re) + && to < limit + && (fast_looking_at (re, charpos, bytepos, to, -1, string) <= 0))) + return unbind_to (count, Qnil); + } + else #endif /* not HAVE_WINDOW_SYSTEM */ - font_object = win->frame; - gstring = Fcomposition_get_gstring (pos, make_number (to), - font_object, string); - if (NILP (LGSTRING_ID (gstring))) - { - Lisp_Object args[6]; - - /* Save point as marker before calling out to lisp. */ - if (NILP (string)) - { - Lisp_Object m = Fmake_marker (); - set_marker_both (m, Qnil, pt, pt_byte); - record_unwind_protect (restore_point_unwind, m); - } - - args[0] = Vauto_composition_function; - args[1] = AREF (elt, 2); - args[2] = pos; - args[3] = make_number (to); - args[4] = font_object; - args[5] = string; - gstring = safe_call (6, args); - } - else if (NILP (string)) - { - TEMP_SET_PT_BOTH (pt, pt_byte); - } - return unbind_to (count, gstring); + font_object = win->frame; + lgstring = Fcomposition_get_gstring (pos, make_number (to), font_object, + string); + if (NILP (LGSTRING_ID (lgstring))) + { + Lisp_Object args[6]; + + /* Save point as marker before calling out to lisp. */ + if (NILP (string)) + { + Lisp_Object m = Fmake_marker (); + set_marker_both (m, Qnil, pt, pt_byte); + record_unwind_protect (restore_point_unwind, m); } + + args[0] = Vauto_composition_function; + args[1] = AREF (rule, 2); + args[2] = pos; + args[3] = make_number (to); + args[4] = font_object; + args[5] = string; + lgstring = safe_call (6, args); + if (NILP (string)) + TEMP_SET_PT_BOTH (pt, pt_byte); } - if (NILP (string)) - TEMP_SET_PT_BOTH (pt, pt_byte); - return unbind_to (count, Qnil); + return unbind_to (count, lgstring); } static Lisp_Object _work_val; @@ -1126,8 +1103,9 @@ if (! NILP (val)) { Lisp_Object elt; + int ridx; - for (; CONSP (val); val = XCDR (val)) + for (ridx = 0; CONSP (val); val = XCDR (val), ridx++) { elt = XCAR (val); if (VECTORP (elt) && ASIZE (elt) == 3 @@ -1137,6 +1115,7 @@ } if (CONSP (val)) { + cmp_it->rule_idx = ridx; cmp_it->lookback = XFASTINT (AREF (elt, 1)); cmp_it->stop_pos = charpos - 1 - cmp_it->lookback; cmp_it->ch = c; @@ -1167,45 +1146,54 @@ limit = bytepos + len; while (CHAR_COMPOSABLE_P (c)) { - for (val = CHAR_TABLE_REF (Vcomposition_function_table, c); - CONSP (val); val = XCDR (val)) + val = CHAR_TABLE_REF (Vcomposition_function_table, c); + if (! NILP (val)) { - Lisp_Object elt = XCAR (val); - int back, len; + Lisp_Object elt; + int ridx, back, len; - if (VECTORP (elt) && ASIZE (elt) == 3 - && NATNUMP (AREF (elt, 1)) - && charpos - (back = XFASTINT (AREF (elt, 1))) > endpos) + for (ridx = 0; CONSP (val); val = XCDR (val), ridx++) { - EMACS_INT cpos = charpos - back, bpos; - - if (back == 0) - bpos = bytepos; - else - bpos = (NILP (string) ? CHAR_TO_BYTE (cpos) - : string_char_to_byte (string, cpos)); - if (STRINGP (AREF (elt, 0))) - len = fast_looking_at (AREF (elt, 0), cpos, bpos, - start + 1, limit, string); - else - len = 1; - if (len > 0) + elt = XCAR (val); + if (VECTORP (elt) && ASIZE (elt) == 3 + && NATNUMP (AREF (elt, 1)) + && charpos - (back = XFASTINT (AREF (elt, 1))) > endpos) { - /* Make CPOS point to the last character of match. - Note that LEN is byte-length. */ - bpos += len; - if (NILP (string)) - cpos = BYTE_TO_CHAR (bpos) - 1; - else - cpos = string_byte_to_char (string, bpos) - 1; - back = cpos - (charpos - back); - if (cmp_it->stop_pos < cpos - || (cmp_it->stop_pos == cpos - && cmp_it->lookback < back)) + EMACS_INT cpos = charpos - back, bpos; + + if (back == 0) + bpos = bytepos; + else + bpos = (NILP (string) ? CHAR_TO_BYTE (cpos) + : string_char_to_byte (string, cpos)); + if (STRINGP (AREF (elt, 0))) + len = fast_looking_at (AREF (elt, 0), cpos, bpos, + start + 1, limit, string); + else + len = 1; + if (len > 0) { - cmp_it->stop_pos = cpos; - cmp_it->ch = c; - cmp_it->lookback = back; + /* Make CPOS point to the last character of + match. Note that LEN is byte-length. */ + if (len > 1) + { + bpos += len; + if (NILP (string)) + cpos = BYTE_TO_CHAR (bpos) - 1; + else + cpos = string_byte_to_char (string, bpos) - 1; + } + back = cpos - (charpos - back); + if (cmp_it->stop_pos < cpos + || (cmp_it->stop_pos == cpos + && cmp_it->lookback < back)) + { + cmp_it->rule_idx = ridx; + cmp_it->stop_pos = cpos; + cmp_it->ch = c; + cmp_it->lookback = back; + cmp_it->nchars = back + 1; + } } } } @@ -1293,7 +1281,7 @@ if (cmp_it->ch == -2) { composition_compute_stop_pos (cmp_it, charpos, bytepos, endpos, string); - if (cmp_it->stop_pos != charpos) + if (cmp_it->ch == -2 || cmp_it->stop_pos != charpos) /* The current position is not composed. */ return 0; } @@ -1314,55 +1302,75 @@ } else if (w) { - Lisp_Object val, elt; - int i; + Lisp_Object lgstring = Qnil; + Lisp_Object val, elt, re; + int len, i; val = CHAR_TABLE_REF (Vcomposition_function_table, cmp_it->ch); + for (i = 0; i < cmp_it->rule_idx; i++, val = XCDR (val)); if (charpos < endpos) { for (; CONSP (val); val = XCDR (val)) { elt = XCAR (val); - if (cmp_it->lookback == XFASTINT (AREF (elt, 1))) + if (! VECTORP (elt) || ASIZE (elt) != 3 + || ! INTEGERP (AREF (elt, 1))) + continue; + if (XFASTINT (AREF (elt, 1)) != cmp_it->lookback) + goto no_composition; + lgstring = autocmp_chars (elt, charpos, bytepos, endpos, + w, face, string); + if (composition_gstring_p (lgstring)) break; + lgstring = Qnil; + /* Composition failed perhaps because the font doesn't + support sufficient range of characters. Try the + other composition rules if any. */ } - if (NILP (val)) - goto no_composition; - - val = autocmp_chars (val, charpos, bytepos, endpos, w, face, string); - if (! composition_gstring_p (val)) - goto no_composition; cmp_it->reversed_p = 0; } else { - EMACS_INT saved_charpos = charpos, saved_bytepos = bytepos; + EMACS_INT cpos = charpos, bpos = bytepos; - if (cmp_it->lookback > 0) - { - charpos -= cmp_it->lookback; - if (charpos < endpos) - goto no_composition; - if (STRINGP (string)) - bytepos = string_char_to_byte (string, charpos); - else - bytepos = CHAR_TO_BYTE (charpos); - } - val = autocmp_chars (val, charpos, bytepos, saved_charpos + 1, - w, face, string); - if (! composition_gstring_p (val) - || charpos + LGSTRING_CHAR_LEN (val) <= saved_charpos) - { - charpos = saved_charpos, bytepos = saved_bytepos; - goto no_composition; + while (1) + { + elt = XCAR (val); + if (cmp_it->lookback > 0) + { + cpos -= cmp_it->lookback; + if (STRINGP (string)) + bpos = string_char_to_byte (string, cpos); + else + bpos = CHAR_TO_BYTE (cpos); + } + lgstring = autocmp_chars (elt, cpos, bpos, charpos + 1, w, face, + string); + if (composition_gstring_p (lgstring) + && cpos + LGSTRING_CHAR_LEN (lgstring) - 1 == charpos) + break; + /* Composition failed or didn't cover the current + character. */ + if (cmp_it->lookback == 0) + goto no_composition; + lgstring = Qnil; + /* Try to find a shorter compostion that starts after CPOS. */ + composition_compute_stop_pos (cmp_it, charpos, bytepos, cpos, + string); + if (cmp_it->ch == -2 || cmp_it->stop_pos < charpos) + goto no_composition; + val = CHAR_TABLE_REF (Vcomposition_function_table, cmp_it->ch); + for (i = 0; i < cmp_it->rule_idx; i++, val = XCDR (val)); } cmp_it->reversed_p = 1; } - if (NILP (LGSTRING_ID (val))) - val = composition_gstring_put_cache (val, -1); - cmp_it->id = XINT (LGSTRING_ID (val)); - for (i = 0; i < LGSTRING_GLYPH_LEN (val); i++) - if (NILP (LGSTRING_GLYPH (val, i))) + if (NILP (lgstring)) + goto no_composition; + if (NILP (LGSTRING_ID (lgstring))) + lgstring = composition_gstring_put_cache (lgstring, -1); + cmp_it->id = XINT (LGSTRING_ID (lgstring)); + for (i = 0; i < LGSTRING_GLYPH_LEN (lgstring); i++) + if (NILP (LGSTRING_GLYPH (lgstring, i))) break; cmp_it->nglyphs = i; cmp_it->from = 0; @@ -1378,10 +1386,10 @@ if (charpos < endpos) { charpos++; - if (STRINGP (string)) - bytepos += MULTIBYTE_LENGTH_NO_CHECK (SDATA (string) + bytepos); - else + if (NILP (string)) INC_POS (bytepos); + else + bytepos += MULTIBYTE_FORM_LENGTH (SDATA (string) + bytepos, 0); } else { @@ -1393,11 +1401,20 @@ return 0; } -/* Update nchars, nbytes, and width of the current grapheme cluster - which is identified by CMP_IT->from (if the composition is static - or automatic in l2r context) or CMPT_IT->to (if the composition is - automatic in r2l context). In addition, in the former case, update - CMP_IT->to, and in the latter case, update CMP_IT->from. */ +/* Update charpos, nchars, nbytes, and width of the current grapheme + cluster. + + If the composition is static or automatic in L2R context, the + cluster is identified by CMP_IT->from, and CHARPOS is the position + of the first character of the cluster. In this case, update + CMP_IT->to too. + + If the composition is automatic in R2L context, the cluster is + identified by CMP_IT->to, and CHARPOS is the position of the last + character of the cluster. In this case, update CMP_IT->from too. + + The return value is the character code of the first character of + the cluster, or -1 if the composition is somehow broken. */ int composition_update_it (cmp_it, charpos, bytepos, string) @@ -1409,8 +1426,10 @@ if (cmp_it->ch < 0) { + /* static composition */ struct composition *cmp = composition_table[cmp_it->id]; + cmp_it->charpos = charpos; cmp_it->to = cmp_it->nglyphs; if (cmp_it->nglyphs == 0) c = -1; @@ -1423,70 +1442,64 @@ c = ' '; } cmp_it->width = cmp->width; + charpos += cmp_it->nchars; + if (STRINGP (string)) + cmp_it->nbytes = string_char_to_byte (string, charpos) - bytepos; + else + cmp_it->nbytes = CHAR_TO_BYTE (charpos) - bytepos; } else { + /* automatic composition */ Lisp_Object gstring = composition_gstring_from_id (cmp_it->id); + Lisp_Object glyph; + int from, to; if (cmp_it->nglyphs == 0) { - c = -1; cmp_it->nchars = LGSTRING_CHAR_LEN (gstring); cmp_it->width = 0; + cmp_it->from = cmp_it->to = 0; + return -1; } - else if (! cmp_it->reversed_p) + if (! cmp_it->reversed_p) { - Lisp_Object glyph = LGSTRING_GLYPH (gstring, cmp_it->from); - int from = LGLYPH_FROM (glyph); - - c = XINT (LGSTRING_CHAR (gstring, from)); - cmp_it->nchars = LGLYPH_TO (glyph) - from + 1; - cmp_it->width = (LGLYPH_WIDTH (glyph) > 0 - ? CHAR_WIDTH (LGLYPH_CHAR (glyph)) : 0); + glyph = LGSTRING_GLYPH (gstring, cmp_it->from); + from = LGLYPH_FROM (glyph); for (cmp_it->to = cmp_it->from + 1; cmp_it->to < cmp_it->nglyphs; cmp_it->to++) { glyph = LGSTRING_GLYPH (gstring, cmp_it->to); if (LGLYPH_FROM (glyph) != from) break; - if (LGLYPH_WIDTH (glyph) > 0) - cmp_it->width += CHAR_WIDTH (LGLYPH_CHAR (glyph)); } + cmp_it->charpos = charpos; } else { - int from_idx = cmp_it->to - 1; - Lisp_Object glyph = LGSTRING_GLYPH (gstring, from_idx); - int from = LGLYPH_FROM (glyph); - - c = XINT (LGSTRING_CHAR (gstring, from)); - cmp_it->nchars = LGLYPH_TO (glyph) - from + 1; + glyph = LGSTRING_GLYPH (gstring, cmp_it->to - 1); + from = LGLYPH_FROM (glyph); + cmp_it->charpos = charpos - (LGLYPH_TO (glyph) - from); + for (cmp_it->from = cmp_it->to - 1; cmp_it->from > 0; + cmp_it->from--) + { + glyph = LGSTRING_GLYPH (gstring, cmp_it->from - 1); + if (LGLYPH_FROM (glyph) != from) + break; + } + } + glyph = LGSTRING_GLYPH (gstring, cmp_it->from); + cmp_it->nchars = LGLYPH_TO (glyph) + 1 - from; + cmp_it->nbytes = 0; + cmp_it->width = 0; + for (i = cmp_it->nchars - 1; i >= 0; i--) + { + c = XINT (LGSTRING_CHAR (gstring, i)); + cmp_it->nbytes += CHAR_BYTES (c); cmp_it->width = (LGLYPH_WIDTH (glyph) > 0 ? CHAR_WIDTH (LGLYPH_CHAR (glyph)) : 0); - for (from_idx--; from_idx >= 0; from_idx--) - { - glyph = LGSTRING_GLYPH (gstring, from_idx); - if (LGLYPH_FROM (glyph) != from) - break; - if (LGLYPH_WIDTH (glyph) > 0) - cmp_it->width += CHAR_WIDTH (LGLYPH_CHAR (glyph)); - } - cmp_it->from = from_idx + 1; - charpos -= cmp_it->nchars - 1; - bytepos += CHAR_BYTES (c); - if (STRINGP (string)) - cmp_it->nbytes = bytepos - string_char_to_byte (string, charpos); - else - cmp_it->nbytes = bytepos - CHAR_TO_BYTE (charpos); - return c; } } - - charpos += cmp_it->nchars; - if (STRINGP (string)) - cmp_it->nbytes = string_char_to_byte (string, charpos) - bytepos; - else - cmp_it->nbytes = CHAR_TO_BYTE (charpos) - bytepos; return c; } @@ -1655,7 +1668,7 @@ check.pos_byte = cur.pos_byte; else check.pos_byte = CHAR_TO_BYTE (check.pos); - val = autocmp_chars (check_val, check.pos, check.pos_byte, + val = autocmp_chars (elt, check.pos, check.pos_byte, tail, w, NULL, string); need_adjustment = 1; if (! NILP (val)) @@ -2059,7 +2072,7 @@ a function to call to compose that character. The element at index C in the table, if non-nil, is a list of -this form: ([PATTERN PREV-CHARS FUNC] ...) +composition rules of this form: ([PATTERN PREV-CHARS FUNC] ...) PATTERN is a regular expression which C and the surrounding characters must match. === modified file 'src/dispextern.h' --- src/dispextern.h 2010-05-23 19:02:25 +0000 +++ src/dispextern.h 2010-05-25 00:35:50 +0000 @@ -1976,17 +1976,31 @@ are not iterating over a composition now. */ int id; /* If non-negative, character that triggers the automatic - composition at `stop_pos', and this is an automatic compositoin. + composition at `stop_pos', and this is an automatic composition. If negative, this is a static composition. This is set to -2 temporarily if searching of composition reach a limit or a newline. */ int ch; - /* If this an automatic composition, how many characters to look back - from the position where a character triggering the composition - exists. */ + /* If this is an automatic composition, index of a rule for making + the automatic composition. Provided that ELT is an element of + Vcomposition_function_table for CH, (nth ELT RULE_IDX) is the + rule for the composition. */ + int rule_idx; + /* If this is an automatic composition, how many characters to look + back from the position where a character triggering the + composition exists. */ int lookback; /* If non-negative, number of glyphs of the glyph-string. */ int nglyphs; + /* Nonzero iff the composition is created while buffer is scanned in + reverse order, and thus the grapheme clusters must be rendered + from the last to the first. */ + int reversed_p; + + /** The following members contain information about the current + grapheme cluster. */ + /* Position of the first character of the current grapheme cluster. */ + EMACS_INT charpos; /* Number of characters and bytes of the current grapheme cluster. */ int nchars, nbytes; /* Indices of the glyphs for the current grapheme cluster. */ @@ -1995,10 +2009,6 @@ graphic display and in units of canonical characters on a terminal display. */ int width; - /* Nonzero iff the composition is created while buffer is scanned in - reverse order, and thus the grapheme clusters must be rendered - from the last to the first. */ - int reversed_p; }; struct it === modified file 'src/xdisp.c' --- src/xdisp.c 2010-05-22 19:32:21 +0000 +++ src/xdisp.c 2010-05-25 00:35:50 +0000 @@ -6339,10 +6339,10 @@ /* Update IT's char/byte positions to point to the last character of the previous grapheme cluster, or the character visually after the current composition. */ - bidi_move_to_visually_next (&it->bidi_it); + for (i = 0; i < it->cmp_it.nchars; i++) + bidi_move_to_visually_next (&it->bidi_it); IT_BYTEPOS (*it) = it->bidi_it.bytepos; IT_CHARPOS (*it) = it->bidi_it.charpos; - if (it->cmp_it.from > 0) { /* Proceed to the previous grapheme cluster. */ @@ -7108,19 +7108,6 @@ it->object = it->w->buffer; it->c = composition_update_it (&it->cmp_it, IT_CHARPOS (*it), IT_BYTEPOS (*it), Qnil); - if (it->cmp_it.reversed_p) - { - /* Now it->position points the last character of the current - grapheme cluster. Adjust it to point the first one. We - have to do it here so that append_composite_glyph sets - correct (struct glyph)->charpos. */ - int i; - for (i = 0; i < it->cmp_it.nchars - 1; i++) - bidi_move_to_visually_next (&it->bidi_it); - IT_CHARPOS (*it) = it->bidi_it.charpos; - IT_BYTEPOS (*it) = it->bidi_it.bytepos; - it->position = it->current.pos; - } } return 1; } @@ -21943,7 +21930,7 @@ g[1] = *g; glyph = it->glyph_row->glyphs[it->area]; } - glyph->charpos = CHARPOS (it->position); + glyph->charpos = it->cmp_it.charpos; glyph->object = it->object; glyph->pixel_width = it->pixel_width; glyph->ascent = it->ascent; ------------------------------------------------------------ revno: 100423 [merge] committer: Stefan Monnier branch nick: trunk timestamp: Mon 2010-05-24 20:54:13 -0400 message: Merge from emacs-23 diff: === modified file 'etc/ChangeLog' --- etc/ChangeLog 2010-05-11 02:04:13 +0000 +++ etc/ChangeLog 2010-05-25 00:54:13 +0000 @@ -1,3 +1,7 @@ +2010-05-24 Stefan Monnier + + * NEWS: Add sections for Emacs-23.3. + 2010-05-08 Chong Yidong * PROBLEMS: Document gcc-4.5 bug (Bug#6031). @@ -43,8 +47,7 @@ 2010-03-24 Francesc Rocher - * MORE.STUFF: Remove CEDET entry, now distributed as part of - Emacs. + * MORE.STUFF: Remove CEDET entry, now distributed as part of Emacs. 2010-03-22 Teodor Zlatanov === modified file 'etc/NEWS.23' --- etc/NEWS.23 2010-05-08 18:47:07 +0000 +++ etc/NEWS.23 2010-05-25 00:54:13 +0000 @@ -15,6 +15,33 @@ with a prefix argument or by typing C-u C-h C-n. +* Installation Changes in Emacs 23.3 + +* Startup Changes in Emacs 23.3 + +* Changes in Emacs 23.3 + + +* Editing Changes in Emacs 23.3 + + +* Changes in Specialized Modes and Packages in Emacs 23.3 + + +* New Modes and Packages in Emacs 23.3 + + +* Incompatible Lisp Changes in Emacs 23.3 + + +* Lisp changes in Emacs 23.3 + +** New function byte-to-string, like char-to-string but for bytes. + + +* Changes in Emacs 23.3 on non-free operating systems + + * Installation Changes in Emacs 23.2 ** New configure options for Emacs developers. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-05-22 16:48:01 +0000 +++ lisp/ChangeLog 2010-05-25 00:54:13 +0000 @@ -1,3 +1,12 @@ +2010-05-24 Uday S Reddy (tiny change) + + * textmodes/fill.el (fill-region): Don't fill past the end (bug#6201). + +2010-05-24 Stefan Monnier + + * subr.el (read-quoted-char): Resolve modifiers after key + remapping (bug#6212). + 2010-05-22 Chong Yidong * image.el (image-refresh): Define as an alias for image-flush. @@ -13,9 +22,9 @@ 2010-05-21 Alan Mackenzie - * progmodes/cc-engine.el (c-parse-state-get-strategy): Replace - parameter `here' with `here-' and `here-plus', which sandwich any - pertinent CPP construct. + * progmodes/cc-engine.el (c-parse-state-get-strategy): + Replace parameter `here' with `here-' and `here-plus', which sandwich + any pertinent CPP construct. (c-remove-stale-state-cache-backwards): Fix a bug which happens when doing (c-parse-state) in a CPP construct: Exclude any "new" CPP construct from taking part in the scanning. @@ -23,8 +32,8 @@ 2010-05-21 Michael Albinus * net/tramp.el (tramp-do-copy-or-rename-file) - (tramp-handle-file-local-copy, tramp-maybe-open-connection): Tune - `with-progress-reporter' messages. + (tramp-handle-file-local-copy, tramp-maybe-open-connection): + Tune `with-progress-reporter' messages. (tramp-handle-vc-registered): * net/tramp-fish.el (tramp-fish-handle-file-local-copy) (tramp-fish-handle-insert-file-contents) === modified file 'lisp/emacs-lisp/bytecomp.el' --- lisp/emacs-lisp/bytecomp.el 2010-04-23 16:26:11 +0000 +++ lisp/emacs-lisp/bytecomp.el 2010-05-25 00:54:13 +0000 @@ -353,7 +353,7 @@ (defvar byte-compile-interactive-only-functions '(beginning-of-buffer end-of-buffer replace-string replace-regexp insert-file insert-buffer insert-file-literally previous-line next-line - goto-line comint-run) + goto-line comint-run delete-backward-char) "List of commands that are not meant to be called from Lisp.") (defvar byte-compile-not-obsolete-vars nil === modified file 'lisp/textmodes/fill.el' --- lisp/textmodes/fill.el 2010-01-13 08:35:10 +0000 +++ lisp/textmodes/fill.el 2010-05-19 03:51:55 +0000 @@ -1036,7 +1036,7 @@ (fill-forward-paragraph -1)) (if (< (point) beg) (goto-char beg)) - (if (>= (point) initial) + (if (and (>= (point) initial) (< (point) end)) (setq fill-pfx (fill-region-as-paragraph (point) end justify nosqueeze)) (goto-char end)))) === modified file 'lisp/url/ChangeLog' --- lisp/url/ChangeLog 2010-05-08 18:47:07 +0000 +++ lisp/url/ChangeLog 2010-05-25 00:54:13 +0000 @@ -1,3 +1,7 @@ +2010-05-19 Stefan Monnier + + * url-util.el (url-unhex-string): Don't accidentally decode as latin-1. + 2010-05-07 Chong Yidong * Version 23.2 released. === modified file 'lisp/url/url-util.el' --- lisp/url/url-util.el 2010-01-23 22:50:13 +0000 +++ lisp/url/url-util.el 2010-05-19 15:23:53 +0000 @@ -322,10 +322,10 @@ tmp (substring str 0 start) (cond (allow-newlines - (char-to-string code)) + (byte-to-string code)) ((or (= code ?\n) (= code ?\r)) " ") - (t (char-to-string code)))) + (t (byte-to-string code)))) str (substring str (match-end 0))))) (setq tmp (concat tmp str)) tmp)) === modified file 'src/ChangeLog' --- src/ChangeLog 2010-05-24 20:46:41 +0000 +++ src/ChangeLog 2010-05-25 00:54:13 +0000 @@ -1,12 +1,15 @@ 2010-05-24 Stefan Monnier + * editfns.c (Fbyte_to_string): New function. + +2010-05-24 Stefan Monnier + * process.c (Fmake_network_process): Set :host to nil if it's not used. Suggested by Masatake YAMATO . 2010-05-23 Eli Zaretskii - * dispextern.h (init_iterator): Sync prototype with changed - definition. + * dispextern.h (init_iterator): Sync prototype with changed definition. 2010-05-19 Eli Zaretskii === modified file 'src/cmds.c' --- src/cmds.c 2010-05-15 13:23:48 +0000 +++ src/cmds.c 2010-05-25 00:54:13 +0000 @@ -278,7 +278,9 @@ doc: /* Delete the previous N characters (following if N is negative). Optional second arg KILLFLAG non-nil means kill instead (save in kill ring). Interactively, N is the prefix arg, and KILLFLAG is set if -N was explicitly specified. */) +N was explicitly specified. +This is meant for interactive use only; from Lisp, better use `delete-char' +with a negated argument. */) (n, killflag) Lisp_Object n, killflag; { === modified file 'src/editfns.c' --- src/editfns.c 2010-03-24 18:02:56 +0000 +++ src/editfns.c 2010-05-25 00:54:13 +0000 @@ -220,6 +220,16 @@ return make_string_from_bytes (str, 1, len); } +DEFUN ("byte-to-string", Fbyte_to_string, Sbyte_to_string, 1, 1, 0, + doc: /* Convert arg BYTE to a string containing that byte. */) + (byte) + Lisp_Object byte; +{ + CHECK_NUMBER (byte); + unsigned char b = XINT (byte); + return make_string_from_bytes (&b, 1, 1); +} + DEFUN ("string-to-char", Fstring_to_char, Sstring_to_char, 1, 1, 0, doc: /* Convert arg STRING to a character, the first character of that string. A multibyte character is handled correctly. */) @@ -4686,6 +4696,7 @@ defsubr (&Sgoto_char); defsubr (&Sstring_to_char); defsubr (&Schar_to_string); + defsubr (&Sbyte_to_string); defsubr (&Sbuffer_substring); defsubr (&Sbuffer_substring_no_properties); defsubr (&Sbuffer_string); ------------------------------------------------------------ revno: 100422 committer: Stefan Monnier branch nick: trunk timestamp: Mon 2010-05-24 16:48:46 -0400 message: Mention multi-planes text-properties diff: === modified file 'etc/TODO' --- etc/TODO 2010-05-19 02:56:44 +0000 +++ etc/TODO 2010-05-24 20:48:46 +0000 @@ -181,7 +181,14 @@ http://lists.gnu.org/archive/html/emacs-devel/2008-08/msg00456.html * Important features: - +** Extended text-properties (to make overlays "obsolete") +*** Several text-property planes +This would get us rid of font-lock-face property (and I'd be happy to +get rid of char-property-alias-alist as well) since font-lock would +simply use the `face' property in the `font-lock' plane. +Each property would come with an Elisp merge-function. The merge +would be performed in add-text-properties. +*** zero-width text-properties. ** Having tabs above a window to switch buffers in it. ** "Perspectives" are named persistent window configurations. We have ------------------------------------------------------------ revno: 100421 committer: Stefan Monnier branch nick: trunk timestamp: Mon 2010-05-24 16:46:41 -0400 message: * process.c (Fmake_network_process): Set :host to nil if it's not used. Suggested by Masatake YAMATO . diff: === modified file '.bzrignore' --- .bzrignore 2010-04-19 15:07:52 +0000 +++ .bzrignore 2010-05-24 20:46:41 +0000 @@ -68,3 +68,4 @@ conftest* confdefs.h core +lib-src/stamp-* === modified file 'src/ChangeLog' --- src/ChangeLog 2010-05-23 16:57:15 +0000 +++ src/ChangeLog 2010-05-24 20:46:41 +0000 @@ -1,3 +1,8 @@ +2010-05-24 Stefan Monnier + + * process.c (Fmake_network_process): Set :host to nil if it's not used. + Suggested by Masatake YAMATO . + 2010-05-23 Eli Zaretskii * dispextern.h (init_iterator): Sync prototype with changed @@ -15,11 +20,11 @@ * xdisp.c (display_line): Compare IT_CHARPOS with the position in row->start.pos, rather than with MATRIX_ROW_START_CHARPOS. (cursor_row_p): Use row->end.pos rather than MATRIX_ROW_END_CHARPOS. - (try_window_reusing_current_matrix, try_window_id): Use - ROW->minpos rather than ROW->start.pos. + (try_window_reusing_current_matrix, try_window_id): + Use ROW->minpos rather than ROW->start.pos. (init_from_display_pos, init_iterator): Use EMACS_INT for character and byte positions. - (find_row_edges): Renamed from find_row_end. Accept additional + (find_row_edges): Rename from find_row_end. Accept additional arguments for minimum and maximum buffer positions seen by display_line for this row. Don't use iterator to find the position following the maximum one; instead, increment the === modified file 'src/process.c' --- src/process.c 2010-05-04 04:00:10 +0000 +++ src/process.c 2010-05-24 20:46:41 +0000 @@ -3347,11 +3347,25 @@ /* :service SERVICE -- string, integer (port number), or t (random port). */ service = Fplist_get (contact, QCservice); + /* :host HOST -- hostname, ip address, or 'local for localhost. */ + host = Fplist_get (contact, QChost); + if (!NILP (host)) + { + if (EQ (host, Qlocal)) + host = build_string ("localhost"); + CHECK_STRING (host); + } + #ifdef HAVE_LOCAL_SOCKETS if (family == AF_LOCAL) { - /* Host is not used. */ - host = Qnil; + if (!NILP (host)) + { + message (":family local ignores the :host \"%s\" property", + SDATA (host)); + contact = Fplist_put (contact, QChost, Qnil); + host = Qnil; + } CHECK_STRING (service); bzero (&address_un, sizeof address_un); address_un.sun_family = AF_LOCAL; @@ -3362,15 +3376,6 @@ } #endif - /* :host HOST -- hostname, ip address, or 'local for localhost. */ - host = Fplist_get (contact, QChost); - if (!NILP (host)) - { - if (EQ (host, Qlocal)) - host = build_string ("localhost"); - CHECK_STRING (host); - } - /* Slow down polling to every ten seconds. Some kernels have a bug which causes retrying connect to fail after a connect. Polling can interfere with gethostbyname too. */ ------------------------------------------------------------ revno: 100420 committer: Romain Francoise branch nick: trunk timestamp: Mon 2010-05-24 13:35:41 +0200 message: Adapt make-dist to new version location. * make-dist: Look for version in src/emacs.c. Use lisp/subr.el rather than lisp/version.el for location check. diff: === modified file 'ChangeLog' --- ChangeLog 2010-05-21 16:31:45 +0000 +++ ChangeLog 2010-05-24 11:35:41 +0000 @@ -1,3 +1,8 @@ +2010-05-24 Romain Francoise + + * make-dist: Look for version in src/emacs.c. + Use lisp/subr.el rather than lisp/version.el for location check. + 2010-05-21 Glenn Morris * configure.in (MKDEPDIR): Parallel build tweak. === modified file 'make-dist' --- make-dist 2010-05-20 06:11:27 +0000 +++ make-dist 2010-05-24 11:35:41 +0000 @@ -121,8 +121,8 @@ done ### Make sure we're running in the right place. -if [ ! -d src -o ! -f src/lisp.h -o ! -d lisp -o ! -f lisp/version.el ]; then - echo "${progname}: Can't find \`src/lisp.h' and \`lisp/version.el'." >&2 +if [ ! -d src -o ! -f src/lisp.h -o ! -d lisp -o ! -f lisp/subr.el ]; then + echo "${progname}: Can't find \`src/lisp.h' and \`lisp/subr.el'." >&2 echo "${progname} must be run in the top directory of the Emacs" >&2 echo "distribution tree. cd to that directory and try again." >&2 exit 1 @@ -150,12 +150,12 @@ fi ### Find out which version of Emacs this is. -shortversion=`grep 'defconst[ ]*emacs-version' lisp/version.el \ +shortversion=`grep 'char emacs_version' src/emacs.c \ | sed -e 's/^.*"\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'` -version=`grep 'defconst[ ]*emacs-version' lisp/version.el \ +version=`grep 'char emacs_version' src/emacs.c \ | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'` if [ ! "${version}" ]; then - echo "${progname}: can't find current Emacs version in \`./lisp/version.el'" >&2 + echo "${progname}: can't find current Emacs version in \`./src/emacs.c'" >&2 exit 1 fi ------------------------------------------------------------ revno: 100419 committer: Juanma Barranquero branch nick: trunk timestamp: Sun 2010-05-23 21:02:25 +0200 message: * dispextern.h: Fix typo in previous change. diff: === modified file 'src/dispextern.h' --- src/dispextern.h 2010-05-23 16:57:15 +0000 +++ src/dispextern.h 2010-05-23 19:02:25 +0000 @@ -2912,7 +2912,7 @@ int set_cursor_from_row P_ ((struct window *, struct glyph_row *, struct glyph_matrix *, int, int, int, int)); void init_iterator P_ ((struct it *, struct window *, EMACS_INT, - EMACS_INIT, struct glyph_row *, enum face_id)); + EMACS_INT, struct glyph_row *, enum face_id)); void init_iterator_to_row_start P_ ((struct it *, struct window *, struct glyph_row *)); int get_next_display_element P_ ((struct it *)); ------------------------------------------------------------ Use --include-merges or -n0 to see merged revisions.