From c4963f9a905bf15740aa7e3ebf85af917f17be15 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 3 Apr 2016 15:27:21 -0700 Subject: Fix doc for Universal Time MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * doc/lispref/os.texi (Time of Day, Time Conversion): Be more careful about distinguishing UTC (which is not valid for pre-1961 time stamps) and UT (which is). (Time Parsing): Remove stray obsolete paragraph about a UNIVERSAL argument for ‘format-time-string’. --- doc/lispref/os.texi | 14 +++++--------- etc/NEWS | 4 ++-- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index c5e3672a35..8839745268 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi @@ -1305,7 +1305,7 @@ This function returns a list describing the time zone that the user is in. The value has the form @code{(@var{offset} @var{name})}. Here -@var{offset} is an integer giving the number of seconds ahead of UTC +@var{offset} is an integer giving the number of seconds ahead of Universal Time (east of Greenwich). A negative value means west of Greenwich. The second element, @var{name}, is a string giving the name of the time zone. Both elements change when daylight saving time begins or ends; @@ -1323,7 +1323,7 @@ defaults to the current time zone rule. @vindex TZ, environment variable The default time zone is determined by the @env{TZ} environment variable. @xref{System Environment}. For example, you can tell Emacs -to default to universal time with @code{(setenv "TZ" "UTC0")}. If +to default to Universal Time with @code{(setenv "TZ" "UTC0")}. If @env{TZ} is not in the environment, Emacs uses system wall clock time, which is a platform-dependent default time zone. @@ -1347,8 +1347,8 @@ calendrical information and vice versa. Many 32-bit operating systems are limited to system times containing 32 bits of information in their seconds component; these systems -typically handle only the times from 1901-12-13 20:45:52 UTC through -2038-01-19 03:14:07 UTC@. However, 64-bit and some 32-bit operating +typically handle only the times from 1901-12-13 20:45:52 through +2038-01-19 03:14:07 Universal Time. However, 64-bit and some 32-bit operating systems have larger seconds components, and can represent times far in the past or future. @@ -1390,7 +1390,7 @@ Sunday. @item dst @code{t} if daylight saving time is effect, otherwise @code{nil}. @item utcoff -An integer indicating the UTC offset in seconds, i.e., the number of +An integer indicating the Universal Time offset in seconds, i.e., the number of seconds east of Greenwich. @end table @@ -1559,10 +1559,6 @@ based on the Japanese Emperors' reigns. @samp{E} is allowed in representation of numbers, instead of the ordinary decimal digits. This is allowed with most letters, all the ones that output numbers. -If @var{universal} is non-@code{nil}, that means to describe the time as -Universal Time; @code{nil} means describe it using what Emacs believes -is the local time zone (see @code{current-time-zone}). - This function uses the C library function @code{strftime} (@pxref{Formatting Calendar Time,,, libc, The GNU C Library Reference Manual}) to do most of the work. In order to communicate with that diff --git a/etc/NEWS b/etc/NEWS index 7de746e755..95265882ec 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1772,8 +1772,8 @@ function 'encode-time', which already accepted a simple time zone rule argument, has been extended to accept all the new forms. *** Incompatible change in the third argument of 'format-time-string'. -Previously, any non-nil argument was interpreted as a UTC time zone. -This is no longer true; packages that want UTC time zone should pass t +Previously, any non-nil argument was interpeted as specifying Universal Time. +This is no longer true; packages that want Universal Time should pass t as the third argument. *** Time-related functions now consistently accept numbers -- cgit v1.2.3 From f501116ea896b20f195f5c841e8770d7fe0418b9 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 3 Apr 2016 23:12:04 -0700 Subject: Sync with gnulib This incorporates: 2016-04-03 stdint: detect good enough pre-C++11 stdint.h in C++ mode 2016-04-01 stddef: support configuring with g++ * doc/misc/texinfo.tex, lib/stddef.in.h, m4/stdint.m4: Copy from gnulib. --- doc/misc/texinfo.tex | 78 ++++++++++++++++++++++++++++++++++++++++++++++++---- lib/stddef.in.h | 6 ++-- m4/stdint.m4 | 29 ++++++++++++++++++- 3 files changed, 105 insertions(+), 8 deletions(-) diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex index 9437a4d3e3..75017af503 100644 --- a/doc/misc/texinfo.tex +++ b/doc/misc/texinfo.tex @@ -3,7 +3,7 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2016-03-22.15} +\def\texinfoversion{2016-03-25.17} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, @@ -1645,6 +1645,32 @@ output) for that.)} /Subtype /Link /A << /S /URI /URI (#1) >> >>}% \endgroup} \def\endlink{\setcolor{\maincolor}\special{pdf:eann}} + \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}} + \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} + \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks} + \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}} + \def\maketoks{% + \expandafter\poptoks\the\toksA|ENDTOKS|\relax + \ifx\first0\adn0 + \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3 + \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6 + \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9 + \else + \ifnum0=\countA\else\makelink\fi + \ifx\first.\let\next=\done\else + \let\next=\maketoks + \addtokens{\toksB}{\the\toksD} + \ifx\first,\addtokens{\toksB}{\space}\fi + \fi + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi + \next} + \def\makelink{\addtokens{\toksB}% + {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0} + \def\pdflink#1{% + \special{pdf:bann << /Border [0 0 0] + /Type /Annot /Subtype /Link /A << /S /GoTo /D (name#1) >> >>}% + \setcolor{\linkcolor}#1\endlink} + \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} % % % @image support @@ -2857,6 +2883,7 @@ end \setbox0 = \hbox{\ignorespaces #2}% look for second arg \ifdim\wd0 > 0pt \ifpdf + % For pdfTeX and LuaTeX \ifurefurlonlylink % PDF plus option to not display url, show just arg \unhbox0 @@ -2866,7 +2893,19 @@ end \unhbox0\ (\urefcode{#1})% \fi \else - \unhbox0\ (\urefcode{#1})% DVI, always show arg and url + \ifx\XeTeXrevision\thisisundefined + \unhbox0\ (\urefcode{#1})% DVI, always show arg and url + \else + % For XeTeX + \ifurefurlonlylink + % PDF plus option to not display url, show just arg + \unhbox0 + \else + % PDF, normally display both arg and url for consistency, + % visibility, if the pdf is eventually used to print, etc. + \unhbox0\ (\urefcode{#1})% + \fi + \fi \fi \else \urefcode{#1}% only url given, so show it @@ -2967,7 +3006,18 @@ end \endlink \endgroup} \else - \let\email=\uref + \ifx\XeTeXrevision\thisisundefined + \let\email=\uref + \else + \def\email#1{\doemail#1,,\finish} + \def\doemail#1,#2,#3\finish{\begingroup + \unsepspaces + \pdfurl{mailto:#1}% + \setbox0 = \hbox{\ignorespaces #2}% + \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi + \endlink + \endgroup} + \fi \fi % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), @@ -5479,7 +5529,14 @@ end % preserve coloured links across page boundaries. Otherwise the marks % would get in the way of \lastbox in \insertindexentrybox. \else - \hskip\skip\thinshrinkable #1% + \ifx\XeTeXrevision\thisisundefined + \hskip\skip\thinshrinkable #1% + \else + \pdfgettoks#1.% + \bgroup\let\domark\relax + \hskip\skip\thinshrinkable\the\toksA + \egroup + \fi \fi \fi \egroup % end \boxA @@ -5614,7 +5671,11 @@ end \ifpdf \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph. \else - #2 + \ifx\XeTeXrevision\thisisundefined + #2 + \else + \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph. + \fi \fi \par }} @@ -11029,6 +11090,13 @@ directory should work if nowhere else does.} % whatever layout pdftex was dumped with. \pdfhorigin = 1 true in \pdfvorigin = 1 true in + \else + \ifx\XeTeXrevision\thisisundefined + \else + \pdfpageheight #7\relax + \pdfpagewidth #8\relax + % XeTeX does not have \pdfhorigin and \pdfvorigin. + \fi \fi % \setleading{\textleading} diff --git a/lib/stddef.in.h b/lib/stddef.in.h index c6d2317ca2..f4c4a1070d 100644 --- a/lib/stddef.in.h +++ b/lib/stddef.in.h @@ -81,8 +81,10 @@ # define wchar_t int #endif -/* Some platforms lack max_align_t. */ -#if !@HAVE_MAX_ALIGN_T@ +/* Some platforms lack max_align_t. The check for _GCC_MAX_ALIGN_T is + a hack in case the configure-time test was done with g++ even though + we are currently compiling with gcc. */ +#if ! (@HAVE_MAX_ALIGN_T@ || defined _GCC_MAX_ALIGN_T) /* On the x86, the maximum storage alignment of double, long, etc. is 4, but GCC's C11 ABI for x86 says that max_align_t has an alignment of 8, and the C11 standard allows this. Work around this problem by diff --git a/m4/stdint.m4 b/m4/stdint.m4 index 0f40ce803b..0b4b9060db 100644 --- a/m4/stdint.m4 +++ b/m4/stdint.m4 @@ -1,4 +1,4 @@ -# stdint.m4 serial 43 +# stdint.m4 serial 44 dnl Copyright (C) 2001-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -70,6 +70,8 @@ AC_DEFUN_ONCE([gl_STDINT_H], AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ +#define __STDC_CONSTANT_MACROS 1 +#define __STDC_LIMIT_MACROS 1 #include /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in . */ #if !(defined WCHAR_MIN && defined WCHAR_MAX) @@ -218,6 +220,8 @@ struct s { AC_RUN_IFELSE([ AC_LANG_PROGRAM([[ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ +#define __STDC_CONSTANT_MACROS 1 +#define __STDC_LIMIT_MACROS 1 #include ] gl_STDINT_INCLUDES @@ -279,6 +283,29 @@ static const char *macro_values[] = ]) fi if test "$gl_cv_header_working_stdint_h" = yes; then + dnl Now see whether the system works without + dnl __STDC_CONSTANT_MACROS/__STDC_LIMIT_MACROS defined. + AC_CACHE_CHECK([whether stdint.h predates C++11], + [gl_cv_header_stdint_predates_cxx11_h], + [gl_cv_header_stdint_predates_cxx11_h=yes + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ +#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ +#include +] +gl_STDINT_INCLUDES +[ +intmax_t im = INTMAX_MAX; +int32_t i32 = INT32_C (0x7fffffff); + ]])], + [gl_cv_header_stdint_predates_cxx11_h=no])]) + + if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then + AC_DEFINE([__STDC_CONSTANT_MACROS], [1], + [Define to 1 if the system predates C++11.]) + AC_DEFINE([__STDC_LIMIT_MACROS], [1], + [Define to 1 if the system predates C++11.]) + fi STDINT_H= else dnl Check for , and for -- cgit v1.2.3 From a05fb21d73d2ca84dd7e5e7ee931931048ecddba Mon Sep 17 00:00:00 2001 From: Artur Malabarba Date: Mon, 4 Apr 2016 11:58:49 -0300 Subject: * lisp/emacs-lisp/package.el (package-install-selected-packages): Skip unavailable packages. --- lisp/emacs-lisp/package.el | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index b65e45b1bf..29de2c9b07 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -2023,17 +2023,21 @@ If some packages are not installed propose to install them." ;; gets installed). (if (not package-selected-packages) (message "`package-selected-packages' is empty, nothing to install") - (cl-loop for p in package-selected-packages - unless (package-installed-p p) - collect p into lst - finally - (if lst - (when (y-or-n-p - (format "%s packages will be installed:\n%s, proceed?" - (length lst) - (mapconcat #'symbol-name lst ", "))) - (mapc #'package-install lst)) - (message "All your packages are already installed"))))) + (let* ((not-installed (seq-remove #'package-installed-p package-selected-packages)) + (available (seq-filter (lambda (p) (assq p package-archive-contents)) not-installed)) + (difference (- (length not-installed) (length available)))) + (cond + (available + (when (y-or-n-p + (format "%s packages will be installed:\n%s, proceed?" + (length available) + (mapconcat #'symbol-name available ", "))) + (mapc (lambda (p) (package-install p 'dont-select)) available))) + ((> difference 0) + (message "%s packages are not available (the rest already installed), maybe you need to `M-x package-refresh-contents'" + difference)) + (t + (message "All your packages are already installed")))))) ;;; Package Deletion -- cgit v1.2.3 From 1e4aa42aa50fe4429f0a8d147af5254d5ec960a5 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 5 Apr 2016 13:58:57 -0700 Subject: Avoid describe-key error with lambdas Problem reported by Sho Takemori (Bug#22716). * lisp/cedet/mode-local.el (describe-mode-local-overload) (xref-mode-local-overload): Use function-overload-p instead of assuming the argument is a symbol. --- lisp/cedet/mode-local.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/cedet/mode-local.el b/lisp/cedet/mode-local.el index c7e6615e0d..4f424313ab 100644 --- a/lisp/cedet/mode-local.el +++ b/lisp/cedet/mode-local.el @@ -638,7 +638,7 @@ SYMBOL is a function that can be overridden." (defun describe-mode-local-overload (symbol) "For `help-fns-describe-function-functions'; add overloads for SYMBOL." - (when (get symbol 'mode-local-overload) + (when (function-overload-p symbol) (let ((default (or (intern-soft (format "%s-default" (symbol-name symbol))) symbol)) (override (with-current-buffer describe-function-orig-buffer @@ -684,7 +684,7 @@ SYMBOL is a function that can be overridden." (defun xref-mode-local-overload (symbol) "For `elisp-xref-find-def-functions'; add overloads for SYMBOL." ;; Current buffer is the buffer where xref-find-definitions was invoked. - (when (get symbol 'mode-local-overload) + (when (function-overload-p symbol) (let* ((symbol-file (find-lisp-object-file-name symbol (symbol-function symbol))) (default (intern-soft (format "%s-default" (symbol-name symbol)))) (default-file (when default (find-lisp-object-file-name default (symbol-function default)))) -- cgit v1.2.3 From 80128a784912096c6b0ee46b76b068e019cff057 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 6 Apr 2016 01:22:00 -0700 Subject: Fix stability confusion in sort-tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem reported by Philipp Stephani (Bug#23205). * test/automated/sort-tests.el: (sort-tests--insert-words-sort-and-compare): Don’t assume that reversing a sorted list is the same as sorting with the reverse predicate. This is not true for stable sorts when items compare equal. --- test/automated/sort-tests.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/automated/sort-tests.el b/test/automated/sort-tests.el index 5297329781..f3a182cdc1 100644 --- a/test/automated/sort-tests.el +++ b/test/automated/sort-tests.el @@ -40,8 +40,10 @@ (funcall function reverse (point-min) (point-max)) (let ((sorted-words (mapconcat #'identity - (let ((x (sort (copy-sequence words) less-predicate))) - (if reverse (reverse x) x)) + (sort (copy-sequence words) + (if reverse + (lambda (a b) (funcall less-predicate b a)) + less-predicate)) separator))) (should (string= (substring (buffer-string) 0 -1) sorted-words))))) -- cgit v1.2.3