emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master ff2c764 1/5: Merge from origin/emacs-25


From: Paul Eggert
Subject: [Emacs-diffs] master ff2c764 1/5: Merge from origin/emacs-25
Date: Mon, 11 Apr 2016 16:10:15 +0000

branch: master
commit ff2c76476479c43607825df01c78d8f239caefb5
Merge: d6ea645 80128a7
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    Merge from origin/emacs-25
    
    80128a7 Fix stability confusion in sort-tests
    1e4aa42 Avoid describe-key error with lambdas
    a05fb21 * lisp/emacs-lisp/package.el (package-install-selected-packag...
    f501116 Sync with gnulib
    c4963f9 Fix doc for Universal Time
---
 doc/lispref/os.texi        |   14 +++-----
 doc/misc/texinfo.tex       |   78 +++++++++++++++++++++++++++++++++++++++++---
 etc/NEWS                   |    4 +-
 lib/stddef.in.h            |    6 ++-
 lisp/cedet/mode-local.el   |    4 +-
 lisp/emacs-lisp/package.el |   26 ++++++++------
 m4/stdint.m4               |   29 ++++++++++++++++-
 test/lisp/sort-tests.el    |    6 ++-
 8 files changed, 133 insertions(+), 34 deletions(-)

diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index 3428c29..03d04ba 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -1302,7 +1302,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
address@hidden is an integer giving the number of seconds ahead of UTC
address@hidden 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;
@@ -1320,7 +1320,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.
 
@@ -1344,8 +1344,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 address@hidden  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.
 
@@ -1387,7 +1387,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
 
@@ -1556,10 +1556,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 address@hidden, 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/doc/misc/texinfo.tex b/doc/misc/texinfo.tex
index 9437a4d..75017af 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/etc/NEWS b/etc/NEWS
index 6ec82f8..0152593 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -2119,8 +2119,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
diff --git a/lib/stddef.in.h b/lib/stddef.in.h
index c6d2317..f4c4a10 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 address@hidden@
+/* 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/lisp/cedet/mode-local.el b/lisp/cedet/mode-local.el
index c7e6615..4f42431 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))))
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 869c154..4da66d2 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -2027,17 +2027,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
diff --git a/m4/stdint.m4 b/m4/stdint.m4
index 0f40ce8..0b4b906 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 <stdint.h>
 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
 #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 <stdint.h>
 ]
 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 <stdint.h> 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 <stdint.h>
+]
+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 <stdint.h> predates C++11.])
+      AC_DEFINE([__STDC_LIMIT_MACROS], [1],
+                [Define to 1 if the system <stdint.h> predates C++11.])
+    fi
     STDINT_H=
   else
     dnl Check for <sys/inttypes.h>, and for
diff --git a/test/lisp/sort-tests.el b/test/lisp/sort-tests.el
index 5297329..f3a182c 100644
--- a/test/lisp/sort-tests.el
+++ b/test/lisp/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)))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]