1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-23 22:20:24 -08:00

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
This commit is contained in:
Paul Eggert 2016-04-11 09:07:15 -07:00
commit ff2c764764
8 changed files with 133 additions and 34 deletions

View file

@ -1302,7 +1302,7 @@ This function returns a list describing the time zone that the user is
in. in.
The value has the form @code{(@var{offset} @var{name})}. Here 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 (east of Greenwich). A negative value means west of Greenwich. The
second element, @var{name}, is a string giving the name of the time second element, @var{name}, is a string giving the name of the time
zone. Both elements change when daylight saving time begins or ends; 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 @vindex TZ, environment variable
The default time zone is determined by the @env{TZ} environment The default time zone is determined by the @env{TZ} environment
variable. @xref{System Environment}. For example, you can tell Emacs 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, @env{TZ} is not in the environment, Emacs uses system wall clock time,
which is a platform-dependent default time zone. 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 Many 32-bit operating systems are limited to system times containing
32 bits of information in their seconds component; these systems 32 bits of information in their seconds component; these systems
typically handle only the times from 1901-12-13 20:45:52 UTC through typically handle only the times from 1901-12-13 20:45:52 through
2038-01-19 03:14:07 UTC@. However, 64-bit and some 32-bit operating 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 systems have larger seconds components, and can represent times far in
the past or future. the past or future.
@ -1387,7 +1387,7 @@ Sunday.
@item dst @item dst
@code{t} if daylight saving time is effect, otherwise @code{nil}. @code{t} if daylight saving time is effect, otherwise @code{nil}.
@item utcoff @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. seconds east of Greenwich.
@end table @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 representation of numbers, instead of the ordinary decimal digits. This
is allowed with most letters, all the ones that output numbers. 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} This function uses the C library function @code{strftime}
(@pxref{Formatting Calendar Time,,, libc, The GNU C Library Reference (@pxref{Formatting Calendar Time,,, libc, The GNU C Library Reference
Manual}) to do most of the work. In order to communicate with that Manual}) to do most of the work. In order to communicate with that

View file

@ -3,7 +3,7 @@
% Load plain if necessary, i.e., if running under initex. % Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi \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, % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, % 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) >> >>}% /Subtype /Link /A << /S /URI /URI (#1) >> >>}%
\endgroup} \endgroup}
\def\endlink{\setcolor{\maincolor}\special{pdf:eann}} \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 % @image support
@ -2857,6 +2883,7 @@ end
\setbox0 = \hbox{\ignorespaces #2}% look for second arg \setbox0 = \hbox{\ignorespaces #2}% look for second arg
\ifdim\wd0 > 0pt \ifdim\wd0 > 0pt
\ifpdf \ifpdf
% For pdfTeX and LuaTeX
\ifurefurlonlylink \ifurefurlonlylink
% PDF plus option to not display url, show just arg % PDF plus option to not display url, show just arg
\unhbox0 \unhbox0
@ -2866,7 +2893,19 @@ end
\unhbox0\ (\urefcode{#1})% \unhbox0\ (\urefcode{#1})%
\fi \fi
\else \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 \fi
\else \else
\urefcode{#1}% only url given, so show it \urefcode{#1}% only url given, so show it
@ -2967,7 +3006,18 @@ end
\endlink \endlink
\endgroup} \endgroup}
\else \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 \fi
% @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always),
@ -5479,7 +5529,14 @@ end
% preserve coloured links across page boundaries. Otherwise the marks % preserve coloured links across page boundaries. Otherwise the marks
% would get in the way of \lastbox in \insertindexentrybox. % would get in the way of \lastbox in \insertindexentrybox.
\else \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
\fi \fi
\egroup % end \boxA \egroup % end \boxA
@ -5614,7 +5671,11 @@ end
\ifpdf \ifpdf
\pdfgettoks#2.\ \the\toksA % The page number ends the paragraph. \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph.
\else \else
#2 \ifx\XeTeXrevision\thisisundefined
#2
\else
\pdfgettoks#2.\ \the\toksA % The page number ends the paragraph.
\fi
\fi \fi
\par \par
}} }}
@ -11029,6 +11090,13 @@ directory should work if nowhere else does.}
% whatever layout pdftex was dumped with. % whatever layout pdftex was dumped with.
\pdfhorigin = 1 true in \pdfhorigin = 1 true in
\pdfvorigin = 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 \fi
% %
\setleading{\textleading} \setleading{\textleading}

View file

@ -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. argument, has been extended to accept all the new forms.
*** Incompatible change in the third argument of 'format-time-string'. *** Incompatible change in the third argument of 'format-time-string'.
Previously, any non-nil argument was interpreted as a UTC time zone. Previously, any non-nil argument was interpeted as specifying Universal Time.
This is no longer true; packages that want UTC time zone should pass t This is no longer true; packages that want Universal Time should pass t
as the third argument. as the third argument.
*** Time-related functions now consistently accept numbers *** Time-related functions now consistently accept numbers

View file

@ -81,8 +81,10 @@
# define wchar_t int # define wchar_t int
#endif #endif
/* Some platforms lack max_align_t. */ /* Some platforms lack max_align_t. The check for _GCC_MAX_ALIGN_T is
#if !@HAVE_MAX_ALIGN_T@ 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, /* 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, 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 and the C11 standard allows this. Work around this problem by

View file

@ -638,7 +638,7 @@ SYMBOL is a function that can be overridden."
(defun describe-mode-local-overload (symbol) (defun describe-mode-local-overload (symbol)
"For `help-fns-describe-function-functions'; add overloads for 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))) (let ((default (or (intern-soft (format "%s-default" (symbol-name symbol)))
symbol)) symbol))
(override (with-current-buffer describe-function-orig-buffer (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) (defun xref-mode-local-overload (symbol)
"For `elisp-xref-find-def-functions'; add overloads for SYMBOL." "For `elisp-xref-find-def-functions'; add overloads for SYMBOL."
;; Current buffer is the buffer where xref-find-definitions was invoked. ;; 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))) (let* ((symbol-file (find-lisp-object-file-name symbol (symbol-function symbol)))
(default (intern-soft (format "%s-default" (symbol-name symbol)))) (default (intern-soft (format "%s-default" (symbol-name symbol))))
(default-file (when default (find-lisp-object-file-name default (symbol-function default)))) (default-file (when default (find-lisp-object-file-name default (symbol-function default))))

View file

@ -2027,17 +2027,21 @@ If some packages are not installed propose to install them."
;; gets installed). ;; gets installed).
(if (not package-selected-packages) (if (not package-selected-packages)
(message "`package-selected-packages' is empty, nothing to install") (message "`package-selected-packages' is empty, nothing to install")
(cl-loop for p in package-selected-packages (let* ((not-installed (seq-remove #'package-installed-p package-selected-packages))
unless (package-installed-p p) (available (seq-filter (lambda (p) (assq p package-archive-contents)) not-installed))
collect p into lst (difference (- (length not-installed) (length available))))
finally (cond
(if lst (available
(when (y-or-n-p (when (y-or-n-p
(format "%s packages will be installed:\n%s, proceed?" (format "%s packages will be installed:\n%s, proceed?"
(length lst) (length available)
(mapconcat #'symbol-name lst ", "))) (mapconcat #'symbol-name available ", ")))
(mapc #'package-install lst)) (mapc (lambda (p) (package-install p 'dont-select)) available)))
(message "All your packages are already installed"))))) ((> 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 ;;; Package Deletion

View file

@ -1,4 +1,4 @@
# stdint.m4 serial 43 # stdint.m4 serial 44
dnl Copyright (C) 2001-2016 Free Software Foundation, Inc. dnl Copyright (C) 2001-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
@ -70,6 +70,8 @@ AC_DEFUN_ONCE([gl_STDINT_H],
AC_COMPILE_IFELSE([ AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[ AC_LANG_PROGRAM([[
#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ #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> #include <stdint.h>
/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */ /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
#if !(defined WCHAR_MIN && defined WCHAR_MAX) #if !(defined WCHAR_MIN && defined WCHAR_MAX)
@ -218,6 +220,8 @@ struct s {
AC_RUN_IFELSE([ AC_RUN_IFELSE([
AC_LANG_PROGRAM([[ AC_LANG_PROGRAM([[
#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ #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> #include <stdint.h>
] ]
gl_STDINT_INCLUDES gl_STDINT_INCLUDES
@ -279,6 +283,29 @@ static const char *macro_values[] =
]) ])
fi fi
if test "$gl_cv_header_working_stdint_h" = yes; then 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= STDINT_H=
else else
dnl Check for <sys/inttypes.h>, and for dnl Check for <sys/inttypes.h>, and for

View file

@ -40,8 +40,10 @@
(funcall function reverse (point-min) (point-max)) (funcall function reverse (point-min) (point-max))
(let ((sorted-words (let ((sorted-words
(mapconcat #'identity (mapconcat #'identity
(let ((x (sort (copy-sequence words) less-predicate))) (sort (copy-sequence words)
(if reverse (reverse x) x)) (if reverse
(lambda (a b) (funcall less-predicate b a))
less-predicate))
separator))) separator)))
(should (string= (substring (buffer-string) 0 -1) sorted-words))))) (should (string= (substring (buffer-string) 0 -1) sorted-words)))))