Now on revision 108259. ------------------------------------------------------------ revno: 108259 committer: Glenn Morris branch nick: trunk timestamp: Wed 2012-05-16 23:07:26 -0700 message: Minor optimization for install of self-contained NS info files * configure.in (etcdir): For a self-contained ns build, set it to the appropriate values. * Makefile.in (install-arch-dep): No need to move info/ any more. diff: === modified file 'ChangeLog' --- ChangeLog 2012-05-17 05:55:29 +0000 +++ ChangeLog 2012-05-17 06:07:26 +0000 @@ -1,7 +1,8 @@ 2012-05-17 Glenn Morris - * configure.in (docdir, etcdir, lispdir): + * configure.in (docdir, etcdir, infodir, lispdir): For a self-contained ns build, set these to the appropriate values. + * Makefile.in (install-arch-dep): No need to move info/ any more. * configure.in (ns_self_contained): New output variable. * Makefile.in (ns_self_contained): New, set by configure. === modified file 'Makefile.in' --- Makefile.in 2012-05-17 05:32:37 +0000 +++ Makefile.in 2012-05-17 06:07:26 +0000 @@ -479,7 +479,6 @@ rm -fr `basename "$$dir"`; mv "$$dir" . ; \ done ; \ fi ; \ - if test -d share/info ; then rm -fr info; mv share/info . ; fi ; \ rm -fr share ) ; \ fi === modified file 'configure.in' --- configure.in 2012-05-17 05:55:29 +0000 +++ configure.in 2012-05-17 06:07:26 +0000 @@ -1595,6 +1595,9 @@ archlibdir="\${ns_appbindir}/libexec" docdir="\${ns_appresdir}/etc" etcdir="\${ns_appresdir}/etc" + dnl FIXME maybe set datarootdir instead. + dnl That would also get applications, icons, man. + infodir="\${ns_appresdir}/info" lispdir="\${ns_appresdir}/lisp" LEIM_INSTALLDIR="\${ns_appresdir}/leim" fi ------------------------------------------------------------ revno: 108258 committer: Glenn Morris branch nick: trunk timestamp: Wed 2012-05-16 22:55:29 -0700 message: Set more installation directories for self-contained ns builds * configure.in (docdir, etcdir, lispdir): For a self-contained ns build, set these to the appropriate values. diff: === modified file 'ChangeLog' --- ChangeLog 2012-05-17 05:32:37 +0000 +++ ChangeLog 2012-05-17 05:55:29 +0000 @@ -1,5 +1,8 @@ 2012-05-17 Glenn Morris + * configure.in (docdir, etcdir, lispdir): + For a self-contained ns build, set these to the appropriate values. + * configure.in (ns_self_contained): New output variable. * Makefile.in (ns_self_contained): New, set by configure. (install-arch-dep): For a self-contained ns build, === modified file 'configure.in' --- configure.in 2012-05-17 05:32:37 +0000 +++ configure.in 2012-05-17 05:55:29 +0000 @@ -1593,6 +1593,9 @@ dnl This one isn't really used, only archlibdir is. libexecdir="\${ns_appbindir}/libexec" archlibdir="\${ns_appbindir}/libexec" + docdir="\${ns_appresdir}/etc" + etcdir="\${ns_appresdir}/etc" + lispdir="\${ns_appresdir}/lisp" LEIM_INSTALLDIR="\${ns_appresdir}/leim" fi ns_frag=$srcdir/src/ns.mk ------------------------------------------------------------ revno: 108257 committer: Glenn Morris branch nick: trunk timestamp: Wed 2012-05-16 22:32:37 -0700 message: Fix previous change, for NS builds that are not self-contained * configure.in (ns_self_contained): New output variable. * Makefile.in (ns_self_contained): New, set by configure. (install-arch-dep): Use $ns_self_contained. diff: === modified file 'ChangeLog' --- ChangeLog 2012-05-17 05:14:50 +0000 +++ ChangeLog 2012-05-17 05:32:37 +0000 @@ -1,6 +1,8 @@ 2012-05-17 Glenn Morris - * Makefile.in (install-arch-dep): For a self-contained ns build, + * configure.in (ns_self_contained): New output variable. + * Makefile.in (ns_self_contained): New, set by configure. + (install-arch-dep): For a self-contained ns build, don't bother installing binaries then immediately deleting them. * Makefile.in (ns_appbindir, ns_appresdir): === modified file 'Makefile.in' --- Makefile.in 2012-05-17 05:14:50 +0000 +++ Makefile.in 2012-05-17 05:32:37 +0000 @@ -94,6 +94,8 @@ # Later values may use these. ns_appbindir=@ns_appbindir@ ns_appresdir=@ns_appresdir@ +# Either yes or no depending on whether this is a relocatable Emacs.app. +ns_self_contained=@ns_self_contained@ # The default location for installation. Everything is placed in # subdirectories of this directory. The default values for many of @@ -465,13 +467,13 @@ exec_prefix=${exec_prefix} bindir=${bindir} \ libexecdir=${libexecdir} archlibdir=${archlibdir} \ INSTALL_STRIP=${INSTALL_STRIP}) - if test "${ns_appresdir}" = ""; then \ + if test "${ns_self_contained}" = "no"; then \ ${INSTALL_PROGRAM} $(INSTALL_STRIP) src/emacs${EXEEXT} $(DESTDIR)${bindir}/$(EMACSFULL) || exit 1 ; \ chmod 1755 $(DESTDIR)${bindir}/$(EMACSFULL) ; \ rm -f $(DESTDIR)${bindir}/$(EMACS) ; \ ln $(DESTDIR)${bindir}/$(EMACSFULL) $(DESTDIR)${bindir}/$(EMACS) || true ; \ else \ - ( cd ${ns_appresdir} ; \ + ( cd ${ns_appresdir} || exit 1 ; \ if test -d share/emacs ; then \ for dir in share/emacs/${version}/*; do \ rm -fr `basename "$$dir"`; mv "$$dir" . ; \ === modified file 'configure.in' --- configure.in 2012-05-17 01:23:03 +0000 +++ configure.in 2012-05-17 05:32:37 +0000 @@ -1574,6 +1574,7 @@ AC_SUBST(TEMACS_LDFLAGS2) LEIM_INSTALLDIR="\${install_prefix}/leim" +ns_self_contained=no ns_frag=/dev/null NS_OBJ= NS_OBJC_OBJ= @@ -1586,6 +1587,7 @@ with_xft=no # set up packaging dirs if test "${EN_NS_SELF_CONTAINED}" = yes; then + ns_self_contained=yes prefix=${ns_appresdir} exec_prefix=${ns_appbindir} dnl This one isn't really used, only archlibdir is. @@ -1600,6 +1602,7 @@ CFLAGS="$tmp_CFLAGS" CPPFLAGS="$tmp_CPPFLAGS" AC_SUBST(LEIM_INSTALLDIR) +AC_SUBST(ns_self_contained) AC_SUBST(NS_OBJ) AC_SUBST(NS_OBJC_OBJ) AC_SUBST(LIB_STANDARD) ------------------------------------------------------------ revno: 108256 committer: Glenn Morris branch nick: trunk timestamp: Wed 2012-05-16 22:14:50 -0700 message: Minor optimization for install-arch-dep with self-contained ns build * Makefile.in (install-arch-dep): For a self-contained ns build, don't bother installing binaries then immediately deleting them. diff: === modified file 'ChangeLog' --- ChangeLog 2012-05-17 01:23:03 +0000 +++ ChangeLog 2012-05-17 05:14:50 +0000 @@ -1,5 +1,8 @@ 2012-05-17 Glenn Morris + * Makefile.in (install-arch-dep): For a self-contained ns build, + don't bother installing binaries then immediately deleting them. + * Makefile.in (ns_appbindir, ns_appresdir): Move them before things that may refer to them. (install-arch-dep): No need to relocate self-contained ns libexec. === modified file 'Makefile.in' --- Makefile.in 2012-05-17 01:23:03 +0000 +++ Makefile.in 2012-05-17 05:14:50 +0000 @@ -465,11 +465,12 @@ exec_prefix=${exec_prefix} bindir=${bindir} \ libexecdir=${libexecdir} archlibdir=${archlibdir} \ INSTALL_STRIP=${INSTALL_STRIP}) - ${INSTALL_PROGRAM} $(INSTALL_STRIP) src/emacs${EXEEXT} $(DESTDIR)${bindir}/$(EMACSFULL) - -chmod 1755 $(DESTDIR)${bindir}/$(EMACSFULL) - rm -f $(DESTDIR)${bindir}/$(EMACS) - -ln $(DESTDIR)${bindir}/$(EMACSFULL) $(DESTDIR)${bindir}/$(EMACS) - if test "${ns_appresdir}" != ""; then \ + if test "${ns_appresdir}" = ""; then \ + ${INSTALL_PROGRAM} $(INSTALL_STRIP) src/emacs${EXEEXT} $(DESTDIR)${bindir}/$(EMACSFULL) || exit 1 ; \ + chmod 1755 $(DESTDIR)${bindir}/$(EMACSFULL) ; \ + rm -f $(DESTDIR)${bindir}/$(EMACS) ; \ + ln $(DESTDIR)${bindir}/$(EMACSFULL) $(DESTDIR)${bindir}/$(EMACS) || true ; \ + else \ ( cd ${ns_appresdir} ; \ if test -d share/emacs ; then \ for dir in share/emacs/${version}/*; do \ @@ -478,12 +479,7 @@ fi ; \ if test -d share/info ; then rm -fr info; mv share/info . ; fi ; \ rm -fr share ) ; \ - rm -f ${ns_appbindir}/bin/emacs ${ns_appbindir}/bin/$(EMACSFULL); \ - else true ; fi - -## FIXME NS self-contained: rather than installing emacs and -## EMACSFULL, then deleting them, obviously it would be better to not -## install them in the first place. + fi ## http://lists.gnu.org/archive/html/emacs-devel/2007-10/msg01672.html ## Needs to be the user running install, so configure can't set it. ------------------------------------------------------------ revno: 108255 committer: Glenn Morris branch nick: trunk timestamp: Wed 2012-05-16 21:23:03 -0400 message: Install a self-contained NS build's libexec directly into the right place This is rather than installing it in one place then moving it. * configure.in (archlibdir): Set it for self-contained ns builds. (libexecdir): Don't expand it now (this is mainly cosmetic). * Makefile.in (ns_appbindir, ns_appresdir): Move them before things that may refer to them. (install-arch-dep): No need to relocate self-contained ns libexec. * lib-src/Makefile.in (ns_appbindir): New, set by configure. diff: === modified file 'ChangeLog' --- ChangeLog 2012-05-16 09:01:55 +0000 +++ ChangeLog 2012-05-17 01:23:03 +0000 @@ -1,3 +1,12 @@ +2012-05-17 Glenn Morris + + * Makefile.in (ns_appbindir, ns_appresdir): + Move them before things that may refer to them. + (install-arch-dep): No need to relocate self-contained ns libexec. + + * configure.in (archlibdir): Set it for self-contained ns builds. + (libexecdir): Don't expand it now (this is mainly cosmetic). + 2012-05-16 Paul Eggert * configure.in: Simplify by removing CPP etc. === modified file 'Makefile.in' --- Makefile.in 2012-05-15 19:17:24 +0000 +++ Makefile.in 2012-05-17 01:23:03 +0000 @@ -90,6 +90,11 @@ # ==================== Where To Install Things ==================== +# Location to install Emacs.app under GNUstep / Mac OS X. +# Later values may use these. +ns_appbindir=@ns_appbindir@ +ns_appresdir=@ns_appresdir@ + # The default location for installation. Everything is placed in # subdirectories of this directory. The default values for many of # the variables below are expressed in terms of this one, so you may @@ -117,8 +122,10 @@ sharedstatedir=@sharedstatedir@ # Where to install and expect executable files to be run by Emacs -# rather than directly by users, and other architecture-dependent -# data. ${archlibdir} is a subdirectory of this. +# rather than directly by users (and other architecture-dependent +# data, although Emacs does not have any). The executables +# are actually installed in ${archlibdir}, which is (normally) +# a subdirectory of this. libexecdir=@libexecdir@ # Where to install Emacs's man pages. @@ -158,10 +165,6 @@ # Where to find the application default. x_default_search_path=@x_default_search_path@ -# Location to install Emacs.app under NeXT/Open/GNUstep / Cocoa -ns_appbindir=@ns_appbindir@ -ns_appresdir=@ns_appresdir@ - # Where the etc/emacs.desktop file is to be installed. desktopdir=$(datarootdir)/applications @@ -475,10 +478,7 @@ fi ; \ if test -d share/info ; then rm -fr info; mv share/info . ; fi ; \ rm -fr share ) ; \ - ( if cd ${ns_appbindir}/libexec ; then \ - mv -f emacs/${version}/${configuration}/* . ; rm -fr emacs ; \ - rm -f ../bin/emacs ../bin/$(EMACSFULL) ; \ - fi ) ; \ + rm -f ${ns_appbindir}/bin/emacs ${ns_appbindir}/bin/$(EMACSFULL); \ else true ; fi ## FIXME NS self-contained: rather than installing emacs and === modified file 'configure.in' --- configure.in 2012-05-16 09:01:55 +0000 +++ configure.in 2012-05-17 01:23:03 +0000 @@ -1588,7 +1588,9 @@ if test "${EN_NS_SELF_CONTAINED}" = yes; then prefix=${ns_appresdir} exec_prefix=${ns_appbindir} - libexecdir=${ns_appbindir}/libexec + dnl This one isn't really used, only archlibdir is. + libexecdir="\${ns_appbindir}/libexec" + archlibdir="\${ns_appbindir}/libexec" LEIM_INSTALLDIR="\${ns_appresdir}/leim" fi ns_frag=$srcdir/src/ns.mk === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2012-05-12 01:19:47 +0000 +++ lib-src/ChangeLog 2012-05-17 01:23:03 +0000 @@ -1,3 +1,7 @@ +2012-05-17 Glenn Morris + + * Makefile.in (ns_appbindir): New, set by configure. + 2012-05-12 Glenn Morris * Makefile.in (MKDIR_P): New, set by configure. === modified file 'lib-src/Makefile.in' --- lib-src/Makefile.in 2012-05-12 01:19:47 +0000 +++ lib-src/Makefile.in 2012-05-17 01:23:03 +0000 @@ -45,6 +45,10 @@ # ==================== Where To Install Things ==================== +# Location to install Emacs.app under GNUstep / Mac OS X. +# Later values may use this. +ns_appbindir=@ns_appbindir@ + # The default location for installation. Everything is placed in # subdirectories of this directory. The default values for many of # the variables below are expressed in terms of this one, so you may ------------------------------------------------------------ revno: 108254 committer: Juri Linkov branch nick: trunk timestamp: Thu 2012-05-17 03:03:49 +0300 message: Move word search functions from search.c to isearch.el (bug#10145, bug#11381). * lisp/isearch.el (word-search-regexp, word-search-backward) (word-search-forward, word-search-backward-lax) (word-search-forward-lax): Move functions from search.c. * src/search.c (Fword_search_regexp, Fword_search_backward) (Fword_search_forward, Fword_search_backward_lax) (Fword_search_forward_lax): Move functions to isearch.el. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-05-16 08:35:11 +0000 +++ lisp/ChangeLog 2012-05-17 00:03:49 +0000 @@ -1,3 +1,10 @@ +2012-05-17 Juri Linkov + + * isearch.el (word-search-regexp, word-search-backward) + (word-search-forward, word-search-backward-lax) + (word-search-forward-lax): Move functions from search.c + (bug#10145, bug#11381). + 2012-05-16 Agustín Martín Domingo * flyspell.el (flyspell-check-pre-word-p, flyspell-check-word-p) === modified file 'lisp/isearch.el' --- lisp/isearch.el 2012-02-23 00:36:49 +0000 +++ lisp/isearch.el 2012-05-17 00:03:49 +0000 @@ -1381,6 +1381,94 @@ (sit-for 1) (isearch-update)) + +;; Word search + +(defun word-search-regexp (string &optional lax) + "Return a regexp which matches words, ignoring punctuation. +Given STRING, a string of words separated by word delimiters, +compute a regexp that matches those exact words separated by +arbitrary punctuation. If LAX is non-nil, the end of the string +need not match a word boundary unless it ends in whitespace. + +Used in `word-search-forward', `word-search-backward', +`word-search-forward-lax', `word-search-backward-lax'." + (if (string-match-p "^\\W*$" string) + "" + (concat + "\\b" + (mapconcat 'identity (split-string string "\\W+" t) "\\W+") + (if (or (not lax) (string-match-p "\\W$" string)) "\\b")))) + +(defun word-search-backward (string &optional bound noerror count) + "Search backward from point for STRING, ignoring differences in punctuation. +Set point to the beginning of the occurrence found, and return point. +An optional second argument bounds the search; it is a buffer position. +The match found must not extend before that position. +Optional third argument, if t, means if fail just return nil (no error). + If not nil and not t, move to limit of search and return nil. +Optional fourth argument is repeat count--search for successive occurrences. + +Relies on the function `word-search-regexp' to convert a sequence +of words in STRING to a regexp used to search words without regard +to punctuation." + (interactive "sWord search backward: ") + (re-search-backward (word-search-regexp string nil) bound noerror count)) + +(defun word-search-forward (string &optional bound noerror count) + "Search forward from point for STRING, ignoring differences in punctuation. +Set point to the end of the occurrence found, and return point. +An optional second argument bounds the search; it is a buffer position. +The match found must not extend after that position. +Optional third argument, if t, means if fail just return nil (no error). + If not nil and not t, move to limit of search and return nil. +Optional fourth argument is repeat count--search for successive occurrences. + +Relies on the function `word-search-regexp' to convert a sequence +of words in STRING to a regexp used to search words without regard +to punctuation." + (interactive "sWord search: ") + (re-search-forward (word-search-regexp string nil) bound noerror count)) + +(defun word-search-backward-lax (string &optional bound noerror count) + "Search backward from point for STRING, ignoring differences in punctuation. +Set point to the beginning of the occurrence found, and return point. + +Unlike `word-search-backward', the end of STRING need not match a word +boundary, unless STRING ends in whitespace. + +An optional second argument bounds the search; it is a buffer position. +The match found must not extend before that position. +Optional third argument, if t, means if fail just return nil (no error). + If not nil and not t, move to limit of search and return nil. +Optional fourth argument is repeat count--search for successive occurrences. + +Relies on the function `word-search-regexp' to convert a sequence +of words in STRING to a regexp used to search words without regard +to punctuation." + (interactive "sWord search backward: ") + (re-search-backward (word-search-regexp string t) bound noerror count)) + +(defun word-search-forward-lax (string &optional bound noerror count) + "Search forward from point for STRING, ignoring differences in punctuation. +Set point to the end of the occurrence found, and return point. + +Unlike `word-search-forward', the end of STRING need not match a word +boundary, unless STRING ends in whitespace. + +An optional second argument bounds the search; it is a buffer position. +The match found must not extend after that position. +Optional third argument, if t, means if fail just return nil (no error). + If not nil and not t, move to limit of search and return nil. +Optional fourth argument is repeat count--search for successive occurrences. + +Relies on the function `word-search-regexp' to convert a sequence +of words in STRING to a regexp used to search words without regard +to punctuation." + (interactive "sWord search: ") + (re-search-forward (word-search-regexp string t) bound noerror count)) + + (defun isearch-query-replace (&optional delimited regexp-flag) "Start `query-replace' with string to replace from last search string. The arg DELIMITED (prefix arg if interactive), if non-nil, means replace === modified file 'src/ChangeLog' --- src/ChangeLog 2012-05-16 02:22:53 +0000 +++ src/ChangeLog 2012-05-17 00:03:49 +0000 @@ -1,3 +1,10 @@ +2012-05-17 Juri Linkov + + * search.c (Fword_search_regexp, Fword_search_backward) + (Fword_search_forward, Fword_search_backward_lax) + (Fword_search_forward_lax): Move functions to isearch.el + (bug#10145, bug#11381). + 2012-05-16 Paul Eggert * xgselect.c (xg_select): Just invoke 'select' if -nw (Bug#9754). === modified file 'src/search.c' --- src/search.c 2012-03-27 06:46:42 +0000 +++ src/search.c 2012-05-17 00:03:49 +0000 @@ -2078,102 +2078,6 @@ XSETBUFFER (last_thing_searched, current_buffer); } -DEFUN ("word-search-regexp", Fword_search_regexp, Sword_search_regexp, 1, 2, 0, - doc: /* Return a regexp which matches words, ignoring punctuation. -Given STRING, a string of words separated by word delimiters, -compute a regexp that matches those exact words separated by -arbitrary punctuation. If LAX is non-nil, the end of the string -need not match a word boundary unless it ends in whitespace. - -Used in `word-search-forward', `word-search-backward', -`word-search-forward-lax', `word-search-backward-lax'. */) - (Lisp_Object string, Lisp_Object lax) -{ - register unsigned char *o; - register EMACS_INT i, i_byte, len, punct_count = 0, word_count = 0; - Lisp_Object val; - int prev_c = 0; - EMACS_INT adjust; - int whitespace_at_end; - - CHECK_STRING (string); - len = SCHARS (string); - - for (i = 0, i_byte = 0; i < len; ) - { - int c; - - FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE (c, string, i, i_byte); - - if (SYNTAX (c) != Sword) - { - punct_count++; - if (SYNTAX (prev_c) == Sword) - word_count++; - } - - prev_c = c; - } - - if (SYNTAX (prev_c) == Sword) - { - word_count++; - whitespace_at_end = 0; - } - else - { - whitespace_at_end = 1; - if (!word_count) - return empty_unibyte_string; - } - - adjust = - punct_count + 5 * (word_count - 1) - + ((!NILP (lax) && !whitespace_at_end) ? 2 : 4); - if (STRING_MULTIBYTE (string)) - val = make_uninit_multibyte_string (len + adjust, - SBYTES (string) - + adjust); - else - val = make_uninit_string (len + adjust); - - o = SDATA (val); - *o++ = '\\'; - *o++ = 'b'; - prev_c = 0; - - for (i = 0, i_byte = 0; i < len; ) - { - int c; - EMACS_INT i_byte_orig = i_byte; - - FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE (c, string, i, i_byte); - - if (SYNTAX (c) == Sword) - { - memcpy (o, SDATA (string) + i_byte_orig, i_byte - i_byte_orig); - o += i_byte - i_byte_orig; - } - else if (SYNTAX (prev_c) == Sword && --word_count) - { - *o++ = '\\'; - *o++ = 'W'; - *o++ = '\\'; - *o++ = 'W'; - *o++ = '*'; - } - - prev_c = c; - } - - if (NILP (lax) || whitespace_at_end) - { - *o++ = '\\'; - *o++ = 'b'; - } - - return val; -} - DEFUN ("search-backward", Fsearch_backward, Ssearch_backward, 1, 4, "MSearch backward: ", doc: /* Search backward from point for STRING. @@ -2216,86 +2120,6 @@ return search_command (string, bound, noerror, count, 1, 0, 0); } -DEFUN ("word-search-backward", Fword_search_backward, Sword_search_backward, 1, 4, - "sWord search backward: ", - doc: /* Search backward from point for STRING, ignoring differences in punctuation. -Set point to the beginning of the occurrence found, and return point. -An optional second argument bounds the search; it is a buffer position. -The match found must not extend before that position. -Optional third argument, if t, means if fail just return nil (no error). - If not nil and not t, move to limit of search and return nil. -Optional fourth argument is repeat count--search for successive occurrences. - -Relies on the function `word-search-regexp' to convert a sequence -of words in STRING to a regexp used to search words without regard -to punctuation. */) - (Lisp_Object string, Lisp_Object bound, Lisp_Object noerror, Lisp_Object count) -{ - return search_command (Fword_search_regexp (string, Qnil), bound, noerror, count, -1, 1, 0); -} - -DEFUN ("word-search-forward", Fword_search_forward, Sword_search_forward, 1, 4, - "sWord search: ", - doc: /* Search forward from point for STRING, ignoring differences in punctuation. -Set point to the end of the occurrence found, and return point. -An optional second argument bounds the search; it is a buffer position. -The match found must not extend after that position. -Optional third argument, if t, means if fail just return nil (no error). - If not nil and not t, move to limit of search and return nil. -Optional fourth argument is repeat count--search for successive occurrences. - -Relies on the function `word-search-regexp' to convert a sequence -of words in STRING to a regexp used to search words without regard -to punctuation. */) - (Lisp_Object string, Lisp_Object bound, Lisp_Object noerror, Lisp_Object count) -{ - return search_command (Fword_search_regexp (string, Qnil), bound, noerror, count, 1, 1, 0); -} - -DEFUN ("word-search-backward-lax", Fword_search_backward_lax, Sword_search_backward_lax, 1, 4, - "sWord search backward: ", - doc: /* Search backward from point for STRING, ignoring differences in punctuation. -Set point to the beginning of the occurrence found, and return point. - -Unlike `word-search-backward', the end of STRING need not match a word -boundary, unless STRING ends in whitespace. - -An optional second argument bounds the search; it is a buffer position. -The match found must not extend before that position. -Optional third argument, if t, means if fail just return nil (no error). - If not nil and not t, move to limit of search and return nil. -Optional fourth argument is repeat count--search for successive occurrences. - -Relies on the function `word-search-regexp' to convert a sequence -of words in STRING to a regexp used to search words without regard -to punctuation. */) - (Lisp_Object string, Lisp_Object bound, Lisp_Object noerror, Lisp_Object count) -{ - return search_command (Fword_search_regexp (string, Qt), bound, noerror, count, -1, 1, 0); -} - -DEFUN ("word-search-forward-lax", Fword_search_forward_lax, Sword_search_forward_lax, 1, 4, - "sWord search: ", - doc: /* Search forward from point for STRING, ignoring differences in punctuation. -Set point to the end of the occurrence found, and return point. - -Unlike `word-search-forward', the end of STRING need not match a word -boundary, unless STRING ends in whitespace. - -An optional second argument bounds the search; it is a buffer position. -The match found must not extend after that position. -Optional third argument, if t, means if fail just return nil (no error). - If not nil and not t, move to limit of search and return nil. -Optional fourth argument is repeat count--search for successive occurrences. - -Relies on the function `word-search-regexp' to convert a sequence -of words in STRING to a regexp used to search words without regard -to punctuation. */) - (Lisp_Object string, Lisp_Object bound, Lisp_Object noerror, Lisp_Object count) -{ - return search_command (Fword_search_regexp (string, Qt), bound, noerror, count, 1, 1, 0); -} - DEFUN ("re-search-backward", Fre_search_backward, Sre_search_backward, 1, 4, "sRE search backward: ", doc: /* Search backward from point for match for regular expression REGEXP. @@ -3252,11 +3076,6 @@ defsubr (&Sposix_string_match); defsubr (&Ssearch_forward); defsubr (&Ssearch_backward); - defsubr (&Sword_search_regexp); - defsubr (&Sword_search_forward); - defsubr (&Sword_search_backward); - defsubr (&Sword_search_forward_lax); - defsubr (&Sword_search_backward_lax); defsubr (&Sre_search_forward); defsubr (&Sre_search_backward); defsubr (&Sposix_search_forward); ------------------------------------------------------------ revno: 108253 committer: Glenn Morris branch nick: trunk timestamp: Wed 2012-05-16 06:17:25 -0400 message: Auto-commit of generated files. diff: === modified file 'autogen/configure' --- autogen/configure 2012-05-13 10:18:50 +0000 +++ autogen/configure 2012-05-16 10:17:25 +0000 @@ -2379,6 +2379,45 @@ } # ac_fn_c_check_header_compile +# ac_fn_c_check_decl LINENO SYMBOL VAR +# ------------------------------------ +# Tests whether SYMBOL is declared, setting cache variable VAR accordingly. +ac_fn_c_check_decl () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5 +$as_echo_n "checking whether $2 is declared... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +#ifndef $2 + (void) $2; +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_decl + # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. @@ -2425,45 +2464,6 @@ } # ac_fn_c_try_link -# ac_fn_c_check_decl LINENO SYMBOL VAR -# ------------------------------------ -# Tests whether SYMBOL is declared, setting cache variable VAR accordingly. -ac_fn_c_check_decl () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5 -$as_echo_n "checking whether $2 is declared... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -#ifndef $2 - (void) $2; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_decl - # ac_fn_c_check_header_preproc LINENO HEADER VAR # ---------------------------------------------- # Tests whether HEADER is present, setting the cache variable VAR accordingly. @@ -4481,12 +4481,10 @@ * ) unported=yes ;; esac opsys=darwin - # Define CPP as follows to make autoconf work correctly. - CPP="${CC-cc} -E -no-cpp-precomp" # Use fink packages if available. + # FIXME? Is it really our business to decide this for the user? if test -d /sw/include && test -d /sw/lib; then GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib" - CPP="${CPP} ${GCC_TEST_OPTIONS}" NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS} fi ;; @@ -4521,7 +4519,6 @@ # Without defining _LANGUAGE_C, things get masked out in the headers # so that, for instance, grepping for `free' in stdlib.h fails and # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m). - NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C" NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C" ;; @@ -4538,18 +4535,15 @@ case "${canonical}" in *-sunos5.6* | *-solaris2.6* ) opsys=sol2-6 - NON_GNU_CPP=/usr/ccs/lib/cpp RANLIB="ar -ts" ;; *-sunos5.[7-9]* | *-solaris2.[7-9]* ) opsys=sol2-6 emacs_check_sunpro_c=yes - NON_GNU_CPP=/usr/ccs/lib/cpp ;; *-sunos5* | *-solaris* ) opsys=sol2-10 emacs_check_sunpro_c=yes - NON_GNU_CPP=/usr/ccs/lib/cpp ;; esac ## Watch out for a compiler that we know will not work. @@ -4570,12 +4564,10 @@ machine=intel386 case "${canonical}" in *-cygwin ) opsys=cygwin ;; - *-darwin* ) opsys=darwin - CPP="${CC-cc} -E -no-cpp-precomp" - ;; - *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;; - *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;; - *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;; + *-darwin* ) opsys=darwin ;; + *-sysv4.2uw* ) opsys=unixware ;; + *-sysv5uw* ) opsys=unixware ;; + *-sysv5OpenUNIX* ) opsys=unixware ;; ## Otherwise, we'll fall through to the generic opsys code at the bottom. esac ;; @@ -4616,10 +4608,6 @@ #### Choose a compiler. -test -n "$CC" && cc_specified=yes - -# Save the value of CFLAGS that the user specified. -SPECIFIED_CFLAGS="$CFLAGS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -5728,7 +5716,13 @@ -# Initialize gnulib right after verifying that the C compiler works. +if test x$GCC = xyes; then + test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS" +else + test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS" +fi + +# Initialize gnulib right after choosing the compiler. ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -7004,74 +6998,6 @@ # Code from module warnings: -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi - -## If not using gcc, and on Solaris, and no CPP specified, see if -## using a Sun compiler, which needs -Xs to prevent whitespace. -if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \ - test x"$CPP" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using a Sun C compiler" >&5 -$as_echo_n "checking whether we are using a Sun C compiler... " >&6; } - if test "${emacs_cv_sunpro_c+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __SUNPRO_C -fail; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - emacs_cv_sunpro_c=yes -else - emacs_cv_sunpro_c=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_sunpro_c" >&5 -$as_echo "$emacs_cv_sunpro_c" >&6; } - - if test x"$emacs_cv_sunpro_c" = xyes; then - NON_GNU_CPP="$CC -E -Xs" - fi -fi - -#### Some systems specify a CPP to use unless we are using GCC. -#### Now that we know whether we are using GCC, we can decide whether -#### to use that one. -if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x -then - CPP="$NON_GNU_CPP" -fi - -#### Some systems specify a CC to use unless we are using GCC. -#### Now that we know whether we are using GCC, we can decide whether -#### to use that one. -if test "x$NON_GNU_CC" != x && test x$GCC != xyes && - test x$cc_specified != xyes -then - CC="$NON_GNU_CC" -fi - -if test x$GCC = xyes; then - test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS" -else - test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS" -fi - # Check whether --enable-gcc-warnings was given. if test "${enable_gcc_warnings+set}" = set; then : enableval=$enable_gcc_warnings; case $enableval in @@ -7755,241 +7681,6 @@ -#### Some other nice autoconf tests. - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -if test "x$RANLIB" = x; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -fi ## Although we're running on an amd64 kernel, we're actually compiling for ## the x86 architecture. The user should probably have provided an @@ -8289,11 +7980,6 @@ conftest$ac_exeext conftest.$ac_ext -# The value of CPP is a quoted variable reference, so we need to do this -# to get its actual value... -CPP=`eval "echo $CPP"` - - test "x$CANNOT_DUMP" = "x" && CANNOT_DUMP=no case "$opsys" in your-opsys-here) CANNOT_DUMP=yes ;; @@ -23892,7 +23578,7 @@ # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" -GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPPFLAGS="$CPPFLAGS" +GCC="$GCC" CPPFLAGS="$CPPFLAGS" _ACEOF ------------------------------------------------------------ revno: 108252 committer: Paul Eggert branch nick: trunk timestamp: Wed 2012-05-16 02:01:55 -0700 message: * configure.in: Simplify by removing CPP etc. (CPP_TEST_OPTIONS, NON_GNU_CPP, cc_specified, SPECIFIED_CFLAGS) (SPECIFED_CPP, CPP, NON_GNU_CC, AC_PROG_CPP): Remove; not needed. In particular we no longer need to fiddle with CPP, since we don't use CPP specially any more. (gl_EARLY): Invoke this after adjusting CC, so that it uses the adjusted compiler. (AC_PROG_INSTALL, AC_PROG_MKDIR_P, AC_PROG_RANLIB): Comment out, since gl_EARLY and/or Autoconf already does these. diff: === modified file 'ChangeLog' --- ChangeLog 2012-05-16 06:15:52 +0000 +++ ChangeLog 2012-05-16 09:01:55 +0000 @@ -1,3 +1,15 @@ +2012-05-16 Paul Eggert + + * configure.in: Simplify by removing CPP etc. + (CPP_TEST_OPTIONS, NON_GNU_CPP, cc_specified, SPECIFIED_CFLAGS) + (SPECIFED_CPP, CPP, NON_GNU_CC, AC_PROG_CPP): Remove; not needed. + In particular we no longer need to fiddle with CPP, since we don't + use CPP specially any more. + (gl_EARLY): Invoke this after adjusting CC, so that it uses the + adjusted compiler. + (AC_PROG_INSTALL, AC_PROG_MKDIR_P, AC_PROG_RANLIB): Comment out, + since gl_EARLY and/or Autoconf already does these. + 2012-05-16 Glenn Morris * configure.in: Try to fix building with gcc >= 4.6 on Darwin. === modified file 'configure.in' --- configure.in 2012-05-16 06:15:52 +0000 +++ configure.in 2012-05-16 09:01:55 +0000 @@ -496,7 +496,6 @@ # FIXME? Is it really our business to decide this for the user? if test -d /sw/include && test -d /sw/lib; then GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib" - CPP_TEST_OPTIONS=${GCC_TEST_OPTIONS} NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS} fi ;; @@ -531,7 +530,6 @@ # Without defining _LANGUAGE_C, things get masked out in the headers # so that, for instance, grepping for `free' in stdlib.h fails and # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m). - NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C" NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C" ;; @@ -548,18 +546,15 @@ case "${canonical}" in *-sunos5.6* | *-solaris2.6* ) opsys=sol2-6 - NON_GNU_CPP=/usr/ccs/lib/cpp RANLIB="ar -ts" ;; *-sunos5.[7-9]* | *-solaris2.[7-9]* ) opsys=sol2-6 emacs_check_sunpro_c=yes - NON_GNU_CPP=/usr/ccs/lib/cpp ;; *-sunos5* | *-solaris* ) opsys=sol2-10 emacs_check_sunpro_c=yes - NON_GNU_CPP=/usr/ccs/lib/cpp ;; esac ## Watch out for a compiler that we know will not work. @@ -581,9 +576,9 @@ case "${canonical}" in *-cygwin ) opsys=cygwin ;; *-darwin* ) opsys=darwin ;; - *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;; - *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;; - *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;; + *-sysv4.2uw* ) opsys=unixware ;; + *-sysv5uw* ) opsys=unixware ;; + *-sysv5OpenUNIX* ) opsys=unixware ;; ## Otherwise, we'll fall through to the generic opsys code at the bottom. esac ;; @@ -625,111 +620,20 @@ #### Choose a compiler. -test -n "$CC" && cc_specified=yes - -# Save the value of CFLAGS that the user specified. -SPECIFIED_CFLAGS="$CFLAGS" - -# Save specified CPP (if any), before AC_PROG_CPP runs. -SPECIFIED_CPP="$CPP" dnl Sets GCC=yes if using gcc. AC_PROG_CC AM_PROG_CC_C_O -# Initialize gnulib right after verifying that the C compiler works. -# Note: this ends up setting CPP. -gl_EARLY - -dnl Note: looks like gl_EARLY has already done this (via AC_PROG_CPP). -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi - -## If not using gcc, and on Solaris, and no CPP specified, see if -## using a Sun compiler, which needs -Xs to prevent whitespace. -if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \ - test x"$CPP" = x; then - AC_MSG_CHECKING([whether we are using a Sun C compiler]) - AC_CACHE_VAL(emacs_cv_sunpro_c, - [AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], -[[#ifndef __SUNPRO_C -fail; -#endif -]])], emacs_cv_sunpro_c=yes, emacs_cv_sunpro_c=no)]) - AC_MSG_RESULT($emacs_cv_sunpro_c) - - if test x"$emacs_cv_sunpro_c" = xyes; then - NON_GNU_CPP="$CC -E -Xs" - fi -fi - -## If using gcc, and on darwin, see if using Apple's gcc, where old -## (pre gcc 3.3?) versions need -no-cpp-precomp to workaround some -## (unrecorded) issue. -## Frankly, I suspect this option is no longer needed on any system -## still in use today. It is at best a no-op since Apple's version -## of gcc 3.3 (?), which corresponds (?) to Xcode 1.5 from 2004. -## This was for OS X 10.3, and the nextstep port (for example) -## only supports 10.4 or later (although you could be building a -## non-ns version on some older OS X I guess). -if test x"$opsys" = xdarwin && test x"$GCC" = xyes; then - AC_MSG_CHECKING([whether we are using an Apple version of GCC]) - AC_CACHE_VAL(emacs_cv_apple_gcc, - [AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], -[[#ifndef __APPLE_CC__ -fail; -#endif -]])], emacs_cv_apple_gcc=yes, emacs_cv_apple_gcc=no)]) - AC_MSG_RESULT($emacs_cv_apple_gcc) - - ## This only tests that adding the option does not cause an error. - ## FIXME It may still cause "unrecognized option" - ## (in gcc < 4.6 --no-foo does that; newer versions throw an error). - ## The message appears on stderr, so AC_EGREP_CPP is no use. - ## It would be better to test if it is actually needed. - ## For that, someone would have actually had to document what the - ## issues it worked around were, so we could test for them. - if test $emacs_cv_apple_gcc = yes; then - AC_MSG_CHECKING([whether preprocessor accepts -no-cpp-precomp]) - save_CPP="$CPP" - test x$SPECIFIED_CPP = x && CPP="${CC-cc} -E" - CPP="$CPP -no-cpp-precomp" - dnl NB this will run AC_PROG_CPP first if it has not already happened. - AC_CACHE_VAL(emacs_cv_precomp, - [AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[]],[[]])], emacs_cv_precomp=yes, emacs_cv_precomp=no)]) - AC_MSG_RESULT($emacs_cv_precomp) - - test $emacs_cv_precomp = no && CPP="$save_CPP" - fi -fi - -#### Some systems specify a CPP to use unless we are using GCC. -#### Now that we know whether we are using GCC, we can decide whether -#### to use that one. -if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x -then - CPP="$NON_GNU_CPP" -fi - -test "x$CPP_TEST_OPTIONS" != x && CPP="$CPP $CPP_TEST_OPTIONS" - -#### Some systems specify a CC to use unless we are using GCC. -#### Now that we know whether we are using GCC, we can decide whether -#### to use that one. -if test "x$NON_GNU_CC" != x && test x$GCC != xyes && - test x$cc_specified != xyes -then - CC="$NON_GNU_CC" -fi - if test x$GCC = xyes; then test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS" else test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS" fi +# Initialize gnulib right after choosing the compiler. +gl_EARLY + AC_ARG_ENABLE([gcc-warnings], [AS_HELP_STRING([--enable-gcc-warnings], [turn on lots of GCC warnings (for developers)])], @@ -847,19 +751,13 @@ -#### Some other nice autoconf tests. - -dnl Note: looks like gl_EARLY has already done this. -AC_PROG_CPP -AC_PROG_INSTALL - -dnl Note: looks like configure does this very early on anyway. -AC_PROG_MKDIR_P - -dnl Note: looks like gl_EARLY has already done this. -if test "x$RANLIB" = x; then - AC_PROG_RANLIB -fi +dnl Some other nice autoconf tests. +dnl These are commented out, since gl_EARLY and/or Autoconf already does them. +dnl AC_PROG_INSTALL +dnl AC_PROG_MKDIR_P +dnl if test "x$RANLIB" = x; then +dnl AC_PROG_RANLIB +dnl fi ## Although we're running on an amd64 kernel, we're actually compiling for ## the x86 architecture. The user should probably have provided an @@ -950,11 +848,6 @@ [AC_MSG_RESULT(no)]) -# The value of CPP is a quoted variable reference, so we need to do this -# to get its actual value... -CPP=`eval "echo $CPP"` - - dnl The function dump-emacs will not be defined and temacs will do dnl (load "loadup") automatically unless told otherwise. test "x$CANNOT_DUMP" = "x" && CANNOT_DUMP=no @@ -3982,7 +3875,7 @@ AC_CONFIG_COMMANDS([epaths], [ echo creating src/epaths.h ${MAKE-make} epaths-force -], [GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPPFLAGS="$CPPFLAGS"]) +], [GCC="$GCC" CPPFLAGS="$CPPFLAGS"]) AC_CONFIG_COMMANDS([gdbinit], [ if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then ------------------------------------------------------------ revno: 108251 committer: Agustin Martin branch nick: trunk timestamp: Wed 2012-05-16 10:35:11 +0200 message: textmodes/flyspell.el: Delay for otherchars as for normal word components. (flyspell-check-pre-word-p, flyspell-check-word-p, flyspell-debug-signal-word-checked): Use for otherchars the same delay used for other word components, so word is not inmediately checked unless we are in a char that is neither a normal word component nor an otherchar. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-05-16 01:57:20 +0000 +++ lisp/ChangeLog 2012-05-16 08:35:11 +0000 @@ -1,3 +1,9 @@ +2012-05-16 Agustín Martín Domingo + + * flyspell.el (flyspell-check-pre-word-p, flyspell-check-word-p) + (flyspell-debug-signal-word-checked): Delay for otherchars as for + normal word components. + 2012-05-16 Stefan Monnier * minibuffer.el (completion--sifn-requote): Fix last change. === modified file 'lisp/textmodes/flyspell.el' --- lisp/textmodes/flyspell.el 2012-04-23 10:33:25 +0000 +++ lisp/textmodes/flyspell.el 2012-05-16 08:35:11 +0000 @@ -739,7 +739,10 @@ (eq flyspell-pre-pre-buffer flyspell-pre-buffer)) nil) ((or (and (= flyspell-pre-point (- (point) 1)) - (eq (char-syntax (char-after flyspell-pre-point)) ?w)) + (or (eq (char-syntax (char-after flyspell-pre-point)) ?w) + (string-match-p (ispell-get-otherchars) + (buffer-substring-no-properties + flyspell-pre-point (1+ flyspell-pre-point))))) (= flyspell-pre-point (point)) (= flyspell-pre-point (+ (point) 1))) nil) @@ -753,7 +756,10 @@ ;; If other post-command-hooks change the buffer, ;; flyspell-pre-point can lie past eob (bug#468). (null (char-after flyspell-pre-point)) - (eq (char-syntax (char-after flyspell-pre-point)) ?w))) + (or (eq (char-syntax (char-after flyspell-pre-point)) ?w) + (string-match-p (ispell-get-otherchars) + (buffer-substring-no-properties + flyspell-pre-point (1+ flyspell-pre-point)))))) nil) ((not (eq (current-buffer) flyspell-pre-buffer)) t) @@ -815,6 +821,7 @@ (save-excursion (backward-char 1) (and (looking-at (flyspell-get-not-casechars)) + (not (looking-at (ispell-get-otherchars))) (or flyspell-consider-dash-as-word-delimiter-flag (not (looking-at "-")))))) ;; yes because we have reached or typed a word delimiter. @@ -880,6 +887,7 @@ (save-excursion (backward-char 1) (and (and (looking-at (flyspell-get-not-casechars)) 1) + (not (looking-at (ispell-get-otherchars))) (and (or flyspell-consider-dash-as-word-delimiter-flag (not (looking-at "\\-"))) 2)))))) c)))) @@ -895,6 +903,7 @@ (save-excursion (backward-char 1) (and (looking-at (flyspell-get-not-casechars)) + (not (looking-at (ispell-get-otherchars))) (or flyspell-consider-dash-as-word-delimiter-flag (not (looking-at "\\-")))))))) c)) ------------------------------------------------------------ revno: 108250 fixes bug(s): http://debbugs.gnu.org/9755 committer: Glenn Morris branch nick: trunk timestamp: Tue 2012-05-15 23:15:52 -0700 message: Try to fix building with gcc >= 4.6 on Darwin. Eg, hydra builds have been failing for some time because (?) of this. In gcc < 4.6, unrecognized -no-fo options just cause a warning. In 4.6 and later, they cause an error. * configure.in: (CPP): Do not unconditionally set it on Darwin. Instead, try to test if -no-cpp-precomp is accepted. (CPP_TEST_OPTIONS, SPECIFIED_CPP): New. diff: === modified file 'ChangeLog' --- ChangeLog 2012-05-15 19:13:17 +0000 +++ ChangeLog 2012-05-16 06:15:52 +0000 @@ -1,3 +1,10 @@ +2012-05-16 Glenn Morris + + * configure.in: Try to fix building with gcc >= 4.6 on Darwin. + (CPP): Do not unconditionally set it on Darwin. + Instead, try to test if -no-cpp-precomp is accepted. + (CPP_TEST_OPTIONS, SPECIFIED_CPP): New. (Bug#9755) + 2012-05-15 Glenn Morris * Makefile.in (install-arch-dep): Replace use of MV_DIRS. === modified file 'configure.in' --- configure.in 2012-05-12 18:10:37 +0000 +++ configure.in 2012-05-16 06:15:52 +0000 @@ -492,12 +492,11 @@ * ) unported=yes ;; esac opsys=darwin - # Define CPP as follows to make autoconf work correctly. - CPP="${CC-cc} -E -no-cpp-precomp" # Use fink packages if available. + # FIXME? Is it really our business to decide this for the user? if test -d /sw/include && test -d /sw/lib; then GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib" - CPP="${CPP} ${GCC_TEST_OPTIONS}" + CPP_TEST_OPTIONS=${GCC_TEST_OPTIONS} NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS} fi ;; @@ -581,9 +580,7 @@ machine=intel386 case "${canonical}" in *-cygwin ) opsys=cygwin ;; - *-darwin* ) opsys=darwin - CPP="${CC-cc} -E -no-cpp-precomp" - ;; + *-darwin* ) opsys=darwin ;; *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;; *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;; *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;; @@ -633,13 +630,18 @@ # Save the value of CFLAGS that the user specified. SPECIFIED_CFLAGS="$CFLAGS" +# Save specified CPP (if any), before AC_PROG_CPP runs. +SPECIFIED_CPP="$CPP" + dnl Sets GCC=yes if using gcc. AC_PROG_CC AM_PROG_CC_C_O # Initialize gnulib right after verifying that the C compiler works. +# Note: this ends up setting CPP. gl_EARLY +dnl Note: looks like gl_EARLY has already done this (via AC_PROG_CPP). # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -663,6 +665,46 @@ fi fi +## If using gcc, and on darwin, see if using Apple's gcc, where old +## (pre gcc 3.3?) versions need -no-cpp-precomp to workaround some +## (unrecorded) issue. +## Frankly, I suspect this option is no longer needed on any system +## still in use today. It is at best a no-op since Apple's version +## of gcc 3.3 (?), which corresponds (?) to Xcode 1.5 from 2004. +## This was for OS X 10.3, and the nextstep port (for example) +## only supports 10.4 or later (although you could be building a +## non-ns version on some older OS X I guess). +if test x"$opsys" = xdarwin && test x"$GCC" = xyes; then + AC_MSG_CHECKING([whether we are using an Apple version of GCC]) + AC_CACHE_VAL(emacs_cv_apple_gcc, + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], +[[#ifndef __APPLE_CC__ +fail; +#endif +]])], emacs_cv_apple_gcc=yes, emacs_cv_apple_gcc=no)]) + AC_MSG_RESULT($emacs_cv_apple_gcc) + + ## This only tests that adding the option does not cause an error. + ## FIXME It may still cause "unrecognized option" + ## (in gcc < 4.6 --no-foo does that; newer versions throw an error). + ## The message appears on stderr, so AC_EGREP_CPP is no use. + ## It would be better to test if it is actually needed. + ## For that, someone would have actually had to document what the + ## issues it worked around were, so we could test for them. + if test $emacs_cv_apple_gcc = yes; then + AC_MSG_CHECKING([whether preprocessor accepts -no-cpp-precomp]) + save_CPP="$CPP" + test x$SPECIFIED_CPP = x && CPP="${CC-cc} -E" + CPP="$CPP -no-cpp-precomp" + dnl NB this will run AC_PROG_CPP first if it has not already happened. + AC_CACHE_VAL(emacs_cv_precomp, + [AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[]],[[]])], emacs_cv_precomp=yes, emacs_cv_precomp=no)]) + AC_MSG_RESULT($emacs_cv_precomp) + + test $emacs_cv_precomp = no && CPP="$save_CPP" + fi +fi + #### Some systems specify a CPP to use unless we are using GCC. #### Now that we know whether we are using GCC, we can decide whether #### to use that one. @@ -671,6 +713,8 @@ CPP="$NON_GNU_CPP" fi +test "x$CPP_TEST_OPTIONS" != x && CPP="$CPP $CPP_TEST_OPTIONS" + #### Some systems specify a CC to use unless we are using GCC. #### Now that we know whether we are using GCC, we can decide whether #### to use that one. @@ -805,12 +849,16 @@ #### Some other nice autoconf tests. -dnl checks for programs +dnl Note: looks like gl_EARLY has already done this. AC_PROG_CPP AC_PROG_INSTALL + +dnl Note: looks like configure does this very early on anyway. AC_PROG_MKDIR_P + +dnl Note: looks like gl_EARLY has already done this. if test "x$RANLIB" = x; then - AC_PROG_RANLIB + AC_PROG_RANLIB fi ## Although we're running on an amd64 kernel, we're actually compiling for