Now on revision 108821. ------------------------------------------------------------ revno: 108821 committer: Juanma Barranquero branch nick: trunk timestamp: Sun 2012-07-01 01:01:52 +0200 message: lib-src/makefile.w32-in (CTAGS_CFLAGS): Remove EMACS_NAME. Already defined in ETAGS_CFLAGS. diff: === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2012-06-27 07:47:56 +0000 +++ lib-src/ChangeLog 2012-06-30 23:01:52 +0000 @@ -1,3 +1,8 @@ +2012-06-30 Juanma Barranquero + + * makefile.w32-in (CTAGS_CFLAGS): Remove EMACS_NAME; + already defined in ETAGS_CFLAGS. + 2012-06-27 Glenn Morris * makefile.w32-in (lisp2): Remove paths.el. === modified file 'lib-src/makefile.w32-in' --- lib-src/makefile.w32-in 2012-06-27 07:47:56 +0000 +++ lib-src/makefile.w32-in 2012-06-30 23:01:52 +0000 @@ -106,7 +106,7 @@ - $(DEL) ctags.c $(CP) etags.c ctags.c -CTAGS_CFLAGS = -DCTAGS $(ETAGS_CFLAGS) -DEMACS_NAME="\"GNU Emacs\"" +CTAGS_CFLAGS = -DCTAGS $(ETAGS_CFLAGS) $(BLD)/ctags.$(O): ctags.c $(CC) $(CFLAGS) $(CTAGS_CFLAGS) $(CC_OUT)$@ ctags.c ------------------------------------------------------------ revno: 108820 committer: Glenn Morris branch nick: trunk timestamp: Sat 2012-06-30 14:35:20 -0700 message: * src/nsterm.m (ns_init_paths): Ignore site-lisp if --no-site-lisp. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-06-30 21:10:50 +0000 +++ src/ChangeLog 2012-06-30 21:35:20 +0000 @@ -1,5 +1,7 @@ 2012-06-30 Glenn Morris + * nsterm.m (ns_init_paths): Ignore site-lisp if --no-site-lisp. + * epaths.in (PATH_SITELOADSEARCH): New. * lread.c (init_lread): Use PATH_SITELOADSEARCH. This is rather than relying on --enable-locallisppath elements === modified file 'src/nsterm.m' --- src/nsterm.m 2012-06-29 01:35:32 +0000 +++ src/nsterm.m 2012-06-30 21:35:20 +0000 @@ -320,6 +320,8 @@ @"site-lisp", @"lisp", @"leim", nil]]; NSEnumerator *pathEnum = [paths objectEnumerator]; resourcePaths = @""; + /* Hack to skip site-lisp. */ + if (no_site_lisp) resourcePath = [pathEnum nextObject]; while (resourcePath = [pathEnum nextObject]) { if ([fileManager fileExistsAtPath: resourcePath isDirectory: &isDir]) ------------------------------------------------------------ revno: 108819 committer: Glenn Morris branch nick: trunk timestamp: Sat 2012-06-30 14:23:38 -0700 message: * lisp/comint.el (follow-comint-scroll-to-bottom): Fix declaration. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-06-30 21:22:18 +0000 +++ lisp/ChangeLog 2012-06-30 21:23:38 +0000 @@ -1,5 +1,7 @@ 2012-06-30 Glenn Morris + * comint.el (follow-comint-scroll-to-bottom): Fix declaration. + * net/secrets.el, net/tramp-gvfs.el, net/xesam.el, net/zeroconf.el: Remove outdated and unnecessary dbus declarations. === modified file 'lisp/comint.el' --- lisp/comint.el 2012-05-29 09:09:38 +0000 +++ lisp/comint.el 2012-06-30 21:23:38 +0000 @@ -2093,7 +2093,7 @@ nil t)))))) (defvar follow-mode) -(declare-function follow-comint-scroll-to-bottom "follow" ()) +(declare-function follow-comint-scroll-to-bottom "follow" (&optional window)) (defun comint-postoutput-scroll-to-bottom (_string) "Go to the end of buffer in some or all windows showing it. ------------------------------------------------------------ revno: 108818 committer: Glenn Morris branch nick: trunk timestamp: Sat 2012-06-30 14:22:18 -0700 message: Remove outdated and unnecessary dbus- declarations. * net/secrets.el, net/tramp-gvfs.el, net/xesam.el, net/zeroconf.el: Remove outdated and unnecessary dbus- declarations. (They are in defined dbus.el now.) diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-06-30 15:55:27 +0000 +++ lisp/ChangeLog 2012-06-30 21:22:18 +0000 @@ -1,3 +1,8 @@ +2012-06-30 Glenn Morris + + * net/secrets.el, net/tramp-gvfs.el, net/xesam.el, net/zeroconf.el: + Remove outdated and unnecessary dbus declarations. + 2012-06-30 Eli Zaretskii * emacs-lisp/timer.el (timer-until): Subtract results of === modified file 'lisp/net/secrets.el' --- lisp/net/secrets.el 2012-02-28 08:17:21 +0000 +++ lisp/net/secrets.el 2012-06-30 21:22:18 +0000 @@ -145,8 +145,6 @@ (eval-when-compile (require 'cl)) -(declare-function dbus-call-method "dbusbind.c") -(declare-function dbus-register-signal "dbusbind.c") (defvar dbus-debug) (require 'dbus) === modified file 'lisp/net/tramp-gvfs.el' --- lisp/net/tramp-gvfs.el 2012-06-11 10:30:07 +0000 +++ lisp/net/tramp-gvfs.el 2012-06-30 21:22:18 +0000 @@ -91,11 +91,7 @@ ;; D-Bus support in the Emacs core can be disabled with configuration ;; option "--without-dbus". Declare used subroutines and variables. -(declare-function dbus-call-method "dbusbind.c") -(declare-function dbus-call-method-asynchronously "dbusbind.c") (declare-function dbus-get-unique-name "dbusbind.c") -(declare-function dbus-register-method "dbusbind.c") -(declare-function dbus-register-signal "dbusbind.c") ;; Pacify byte-compiler (eval-when-compile === modified file 'lisp/net/xesam.el' --- lisp/net/xesam.el 2012-04-23 11:57:06 +0000 +++ lisp/net/xesam.el 2012-06-30 21:22:18 +0000 @@ -127,11 +127,6 @@ ;;; Code: -;; D-Bus support in the Emacs core can be disabled with configuration -;; option "--without-dbus". Declare used subroutines and variables. -(declare-function dbus-call-method "dbusbind.c") -(declare-function dbus-register-signal "dbusbind.c") - (require 'dbus) ;; Pacify byte compiler. === modified file 'lisp/net/zeroconf.el' --- lisp/net/zeroconf.el 2012-01-19 07:21:25 +0000 +++ lisp/net/zeroconf.el 2012-06-30 21:22:18 +0000 @@ -105,8 +105,6 @@ (eval-when-compile (require 'cl)) -(declare-function dbus-call-method "dbusbind.c") -(declare-function dbus-register-signal "dbusbind.c") (defvar dbus-debug) (require 'dbus) ------------------------------------------------------------ revno: 108817 committer: Glenn Morris branch nick: trunk timestamp: Sat 2012-06-30 14:13:05 -0700 message: * url-vars.el (mm-mime-mule-charset-alist, mm-coding-system-p): Declare. diff: === modified file 'lisp/url/ChangeLog' --- lisp/url/ChangeLog 2012-06-29 06:28:37 +0000 +++ lisp/url/ChangeLog 2012-06-30 21:13:05 +0000 @@ -1,3 +1,8 @@ +2012-06-30 Glenn Morris + + * url-vars.el (mm-mime-mule-charset-alist, mm-coding-system-p): + Declare. + 2012-06-21 Chong Yidong * url.el (url-retrieve-internal): Fix last change (Bug#11627). === modified file 'lisp/url/url-vars.el' --- lisp/url/url-vars.el 2012-06-12 05:47:14 +0000 +++ lisp/url/url-vars.el 2012-06-30 21:13:05 +0000 @@ -212,6 +212,9 @@ (defvar url-mime-encoding-string nil "String to send in the Accept-encoding: field in HTTP requests.") +(defvar mm-mime-mule-charset-alist) +(declare-function mm-coding-system-p "mm-util" (cs)) + ;; Perhaps the first few should actually be given decreasing `q's and ;; the list should be trimmed significantly. ;; Fixme: do something sane if we don't have `sort-coding-systems' ------------------------------------------------------------ revno: 108816 fixes bug(s): http://debbugs.gnu.org/11658 committer: Glenn Morris branch nick: trunk timestamp: Sat 2012-06-30 14:10:50 -0700 message: Make --no-site-lisp work for --enable-locallisppath elements without "site-lisp" in the name. Ref http://debbugs.gnu.org/10208#25, point iii). * configure.in (standardlisppath): New output variable. (lisppath): Use standardlisppath. * Makefile.in (standardlisppath): New, set by configure. (epaths-force): Use standardlisppath and locallisppath rather than lisppath. * src/epaths.in (PATH_SITELOADSEARCH): New. * src/lread.c (init_lread): Use PATH_SITELOADSEARCH. * nt/paths.h (PATH_SITELOADSEARCH): New. diff: === modified file 'ChangeLog' --- ChangeLog 2012-06-29 06:28:37 +0000 +++ ChangeLog 2012-06-30 21:10:50 +0000 @@ -1,3 +1,11 @@ +2012-06-30 Glenn Morris + + * configure.in (standardlisppath): New output variable. + (lisppath): Use standardlisppath. + * Makefile.in (standardlisppath): New, set by configure. + (epaths-force): Use standardlisppath and locallisppath rather than + lisppath. + 2012-06-28 Dmitry Antipov * configure.in: Fix previous change. Remove --enable-asserts. === modified file 'Makefile.in' --- Makefile.in 2012-06-01 18:26:21 +0000 +++ Makefile.in 2012-06-30 21:10:50 +0000 @@ -186,16 +186,20 @@ lispdir=@lispdir@ leimdir=@leimdir@ -# Directories Emacs should search for lisp files specific -# to this site (i.e. customizations), before consulting -# ${lispdir}. This should be a colon-separated list of -# directories. +# Directories Emacs should search for standard lisp files. +# The default is ${lispdir}:${leimdir}. +standardlisppath=@standardlisppath@ + +# Directories Emacs should search for lisp files specific to this +# site (i.e. customizations), before consulting ${standardlisppath}. +# This should be a colon-separated list of directories. locallisppath=@locallisppath@ # Where Emacs will search to find its lisp files. Before # changing this, check to see if your purpose wouldn't # better be served by changing locallisppath. This # should be a colon-separated list of directories. +# The default is ${locallisppath}:${standardlisppath}. lisppath=@lisppath@ # Where Emacs will search for its lisp files while @@ -281,12 +285,14 @@ # to just letting configure generate epaths.h from epaths.in in a # similar way to how Makefile is made from Makefile.in. epaths-force: FRC - @(lisppath=`echo ${lisppath} | ${removenullpaths}` ; \ + @(standardlisppath=`echo ${standardlisppath} | ${removenullpaths}` ; \ + locallisppath=`echo ${locallisppath} | ${removenullpaths}` ; \ buildlisppath=`echo ${buildlisppath} | ${removenullpaths}` ; \ x_default_search_path=`echo ${x_default_search_path}`; \ gamedir=`echo ${gamedir}`; \ sed < ${srcdir}/src/epaths.in > epaths.h.$$$$ \ - -e 's;\(#.*PATH_LOADSEARCH\).*$$;\1 "'"$${lisppath}"'";' \ + -e 's;\(#.*PATH_LOADSEARCH\).*$$;\1 "'"$${standardlisppath}"'";' \ + -e 's;\(#.*PATH_SITELOADSEARCH\).*$$;\1 "'"$${locallisppath}"'";' \ -e 's;\(#.*PATH_DUMPLOADSEARCH\).*$$;\1 "'"$${buildlisppath}"'";' \ -e 's;\(#.*PATH_EXEC\).*$$;\1 "${archlibdir}";' \ -e 's;\(#.*PATH_INFO\).*$$;\1 "${infodir}";' \ === modified file 'configure.in' --- configure.in 2012-06-29 06:28:37 +0000 +++ configure.in 2012-06-30 21:10:50 +0000 @@ -38,9 +38,10 @@ dnl See also epaths.h below. lispdir='${datadir}/emacs/${version}/lisp' leimdir='${datadir}/emacs/${version}/leim' +standardlisppath='${lispdir}:${leimdir}' locallisppath='${datadir}/emacs/${version}/site-lisp:'\ '${datadir}/emacs/site-lisp' -lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim' +lisppath='${locallisppath}:${standardlisppath}' etcdir='${datadir}/emacs/${version}/etc' archlibdir='${libexecdir}/emacs/${version}/${configuration}' docdir='${datadir}/emacs/${version}/etc' @@ -3161,6 +3162,7 @@ AC_SUBST(infodir) AC_SUBST(lispdir) AC_SUBST(leimdir) +AC_SUBST(standardlisppath) AC_SUBST(locallisppath) AC_SUBST(lisppath) AC_SUBST(x_default_search_path) === modified file 'lisp/loadup.el' --- lisp/loadup.el 2012-06-27 21:15:13 +0000 +++ lisp/loadup.el 2012-06-30 21:10:50 +0000 @@ -44,6 +44,10 @@ ;; Add subdirectories to the load-path for files that might get ;; autoloaded when bootstrapping. +;; This is because PATH_DUMPLOADSEARCH is just "../lisp". +;; Note that we reset load-path below just before dumping, +;; since lread.c:init_lread checks for changes to load-path +;; in deciding whether to modify it. (if (or (equal (nth 3 command-line-args) "bootstrap") (equal (nth 4 command-line-args) "bootstrap") (equal (nth 3 command-line-args) "unidata-gen.el") === modified file 'nt/ChangeLog' --- nt/ChangeLog 2012-06-28 09:06:11 +0000 +++ nt/ChangeLog 2012-06-30 21:10:50 +0000 @@ -1,3 +1,7 @@ +2012-06-30 Glenn Morris + + * paths.h (PATH_SITELOADSEARCH): New. + 2012-06-28 Juanma Barranquero * nmake.defs (CHECKING_CFLAGS): === modified file 'nt/paths.h' --- nt/paths.h 2012-01-19 07:21:25 +0000 +++ nt/paths.h 2012-06-30 21:10:50 +0000 @@ -20,10 +20,13 @@ /* The default search path for Lisp function "load". - This sets load-path. */ + Together with PATH_SITELOADSEARCH, this sets load-path. */ /* #define PATH_LOADSEARCH "/usr/local/lib/emacs/lisp" */ #define PATH_LOADSEARCH "C:/emacs/lisp" +/* Like PATH_LOADSEARCH, but contains the non-standard pieces. */ +#define PATH_SITELOADSEARCH "C:/emacs/site-lisp" + /* Like PATH_LOADSEARCH, but used only when Emacs is dumping. This path is usually identical to PATH_LOADSEARCH except that the entry for the directory containing the installed lisp files has been === modified file 'src/ChangeLog' --- src/ChangeLog 2012-06-30 16:09:47 +0000 +++ src/ChangeLog 2012-06-30 21:10:50 +0000 @@ -1,3 +1,10 @@ +2012-06-30 Glenn Morris + + * epaths.in (PATH_SITELOADSEARCH): New. + * lread.c (init_lread): Use PATH_SITELOADSEARCH. + This is rather than relying on --enable-locallisppath elements + having "site-lisp" in their names. (Bug#10208#25, 11658) + 2012-06-30 Eli Zaretskii * w32proc.c (sys_select): Accept and ignore one more argument. === modified file 'src/epaths.in' --- src/epaths.in 2012-01-19 07:21:25 +0000 +++ src/epaths.in 2012-06-30 21:10:50 +0000 @@ -19,16 +19,26 @@ along with GNU Emacs. If not, see . */ -/* The default value of load-path, which is the search path for - the Lisp function "load". Configure (using "make epaths-force") - sets this to $lisppath, which typically has a value like: - /emacs/VERSION/site-lisp:/emacs/site-lisp: +/* Together with PATH_SITELOADSEARCH, this gives the default value of + load-path, which is the search path for the Lisp function "load". + Configure (using "make epaths-force") sets this to + ${standardlisppath}, which typically has a value like: /emacs/VERSION/lisp:/emacs/VERSION/leim where datadir is eg /usr/local/share. +*/ +#define PATH_LOADSEARCH "/usr/local/share/emacs/lisp" + + +/* Like PATH_LOADSEARCH, but contains the non-standard pieces. + These are the site-lisp directories, typically something like + /emacs/VERSION/site-lisp:/emacs/site-lisp Configure prepends any $locallisppath, as set by the --enable-locallisppath argument. + This is combined with PATH_LOADSEARCH to make the default load-path. + If the --no-site-lisp option is used, this piece is excluded. */ -#define PATH_LOADSEARCH "/usr/local/share/emacs/lisp" +#define PATH_SITELOADSEARCH "/usr/local/share/emacs/site-lisp" + /* Like PATH_LOADSEARCH, but used only during the build process when Emacs is dumping. Configure (using "make epaths-force") sets === modified file 'src/lread.c' --- src/lread.c 2012-06-24 17:39:14 +0000 +++ src/lread.c 2012-06-30 21:10:50 +0000 @@ -4072,15 +4072,15 @@ int turn_off_warning = 0; /* Compute the default Vload-path, with the following logic: - If CANNOT_DUMP just use PATH_LOADSEARCH. + If CANNOT_DUMP, just use PATH_LOADSEARCH, prepending PATH_SITELOADSEARCH + unless --no-site-lisp. Else if purify-flag (ie dumping) start from PATH_DUMPLOADSEARCH; otherwise start from PATH_LOADSEARCH. If !initialized, then just set both Vload_path and dump_path. If initialized, then if Vload_path != dump_path, do nothing. - (Presumably the load-path has already been changed by something.) - Also do nothing if Vinstallation_directory is nil. - Otherwise: - Remove site-lisp directories from the front of load-path. + (Presumably the load-path has already been changed by something. + This can only (?) be from a site-load file during dumping.) + If Vinstallation_directory is not nil (ie, running uninstalled): Add installation-dir/lisp (if exists and not already a member), at the front, and turn off warnings about missing directories (because we are presumably running uninstalled). @@ -4094,8 +4094,7 @@ install-dir/src/Makefile.in does NOT exist (this is a sanity check), then repeat the above steps for source-dir/lisp, leim and site-lisp. - Finally, add the previously removed site-lisp directories back - at the front (if !no_site_lisp). + Finally, add the site-lisp directories at the front (if !no_site_lisp). We then warn about any of the load-path elements that do not exist. The only ones that might not exist are those from @@ -4111,9 +4110,16 @@ uninstalled, the eventual installation directories should not yet be included in load-path. */ + #ifdef CANNOT_DUMP normal = PATH_LOADSEARCH; Vload_path = decode_env_path (0, normal); + if (!no_site_lisp) + { + Lisp_Object sitelisp; + sitelisp = decode_env_path (0, PATH_SITELOADSEARCH); + if (! NILP (sitelisp)) Vload_path = nconc2 (sitelisp, Vload_path); + } #else if (NILP (Vpurify_flag)) normal = PATH_LOADSEARCH; @@ -4131,123 +4137,108 @@ if (! NILP (Fequal (dump_path, Vload_path))) { Vload_path = decode_env_path (0, normal); - if (no_site_lisp || !NILP (Vinstallation_directory)) + if (!NILP (Vinstallation_directory)) { - Lisp_Object tem, tem1, sitelisp; - - /* Remove "site-lisp" dirs from front of path temporarily - and store them in sitelisp, then conc them on at the - end so they're always first in path. - Note that this won't work if you used a - --enable-locallisppath element that does not happen - to contain "site-lisp" in its name. - */ - sitelisp = Qnil; - while (1) - { - tem = Fcar (Vload_path); - tem1 = Fstring_match (build_string ("site-lisp"), - tem, Qnil); - if (!NILP (tem1)) - { - Vload_path = Fcdr (Vload_path); - sitelisp = Fcons (tem, sitelisp); - } - else - break; - } - - if (!NILP (Vinstallation_directory)) - { - /* Add to the path the lisp subdir of the - installation dir, if it exists. */ - tem = Fexpand_file_name (build_string ("lisp"), - Vinstallation_directory); - tem1 = Ffile_exists_p (tem); - if (!NILP (tem1)) - { - if (NILP (Fmember (tem, Vload_path))) - { - turn_off_warning = 1; - Vload_path = Fcons (tem, Vload_path); - } - } - else - /* That dir doesn't exist, so add the build-time - Lisp dirs instead. */ - Vload_path = nconc2 (Vload_path, dump_path); - - /* Add leim under the installation dir, if it exists. */ - tem = Fexpand_file_name (build_string ("leim"), - Vinstallation_directory); - tem1 = Ffile_exists_p (tem); - if (!NILP (tem1)) - { - if (NILP (Fmember (tem, Vload_path))) - Vload_path = Fcons (tem, Vload_path); - } - - /* Add site-lisp under the installation dir, if it exists. */ - if (!no_site_lisp) - { - tem = Fexpand_file_name (build_string ("site-lisp"), - Vinstallation_directory); - tem1 = Ffile_exists_p (tem); - if (!NILP (tem1)) - { - if (NILP (Fmember (tem, Vload_path))) - Vload_path = Fcons (tem, Vload_path); - } - } - - /* If Emacs was not built in the source directory, - and it is run from where it was built, add to load-path - the lisp, leim and site-lisp dirs under that directory. */ - - if (NILP (Fequal (Vinstallation_directory, Vsource_directory))) - { - Lisp_Object tem2; - - tem = Fexpand_file_name (build_string ("src/Makefile"), - Vinstallation_directory); - tem1 = Ffile_exists_p (tem); - - /* Don't be fooled if they moved the entire source tree - AFTER dumping Emacs. If the build directory is indeed - different from the source dir, src/Makefile.in and - src/Makefile will not be found together. */ - tem = Fexpand_file_name (build_string ("src/Makefile.in"), - Vinstallation_directory); - tem2 = Ffile_exists_p (tem); - if (!NILP (tem1) && NILP (tem2)) - { - tem = Fexpand_file_name (build_string ("lisp"), - Vsource_directory); - - if (NILP (Fmember (tem, Vload_path))) - Vload_path = Fcons (tem, Vload_path); - - tem = Fexpand_file_name (build_string ("leim"), - Vsource_directory); - - if (NILP (Fmember (tem, Vload_path))) - Vload_path = Fcons (tem, Vload_path); - - if (!no_site_lisp) - { - tem = Fexpand_file_name (build_string ("site-lisp"), - Vsource_directory); - - if (NILP (Fmember (tem, Vload_path))) - Vload_path = Fcons (tem, Vload_path); - } - } - } /* Vinstallation_directory != Vsource_directory */ - } /* if Vinstallation_directory */ - if (!NILP (sitelisp) && !no_site_lisp) - Vload_path = nconc2 (Fnreverse (sitelisp), Vload_path); - } /* if Vinstallation_directory || no_site_lisp */ - } /* if dump_path == Vload_path */ + Lisp_Object tem, tem1; + + /* Add to the path the lisp subdir of the + installation dir, if it exists. */ + tem = Fexpand_file_name (build_string ("lisp"), + Vinstallation_directory); + tem1 = Ffile_exists_p (tem); + if (!NILP (tem1)) + { + if (NILP (Fmember (tem, Vload_path))) + { + turn_off_warning = 1; + Vload_path = Fcons (tem, Vload_path); + } + } + else + /* That dir doesn't exist, so add the build-time + Lisp dirs instead. */ + Vload_path = nconc2 (Vload_path, dump_path); + + /* Add leim under the installation dir, if it exists. */ + tem = Fexpand_file_name (build_string ("leim"), + Vinstallation_directory); + tem1 = Ffile_exists_p (tem); + if (!NILP (tem1)) + { + if (NILP (Fmember (tem, Vload_path))) + Vload_path = Fcons (tem, Vload_path); + } + + /* Add site-lisp under the installation dir, if it exists. */ + if (!no_site_lisp) + { + tem = Fexpand_file_name (build_string ("site-lisp"), + Vinstallation_directory); + tem1 = Ffile_exists_p (tem); + if (!NILP (tem1)) + { + if (NILP (Fmember (tem, Vload_path))) + Vload_path = Fcons (tem, Vload_path); + } + } + + /* If Emacs was not built in the source directory, + and it is run from where it was built, add to load-path + the lisp, leim and site-lisp dirs under that directory. */ + + if (NILP (Fequal (Vinstallation_directory, Vsource_directory))) + { + Lisp_Object tem2; + + tem = Fexpand_file_name (build_string ("src/Makefile"), + Vinstallation_directory); + tem1 = Ffile_exists_p (tem); + + /* Don't be fooled if they moved the entire source tree + AFTER dumping Emacs. If the build directory is indeed + different from the source dir, src/Makefile.in and + src/Makefile will not be found together. */ + tem = Fexpand_file_name (build_string ("src/Makefile.in"), + Vinstallation_directory); + tem2 = Ffile_exists_p (tem); + if (!NILP (tem1) && NILP (tem2)) + { + tem = Fexpand_file_name (build_string ("lisp"), + Vsource_directory); + + if (NILP (Fmember (tem, Vload_path))) + Vload_path = Fcons (tem, Vload_path); + + tem = Fexpand_file_name (build_string ("leim"), + Vsource_directory); + + if (NILP (Fmember (tem, Vload_path))) + Vload_path = Fcons (tem, Vload_path); + + if (!no_site_lisp) + { + tem = Fexpand_file_name (build_string ("site-lisp"), + Vsource_directory); + + if (NILP (Fmember (tem, Vload_path))) + Vload_path = Fcons (tem, Vload_path); + } + } + } /* Vinstallation_directory != Vsource_directory */ + + } /* if Vinstallation_directory */ + + /* Add the site-lisp directories at the front. */ + /* Note: If the site changed the load-path during dumping, + --no-site-lisp is ignored. I don't know what to do about this. + */ + if (!no_site_lisp) + { + Lisp_Object sitelisp; + sitelisp = decode_env_path (0, PATH_SITELOADSEARCH); + if (! NILP (sitelisp)) Vload_path = nconc2 (sitelisp, Vload_path); + } + } /* if dump_path == Vload_path */ } else /* !initialized */ { ------------------------------------------------------------ revno: 108815 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2012-06-30 19:09:47 +0300 message: Fix last entry in src/ChangeLog. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-06-30 15:55:27 +0000 +++ src/ChangeLog 2012-06-30 16:09:47 +0000 @@ -5,11 +5,7 @@ * w32.c (emacs_gnutls_pull): Call select with one more argument. * sysselect.h [DOS_NT]: Don't include sys/select.h. - - * s/ms-w32.h (select, pselect): Don't define here, they are - defined in sysselect.h - - * sysselect.h (pselect) [!HAVE_PSELECT]: Redirect to sys_select. + (pselect) [!MS_DOS]: Redirect to sys_select. * sysdep.c: Don't include dos.h and dosfns.h. ------------------------------------------------------------ revno: 108814 [merge] committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2012-06-30 18:55:27 +0300 message: Adapt the MS-DOS build to the latest changes. msdos/mainmake.v2 (bootstrap-clean): Do a maintainer-clean in lib, not bootstrap-clean (which doesn't exist). msdos/inttypes.h (PRIuMAX) [__DJGPP__ < 2.04]: Define to "llu". msdos/sedleim.inp (MKDIR_P): Edit to DOS "md" command. msdos/sed1v2.inp: (LIB_CLOCK_GETTIME): Edit to empty. Remove lines that invoke PAXCTL. (clean): Fix recipe not to run Unixy shell commands. msdos/sed2v2.inp (GETTIMEOFDAY_TIMEZONE): Edit to 'struct timezone'. (HAVE_STRNCASECMP): Edit to 1. msdos/sed3v2.inp (LIB_CLOCK_GETTIME): Edit to empty. (C_SWITCH_SYSTEM): Add "-I../msdos". msdos/sedlibmk.inp (GNULIB_GETTIMEOFDAY, GNULIB_PSELECT) (GNULIB_SELECT, HAVE_STRUCT_TIMEVAL, HAVE_SYS_SELECT_H) (HAVE_SYS_TIME_H, NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H) (NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H, NEXT_SYS_SELECT_H) (NEXT_SYS_TIME_H, REPLACE_GETTIMEOFDAY, REPLACE_PSELECT) (REPLACE_STRUCT_TIMEVAL): Edit to appropriate values. (BUILT_SOURCES): Edit out sys/select.h and sys/time.h. (mostlyclean-local, distclean-generic): Fix recipe not to run Unixy shell commands. src/sysselect.h [DOS_NT]: Don't include sys/select.h. src/sysselect.h (pselect) [!HAVE_PSELECT]: Redirect to sys_select. src/sysdep.c: Don't include dos.h and dosfns.h. src/process.c (sys_select): src/msdos.c (sys_select): Accept one more argument and ignore it. src/msdos.c (event_timestamp, sys_select): Use gnulib's gettime; adapt data types and code to that. src/dosfns.c: src/msdos.c (gettime, settime): Define away the prototypes in dos.h, which clashes with the gnulib function of the same name. src/ w32proc.c (sys_select): Accept and ignore one more argument. src/w32.c (emacs_gnutls_pull): Call select with one more argument. lisp/emacs-lisp/timer.el (timer-until): Subtract results of float-time, instead of taking float-time of the result of time-subtract, since float-time signals an error for negative time arguments. diff: === modified file 'lib-src/profile.c' --- lib-src/profile.c 2012-06-22 21:17:42 +0000 +++ lib-src/profile.c 2012-06-30 15:32:51 +0000 @@ -20,7 +20,7 @@ /** - ** To be run as an emacs process. Input string that starts with: + ** To be run as an emacs subprocess. Input string that starts with: ** 'z' -- resets the watch (to zero). ** 'p' -- return time (on stdout) as string with format . ** 'q' -- exit. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-06-30 14:21:24 +0000 +++ lisp/ChangeLog 2012-06-30 15:55:27 +0000 @@ -1,3 +1,10 @@ +2012-06-30 Eli Zaretskii + + * emacs-lisp/timer.el (timer-until): Subtract results of + float-time, instead of taking float-time of the result of + time-subtract, since float-time signals an error for negative time + arguments. + 2012-06-30 Chong Yidong * xml.el (xml-*-re): Convert defvars into defconsts, and === modified file 'lisp/emacs-lisp/timer.el' --- lisp/emacs-lisp/timer.el 2012-06-22 21:17:42 +0000 +++ lisp/emacs-lisp/timer.el 2012-06-30 15:32:51 +0000 @@ -268,7 +268,7 @@ "Calculate number of seconds from when TIMER will run, until TIME. TIMER is a timer, and stands for the time when its next repeat is scheduled. TIME is a time-list." - (float-time (time-subtract time (timer--time timer)))) + (- (float-time time) (float-time (timer--time timer)))) (defun timer-event-handler (timer) "Call the handler for the timer TIMER. === modified file 'msdos/ChangeLog' --- msdos/ChangeLog 2012-06-26 01:05:39 +0000 +++ msdos/ChangeLog 2012-06-30 15:32:51 +0000 @@ -1,3 +1,32 @@ +2012-06-30 Eli Zaretskii + + * mainmake.v2 (bootstrap-clean): Do a maintainer-clean in lib, not + bootstrap-clean (which doesn't exist). + + * inttypes.h (PRIuMAX) [__DJGPP__ < 2.04]: Define to "llu". + + * sedleim.inp (MKDIR_P): Edit to DOS "md" command. + + * sed1v2.inp: (LIB_CLOCK_GETTIME): Edit to empty. + Remove lines that invoke PAXCTL. + (clean): Fix recipe not to run Unixy shell commands. + + * sed2v2.inp (GETTIMEOFDAY_TIMEZONE): Edit to 'struct timezone'. + (HAVE_STRNCASECMP): Edit to 1. + + * sed3v2.inp (LIB_CLOCK_GETTIME): Edit to empty. + (C_SWITCH_SYSTEM): Add "-I../msdos". + + * sedlibmk.inp (GNULIB_GETTIMEOFDAY, GNULIB_PSELECT) + (GNULIB_SELECT, HAVE_STRUCT_TIMEVAL, HAVE_SYS_SELECT_H) + (HAVE_SYS_TIME_H, NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H) + (NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H, NEXT_SYS_SELECT_H) + (NEXT_SYS_TIME_H, REPLACE_GETTIMEOFDAY, REPLACE_PSELECT) + (REPLACE_STRUCT_TIMEVAL): Edit to appropriate values. + (BUILT_SOURCES): Edit out sys/select.h and sys/time.h. + (mostlyclean-local, distclean-generic): Fix recipe not to run + Unixy shell commands. + 2012-06-26 Paul Eggert Clean out last vestiges of the old HAVE_CONFIG_H stuff. === modified file 'msdos/inttypes.h' --- msdos/inttypes.h 2012-01-05 09:46:05 +0000 +++ msdos/inttypes.h 2012-06-30 15:32:51 +0000 @@ -31,6 +31,7 @@ #include #define strtoumax strtoull #define strtoimax strtoll +#define PRIuMAX "llu" #endif /* __DJGPP__ < 2.04 */ #endif === modified file 'msdos/mainmake.v2' --- msdos/mainmake.v2 2012-05-22 16:20:27 +0000 +++ msdos/mainmake.v2 2012-06-30 15:32:51 +0000 @@ -269,7 +269,7 @@ bootstrap-clean: FRC cd lib - $(MAKE) $(MFLAGS) $@ + -$(MAKE) $(MFLAGS) maintainer-clean cd .. cd src $(MAKE) $(MFLAGS) $@ === modified file 'msdos/sed1v2.inp' --- msdos/sed1v2.inp 2012-04-21 09:48:42 +0000 +++ msdos/sed1v2.inp 2012-06-30 15:32:51 +0000 @@ -105,6 +105,7 @@ /^LIBRESOLV *=/s/@LIBRESOLV@// /^LIBSELINUX_LIBS *=/s/@LIBSELINUX_LIBS@// /^LIB_PTHREAD_SIGMASK *=/s/@[^@\n]*@// +/^LIB_CLOCK_GETTIME *=/s/@[^@\n]*@//g /^LIBGNUTLS_LIBS *=/s/@[^@\n]*@// /^LIBGNUTLS_CFLAGS *=/s/@[^@\n]*@// /^GETLOADAVG_LIBS *=/s/@[^@\n]*@// @@ -137,6 +138,8 @@ /^[ ]*$/d /^ if test -f/,/^ fi$/c\ command.com /c if exist .gdbinit rm -f _gdbinit +/^ *test "X\$(PAXCTL)" = X/d +/^ *test "\$(CANNOT_DUMP)" = "yes"/d /^ if test "\$(CANNOT_DUMP)" =/,/^ else /d /^ fi/d /^ *LC_ALL=C \$(RUN_TEMACS)/i\ @@ -198,3 +201,4 @@ s| -I\$(srcdir)/../lib|| # Add our local inttypes.h to prerequisites where needed /^lread\.o:/s|lread\.c|& ../msdos/inttypes.h| +/^ *test "X/d === modified file 'msdos/sed2v2.inp' --- msdos/sed2v2.inp 2012-06-11 23:17:11 +0000 +++ msdos/sed2v2.inp 2012-06-30 15:32:51 +0000 @@ -45,10 +45,12 @@ /^#undef HAVE_MEMMOVE *$/s/^.*$/#define HAVE_MEMMOVE 1/ /^#undef HAVE_SETRLIMIT *$/s/^.*$/#define HAVE_SETRLIMIT 1/ /^#undef HAVE_GETRUSAGE *$/s/^.*$/#define HAVE_GETRUSAGE 1/ +/^#undef GETTIMEOFDAY_TIMEZONE *$/s/^.*$/#define GETTIMEOFDAY_TIMEZONE struct timezone/ /^#undef HAVE_TM_GMTOFF *$/s/^.*$/#define HAVE_TM_GMTOFF 1/ /^#undef HAVE_STRUCT_TIMEZONE *$/s/^.*$/#define HAVE_STRUCT_TIMEZONE 1/ /^#undef HAVE_SIZE_T *$/s/^.*$/#define HAVE_SIZE_T 1/ /^#undef HAVE_MKSTEMP *$/s/^.*$/#define HAVE_MKSTEMP 1/ +/^#undef HAVE_STRNCASECMP *$/s/^.*$/#define HAVE_STRNCASECMP 1/ /^#undef HAVE_STRUCT_TM_TM_ZONE *$/s/^.*$/#define HAVE_STRUCT_TM_TM_ZONE 1/ /^#undef HAVE_SYNC *$/s/^.*$/#define HAVE_SYNC 1/ /^#undef HAVE___BUILTIN_UNWIND_INIT *$/s/^.*$/#define HAVE___BUILTIN_UNWIND_INIT 1/ === modified file 'msdos/sed3v2.inp' --- msdos/sed3v2.inp 2012-04-14 05:04:54 +0000 +++ msdos/sed3v2.inp 2012-06-30 15:32:51 +0000 @@ -35,8 +35,9 @@ /^LIBRESOLV *=/s/@[^@\n]*@//g /^LIBS_MAIL *=/s/@[^@\n]*@//g /^LIBS_SYSTEM *=/s/@[^@\n]*@//g +/^LIB_CLOCK_GETTIME *=/s/@[^@\n]*@//g /^CFLAGS *=/s!=.*$!=-O2 -g! -/^C_SWITCH_SYSTEM *=/s!=.*$!=-DMSDOS! +/^C_SWITCH_SYSTEM *=/s!=.*$!=-DMSDOS -I../msdos! /^C_SWITCH_MACHINE *=/s/@C_SWITCH_MACHINE@// /^WARN_CFLAGS *=/s/@WARN_CFLAGS@// /^WERROR_CFLAGS *=/s/@WERROR_CFLAGS@// === modified file 'msdos/sedleim.inp' --- msdos/sedleim.inp 2012-04-21 09:48:42 +0000 +++ msdos/sedleim.inp 2012-06-30 15:32:51 +0000 @@ -35,6 +35,8 @@ export EMACSLOADPATH=${buildlisppath}\ RUN_EMACS = ${EMACS} -batch --no-site-file +/^MKDIR_P *=/s,@MKDIR_P@,command.com /c md, + /^ cd ../c\ ${MAKE} -C ../src ${MFLAGS} emacs === modified file 'msdos/sedlibmk.inp' --- msdos/sedlibmk.inp 2012-06-26 01:05:39 +0000 +++ msdos/sedlibmk.inp 2012-06-30 15:32:51 +0000 @@ -211,6 +211,7 @@ /^GNULIB_GETPAGESIZE *=/s/@GNULIB_GETPAGESIZE@/0/ /^GNULIB_GL_UNISTD_H_GETOPT *=/s/@GNULIB_GL_UNISTD_H_GETOPT@/1/ /^GNULIB_GETSUBOPT *=/s/@GNULIB_GETSUBOPT@/0/ +/^GNULIB_GETTIMEOFDAY *=/s/@GNULIB_GETTIMEOFDAY@/0/ /^GNULIB_GETUSERSHELL *=/s/@GNULIB_GETUSERSHELL@/0/ /^GNULIB_GRANTPT *=/s/@GNULIB_GRANTPT@/0/ /^GNULIB_GROUP_MEMBER *=/s/@GNULIB_GROUP_MEMBER@/0/ @@ -246,6 +247,7 @@ /^GNULIB_PREAD *=/s/@GNULIB_PREAD@/0/ /^GNULIB_PRINTF *=/s/@GNULIB_PRINTF@/0/ /^GNULIB_PRINTF_POSIX *=/s/@GNULIB_PRINTF_POSIX@/0/ +/^GNULIB_PSELECT *=/s/@GNULIB_PSELECT@/0/ /^GNULIB_PTHREAD_SIGMASK *=/s/@GNULIB_PTHREAD_SIGMASK@/0/ /^GNULIB_PTSNAME *=/s/@GNULIB_PTSNAME@/0/ /^GNULIB_PTSNAME_R *=/s/@GNULIB_PTSNAME_R@/0/ @@ -268,6 +270,7 @@ /^GNULIB_RMDIR *=/s/@GNULIB_RMDIR@/0/ /^GNULIB_RPMATCH *=/s/@GNULIB_RPMATCH@/0/ /^GNULIB_SCANF *=/s/@GNULIB_SCANF@/0/ +/^GNULIB_SELECT *=/s/@GNULIB_SELECT@/0/ /^GNULIB_SETENV *=/s/@GNULIB_SETENV@/0/ /^GNULIB_SETHOSTNAME *=/s/@GNULIB_SETHOSTNAME@/0/ /^GNULIB_SIGACTION *=/s/@GNULIB_SIGACTION@/0/ @@ -418,12 +421,15 @@ /^HAVE_STRTOULL *=/s/@HAVE_STRTOULL@/1/ /^HAVE_STRUCT_SIGACTION_SA_SIGACTION *=/s/@HAVE_STRUCT_SIGACTION_SA_SIGACTION@/0/ /^HAVE_STRUCT_RANDOM_DATA *=/s/@HAVE_STRUCT_RANDOM_DATA@/0/ +/^HAVE_STRUCT_TIMEVAL *=/s/@HAVE_STRUCT_TIMEVAL@/1/ /^HAVE_SYMLINK *=/s/@HAVE_SYMLINK@/1/ /^HAVE_SYMLINKAT *=/s/@HAVE_SYMLINKAT@/0/ /^HAVE_SYS_BITYPES_H *=/s/@HAVE_SYS_BITYPES_H@/0/ /^HAVE_SYS_INTTYPES_H *=/s/@HAVE_SYS_INTTYPES_H@/0/ /^HAVE_SYS_LOADAVG_H *=/s/@HAVE_SYS_LOADAVG_H@/0/ /^HAVE_SYS_PARAM_H *=/s/@HAVE_SYS_PARAM_H@/1/ +/^HAVE_SYS_SELECT_H *=/s/@HAVE_SYS_SELECT_H@/0/ +/^HAVE_SYS_TIME_H *=/s/@HAVE_SYS_TIME_H@/1/ /^HAVE_SYS_TYPES_H *=/s/@HAVE_SYS_TYPES_H@/1/ /^HAVE_TIMEGM *=/s/@HAVE_TIMEGM@/0/ /^HAVE_TYPE_VOLATILE_SIG_ATOMIC_T *=/s/@HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@/1/ @@ -457,7 +463,9 @@ /^NEXT_AS_FIRST_DIRECTIVE_STDINT_H *=/s/@[^@\n]*@// /^NEXT_AS_FIRST_DIRECTIVE_STDIO_H *=/s/@[^@\n]*@// /^NEXT_AS_FIRST_DIRECTIVE_STDLIB_H *=/s/@[^@\n]*@// +/^NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H *=/s/@[^@\n]*@// /^NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H *=/s!@[^@\n]*@!! +/^NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H *=/s/@[^@\n]*@// /^NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H *=/s!@[^@\n]*@!! /^NEXT_AS_FIRST_DIRECTIVE_TIME_H *=/s/@[^@\n]*@// /^NEXT_AS_FIRST_DIRECTIVE_UNISTD_H *=/s/@[^@\n]*@// @@ -468,7 +476,9 @@ /^NEXT_STDIO_H *=/s/@[^@\n]*@// /^NEXT_STDINT_H *=/s/@[^@\n]*@// /^NEXT_STDLIB_H *=/s/@[^@\n]*@// +/^NEXT_SYS_SELECT_H *=/s/@[^@\n]*@// /^NEXT_SYS_STAT_H *=/s!@[^@\n]*@!! +/^NEXT_SYS_TIME_H *=/s/@[^@\n]*@// /^NEXT_SYS_TYPES_H *=/s!@[^@\n]*@!! /^NEXT_TIME_H *=/s/@[^@\n]*@// /^NEXT_UNISTD_H *=/s/@[^@\n]*@// @@ -507,6 +517,7 @@ /^REPLACE_GETLINE *=/s/@REPLACE_GETLINE@/0/ /^REPLACE_GETLOGIN_R *=/s/@REPLACE_GETLOGIN_R@/0/ /^REPLACE_GETPAGESIZE *=/s/@REPLACE_GETPAGESIZE@/0/ +/^REPLACE_GETTIMEOFDAY *=/s/@REPLACE_GETTIMEOFDAY@/0/ /^REPLACE_ISATTY *=/s/@REPLACE_ISATTY@/0/ /^REPLACE_LCHOWN *=/s/@REPLACE_LCHOWN@/0/ /^REPLACE_LINK *=/s/@REPLACE_LINK@/0/ @@ -529,6 +540,7 @@ /^REPLACE_PREAD *=/s/@REPLACE_PREAD@/0/ /^REPLACE_PRINTF *=/s/@REPLACE_PRINTF@/0/ /^REPLACE_PTHREAD_SIGMASK *=/s/@REPLACE_PTHREAD_SIGMASK@/0/ +/^REPLACE_PSELECT *=/s/@REPLACE_PSELECT@/0/ /^REPLACE_PTSNAME_R *=/s/@REPLACE_PTSNAME_R@/0/ /^REPLACE_PUTENV *=/s/@REPLACE_PUTENV@/0/ /^REPLACE_PWRITE *=/s/@REPLACE_PWRITE@/0/ @@ -551,6 +563,7 @@ /^REPLACE_STDIO_WRITE_FUNCS *=/s/@REPLACE_STDIO_WRITE_FUNCS@/0/ /^REPLACE_STRTOD *=/s/@REPLACE_STRTOD@/0/ /^REPLACE_STRTOIMAX *=/s/@REPLACE_STRTOIMAX@/0/ +/^REPLACE_STRUCT_TIMEVAL *=/s/@REPLACE_STRUCT_TIMEVAL@/0/ /^REPLACE_SYMLINK *=/s/@REPLACE_SYMLINK@/0/ /^REPLACE_TIMEGM *=/s/@REPLACE_TIMEGM@/0/ /^REPLACE_TMPFILE *=/s/@REPLACE_TMPFILE@/0/ @@ -588,6 +601,10 @@ /am__append_2 *=.*verify\.h/s/@[^@\n]*@// /^gl_LIBOBJS *=/s/@[^@\n]*@/getopt.o getopt1.o strftime.o time_r.o getloadavg.o pthread_sigmask.o/ /^BUILT_SOURCES *=/s/ *inttypes\.h// +/^BUILT_SOURCES *=/,/^[^ ]/{ + s| *sys/select\.h|| + s| *sys/time\.h|| +} /^am_libgnu_a_OBJECTS *=/s/careadlinkat\.\$(OBJEXT)// /^am_libgnu_a_OBJECTS *=/s/allocator\.\$(OBJEXT)// /^srcdir *=/s/@[^@\n]*@/./ @@ -661,3 +678,6 @@ s/'\; \\ *$/' >> $@-t/ } s!\$(MKDIR_P)[ ][ ]*sys!command.com /c "if not exist sys\\stat.h md sys"! +/^ @for dir in/,/^[^ ]/c\ + -rm -rf $(MOSTLYCLEANDIRS) +/^ *-test . /d === modified file 'src/ChangeLog' --- src/ChangeLog 2012-06-30 09:13:54 +0000 +++ src/ChangeLog 2012-06-30 15:55:27 +0000 @@ -1,3 +1,28 @@ +2012-06-30 Eli Zaretskii + + * w32proc.c (sys_select): Accept and ignore one more argument. + + * w32.c (emacs_gnutls_pull): Call select with one more argument. + + * sysselect.h [DOS_NT]: Don't include sys/select.h. + + * s/ms-w32.h (select, pselect): Don't define here, they are + defined in sysselect.h + + * sysselect.h (pselect) [!HAVE_PSELECT]: Redirect to sys_select. + + * sysdep.c: Don't include dos.h and dosfns.h. + + * process.c (sys_select): + * msdos.c (sys_select): Accept one more argument and ignore it. + + * msdos.c (event_timestamp, sys_select): Use gnulib's gettime; + adapt data types and code to that. + + * dosfns.c: + * msdos.c (gettime, settime): Define away the prototypes in dos.h, + which clashes with the gnulib function of the same name. + 2012-06-30 Andreas Schwab * font.c (font_style_to_value, font_style_symbolic) === modified file 'src/dosfns.c' --- src/dosfns.c 2012-06-19 16:56:28 +0000 +++ src/dosfns.c 2012-06-30 15:32:51 +0000 @@ -23,7 +23,13 @@ /* The entire file is within this conditional */ #include +/* gettine and settime in dos.h clash with their namesakes from + gnulib, so we move out of our way the prototypes in dos.h. */ +#define gettime dos_h_gettime_ +#define settime dos_h_settime_ #include +#undef gettime +#undef settime #include #include "lisp.h" #include "character.h" === modified file 'src/msdos.c' --- src/msdos.c 2012-06-25 10:28:47 +0000 +++ src/msdos.c 2012-06-30 15:32:51 +0000 @@ -31,7 +31,13 @@ #include #include #include +/* gettine and settime in dos.h clash with their namesakes from + gnulib, so we move out of our way the prototypes in dos.h. */ +#define gettime dos_h_gettime_ +#define settime dos_h_settime_ #include +#undef gettime +#undef settime #include #include /* for _fixpath */ #include /* for chdir, dup, dup2, etc. */ @@ -103,18 +109,18 @@ #endif /* not SYSTEM_MALLOC */ +/* Return the current timestamp in milliseconds since midnight. */ static unsigned long event_timestamp (void) { - struct time t; + struct timespec t; unsigned long s; gettime (&t); - s = t.ti_min; - s *= 60; - s += t.ti_sec; + s = t.tv_sec; + s %= 86400; s *= 1000; - s += t.ti_hund * 10; + s += t.tv_nsec * 1000000; return s; } @@ -4097,10 +4103,10 @@ because wait_reading_process_output takes care of that. */ int sys_select (int nfds, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds, - EMACS_TIME *timeout) + EMACS_TIME *timeout, void *ignored) { int check_input; - struct time t; + struct timespec t; check_input = 0; if (rfds) @@ -4130,18 +4136,13 @@ EMACS_TIME clnow, cllast, cldiff; gettime (&t); - EMACS_SET_SECS_USECS (cllast, t.ti_sec, t.ti_hund * 10000L); + EMACS_SET_SECS_NSECS (cllast, t.tv_sec, t.tv_nsec); while (!check_input || !detect_input_pending ()) { gettime (&t); - EMACS_SET_SECS_USECS (clnow, t.ti_sec, t.ti_hund * 10000L); + EMACS_SET_SECS_NSECS (clnow, t.tv_sec, t.tv_nsec); EMACS_SUB_TIME (cldiff, clnow, cllast); - - /* When seconds wrap around, we assume that no more than - 1 minute passed since last `gettime'. */ - if (EMACS_TIME_SIGN (cldiff) < 0) - EMACS_SET_SECS (cldiff, EMACS_SECS (cldiff) + 60); EMACS_SUB_TIME (*timeout, *timeout, cldiff); /* Stop when timeout value crosses zero. */ === modified file 'src/process.c' --- src/process.c 2012-06-30 09:13:54 +0000 +++ src/process.c 2012-06-30 15:55:27 +0000 @@ -6808,7 +6808,7 @@ /* Defined on msdos.c. */ extern int sys_select (int, SELECT_TYPE *, SELECT_TYPE *, SELECT_TYPE *, - EMACS_TIME *); + EMACS_TIME *, void *); /* Implementation of wait_reading_process_output, assuming that there are no subprocesses. Used only by the MS-DOS build. === modified file 'src/s/ms-w32.h' --- src/s/ms-w32.h 2012-06-26 17:00:33 +0000 +++ src/s/ms-w32.h 2012-06-30 15:55:27 +0000 @@ -234,7 +234,7 @@ #define rename sys_rename #define rmdir sys_rmdir #define select sys_select -#define pselect sys_select +#define pselect sys_select #define sleep sys_sleep #define strerror sys_strerror #undef unlink === modified file 'src/sysdep.c' --- src/sysdep.c 2012-06-24 20:13:15 +0000 +++ src/sysdep.c 2012-06-30 15:32:51 +0000 @@ -65,8 +65,6 @@ #endif #ifdef MSDOS /* Demacs 1.1.2 91/10/20 Manabu Higashida, MW Aug 1993 */ -#include -#include "dosfns.h" #include "msdos.h" #include #endif === modified file 'src/sysselect.h' --- src/sysselect.h 2012-06-23 10:22:59 +0000 +++ src/sysselect.h 2012-06-30 15:55:27 +0000 @@ -19,7 +19,7 @@ #if defined (DARWIN_OS) #undef init_process #endif -#ifndef WINDOWSNT +#ifndef DOS_NT #include #endif #if defined (DARWIN_OS) @@ -52,3 +52,7 @@ #if !defined (HAVE_SELECT) #define select sys_select #endif + +#ifdef MSDOS +#define pselect sys_select +#endif === modified file 'src/w32.c' --- src/w32.c 2012-06-29 13:11:54 +0000 +++ src/w32.c 2012-06-30 15:55:27 +0000 @@ -6312,7 +6312,7 @@ /* Use select with the timeout to poll the selector. */ sc = select (fd + 1, &fdset, (SELECT_TYPE *)0, (SELECT_TYPE *)0, - &timeout); + &timeout, NULL); if (sc > 0) continue; /* Try again. */ === modified file 'src/w32proc.c' --- src/w32proc.c 2012-06-26 05:00:30 +0000 +++ src/w32proc.c 2012-06-30 15:55:27 +0000 @@ -1080,7 +1080,7 @@ int sys_select (int nfds, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds, - EMACS_TIME *timeout) + EMACS_TIME *timeout, void *ignored) { SELECT_TYPE orfds; DWORD timeout_ms, start_time; ------------------------------------------------------------ revno: 108813 committer: Chong Yidong branch nick: trunk timestamp: Sat 2012-06-30 22:21:24 +0800 message: Fix use of eval-and-compile in regexps in xml.el. * xml.el (xml-*-re): Convert defvars into defconsts, and eval-and-compile them so eval-and-compile works on derivatives. (xml--entity-replacement-text): Use eval-and-comple. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-06-30 13:18:16 +0000 +++ lisp/ChangeLog 2012-06-30 14:21:24 +0000 @@ -1,3 +1,9 @@ +2012-06-30 Chong Yidong + + * xml.el (xml-*-re): Convert defvars into defconsts, and + eval-and-compile them so eval-and-compile works on derivatives. + (xml--entity-replacement-text): Use eval-and-comple. + 2012-06-30 Michael Albinus * vc/vc-git.el (vc-git-registered): Use cache property === modified file 'lisp/xml.el' --- lisp/xml.el 2012-06-30 13:57:55 +0000 +++ lisp/xml.el 2012-06-30 14:21:24 +0000 @@ -183,79 +183,90 @@ (current-buffer) parse-dtd parse-ns)))) - -(defvar xml-name-re) -(defvar xml-entity-value-re) -(defvar xml-att-def-re) +(eval-and-compile (let* ((start-chars (concat "[:alpha:]:_")) (name-chars (concat "-[:digit:]." start-chars)) - ;;[3] S ::= (#x20 | #x9 | #xD | #xA)+ + ;;[3] S ::= (#x20 | #x9 | #xD | #xA)+ (whitespace "[ \t\n\r]")) - ;;[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] - ;; | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] - ;; | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] - ;; | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF] - (defvar xml-name-start-char-re (concat "[" start-chars "]")) - ;;[4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040] - (defvar xml-name-char-re (concat "[" name-chars "]")) - ;;[5] Name ::= NameStartChar (NameChar)* - (defvar xml-name-re (concat xml-name-start-char-re xml-name-char-re "*")) - ;;[6] Names ::= Name (#x20 Name)* - (defvar xml-names-re (concat xml-name-re "\\(?: " xml-name-re "\\)*")) - ;;[7] Nmtoken ::= (NameChar)+ - (defvar xml-nmtoken-re (concat xml-name-char-re "+")) - ;;[8] Nmtokens ::= Nmtoken (#x20 Nmtoken)* - (defvar xml-nmtokens-re (concat xml-nmtoken-re "\\(?: " xml-name-re "\\)*")) - ;;[66] CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';' - (defvar xml-char-ref-re "\\(?:&#[0-9]+;\\|&#x[0-9a-fA-F]+;\\)") - ;;[68] EntityRef ::= '&' Name ';' - (defvar xml-entity-ref (concat "&" xml-name-re ";")) - ;;[69] PEReference ::= '%' Name ';' - (defvar xml-pe-reference-re (concat "%" xml-name-re ";")) - ;;[67] Reference ::= EntityRef | CharRef - (defvar xml-reference-re (concat "\\(?:" xml-entity-ref "\\|" xml-char-ref-re "\\)")) - ;;[10] AttValue ::= '"' ([^<&"] | Reference)* '"' | "'" ([^<&'] | Reference)* "'" - (defvar xml-att-value-re (concat "\\(?:\"\\(?:[^&\"]\\|" xml-reference-re "\\)*\"\\|" - "'\\(?:[^&']\\|" xml-reference-re "\\)*'\\)")) - ;;[56] TokenizedType ::= 'ID' [VC: ID] [VC: One ID per Element Type] [VC: ID Attribute Default] - ;; | 'IDREF' [VC: IDREF] - ;; | 'IDREFS' [VC: IDREF] - ;; | 'ENTITY' [VC: Entity Name] - ;; | 'ENTITIES' [VC: Entity Name] - ;; | 'NMTOKEN' [VC: Name Token] - ;; | 'NMTOKENS' [VC: Name Token] - (defvar xml-tokenized-type-re "\\(?:ID\\|IDREF\\|IDREFS\\|ENTITY\\|ENTITIES\\|NMTOKEN\\|NMTOKENS\\)") - ;;[58] NotationType ::= 'NOTATION' S '(' S? Name (S? '|' S? Name)* S? ')' - (defvar xml-notation-type-re (concat "\\(?:NOTATION" whitespace "(" whitespace "*" xml-name-re - "\\(?:" whitespace "*|" whitespace "*" xml-name-re "\\)*" whitespace "*)\\)")) - ;;[59] Enumeration ::= '(' S? Nmtoken (S? '|' S? Nmtoken)* S? ')' [VC: Enumeration] [VC: No Duplicate Tokens] - (defvar xml-enumeration-re (concat "\\(?:(" whitespace "*" xml-nmtoken-re - "\\(?:" whitespace "*|" whitespace "*" xml-nmtoken-re "\\)*" + ;; [4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] + ;; | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] + ;; | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] + ;; | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] + ;; | [#x10000-#xEFFFF] + (defconst xml-name-start-char-re (concat "[" start-chars "]")) + ;; [4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 + ;; | [#x0300-#x036F] | [#x203F-#x2040] + (defconst xml-name-char-re (concat "[" name-chars "]")) + ;; [5] Name ::= NameStartChar (NameChar)* + (defconst xml-name-re (concat xml-name-start-char-re xml-name-char-re "*")) + ;; [6] Names ::= Name (#x20 Name)* + (defconst xml-names-re (concat xml-name-re "\\(?: " xml-name-re "\\)*")) + ;; [7] Nmtoken ::= (NameChar)+ + (defconst xml-nmtoken-re (concat xml-name-char-re "+")) + ;; [8] Nmtokens ::= Nmtoken (#x20 Nmtoken)* + (defconst xml-nmtokens-re (concat xml-nmtoken-re "\\(?: " xml-name-re "\\)*")) + ;; [66] CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';' + (defconst xml-char-ref-re "\\(?:&#[0-9]+;\\|&#x[0-9a-fA-F]+;\\)") + ;; [68] EntityRef ::= '&' Name ';' + (defconst xml-entity-ref (concat "&" xml-name-re ";")) + ;; [69] PEReference ::= '%' Name ';' + (defconst xml-pe-reference-re (concat "%" xml-name-re ";")) + ;; [67] Reference ::= EntityRef | CharRef + (defconst xml-reference-re (concat "\\(?:" xml-entity-ref "\\|" xml-char-ref-re "\\)")) + ;; [10] AttValue ::= '"' ([^<&"] | Reference)* '"' | "'" ([^<&'] | Reference)* "'" + (defconst xml-att-value-re (concat "\\(?:\"\\(?:[^&\"]\\|" xml-reference-re "\\)*\"\\|" + "'\\(?:[^&']\\|" xml-reference-re "\\)*'\\)")) + ;; [56] TokenizedType ::= 'ID' [VC: ID] [VC: One ID / Element Type] [VC: ID Attribute Default] + ;; | 'IDREF' [VC: IDREF] + ;; | 'IDREFS' [VC: IDREF] + ;; | 'ENTITY' [VC: Entity Name] + ;; | 'ENTITIES' [VC: Entity Name] + ;; | 'NMTOKEN' [VC: Name Token] + ;; | 'NMTOKENS' [VC: Name Token] + (defconst xml-tokenized-type-re (concat "\\(?:ID\\|IDREF\\|IDREFS\\|ENTITY\\|" + "ENTITIES\\|NMTOKEN\\|NMTOKENS\\)")) + ;; [58] NotationType ::= 'NOTATION' S '(' S? Name (S? '|' S? Name)* S? ')' + (defconst xml-notation-type-re + (concat "\\(?:NOTATION" whitespace "(" whitespace "*" xml-name-re + "\\(?:" whitespace "*|" whitespace "*" xml-name-re "\\)*" + whitespace "*)\\)")) + ;; [59] Enumeration ::= '(' S? Nmtoken (S? '|' S? Nmtoken)* S? ')' + ;; [VC: Enumeration] [VC: No Duplicate Tokens] + (defconst xml-enumeration-re (concat "\\(?:(" whitespace "*" xml-nmtoken-re + "\\(?:" whitespace "*|" whitespace "*" + xml-nmtoken-re "\\)*" whitespace ")\\)")) - ;;[57] EnumeratedType ::= NotationType | Enumeration - (defvar xml-enumerated-type-re (concat "\\(?:" xml-notation-type-re "\\|" xml-enumeration-re "\\)")) - ;;[54] AttType ::= StringType | TokenizedType | EnumeratedType - ;;[55] StringType ::= 'CDATA' - (defvar xml-att-type-re (concat "\\(?:CDATA\\|" xml-tokenized-type-re "\\|" xml-notation-type-re"\\|" xml-enumerated-type-re "\\)")) - ;;[60] DefaultDecl ::= '#REQUIRED' | '#IMPLIED' | (('#FIXED' S)? AttValue) - (defvar xml-default-decl-re (concat "\\(?:#REQUIRED\\|#IMPLIED\\|\\(?:#FIXED" whitespace "\\)*" xml-att-value-re "\\)")) - ;;[53] AttDef ::= S Name S AttType S DefaultDecl - (defvar xml-att-def-re (concat "\\(?:" whitespace "*" xml-name-re - whitespace "*" xml-att-type-re - whitespace "*" xml-default-decl-re "\\)")) - ;;[9] EntityValue ::= '"' ([^%&"] | PEReference | Reference)* '"' - ;; | "'" ([^%&'] | PEReference | Reference)* "'" - (defvar xml-entity-value-re (concat "\\(?:\"\\(?:[^%&\"]\\|" xml-pe-reference-re - "\\|" xml-reference-re "\\)*\"\\|'\\(?:[^%&']\\|" - xml-pe-reference-re "\\|" xml-reference-re "\\)*'\\)"))) -;;[75] ExternalID ::= 'SYSTEM' S SystemLiteral -;; | 'PUBLIC' S PubidLiteral S SystemLiteral -;;[76] NDataDecl ::= S 'NDATA' S -;;[73] EntityDef ::= EntityValue| (ExternalID NDataDecl?) -;;[71] GEDecl ::= '' -;;[74] PEDef ::= EntityValue | ExternalID -;;[72] PEDecl ::= '' -;;[70] EntityDecl ::= GEDecl | PEDecl + ;; [57] EnumeratedType ::= NotationType | Enumeration + (defconst xml-enumerated-type-re (concat "\\(?:" xml-notation-type-re + "\\|" xml-enumeration-re "\\)")) + ;; [54] AttType ::= StringType | TokenizedType | EnumeratedType + ;; [55] StringType ::= 'CDATA' + (defconst xml-att-type-re (concat "\\(?:CDATA\\|" xml-tokenized-type-re + "\\|" xml-notation-type-re + "\\|" xml-enumerated-type-re "\\)")) + ;; [60] DefaultDecl ::= '#REQUIRED' | '#IMPLIED' | (('#FIXED' S)? AttValue) + (defconst xml-default-decl-re (concat "\\(?:#REQUIRED\\|#IMPLIED\\|\\(?:#FIXED" + whitespace "\\)*" xml-att-value-re "\\)")) + ;; [53] AttDef ::= S Name S AttType S DefaultDecl + (defconst xml-att-def-re (concat "\\(?:" whitespace "*" xml-name-re + whitespace "*" xml-att-type-re + whitespace "*" xml-default-decl-re "\\)")) + ;; [9] EntityValue ::= '"' ([^%&"] | PEReference | Reference)* '"' + ;; | "'" ([^%&'] | PEReference | Reference)* "'" + (defconst xml-entity-value-re (concat "\\(?:\"\\(?:[^%&\"]\\|" xml-pe-reference-re + "\\|" xml-reference-re + "\\)*\"\\|'\\(?:[^%&']\\|" + xml-pe-reference-re "\\|" + xml-reference-re "\\)*'\\)")))) + +;; [75] ExternalID ::= 'SYSTEM' S SystemLiteral +;; | 'PUBLIC' S PubidLiteral S SystemLiteral +;; [76] NDataDecl ::= S 'NDATA' S +;; [73] EntityDef ::= EntityValue| (ExternalID NDataDecl?) +;; [71] GEDecl ::= '' +;; [74] PEDef ::= EntityValue | ExternalID +;; [72] PEDecl ::= '' +;; [70] EntityDecl ::= GEDecl | PEDecl ;; Note that this is setup so that we can do whitespace-skipping with ;; `(skip-syntax-forward " ")', inter alia. Previously this was slow @@ -722,8 +733,9 @@ "Return the replacement text for the entity value STRING. The replacement text is obtained by replacing character references and parameter-entity references." - (let ((ref-re (concat "\\(?:&#\\([0-9]+\\)\\|&#x\\([0-9a-fA-F]+\\)\\|%\\(" - xml-name-re "\\)\\);")) + (let ((ref-re (eval-when-compile + (concat "\\(?:&#\\([0-9]+\\)\\|&#x\\([0-9a-fA-F]+\\)\\|%\\(" + xml-name-re "\\)\\);"))) children) (while (string-match ref-re string) (push (substring string 0 (match-beginning 0)) children) ------------------------------------------------------------ revno: 108812 committer: Chong Yidong branch nick: trunk timestamp: Sat 2012-06-30 21:57:55 +0800 message: xml.el: Fix last change. diff: === modified file 'lisp/xml.el' --- lisp/xml.el 2012-06-30 11:33:22 +0000 +++ lisp/xml.el 2012-06-30 13:57:55 +0000 @@ -722,9 +722,8 @@ "Return the replacement text for the entity value STRING. The replacement text is obtained by replacing character references and parameter-entity references." - (let ((ref-re (eval-when-compile - (concat "\\(?:&#\\([0-9]+\\)\\|&#x\\([0-9a-fA-F]+\\)\\|%\\(" - xml-name-re "\\)\\);"))) + (let ((ref-re (concat "\\(?:&#\\([0-9]+\\)\\|&#x\\([0-9a-fA-F]+\\)\\|%\\(" + xml-name-re "\\)\\);")) children) (while (string-match ref-re string) (push (substring string 0 (match-beginning 0)) children) ------------------------------------------------------------ revno: 108811 committer: Michael Albinus branch nick: trunk timestamp: Sat 2012-06-30 15:18:16 +0200 message: * vc/vc-git.el (vc-git-registered): Use cache property `git-registered'. (vc-git-mode-line-string): Call `vc-working-revision' instead of `vc-git-working-revision' in order to benefit from the cache. (vc-git-root): Use cache property `git-root'. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-06-30 13:14:00 +0000 +++ lisp/ChangeLog 2012-06-30 13:18:16 +0000 @@ -1,3 +1,11 @@ +2012-06-30 Michael Albinus + + * vc/vc-git.el (vc-git-registered): Use cache property + `git-registered'. + (vc-git-mode-line-string): Call `vc-working-revision' instead of + `vc-git-working-revision' in order to benefit from the cache. + (vc-git-root): Use cache property `git-root'. + 2012-06-30 Dmitry Gutov * vc/vc-hooks.el (vc-before-save): Clear cache if file has been === modified file 'lisp/vc/vc-git.el' --- lisp/vc/vc-git.el 2012-06-02 10:56:09 +0000 +++ lisp/vc/vc-git.el 2012-06-30 13:18:16 +0000 @@ -173,28 +173,31 @@ (defun vc-git-registered (file) "Check whether FILE is registered with git." - (let ((dir (vc-git-root file))) - (when dir - (with-temp-buffer - (let* (process-file-side-effects - ;; Do not use the `file-name-directory' here: git-ls-files - ;; sometimes fails to return the correct status for relative - ;; path specs. - ;; See also: http://marc.info/?l=git&m=125787684318129&w=2 - (name (file-relative-name file dir)) - (str (ignore-errors - (cd dir) - (vc-git--out-ok "ls-files" "-c" "-z" "--" name) - ;; If result is empty, use ls-tree to check for deleted - ;; file. - (when (eq (point-min) (point-max)) - (vc-git--out-ok "ls-tree" "--name-only" "-z" "HEAD" - "--" name)) - (buffer-string)))) - (and str - (> (length str) (length name)) - (string= (substring str 0 (1+ (length name))) - (concat name "\0")))))))) + (or (vc-file-getprop file 'git-registered) + (vc-file-setprop + file 'git-registered + (let ((dir (vc-git-root file))) + (when dir + (with-temp-buffer + (let* (process-file-side-effects + ;; Do not use the `file-name-directory' here: git-ls-files + ;; sometimes fails to return the correct status for relative + ;; path specs. + ;; See also: http://marc.info/?l=git&m=125787684318129&w=2 + (name (file-relative-name file dir)) + (str (ignore-errors + (cd dir) + (vc-git--out-ok "ls-files" "-c" "-z" "--" name) + ;; If result is empty, use ls-tree to check for deleted + ;; file. + (when (eq (point-min) (point-max)) + (vc-git--out-ok "ls-tree" "--name-only" "-z" "HEAD" + "--" name)) + (buffer-string)))) + (and str + (> (length str) (length name)) + (string= (substring str 0 (1+ (length name))) + (concat name "\0")))))))))) (defun vc-git--state-code (code) "Convert from a string to a added/deleted/modified state." @@ -248,7 +251,7 @@ (defun vc-git-mode-line-string (file) "Return a string for `vc-mode-line' to put in the mode line for FILE." - (let* ((branch (vc-git-working-revision file)) + (let* ((branch (vc-working-revision file)) (def-ml (vc-default-mode-line-string 'Git file)) (help-echo (get-text-property 0 'help-echo def-ml))) (if (zerop (length branch)) @@ -959,7 +962,8 @@ (defun vc-git-extra-status-menu () vc-git-extra-menu-map) (defun vc-git-root (file) - (vc-find-root file ".git")) + (or (vc-file-getprop file 'git-root) + (vc-file-setprop file 'git-root (vc-find-root file ".git")))) ;; Derived from `lgrep'. (defun vc-git-grep (regexp &optional files dir) ------------------------------------------------------------ revno: 108810 author: Dmitry Gutov committer: Michael Albinus branch nick: trunk timestamp: Sat 2012-06-30 15:14:00 +0200 message: * vc/vc-hooks.el (vc-before-save): Clear cache if file has been removed (likely outside Emacs). diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-06-30 12:05:22 +0000 +++ lisp/ChangeLog 2012-06-30 13:14:00 +0000 @@ -1,3 +1,8 @@ +2012-06-30 Dmitry Gutov + + * vc/vc-hooks.el (vc-before-save): Clear cache if file has been + removed (likely outside Emacs). + 2012-06-30 Stefan Monnier * emacs-lisp/cl-lib.el: Require macroexp for its macros. === modified file 'lisp/vc/vc-hooks.el' --- lisp/vc/vc-hooks.el 2012-06-27 21:15:13 +0000 +++ lisp/vc/vc-hooks.el 2012-06-30 13:14:00 +0000 @@ -704,6 +704,8 @@ (let ((file buffer-file-name) backend) (ignore-errors ;Be careful not to prevent saving the file. + (unless (file-exists-p file) + (vc-file-clearprops file)) (and (setq backend (vc-backend file)) (vc-up-to-date-p file) (eq (vc-checkout-model backend (list file)) 'implicit) ------------------------------------------------------------ revno: 108809 committer: Stefan Monnier branch nick: trunk timestamp: Sat 2012-06-30 08:52:08 -0400 message: * lisp/emacs-lisp/cl-lib.el: Require macroexp. diff: === modified file 'lisp/emacs-lisp/cl-lib.el' --- lisp/emacs-lisp/cl-lib.el 2012-06-30 12:05:22 +0000 +++ lisp/emacs-lisp/cl-lib.el 2012-06-30 12:52:08 +0000 @@ -91,7 +91,7 @@ ;;; Code: -(eval-when-compile (require 'macroexp)) +(require 'macroexp) (defvar cl-optimize-speed 1) (defvar cl-optimize-safety 1) ------------------------------------------------------------ revno: 108808 committer: Stefan Monnier branch nick: trunk timestamp: Sat 2012-06-30 08:05:22 -0400 message: * lisp/emacs-lisp/cl-lib.el: Require macroexp for its macros. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-06-30 11:33:22 +0000 +++ lisp/ChangeLog 2012-06-30 12:05:22 +0000 @@ -1,3 +1,7 @@ +2012-06-30 Stefan Monnier + + * emacs-lisp/cl-lib.el: Require macroexp for its macros. + 2012-06-30 Chong Yidong * xml.el: Implement XML parameter entities. === modified file 'lisp/emacs-lisp/cl-lib.el' --- lisp/emacs-lisp/cl-lib.el 2012-06-30 02:00:08 +0000 +++ lisp/emacs-lisp/cl-lib.el 2012-06-30 12:05:22 +0000 @@ -91,6 +91,8 @@ ;;; Code: +(eval-when-compile (require 'macroexp)) + (defvar cl-optimize-speed 1) (defvar cl-optimize-safety 1) ------------------------------------------------------------ revno: 108807 committer: Chong Yidong branch nick: trunk timestamp: Sat 2012-06-30 19:33:22 +0800 message: * xml.el: Implement XML parameter entities. (xml-parameter-entity-alist): New variable. (xml-parse-region, xml-parse-fragment): Preserve previous values of xml-entity-alist and xml-parameter-entity-alist, so that repeated calls on different documents do not change them. (xml-parse-tag): Fix doctype regexp. (xml--entity-replacement-text): New function. (xml-parse-dtd): Use it. Don't handle system entities; doing that properly requires url retrieval which is unimplemented. (xml-escape-string): Doc fix. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-06-30 02:00:08 +0000 +++ lisp/ChangeLog 2012-06-30 11:33:22 +0000 @@ -1,3 +1,16 @@ +2012-06-30 Chong Yidong + + * xml.el: Implement XML parameter entities. + (xml-parameter-entity-alist): New variable. + (xml-parse-region, xml-parse-fragment): Preserve previous values + of xml-entity-alist and xml-parameter-entity-alist, so that + repeated calls on different documents do not change them. + (xml-parse-tag): Fix doctype regexp. + (xml--entity-replacement-text): New function. + (xml-parse-dtd): Use it. Don't handle system entities; doing that + properly requires url retrieval which is unimplemented. + (xml-escape-string): Doc fix. + 2012-06-30 Stefan Monnier * emacs-lisp/cl-lib.el (cl-pushnew): Use macroexp-let2. === modified file 'lisp/xml.el' --- lisp/xml.el 2012-06-24 15:06:24 +0000 +++ lisp/xml.el 2012-06-30 11:33:22 +0000 @@ -95,10 +95,13 @@ ("apos" . "'") ("quot" . "\"") ("amp" . "&")) - "The defined entities. Entities are added to this when the DTD is parsed.") + "Alist of defined XML entities.") + +(defvar xml-parameter-entity-alist nil + "Alist of defined XML parametric entities.") (defvar xml-sub-parser nil - "Dynamically set this to a non-nil value if you want to parse an XML fragment.") + "Non-nil when the XML parser is parsing an XML fragment.") (defvar xml-validating-parser nil "Set to non-nil to get validity checking.") @@ -308,6 +311,9 @@ ;; specs DTRT. (with-syntax-table (standard-syntax-table) (let ((case-fold-search nil) ; XML is case-sensitive. + ;; Prevent entity definitions from changing the defaults + (xml-entity-alist xml-entity-alist) + (xml-parameter-entity-alist xml-parameter-entity-alist) xml result dtd) (save-excursion (if buffer @@ -366,6 +372,9 @@ (defun xml-parse-fragment (&optional parse-dtd parse-ns) "Parse xml-like fragments." (let ((xml-sub-parser t) + ;; Prevent entity definitions from changing the defaults + (xml-entity-alist xml-entity-alist) + (xml-parameter-entity-alist xml-parameter-entity-alist) children) (while (not (eobp)) (let ((bit (xml-parse-tag @@ -413,7 +422,7 @@ (buffer-substring-no-properties pos (match-beginning 0)) (xml-parse-string)))) ;; DTD for the document - ((looking-at " (char-after)) - (forward-char) - (if (not (eq (char-after) ?\[)) - (error "XML: Bad DTD") - (forward-char) - ;; Parse the rest of the DTD - ;; Fixme: Deal with NOTATION, PIs. - (while (not (looking-at "\\s-*\\]")) - (skip-syntax-forward " ") - (cond - - ;; Translation of rule [45] of XML specifications - ((looking-at - "]+\\)>") - - (setq element (match-string-no-properties 1) - type (match-string-no-properties 2)) - (setq end-pos (match-end 0)) - - ;; Translation of rule [46] of XML specifications + + (if (eq (char-after) ?>) + + ;; No internal subset + (forward-char) + + ;; Internal subset (XML [28b]) + (unless (eq (char-after) ?\[) + (error "XML: Bad DTD")) + (forward-char) + + ;; Parse the rest of the DTD + ;; Fixme: Deal with NOTATION, PIs. + (while (not (looking-at "\\s-*\\]")) + (skip-syntax-forward " ") + (cond + ;; Element declaration [45]: + ((looking-at "]+\\)>") + (let ((element (match-string-no-properties 1)) + (type (match-string-no-properties 2)) + (end-pos (match-end 0))) + ;; Translation of rule [46] of XML specifications (cond - ((string-match "^EMPTY[ \t\n\r]*$" type) ;; empty declaration + ((string-match "^EMPTY[ \t\n\r]*$" type) ; empty declaration (setq type 'empty)) - ((string-match "^ANY[ \t\n\r]*$" type) ;; any type of contents + ((string-match "^ANY[ \t\n\r]*$" type) ; any type of contents (setq type 'any)) - ((string-match "^(\\(.*\\))[ \t\n\r]*$" type) ;; children ([47]) + ((string-match "^(\\(.*\\))[ \t\n\r]*$" type) ; children ([47]) (setq type (xml-parse-elem-type (match-string-no-properties 1 type)))) - ((string-match "^%[^;]+;[ \t\n\r]*$" type) ;; substitution + ((string-match "^%[^;]+;[ \t\n\r]*$" type) ; substitution nil) - (t - (if xml-validating-parser - (error "XML: (Validity) Invalid element type in the DTD")))) + (xml-validating-parser + (error "XML: (Validity) Invalid element type in the DTD"))) - ;; rule [45]: the element declaration must be unique - (if (and (assoc element dtd) - xml-validating-parser) - (error "XML: (Validity) Element declarations must be unique in a DTD (<%s>)" - element)) + ;; rule [45]: the element declaration must be unique + (and (assoc element dtd) + xml-validating-parser + (error "XML: (Validity) DTD element declarations must be unique (<%s>)" + element)) ;; Store the element in the DTD (push (list element type) dtd) - (goto-char end-pos)) - - ;; Translation of rule [52] of XML specifications - ((looking-at (concat "")) - - ;; We don't do anything with ATTLIST currently - (goto-char (match-end 0))) - - ((looking-at "")) - ((looking-at (concat "")) - (let ((name (match-string-no-properties 1)) - (value (substring (match-string-no-properties 2) 1 - (- (length (match-string-no-properties 2)) 1)))) - (goto-char (match-end 0)) - (setq xml-entity-alist - (append xml-entity-alist - (list (cons name - (with-temp-buffer - (insert value) - (goto-char (point-min)) - (xml-parse-fragment - xml-validating-parser - parse-ns)))))))) - ((or (looking-at (concat "")) - (looking-at (concat ""))) - (let ((name (match-string-no-properties 1)) - (file (substring (match-string-no-properties 2) 1 - (- (length (match-string-no-properties 2)) 1)))) - (goto-char (match-end 0)) - (setq xml-entity-alist - (append xml-entity-alist - (list (cons name (with-temp-buffer - (insert-file-contents file) - (goto-char (point-min)) - (xml-parse-fragment - xml-validating-parser - parse-ns)))))))) - ;; skip parameter entity declarations - ((or (looking-at (concat "")) - (looking-at (concat ""))) - (goto-char (match-end 0))) - ;; skip parameter entities - ((looking-at (concat "%" xml-name-re ";")) - (goto-char (match-end 0))) - (t - (when xml-validating-parser - (error "XML: (Validity) Invalid DTD item")))))) + (goto-char end-pos))) + + ;; Attribute-list declaration [52] (currently unsupported): + ((looking-at (concat "")) + (goto-char (match-end 0))) + + ;; Comments (skip to end): + ((looking-at "")) + + ;; Internal entity declarations: + ((looking-at (concat "")) + (let* ((name (prog1 (match-string-no-properties 2) + (goto-char (match-end 0)))) + (alist (if (match-string 1) + 'xml-parameter-entity-alist + 'xml-entity-alist)) + ;; Retrieve the deplacement text: + (value (xml--entity-replacement-text + ;; Entity value, sans quotation marks: + (substring (match-string-no-properties 3) 1 -1)))) + ;; If the same entity is declared more than once, the + ;; first declaration is binding. + (unless (assoc name (symbol-value alist)) + (set alist (cons (cons name value) (symbol-value alist)))))) + + ;; External entity declarations (currently unsupported): + ((or (looking-at (concat "")) + (looking-at (concat ""))) + (goto-char (match-end 0))) + + ;; Parameter entity: + ((looking-at (concat "%\\(" xml-name-re "\\);")) + (goto-char (match-end 0)) + (let* ((entity (match-string 1)) + (end (point-marker)) + (elt (assoc entity xml-parameter-entity-alist))) + (when elt + (replace-match (cdr elt) t t) + (goto-char end)))) + + ;; Anything else: + (xml-validating-parser + (error "XML: (Validity) Invalid DTD item")))) + (if (looking-at "\\s-*]>") (goto-char (match-end 0)))) (nreverse dtd))) +(defun xml--entity-replacement-text (string) + "Return the replacement text for the entity value STRING. +The replacement text is obtained by replacing character +references and parameter-entity references." + (let ((ref-re (eval-when-compile + (concat "\\(?:&#\\([0-9]+\\)\\|&#x\\([0-9a-fA-F]+\\)\\|%\\(" + xml-name-re "\\)\\);"))) + children) + (while (string-match ref-re string) + (push (substring string 0 (match-beginning 0)) children) + (let ((remainder (substring string (match-end 0))) + ref val) + (cond ((setq ref (match-string 1 string)) + ;; Decimal character reference + (setq val (decode-char 'ucs (string-to-number ref))) + (if val (push (string val) children))) + ;; Hexadecimal character reference + ((setq ref (match-string 2 string)) + (setq val (decode-char 'ucs (string-to-number ref 16))) + (if val (push (string val) children))) + ;; Parameter entity reference + ((setq ref (match-string 3 string)) + (setq val (assoc ref xml-parameter-entity-alist)) + (if val + (push (cdr val) children) + (push (concat "%" ref ";") children)))) + (setq string remainder))) + (mapconcat 'identity (nreverse (cons string children)) ""))) + (defun xml-parse-elem-type (string) "Convert element type STRING into a Lisp structure." @@ -864,15 +891,12 @@ (defalias 'xml-print 'xml-debug-print) (defun xml-escape-string (string) - "Return the string with entity substitutions made from -xml-entity-alist." + "Return STRING with entity substitutions made from `xml-entity-alist'." (mapconcat (lambda (byte) (let ((char (char-to-string byte))) (if (rassoc char xml-entity-alist) (concat "&" (car (rassoc char xml-entity-alist)) ";") char))) - ;; This differs from the non-unicode branch. Just - ;; grabbing the string works here. string "")) (defun xml-debug-print-internal (xml indent-string) ------------------------------------------------------------ revno: 108806 committer: Andreas Schwab branch nick: emacs timestamp: Sat 2012-06-30 11:13:54 +0200 message: * font.c (font_style_to_value, font_style_symbolic) (font_prop_validate_style): Add type checks for values in font_style_table. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-06-30 09:13:54 +0000 +++ src/ChangeLog 2012-06-30 09:13:54 +0000 @@ -1,5 +1,9 @@ 2012-06-30 Andreas Schwab + * font.c (font_style_to_value, font_style_symbolic) + (font_prop_validate_style): Add type checks for values in + font_style_table. + * lisp.h (CHECK_RANGED_INTEGER): Make value to check the first argument. * character.c, charset.c, menu.c, process.c, window.c: Adjust all === modified file 'src/font.c' --- src/font.c 2012-06-19 16:56:28 +0000 +++ src/font.c 2012-06-30 09:13:54 +0000 @@ -326,7 +326,10 @@ font_style_to_value (enum font_property_index prop, Lisp_Object val, int noerror) { Lisp_Object table = AREF (font_style_table, prop - FONT_WEIGHT_INDEX); - int len = ASIZE (table); + int len; + + CHECK_VECTOR (table); + len = ASIZE (table); if (SYMBOLP (val)) { @@ -336,10 +339,16 @@ /* At first try exact match. */ for (i = 0; i < len; i++) - for (j = 1; j < ASIZE (AREF (table, i)); j++) - if (EQ (val, AREF (AREF (table, i), j))) - return ((XINT (AREF (AREF (table, i), 0)) << 8) - | (i << 4) | (j - 1)); + { + CHECK_VECTOR (AREF (table, i)); + for (j = 1; j < ASIZE (AREF (table, i)); j++) + if (EQ (val, AREF (AREF (table, i), j))) + { + CHECK_NUMBER (AREF (AREF (table, i), 0)); + return ((XINT (AREF (AREF (table, i), 0)) << 8) + | (i << 4) | (j - 1)); + } + } /* Try also with case-folding match. */ s = SSDATA (SYMBOL_NAME (val)); for (i = 0; i < len; i++) @@ -347,8 +356,11 @@ { elt = AREF (AREF (table, i), j); if (xstrcasecmp (s, SSDATA (SYMBOL_NAME (elt))) == 0) - return ((XINT (AREF (AREF (table, i), 0)) << 8) - | (i << 4) | (j - 1)); + { + CHECK_NUMBER (AREF (AREF (table, i), 0)); + return ((XINT (AREF (AREF (table, i), 0)) << 8) + | (i << 4) | (j - 1)); + } } if (! noerror) return -1; @@ -368,8 +380,11 @@ for (i = 0, last_n = -1; i < len; i++) { - int n = XINT (AREF (AREF (table, i), 0)); + int n; + CHECK_VECTOR (AREF (table, i)); + CHECK_NUMBER (AREF (AREF (table, i), 0)); + n = XINT (AREF (AREF (table, i), 0)); if (numeric == n) return (n << 8) | (i << 4); if (numeric < n) @@ -397,11 +412,15 @@ if (NILP (val)) return Qnil; table = AREF (font_style_table, prop - FONT_WEIGHT_INDEX); + CHECK_VECTOR (table); i = XINT (val) & 0xFF; font_assert (((i >> 4) & 0xF) < ASIZE (table)); elt = AREF (table, ((i >> 4) & 0xF)); + CHECK_VECTOR (elt); font_assert ((i & 0xF) + 1 < ASIZE (elt)); - return (for_face ? AREF (elt, 1) : AREF (elt, (i & 0xF) + 1)); + elt = (for_face ? AREF (elt, 1) : AREF (elt, (i & 0xF) + 1)); + CHECK_SYMBOL (elt); + return elt; } /* Return ENCODING or a cons of ENCODING and REPERTORY of the font @@ -519,6 +538,7 @@ if (INTEGERP (val)) { EMACS_INT n = XINT (val); + CHECK_VECTOR (AREF (font_style_table, prop - FONT_WEIGHT_INDEX)); if (((n >> 4) & 0xF) >= ASIZE (AREF (font_style_table, prop - FONT_WEIGHT_INDEX))) val = Qerror; @@ -526,10 +546,15 @@ { Lisp_Object elt = AREF (AREF (font_style_table, prop - FONT_WEIGHT_INDEX), (n >> 4) & 0xF); + CHECK_VECTOR (elt); if ((n & 0xF) + 1 >= ASIZE (elt)) val = Qerror; - else if (XINT (AREF (elt, 0)) != (n >> 8)) - val = Qerror; + else + { + CHECK_NUMBER (AREF (elt, 0)); + if (XINT (AREF (elt, 0)) != (n >> 8)) + val = Qerror; + } } } else if (SYMBOLP (val)) ------------------------------------------------------------ revno: 108805 committer: Andreas Schwab branch nick: emacs timestamp: Sat 2012-06-30 11:13:54 +0200 message: * lisp.h (CHECK_RANGED_INTEGER): Make value to check the first argument. * character.c, charset.c, menu.c, process.c, window.c: Adjust all uses. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-06-29 18:52:54 +0000 +++ src/ChangeLog 2012-06-30 09:13:54 +0000 @@ -1,3 +1,10 @@ +2012-06-30 Andreas Schwab + + * lisp.h (CHECK_RANGED_INTEGER): Make value to check the first + argument. + * character.c, charset.c, menu.c, process.c, window.c: Adjust all + uses. + 2012-06-29 Eli Zaretskii * xdisp.c (try_window_id): Undo last change. === modified file 'src/character.c' --- src/character.c 2012-06-26 02:33:51 +0000 +++ src/character.c 2012-06-30 09:13:54 +0000 @@ -927,7 +927,7 @@ for (i = 0; i < n; i++) { - CHECK_RANGED_INTEGER (0, args[i], 255); + CHECK_RANGED_INTEGER (args[i], 0, 255); *p++ = XINT (args[i]); } === modified file 'src/charset.c' --- src/charset.c 2012-06-29 06:28:37 +0000 +++ src/charset.c 2012-06-30 09:13:54 +0000 @@ -878,9 +878,9 @@ min_byte_obj = Faref (val, make_number (i * 2)); max_byte_obj = Faref (val, make_number (i * 2 + 1)); - CHECK_RANGED_INTEGER (0, min_byte_obj, 255); + CHECK_RANGED_INTEGER (min_byte_obj, 0, 255); min_byte = XINT (min_byte_obj); - CHECK_RANGED_INTEGER (min_byte, max_byte_obj, 255); + CHECK_RANGED_INTEGER (max_byte_obj, min_byte, 255); max_byte = XINT (max_byte_obj); charset.code_space[i * 4] = min_byte; charset.code_space[i * 4 + 1] = max_byte; @@ -898,7 +898,7 @@ charset.dimension = dimension; else { - CHECK_RANGED_INTEGER (1, val, 4); + CHECK_RANGED_INTEGER (val, 1, 4); charset.dimension = XINT (val); } @@ -991,7 +991,7 @@ charset.iso_revision = -1; else { - CHECK_RANGED_INTEGER (-1, val, 63); + CHECK_RANGED_INTEGER (val, -1, 63); charset.iso_revision = XINT (val); } === modified file 'src/lisp.h' --- src/lisp.h 2012-06-26 05:00:30 +0000 +++ src/lisp.h 2012-06-30 09:13:54 +0000 @@ -1716,7 +1716,7 @@ #define CHECK_NATNUM(x) \ CHECK_TYPE (NATNUMP (x), Qwholenump, x) -#define CHECK_RANGED_INTEGER(lo, x, hi) \ +#define CHECK_RANGED_INTEGER(x, lo, hi) \ do { \ CHECK_NUMBER (x); \ if (! ((lo) <= XINT (x) && XINT (x) <= (hi))) \ @@ -1730,9 +1730,9 @@ #define CHECK_TYPE_RANGED_INTEGER(type, x) \ do { \ if (TYPE_SIGNED (type)) \ - CHECK_RANGED_INTEGER (TYPE_MINIMUM (type), x, TYPE_MAXIMUM (type)); \ + CHECK_RANGED_INTEGER (x, TYPE_MINIMUM (type), TYPE_MAXIMUM (type)); \ else \ - CHECK_RANGED_INTEGER (0, x, TYPE_MAXIMUM (type)); \ + CHECK_RANGED_INTEGER (x, 0, TYPE_MAXIMUM (type)); \ } while (0) #define CHECK_MARKER(x) \ === modified file 'src/menu.c' --- src/menu.c 2012-06-28 07:50:27 +0000 +++ src/menu.c 2012-06-30 09:13:54 +0000 @@ -1198,14 +1198,16 @@ but I don't want to make one now. */ CHECK_WINDOW (window); - CHECK_RANGED_INTEGER ((xpos < INT_MIN - MOST_NEGATIVE_FIXNUM + CHECK_RANGED_INTEGER (x, + (xpos < INT_MIN - MOST_NEGATIVE_FIXNUM ? (EMACS_INT) INT_MIN - xpos : MOST_NEGATIVE_FIXNUM), - x, INT_MAX - xpos); - CHECK_RANGED_INTEGER ((ypos < INT_MIN - MOST_NEGATIVE_FIXNUM + INT_MAX - xpos); + CHECK_RANGED_INTEGER (y, + (ypos < INT_MIN - MOST_NEGATIVE_FIXNUM ? (EMACS_INT) INT_MIN - ypos : MOST_NEGATIVE_FIXNUM), - y, INT_MAX - ypos); + INT_MAX - ypos); xpos += XINT (x); ypos += XINT (y); === modified file 'src/process.c' --- src/process.c 2012-06-28 07:50:27 +0000 +++ src/process.c 2012-06-30 09:13:54 +0000 @@ -1028,8 +1028,8 @@ (register Lisp_Object process, Lisp_Object height, Lisp_Object width) { CHECK_PROCESS (process); - CHECK_RANGED_INTEGER (0, height, INT_MAX); - CHECK_RANGED_INTEGER (0, width, INT_MAX); + CHECK_RANGED_INTEGER (height, 0, INT_MAX); + CHECK_RANGED_INTEGER (width, 0, INT_MAX); if (XPROCESS (process)->infd < 0 || set_window_size (XPROCESS (process)->infd, === modified file 'src/window.c' --- src/window.c 2012-06-29 11:48:08 +0000 +++ src/window.c 2012-06-30 09:13:54 +0000 @@ -6163,7 +6163,7 @@ if (!NILP (width)) { - CHECK_RANGED_INTEGER (0, width, INT_MAX); + CHECK_RANGED_INTEGER (width, 0, INT_MAX); if (XINT (width) == 0) vertical_type = Qnil; ------------------------------------------------------------ revno: 108804 committer: Stefan Monnier branch nick: trunk timestamp: Fri 2012-06-29 22:00:08 -0400 message: * lisp/emacs-lisp/cl-lib.el (cl-pushnew): Use macroexp-let2. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-06-29 11:48:08 +0000 +++ lisp/ChangeLog 2012-06-30 02:00:08 +0000 @@ -1,3 +1,7 @@ +2012-06-30 Stefan Monnier + + * emacs-lisp/cl-lib.el (cl-pushnew): Use macroexp-let2. + 2012-06-29 Dmitry Antipov * fringe.el (fringe-mode): Doc fix. === modified file 'lisp/emacs-lisp/cl-lib.el' --- lisp/emacs-lisp/cl-lib.el 2012-06-28 23:04:27 +0000 +++ lisp/emacs-lisp/cl-lib.el 2012-06-30 02:00:08 +0000 @@ -151,16 +151,15 @@ [keywordp form]))) (if (symbolp place) (if (null keys) - (let ((var (make-symbol "--cl-x--"))) - `(let ((,var ,x)) - (if (memql ,var ,place) - ;; This symbol may later on expand to actual code which then - ;; trigger warnings like "value unused" since cl-pushnew's return - ;; value is rarely used. It should not matter that other - ;; warnings may be silenced, since `place' is used earlier and - ;; should have triggered them already. - (with-no-warnings ,place) - (setq ,place (cons ,var ,place))))) + (macroexp-let2 nil var x + `(if (memql ,var ,place) + ;; This symbol may later on expand to actual code which then + ;; trigger warnings like "value unused" since cl-pushnew's + ;; return value is rarely used. It should not matter that + ;; other warnings may be silenced, since `place' is used + ;; earlier and should have triggered them already. + (with-no-warnings ,place) + (setq ,place (cons ,var ,place)))) (list 'setq place (cl-list* 'cl-adjoin x place keys))) (cl-list* 'cl-callf2 'cl-adjoin x place keys))) ------------------------------------------------------------ Use --include-merges or -n0 to see merged revisions.