Now on revision 108250. ------------------------------------------------------------ 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 ------------------------------------------------------------ revno: 108249 fixes bug(s): http://debbugs.gnu.org/9754 committer: Paul Eggert branch nick: trunk timestamp: Tue 2012-05-15 19:22:53 -0700 message: * xgselect.c (xg_select): Just invoke 'select' if -nw. Suggested by Ken Brown. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-05-15 20:20:18 +0000 +++ src/ChangeLog 2012-05-16 02:22:53 +0000 @@ -1,3 +1,7 @@ +2012-05-16 Paul Eggert + + * xgselect.c (xg_select): Just invoke 'select' if -nw (Bug#9754). + 2012-05-15 Stefan Monnier * lread.c (init_obarray): Declare Qt and Qnil as special. === modified file 'src/xgselect.c' --- src/xgselect.c 2012-05-10 05:27:24 +0000 +++ src/xgselect.c 2012-05-16 02:22:53 +0000 @@ -38,17 +38,21 @@ SELECT_TYPE all_rfds, all_wfds; EMACS_TIME tmo, *tmop = timeout; - GMainContext *context = g_main_context_default (); + GMainContext *context; int have_wfds = wfds != NULL; int n_gfds = 0, our_tmo = 0, retval = 0, our_fds = 0; int i, nfds, fds_lim, tmo_in_millisec; + if (inhibit_window_system || !display_arg) + return select (max_fds, rfds, wfds, efds, timeout); + if (rfds) memcpy (&all_rfds, rfds, sizeof (all_rfds)); else FD_ZERO (&all_rfds); if (wfds) memcpy (&all_wfds, wfds, sizeof (all_rfds)); else FD_ZERO (&all_wfds); /* Update event sources in GLib. */ + context = g_main_context_default (); g_main_context_pending (context); do { ------------------------------------------------------------ revno: 108248 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2012-05-15 21:57:20 -0400 message: * lisp/minibuffer.el (completion--sifn-requote): Fix last change. (minibuffer-local-must-match-filename-map): Move define-obsolete-variable-alias before its var. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-05-15 18:45:27 +0000 +++ lisp/ChangeLog 2012-05-16 01:57:20 +0000 @@ -1,3 +1,9 @@ +2012-05-16 Stefan Monnier + + * minibuffer.el (completion--sifn-requote): Fix last change. + (minibuffer-local-must-match-filename-map): + Move define-obsolete-variable-alias before its var. + 2012-05-15 Stefan Monnier * emacs-lisp/pcase.el (pcase-let*, pcase-let): Fix edebug spec. === modified file 'lisp/minibuffer.el' --- lisp/minibuffer.el 2012-05-15 18:07:36 +0000 +++ lisp/minibuffer.el 2012-05-16 01:57:20 +0000 @@ -1952,10 +1952,10 @@ Gets combined either with `minibuffer-local-completion-map' or with `minibuffer-local-must-match-map'.") +(define-obsolete-variable-alias 'minibuffer-local-must-match-filename-map + 'minibuffer-local-filename-must-match-map "23.1") (defvar minibuffer-local-filename-must-match-map (make-sparse-keymap)) (make-obsolete-variable 'minibuffer-local-filename-must-match-map nil "24.1") -(define-obsolete-variable-alias 'minibuffer-local-must-match-filename-map - 'minibuffer-local-filename-must-match-map "23.1") (let ((map minibuffer-local-ns-map)) (define-key map " " 'exit-minibuffer) @@ -2132,13 +2132,15 @@ ;; Kind of like in rfn-eshadow-update-overlay, only worse. (let ((qpos 0)) ;; Handle substitute-in-file-name's truncation behavior. - (while (and (string-match "[\\/][~/\\]" qstr qpos) - ;; Hopefully our regexp covers all truncation cases. - ;; Also let's make sure sifn indeed truncates here. - (let ((tpos (1+ (match-beginning 0)))) - (equal (substitute-in-file-name qstr) - (substitute-in-file-name (substring qstr tpos))))) - (setq qpos tpos)) + (let (tpos) + (while (and (string-match "[\\/][~/\\]" qstr qpos) + ;; Hopefully our regexp covers all truncation cases. + ;; Also let's make sure sifn indeed truncates here. + (progn + (setq tpos (1+ (match-beginning 0))) + (equal (substitute-in-file-name qstr) + (substitute-in-file-name (substring qstr tpos))))) + (setq qpos tpos))) ;; `upos' is relative to the position corresponding to `qpos' in ;; (substitute-in-file-name qstr), so as qpos moves forward, upos ;; gets smaller. ------------------------------------------------------------ revno: 108247 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2012-05-15 16:20:18 -0400 message: * src/lread.c (init_obarray): Declare Qt and Qnil as special. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-05-14 16:33:11 +0000 +++ src/ChangeLog 2012-05-15 20:20:18 +0000 @@ -1,3 +1,7 @@ +2012-05-15 Stefan Monnier + + * lread.c (init_obarray): Declare Qt and Qnil as special. + 2012-05-14 Glenn Morris * nsterm.m (ns_init_paths): Fix typo ("libexec" not "lib-exec"). === modified file 'src/lread.c' --- src/lread.c 2012-04-14 01:46:06 +0000 +++ src/lread.c 2012-05-15 20:20:18 +0000 @@ -24,7 +24,7 @@ #include #include #include -#include /* for CHAR_BIT */ +#include /* For CHAR_BIT. */ #include #include "lisp.h" #include "intervals.h" @@ -3990,10 +3990,12 @@ /* XSYMBOL (Qnil)->function = Qunbound; */ SET_SYMBOL_VAL (XSYMBOL (Qnil), Qnil); XSYMBOL (Qnil)->constant = 1; + XSYMBOL (Qnil)->declared_special = 1; XSYMBOL (Qnil)->plist = Qnil; Qt = intern_c_string ("t"); SET_SYMBOL_VAL (XSYMBOL (Qt), Qt); + XSYMBOL (Qnil)->declared_special = 1; XSYMBOL (Qt)->constant = 1; /* Qt is correct even if CANNOT_DUMP. loadup.el will set to nil at end. */ ------------------------------------------------------------ revno: 108246 committer: Glenn Morris branch nick: trunk timestamp: Tue 2012-05-15 15:17:24 -0400 message: Tweak line-breaks in previous change diff: === modified file 'Makefile.in' --- Makefile.in 2012-05-15 19:13:17 +0000 +++ Makefile.in 2012-05-15 19:17:24 +0000 @@ -470,7 +470,9 @@ ( cd ${ns_appresdir} ; \ if test -d share/emacs ; then \ for dir in share/emacs/${version}/*; do \ - rm -fr `basename "$$dir"`; mv "$$dir" . ; done; fi ; \ + rm -fr `basename "$$dir"`; mv "$$dir" . ; \ + done ; \ + fi ; \ if test -d share/info ; then rm -fr info; mv share/info . ; fi ; \ rm -fr share ) ; \ ( if cd ${ns_appbindir}/libexec ; then \ ------------------------------------------------------------ revno: 108245 committer: Glenn Morris branch nick: trunk timestamp: Tue 2012-05-15 15:13:17 -0400 message: * Makefile.in (install-arch-dep): Replace last user of MV_DIRS. diff: === modified file 'ChangeLog' --- ChangeLog 2012-05-15 17:55:39 +0000 +++ ChangeLog 2012-05-15 19:13:17 +0000 @@ -1,7 +1,6 @@ 2012-05-15 Glenn Morris - * Makefile.in (install-arch-dep): Replace use of MV_DIRS with info, - and with libexec. + * Makefile.in (install-arch-dep): Replace use of MV_DIRS. * Makefile.in (install-arch-dep): Do not hard-code version number. === modified file 'Makefile.in' --- Makefile.in 2012-05-15 17:55:39 +0000 +++ Makefile.in 2012-05-15 19:13:17 +0000 @@ -451,8 +451,6 @@ install: all install-arch-indep install-arch-dep install-leim blessmail @true -MV_DIRS = for i in $$dir; do rm -fr `basename "$$i"` ; mv "$$i" . ; done - ### Install the executables that were compiled specifically for this machine. ### It would be nice to do something for a parallel make ### to ensure that install-arch-indep finishes before this starts. @@ -470,7 +468,9 @@ -ln $(DESTDIR)${bindir}/$(EMACSFULL) $(DESTDIR)${bindir}/$(EMACS) if test "${ns_appresdir}" != ""; then \ ( cd ${ns_appresdir} ; \ - if test -d share/emacs ; then dir=share/emacs/*/*; $(MV_DIRS); fi;\ + if test -d share/emacs ; then \ + for dir in share/emacs/${version}/*; do \ + rm -fr `basename "$$dir"`; mv "$$dir" . ; done; fi ; \ if test -d share/info ; then rm -fr info; mv share/info . ; fi ; \ rm -fr share ) ; \ ( if cd ${ns_appbindir}/libexec ; then \ ------------------------------------------------------------ revno: 108244 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2012-05-15 14:45:27 -0400 message: * lisp/emacs-lisp/pcase.el (pcase-let*, pcase-let): Fix edebug spec. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-05-15 18:07:36 +0000 +++ lisp/ChangeLog 2012-05-15 18:45:27 +0000 @@ -1,5 +1,7 @@ 2012-05-15 Stefan Monnier + * emacs-lisp/pcase.el (pcase-let*, pcase-let): Fix edebug spec. + * minibuffer.el (completion--sifn-requote): Handle sifn's truncation behavior. (completion--string-equal-p): New function. === modified file 'lisp/emacs-lisp/pcase.el' --- lisp/emacs-lisp/pcase.el 2012-05-05 02:05:49 +0000 +++ lisp/emacs-lisp/pcase.el 2012-05-15 18:45:27 +0000 @@ -113,7 +113,8 @@ "Like `let*' but where you can use `pcase' patterns for bindings. BODY should be an expression, and BINDINGS should be a list of bindings of the form (UPAT EXP)." - (declare (indent 1) (debug let)) + (declare (indent 1) + (debug ((&rest &or (sexp &optional form) symbolp) body))) (cond ((null bindings) (if (> (length body) 1) `(progn ,@body) (car body))) ((pcase--trivial-upat-p (caar bindings)) @@ -132,7 +133,7 @@ "Like `let' but where you can use `pcase' patterns for bindings. BODY should be a list of expressions, and BINDINGS should be a list of bindings of the form (UPAT EXP)." - (declare (indent 1) (debug let)) + (declare (indent 1) (debug pcase-let*)) (if (null (cdr bindings)) `(pcase-let* ,bindings ,@body) (let ((matches '())) ------------------------------------------------------------ revno: 108243 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2012-05-15 14:07:36 -0400 message: * lisp/minibuffer.el (completion--sifn-requote): Handle sifn's truncation behavior. (completion--string-equal-p): New function. (completion--twq-all): Use it to get better assertion failure data. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-05-15 16:58:35 +0000 +++ lisp/ChangeLog 2012-05-15 18:07:36 +0000 @@ -1,5 +1,10 @@ 2012-05-15 Stefan Monnier + * minibuffer.el (completion--sifn-requote): Handle sifn's truncation + behavior. + (completion--string-equal-p): New function. + (completion--twq-all): Use it to get better assertion failure data. + Only handle ".." and '..' quoting in shell-mode (bug#11466). * shell.el (shell--unquote&requote-argument, shell--unquote-argument) (shell--requote-argument): New functions. === modified file 'lisp/minibuffer.el' --- lisp/minibuffer.el 2012-05-11 17:11:03 +0000 +++ lisp/minibuffer.el 2012-05-15 18:07:36 +0000 @@ -508,6 +508,9 @@ (assert (equal (funcall unquote qstring) completion)) (cons qstring qpoint))) +(defun completion--string-equal-p (s1 s2) + (eq t (compare-strings s1 nil nil s2 nil nil 'ignore-case))) + (defun completion--twq-all (string ustring completions boundary unquote requote) (when completions @@ -519,10 +522,10 @@ (`(,qfullpos . ,qfun) (funcall requote (+ boundary (length prefix)) string)) (qfullprefix (substring string 0 qfullpos)) - (_ (assert (eq t (compare-strings - (funcall unquote qfullprefix) nil nil - (concat (substring ustring 0 boundary) prefix) - nil nil 'ignore-case)))) + (_ (assert (completion--string-equal-p + (funcall unquote qfullprefix) + (concat (substring ustring 0 boundary) prefix)) + t)) (qboundary (car (funcall requote boundary string))) (_ (assert (<= qboundary qfullpos))) ;; FIXME: this split/quote/concat business messes up the carefully @@ -552,14 +555,13 @@ (qnew (funcall qfun new)) (qcompletion (concat qprefix qnew))) (assert - (eq t (compare-strings - (funcall unquote - (concat (substring string 0 qboundary) - qcompletion)) - nil nil - (concat (substring ustring 0 boundary) - completion) - nil nil 'ignore-case))) + (completion--string-equal-p + (funcall unquote + (concat (substring string 0 qboundary) + qcompletion)) + (concat (substring ustring 0 boundary) + completion)) + t) qcompletion)) completions) qboundary)))) @@ -2121,7 +2123,25 @@ "use the regular PRED argument" "23.2") (defun completion--sifn-requote (upos qstr) + ;; We're looking for `qupos' such that: + ;; (equal (substring (substitute-in-file-name qstr) 0 upos) + ;; (substitute-in-file-name (substring qstr 0 qupos))) + ;; Big problem here: we have to reverse engineer substitute-in-file-name to + ;; find the position corresponding to UPOS in QSTR, but + ;; substitute-in-file-name can do anything, depending on file-name-handlers. + ;; Kind of like in rfn-eshadow-update-overlay, only worse. (let ((qpos 0)) + ;; Handle substitute-in-file-name's truncation behavior. + (while (and (string-match "[\\/][~/\\]" qstr qpos) + ;; Hopefully our regexp covers all truncation cases. + ;; Also let's make sure sifn indeed truncates here. + (let ((tpos (1+ (match-beginning 0)))) + (equal (substitute-in-file-name qstr) + (substitute-in-file-name (substring qstr tpos))))) + (setq qpos tpos)) + ;; `upos' is relative to the position corresponding to `qpos' in + ;; (substitute-in-file-name qstr), so as qpos moves forward, upos + ;; gets smaller. (while (and (> upos 0) (string-match "\\$\\(\\$\\|\\([[:alnum:]_]+\\|{[^}]*}\\)\\)?" qstr qpos)) ------------------------------------------------------------ revno: 108242 committer: Glenn Morris branch nick: trunk timestamp: Tue 2012-05-15 13:55:39 -0400 message: * Makefile.in (install-arch-dep): Replace use of MV_DIRS with libexec. diff: === modified file 'ChangeLog' --- ChangeLog 2012-05-15 17:49:59 +0000 +++ ChangeLog 2012-05-15 17:55:39 +0000 @@ -1,6 +1,7 @@ 2012-05-15 Glenn Morris - * Makefile.in (install-arch-dep): Replace use of MV_DIRS with info. + * Makefile.in (install-arch-dep): Replace use of MV_DIRS with info, + and with libexec. * Makefile.in (install-arch-dep): Do not hard-code version number. === modified file 'Makefile.in' --- Makefile.in 2012-05-15 17:49:59 +0000 +++ Makefile.in 2012-05-15 17:55:39 +0000 @@ -473,9 +473,9 @@ if test -d share/emacs ; then dir=share/emacs/*/*; $(MV_DIRS); fi;\ if test -d share/info ; then rm -fr info; mv share/info . ; fi ; \ rm -fr share ) ; \ - ( cd ${ns_appbindir} ; \ - if cd libexec ; then dir=emacs/*/*/* ; $(MV_DIRS); \ - rm -fr emacs; rm -f ../bin/emacs ../bin/$(EMACSFULL) ; \ + ( if cd ${ns_appbindir}/libexec ; then \ + mv -f emacs/${version}/${configuration}/* . ; rm -fr emacs ; \ + rm -f ../bin/emacs ../bin/$(EMACSFULL) ; \ fi ) ; \ else true ; fi ------------------------------------------------------------ revno: 108241 committer: Glenn Morris branch nick: trunk timestamp: Tue 2012-05-15 13:49:59 -0400 message: * Makefile.in (install-arch-dep): Replace use of MV_DIRS with info. This make it easier to see what is going on. diff: === modified file 'ChangeLog' --- ChangeLog 2012-05-15 17:32:42 +0000 +++ ChangeLog 2012-05-15 17:49:59 +0000 @@ -1,5 +1,7 @@ 2012-05-15 Glenn Morris + * Makefile.in (install-arch-dep): Replace use of MV_DIRS with info. + * Makefile.in (install-arch-dep): Do not hard-code version number. * Makefile.in (install-arch-dep): NS install no longer needs to === modified file 'Makefile.in' --- Makefile.in 2012-05-15 17:32:42 +0000 +++ Makefile.in 2012-05-15 17:49:59 +0000 @@ -471,7 +471,7 @@ if test "${ns_appresdir}" != ""; then \ ( cd ${ns_appresdir} ; \ if test -d share/emacs ; then dir=share/emacs/*/*; $(MV_DIRS); fi;\ - if test -d share/info ; then dir=share/info; $(MV_DIRS) ; fi ; \ + if test -d share/info ; then rm -fr info; mv share/info . ; fi ; \ rm -fr share ) ; \ ( cd ${ns_appbindir} ; \ if cd libexec ; then dir=emacs/*/*/* ; $(MV_DIRS); \ ------------------------------------------------------------ revno: 108240 committer: Glenn Morris branch nick: trunk timestamp: Tue 2012-05-15 13:38:41 -0400 message: NEWS fixes diff: === modified file 'etc/NEWS' --- etc/NEWS 2012-05-11 14:24:50 +0000 +++ etc/NEWS 2012-05-15 17:38:41 +0000 @@ -97,27 +97,23 @@ ** reStructuredText mode -*** Major merge with upstream development. - *** Nearly all keys are rebound making room for more keys and comply -better to usage in other modes. Bindings are described with C-c C-h. - -*** Major revision of indentation. Now works very similar to other -modes. TAB is your friend. - -*** Major revision of filling. Works fine with most of -reStructuredText syntax. Auto-filling is also supported. +better to usage in other modes. Bindings are described with C-c C-h. + +*** Major revision of indentation. Now works very similarly to other modes. +TAB is your friend. + +*** Major revision of filling. Works fine with most of +reStructuredText syntax. Auto-filling is also supported. *** Major revision of comment handling. -*** Major revision of fontification. Now works with `jit-lock-mode'. -Thanks to Stefan Monnier for help. +*** Major revision of fontification. Now works with `jit-lock-mode'. *** reStructuredText syntax is covered more closely in many cases. Among other things this improves the experience for Sphinx users. -*** `rst-insert-list' inserts new list or continues existing lists. -Based on code by Wei-Wei Guo. +*** `rst-insert-list' inserts a new list or continues existing lists. *** Customization is extended, corrected and improved. @@ -125,7 +121,7 @@ *** Window configuration is reset after displaying TOC. -*** There is a package version in `rst-version' +*** There is a package version in `rst-version'. ** New `derived-mode' filter for Ibuffer, bound to `/ M'. `/ m' is now bound to filter by used-mode, which used to be bound to `/ M'. ------------------------------------------------------------ revno: 108239 committer: Glenn Morris branch nick: trunk timestamp: Tue 2012-05-15 13:32:42 -0400 message: * Makefile.in (install-arch-dep): Do not hard-code version number. diff: === modified file 'ChangeLog' --- ChangeLog 2012-05-15 17:09:00 +0000 +++ ChangeLog 2012-05-15 17:32:42 +0000 @@ -1,5 +1,7 @@ 2012-05-15 Glenn Morris + * Makefile.in (install-arch-dep): Do not hard-code version number. + * Makefile.in (install-arch-dep): NS install no longer needs to symlink libexec/* into bin/, since 2012-05-14 ns_init_paths change. === modified file 'Makefile.in' --- Makefile.in 2012-05-15 17:09:00 +0000 +++ Makefile.in 2012-05-15 17:32:42 +0000 @@ -475,14 +475,13 @@ rm -fr share ) ; \ ( cd ${ns_appbindir} ; \ if cd libexec ; then dir=emacs/*/*/* ; $(MV_DIRS); \ - rm -fr emacs; if cd ../bin; then rm -f emacs emacs-24*; \ - fi ; fi ) ; \ + rm -fr emacs; rm -f ../bin/emacs ../bin/$(EMACSFULL) ; \ + fi ) ; \ else true ; fi -## FIXME is the emacs-24* bit above really necessary and correct? -## What if I have 24.1 and 24.2 installed at the same time? -## In any case, it should use something like echo $version | sed 's/\..*//' -## instead of hard-coding a version. +## 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. ## 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: 108238 committer: Glenn Morris branch nick: trunk timestamp: Tue 2012-05-15 13:09:00 -0400 message: Stop NS install symlinking libexec/* into bin/ * Makefile.in (install-arch-dep): NS install no longer needs to symlink libexec/* into bin/, since 2012-05-14 ns_init_paths change. diff: === modified file 'ChangeLog' --- ChangeLog 2012-05-12 18:10:37 +0000 +++ ChangeLog 2012-05-15 17:09:00 +0000 @@ -1,3 +1,8 @@ +2012-05-15 Glenn Morris + + * Makefile.in (install-arch-dep): NS install no longer needs to + symlink libexec/* into bin/, since 2012-05-14 ns_init_paths change. + 2012-05-12 Glenn Morris * configure.in (ns_appbindir): Remove trailing "/". === modified file 'Makefile.in' --- Makefile.in 2012-05-12 00:57:48 +0000 +++ Makefile.in 2012-05-15 17:09:00 +0000 @@ -476,7 +476,7 @@ ( cd ${ns_appbindir} ; \ if cd libexec ; then dir=emacs/*/*/* ; $(MV_DIRS); \ rm -fr emacs; if cd ../bin; then rm -f emacs emacs-24*; \ - ln -sf ../libexec/* . ; fi ; fi ) ; \ + fi ; fi ) ; \ else true ; fi ## FIXME is the emacs-24* bit above really necessary and correct? ------------------------------------------------------------ revno: 108237 fixes bug(s): http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11466 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2012-05-15 12:58:35 -0400 message: Only handle ".." and '..' quoting in shell-mode. * lisp/shell.el (shell--unquote&requote-argument, shell--unquote-argument) (shell--requote-argument): New functions. (shell-completion-vars): Use them. (shell--parse-pcomplete-arguments): Rename from shell-parse-pcomplete-arguments. * lisp/comint.el (comint-word): Obey comint-file-name-quote-list. Simplify. (comint--unquote&requote-argument): Don't handle ".." and '..' quoting. Obey comint-file-name-quote-list. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-05-15 13:25:03 +0000 +++ lisp/ChangeLog 2012-05-15 16:58:35 +0000 @@ -1,5 +1,15 @@ 2012-05-15 Stefan Monnier + Only handle ".." and '..' quoting in shell-mode (bug#11466). + * shell.el (shell--unquote&requote-argument, shell--unquote-argument) + (shell--requote-argument): New functions. + (shell-completion-vars): Use them. + (shell--parse-pcomplete-arguments): Rename from + shell-parse-pcomplete-arguments. + * comint.el (comint-word): Obey comint-file-name-quote-list. Simplify. + (comint--unquote&requote-argument): Don't handle ".." and '..' quoting. + Obey comint-file-name-quote-list. + * emacs-lisp/smie.el (smie-indent--bolp-1): New function. (smie-indent-keyword): Use it. === modified file 'lisp/comint.el' --- lisp/comint.el 2012-05-04 23:16:47 +0000 +++ lisp/comint.el 2012-05-15 16:58:35 +0000 @@ -2968,19 +2968,20 @@ "Return the word of WORD-CHARS at point, or nil if none is found. Word constituents are considered to be those in WORD-CHARS, which is like the inside of a \"[...]\" (see `skip-chars-forward'), plus all non-ASCII characters." + ;; FIXME: Need to handle "..." and '...' quoting in shell.el! + ;; This should be combined with pomplete-parsing somehow. (save-excursion (let ((here (point)) giveup) (while (not giveup) (let ((startpoint (point))) (skip-chars-backward (concat "\\\\" word-chars)) - ;; Fixme: This isn't consistent with Bash, at least -- not + (if (and comint-file-name-quote-list + (eq (char-before (1- (point))) ?\\)) + (forward-char -2)) + ;; FIXME: This isn't consistent with Bash, at least -- not ;; all non-ASCII chars should be word constituents. - (if (and (> (- (point) 2) (point-min)) - (= (char-after (- (point) 2)) ?\\)) - (forward-char -2)) - (if (and (> (- (point) 1) (point-min)) - (>= (char-after (- (point) 1)) 128)) + (if (and (not (bobp)) (>= (char-before) 128)) (forward-char -1)) (if (= (point) startpoint) (setq giveup t)))) @@ -3012,14 +3013,14 @@ (defun comint--unquote&requote-argument (qstr &optional upos) (unless upos (setq upos 0)) (let* ((qpos 0) - (dquotes nil) (ustrs '()) (re (concat - "[\"']\\|\\\\\\(.\\)" - "\\|\\$\\(?:\\([[:alpha:]][[:alnum:]]*\\)" - "\\|{\\(?2:[^{}]+\\)}\\)" + "\\$\\(?:\\([[:alpha:]][[:alnum:]]*\\)" + "\\|{\\(?1:[^{}]+\\)}\\)" (when (memq system-type '(ms-dos windows-nt)) - "\\|%\\(?2:[^\\\\/]*\\)%"))) + "\\|%\\(?1:[^\\\\/]*\\)%") + (when comint-file-name-quote-list + "\\|\\\\\\(.\\)"))) (qupos nil) (push (lambda (str end) (push str ustrs) @@ -3030,18 +3031,9 @@ (while (setq match (string-match re qstr qpos)) (funcall push (substring qstr qpos match) match) (cond - ((match-beginning 1) (funcall push (match-string 1 qstr) (match-end 0))) - ((match-beginning 2) (funcall push (getenv (match-string 2 qstr)) + ((match-beginning 2) (funcall push (match-string 2 qstr) (match-end 0))) + ((match-beginning 1) (funcall push (getenv (match-string 1 qstr)) (- (match-end 0)))) - ((eq (aref qstr match) ?\") (setq dquotes (not dquotes))) - ((eq (aref qstr match) ?\') - (cond - (dquotes (funcall push "'" (match-end 0))) - ((< match (1+ (length qstr))) - (let ((end (string-match "'" qstr (1+ match)))) - (funcall push (substring qstr (1+ match) end) - (or end (length qstr))))) - (t nil))) (t (error "Unexpected case in comint--unquote&requote-argument!"))) (setq qpos (match-end 0))) (funcall push (substring qstr qpos) (length qstr)) @@ -3140,7 +3132,7 @@ See `completion-table-with-quoting' and `comint-requote-function'.") (defvar comint-requote-function #'comint--requote-argument "Function to use for completion of quoted data. -See `completion-table-with-quoting' and `comint-requote-function'.") +See `completion-table-with-quoting' and `comint-unquote-function'.") (defun comint--complete-file-name-data () "Return the completion data for file name at point." === modified file 'lisp/shell.el' --- lisp/shell.el 2012-05-09 17:20:24 +0000 +++ lisp/shell.el 2012-05-15 16:58:35 +0000 @@ -372,8 +372,57 @@ ;;; Basic Procedures -(defun shell-parse-pcomplete-arguments () +(defun shell--unquote&requote-argument (qstr &optional upos) + (unless upos (setq upos 0)) + (let* ((qpos 0) + (dquotes nil) + (ustrs '()) + (re (concat + "[\"']" + "\\|\\$\\(?:\\([[:alpha:]][[:alnum:]]*\\)" + "\\|{\\(?1:[^{}]+\\)}\\)" + (when (memq system-type '(ms-dos windows-nt)) + "\\|%\\(?1:[^\\\\/]*\\)%") + (when comint-file-name-quote-list + "\\|\\\\\\(.\\)"))) + (qupos nil) + (push (lambda (str end) + (push str ustrs) + (setq upos (- upos (length str))) + (unless (or qupos (> upos 0)) + (setq qupos (if (< end 0) (- end) (+ upos end)))))) + match) + (while (setq match (string-match re qstr qpos)) + (funcall push (substring qstr qpos match) match) + (cond + ((match-beginning 2) (funcall push (match-string 2 qstr) (match-end 0))) + ((match-beginning 1) (funcall push (getenv (match-string 1 qstr)) + (- (match-end 0)))) + ((eq (aref qstr match) ?\") (setq dquotes (not dquotes))) + ((eq (aref qstr match) ?\') + (cond + (dquotes (funcall push "'" (match-end 0))) + ((< match (1+ (length qstr))) + (let ((end (string-match "'" qstr (1+ match)))) + (funcall push (substring qstr (1+ match) end) + (or end (length qstr))))) + (t nil))) + (t (error "Unexpected case in shell--unquote&requote-argument!"))) + (setq qpos (match-end 0))) + (funcall push (substring qstr qpos) (length qstr)) + (list (mapconcat #'identity (nreverse ustrs) "") + qupos #'comint-quote-filename))) + +(defun shell--unquote-argument (str) + (car (shell--unquote&requote-argument str))) +(defun shell--requote-argument (upos qstr) + ;; See `completion-table-with-quoting'. + (let ((res (shell--unquote&requote-argument qstr upos))) + (cons (nth 1 res) (nth 2 res)))) + +(defun shell--parse-pcomplete-arguments () "Parse whitespace separated arguments in the current region." + ;; FIXME: share code with shell--unquote&requote-argument. (let ((begin (save-excursion (shell-backward-command 1) (point))) (end (point)) begins args) @@ -394,13 +443,13 @@ (cond ((match-beginning 3) ;Backslash escape. (push (cond - ((null pcomplete-arg-quote-list) + ((null comint-file-name-quote-list) (goto-char (match-beginning 3)) "\\") ((= (match-beginning 3) (match-end 3)) "\\") (t (match-string 3))) arg)) ((match-beginning 2) ;Double quote. - (push (if (null pcomplete-arg-quote-list) (match-string 2) + (push (if (null comint-file-name-quote-list) (match-string 2) (replace-regexp-in-string "\\\\\\(.\\)" "\\1" (match-string 2))) arg)) @@ -430,10 +479,10 @@ shell-file-name-quote-list) (set (make-local-variable 'comint-dynamic-complete-functions) shell-dynamic-complete-functions) + (setq-local comint-unquote-function #'shell--unquote-argument) + (setq-local comint-requote-function #'shell--requote-argument) (set (make-local-variable 'pcomplete-parse-arguments-function) - #'shell-parse-pcomplete-arguments) - (set (make-local-variable 'pcomplete-arg-quote-list) - comint-file-name-quote-list) + #'shell--parse-pcomplete-arguments) (set (make-local-variable 'pcomplete-termination-string) (cond ((not comint-completion-addsuffix) "") ((stringp comint-completion-addsuffix) ------------------------------------------------------------ revno: 108236 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2012-05-15 09:25:03 -0400 message: * lisp/emacs-lisp/smie.el (smie-indent--bolp-1): New function. (smie-indent-keyword): Use it. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-05-14 20:39:14 +0000 +++ lisp/ChangeLog 2012-05-15 13:25:03 +0000 @@ -1,3 +1,8 @@ +2012-05-15 Stefan Monnier + + * emacs-lisp/smie.el (smie-indent--bolp-1): New function. + (smie-indent-keyword): Use it. + 2012-05-14 Stefan Merten * textmodes/rst.el (rst-re-alist): Fix loading (bug#11462). @@ -15,8 +20,8 @@ 2012-05-14 Stefan Monnier - * shell.el (shell-parse-pcomplete-arguments): Obey - pcomplete-arg-quote-list inside double-quoted args (Bug#11348). + * shell.el (shell-parse-pcomplete-arguments): + Obey pcomplete-arg-quote-list inside double-quoted args (Bug#11348). 2012-05-14 Wolfgang Jenkner === modified file 'lisp/emacs-lisp/smie.el' --- lisp/emacs-lisp/smie.el 2012-05-13 16:04:37 +0000 +++ lisp/emacs-lisp/smie.el 2012-05-15 13:25:03 +0000 @@ -688,6 +688,7 @@ is too high. FORW-LEVEL is the forw-level of TOKEN, POS is its start position in the buffer. (t POS TOKEN): same thing when we bump on the wrong side of a paren. + Instead of t, the `car' can also be some other non-nil non-number value. (nil POS TOKEN): we skipped over a paren-like pair. nil: we skipped over an identifier, matched parentheses, ..." (catch 'return @@ -795,6 +796,7 @@ is too high. LEFT-LEVEL is the left-level of TOKEN, POS is its start position in the buffer. (t POS TOKEN): same thing but for an open-paren or the beginning of buffer. + Instead of t, the `car' can also be some other non-nil non-number value. (nil POS TOKEN): we skipped over a paren-like pair. nil: we skipped over an identifier, matched parentheses, ..." (smie-next-sexp @@ -814,7 +816,8 @@ (RIGHT-LEVEL POS TOKEN): we couldn't skip TOKEN because its left-level is too high. RIGHT-LEVEL is the right-level of TOKEN, POS is its end position in the buffer. - (t POS TOKEN): same thing but for an open-paren or the beginning of buffer. + (t POS TOKEN): same thing but for a close-paren or the end of buffer. + Instead of t, the `car' can also be some other non-nil non-number value. (nil POS TOKEN): we skipped over a paren-like pair. nil: we skipped over an identifier, matched parentheses, ..." (smie-next-sexp @@ -1076,6 +1079,16 @@ "Return non-nil if the current token is the first on the line." (save-excursion (skip-chars-backward " \t") (bolp))) +(defun smie-indent--bolp-1 () + ;; Like smie-indent--bolp but also returns non-nil if it's the first + ;; non-comment token. Maybe we should simply always use this? + "Return non-nil if the current token is the first on the line. +Comments are treated as spaces." + (let ((bol (line-beginning-position))) + (save-excursion + (forward-comment (- (point))) + (<= (point) bol)))) + ;; Dynamically scoped. (defvar smie--parent) (defvar smie--after) (defvar smie--token) @@ -1352,9 +1365,12 @@ ;; - middle-of-line: "trust current position". (cond ((smie-indent--rule :before token)) - ((smie-indent--bolp) ;I.e. non-virtual indent. + ((smie-indent--bolp-1) ;I.e. non-virtual indent. ;; For an open-paren-like thingy at BOL, always indent only ;; based on other rules (typically smie-indent-after-keyword). + ;; FIXME: we do the same if after a comment, since we may be trying + ;; to compute the indentation of this comment and we shouldn't indent + ;; based on the indentation of subsequent code. nil) (t ;; By default use point unless we're hanging. @@ -1455,6 +1471,12 @@ (save-excursion (forward-comment (point-max)) (skip-chars-forward " \t\r\n") + ;; FIXME: We assume here that smie-indent-calculate will compute the + ;; indentation of the next token based on text before the comment, but + ;; this is not guaranteed, so maybe we should let + ;; smie-indent-calculate return some info about which buffer position + ;; was used as the "indentation base" and check that this base is + ;; before `pos'. (smie-indent-calculate)))) (defun smie-indent-comment-continue () ------------------------------------------------------------ revno: 108235 committer: Ted Zlatanov branch nick: quickfixes timestamp: Tue 2012-05-15 04:53:49 -0400 message: mention bug#8706 in the last url-util.el ChangeLog entry diff: === modified file 'lisp/url/ChangeLog' --- lisp/url/ChangeLog 2012-05-15 08:47:38 +0000 +++ lisp/url/ChangeLog 2012-05-15 08:53:49 +0000 @@ -1,6 +1,6 @@ 2012-05-15 Ian Eure - * url-util.el (url-build-query-string): New function. + * url-util.el (url-build-query-string): New function (Bug#8706). (url-parse-query-string): Allow that '=' is not required and split URL parameters on ';', not just '&'. ------------------------------------------------------------ revno: 108234 committer: Ted Zlatanov branch nick: quickfixes timestamp: Tue 2012-05-15 04:52:15 -0400 message: add url-util.el test file * automated/url-util-tests.el: New file to test lisp/url/url-util.el. Only `url-build-query-string' and `url-parse-query-string' are tested right now. diff: === modified file 'test/ChangeLog' --- test/ChangeLog 2012-04-28 20:04:34 +0000 +++ test/ChangeLog 2012-05-15 08:52:15 +0000 @@ -1,3 +1,9 @@ +2012-05-15 Teodor Zlatanov + + * automated/url-util-tests.el: New file to test + lisp/url/url-util.el. Only `url-build-query-string' and + `url-parse-query-string' are tested right now (Bug#8706). + 2012-04-28 Stefan Monnier * indent/shell.sh: === added file 'test/automated/url-util-tests.el' --- test/automated/url-util-tests.el 1970-01-01 00:00:00 +0000 +++ test/automated/url-util-tests.el 2012-05-15 08:52:15 +0000 @@ -0,0 +1,51 @@ +;;; url-util-tests.el --- Test suite for url-util. + +;; Copyright (C) 2012 Free Software Foundation, Inc. + +;; Author: Teodor Zlatanov +;; Keywords: data + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Code: + +(require 'ert) +(require 'url-util) + +(ert-deftest url-util-tests () + (let ((tests + '(("key1=val1&key2=val2&key3=val1&key3=val2&key4&key5" + ((key1 val1) (key2 "val2") (key3 val1 val2) (key4) (key5 ""))) + ("key1=val1;key2=val2;key3=val1;key3=val2;key4;key5" + ((key1 "val1") (key2 val2) (key3 val1 val2) ("key4") (key5 "")) t) + ("key1=val1;key2=val2;key3=val1;key3=val2;key4=;key5=" + ((key1 val1) (key2 val2) ("key3" val1 val2) (key4) (key5 "")) t t))) + test) + (while tests + (setq test (car tests) + tests (cdr tests)) + (should (equal (apply 'url-build-query-string (cdr test)) (car test))))) + (should (equal (url-parse-query-string + "key1=val1&key2=val2&key3=val1&key3=val2&key4=&key5") + '(("key5" "") + ("key4" "") + ("key3" "val2" "val1") + ("key2" "val2") + ("key1" "val1"))))) + +(provide 'url-util-tests) + +;;; url-util-tests.el ends here ------------------------------------------------------------ revno: 108233 committer: Ted Zlatanov branch nick: quickfixes timestamp: Tue 2012-05-15 04:47:38 -0400 message: add url-build-query-string and improve url-parse-query-string as per bug#8706 * url/url-util.el (url-build-query-string): New function. (url-parse-query-string): Allow that '=' is not required and split URL parameters on ';', not just '&'. diff: === modified file 'lisp/url/ChangeLog' --- lisp/url/ChangeLog 2012-05-14 07:56:04 +0000 +++ lisp/url/ChangeLog 2012-05-15 08:47:38 +0000 @@ -1,3 +1,9 @@ +2012-05-15 Ian Eure + + * url-util.el (url-build-query-string): New function. + (url-parse-query-string): Allow that '=' is not required and split + URL parameters on ';', not just '&'. + 2012-05-14 Lars Magne Ingebrigtsen * url-expand.el (url-default-expander): Copy over the fullness of === modified file 'lisp/url/url-util.el' --- lisp/url/url-util.el 2012-05-10 06:27:12 +0000 +++ lisp/url/url-util.el 2012-05-15 08:47:38 +0000 @@ -263,24 +263,65 @@ ;;;###autoload (defun url-parse-query-string (query &optional downcase allow-newlines) (let (retval pairs cur key val) - (setq pairs (split-string query "&")) + (setq pairs (split-string query "[;&]")) (while pairs (setq cur (car pairs) pairs (cdr pairs)) - (if (not (string-match "=" cur)) - nil ; Grace - (setq key (url-unhex-string (substring cur 0 (match-beginning 0)) - allow-newlines)) - (setq val (url-unhex-string (substring cur (match-end 0) nil) - allow-newlines)) - (if downcase - (setq key (downcase key))) - (setq cur (assoc key retval)) - (if cur - (setcdr cur (cons val (cdr cur))) - (setq retval (cons (list key val) retval))))) + (unless (string-match "=" cur) + (setq cur (concat cur "="))) + + (when (string-match "=" cur) + (setq key (url-unhex-string (substring cur 0 (match-beginning 0)) + allow-newlines)) + (setq val (url-unhex-string (substring cur (match-end 0) nil) + allow-newlines)) + (if downcase + (setq key (downcase key))) + (setq cur (assoc key retval)) + (if cur + (setcdr cur (cons val (cdr cur))) + (setq retval (cons (list key val) retval))))) retval)) +;;;###autoload +(defun url-build-query-string (query &optional semicolons keep-empty) + "Build a query-string. + +Given a QUERY in the form: +'((key1 val1) + (key2 val2) + (key3 val1 val2) + (key4) + (key5 "")) + +\(This is the same format as produced by `url-parse-query-string') + +This will return a string +\"key1=val1&key2=val2&key3=val1&key3=val2&key4&key5\". Keys may +be strings or symbols; if they are symbols, the symbol name will +be used. + +When SEMICOLONS is given, the separator will be \";\". + +When KEEP-EMPTY is given, empty values will show as \"key=\" +instead of just \"key\" as in the example above." + (mapconcat + (lambda (key-vals) + (let ((escaped + (mapcar (lambda (sym) + (url-hexify-string (format "%s" sym))) key-vals))) + (mapconcat (lambda (val) + (let ((vprint (format "%s" val)) + (eprint (format "%s" (car escaped)))) + (concat eprint + (if (or keep-empty + (and val (not (zerop (length vprint))))) + "=" + "") + vprint))) + (or (cdr escaped) '("")) (if semicolons ";" "&")))) + query (if semicolons ";" "&"))) + (defun url-unhex (x) (if (> x ?9) (if (>= x ?a) ------------------------------------------------------------ revno: 108232 [merge] committer: Stefan Merten branch nick: trunk timestamp: Mon 2012-05-14 22:39:14 +0200 message: (rst-re-alist): Fix loading (bug#11462). diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-05-14 16:11:24 +0000 +++ lisp/ChangeLog 2012-05-14 20:39:14 +0000 @@ -1,3 +1,7 @@ +2012-05-14 Stefan Merten + + * textmodes/rst.el (rst-re-alist): Fix loading (bug#11462). + 2012-05-14 Stefan Monnier * net/rlogin.el (rlogin-mode-map): Fix last change. === modified file 'lisp/textmodes/rst.el' --- lisp/textmodes/rst.el 2012-05-09 00:57:18 +0000 +++ lisp/textmodes/rst.el 2012-05-14 09:31:08 +0000 @@ -422,17 +422,6 @@ Each entry consists of the symbol naming the regex and an argument list for `rst-re'.") -(defconst rst-re-alist - ;; Shadow global value we are just defining so we can construct it step by - ;; step - (let (rst-re-alist) - (dolist (re rst-re-alist-def) - (setq rst-re-alist - (nconc rst-re-alist - (list (list (car re) (apply 'rst-re (cdr re))))))) - rst-re-alist) - "Alist mapping symbols from `rst-re-alist-def' to regex strings.") - ;; FIXME: Use `sregex` or `rx` instead of re-inventing the wheel (defun rst-re (&rest args) "Interpret ARGS as regular expressions and return a regex string. @@ -492,6 +481,18 @@ (error "Unknown object type for building regex: %s" re)))) args))) +;; FIXME: Remove circular dependency between `rst-re' and `rst-re-alist'. +(defconst rst-re-alist + ;; Shadow global value we are just defining so we can construct it step by + ;; step + (let (rst-re-alist) + (dolist (re rst-re-alist-def) + (setq rst-re-alist + (nconc rst-re-alist + (list (list (car re) (apply 'rst-re (cdr re))))))) + rst-re-alist) + "Alist mapping symbols from `rst-re-alist-def' to regex strings.") + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Mode definition. ------------------------------------------------------------ Use --include-merges or -n0 to see merged revisions.