Merge remote-tracking branch 'savannah/master' into HEAD

This commit is contained in:
Andrea Corallo 2020-08-02 17:36:29 +02:00
commit e5095f0fd3
103 changed files with 3669 additions and 2056 deletions

File diff suppressed because it is too large Load diff

View file

@ -212,6 +212,8 @@ files.")
("Carlos Pita" "memeplex")
("Vinicius Jose Latorre" "viniciusjl")
("Gaby Launay" "galaunay")
("Alex Gramiak" "alex")
("Dick R. Chiang" "dickmao")
)
"Alist of author aliases.
@ -473,6 +475,9 @@ Changes to files matching one of the regexps in this list are not listed.")
;; Replaced by lisp/thread.el
"lisp/emacs-lisp/thread-list.el"
"etc/images/slash.bmp"
"src/mini-gmp-emacs.c"
"lib/dosname.h"
"lib/putenv.c"
)
"List of files and directories to ignore.
Changes to files in this list are not listed.")
@ -877,7 +882,9 @@ Changes to files in this list are not listed.")
"library-of-babel.org"
"flymake-elisp.el"
"flymake-ui.el"
"pinentry.el")
"pinentry.el"
"ledit.el"
"lmenu.el")
"File names which are valid, but no longer exist (or cannot be found)
in the repository.")
@ -1119,6 +1126,8 @@ in the repository.")
("gnus-news.texi" . "doc/misc/gnus.texi")
("lisp/multifile.el". "lisp/fileloop.el")
("lisp/emacs-lisp/thread.el". "lisp/thread.el")
("src/mini-gmp.c" . "lib/mini-gmp.c")
("src/mini-gmp.h" . "lib/mini-gmp.h")
)
"Alist of files which have been renamed during their lifetime.
Elements are (OLDNAME . NEWNAME).")

View file

@ -4,6 +4,7 @@
## Copyright (C) 2018-2020 Free Software Foundation, Inc.
## Author: Glenn Morris <rgm@gnu.org>
## Maintainer: emacs-devel@gnu.org
## This file is part of GNU Emacs.

View file

@ -354,7 +354,7 @@ Returns non-nil if conflicts remain."
;; The conflict markers remain so we return non-nil.
(message "Failed to fix NEWS conflict"))))
;; Generated files.
((member file '("lisp/ldefs-boot.el"))
((member file '("lisp/ldefs-boot.el" "etc/AUTHORS"))
;; We are in the file's buffer, so names are relative.
(call-process "git" nil t nil "reset" "--"
(file-name-nondirectory file))

View file

@ -4,6 +4,7 @@
## Copyright 2018-2020 Free Software Foundation, Inc.
## Author: Glenn Morris <rgm@gnu.org>
## Maintainer: emacs-devel@gnu.org
## This file is part of GNU Emacs.

View file

@ -3,6 +3,7 @@
## Copyright (C) 2015-2020 Free Software Foundation, Inc.
## Author: Glenn Morris <rgm@gnu.org>
## Maintainer: emacs-devel@gnu.org
## This file is part of GNU Emacs.

View file

@ -4,6 +4,7 @@
## Copyright (C) 2011-2020 Free Software Foundation, Inc.
## Author: Glenn Morris <rgm@gnu.org>
## Maintainer: emacs-devel@gnu.org
## This file is part of GNU Emacs.

View file

@ -5,6 +5,7 @@
## Copyright 2018-2020 Free Software Foundation, Inc.
## Author: Glenn Morris <rgm@gnu.org>
## Maintainer: emacs-devel@gnu.org
## This file is part of GNU Emacs.

View file

@ -2,7 +2,7 @@
# Attempt to guess a canonical system name.
# Copyright 1992-2020 Free Software Foundation, Inc.
timestamp='2020-04-26'
timestamp='2020-07-12'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@ -1342,6 +1342,9 @@ EOF
*:Rhapsody:*:*)
echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
exit ;;
arm64:Darwin:*:*)
echo aarch64-apple-darwin"$UNAME_RELEASE"
exit ;;
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p`
case $UNAME_PROCESSOR in

View file

@ -2,7 +2,7 @@
# Configuration validation subroutine script.
# Copyright 1992-2020 Free Software Foundation, Inc.
timestamp='2020-06-28'
timestamp='2020-07-10'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@ -1104,6 +1104,9 @@ case $cpu-$vendor in
xscale-* | xscalee[bl]-*)
cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
;;
arm64-*)
cpu=aarch64
;;
# Recognize the canonical CPU Types that limit and/or modify the
# company names they are paired with.
@ -1163,7 +1166,7 @@ case $cpu-$vendor in
| am33_2.0 \
| amdgcn \
| arc | arceb \
| arm | arm[lb]e | arme[lb] | armv* \
| arm | arm[lb]e | arme[lb] | armv* \
| avr | avr32 \
| asmjs \
| ba \

View file

@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2018-03-11.20; # UTC
scriptversion=2020-07-26.22; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@ -69,6 +69,10 @@ posix_mkdir=
# Desired mode of installed file.
mode=0755
# Create dirs (including intermediate dirs) using mode 755.
# This is like GNU 'install' as of coreutils 8.32 (2020).
mkdir_umask=22
chgrpcmd=
chmodcmd=$chmodprog
chowncmd=
@ -301,22 +305,6 @@ do
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
# Create intermediate dirs using mode 755 as modified by the umask.
# This is like FreeBSD 'install' as of 1997-10-28.
umask=`umask`
case $stripcmd.$umask in
# Optimize common cases.
*[2367][2367]) mkdir_umask=$umask;;
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
*[0-7])
mkdir_umask=`expr $umask + 22 \
- $umask % 100 % 40 + $umask % 20 \
- $umask % 10 % 4 + $umask % 2
`;;
*) mkdir_umask=$umask,go-w;;
esac
# With -d, create the new directory with the user-specified mode.
# Otherwise, rely on $mkdir_umask.
if test -n "$dir_arg"; then
@ -326,52 +314,49 @@ do
fi
posix_mkdir=false
case $umask in
*[123567][0-7][0-7])
# POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
# Note that $RANDOM variable is not portable (e.g. dash); Use it
# here however when possible just to lower collision chance.
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
# The $RANDOM variable is not portable (e.g., dash). Use it
# here however when possible just to lower collision chance.
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
trap '
ret=$?
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
exit $ret
' 0
# Because "mkdir -p" follows existing symlinks and we likely work
# directly in world-writeable /tmp, make sure that the '$tmpdir'
# directory is successfully created first before we actually test
# 'mkdir -p' feature.
if (umask $mkdir_umask &&
$mkdirprog $mkdir_mode "$tmpdir" &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
test_tmpdir="$tmpdir/a"
ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
fi
trap '' 0;;
esac;;
# Because "mkdir -p" follows existing symlinks and we likely work
# directly in world-writeable /tmp, make sure that the '$tmpdir'
# directory is successfully created first before we actually test
# 'mkdir -p'.
if (umask $mkdir_umask &&
$mkdirprog $mkdir_mode "$tmpdir" &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
test_tmpdir="$tmpdir/a"
ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
fi
trap '' 0;;
esac
if
@ -382,7 +367,7 @@ do
then :
else
# The umask is ridiculous, or mkdir does not conform to POSIX,
# mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go.
@ -411,7 +396,7 @@ do
prefixes=
else
if $posix_mkdir; then
(umask=$mkdir_umask &&
(umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1

View file

@ -1741,7 +1741,8 @@ AC_CHECK_HEADERS_ONCE(
sys/sysinfo.h
coff.h pty.h
sys/resource.h
sys/utsname.h pwd.h utmp.h util.h)
sys/utsname.h pwd.h utmp.h util.h
sanitizer/lsan_interface.h)
AC_CACHE_CHECK([for ADDR_NO_RANDOMIZE],
[emacs_cv_personality_addr_no_randomize],
@ -4603,7 +4604,7 @@ AC_CHECK_FUNCS_ONCE([sbrk])
AC_FUNC_FORK
AC_CHECK_FUNCS(snprintf)
AC_CHECK_FUNCS(snprintf __lsan_ignore_object)
dnl Check for glib. This differs from other library checks in that
dnl Emacs need not link to glib unless some other library is already

View file

@ -49,23 +49,30 @@ intelligent or general. For such things, Lisp must be used.
@table @kbd
@item @key{F3}
@itemx C-x (
Start defining a keyboard macro
(@code{kmacro-start-macro-or-insert-counter}).
@item @key{F4}
@itemx C-x e
If a keyboard macro is being defined, end the definition; otherwise,
execute the most recent keyboard macro
(@code{kmacro-end-or-call-macro}).
@item C-u @key{F3}
@itemx C-u C-x (
Re-execute last keyboard macro, then append keys to its definition.
@item C-u C-u @key{F3}
@itemx C-u C-u C-x (
Append keys to the last keyboard macro without re-executing it.
@item C-x C-k r
Run the last keyboard macro on each line that begins in the region
(@code{apply-macro-to-region-lines}).
@item C-x (
Start defining a keyboard macro (old style)
(@code{kmacro-start-macro}); with a prefix argument, append keys to
the last macro.
@item C-x )
End a macro definition (old style) (@code{kmacro-end-macro}); prefix
argument serves as the repeat count for executing the macro.
@item C-x e
Execute the most recently defined keyboard macro
(@code{kmacro-end-and-call-macro}); prefix argument serves as repeat
count.
@end table
@kindex F3

View file

@ -132,7 +132,7 @@ variables. To define a customizable variable, use the
(@pxref{Customization}).
In principle, you can assign a variable value to any symbol with
@code{setq}, whether not it has first been defined as a variable.
@code{setq}, whether or not it has first been defined as a variable.
However, you ought to write a variable definition for each global
variable that you want to use; otherwise, your Lisp program may not
act correctly if it is evaluated with lexical scoping enabled

View file

@ -135,7 +135,9 @@ HTML-specified colors or not. This sets the @code{shr-use-colors} variable.
A URL can be downloaded with @kbd{d} (@code{eww-download}). This
will download the link under point if there is one, or else the URL of
the current page. The file will be written to the directory specified
in @code{eww-download-directory} (default: @file{~/Downloads/}).
by @code{eww-download-directory} (default: @file{~/Downloads/}, if it
exists; otherwise as specified by the @samp{DOWNLOAD} @acronym{XDG}
directory)).
@findex eww-back-url
@findex eww-forward-url

View file

@ -402,6 +402,7 @@ This manual corresponds to Gnus v5.13
@end iftex
@menu
* Don't Panic:: Your first 20 minutes with Gnus.
* Starting Up:: Finding news can be a pain.
* Group Buffer:: Selecting, subscribing and killing groups.
* Summary Buffer:: Reading, saving and posting articles.
@ -947,6 +948,140 @@ Emacs for Heathens
@end detailmenu
@end menu
@node Don't Panic
@chapter Don't Panic
@cindex don't panic
@cindex introduction to Gnus
Welcome, gentle user, to the Gnus newsreader and email client! Gnus
is unlike most clients, in part because of its endless
configurability, in part because of its historical origins. Gnus is
now a fully-featured email client, but it began life as a Usenet-style
newsreader, and its genes are still newsreader genes. Thus it behaves
a little differently than most mail clients.
The typical assumptions of a newsreader are:
@enumerate
@item
The server offers a potentially enormous number of newsgroups on a
variety of subjects. The user may only be interested in some of those
groups, and more interested in some than others.
@item
Many groups see a high volume of articles, and the user won't want to
read all of them. Mechanisms are needed for foregrounding interesting
articles, and backgrounding uninteresting articles.
@item
Once a group has been scanned and dealt with by the user, it's
unlikely to be of further interest until new articles come in.
@end enumerate
These assumptions lead to certain default Gnus behaviors:
@enumerate
@item
Not all interesting groups are equally interesting, thus groups have
varying degrees of ``subscribedness'', with different behavior
depending on ``how subscribed'' a group is.
@item
There are many commands and tools for scoring and sorting articles,
or otherwise sweeping them under the rug.
@item
Gnus will only show you groups with unread or ticked articles;
groups with no new articles are hidden.
@item
When entering a group, only unread or ticked articles are shown,
all other articles are hidden.
@end enumerate
If this seems draconian, think of it as Automatic Inbox Zero. This is
the way Gnus works by default. It is possible to make it work more
like an email client (always showing read groups and read articles),
but that takes some effort on the part of the user.
The brief introduction below should be enough to get you off the
ground.
@heading The Basics of Servers, Groups, and Articles
@cindex servers
@cindex groups
@cindex articles
The fundamental building blocks of Gnus are @dfn{servers},
@dfn{groups}, and @dfn{articles}. Servers can be local or remote.
Each server maintains a list of groups, and those groups contain
articles. Because Gnus presents a unified interface to a wide variety
of servers, the vocabulary doesn't always quite line up (see @ref{FAQ
- Glossary}, for a more complete glossary). Thus a local maildir is
referred to as a ``server'' (@pxref{Finding the News}) the same as a
Usenet or IMAP server is; ``groups'' (@pxref{Group Buffer}) might mean
an NNTP group, IMAP folder, or local mail directory; and an
``article'' (@pxref{Summary Buffer}) might elsewhere be known as a
message or an email. Gnus employs unified terms for all these things.
Servers fall into two general categories: ``news-like'', meaning that
the articles are part of a public archive and can't be manipulated by
the user; and ``mail-like'', meaning that the articles are owned by
the user, who can freely edit them, move them around, and delete
them.
For news-like servers, which typically offer hundreds or thousands of
groups, it's important to be able to subscribe to a subset of those
groups. For mail-like servers, the user is generally automatically
subscribed to all groups (though IMAP, for example, also allows
selective subscription). To change group subscription, enter the
Server buffer (with @kbd{^}) and press @kbd{@key{RET}} on the server
in question. From here, Gnus provides commands to change or toggle
your group subscriptions (@pxref{Browse Foreign Server}).
A Gnus installation is basically just a list of one or more servers,
plus the user's subscribed groups from those servers, plus articles in
those groups.
Servers can be added and configured in two places: in the user's
gnus.el startup file, using the @code{gnus-select-method} and
@code{gnus-secondary-select-methods} options, or within Gnus itself
using interactive commands in the Server buffer. @xref{Finding
the News}, for details.
@heading Fetching Mail
New mail has to come from somewhere. Some servers, such as NNTP or
IMAP, are themselves responsible for fetching newly-arrived articles.
Others, such as maildir or mbox servers, only store articles and don't
fetch them from anywhere.
In the latter case, Gnus provides for @code{mail sources}: places
where new mail is fetched from. A mail source might be a local spool,
or a remote POP server, or some other source of incoming articles.
Mail sources are usually configured globally, but can be specified
per-group (@pxref{Mail Sources} for more information).
@xref{Scanning New Messages}, for details on fetching new mail.
@heading Viewing Mail
By default, Gnus's Group buffer only displays groups with unread
articles. It is always possible to display all the groups temporarily
with @kbd{L}, and to configure Gnus to always display some groups
(@pxref{Listing Groups}).
@xref{Selecting a Group}, for how to enter a group, and @pxref{Summary
Buffer} for what to do once you're there.
@heading Sending Mail
New message composition can be initiated from the Group buffer
(@pxref{Misc Group Stuff}). If you're in a Summary buffer, you can
compose replies and forward emails in addition to starting new
messages, see @ref{Summary Mail Commands}, for details.
For information about what happens once you've started composing a
message, see @ref{Composing Messages}. For information on setting up
@acronym{SMTP} servers in particular, see @ref{Mail Variables, ,Mail
Variables,message,Message manual}.
@node Starting Up
@chapter Starting Gnus
@cindex starting up

View file

@ -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{2020-05-22.11}
\def\texinfoversion{2020-06-25.17}
%
% Copyright 1985, 1986, 1988, 1990-2020 Free Software Foundation, Inc.
%
@ -4922,7 +4922,7 @@
% like the previous two, but they put @code around the argument.
\def\docodeindex#1{\edef\indexname{#1}\parsearg\docodeindexxxx}
\def\docodeindexxxx #1{\doind{\indexname}{\code{#1}}}
\def\docodeindexxxx #1{\docind{\indexname}{#1}}
% Used for the aux, toc and index files to prevent expansion of Texinfo
@ -5294,6 +5294,20 @@
\fi
}
% Same as \doind, but for code indices
\def\docind#1#2{%
\iflinks
{%
%
\requireopenindexfile{#1}%
\edef\writeto{\csname#1indfile\endcsname}%
%
\def\indextext{#2}%
\safewhatsit\docindwrite
}%
\fi
}
% Check if an index file has been opened, and if not, open it.
\def\requireopenindexfile#1{%
\ifnum\csname #1indfile\endcsname=0
@ -5360,6 +5374,9 @@
% trim spaces.
\edef\trimmed{\segment}%
\edef\trimmed{\expandafter\eatspaces\expandafter{\trimmed}}%
\ifincodeindex
\edef\trimmed{\noexpand\code{\trimmed}}%
\fi
%
\xdef\bracedtext{\bracedtext{\trimmed}}%
%
@ -5425,7 +5442,12 @@
% Write the entry in \indextext to the index file.
%
\def\doindwrite{%
\newif\ifincodeindex
\def\doindwrite{\incodeindexfalse\doindwritex}
\def\docindwrite{\incodeindextrue\doindwritex}
\def\doindwritex{%
\maybemarginindex
%
\atdummies
@ -5645,7 +5667,11 @@
\else
\begindoublecolumns
\catcode`\\=0\relax
\catcode`\@=12\relax
%
% Make @ an escape character to give macros a chance to work. This
% should work because we (hopefully) don't otherwise use @ in index files.
%\catcode`\@=12\relax
\catcode`\@=0\relax
\input \jobname.\indexname s
\enddoublecolumns
\fi
@ -7562,7 +7588,7 @@
\let\nonarrowing = t%
\nonfillstart
\tt % easiest (and conventionally used) font for verbatim
\def\par{\egroup\box\verbbox\endgraf\starttabbox}%
\def\par{\egroup\leavevmode\box\verbbox\endgraf\starttabbox}%
\tabexpand
\setupmarkupstyle{verbatim}%
% Respect line breaks,

View file

@ -59,7 +59,7 @@ local and the remote host, whereas @value{tramp} uses a combination of
@command{ssh}/@command{scp}.
You can find the latest version of this document on the web at
@uref{https://www.gnu.org/software/tramp/}.
@uref{@value{trampurl}}.
@ifhtml
The latest release of @value{tramp} is available for

View file

@ -9,6 +9,7 @@
@c tramp.el, and the bug report address is auto-frobbed from
@c configure.ac.
@set trampver 2.5.0-pre
@set trampurl https://www.gnu.org/software/tramp/
@set tramp-bug-report-address tramp-devel@@gnu.org
@set emacsver 25.1

View file

@ -127,84 +127,18 @@ Albert L. Ting: changed gnus-group.el mail-hist.el
Aleksei Gusev: changed progmodes/compile.el
Alexander Becher: changed vc-annotate.el
Alexandru Harsanyi: changed soap-client.el soap-inspect.el emacs3.py
vc-hooks.el vc.el xml.el
Alexander Gramiak: changed w32term.c xterm.c nsterm.m dispextern.h
xdisp.c frame.c image.c nsgui.h w32gui.h xfns.c frame.el termhooks.h
w32fns.c w32term.h faces.el nsterm.h xfaces.c xterm.h frame.h xfont.c
configure.ac and 64 other files
Alexander Haeckel: changed getset.el
Alexander Klimov: changed files.el calc-graph.el files.texi man.el rx.el
sendmail.el
Alexander Kreuzer: changed nnrss.el
Alexander Kuleshov: changed dns-mode.el files.texi image-mode.el
keyboard.c ld-script.el xdisp.c
Alexander L. Belikoff: wrote erc.el
Alexander Pohoyda: co-wrote mail/rmailmm.el
and changed rmailsum.el man.el rmail.el sendmail.el
Alexander Shopov: changed code-pages.el
Alexander Vorobiev: changed org-compat.el
Alexander Zhuckov: changed ebrowse.c
Alexandre Garreau: changed message.el
Alexandre Julliard: wrote vc-git.el
and changed vc.el ewoc.el
Alexandre Oliva: wrote gnus-mlspl.el
and changed unexelf.c format.el iris4d.h iris5d.h regex.c unexsgi.c
Alexandre Veyrenc: changed fr-refcard.tex
Alexandru Harsanyi: wrote soap-client.el soap-inspect.el
and changed emacs3.py vc-hooks.el vc.el xml.el
Alex Branham: changed checkdoc.el bibtex.el em-rebind.el esh-util.el
indent.el js.el lpr.el message.el subr.el text.texi .dir-locals.el
auth-source-pass.el bug-reference.el comint.el conf-mode-tests.el
conf-mode.el dired-x.el dired.el ediff-diff.el ediff-help.el
ediff-hook.el and 41 other files
Alex Coventry: changed files.el
Alex Dunn: changed subr-tests.el subr.el
Alexei Khlebnikov: changed autorevert.el vc-git.el
Alex Gramiak: changed prolog.el terminal.c
Alex Kosorukoff: changed org-capture.el
Alex Murray: changed erc-desktop-notifications.el network-stream.el
Alex Ott: changed TUTORIAL.ru ede/files.el ru-refcard.tex base.el
cedet-files.el cpp-root.el ede.el ede/generic.el idle.el ispell.el
semantic/format.el
Alex Reed: changed verilog-mode.el
Alex Rezinsky: wrote which-func.el
Alex Schroeder: wrote ansi-color.el cus-theme.el erc-compat.el
erc-hecomplete.el erc-join.el erc-lang.el erc-ring.el master.el
spam-stat.el sql.el
Alex Gramiak: wrote ansi-color.el conf-mode-tests.el cus-theme.el
erc-compat.el erc-hecomplete.el erc-join.el erc-lang.el erc-ring.el
erc.el gnus-mlspl.el master.el soap-client.el soap-inspect.el
spam-stat.el sql.el vc-git.el which-func.el
and co-wrote longlines.el mail/rmailmm.el
and changed erc.el erc-track.el erc-button.el erc-stamp.el erc-match.el
erc-autoaway.el erc-nickserv.el rcirc.texi Makefile erc-autojoin.el
erc-fill.el erc-pcomplete.el erc-complete.el erc-ibuffer.el
erc-members.el rmail.el comint.el custom.el erc-bbdb.el erc-chess.el
erc-ezbounce.el and 35 other files
Alex Shinn: changed files.el
and changed erc-track.el erc-button.el w32term.c xterm.c erc-stamp.el
nsterm.m xdisp.c dispextern.h frame.c image.c nsgui.h w32gui.h xfns.c
erc-match.el frame.el termhooks.h w32fns.c Makefile TUTORIAL.ru
erc-autoaway.el erc-nickserv.el and 215 other files
Alfred Correira: changed generic-x.el
@ -1309,7 +1243,7 @@ Diane Murray: changed erc.el erc-backend.el erc-menu.el erc-button.el
erc-goodies.el erc-ibuffer.el erc-log.el erc-nicklist.el url-http.el
Makefile erc-dcc.el and 36 other files
Dick R. Chiang: changed checkdoc.el
Dick R. Chiang: changed checkdoc.el cl-macs-tests.el cl-macs.el
Didier Verna: wrote gnus-diary.el nndiary.el
and co-wrote nnml.el
@ -1445,7 +1379,7 @@ Eli Zaretskii: wrote [bidirectional display in xdisp.c]
and changed xdisp.c msdos.c w32.c display.texi w32fns.c simple.el
files.el fileio.c keyboard.c w32term.c w32proc.c emacs.c files.texi
text.texi dispnew.c frames.texi lisp.h dispextern.h window.c process.c
term.c and 1187 other files
term.c and 1188 other files
Emanuele Giaquinta: changed configure.ac rxvt.el charset.c etags.c
fontset.c frame.el gnus-faq.texi loadup.el lread.c sh-script.el
@ -1767,6 +1701,8 @@ Fujii Hironori: changed w32fns.c
Gábor Vida: changed gnus-demon.el auth-source.el ido.el
Gaby Launay: changed auth-source-pass.el
Gareth Jones: changed fns.c gnus-score.el
Gareth Rees: changed NEWS.24
@ -2145,8 +2081,6 @@ Jaesup Kwak: changed xwidget.c
Jaeyoun Chung: changed hangul3.el hanja3.el gnus-mule.el hangul.el
J. Alexander Branham: wrote conf-mode-tests.el
Jambunathan K: wrote ox-odt.el
and co-wrote ox-html.el
and changed org-lparse.el org.el org.texi ox.el icomplete.el
@ -3133,8 +3067,8 @@ Luca Capello: changed mm-encode.el
Lucas Werkmeister: changed emacs.c emacs.service
Lucid, Inc.: changed byte-opt.el byte-run.el bytecode.c bytecomp.el
delsel.el disass.el faces.el font-lock.el lmenu.el mailabbrev.el
select.el xfaces.c xselect.c
delsel.el disass.el faces.el font-lock.el mailabbrev.el select.el
xfaces.c xselect.c
Luc Teirlinck: wrote help-at-pt.el
and changed files.el autorevert.el cus-edit.el subr.el simple.el
@ -3485,7 +3419,7 @@ Micah Anderson: changed spook.lines
Michael Albinus: wrote autorevert-tests.el dbus-tests.el dbus.el
filenotify-tests.el filenotify.el files-x-tests.el secrets-tests.el
secrets.el shadowfile-tests.el tramp-archive-tests.el tramp-archive.el
tramp-cmds.el tramp-compat.el tramp-ftp.el tramp-gvfs.el
tramp-cmds.el tramp-compat.el tramp-crypt.el tramp-ftp.el tramp-gvfs.el
tramp-integration.el tramp-rclone.el tramp-smb.el tramp-sudoedit.el
tramp-tests.el url-tramp-tests.el url-tramp.el vc-tests.el zeroconf.el
and co-wrote tramp-cache.el tramp-sh.el tramp.el
@ -3984,7 +3918,7 @@ and co-wrote cal-dst.el
and changed lisp.h configure.ac alloc.c process.c fileio.c editfns.c
xdisp.c sysdep.c image.c keyboard.c data.c emacs.c fns.c lread.c
xterm.c eval.c callproc.c Makefile.in frame.c buffer.c gnulib-comp.m4
and 1821 other files
and 1813 other files
Paul Fisher: changed fns.c
@ -4166,7 +4100,7 @@ Philipp Rumpf: changed electric.el
Philipp Stephani: wrote callint-tests.el checkdoc-tests.el
cl-preloaded-tests.el ediff-diff-tests.el eval-tests.el ido-tests.el
lread-tests.el mouse-tests.el xt-mouse-tests.el
lread-tests.el mouse-tests.el startup-tests.el xt-mouse-tests.el
and changed emacs-module.c emacs-module-tests.el json.c json-tests.el
eval.c mod-test.c lisp.h lread.c nsterm.m configure.ac bytecomp.el
internals.texi gtkutil.c emacs-module.h.in files.el alloc.c
@ -4255,8 +4189,7 @@ Rajappa Iyer: changed gnus-salt.el
Raja R. Harinath: changed gnus-salt.el nnml.el
Rajesh Vaidheeswarran: wrote old-whitespace.el
and changed whitespace.el ffap.el
Rajesh Vaidheeswarran: changed whitespace.el ffap.el
Ralf Angeli: wrote scroll-lock.el
and changed w32fns.c reftex-cite.el gnus-art.el reftex-toc.el reftex.el
@ -4708,9 +4641,12 @@ Sidney Markowitz: changed doctor.el nsmenu.m
Sigbjorn Finne: changed gnus-srvr.el
Simen Heggestøyl: wrote asm-mode-tests.el autoinsert-tests.el
color-tests.el css-mode-tests.el dom-tests.el makesum-tests.el
page-tests.el paren-tests.el ring-tests.el rot13-tests.el sql-tests.el
Simen Heggestøyl: wrote apropos-tests.el asm-mode-tests.el
autoconf-tests.el autoinsert-tests.el check-declare-tests.el
color-tests.el css-mode-tests.el dom-tests.el elide-head-tests.el
glasses-tests.el help-mode-tests.el makesum-tests.el page-tests.el
paren-tests.el po-tests.el ring-tests.el rot13-tests.el sql-tests.el
webjump-tests.el
and changed css-mode.el css-mode.css json-tests.el json.el sgml-mode.el
scss-mode.scss page.el ring.el rot13.el scheme.el sql.el asm-mode.el
autoinsert.el color.el files.el js.el less-css-mode.el
@ -4720,8 +4656,9 @@ and changed css-mode.el css-mode.css json-tests.el json.el sgml-mode.el
Simona Arizanova: changed help.el
Simon Josefsson: wrote dig.el dns-mode.el flow-fill.el fringe.el imap.el
mml-sec.el mml-smime.el password-cache.el rfc2104.el sieve-mode.el
sieve.el smime.el starttls.el tls.el url-imap.el
mml-sec.el mml-smime.el password-cache.el rfc2104.el
sasl-scram-sha256.el sieve-mode.el sieve.el smime.el starttls.el tls.el
url-imap.el
and co-wrote gnus-sieve.el gssapi.el mml1991.el nnfolder.el nnimap.el
nnml.el sieve-manage.el
and changed message.el gnus-sum.el gnus-art.el smtpmail.el pgg-gpg.el
@ -4769,9 +4706,11 @@ Stefan Bruda: co-wrote prolog.el
Stefan Guath: changed find-dired.el
Stefan Kangas: wrote bookmark-tests.el delim-col-tests.el morse-tests.el
paragraphs-tests.el password-cache-tests.el studly-tests.el
tabify-tests.el timezone-tests.el underline-tests.el uudecode-tests.el
Stefan Kangas: wrote bookmark-tests.el cal-julian-tests.el
delim-col-tests.el lunar-tests.el misc-tests.el morse-tests.el
paragraphs-tests.el password-cache-tests.el qp-tests.el
rfc2045-tests.el studly-tests.el tabify-tests.el timezone-tests.el
underline-tests.el uudecode-tests.el
and changed bookmark.el package.el efaq.texi package.texi ibuffer.el
mwheel.el cperl-mode.el fns.c gud.el simple.el subr.el autoinsert.el
comint-tests.el cus-edit.el delim-col.el dired-aux.el dired-x.el
@ -5298,8 +5237,6 @@ Valentin Gatien-Baron: changed emacs-module.c
Valentin Wüstholz: changed org.el
Valery Alexeev: changed cyril-util.el cyrillic.el
Van L: changed subr.el
Vasilij Schneidermann: changed cus-start.el eww.el cc-mode.el
@ -5359,8 +5296,6 @@ and changed erc-backend.el erc.el erc-services.el hexl.el emacs.c
erc-button.el erc-capab.el erc-join.el htmlfontify.texi sh-script.el
xterm.c xterm.h
Vladimir Alexiev: changed arc-mode.el nnvirtual.el tmm.el
Vladimir Kazanov: changed java.srt
Vladimir Lomov: changed ox-html.el
@ -5535,6 +5470,8 @@ Yuan Fu: changed gdb-mi.el
Yuanle Song: changed rng-xsd.el
Yue Daian: wrote cl-font-lock.el
Yu-ji Hosokawa: changed README.W32
Yukihiro Matsumoto: co-wrote ruby-mode.el

View file

@ -220,6 +220,8 @@ GNU Emacs 26.2 (2019-04-12) emacs-26.2
GNU Emacs 26.3 (2019-08-28) emacs-26.3
GNU Emacs 27.1 (2020-08-06) emacs-27.1
----------------------------------------------------------------------
This file is part of GNU Emacs.

View file

@ -156,7 +156,7 @@ value of 'tab-bar-show'.
It is now defined as a generalized variable that can be used with
'setf' to modify the value stored in a given class slot.
** New minor mode 'cl-font-lock-built-in-mode' for `lisp-mode'.
** New minor mode 'cl-font-lock-built-in-mode' for 'lisp-mode'.
The mode provides refined highlighting of built-in functions, types,
and variables.
@ -207,6 +207,12 @@ Bookmark locations can refer to VC directory buffers.
** Gnus
---
*** The value of "all" in the 'large-newsgroup-initial' group parameter changes.
It was previously nil, which didn't work, because nil is
indistinguishable from not being present. The new value for "all" is
the symbol 'all'.
+++
*** The name of dependent Gnus sessions has changed from "slave" to "child".
The names of the commands 'gnus-slave', 'gnus-slave-no-server' and
@ -261,8 +267,8 @@ supplied error message.
This hook is intended to be used for registering doc string functions.
These functions don't need to produce the doc string right away, they
may arrange for it to be produced asynchronously. The results of all
doc string functions are accessible to the user through the existing
variable 'eldoc-documentation-strategy'.
doc string functions are accessible to the user through the user
option 'eldoc-documentation-strategy'.
*** New user option 'eldoc-documentation-strategy'.
The built-in choices available for this user option let users compose
@ -481,17 +487,31 @@ This is still the case by default, but if you customize
other function, it will now be called instead of the default.
+++
*** New variable 'shr-max-width'.
If this variable is non-nil, and 'shr-width' is nil, then SHR will use
the value of 'shr-max-width' to limit the width of the rendered HTML.
The default is 120 characters, so even if you have very wide frames,
HTML text will be rendered more narrowly, which usually leads to a
more readable text. Set this variable to nil to get the previous
behavior of rendering as wide as the window-width allows. If
'shr-width' is non-nil, it overrides this variable.
*** New user option 'shr-max-width'.
If this user option is non-nil, and 'shr-width' is nil, then SHR will
use the value of 'shr-max-width' to limit the width of the rendered
HTML. The default is 120 characters, so even if you have very wide
frames, HTML text will be rendered more narrowly, which usually leads
to a more readable text. Set this user option to nil to get the
previous behavior of rendering as wide as the 'window-width' allows.
If 'shr-width' is non-nil, it overrides this variable.
** Images
---
*** Animated images stop automatically under high CPU pressure sooner.
Previously, an animated image would stop animating if any single image
took more than two seconds to display. The new algorithm maintains a
decaying average of delays, and if this number gets too high, the
animation is stopped.
** EWW
+++
*** 'eww-download-directory' will now use the XDG location, if defined.
However, if "~/Downloads/" already exists, that will continue to be
used.
---
*** The command 'eww-follow-link' now supports custom mailto handlers.
The function that is invoked when clicking on or otherwise following a
@ -623,6 +643,11 @@ Formerly it made an exception for integer components of SOA records,
because SOA serial numbers can exceed fixnum ranges on 32-bit platforms.
Emacs now supports bignums so this old glitch is no longer needed.
---
** The new function 'dns-query-asynchronous' has been added.
It takes the same parameters as 'dns-query', but adds a callback
parameter.
** The Lisp variables 'previous-system-messages-locale' and
'previous-system-time-locale' have been removed, as they were created
by mistake and were not useful to Lisp code.
@ -701,7 +726,7 @@ for encoding and decoding without having to bind
'coding-system-for-{read,write}' or call 'set-process-coding-system'.
+++
** 'open-network-stream' can now take a :capability-command that's a function.
** 'open-network-stream' can now take a ':capability-command' that's a function.
The function is called with the greeting from the server as its only
parameter, and allows sending different TLS capability commands to the
server based on that greeting.
@ -719,7 +744,7 @@ process is interrupted by a signal.
In order for the two functions to behave more consistently,
'format-spec' now pads and truncates based on string width rather than
length, and also supports format specifications that include a
truncating precision field, such as '%.2a'.
truncating precision field, such as "%.2a".
---
** New function 'color-values-from-color-spec'.

File diff suppressed because it is too large Load diff

View file

@ -52,5 +52,5 @@ c_strcasecmp (const char *s1, const char *s2)
/* On machines where 'char' and 'int' are types of the same size, the
difference of two 'unsigned char' values - including the sign bit -
doesn't fit in an 'int'. */
return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0);
return _GL_CMP (c1, c2);
}

View file

@ -52,5 +52,5 @@ c_strncasecmp (const char *s1, const char *s2, size_t n)
/* On machines where 'char' and 'int' are types of the same size, the
difference of two 'unsigned char' values - including the sign bit -
doesn't fit in an 'int'. */
return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0);
return _GL_CMP (c1, c2);
}

View file

@ -98,7 +98,7 @@ fchmodat (int dir, char const *file, mode_t mode, int flags)
return -1;
}
# if defined __linux__ || defined __ANDROID__
# if defined __linux__ || defined __ANDROID__ || defined __CYGWIN__
static char const fmt[] = "/proc/self/fd/%d";
char buf[sizeof fmt - sizeof "%d" + INT_BUFSIZE_BOUND (int)];
sprintf (buf, fmt, fd);

View file

@ -211,11 +211,7 @@ get_fs_usage (char const *file, char const *disk, struct fs_usage *fsp)
/* Empirically, the block counts on most SVR3 and SVR3-derived
systems seem to always be in terms of 512-byte blocks,
no matter what value f_bsize has. */
# if defined _CRAY
fsp->fsu_blocksize = PROPAGATE_ALL_ONES (fsd.f_bsize);
# else
fsp->fsu_blocksize = 512;
# endif
#endif

View file

@ -29,8 +29,6 @@
# include <windows.h>
#endif
#include "localtime-buffer.h"
#ifdef WINDOWS_NATIVE
/* Don't assume that UNICODE is not defined. */
@ -123,11 +121,6 @@ gettimeofday (struct timeval *restrict tv, void *restrict tz)
#else
# if HAVE_GETTIMEOFDAY
# if GETTIMEOFDAY_CLOBBERS_LOCALTIME
/* Save and restore the contents of the buffer used for localtime's
result around the call to gettimeofday. */
struct tm save = *localtime_buffer_addr;
# endif
# if defined timeval /* 'struct timeval' overridden by gnulib? */
# undef timeval
@ -142,10 +135,6 @@ gettimeofday (struct timeval *restrict tv, void *restrict tz)
int result = gettimeofday (tv, (struct timezone *) tz);
# endif
# if GETTIMEOFDAY_CLOBBERS_LOCALTIME
*localtime_buffer_addr = save;
# endif
return result;
# else

View file

@ -587,6 +587,7 @@ HAVE_INITSTATE = @HAVE_INITSTATE@
HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
HAVE_LCHMOD = @HAVE_LCHMOD@
HAVE_LCHOWN = @HAVE_LCHOWN@
HAVE_LIBGMP = @HAVE_LIBGMP@
HAVE_LINK = @HAVE_LINK@
HAVE_LINKAT = @HAVE_LINKAT@
HAVE_LSTAT = @HAVE_LSTAT@
@ -721,6 +722,7 @@ LD_SWITCH_SYSTEM_TEMACS = @LD_SWITCH_SYSTEM_TEMACS@
LD_SWITCH_X_SITE = @LD_SWITCH_X_SITE@
LD_SWITCH_X_SITE_RPATH = @LD_SWITCH_X_SITE_RPATH@
LIBGIF = @LIBGIF@
LIBGMP = @LIBGMP@
LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@
LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@
LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@
@ -761,7 +763,6 @@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
LIB_EACCESS = @LIB_EACCESS@
LIB_EXECINFO = @LIB_EXECINFO@
LIB_GETRANDOM = @LIB_GETRANDOM@
LIB_GMP = @LIB_GMP@
LIB_MATH = @LIB_MATH@
LIB_PTHREAD = @LIB_PTHREAD@
LIB_PTHREAD_SIGMASK = @LIB_PTHREAD_SIGMASK@
@ -769,6 +770,7 @@ LIB_TIMER_TIME = @LIB_TIMER_TIME@
LIB_WSOCK32 = @LIB_WSOCK32@
LIMITS_H = @LIMITS_H@
LN_S_FILEONLY = @LN_S_FILEONLY@
LTLIBGMP = @LTLIBGMP@
LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@
M17N_FLT_CFLAGS = @M17N_FLT_CFLAGS@
@ -848,7 +850,6 @@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
PRE_ALLOC_OBJ = @PRE_ALLOC_OBJ@
PRIPTR_PREFIX = @PRIPTR_PREFIX@
PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
PROFILING_CFLAGS = @PROFILING_CFLAGS@
PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
@ -1963,7 +1964,6 @@ inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_U
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_INTTYPES_H''@|$(NEXT_INTTYPES_H)|g' \
-e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/g' \
-e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \
-e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \
-e 's/@''GNULIB_IMAXABS''@/$(GNULIB_IMAXABS)/g' \
@ -2069,19 +2069,6 @@ EXTRA_DIST += limits.in.h
endif
## end gnulib module limits-h
## begin gnulib module localtime-buffer
ifeq (,$(OMIT_GNULIB_MODULE_localtime-buffer))
ifneq (,$(gl_GNULIB_ENABLED_2049e887c7e5308faad27b3f894bb8c9))
endif
EXTRA_DIST += localtime-buffer.c localtime-buffer.h
EXTRA_libgnu_a_SOURCES += localtime-buffer.c
endif
## end gnulib module localtime-buffer
## begin gnulib module lstat
ifeq (,$(OMIT_GNULIB_MODULE_lstat))

File diff suppressed because it is too large Load diff

View file

@ -76,7 +76,7 @@ lchmod (char const *file, mode_t mode)
return -1;
}
# if defined __linux__ || defined __ANDROID__
# if defined __linux__ || defined __ANDROID__ || defined __CYGWIN__
static char const fmt[] = "/proc/self/fd/%d";
char buf[sizeof fmt - sizeof "%d" + INT_BUFSIZE_BOUND (int)];
sprintf (buf, fmt, fd);

View file

@ -1,60 +0,0 @@
/* Provide access to the last buffer returned by localtime() or gmtime().
Copyright (C) 2001-2003, 2005-2007, 2009-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, see <https://www.gnu.org/licenses/>. */
/* written by Jim Meyering */
#include <config.h>
/* Specification. */
#include "localtime-buffer.h"
#if GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME
static struct tm tm_zero_buffer;
struct tm *localtime_buffer_addr = &tm_zero_buffer;
/* This is a wrapper for localtime.
On the first call, record the address of the static buffer that
localtime uses for its result. */
struct tm *
rpl_localtime (time_t const *timep)
#undef localtime
{
struct tm *tm = localtime (timep);
if (localtime_buffer_addr == &tm_zero_buffer)
localtime_buffer_addr = tm;
return tm;
}
/* Same as above, since gmtime and localtime use the same buffer. */
struct tm *
rpl_gmtime (time_t const *timep)
#undef gmtime
{
struct tm *tm = gmtime (timep);
if (localtime_buffer_addr == &tm_zero_buffer)
localtime_buffer_addr = tm;
return tm;
}
#endif

View file

@ -1,27 +0,0 @@
/* Provide access to the last buffer returned by localtime() or gmtime().
Copyright (C) 2001-2003, 2005-2007, 2009-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, see <https://www.gnu.org/licenses/>. */
/* written by Jim Meyering */
#include <time.h>
#if GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME
/* The address of the last buffer returned by localtime() or gmtime(). */
extern struct tm *localtime_buffer_addr;
#endif

View file

@ -22,12 +22,14 @@
#include "mini-gmp.h"
/* Pacify GCC -Wsuggest-attribute=const, malloc, pure. */
/* Pacify GCC -Wsuggest-attribute=const, pure, malloc. */
#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
# pragma GCC diagnostic ignored "-Wsuggest-attribute=const"
# pragma GCC diagnostic ignored "-Wsuggest-attribute=malloc"
# pragma GCC diagnostic ignored "-Wsuggest-attribute=pure"
#endif
#if 8 <= __GNUC__
# pragma GCC diagnostic ignored "-Wsuggest-attribute=malloc"
#endif
/* Pacify GCC -Wunused-variable for variables used only in 'assert' calls. */
#if defined NDEBUG && 4 < __GNUC__ + (6 <= __GNUC_MINOR__)

View file

@ -495,15 +495,6 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize)
const char *format_end = NULL;
#endif
#if ! defined _LIBC && ! HAVE_RUN_TZSET_TEST
/* Solaris 2.5.x and 2.6 tzset sometimes modify the storage returned
by localtime. On such systems, we must either use the tzset and
localtime wrappers to work around the bug (which sets
HAVE_RUN_TZSET_TEST) or make a copy of the structure. */
struct tm copy = *tp;
tp = &copy;
#endif
zone = NULL;
#if HAVE_TM_ZONE
/* The POSIX test suite assumes that setting

View file

@ -600,11 +600,9 @@ extern void re_set_registers (struct re_pattern_buffer *__buffer,
#endif /* Use GNU */
#if defined _REGEX_RE_COMP || (defined _LIBC && defined __USE_MISC)
# ifndef _CRAY
/* 4.2 bsd compatibility. */
extern char *re_comp (const char *);
extern int re_exec (const char *);
# endif
#endif
/* For plain 'restrict', use glibc's __restrict if defined.

View file

@ -34,7 +34,6 @@ extern "C" {
#endif
#include "arg-nonnull.h"
#include "verify.h"
/* Inverse resolution of timespec timestamps (in units per second),
and log base 10 of the inverse resolution. */
@ -59,46 +58,12 @@ make_timespec (time_t s, long int ns)
return r;
}
/* Return negative, zero, positive if A < B, A == B, A > B, respectively.
For each timestamp T, this code assumes that either:
* T.tv_nsec is in the range 0..999999999; or
* T.tv_sec corresponds to a valid leap second on a host that supports
leap seconds, and T.tv_nsec is in the range 1000000000..1999999999; or
* T.tv_sec is the minimum time_t value and T.tv_nsec is -1; or
T.tv_sec is the maximum time_t value and T.tv_nsec is 2000000000.
This allows for special struct timespec values that are less or
greater than all possible valid timestamps.
In all these cases, it is safe to subtract two tv_nsec values and
convert the result to integer without worrying about overflow on
any platform of interest to the GNU project, since all such
platforms have 32-bit int or wider.
Replacing "a.tv_nsec - b.tv_nsec" with something like
"a.tv_nsec < b.tv_nsec ? -1 : a.tv_nsec > b.tv_nsec" would cause
this function to work in some cases where the above assumption is
violated, but not in all cases (e.g., a.tv_sec==1, a.tv_nsec==-2,
b.tv_sec==0, b.tv_nsec==999999999) and is arguably not worth the
extra instructions. Using a subtraction has the advantage of
detecting some invalid cases on platforms that detect integer
overflow. */
/* Return negative, zero, positive if A < B, A == B, A > B, respectively. */
_GL_TIMESPEC_INLINE int _GL_ATTRIBUTE_PURE
timespec_cmp (struct timespec a, struct timespec b)
{
if (a.tv_sec < b.tv_sec)
return -1;
if (a.tv_sec > b.tv_sec)
return 1;
/* Pacify gcc -Wstrict-overflow (bleeding-edge circa 2017-10-02). See:
https://lists.gnu.org/r/bug-gnulib/2017-10/msg00006.html */
assume (-1 <= a.tv_nsec && a.tv_nsec <= 2 * TIMESPEC_HZ);
assume (-1 <= b.tv_nsec && b.tv_nsec <= 2 * TIMESPEC_HZ);
return a.tv_nsec - b.tv_nsec;
return 2 * _GL_CMP (a.tv_sec, b.tv_sec) + _GL_CMP (a.tv_nsec, b.tv_nsec);
}
/* Return -1, 0, 1, depending on the sign of A. A.tv_nsec must be
@ -106,7 +71,7 @@ timespec_cmp (struct timespec a, struct timespec b)
_GL_TIMESPEC_INLINE int _GL_ATTRIBUTE_PURE
timespec_sign (struct timespec a)
{
return a.tv_sec < 0 ? -1 : a.tv_sec || a.tv_nsec;
return _GL_CMP (a.tv_sec, 0) + (!a.tv_sec & !!a.tv_nsec);
}
struct timespec timespec_add (struct timespec, struct timespec)

View file

@ -2350,6 +2350,7 @@ a buffer local variable."
;; For compatibility.
(defun comint-read-noecho (prompt &optional _ignore)
(declare (obsolete read-passwd "28.1"))
(read-passwd prompt))
;; These three functions are for entering text you don't want echoed or

View file

@ -227,7 +227,7 @@
;;; byte-compile optimizers to support inlining
(put 'inline 'byte-optimizer 'byte-optimize-inline-handler)
(put 'inline 'byte-optimizer #'byte-optimize-inline-handler)
(defun byte-optimize-inline-handler (form)
"byte-optimize-handler for the `inline' special-form."
@ -391,13 +391,6 @@
(and (nth 1 form)
(not for-effect)
form))
((eq (car-safe fn) 'lambda)
(let ((newform (byte-compile-unfold-lambda form)))
(if (eq newform form)
;; Some error occurred, avoid infinite recursion
form
(byte-optimize-form-code-walker newform for-effect))))
((eq (car-safe fn) 'closure) form)
((memq fn '(let let*))
;; recursively enter the optimizer for the bindings and body
;; of a let or let*. This for depth-firstness: forms that
@ -444,13 +437,6 @@
;; will be optimized away in the lap-optimize pass.
(cons fn (byte-optimize-body (cdr form) for-effect)))
((eq fn 'with-output-to-temp-buffer)
;; this is just like the above, except for the first argument.
(cons fn
(cons
(byte-optimize-form (nth 1 form) nil)
(byte-optimize-body (cdr (cdr form)) for-effect))))
((eq fn 'if)
(when (< (length form) 3)
(byte-compile-warn "too few arguments for `if'"))
@ -530,6 +516,15 @@
;; Needed as long as we run byte-optimize-form after cconv.
((eq fn 'internal-make-closure) form)
((eq (car-safe fn) 'lambda)
(let ((newform (byte-compile-unfold-lambda form)))
(if (eq newform form)
;; Some error occurred, avoid infinite recursion
form
(byte-optimize-form newform for-effect))))
((eq (car-safe fn) 'closure) form)
((byte-code-function-p fn)
(cons fn (mapcar #'byte-optimize-form (cdr form))))
@ -554,23 +549,10 @@
;; Otherwise, no args can be considered to be for-effect,
;; even if the called function is for-effect, because we
;; don't know anything about that function.
(let ((args (mapcar #'byte-optimize-form (cdr form))))
(if (and (get fn 'pure)
(byte-optimize-all-constp args))
(let ((arg-values (mapcar #'eval args)))
(condition-case nil
(list 'quote (apply fn arg-values))
(error (cons fn args))))
(cons fn args)))))))
(defun byte-optimize-all-constp (list)
"Non-nil if all elements of LIST satisfy `macroexp-const-p'."
(let ((constant t))
(while (and list constant)
(unless (macroexp-const-p (car list))
(setq constant nil))
(setq list (cdr list)))
constant))
(let ((form (cons fn (mapcar #'byte-optimize-form (cdr form)))))
(if (get fn 'pure)
(byte-optimize-constant-args form)
form))))))
(defun byte-optimize-form (form &optional for-effect)
"The source-level pass of the optimizer."
@ -747,22 +729,6 @@
((equal args (cdr form)) form)
(t (cons '- args))))))
(defun byte-optimize-1+ (form)
(let ((args (cdr form)))
(when (null (cdr args))
(let ((n (car args)))
(when (numberp n)
(setq form (1+ n))))))
form)
(defun byte-optimize-1- (form)
(let ((args (cdr form)))
(when (null (cdr args))
(let ((n (car args)))
(when (numberp n)
(setq form (1- n))))))
form)
(defun byte-optimize-multiply (form)
(let* ((args (remq 1 (byte-opt--arith-reduce #'* 1 (cdr form)))))
(cond
@ -802,7 +768,7 @@
(condition-case ()
(list 'quote (eval form))
(error form)))
(t ;; This can enable some lapcode optimizations.
(t ;; Moving the constant to the end can enable some lapcode optimizations.
(list (car form) (nth 2 form) (nth 1 form)))))
(defun byte-optimize-constant-args (form)
@ -901,37 +867,34 @@
form ; No improvement.
(cons 'concat (nreverse newargs)))))
(put 'identity 'byte-optimizer 'byte-optimize-identity)
(put 'memq 'byte-optimizer 'byte-optimize-memq)
(put 'memql 'byte-optimizer 'byte-optimize-member)
(put 'member 'byte-optimizer 'byte-optimize-member)
(put 'assoc 'byte-optimizer 'byte-optimize-assoc)
(put 'rassoc 'byte-optimizer 'byte-optimize-assoc)
(put 'identity 'byte-optimizer #'byte-optimize-identity)
(put 'memq 'byte-optimizer #'byte-optimize-memq)
(put 'memql 'byte-optimizer #'byte-optimize-member)
(put 'member 'byte-optimizer #'byte-optimize-member)
(put 'assoc 'byte-optimizer #'byte-optimize-assoc)
(put 'rassoc 'byte-optimizer #'byte-optimize-assoc)
(put '+ 'byte-optimizer 'byte-optimize-plus)
(put '* 'byte-optimizer 'byte-optimize-multiply)
(put '- 'byte-optimizer 'byte-optimize-minus)
(put '/ 'byte-optimizer 'byte-optimize-divide)
(put 'max 'byte-optimizer 'byte-optimize-associative-math)
(put 'min 'byte-optimizer 'byte-optimize-associative-math)
(put '+ 'byte-optimizer #'byte-optimize-plus)
(put '* 'byte-optimizer #'byte-optimize-multiply)
(put '- 'byte-optimizer #'byte-optimize-minus)
(put '/ 'byte-optimizer #'byte-optimize-divide)
(put 'max 'byte-optimizer #'byte-optimize-associative-math)
(put 'min 'byte-optimizer #'byte-optimize-associative-math)
(put '= 'byte-optimizer 'byte-optimize-binary-predicate)
(put 'eq 'byte-optimizer 'byte-optimize-binary-predicate)
(put 'eql 'byte-optimizer 'byte-optimize-equal)
(put 'equal 'byte-optimizer 'byte-optimize-equal)
(put 'string= 'byte-optimizer 'byte-optimize-binary-predicate)
(put 'string-equal 'byte-optimizer 'byte-optimize-binary-predicate)
(put '= 'byte-optimizer #'byte-optimize-binary-predicate)
(put 'eq 'byte-optimizer #'byte-optimize-binary-predicate)
(put 'eql 'byte-optimizer #'byte-optimize-equal)
(put 'equal 'byte-optimizer #'byte-optimize-equal)
(put 'string= 'byte-optimizer #'byte-optimize-binary-predicate)
(put 'string-equal 'byte-optimizer #'byte-optimize-binary-predicate)
(put '1+ 'byte-optimizer 'byte-optimize-1+)
(put '1- 'byte-optimizer 'byte-optimize-1-)
(put 'concat 'byte-optimizer 'byte-optimize-concat)
(put 'concat 'byte-optimizer #'byte-optimize-concat)
;; I'm not convinced that this is necessary. Doesn't the optimizer loop
;; take care of this? - Jamie
;; I think this may some times be necessary to reduce ie (quote 5) to 5,
;; so arithmetic optimizers recognize the numeric constant. - Hallvard
(put 'quote 'byte-optimizer 'byte-optimize-quote)
(put 'quote 'byte-optimizer #'byte-optimize-quote)
(defun byte-optimize-quote (form)
(if (or (consp (nth 1 form))
(and (symbolp (nth 1 form))
@ -1049,16 +1012,16 @@
(if (nth 1 form)
form))
(put 'and 'byte-optimizer 'byte-optimize-and)
(put 'or 'byte-optimizer 'byte-optimize-or)
(put 'cond 'byte-optimizer 'byte-optimize-cond)
(put 'if 'byte-optimizer 'byte-optimize-if)
(put 'while 'byte-optimizer 'byte-optimize-while)
(put 'and 'byte-optimizer #'byte-optimize-and)
(put 'or 'byte-optimizer #'byte-optimize-or)
(put 'cond 'byte-optimizer #'byte-optimize-cond)
(put 'if 'byte-optimizer #'byte-optimize-if)
(put 'while 'byte-optimizer #'byte-optimize-while)
;; byte-compile-negation-optimizer lives in bytecomp.el
(put '/= 'byte-optimizer 'byte-compile-negation-optimizer)
(put 'atom 'byte-optimizer 'byte-compile-negation-optimizer)
(put 'nlistp 'byte-optimizer 'byte-compile-negation-optimizer)
(put '/= 'byte-optimizer #'byte-compile-negation-optimizer)
(put 'atom 'byte-optimizer #'byte-compile-negation-optimizer)
(put 'nlistp 'byte-optimizer #'byte-compile-negation-optimizer)
(defun byte-optimize-funcall (form)
@ -1086,12 +1049,12 @@
nil))
form)))
(put 'funcall 'byte-optimizer 'byte-optimize-funcall)
(put 'apply 'byte-optimizer 'byte-optimize-apply)
(put 'funcall 'byte-optimizer #'byte-optimize-funcall)
(put 'apply 'byte-optimizer #'byte-optimize-apply)
(put 'let 'byte-optimizer 'byte-optimize-letX)
(put 'let* 'byte-optimizer 'byte-optimize-letX)
(put 'let 'byte-optimizer #'byte-optimize-letX)
(put 'let* 'byte-optimizer #'byte-optimize-letX)
(defun byte-optimize-letX (form)
(cond ((null (nth 1 form))
;; No bindings
@ -1107,7 +1070,7 @@
(list 'let* (reverse (cdr binds)) (nth 1 (car binds)) nil)))))
(put 'nth 'byte-optimizer 'byte-optimize-nth)
(put 'nth 'byte-optimizer #'byte-optimize-nth)
(defun byte-optimize-nth (form)
(if (= (safe-length form) 3)
(if (memq (nth 1 form) '(0 1))
@ -1117,7 +1080,7 @@
form)
form))
(put 'nthcdr 'byte-optimizer 'byte-optimize-nthcdr)
(put 'nthcdr 'byte-optimizer #'byte-optimize-nthcdr)
(defun byte-optimize-nthcdr (form)
(if (= (safe-length form) 3)
(if (memq (nth 1 form) '(0 1 2))
@ -1133,7 +1096,7 @@
;; optimize string-as-unibyte, string-as-multibyte, string-make-unibyte,
;; string-make-multibyte for constant args.
(put 'set 'byte-optimizer 'byte-optimize-set)
(put 'set 'byte-optimizer #'byte-optimize-set)
(defun byte-optimize-set (form)
(let ((var (car-safe (cdr-safe form))))
(cond

View file

@ -3,6 +3,7 @@
;; Copyright (C) 2007-2020 Free Software Foundation, Inc.
;; Author: Glenn Morris <rgm@gnu.org>
;; Maintainer: emacs-devel@gnu.org
;; Keywords: lisp, tools, maint
;; This file is part of GNU Emacs.

View file

@ -555,7 +555,7 @@ already is one.)"
;; Compatibility with old versions.
(defalias 'edebug-all-defuns 'edebug-all-defs)
(define-obsolete-function-alias 'edebug-all-defuns #'edebug-all-defs "28.1")
;;;###autoload
(defun edebug-all-defs ()

View file

@ -5,7 +5,7 @@
;; Author: Noah Friedman <friedman@splode.com>
;; Keywords: extensions
;; Created: 1995-10-06
;; Version: 1.6.0
;; Version: 1.8.0
;; Package-Requires: ((emacs "26.3"))
;; This is a GNU ELPA :core package. Avoid functionality that is not
@ -229,11 +229,15 @@ expression point is on." :lighter eldoc-minor-mode-string
(defun eldoc--eval-expression-setup ()
;; Setup `eldoc', similar to `emacs-lisp-mode'. FIXME: Call
;; `emacs-lisp-mode' itself?
(add-hook 'eldoc-documentation-functions
#'elisp-eldoc-var-docstring nil t)
(add-hook 'eldoc-documentation-functions
#'elisp-eldoc-funcall nil t)
(setq eldoc-documentation-strategy 'eldoc-documentation-default)
(cond ((<= emacs-major-version 27)
(declare-function elisp-eldoc-documentation-function "elisp-mode")
(add-function :before-until (local 'eldoc-documentation-function)
#'elisp-eldoc-documentation-function))
(t (add-hook 'eldoc-documentation-functions
#'elisp-eldoc-var-docstring nil t)
(add-hook 'eldoc-documentation-functions
#'elisp-eldoc-funcall nil t)
(setq eldoc-documentation-strategy 'eldoc-documentation-default)))
(eldoc-mode +1))
;;;###autoload
@ -346,6 +350,12 @@ Also store it in `eldoc-last-message' and return that value."
"Compute information to store in `eldoc--last-request-state'."
(list (current-buffer) (buffer-modified-tick) (point)))
(defun eldoc-display-message-p ()
(eldoc--request-docs-p (eldoc--request-state)))
(make-obsolete 'eldoc-display-message-p
"Use `eldoc-documentation-functions' instead."
"eldoc-1.6.0")
(defun eldoc--request-docs-p (request-state)
"Return non-nil when it is appropriate to request docs.
REQUEST-STATE is a candidate for `eldoc--last-request-state'"

View file

@ -1683,7 +1683,8 @@ Otherwise, it makes a cleartext signature."
(if (epg-context-result-for context 'error)
(let ((errors (epg-context-result-for context 'error)))
(signal 'epg-error
(list "Sign failed" (epg-errors-to-string errors))))))
(list "Sign failed" (epg-errors-to-string errors))))
(signal 'epg-error '("Signing failed (unknown reason)"))))
(epg-read-output context))
(epg-delete-output-file context)
(if input-file

View file

@ -54,7 +54,7 @@ If `erc-autoaway-idle-method' is `emacs', you must call this
function each time you change `erc-autoaway-idle-seconds'."
(interactive)
(when erc-autoaway-idletimer
(erc-cancel-timer erc-autoaway-idletimer))
(cancel-timer erc-autoaway-idletimer))
(setq erc-autoaway-idletimer
(run-with-idle-timer erc-autoaway-idle-seconds
t
@ -133,7 +133,7 @@ Related variables: `erc-public-away-p' and `erc-away-nickname'."
(remove-hook 'erc-after-connect 'erc-autoaway-insinuate-maybe)
(remove-hook 'erc-disconnected-hook 'erc-autoaway-remove-maybe))
((eq erc-autoaway-idle-method 'emacs)
(erc-cancel-timer erc-autoaway-idletimer)
(cancel-timer erc-autoaway-idletimer)
(setq erc-autoaway-idletimer nil)))
(remove-hook 'erc-timer-hook 'erc-autoaway-possibly-set-away)
(remove-hook 'erc-server-305-functions 'erc-autoaway-reset-indicators))))

View file

@ -520,7 +520,8 @@ If no subword-mode is active, then this is
"Set up a timer to periodically ping the current server.
The current buffer is given by BUFFER."
(with-current-buffer buffer
(and erc-server-ping-handler (erc-cancel-timer erc-server-ping-handler))
(when erc-server-ping-handler
(cancel-timer erc-server-ping-handler))
(when erc-server-send-ping-interval
(setq erc-server-ping-handler (run-with-timer
4 erc-server-send-ping-interval
@ -533,7 +534,7 @@ The current buffer is given by BUFFER."
(if timer-tuple
;; this buffer already has a timer. Cancel it and set the new one
(progn
(erc-cancel-timer (cdr timer-tuple))
(cancel-timer (cdr timer-tuple))
(setf (cdr (assq buffer erc-server-ping-timer-alist)) erc-server-ping-handler))
;; no existing timer for this buffer. Add new one
@ -731,7 +732,7 @@ Conditionally try to reconnect and take appropriate action."
(erc-with-all-buffers-of-server cproc nil
(setq erc-server-connected nil))
(when erc-server-ping-handler
(progn (erc-cancel-timer erc-server-ping-handler)
(progn (cancel-timer erc-server-ping-handler)
(setq erc-server-ping-handler nil)))
(run-hook-with-args 'erc-disconnected-hook
(erc-current-nick) (system-name) "")
@ -856,7 +857,7 @@ Additionally, detect whether the IRC process has hung."
;; remove timer if the server buffer has been killed
(let ((timer (assq buf erc-server-ping-timer-alist)))
(when timer
(erc-cancel-timer (cdr timer))
(cancel-timer (cdr timer))
(setcdr timer nil)))))
;; From Circe
@ -864,41 +865,42 @@ Additionally, detect whether the IRC process has hung."
"Send messages in `erc-server-flood-queue'.
See `erc-server-flood-margin' for an explanation of the flood
protection algorithm."
(with-current-buffer buffer
(let ((now (current-time)))
(when erc-server-flood-timer
(erc-cancel-timer erc-server-flood-timer)
(setq erc-server-flood-timer nil))
(when (time-less-p erc-server-flood-last-message now)
(setq erc-server-flood-last-message (erc-emacs-time-to-erc-time now)))
(while (and erc-server-flood-queue
(time-less-p erc-server-flood-last-message
(time-add now erc-server-flood-margin)))
(let ((msg (caar erc-server-flood-queue))
(encoding (cdar erc-server-flood-queue)))
(setq erc-server-flood-queue (cdr erc-server-flood-queue)
erc-server-flood-last-message
(+ erc-server-flood-last-message
erc-server-flood-penalty))
(erc-log-irc-protocol msg 'outbound)
(erc-log (concat "erc-server-send-queue: "
msg "(" (buffer-name buffer) ")"))
(when (erc-server-process-alive)
(condition-case nil
;; Set encoding just before sending the string
(progn
(when (fboundp 'set-process-coding-system)
(set-process-coding-system erc-server-process
'raw-text encoding))
(process-send-string erc-server-process msg))
;; Sometimes the send can occur while the process is
;; being killed, which results in a weird SIGPIPE error.
;; Catch this and ignore it.
(error nil)))))
(when erc-server-flood-queue
(setq erc-server-flood-timer
(run-at-time (+ 0.2 erc-server-flood-penalty)
nil #'erc-server-send-queue buffer))))))
(when (buffer-live-p buffer)
(with-current-buffer buffer
(let ((now (current-time)))
(when erc-server-flood-timer
(cancel-timer erc-server-flood-timer)
(setq erc-server-flood-timer nil))
(when (time-less-p erc-server-flood-last-message now)
(setq erc-server-flood-last-message (erc-emacs-time-to-erc-time now)))
(while (and erc-server-flood-queue
(time-less-p erc-server-flood-last-message
(time-add now erc-server-flood-margin)))
(let ((msg (caar erc-server-flood-queue))
(encoding (cdar erc-server-flood-queue)))
(setq erc-server-flood-queue (cdr erc-server-flood-queue)
erc-server-flood-last-message
(+ erc-server-flood-last-message
erc-server-flood-penalty))
(erc-log-irc-protocol msg 'outbound)
(erc-log (concat "erc-server-send-queue: "
msg "(" (buffer-name buffer) ")"))
(when (erc-server-process-alive)
(condition-case nil
;; Set encoding just before sending the string
(progn
(when (fboundp 'set-process-coding-system)
(set-process-coding-system erc-server-process
'raw-text encoding))
(process-send-string erc-server-process msg))
;; Sometimes the send can occur while the process is
;; being killed, which results in a weird SIGPIPE error.
;; Catch this and ignore it.
(error nil)))))
(when erc-server-flood-queue
(setq erc-server-flood-timer
(run-at-time (+ 0.2 erc-server-flood-penalty)
nil #'erc-server-send-queue buffer)))))))
(defun erc-message (message-command line &optional force)
"Send LINE to the server as a privmsg or a notice.

View file

@ -79,10 +79,12 @@ START is the beginning position of the last match (see `match-beginning').
See `replace-match' for explanations of FIXEDCASE and LITERAL."
(replace-match newtext fixedcase literal string subexp))
(defalias 'erc-with-selected-window 'with-selected-window)
(defalias 'erc-cancel-timer 'cancel-timer)
(defalias 'erc-make-obsolete 'make-obsolete)
(defalias 'erc-make-obsolete-variable 'make-obsolete-variable)
(define-obsolete-function-alias 'erc-with-selected-window
#'with-selected-window "28.1")
(define-obsolete-function-alias 'erc-cancel-timer #'cancel-timer "28.1")
(define-obsolete-function-alias 'erc-make-obsolete #'make-obsolete "28.1")
(define-obsolete-function-alias 'erc-make-obsolete-variable
#'make-obsolete-variable "28.1")
;; Provide a simpler replacement for `member-if'
(defun erc-member-if (predicate list)

View file

@ -113,7 +113,7 @@ servers, presumably in the same domain."
This is called from a timer set up by `erc-autojoin-channels'."
(if erc--autojoin-timer
(setq erc--autojoin-timer
(erc-cancel-timer erc--autojoin-timer)))
(cancel-timer erc--autojoin-timer)))
(with-current-buffer buffer
;; Don't kick of another delayed autojoin or try to wait for
;; another ident response:
@ -127,7 +127,7 @@ This is called from a timer set up by `erc-autojoin-channels'."
This function is run from `erc-nickserv-identified-hook'."
(if erc--autojoin-timer
(setq erc--autojoin-timer
(erc-cancel-timer erc--autojoin-timer)))
(cancel-timer erc--autojoin-timer)))
(when (eq erc-autojoin-timing 'ident)
(let ((server (or erc-session-server erc-server-announced-name))
(joined (mapcar (lambda (buf)

View file

@ -756,8 +756,8 @@ Return the name of this server's network as a symbol."
(erc-with-server-buffer
(intern (downcase (symbol-name erc-network)))))
(erc-make-obsolete 'erc-current-network 'erc-network
"Obsolete since erc-networks 1.5")
(make-obsolete 'erc-current-network 'erc-network
"Obsolete since erc-networks 1.5")
(defun erc-network-name ()
"Return the name of the current network as a string."

View file

@ -1212,7 +1212,7 @@ which the local user typed."
:group 'erc-faces)
(defface erc-header-line
'((t :foreground "grey20" :background "grey90"))
'((t :inherit header-line))
"ERC face used for the header line.
This will only be used if `erc-header-line-face-method' is non-nil."
@ -1622,10 +1622,12 @@ symbol, it may have these values:
(if (and (not buffer-name)
erc-reuse-buffers
(or (not (get-buffer candidate))
(or target
(with-current-buffer (get-buffer candidate)
(and (erc-server-buffer-p)
(not (erc-server-process-alive)))))
;; Looking for a server buffer, so there's no target.
(and (not target)
(with-current-buffer (get-buffer candidate)
(and (erc-server-buffer-p)
(not (erc-server-process-alive)))))
;; Channel buffer; check that it's from the right server.
(with-current-buffer (get-buffer candidate)
(and (string= erc-session-server server)
(erc-port-equal erc-session-port port)))))

View file

@ -109,14 +109,16 @@ callback for `gravatar-retrieve'."
;; If we're on the " quoting the name, go backward.
(when (looking-at-p "[\"<]")
(goto-char (1- (point))))
;; Do not do anything if there's already a gravatar. This can
;; happen if the buffer has been regenerated in the mean time, for
;; example we were fetching someaddress, and then we change to
;; another mail with the same someaddress.
(unless (get-text-property (point) 'gnus-gravatar)
;; Do not do anything if there's already a gravatar.
;; This can happen if the buffer has been regenerated in
;; the mean time, for example we were fetching
;; someaddress, and then we change to another mail with
;; the same someaddress.
(unless (get-text-property (1- (point)) 'gnus-gravatar)
(let ((pos (point)))
(setq gravatar (append gravatar gnus-gravatar-properties))
(gnus-put-image gravatar (buffer-substring pos (1+ pos)) category)
(gnus-put-image gravatar (buffer-substring pos (1+ pos))
category)
(put-text-property pos (point) 'gnus-gravatar address)
(gnus-add-wash-type category)
(gnus-add-image category gravatar)))))

View file

@ -1768,7 +1768,7 @@ already. If INFO-UNCHANGED is non-nil, dribble buffer is not updated."
(get-text-property (point-at-bol) 'gnus-unread))
(defun gnus-group-new-mail (group)
(if (nnmail-new-mail-p (gnus-group-real-name group))
(if (nnmail-new-mail-p group)
gnus-new-mail-mark
?\s))
@ -3600,7 +3600,7 @@ or nil if no action could be taken."
(marks (gnus-info-marks (nth 1 entry)))
(unread (gnus-sequence-of-unread-articles group)))
;; Remove entries for this group.
(nnmail-purge-split-history (gnus-group-real-name group))
(nnmail-purge-split-history group)
;; Do the updating only if the newsgroup isn't killed.
(if (not (numberp (car entry)))
(gnus-message 1 "Can't catch up %s; non-active group" group)

View file

@ -5938,7 +5938,9 @@ If SELECT-ARTICLES, only select those articles from GROUP."
(initial (gnus-parameter-large-newsgroup-initial
gnus-newsgroup-name))
(default (if only-read-p
(or initial gnus-large-newsgroup)
(if (eq initial 'all)
nil
(or initial gnus-large-newsgroup))
number))
(input
(read-string
@ -7311,7 +7313,7 @@ If FORCE (the prefix), also save the .newsrc file(s)."
(when gnus-use-cache
(gnus-cache-write-active))
;; Remove entries for this group.
(nnmail-purge-split-history (gnus-group-real-name group))
(nnmail-purge-split-history group)
;; Make all changes in this group permanent.
(unless quit-config
(gnus-run-hooks 'gnus-exit-group-hook)
@ -13165,10 +13167,13 @@ If ALL is a number, fetch this number of articles."
(t
(when (and (numberp gnus-large-newsgroup)
(> len gnus-large-newsgroup))
(let* ((cursor-in-echo-area nil)
(initial (gnus-parameter-large-newsgroup-initial
gnus-newsgroup-name))
(input
(let ((cursor-in-echo-area nil)
(initial (gnus-parameter-large-newsgroup-initial
gnus-newsgroup-name))
input)
(when (eq initial 'all)
(setq initial len))
(setq input
(read-string
(format
"How many articles from %s (%s %d): "
@ -13177,7 +13182,7 @@ If ALL is a number, fetch this number of articles."
len)
nil nil
(and initial
(number-to-string initial)))))
(number-to-string initial))))
(unless (string-match "^[ \t]*$" input)
(setq all (string-to-number input))
(if (< all len)

View file

@ -1591,7 +1591,7 @@ posting an article."
"Alist of group regexps and its initial input of the number of articles."
:variable-group gnus-group-parameter
:parameter-type '(choice :tag "Initial Input for Large Newsgroup"
(const :tag "All" nil)
(const :tag "All" 'all)
(integer))
:parameter-document "\

View file

@ -1670,8 +1670,7 @@ If LIMIT, first try to limit the search to the N last articles."
(when (and active
recent
(> (car (last recent)) (cdr active)))
(push (list (cons (gnus-group-real-name group) 0))
nnmail-split-history)))
(push (list (cons group 0)) nnmail-split-history)))
;; Note the active level for the next run-through.
(gnus-group-set-parameter info 'active (gnus-active group))
(gnus-group-set-parameter info 'uidvalidity uidvalidity)

View file

@ -1749,7 +1749,15 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
(nreverse (nnmail-article-group artnum-func))))))
;; Add the group-art list to the history list.
(if group-art
(push group-art nnmail-split-history)
;; We need to get the unique Gnus group name for this article
;; -- there may be identically named groups from several
;; backends.
(push (mapcar
(lambda (ga)
(cons (gnus-group-prefixed-name (car ga) gnus-command-method)
(cdr ga)))
group-art)
nnmail-split-history)
(delete-region (point-min) (point-max)))))
;;; Get new mail.

View file

@ -784,6 +784,7 @@ number, play until that number of seconds has elapsed."
(if (setq timer (image-animate-timer image))
(cancel-timer timer))
(plist-put (cdr image) :animate-buffer (current-buffer))
(plist-put (cdr image) :animate-tardiness 0)
(run-with-timer 0.2 nil #'image-animate-timeout
image (or index 0) (car animation)
0 limit (+ (float-time) 0.2)))))
@ -848,9 +849,14 @@ The minimum delay between successive frames is `image-minimum-frame-delay'.
If the image has a non-nil :speed property, it acts as a multiplier
for the animation speed. A negative value means to animate in reverse."
;; We keep track of "how late" image frames arrive. We decay the
;; previous cumulative value by 10% and then add the current delay.
(plist-put (cdr image) :animate-tardiness
(+ (* (plist-get (cdr image) :animate-tardiness) 0.9)
(float-time (time-since target-time))))
(when (and (buffer-live-p (plist-get (cdr image) :animate-buffer))
;; Delayed more than two seconds more than expected.
(or (time-less-p (time-since target-time) 2)
;; Cumulatively delayed two seconds more than expected.
(or (< (plist-get (cdr image) :animate-tardiness) 2)
(progn
(message "Stopping animation; animation possibly too big")
nil)))

View file

@ -120,16 +120,21 @@ a gravatar for a given email address."
:group 'gravatar)
(defconst gravatar-service-alist
`((gravatar . ,(lambda (_addr) "https://www.gravatar.com/avatar"))
(unicornify . ,(lambda (_addr) "https://unicornify.pictures/avatar/"))
`((gravatar . ,(lambda (_addr callback)
(funcall callback "https://www.gravatar.com/avatar")))
(unicornify . ,(lambda (_addr callback)
(funcall callback "https://unicornify.pictures/avatar/")))
(libravatar . ,#'gravatar--service-libravatar))
"Alist of supported gravatar services.")
(defcustom gravatar-service 'libravatar
(defcustom gravatar-service 'gravatar
"Symbol denoting gravatar-like service to use.
Note that certain services might ignore other options, such as
`gravatar-default-image' or certain values as with
`gravatar-rating'."
`gravatar-rating'.
Note that `'libravatar' has security implications: It can be used
to track whether you're reading a specific mail."
:type `(choice ,@(mapcar (lambda (s) `(const ,(car s)))
gravatar-service-alist))
:version "28.1"
@ -138,23 +143,31 @@ Note that certain services might ignore other options, such as
:link '(url-link "https://gravatar.com/")
:group 'gravatar)
(defun gravatar--service-libravatar (addr)
(defun gravatar--service-libravatar (addr callback)
"Find domain that hosts avatars for email address ADDR."
;; implements https://wiki.libravatar.org/api/
(save-match-data
(if (not (string-match ".+@\\(.+\\)" addr))
"https://seccdn.libravatar.org/avatar"
(let ((domain (match-string 1 addr)))
(catch 'found
(dolist (record '(("_avatars-sec" . "https")
("_avatars" . "http")))
(let* ((query (concat (car record) "._tcp." domain))
(result (dns-query query 'SRV)))
(when result
(throw 'found (format "%s://%s/avatar"
(cdr record)
result)))))
"https://seccdn.libravatar.org/avatar")))))
(funcall callback "https://seccdn.libravatar.org/avatar")
(let ((domain (match-string 1 addr))
(records '(("_avatars-sec" . "https")
("_avatars" . "http")))
func)
(setq func
(lambda (result)
(cond
(result
(funcall callback (format "%s://%s/avatar"
(cdar records) result)))
((> (length records) 1)
(pop records)
(dns-query-asynchronous
(concat (caar records) "._tcp." domain)
func 'SRV))
(t
(funcall callback "https://seccdn.libravatar.org/avatar")))))
(dns-query-asynchronous
(concat (caar records) "._tcp." domain) func 'SRV)))))
(defun gravatar-hash (mail-address)
"Return the Gravatar hash for MAIL-ADDRESS."
@ -172,14 +185,18 @@ Note that certain services might ignore other options, such as
,@(and gravatar-size
`((s ,gravatar-size))))))
(defun gravatar-build-url (mail-address)
"Return the URL of a gravatar for MAIL-ADDRESS."
(defun gravatar-build-url (mail-address callback)
"Find the URL of a gravatar for MAIL-ADDRESS and call CALLBACK with it."
;; https://gravatar.com/site/implement/images/
(format "%s/%s?%s"
(funcall (alist-get gravatar-service gravatar-service-alist)
mail-address)
(gravatar-hash mail-address)
(gravatar--query-string)))
(let ((query-string (gravatar--query-string)))
(funcall (alist-get gravatar-service gravatar-service-alist)
mail-address
(lambda (url)
(funcall callback
(format "%s/%s?%s"
url
(gravatar-hash mail-address)
query-string))))))
(defun gravatar-get-data ()
"Return body of current URL buffer, or nil on failure."
@ -195,18 +212,23 @@ Note that certain services might ignore other options, such as
When finished, call CALLBACK as (apply CALLBACK GRAVATAR CBARGS),
where GRAVATAR is either an image descriptor, or the symbol
`error' if the retrieval failed."
(let ((url (gravatar-build-url mail-address)))
(if (url-cache-expired url gravatar-cache-ttl)
(url-retrieve url #'gravatar-retrieved (list callback cbargs) t)
(with-current-buffer (url-fetch-from-cache url)
(gravatar-retrieved () callback cbargs)))))
(gravatar-build-url
mail-address
(lambda (url)
(if (url-cache-expired url gravatar-cache-ttl)
(url-retrieve url #'gravatar-retrieved (list callback cbargs) t)
(with-current-buffer (url-fetch-from-cache url)
(gravatar-retrieved () callback cbargs))))))
;;;###autoload
(defun gravatar-retrieve-synchronously (mail-address)
"Synchronously retrieve a gravatar for MAIL-ADDRESS.
Value is either an image descriptor, or the symbol `error' if the
retrieval failed."
(let ((url (gravatar-build-url mail-address)))
(let ((url nil))
(gravatar-build-url mail-address (lambda (u) (setq url u)))
(while (not url)
(sleep-for 0.01))
(with-current-buffer (if (url-cache-expired url gravatar-cache-ttl)
(url-retrieve-synchronously url t)
(url-fetch-from-cache url))

View file

@ -7126,8 +7126,10 @@ Otherwise return a description formatted by
of `eldoc-echo-area-use-multiline-p' variable and width of
minibuffer window for width limit.
This function is meant to be used as a value of
`eldoc-documentation-function' variable." nil nil)
This function can be used as a value of
`eldoc-documentation-functions' variable.
\(fn CALLBACK &rest _)" nil nil)
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "descr-text" '("describe-")))
@ -9949,7 +9951,7 @@ It creates an autoload function for CNAME's constructor.
;;;### (autoloads nil "eldoc" "emacs-lisp/eldoc.el" (0 0 0 0))
;;; Generated autoloads from emacs-lisp/eldoc.el
(push (purecopy '(eldoc 1 0 0)) package--builtin-versions)
(push (purecopy '(eldoc 1 8 0)) package--builtin-versions)
;;;***
@ -10256,6 +10258,10 @@ some major modes from being locked under some circumstances.
Report a bug in GNU Emacs.
Prompts for bug subject. Leaves you in a mail buffer.
Already submitted bugs can be found in the Emacs bug tracker:
https://debbugs.gnu.org/cgi/pkgreport.cgi?package=emacs;max-bugs=100;base-order=1;bug-rev=1
\(fn TOPIC &optional UNUSED)" t nil)
(set-advertised-calling-convention 'report-emacs-bug '(topic) '"24.5")
@ -10608,7 +10614,10 @@ The buffer is expected to contain a mail message." t nil)
(autoload 'epa-mail-sign "epa-mail" "\
Sign the current buffer.
The buffer is expected to contain a mail message.
The buffer is expected to contain a mail message, and signing is
performed with your default key.
With prefix argument, asks you to select interactively the key to
use from your key ring.
\(fn START END SIGNERS MODE)" t nil)
@ -11857,6 +11866,14 @@ Edit the hotlist of directory servers in a specialized buffer." t nil)
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "eudcb-mab" '("eudc-")))
;;;***
;;;### (autoloads nil "eudcb-macos-contacts" "net/eudcb-macos-contacts.el"
;;;;;; (0 0 0 0))
;;; Generated autoloads from net/eudcb-macos-contacts.el
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "eudcb-macos-contacts" '("eudc-macos-contacts-")))
;;;***
;;;### (autoloads nil "ewoc" "emacs-lisp/ewoc.el" (0 0 0 0))
@ -11906,7 +11923,11 @@ word(s) will be searched for via `eww-search-prefix'.
If called with a prefix ARG, use a new buffer instead of reusing
the default EWW buffer.
\(fn URL &optional ARG)" t nil)
If BUFFER, the data to be rendered is in that buffer. In that
case, this function doesn't actually fetch URL. BUFFER will be
killed after rendering.
\(fn URL &optional ARG BUFFER)" t nil)
(defalias 'browse-web 'eww)
(autoload 'eww-open-file "eww" "\
@ -11946,7 +11967,7 @@ instead of `browse-url-new-window-flag'.
(autoload 'eww-list-bookmarks "eww" "\
Display the bookmarks." t nil)
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "eww" '("eww-")))
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "eww" '("erc--download-directory" "eww-")))
;;;***
@ -13097,7 +13118,7 @@ lines.
;;;### (autoloads nil "flymake" "progmodes/flymake.el" (0 0 0 0))
;;; Generated autoloads from progmodes/flymake.el
(push (purecopy '(flymake 1 0 8)) package--builtin-versions)
(push (purecopy '(flymake 1 0 9)) package--builtin-versions)
(autoload 'flymake-log "flymake" "\
Log, at level LEVEL, the message MSG formatted with ARGS.
@ -14137,8 +14158,13 @@ DEFAULT-MAP specifies the default key map for ICON-LIST.
(when (fboundp 'custom-autoload)
(custom-autoload 'gnus-select-method "gnus"))
(autoload 'gnus-child-no-server "gnus" "\
Read network news as a child, without connecting to the local server.
\(fn &optional ARG)" t nil)
(autoload 'gnus-slave-no-server "gnus" "\
Read network news as a slave, without connecting to the local server.
Read network news as a child, without connecting to the local server.
\(fn &optional ARG)" t nil)
@ -14151,10 +14177,15 @@ an NNTP server to use.
As opposed to `gnus', this command will not connect to the local
server.
\(fn &optional ARG SLAVE)" t nil)
\(fn &optional ARG CHILD)" t nil)
(autoload 'gnus-child "gnus" "\
Read news as a child.
\(fn &optional ARG)" t nil)
(autoload 'gnus-slave "gnus" "\
Read news as a slave.
Read news as a child.
\(fn &optional ARG)" t nil)
@ -14177,7 +14208,7 @@ If ARG is non-nil and a positive number, Gnus will use that as the
startup level. If ARG is non-nil and not a positive number, Gnus will
prompt the user for the name of an NNTP server to use.
\(fn &optional ARG DONT-CONNECT SLAVE)" t nil)
\(fn &optional ARG DONT-CONNECT CHILD)" t nil)
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "gnus" '("gnus-")))
@ -14192,8 +14223,13 @@ Start Gnus unplugged." t nil)
(autoload 'gnus-plugged "gnus-agent" "\
Start Gnus plugged." t nil)
(autoload 'gnus-child-unplugged "gnus-agent" "\
Read news as a child unplugged.
\(fn &optional ARG)" t nil)
(autoload 'gnus-slave-unplugged "gnus-agent" "\
Read news as a slave unplugged.
Read news as a child unplugged.
\(fn &optional ARG)" t nil)
@ -19865,7 +19901,7 @@ done. Otherwise, it uses the current buffer.
\(fn CALLBACK &optional SETUP PARAMS BUFFER MODE &rest IGNORE)" nil nil)
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "log-edit" '("log-edit-" "vc-log-")))
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "log-edit" '("log-edit-")))
;;;***
@ -20540,7 +20576,7 @@ Previous contents of that buffer are killed first." t nil)
;;;### (autoloads nil "man" "man.el" (0 0 0 0))
;;; Generated autoloads from man.el
(defalias 'manual-entry 'man)
(define-obsolete-function-alias 'manual-entry 'man "28.1")
(autoload 'man "man" "\
Get a Un*x manual page and put it in a buffer.
@ -20579,6 +20615,10 @@ names or descriptions. The pattern argument is usually an
-k pattern
Note that in some cases you will need to use \\[quoted-insert] to quote the
SPC character in the above examples, because this command attempts
to auto-complete your input based on the installed manual pages.
\(fn MAN-ARGS)" t nil)
(autoload 'man-follow "man" "\
@ -22310,7 +22350,10 @@ writes. See `make-network-process' for details.
:capability-command specifies a command used to query the HOST
for its capabilities. For instance, for IMAP this should be
\"1 CAPABILITY\\r\\n\".
\"1 CAPABILITY\\r\\n\". This can either be a string (which will
then be sent verbatim to the server), or a function (called with
a single parameter; the \"greeting\" from the server when connecting),
and should return a string to send to the server.
:starttls-function specifies a function for handling STARTTLS.
This function should take one parameter, the response to the
@ -26251,19 +26294,57 @@ Open profile FILENAME.
;;;### (autoloads nil "project" "progmodes/project.el" (0 0 0 0))
;;; Generated autoloads from progmodes/project.el
(push (purecopy '(project 0 4 0)) package--builtin-versions)
(push (purecopy '(project 0 5 0)) package--builtin-versions)
(autoload 'project-current "project" "\
Return the project instance in DIR or `default-directory'.
When no project found in DIR, and MAYBE-PROMPT is non-nil, ask
the user for a different project to look in.
Return the project instance in DIRECTORY, defaulting to `default-directory'.
\(fn &optional MAYBE-PROMPT DIR)" nil nil)
When no project is found in that directory, the result depends on
the value of MAYBE-PROMPT: if it is nil or omitted, return nil,
else ask the user for a directory in which to look for the
project, and if no project is found there, return a \"transient\"
project instance.
(defvar project-prefix-map (let ((map (make-sparse-keymap))) (define-key map "f" 'project-find-file) (define-key map "b" 'project-switch-to-buffer) (define-key map "s" 'project-shell) (define-key map "d" 'project-dired) (define-key map "v" 'project-vc-dir) (define-key map "c" 'project-compile) (define-key map "e" 'project-eshell) (define-key map "k" 'project-kill-buffers) (define-key map "p" 'project-switch-project) (define-key map "g" 'project-find-regexp) (define-key map "r" 'project-query-replace-regexp) map) "\
The \"transient\" project instance is a special kind of value
which denotes a project rooted in that directory and includes all
the files under the directory except for those that should be
ignored (per `project-ignores').
See the doc string of `project-find-functions' for the general form
of the project instance object.
\(fn &optional MAYBE-PROMPT DIRECTORY)" nil nil)
(defvar project-prefix-map (let ((map (make-sparse-keymap))) (define-key map "f" 'project-find-file) (define-key map "F" 'project-or-external-find-file) (define-key map "b" 'project-switch-to-buffer) (define-key map "s" 'project-shell) (define-key map "d" 'project-dired) (define-key map "v" 'project-vc-dir) (define-key map "c" 'project-compile) (define-key map "e" 'project-eshell) (define-key map "k" 'project-kill-buffers) (define-key map "p" 'project-switch-project) (define-key map "g" 'project-find-regexp) (define-key map "G" 'project-or-external-find-regexp) (define-key map "r" 'project-query-replace-regexp) map) "\
Keymap for project commands.")
(define-key ctl-x-map "p" project-prefix-map)
(autoload 'project-other-window-command "project" "\
Run project command, displaying resultant buffer in another window.
The following commands are available:
\\{project-prefix-map}
\\{project-other-window-map}" t nil)
(define-key ctl-x-4-map "p" #'project-other-window-command)
(autoload 'project-other-frame-command "project" "\
Run project command, displaying resultant buffer in another frame.
The following commands are available:
\\{project-prefix-map}
\\{project-other-frame-map}" t nil)
(define-key ctl-x-5-map "p" #'project-other-frame-command)
(autoload 'project-other-tab-command "project" "\
Run project command, displaying resultant buffer in a new tab.
The following commands are available:
\\{project-prefix-map}" t nil)
(define-key tab-prefix-map "p" #'project-other-tab-command)
(autoload 'project-find-regexp "project" "\
Find all matches for REGEXP in the current project's roots.
With \\[universal-argument] prefix, you can specify the directory
@ -26335,13 +26416,56 @@ Arguments the same as in `compile'.
\(fn COMMAND &optional COMINT)" t nil)
(autoload 'project-switch-to-buffer "project" "\
Switch to another buffer that is related to the current project.
A buffer is related to a project if its `default-directory'
is inside the directory hierarchy of the project's root." t nil)
Display buffer BUFFER-OR-NAME in the selected window.
When called interactively, prompts for a buffer belonging to the
current project. Two buffers belong to the same project if their
project instances, as reported by `project-current' in each
buffer, are identical.
\(fn BUFFER-OR-NAME)" t nil)
(autoload 'project-display-buffer "project" "\
Display BUFFER-OR-NAME in some window, without selecting it.
When called interactively, prompts for a buffer belonging to the
current project. Two buffers belong to the same project if their
project instances, as reported by `project-current' in each
buffer, are identical.
This function uses `display-buffer' as a subroutine, which see
for how it is determined where the buffer will be displayed.
\(fn BUFFER-OR-NAME)" t nil)
(autoload 'project-display-buffer-other-frame "project" "\
Display BUFFER-OR-NAME preferably in another frame.
When called interactively, prompts for a buffer belonging to the
current project. Two buffers belong to the same project if their
project instances, as reported by `project-current' in each
buffer, are identical.
This function uses `display-buffer-other-frame' as a subroutine,
which see for how it is determined where the buffer will be
displayed.
\(fn BUFFER-OR-NAME)" t nil)
(autoload 'project-kill-buffers "project" "\
Kill all live buffers belonging to the current project.
Certain buffers may be \"spared\", see `project-kill-buffers-ignores'." t nil)
Kill the buffers belonging to the current project.
Two buffers belong to the same project if their project
instances, as reported by `project-current' in each buffer, are
identical. Only the buffers that match a condition in
`project-kill-buffer-conditions' will be killed. If NO-CONFIRM
is non-nil, the command will not ask the user for confirmation.
NO-CONFIRM is always nil when the command is invoked
interactivly.
\(fn &optional NO-CONFIRM)" t nil)
(autoload 'project-remember-project "project" "\
Add project PR to the front of the project list.
Save the result in `project-list-file' if the list of projects has changed.
\(fn PR)" nil nil)
(autoload 'project-known-project-roots "project" "\
Return the list of root directories of all known projects." nil nil)
@ -36789,7 +36913,7 @@ Key bindings:
;;;### (autoloads nil "verilog-mode" "progmodes/verilog-mode.el"
;;;;;; (0 0 0 0))
;;; Generated autoloads from progmodes/verilog-mode.el
(push (purecopy '(verilog-mode 2020 2 23 232634261)) package--builtin-versions)
(push (purecopy '(verilog-mode 2020 6 27 14326051)) package--builtin-versions)
(autoload 'verilog-mode "verilog-mode" "\
Major mode for editing Verilog code.

View file

@ -838,7 +838,7 @@ POS defaults to `point'."
;; For compatibility with older versions.
;;;###autoload
(defalias 'manual-entry 'man)
(define-obsolete-function-alias 'manual-entry 'man "28.1")
(defvar Man-completion-cache nil
;; On my machine, "man -k" is so fast that a cache makes no sense,

View file

@ -1,4 +1,4 @@
;;; dns.el --- Domain Name Service lookups
;;; dns.el --- Domain Name Service lookups -*- lexical-binding:t -*-
;; Copyright (C) 2002-2020 Free Software Foundation, Inc.
@ -24,6 +24,8 @@
;;; Code:
(require 'cl-lib)
(defvar dns-timeout 5
"How many seconds to wait when doing DNS queries.")
@ -73,7 +75,7 @@ updated. Set this variable to t to disable the check.")
(defun dns-write-bytes (value &optional length)
(let (bytes)
(dotimes (i (or length 1))
(dotimes (_ (or length 1))
(push (% value 256) bytes)
(setq value (/ value 256)))
(dolist (byte bytes)
@ -81,7 +83,7 @@ updated. Set this variable to t to disable the check.")
(defun dns-read-bytes (length)
(let ((value 0))
(dotimes (i length)
(dotimes (_ length)
(setq value (logior (* value 256) (following-char)))
(forward-char 1))
value))
@ -229,7 +231,7 @@ If TCP-P, the first two bytes of the packet will be the length field."
(setq authorities (dns-read-bytes 2))
(setq additionals (dns-read-bytes 2))
(let ((qs nil))
(dotimes (i queries)
(dotimes (_ queries)
(push (list (dns-read-name)
(list 'type (dns-inverse-get (dns-read-bytes 2)
dns-query-types))
@ -237,26 +239,31 @@ If TCP-P, the first two bytes of the packet will be the length field."
dns-classes)))
qs))
(push (list 'queries qs) spec))
(dolist (slot '(answers authorities additionals))
(let ((qs nil)
type)
(dotimes (i (symbol-value slot))
(push (list (dns-read-name)
(list 'type
(setq type (dns-inverse-get (dns-read-bytes 2)
dns-query-types)))
(list 'class (dns-inverse-get (dns-read-bytes 2)
dns-classes))
(list 'ttl (dns-read-bytes 4))
(let ((length (dns-read-bytes 2)))
(list 'data
(dns-read-type
(buffer-substring
(point)
(progn (forward-char length) (point)))
type))))
qs))
(push (list slot qs) spec)))
(cl-loop for (slot length) in `((answers ,answers)
(authorities ,authorities)
(additionals ,additionals))
do (let ((qs nil)
type)
(dotimes (_ length)
(push (list (dns-read-name)
(list 'type
(setq type (dns-inverse-get
(dns-read-bytes 2)
dns-query-types)))
(list 'class (dns-inverse-get
(dns-read-bytes 2)
dns-classes))
(list 'ttl (dns-read-bytes 4))
(let ((length (dns-read-bytes 2)))
(list 'data
(dns-read-type
(buffer-substring
(point)
(progn (forward-char length)
(point)))
type))))
qs))
(push (list slot qs) spec)))
(nreverse spec))))
(defun dns-read-int32 ()
@ -274,12 +281,12 @@ If TCP-P, the first two bytes of the packet will be the length field."
(cond
((eq type 'A)
(let ((bytes nil))
(dotimes (i 4)
(dotimes (_ 4)
(push (dns-read-bytes 1) bytes))
(mapconcat 'number-to-string (nreverse bytes) ".")))
((eq type 'AAAA)
(let (hextets)
(dotimes (i 8)
(dotimes (_ 8)
(push (dns-read-bytes 2) hextets))
(mapconcat (lambda (n) (format "%x" n))
(nreverse hextets) ":")))
@ -355,25 +362,6 @@ Parses \"/etc/resolv.conf\" or calls \"nslookup\"."
result))
;;; Interface functions.
(defmacro dns-make-network-process (server)
`(let ((server ,server)
(coding-system-for-read 'binary)
(coding-system-for-write 'binary))
(if (and
(fboundp 'make-network-process)
(featurep 'make-network-process '(:type datagram)))
(make-network-process
:name "dns"
:coding 'binary
:buffer (current-buffer)
:host server
:service "domain"
:type 'datagram)
;; Older versions of Emacs do not have `make-network-process',
;; and on MS-Windows datagram sockets are not supported, so we
;; fall back on opening a TCP connection to the DNS server.
(open-network-stream "dns" (current-buffer) server "domain"))))
(defvar dns-cache (make-vector 4096 0))
(defun dns-query-cached (name &optional type fullp reversep)
@ -386,18 +374,20 @@ Parses \"/etc/resolv.conf\" or calls \"nslookup\"."
(set (intern key dns-cache) result)
result))))
;; The old names `query-dns' and `query-dns-cached' weren't used in Emacs 23
;; yet, so no alias are provided. --rsteib
(defun dns-query (name &optional type fullp reversep)
(defun dns-query-asynchronous (name callback &optional type full reverse)
"Query a DNS server for NAME of TYPE.
If FULLP, return the entire record returned.
If REVERSEP, look up an IP address."
CALLBACK will be called with a single parameter: The result.
If there's no result, or `dns-timeout' has passed, CALLBACK will
be called with nil as the parameter.
If FULL, return the entire record.
If REVERSE, look up an IP address."
(setq type (or type 'A))
(unless (dns-servers-up-to-date-p)
(dns-set-servers))
(when reversep
(when reverse
(setq name (concat
(mapconcat 'identity (nreverse (split-string name "\\.")) ".")
".in-addr.arpa")
@ -407,47 +397,118 @@ If REVERSEP, look up an IP address."
(progn
(message "No DNS server configuration found")
nil)
(with-temp-buffer
(set-buffer-multibyte nil)
(let* ((process (condition-case ()
(dns-make-network-process (car dns-servers))
(error
(message
"dns: Got an error while trying to talk to %s"
(car dns-servers))
nil)))
(step 100)
(times (* dns-timeout 1000))
(id (random 65000))
(tcp-p (and process (not (process-contact process :type)))))
(when process
(process-send-string
process
(dns-write `((id ,id)
(opcode query)
(queries ((,name (type ,type))))
(recursion-desired-p t))
tcp-p))
(while (and (zerop (buffer-size))
(> times 0))
(let ((step-sec (/ step 1000.0)))
(sit-for step-sec)
(accept-process-output process step-sec))
(setq times (- times step)))
(condition-case nil
(delete-process process)
(error nil))
(when (and (>= (buffer-size) 2)
;; We had a time-out.
(> times 0))
(let ((result (dns-read (buffer-string) tcp-p)))
(if fullp
result
(let ((answer (car (dns-get 'answers result))))
(when (eq type (dns-get 'type answer))
(if (eq type 'TXT)
(dns-get-txt-answer (dns-get 'answers result))
(dns-get 'data answer))))))))))))
(dns--lookup name callback type full)))
(defun dns--lookup (name callback type full)
(with-current-buffer (generate-new-buffer " *dns*")
(set-buffer-multibyte nil)
(let* ((tcp nil)
(process
(condition-case ()
(let ((server (car dns-servers))
(coding-system-for-read 'binary)
(coding-system-for-write 'binary))
(if (featurep 'make-network-process '(:type datagram))
(make-network-process
:name "dns"
:coding 'binary
:buffer (current-buffer)
:host server
:service "domain"
:type 'datagram)
;; On MS-Windows datagram sockets are not
;; supported, so we fall back on opening a TCP
;; connection to the DNS server.
(progn
(setq tcp t)
(open-network-stream "dns" (current-buffer)
server "domain"))))
(error
(message
"dns: Got an error while trying to talk to %s"
(car dns-servers))
nil)))
(triggered nil)
(buffer (current-buffer))
timer)
(if (not process)
(progn
(kill-buffer buffer)
(funcall callback nil))
;; Call the callback if we don't get any response at all.
(setq timer (run-at-time dns-timeout nil
(lambda ()
(unless triggered
(setq triggered t)
(delete-process process)
(kill-buffer buffer)
(funcall callback nil)))))
(process-send-string
process
(dns-write `((id ,(random 65000))
(opcode query)
(queries ((,name (type ,type))))
(recursion-desired-p t))
tcp))
(set-process-filter
process
(lambda (process string)
(with-current-buffer (process-buffer process)
(goto-char (point-max))
(insert string)
(goto-char (point-min))
;; If this is DNS, then we always get the full data in
;; one packet. If it's TCP, we may only get part of the
;; data, but the first two bytes says how long the data
;; is supposed to be.
(when (or (not tcp)
(>= (buffer-size) (dns-read-bytes 2)))
(setq triggered t)
(cancel-timer timer)
(dns--filter process callback type full tcp)))))
;; In case we the process is deleted for some reason, then do
;; a failure callback.
(set-process-sentinel
process
(lambda (_ state)
(when (and (eq state 'deleted)
;; Ensure we don't trigger this callback twice.
(not triggered))
(setq triggered t)
(cancel-timer timer)
(kill-buffer buffer)
(funcall callback nil))))))))
(defun dns--filter (process callback type full tcp)
(let ((message (buffer-string)))
(when (process-live-p process)
(delete-process process))
(kill-buffer (current-buffer))
(when (>= (length message) 2)
(let ((result (dns-read message tcp)))
(funcall callback
(if full
result
(let ((answer (car (dns-get 'answers result))))
(when (eq type (dns-get 'type answer))
(if (eq type 'TXT)
(dns-get-txt-answer (dns-get 'answers result))
(dns-get 'data answer))))))))))
(defun dns-query (name &optional type full reverse)
"Query a DNS server for NAME of TYPE.
If FULL, return the entire record returned.
If REVERSE, look up an IP address."
(let ((result nil))
(dns-query-asynchronous
name
(lambda (response)
(setq result (list response)))
type full reverse)
;; Loop until we get the callback.
(while (not result)
(sleep-for 0.01))
(car result)))
(provide 'dns)

View file

@ -32,6 +32,7 @@
(require 'thingatpt)
(require 'url)
(require 'url-queue)
(require 'xdg)
(eval-when-compile (require 'subr-x))
(defgroup eww nil
@ -55,11 +56,24 @@
:group 'eww
:type 'string)
(defcustom eww-download-directory "~/Downloads/"
"Directory where files will downloaded."
:version "24.4"
(defun erc--download-directory ()
"Return the name of the download directory.
If ~/Downloads/ exists, that will be used, and if not, the
DOWNLOAD XDG user directory will be returned. If that's
undefined, ~/Downloads/ is returned anyway."
(or (and (file-exists-p "~/Downloads/")
"~/Downloads/")
(when-let ((dir (xdg-user-dir "DOWNLOAD")))
(file-name-as-directory dir))
"~/Downloads/"))
(defcustom eww-download-directory 'erc--download-directory
"Directory where files will downloaded.
This should either be a directory name or a function (called with
no parameters) that returns a directory name."
:version "28.1"
:group 'eww
:type 'directory)
:type '(choice directory function))
;;;###autoload
(defcustom eww-suggest-uris
@ -1632,20 +1646,23 @@ Differences in #targets are ignored."
"Download URL to `eww-download-directory'.
Use link at point if there is one, else the current page's URL."
(interactive)
(access-file eww-download-directory "Download failed")
(let ((url (or (get-text-property (point) 'shr-url)
(eww-current-url))))
(if (not url)
(message "No URL under point")
(url-retrieve url #'eww-download-callback (list url)))))
(let ((dir (if (stringp eww-download-directory)
eww-download-directory
(funcall eww-download-directory))))
(access-file dir "Download failed")
(let ((url (or (get-text-property (point) 'shr-url)
(eww-current-url))))
(if (not url)
(message "No URL under point")
(url-retrieve url #'eww-download-callback (list url dir))))))
(defun eww-download-callback (status url)
(defun eww-download-callback (status url dir)
(unless (plist-get status :error)
(let* ((obj (url-generic-parse-url url))
(path (directory-file-name (car (url-path-and-query obj))))
(file (eww-make-unique-file-name
(eww-decode-url-file-name (file-name-nondirectory path))
eww-download-directory)))
dir)))
(goto-char (point-min))
(re-search-forward "\r?\n\r?\n")
(let ((coding-system-for-write 'no-conversion))

View file

@ -29,6 +29,7 @@
;;; Code:
(require 'cl-lib)
(autoload 'mail-header-parse-content-type "mail-parse")
(defgroup mailcap nil
@ -337,6 +338,10 @@ is a string or list of strings, it represents a shell command to run
to return a true or false shell value for the validity.")
(put 'mailcap-mime-data 'risky-local-variable t)
(defvar mailcap--computed-mime-data nil
"Computed version of the mailcap data incorporating all sources.
Same format as `mailcap-mime-data'.")
(defcustom mailcap-download-directory nil
"Directory to which `mailcap-save-binary-file' downloads files by default.
nil means your home directory."
@ -422,7 +427,13 @@ MAILCAPS if set; otherwise (on Unix) use the path from RFC 1524, plus
(when (or (not mailcap-parsed-p)
force)
;; Clear out all old data.
(setq mailcap-mime-data nil)
(setq mailcap--computed-mime-data nil)
;; Add the Emacs-distributed defaults (which will be used as
;; fallbacks). Do it this way instead of just copying the list,
;; since entries are destructively modified.
(cl-loop for (major . minors) in mailcap-mime-data
do (cl-loop for (minor . entry) in minors
do (mailcap-add-mailcap-entry major minor entry)))
(cond
(path nil)
((getenv "MAILCAPS")
@ -709,10 +720,13 @@ to supply to the test."
(push (list otest result) mailcap-viewer-test-cache)
result))))
(defun mailcap-add-mailcap-entry (major minor info)
(let ((old-major (assoc major mailcap-mime-data)))
(defun mailcap-add-mailcap-entry (major minor info &optional storage)
(let* ((storage (or storage 'mailcap--computed-mime-data))
(old-major (assoc major (symbol-value storage))))
(if (null old-major) ; New major area
(push (cons major (list (cons minor info))) mailcap-mime-data)
(set storage
(cons (cons major (list (cons minor info)))
(symbol-value storage)))
(let ((cur-minor (assoc minor old-major)))
(cond
((or (null cur-minor) ; New minor area, or
@ -736,11 +750,15 @@ If TEST is not given, it defaults to t."
(when (or (not (car tl))
(not (cadr tl)))
(error "%s is not a valid MIME type" type))
(mailcap-add-mailcap-entry
(car tl) (cadr tl)
`((viewer . ,viewer)
(test . ,(if test test t))
(type . ,type)))))
(let ((entry
`((viewer . ,viewer)
(test . ,(if test test t))
(type . ,type))))
;; Store it.
(mailcap-add-mailcap-entry (car tl) (cadr tl) entry
'mailcap-user-mime-data)
;; Make it available for usage.
(mailcap-add-mailcap-entry (car tl) (cadr tl) entry))))
;;;
;;; The main whabbo
@ -791,13 +809,13 @@ If NO-DECODE is non-nil, don't decode STRING."
;; NO-DECODE avoids calling `mail-header-parse-content-type' from
;; `mail-parse.el'
(let (
major ; Major encoding (text, etc)
minor ; Minor encoding (html, etc)
info ; Other info
major-info ; (assoc major mailcap-mime-data)
viewers ; Possible viewers
passed ; Viewers that passed the test
viewer ; The one and only viewer
major ; Major encoding (text, etc)
minor ; Minor encoding (html, etc)
info ; Other info
major-info ; (assoc major mailcap--computed-mime-data)
viewers ; Possible viewers
passed ; Viewers that passed the test
viewer ; The one and only viewer
ctl)
(save-excursion
(setq ctl
@ -809,12 +827,12 @@ If NO-DECODE is non-nil, don't decode STRING."
(if viewer
(setq passed (list viewer))
;; None found, so heuristically select some applicable viewer
;; from `mailcap-mime-data'.
;; from `mailcap--computed-mime-data'.
(mailcap-parse-mailcaps nil t)
(setq major (split-string (car ctl) "/"))
(setq minor (cadr major)
major (car major))
(when (setq major-info (cdr (assoc major mailcap-mime-data)))
(when (setq major-info (cdr (assoc major mailcap--computed-mime-data)))
(when (setq viewers (mailcap-possible-viewers major-info minor))
(setq info (mapcar (lambda (a)
(cons (symbol-name (car a)) (cdr a)))
@ -847,7 +865,7 @@ If NO-DECODE is non-nil, don't decode STRING."
((eq request 'all)
passed)
(t
;; MUST make a copy *sigh*, else we modify mailcap-mime-data
;; MUST make a copy *sigh*, else we modify mailcap--computed-mime-data
(setq viewer (copy-sequence viewer))
(let ((view (assq 'viewer viewer))
(test (assq 'test viewer)))
@ -1057,7 +1075,7 @@ For instance, \"foo.png\" will result in \"image/png\"."
(nconc
(mapcar 'cdr mailcap-mime-extensions)
(let (res type)
(dolist (data mailcap-mime-data)
(dolist (data mailcap--computed-mime-data)
(dolist (info (cdr data))
(setq type (cdr (assq 'type (cdr info))))
(unless (string-match-p "\\*" type)
@ -1117,7 +1135,7 @@ For instance, \"foo.png\" will result in \"image/png\"."
(defun mailcap-view-mime (type)
"View the data in the current buffer that has MIME type TYPE.
`mailcap-mime-data' determines the method to use."
`mailcap--computed-mime-data' determines the method to use."
(let ((method (mailcap-mime-info type)))
(if (stringp method)
(shell-command-on-region (point-min) (point-max)

View file

@ -149,7 +149,7 @@ rejecting one login and prompting again for a username and password.")
((string-match "passw" string)
(telnet-filter proc string)
(setq telnet-count 0)
(process-send-string proc (concat (comint-read-noecho "Password: " t)
(process-send-string proc (concat (read-passwd "Password: ")
telnet-new-line))
(clear-this-command-keys))
(t (telnet-check-software-type-initialize string)

View file

@ -35,6 +35,8 @@
(require 'tramp)
(defvar process-file-return-signal-string)
;;;###tramp-autoload
(defcustom tramp-adb-program "adb"
"Name of the Android Debug Bridge program."
@ -741,6 +743,33 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
filename newname ok-if-already-exists 'keep-time 'preserve-uid-gid)
(delete-file filename)))))))
(defun tramp-adb-get-signal-strings (vec)
"Strings to return by `process-file' in case of signals."
(with-tramp-connection-property vec "signal-strings"
(let ((default-directory (tramp-make-tramp-file-name vec 'localname))
;; `shell-file-name' and `shell-command-switch' are needed
;; for Emacs < 27.1, which doesn't support connection-local
;; variables in `shell-command'.
(shell-file-name "/system/bin/sh")
(shell-command-switch "-c")
process-file-return-signal-string signals result)
(dotimes (i 128) (push (format "Signal %d" i) result))
(setq result (reverse result)
signals (split-string
(shell-command-to-string "COLUMNS=40 kill -l") "\n" 'omit))
(setcar result 0)
(dolist (line signals)
(when (string-match
(concat
"^[[:space:]]*\\([[:digit:]]+\\)"
"[[:space:]]+\\S-+[[:space:]]+"
"\\([[:alpha:]].*\\)$")
line)
(setcar
(nthcdr (string-to-number (match-string 1 line)) result)
(match-string 2 line))))
result)))
(defun tramp-adb-handle-process-file
(program &optional infile destination display &rest args)
"Like `process-file' for Tramp files."
@ -833,7 +862,7 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
;; since Emacs 28.1.
(when (and (bound-and-true-p process-file-return-signal-string)
(natnump ret) (> ret 128))
(setq ret (nth (- ret 128) (tramp-get-signal-strings))))
(setq ret (nth (- ret 128) (tramp-adb-get-signal-strings v))))
;; Provide error file.
(when tmpstderr (rename-file tmpstderr (cadr destination) t))

View file

@ -36,6 +36,7 @@
(declare-function dired-remove-file "dired-aux")
(defvar dired-compress-file-suffixes)
(defvar process-file-return-signal-string)
(defvar vc-handled-backends)
(defvar vc-bzr-program)
(defvar vc-git-program)
@ -3009,6 +3010,61 @@ STDERR can also be a file name."
(tramp-flush-connection-property v "process-name")
(tramp-flush-connection-property v "process-buffer"))))))))
(defun tramp-sh-get-signal-strings (vec)
"Strings to return by `process-file' in case of signals."
(with-tramp-connection-property
vec
(concat
"signal-strings-" (tramp-get-method-parameter vec 'tramp-remote-shell))
(let ((default-directory (tramp-make-tramp-file-name vec 'localname))
process-file-return-signal-string signals res result)
(setq signals
(append
'(0) (split-string (shell-command-to-string "kill -l") nil 'omit)))
;; Sanity check. "kill -l" shall have returned just the signal
;; names. Some shells don't, like the one in "docker alpine".
(let (signal-hook-function)
(condition-case nil
(dolist (sig (cdr signals))
(unless (string-match-p "^[[:alnum:]+-]+$" sig)
(error nil)))
(error (setq signals '(0)))))
(dotimes (i 128)
(push
(cond
;; Some predefined values, which aren't reported sometimes,
;; or would raise problems (all Stopped signals).
((= i 0) 0)
((string-equal (nth i signals) "HUP") "Hangup")
((string-equal (nth i signals) "INT") "Interrupt")
((string-equal (nth i signals) "QUIT") "Quit")
((string-equal (nth i signals) "STOP") "Stopped (signal)")
((string-equal (nth i signals) "TSTP") "Stopped")
((string-equal (nth i signals) "TTIN") "Stopped (tty input)")
((string-equal (nth i signals) "TTOU") "Stopped (tty output)")
(t (setq res
(if (null (nth i signals))
""
(tramp-send-command
vec
(format
"%s %s %s"
(tramp-get-method-parameter vec 'tramp-remote-shell)
(mapconcat
#'identity
(tramp-get-method-parameter vec 'tramp-remote-shell-args)
" ")
(tramp-shell-quote-argument (format "kill -%d $$" i))))
(with-current-buffer (tramp-get-connection-buffer vec)
(goto-char (point-min))
(buffer-substring (point-at-bol) (point-at-eol)))))
(if (string-equal res "")
(format "Signal %d" i)
res)))
result))
;; Due to Bug#41287, we cannot add this to the `dotimes' clause.
(reverse result))))
(defun tramp-sh-handle-process-file
(program &optional infile destination display &rest args)
"Like `process-file' for Tramp files."
@ -3126,7 +3182,7 @@ STDERR can also be a file name."
;; since Emacs 28.1.
(when (and (bound-and-true-p process-file-return-signal-string)
(natnump ret) (>= ret 128))
(setq ret (nth (- ret 128) (tramp-get-signal-strings))))
(setq ret (nth (- ret 128) (tramp-sh-get-signal-strings v))))
;; Provide error file.
(when tmpstderr (rename-file tmpstderr (cadr destination) t))
@ -4004,22 +4060,28 @@ whether it exists and if so, it is added to the environment
variable PATH."
(let ((command
(format
"PATH=%s; export PATH" (string-join (tramp-get-remote-path vec) ":")))
"PATH=%s && export PATH" (string-join (tramp-get-remote-path vec) ":")))
(pipe-buf
(with-tramp-connection-property vec "pipe-buf"
(tramp-send-command-and-read
vec "getconf PIPE_BUF / 2>/dev/null || echo 4096" 'noerror)))
tmpfile)
tmpfile chunk chunksize)
(tramp-message vec 5 "Setting $PATH environment variable")
(if (< (length command) pipe-buf)
(tramp-send-command vec command)
;; Use a temporary file.
(setq tmpfile (tramp-make-tramp-temp-file vec))
(tramp-send-command vec (format
"cat >%s <<'%s'\n%s\n%s"
(tramp-shell-quote-argument tmpfile)
tramp-end-of-heredoc
command tramp-end-of-heredoc))
;; Use a temporary file. We cannot use `write-region' because
;; setting the remote path happens in the early connection
;; handshake, and not all external tools are determined yet.
(setq command (concat command "\n")
tmpfile (tramp-make-tramp-temp-file vec))
(while (not (string-empty-p command))
(setq chunksize (min (length command) (/ pipe-buf 2))
chunk (substring command 0 chunksize)
command (substring command chunksize))
(tramp-send-command vec (format
"printf \"%%b\" \"$*\" %s >>%s"
(tramp-shell-quote-argument chunk)
(tramp-shell-quote-argument tmpfile))))
(tramp-send-command vec (format ". %s" tmpfile))
(tramp-send-command vec (format "rm -f %s" tmpfile)))))
@ -4093,79 +4155,53 @@ file exists and nonzero exit status otherwise."
(defun tramp-open-shell (vec shell)
"Open shell SHELL."
;; Find arguments for this shell.
(with-tramp-progress-reporter
vec 5 (format-message "Opening remote shell `%s'" shell)
;; Find arguments for this shell.
(let ((extra-args (tramp-get-sh-extra-args shell))
(p (tramp-get-connection-process vec)))
;; The readline library can disturb Tramp. For example, the
;; very recent version of libedit, the *BSD implementation of
;; readline, confuses Tramp. So we disable line editing. Since
;; $EDITRC is not supported on all target systems, we must move
;; ~/.editrc temporarily somewhere else. For bash and zsh we
;; have disabled this already during shell invocation, see
;; `tramp-sh-extra-args' (Bug#39399).
;; The shell prompt might not be set yet, so we must read any
;; prompt via `tramp-barf-if-no-shell-prompt'.
(unless extra-args
(tramp-send-command vec "rm -f ~/.editrc.tramp" t t)
(tramp-barf-if-no-shell-prompt p 10 "Couldn't find remote shell prompt")
(tramp-send-command
vec "test -e ~/.editrc && mv -f ~/.editrc ~/.editrc.tramp" t t)
(tramp-barf-if-no-shell-prompt p 10 "Couldn't find remote shell prompt")
(tramp-send-command vec "echo 'edit off' >~/.editrc" t t)
(tramp-barf-if-no-shell-prompt
p 10 "Couldn't find remote shell prompt"))
;; It is useful to set the prompt in the following command
;; because some people have a setting for $PS1 which /bin/sh
;; doesn't know about and thus /bin/sh will display a strange
;; prompt. For example, if $PS1 has "${CWD}" in the value, then
;; ksh will display the current working directory but /bin/sh
;; will display a dollar sign. The following command line sets
;; $PS1 to a sane value, and works under Bourne-ish shells as
;; well as csh-like shells. We also unset the variable $ENV
;; because that is read by some sh implementations (eg, bash
;; when called as sh) on startup; this way, we avoid the startup
;; file clobbering $PS1. $PROMPT_COMMAND is another way to set
;; the prompt in /bin/bash, it must be discarded as well.
;; $HISTFILE is set according to `tramp-histfile-override'.
;; $TERM and $INSIDE_EMACS set here to ensure they have the
;; correct values when the shell starts, not just processes
;; run within the shell. (Which processes include our
;; initial probes to ensure the remote shell is usable.)
(tramp-send-command
vec (format
(concat
"exec env TERM='%s' INSIDE_EMACS='%s,tramp:%s' "
"ENV=%s %s PROMPT_COMMAND='' PS1=%s PS2='' PS3='' %s %s")
tramp-terminal-type
(or (getenv "INSIDE_EMACS") emacs-version) tramp-version
(or (getenv-internal "ENV" tramp-remote-process-environment) "")
(if (stringp tramp-histfile-override)
(format "HISTFILE=%s"
(tramp-shell-quote-argument tramp-histfile-override))
(if tramp-histfile-override
"HISTFILE='' HISTFILESIZE=0 HISTSIZE=0"
""))
(tramp-shell-quote-argument tramp-end-of-output)
shell (or extra-args ""))
t)
;; Reset ~/.editrc.
(unless extra-args
(tramp-send-command vec "rm -f ~/.editrc" t)
(tramp-send-command
vec "test -e ~/.editrc.tramp && mv -f ~/.editrc.tramp ~/.editrc" t))
;; Check proper HISTFILE setting. We give up when not working.
(when (and (stringp tramp-histfile-override)
(file-name-directory tramp-histfile-override))
(tramp-barf-unless-okay
vec
(format
"(cd %s)"
(tramp-shell-quote-argument
(file-name-directory tramp-histfile-override)))
"`tramp-histfile-override' uses invalid file `%s'"
tramp-histfile-override)))
;; It is useful to set the prompt in the following command because
;; some people have a setting for $PS1 which /bin/sh doesn't know
;; about and thus /bin/sh will display a strange prompt. For
;; example, if $PS1 has "${CWD}" in the value, then ksh will
;; display the current working directory but /bin/sh will display
;; a dollar sign. The following command line sets $PS1 to a sane
;; value, and works under Bourne-ish shells as well as csh-like
;; shells. We also unset the variable $ENV because that is read
;; by some sh implementations (eg, bash when called as sh) on
;; startup; this way, we avoid the startup file clobbering $PS1.
;; $PROMPT_COMMAND is another way to set the prompt in /bin/bash,
;; it must be discarded as well. $HISTFILE is set according to
;; `tramp-histfile-override'. $TERM and $INSIDE_EMACS set here to
;; ensure they have the correct values when the shell starts, not
;; just processes run within the shell. (Which processes include
;; our initial probes to ensure the remote shell is usable.)
(tramp-send-command
vec (format
(concat
"exec env TERM='%s' INSIDE_EMACS='%s,tramp:%s' "
"ENV=%s %s PROMPT_COMMAND='' PS1=%s PS2='' PS3='' %s %s")
tramp-terminal-type
(or (getenv "INSIDE_EMACS") emacs-version) tramp-version
(or (getenv-internal "ENV" tramp-remote-process-environment) "")
(if (stringp tramp-histfile-override)
(format "HISTFILE=%s"
(tramp-shell-quote-argument tramp-histfile-override))
(if tramp-histfile-override
"HISTFILE='' HISTFILESIZE=0 HISTSIZE=0"
""))
(tramp-shell-quote-argument tramp-end-of-output)
shell (or (tramp-get-sh-extra-args shell) ""))
t)
;; Check proper HISTFILE setting. We give up when not working.
(when (and (stringp tramp-histfile-override)
(file-name-directory tramp-histfile-override))
(tramp-barf-unless-okay
vec
(format
"(cd %s)"
(tramp-shell-quote-argument
(file-name-directory tramp-histfile-override)))
"`tramp-histfile-override' uses invalid file `%s'"
tramp-histfile-override))
(tramp-set-connection-property
(tramp-get-connection-process vec) "remote-shell" shell)))
@ -4236,9 +4272,16 @@ process to set up. VEC specifies the connection."
(let ((tramp-end-of-output tramp-initial-end-of-output)
(case-fold-search t))
(tramp-open-shell vec (tramp-get-method-parameter vec 'tramp-remote-shell))
(tramp-message vec 5 "Setting up remote shell environment")
;; Disable line editing.
(tramp-send-command vec "set +o vi +o emacs" t)
;; Dump option settings in the traces.
(when (>= tramp-verbose 9)
(tramp-send-command vec "set -o" t))
;; Disable echo expansion.
(tramp-message vec 5 "Setting up remote shell environment")
(tramp-send-command
vec "stty -inlcr -onlcr -echo kill '^U' erase '^H'" t)
;; Check whether the echo has really been disabled. Some
@ -4312,8 +4355,6 @@ process to set up. VEC specifies the connection."
(tramp-message
vec 5 "Setting coding system to `%s' and `%s'" cs-decode cs-encode)))
(tramp-send-command vec "set +o vi +o emacs" t)
;; Check whether the remote host suffers from buggy
;; `send-process-string'. This is known for FreeBSD (see comment
;; in `send_process', file process.c). I've tested sending 624

View file

@ -5108,23 +5108,6 @@ name of a process or buffer, or nil to default to the current buffer."
(lambda ()
(remove-hook 'interrupt-process-functions #'tramp-interrupt-process))))
(defun tramp-get-signal-strings ()
"Strings to return by `process-file' in case of signals."
;; We use key nil for local connection properties.
(with-tramp-connection-property nil "signal-strings"
(let (result)
(if (and (stringp shell-file-name) (executable-find shell-file-name))
(dotimes (i 128)
(push
(if (= i 19) 1 ;; SIGSTOP
(call-process
shell-file-name nil nil nil "-c" (format "kill -%d $$" i)))
result))
(dotimes (i 128)
(push (format "Signal %d" i) result)))
;; Due to Bug#41287, we cannot add this to the `dotimes' clause.
(reverse result))))
;; Checklist for `tramp-unload-hook'
;; - Unload all `tramp-*' packages
;; - Reset `file-name-handler-alist'

View file

@ -279,10 +279,10 @@ Blank lines separate paragraphs. Semicolons start comments.
(append '((?\` . ?\') (?\ . ?\))
electric-pair-text-pairs))
(add-hook 'electric-pair-mode-hook #'emacs-lisp-set-electric-text-pairs))
(add-hook 'eldoc-documentation-functions
#'elisp-eldoc-var-docstring nil t)
(add-hook 'eldoc-documentation-functions
#'elisp-eldoc-funcall nil t)
(add-hook 'eldoc-documentation-functions
#'elisp-eldoc-var-docstring nil t)
(add-hook 'xref-backend-functions #'elisp--xref-backend nil t)
(setq-local project-vc-external-roots-function #'elisp-load-path-roots)
(add-hook 'completion-at-point-functions

View file

@ -568,6 +568,13 @@ DIRS must contain directory names."
;; Sidestep the issue of expanded/abbreviated file names here.
(cl-set-difference files dirs :test #'file-in-directory-p))
(defun project--value-in-dir (var dir)
(with-temp-buffer
(setq default-directory dir)
(let ((enable-local-variables :all))
(hack-dir-local-variables-non-file-buffer))
(symbol-value var)))
;;; Project commands
@ -592,12 +599,73 @@ DIRS must contain directory names."
;;;###autoload (define-key ctl-x-map "p" project-prefix-map)
(defun project--value-in-dir (var dir)
(with-temp-buffer
(setq default-directory dir)
(let ((enable-local-variables :all))
(hack-dir-local-variables-non-file-buffer))
(symbol-value var)))
;; We can't have these place-specific maps inherit from
;; project-prefix-map because project--other-place-command needs to
;; know which map the key binding came from, as if it came from one of
;; these maps, we don't want to set display-buffer-overriding-action
(defvar project-other-window-map
(let ((map (make-sparse-keymap)))
(define-key map "\C-o" #'project-display-buffer)
map)
"Keymap for project commands that display buffers in other windows.")
(defvar project-other-frame-map
(let ((map (make-sparse-keymap)))
(define-key map "\C-o" #'project-display-buffer-other-frame)
map)
"Keymap for project commands that display buffers in other frames.")
(defun project--other-place-command (action &optional map)
(let* ((key (read-key-sequence-vector nil t))
(place-cmd (lookup-key map key))
(generic-cmd (lookup-key project-prefix-map key))
(switch-to-buffer-obey-display-actions t)
(display-buffer-overriding-action (unless place-cmd action)))
(if-let ((cmd (or place-cmd generic-cmd)))
(call-interactively cmd)
(user-error "%s is undefined" (key-description key)))))
;;;###autoload
(defun project-other-window-command ()
"Run project command, displaying resultant buffer in another window.
The following commands are available:
\\{project-prefix-map}
\\{project-other-window-map}"
(interactive)
(project--other-place-command '((display-buffer-pop-up-window)
(inhibit-same-window . t))
project-other-window-map))
;;;###autoload (define-key ctl-x-4-map "p" #'project-other-window-command)
;;;###autoload
(defun project-other-frame-command ()
"Run project command, displaying resultant buffer in another frame.
The following commands are available:
\\{project-prefix-map}
\\{project-other-frame-map}"
(interactive)
(project--other-place-command '((display-buffer-pop-up-frame))
project-other-frame-map))
;;;###autoload (define-key ctl-x-5-map "p" #'project-other-frame-command)
;;;###autoload
(defun project-other-tab-command ()
"Run project command, displaying resultant buffer in a new tab.
The following commands are available:
\\{project-prefix-map}"
(interactive)
(project--other-place-command '((display-buffer-in-new-tab))))
;;;###autoload (define-key tab-prefix-map "p" #'project-other-tab-command)
(declare-function grep-read-files "grep")
(declare-function xref--show-xrefs "xref")
@ -877,14 +945,7 @@ Arguments the same as in `compile'."
(default-directory (project-root pr)))
(compile command comint)))
;;;###autoload
(defun project-switch-to-buffer ()
"Switch to another buffer belonging to the current project.
This function prompts for another buffer, offering as candidates
buffers that belong to the same project as the current buffer.
Two buffers belong to the same project if their project instances,
as reported by `project-current' in each buffer, are identical."
(interactive)
(defun project--read-project-buffer ()
(let* ((pr (project-current t))
(current-buffer (current-buffer))
(other-buffer (other-buffer current-buffer))
@ -896,24 +957,95 @@ as reported by `project-current' in each buffer, are identical."
(equal pr
(with-current-buffer (cdr buffer)
(project-current)))))))
(switch-to-buffer
(read-buffer
"Switch to buffer: "
(when (funcall predicate (cons other-name other-buffer))
other-name)
nil
predicate))))
(read-buffer
"Switch to buffer: "
(when (funcall predicate (cons other-name other-buffer))
other-name)
nil
predicate)))
(defcustom project-kill-buffers-ignores
'("\\*Help\\*")
"Conditions for buffers `project-kill-buffers' should not kill.
Each condition is either a regular expression matching a buffer
name, or a predicate function that takes a buffer object as
argument and returns non-nil if it matches. Buffers that match
any of the conditions will not be killed."
:type '(repeat (choice regexp function))
;;;###autoload
(defun project-switch-to-buffer (buffer-or-name)
"Display buffer BUFFER-OR-NAME in the selected window.
When called interactively, prompts for a buffer belonging to the
current project. Two buffers belong to the same project if their
project instances, as reported by `project-current' in each
buffer, are identical."
(interactive (list (project--read-project-buffer)))
(switch-to-buffer buffer-or-name))
;;;###autoload
(defun project-display-buffer (buffer-or-name)
"Display BUFFER-OR-NAME in some window, without selecting it.
When called interactively, prompts for a buffer belonging to the
current project. Two buffers belong to the same project if their
project instances, as reported by `project-current' in each
buffer, are identical.
This function uses `display-buffer' as a subroutine, which see
for how it is determined where the buffer will be displayed."
(interactive (list (project--read-project-buffer)))
(display-buffer buffer-or-name))
;;;###autoload
(defun project-display-buffer-other-frame (buffer-or-name)
"Display BUFFER-OR-NAME preferably in another frame.
When called interactively, prompts for a buffer belonging to the
current project. Two buffers belong to the same project if their
project instances, as reported by `project-current' in each
buffer, are identical.
This function uses `display-buffer-other-frame' as a subroutine,
which see for how it is determined where the buffer will be
displayed."
(interactive (list (project--read-project-buffer)))
(display-buffer-other-frame buffer-or-name))
(defcustom project-kill-buffer-conditions
'(buffer-file-name ; All file-visiting buffers are included.
;; Most of the temp buffers in the background:
(major-mode . fundamental-mode)
;; non-text buffer such as xref, occur, vc, log, ...
(and (derived-mode . special-mode)
(not (major-mode . help-mode)))
(derived-mode . compilation-mode)
(derived-mode . dired-mode)
(derived-mode . diff-mode))
"List of conditions to kill buffers related to a project.
This list is used by `project-kill-buffers'.
Each condition is either:
- a regular expression, to match a buffer name,
- a predicate function that takes a buffer object as argument
and returns non-nil if the buffer should be killed,
- a cons-cell, where the car describes how to interpret the cdr.
The car can be one of the following:
* `major-mode': the buffer is killed if the buffer's major
mode is eq to the cons-cell's cdr
* `defived-mode': the buffer is killed if the buffer's major
mode is derived from the major mode denoted by the cons-cell's
cdr
* `not': the cdr is interpreted as a negation of a condition.
* `and': the cdr is a list of recursive conditions, that all have
to be met.
* `or': the cdr is a list of recursive conditions, of which at
least one has to be met.
If any of these conditions are satified for a buffer in the
current project, it will be killed."
:type '(repeat (choice regexp function symbol
(cons :tag "Major mode"
(const major-mode) symbol)
(cons :tag "Derived mode"
(const derived-mode) symbol)
(cons :tag "Negation"
(const not) sexp)
(cons :tag "Conjunction"
(const and) sexp)
(cons :tag "Disjunction"
(const or) sexp)))
:version "28.1"
:package-version '(project . "0.5.0"))
:group 'project
:package-version '(project . "0.6.0"))
(defun project--buffer-list (pr)
"Return the list of all buffers in project PR."
@ -925,26 +1057,66 @@ any of the conditions will not be killed."
(push buf bufs)))
(nreverse bufs)))
;;;###autoload
(defun project-kill-buffers ()
"Kill all live buffers belonging to the current project.
Two buffers belong to the same project if their project instances,
as reported by `project-current' in each buffer, are identical.
Certain buffers may be \"spared\", see `project-kill-buffers-ignores'."
(interactive)
(let ((pr (project-current t)) bufs)
(defun project--kill-buffer-check (buf conditions)
"Check if buffer BUF matches any element of the list CONDITIONS.
See `project-kill-buffer-conditions' for more details on the form
of CONDITIONS."
(catch 'kill
(dolist (c conditions)
(when (cond
((stringp c)
(string-match-p c (buffer-name buf)))
((symbolp c)
(funcall c buf))
((eq (car-safe c) 'major-mode)
(eq (buffer-local-value 'major-mode buf)
(cdr c)))
((eq (car-safe c) 'derived-mode)
(provided-mode-derived-p
(buffer-local-value 'major-mode buf)
(cdr c)))
((eq (car-safe c) 'not)
(not (project--kill-buffer-check buf (cdr c))))
((eq (car-safe c) 'or)
(project--kill-buffer-check buf (cdr c)))
((eq (car-safe c) 'and)
(seq-every-p
(apply-partially #'project--kill-buffer-check
buf)
(mapcar #'list (cdr c)))))
(throw 'kill t)))))
(defun project--buffers-to-kill (pr)
"Return list of buffers in project PR to kill.
What buffers should or should not be killed is described
in `project-kill-buffer-conditions'."
(let (bufs)
(dolist (buf (project--buffer-list pr))
(unless (seq-some
(lambda (c)
(cond ((stringp c)
(string-match-p c (buffer-name buf)))
((functionp c)
(funcall c buf))))
project-kill-buffers-ignores)
(when (project--kill-buffer-check buf project-kill-buffer-conditions)
(push buf bufs)))
(when (yes-or-no-p (format "Kill %d buffers in %s? "
(length bufs) (project-root pr)))
(mapc #'kill-buffer bufs))))
bufs))
;;;###autoload
(defun project-kill-buffers (&optional no-confirm)
"Kill the buffers belonging to the current project.
Two buffers belong to the same project if their project
instances, as reported by `project-current' in each buffer, are
identical. Only the buffers that match a condition in
`project-kill-buffer-conditions' will be killed. If NO-CONFIRM
is non-nil, the command will not ask the user for confirmation.
NO-CONFIRM is always nil when the command is invoked
interactivly."
(interactive)
(let* ((pr (project-current t))
(bufs (project--buffers-to-kill pr)))
(cond (no-confirm
(mapc #'kill-buffer bufs))
((null bufs)
(message "No buffers to kill"))
((yes-or-no-p (format "Kill %d buffers in %s? "
(length bufs)
(project-root pr)))
(mapc #'kill-buffer bufs)))))
;;; Project list

View file

@ -898,8 +898,9 @@ This is the same format used for saving keyboard macros (see
For an approximate inverse of this, see `key-description'."
;; Don't use a defalias, since the `pure' property is true only for
;; the calling convention of `kbd'.
(read-kbd-macro keys))
(put 'kbd 'pure t)
(declare (pure t))
;; A pure function is expected to preserve the match data.
(save-match-data (read-kbd-macro keys)))
(defun undefined ()
"Beep to tell the user this binding is undefined."

View file

@ -51,6 +51,9 @@
;; The main keymap
(define-obsolete-variable-alias 'vc-log-mode-map 'log-edit-mode-map "28.1")
(define-obsolete-variable-alias 'vc-log-entry-mode 'log-edit-mode-map "28.1")
(easy-mmode-defmap log-edit-mode-map
'(("\C-c\C-c" . log-edit-done)
("\C-c\C-a" . log-edit-insert-changelog)
@ -67,10 +70,6 @@
"Keymap for the `log-edit-mode' (to edit version control log messages)."
:group 'log-edit)
;; Compatibility with old names. Should we bother ?
(defvar vc-log-mode-map log-edit-mode-map)
(defvar vc-log-entry-mode vc-log-mode-map)
(easy-menu-define log-edit-menu log-edit-mode-map
"Menu used for `log-edit-mode'."
'("Log-Edit"

View file

@ -1266,7 +1266,7 @@ log entries."
("^Merge: \\([0-9a-z]+\\) \\([0-9a-z]+\\)"
(1 'change-log-acknowledgment)
(2 'change-log-acknowledgment))
("^Date: \\(.+\\)" (1 'change-log-date))
("^\\(?:Date: \\|AuthorDate: \\)\\(.+\\)" (1 'change-log-date))
("^summary:[ \t]+\\(.+\\)" (1 'log-view-message)))))))

View file

@ -1,4 +1,4 @@
# alloca.m4 serial 15
# alloca.m4 serial 16
dnl Copyright (C) 2002-2004, 2006-2007, 2009-2020 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
@ -51,12 +51,9 @@ AC_DEFUN([gl_FUNC_ALLOCA],
AC_DEFUN([gl_PREREQ_ALLOCA], [:])
# This works around a bug in autoconf <= 2.68.
# See <https://lists.gnu.org/r/bug-gnulib/2011-06/msg00277.html>.
m4_version_prereq([2.69], [] ,[
# This is taken from the following Autoconf patch:
# https://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=6cd9f12520b0d6f76d3230d7565feba1ecf29497
# See <https://lists.gnu.org/r/bug-gnulib/2011-06/msg00277.html> and
# <https://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=6cd9f12520b0d6f76d3230d7565feba1ecf29497>.
# Also it has a simplification that is not yet in Autoconf.
# _AC_LIBOBJ_ALLOCA
# -----------------
@ -72,26 +69,6 @@ AC_LIBSOURCES(alloca.c)
AC_SUBST([ALLOCA], [\${LIBOBJDIR}alloca.$ac_objext])dnl
AC_DEFINE(C_ALLOCA, 1, [Define to 1 if using 'alloca.c'.])
AC_CACHE_CHECK(whether 'alloca.c' needs Cray hooks, ac_cv_os_cray,
[AC_EGREP_CPP(webecray,
[#if defined CRAY && ! defined CRAY2
webecray
#else
wenotbecray
#endif
], ac_cv_os_cray=yes, ac_cv_os_cray=no)])
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
AC_CHECK_FUNC($ac_func,
[AC_DEFINE_UNQUOTED(CRAY_STACKSEG_END, $ac_func,
[Define to one of '_getb67', 'GETB67',
'getb67' for Cray-2 and Cray-YMP
systems. This function is required for
'alloca.c' support on those systems.])
break])
done
fi
AC_CACHE_CHECK([stack direction for C alloca],
[ac_cv_c_stack_direction],
[AC_RUN_IFELSE([AC_LANG_SOURCE(
@ -124,5 +101,4 @@ AH_VERBATIM([STACK_DIRECTION],
STACK_DIRECTION = 0 => direction of growth unknown */
@%:@undef STACK_DIRECTION])dnl
AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction)
])# _AC_LIBOBJ_ALLOCA
])

View file

@ -1,4 +1,4 @@
# serial 23
# serial 24
dnl From Jim Meyering.
dnl A wrapper around AC_FUNC_GETGROUPS.
@ -79,7 +79,8 @@ AC_DEFUN([gl_FUNC_GETGROUPS],
AC_DEFINE([GETGROUPS_ZERO_BUG], [1], [Define this to 1 if
getgroups(0,NULL) does not return the number of groups.])
else
dnl Detect FreeBSD bug; POSIX requires getgroups(-1,ptr) to fail.
dnl Detect Mac OS X and FreeBSD bug; POSIX requires getgroups(-1,ptr)
dnl to fail.
AC_CACHE_CHECK([whether getgroups handles negative values],
[gl_cv_func_getgroups_works],
[AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],

View file

@ -1,4 +1,4 @@
# serial 27
# serial 28
# Copyright (C) 2001-2003, 2005, 2007, 2009-2020 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
@ -19,7 +19,6 @@ AC_DEFUN([gl_FUNC_GETTIMEOFDAY],
if test $ac_cv_func_gettimeofday != yes; then
HAVE_GETTIMEOFDAY=0
else
gl_FUNC_GETTIMEOFDAY_CLOBBER
AC_CACHE_CHECK([for gettimeofday with POSIX signature],
[gl_cv_func_gettimeofday_posix_signature],
[AC_COMPILE_IFELSE(
@ -66,63 +65,5 @@ int gettimeofday (struct timeval *restrict, struct timezone *restrict);
declaration of the second argument to gettimeofday.])
])
dnl See if gettimeofday clobbers the static buffer that localtime uses
dnl for its return value. The gettimeofday function from Mac OS X 10.0.4
dnl (i.e., Darwin 1.3.7) has this problem.
dnl
dnl If it does, then arrange to use gettimeofday and localtime only via
dnl the wrapper functions that work around the problem.
AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER],
[
AC_REQUIRE([gl_HEADER_SYS_TIME_H])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_REQUIRE([gl_LOCALTIME_BUFFER_DEFAULTS])
AC_CACHE_CHECK([whether gettimeofday clobbers localtime buffer],
[gl_cv_func_gettimeofday_clobber],
[AC_RUN_IFELSE(
[AC_LANG_PROGRAM(
[[#include <string.h>
#include <sys/time.h>
#include <time.h>
#include <stdlib.h>
]],
[[
time_t t = 0;
struct tm *lt;
struct tm saved_lt;
struct timeval tv;
lt = localtime (&t);
saved_lt = *lt;
gettimeofday (&tv, NULL);
return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
]])],
[gl_cv_func_gettimeofday_clobber=no],
[gl_cv_func_gettimeofday_clobber=yes],
[# When cross-compiling:
case "$host_os" in
# Guess all is fine on glibc systems.
*-gnu* | gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
# Guess all is fine on musl systems.
*-musl*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
# Guess no on native Windows.
mingw*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
# If we don't know, obey --enable-cross-guesses.
*) gl_cv_func_gettimeofday_clobber="$gl_cross_guess_inverted" ;;
esac
])])
case "$gl_cv_func_gettimeofday_clobber" in
*yes)
REPLACE_GETTIMEOFDAY=1
AC_DEFINE([GETTIMEOFDAY_CLOBBERS_LOCALTIME], [1],
[Define if gettimeofday clobbers the localtime buffer.])
gl_LOCALTIME_BUFFER_NEEDED
;;
esac
])
# Prerequisites of lib/gettimeofday.c.
AC_DEFUN([gl_PREREQ_GETTIMEOFDAY], [:])

View file

@ -1,4 +1,4 @@
# gnulib-common.m4 serial 50
# gnulib-common.m4 serial 52
dnl Copyright (C) 2007-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -120,9 +120,14 @@ AC_DEFUN([gl_COMMON_BODY], [
#endif
/* Avoid __attribute__ ((cold)) on MinGW; see thread starting at
<https://lists.gnu.org/r/emacs-devel/2019-04/msg01152.html>. */
<https://lists.gnu.org/r/emacs-devel/2019-04/msg01152.html>.
Also, Oracle Studio 12.6 requires 'cold' not '__cold__'. */
#if _GL_HAS_ATTRIBUTE (cold) && !defined __MINGW32__
# define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__))
# ifndef __SUNPRO_C
# define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__))
# else
# define _GL_ATTRIBUTE_COLD __attribute__ ((cold))
# endif
#else
# define _GL_ATTRIBUTE_COLD
#endif
@ -176,7 +181,8 @@ AC_DEFUN([gl_COMMON_BODY], [
# define _GL_ATTRIBUTE_LEAF
#endif
#if _GL_HAS_ATTRIBUTE (may_alias)
/* Oracle Studio 12.6 mishandles may_alias despite __has_attribute OK. */
#if _GL_HAS_ATTRIBUTE (may_alias) && !defined __SUNPRO_C
# define _GL_ATTRIBUTE_MAY_ALIAS __attribute__ ((__may_alias__))
#else
# define _GL_ATTRIBUTE_MAY_ALIAS
@ -292,6 +298,20 @@ AC_DEFUN([gl_COMMON_BODY], [
that may clobber errno, it needs to save and restore the value of
errno. */
#define _GL_ASYNC_SAFE
])
AH_VERBATIM([micro_optimizations],
[/* _GL_CMP (n1, n2) performs a three-valued comparison on n1 vs. n2.
It returns
1 if n1 > n2
0 if n1 == n2
-1 if n1 < n2
The naïve code (n1 > n2 ? 1 : n1 < n2 ? -1 : 0) produces a conditional
jump with nearly all GCC versions up to GCC 10.
This variant (n1 < n2 ? -1 : n1 > n2) produces a conditional with many
GCC versions up to GCC 9.
The better code (n1 > n2) - (n1 < n2) from Hacker's Delight § 2-9
avoids conditional jumps in all GCC versions >= 3.4. */
#define _GL_CMP(n1, n2) (((n1) > (n2)) - ((n1) < (n2)))
])
dnl Hint which direction to take regarding cross-compilation guesses:
dnl When a user installs a program on a platform they are not intimately
@ -612,6 +632,15 @@ AC_DEFUN([gl_BIGENDIAN],
AC_C_BIGENDIAN
])
# gl_SILENT(command)
# executes command, but without the normal configure output.
AC_DEFUN([gl_SILENT],
[
{
$1
} AS_MESSAGE_FD>/dev/null
])
# gl_CACHE_VAL_SILENT(cache-id, command-to-set-it)
# is like AC_CACHE_VAL(cache-id, command-to-set-it), except that it does not
# output a spurious "(cached)" mark in the midst of other configure output.

View file

@ -120,7 +120,6 @@ AC_DEFUN([gl_EARLY],
# Code from module libc-config:
# Code from module libgmp:
# Code from module limits-h:
# Code from module localtime-buffer:
# Code from module lstat:
# Code from module malloca:
# Code from module manywarnings:
@ -508,7 +507,6 @@ AC_DEFUN([gl_INIT],
gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false
gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=false
gl_gnulib_enabled_lchmod=false
gl_gnulib_enabled_2049e887c7e5308faad27b3f894bb8c9=false
gl_gnulib_enabled_malloca=false
gl_gnulib_enabled_5264294aa0a5557541b53c8c741f7f31=false
gl_gnulib_enabled_open=false
@ -624,14 +622,6 @@ AC_DEFUN([gl_INIT],
gl_gnulib_enabled_lchmod=true
fi
}
func_gl_gnulib_m4code_2049e887c7e5308faad27b3f894bb8c9 ()
{
if ! $gl_gnulib_enabled_2049e887c7e5308faad27b3f894bb8c9; then
AC_REQUIRE([gl_LOCALTIME_BUFFER_DEFAULTS])
AC_LIBOBJ([localtime-buffer])
gl_gnulib_enabled_2049e887c7e5308faad27b3f894bb8c9=true
fi
}
func_gl_gnulib_m4code_malloca ()
{
if ! $gl_gnulib_enabled_malloca; then
@ -751,9 +741,6 @@ AC_DEFUN([gl_INIT],
if case $host_os in mingw*) false;; *) test $HAVE_GETRANDOM = 0 || test $REPLACE_GETRANDOM = 1;; esac; then
func_gl_gnulib_m4code_open
fi
if test $NEED_LOCALTIME_BUFFER = 1; then
func_gl_gnulib_m4code_2049e887c7e5308faad27b3f894bb8c9
fi
if test $HAVE_READLINKAT = 0; then
func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
fi
@ -785,7 +772,6 @@ AC_DEFUN([gl_INIT],
AM_CONDITIONAL([gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36], [$gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36])
AM_CONDITIONAL([gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1], [$gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1])
AM_CONDITIONAL([gl_GNULIB_ENABLED_lchmod], [$gl_gnulib_enabled_lchmod])
AM_CONDITIONAL([gl_GNULIB_ENABLED_2049e887c7e5308faad27b3f894bb8c9], [$gl_gnulib_enabled_2049e887c7e5308faad27b3f894bb8c9])
AM_CONDITIONAL([gl_GNULIB_ENABLED_malloca], [$gl_gnulib_enabled_malloca])
AM_CONDITIONAL([gl_GNULIB_ENABLED_5264294aa0a5557541b53c8c741f7f31], [$gl_gnulib_enabled_5264294aa0a5557541b53c8c741f7f31])
AM_CONDITIONAL([gl_GNULIB_ENABLED_open], [$gl_gnulib_enabled_open])
@ -1030,8 +1016,6 @@ AC_DEFUN([gl_FILE_LIST], [
lib/lchmod.c
lib/libc-config.h
lib/limits.in.h
lib/localtime-buffer.c
lib/localtime-buffer.h
lib/lstat.c
lib/malloca.c
lib/malloca.h
@ -1176,7 +1160,6 @@ AC_DEFUN([gl_FILE_LIST], [
m4/lchmod.m4
m4/libgmp.m4
m4/limits-h.m4
m4/localtime-buffer.m4
m4/lstat.m4
m4/malloca.m4
m4/manywarnings-c++.m4

View file

@ -1,4 +1,4 @@
# inttypes.m4 serial 29
# inttypes.m4 serial 31
dnl Copyright (C) 2006-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -35,12 +35,19 @@ AC_DEFUN_ONCE([gl_INTTYPES_INCOMPLETE],
# Ensure that the PRI* and SCN* macros are defined appropriately.
AC_DEFUN([gl_INTTYPES_PRI_SCN],
[
AC_REQUIRE([gt_INTTYPES_PRI])
PRIPTR_PREFIX=
if test -n "$STDINT_H"; then
dnl Using the gnulib <stdint.h>. It always defines intptr_t to 'long'.
PRIPTR_PREFIX='"l"'
dnl Using the gnulib <stdint.h>. It defines intptr_t to 'long' or
dnl 'long long', depending on _WIN64.
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[
#ifdef _WIN64
LLP64
#endif
]]),
],
[PRIPTR_PREFIX='"l"'],
[PRIPTR_PREFIX='"ll"'])
else
dnl Using the system's <stdint.h>.
for glpfx in '' l ll I64; do
@ -152,7 +159,6 @@ AC_DEFUN([gl_INTTYPES_H_DEFAULTS],
REPLACE_STRTOUMAX=0; AC_SUBST([REPLACE_STRTOUMAX])
INT32_MAX_LT_INTMAX_MAX=1; AC_SUBST([INT32_MAX_LT_INTMAX_MAX])
INT64_MAX_EQ_LONG_MAX='defined _LP64'; AC_SUBST([INT64_MAX_EQ_LONG_MAX])
PRI_MACROS_BROKEN=0; AC_SUBST([PRI_MACROS_BROKEN])
PRIPTR_PREFIX=__PRIPTR_PREFIX; AC_SUBST([PRIPTR_PREFIX])
UINT32_MAX_LT_UINTMAX_MAX=1; AC_SUBST([UINT32_MAX_LT_UINTMAX_MAX])
UINT64_MAX_EQ_ULONG_MAX='defined _LP64'; AC_SUBST([UINT64_MAX_EQ_ULONG_MAX])

View file

@ -1,44 +1,67 @@
# libgmp.m4 serial 4
# Configure the GMP library or a replacement.
dnl Copyright 2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl gl_LIBGMP
dnl Search for an installed libgmp.
dnl If found, set and AC_SUBST HAVE_LIBGMP=yes and the LIBGMP and LTLIBGMP
dnl variables, and augment the CPPFLAGS variable, and #define HAVE_LIBGMP to 1.
dnl Otherwise, set and AC_SUBST HAVE_LIBGMP=no and LIBGMP and LTLIBGMP to
dnl empty.
AC_DEFUN([gl_LIBGMP],
[
AC_ARG_WITH([libgmp],
[AS_HELP_STRING([--without-libgmp],
[do not use the GNU Multiple Precision (GMP) library;
this is the default on systems lacking libgmp.])])
AC_CHECK_HEADERS_ONCE([gmp.h])
GMP_H=gmp.h
LIB_GMP=
case $with_libgmp in
no) ;;
yes) GMP_H= LIB_GMP=-lgmp;;
*) if test "$ac_cv_header_gmp_h" = yes; then
gl_saved_LIBS=$LIBS
case "$with_libgmp" in
no)
HAVE_LIBGMP=no
LIBGMP=
LTLIBGMP=
;;
*)
dnl Prefer AC_LIB_HAVE_LINKFLAGS if the havelib module is also in use.
m4_ifdef([gl_HAVE_MODULE_HAVELIB],
[AC_LIB_HAVE_LINKFLAGS([gmp], [],
[#include <gmp.h>],
[static const mp_limb_t x[2] = { 0x73, 0x55 };
mpz_t tmp;
mpz_roinit_n (tmp, x, 2);
],
[no])],
[gl_saved_LIBS=$LIBS
AC_SEARCH_LIBS([__gmpz_roinit_n], [gmp])
LIBS=$gl_saved_LIBS
case $ac_cv_search___gmpz_roinit_n in
'none needed')
GMP_H=;;
HAVE_LIBGMP=yes LIBGMP=;;
-*)
GMP_H= LIB_GMP=$ac_cv_search___gmpz_roinit_n;;
HAVE_LIBGMP=yes LIBGMP=$ac_cv_search___gmpz_roinit_n;;
*)
HAVE_LIBGMP=no LIBGMP=;;
esac
fi;;
LTLIBGMP=$LIBGMP
AC_SUBST([HAVE_LIBGMP])
AC_SUBST([LIBGMP])
AC_SUBST([LTLIBGMP])])
if test "$with_libgmp,$HAVE_LIBGMP" = yes,no; then
AC_MSG_ERROR(
[GMP not found, although --with-libgmp was specified.m4_ifdef(
[AC_LIB_HAVE_LINKFLAGS],
[ Try specifying --with-libgmp-prefix=DIR.])])
fi
;;
esac
if test -z "$GMP_H"; then
AC_DEFINE([HAVE_GMP], 1,
[Define to 1 if you have the GMP library instead of just the
mini-gmp replacement.])
if test $HAVE_LIBGMP = yes; then
GMP_H=
else
GMP_H=gmp.h
fi
AC_SUBST([LIB_GMP])
AC_SUBST([GMP_H])
AM_CONDITIONAL([GL_GENERATE_GMP_H], [test -n "$GMP_H"])
])

View file

@ -1,21 +0,0 @@
# localtime-buffer.m4 serial 1
dnl Copyright (C) 2017-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_LOCALTIME_BUFFER_DEFAULTS],
[
NEED_LOCALTIME_BUFFER=0
])
dnl Macro invoked from other modules, to signal that the compilation of
dnl module 'localtime-buffer' is needed.
AC_DEFUN([gl_LOCALTIME_BUFFER_NEEDED],
[
AC_REQUIRE([gl_LOCALTIME_BUFFER_DEFAULTS])
AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
NEED_LOCALTIME_BUFFER=1
REPLACE_GMTIME=1
REPLACE_LOCALTIME=1
])

View file

@ -1,4 +1,4 @@
# serial 31
# serial 32
dnl Copyright (C) 2002-2003, 2005-2007, 2009-2020 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
@ -33,15 +33,15 @@ AC_DEFUN([gl_FUNC_MKTIME_WORKS],
AC_CHECK_DECLS_ONCE([alarm])
AC_CHECK_FUNCS_ONCE([tzset])
AC_REQUIRE([gl_MULTIARCH])
if test $APPLE_UNIVERSAL_BUILD = 1; then
# A universal build on Apple Mac OS X platforms.
# The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
# But we need a configuration result that is valid in both modes.
gl_cv_func_working_mktime=no
fi
AC_CACHE_CHECK([for working mktime], [gl_cv_func_working_mktime],
[AC_RUN_IFELSE(
[AC_LANG_SOURCE(
[if test $APPLE_UNIVERSAL_BUILD = 1; then
# A universal build on Apple Mac OS X platforms.
# The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
# But we need a configuration result that is valid in both modes.
gl_cv_func_working_mktime="guessing no"
else
AC_RUN_IFELSE(
[AC_LANG_SOURCE(
[[/* Test program from Paul Eggert and Tony Leneis. */
#include <limits.h>
#include <stdlib.h>
@ -242,14 +242,15 @@ main ()
result |= 64;
return result;
}]])],
[gl_cv_func_working_mktime=yes],
[gl_cv_func_working_mktime=no],
[case "$host_os" in
# Guess no on native Windows.
mingw*) gl_cv_func_working_mktime="guessing no" ;;
*) gl_cv_func_working_mktime="$gl_cross_guess_normal" ;;
esac
])
[gl_cv_func_working_mktime=yes],
[gl_cv_func_working_mktime=no],
[case "$host_os" in
# Guess no on native Windows.
mingw*) gl_cv_func_working_mktime="guessing no" ;;
*) gl_cv_func_working_mktime="$gl_cross_guess_normal" ;;
esac
])
fi
])
])

View file

@ -1,4 +1,4 @@
# multiarch.m4 serial 7
# multiarch.m4 serial 9
dnl Copyright (C) 2008-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -21,37 +21,40 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN_ONCE([gl_MULTIARCH],
[
dnl Code similar to autoconf-2.63 AC_C_BIGENDIAN.
gl_cv_c_multiarch=no
AC_COMPILE_IFELSE(
[AC_LANG_SOURCE(
[[#ifndef __APPLE_CC__
not a universal capable compiler
#endif
typedef int dummy;
]])],
[
dnl Check for potential -arch flags. It is not universal unless
dnl there are at least two -arch flags with different values.
arch=
prev=
for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
if test -n "$prev"; then
case $word in
i?86 | x86_64 | ppc | ppc64)
if test -z "$arch" || test "$arch" = "$word"; then
arch="$word"
else
gl_cv_c_multiarch=yes
fi
;;
esac
prev=
else
if test "x$word" = "x-arch"; then
prev=arch
fi
fi
done
AC_CACHE_CHECK([whether the compiler produces multi-arch binaries],
[gl_cv_c_multiarch],
[gl_cv_c_multiarch=no
AC_COMPILE_IFELSE(
[AC_LANG_SOURCE(
[[#ifndef __APPLE_CC__
not a universal capable compiler
#endif
typedef int dummy;
]])],
[
dnl Check for potential -arch flags. It is not universal unless
dnl there are at least two -arch flags with different values.
arch=
prev=
for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
if test -n "$prev"; then
case $word in
i?86 | x86_64 | ppc | ppc64 | arm | arm64)
if test -z "$arch" || test "$arch" = "$word"; then
arch="$word"
else
gl_cv_c_multiarch=yes
fi
;;
esac
prev=
else
if test "x$word" = "x-arch"; then
prev=arch
fi
fi
done
])
])
if test $gl_cv_c_multiarch = yes; then
APPLE_UNIVERSAL_BUILD=1

View file

@ -323,7 +323,7 @@ INTERVALS_H = dispextern.h intervals.h composite.h
GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
LIB_GMP = @LIB_GMP@
LIBGMP = @LIBGMP@
LIBGCCJIT = @LIBGCCJIT_LIB@
@ -535,7 +535,7 @@ LIBES = $(LIBS) $(W32_LIBS) $(LIBS_GNUSTEP) $(LIBX_BASE) $(LIBIMAGE) \
$(FREETYPE_LIBS) $(FONTCONFIG_LIBS) $(HARFBUZZ_LIBS) $(LIBOTF_LIBS) $(M17N_FLT_LIBS) \
$(LIBGNUTLS_LIBS) $(LIB_PTHREAD) $(GETADDRINFO_A_LIBS) $(LCMS2_LIBS) \
$(NOTIFY_LIBS) $(LIB_MATH) $(LIBZ) $(LIBMODULES) $(LIBSYSTEMD_LIBS) \
$(JSON_LIBS) $(LIB_GMP) $(LIBGCCJIT)
$(JSON_LIBS) $(LIBGMP) $(LIBGCCJIT)
## FORCE it so that admin/unidata can decide whether this file is
## up-to-date. Although since charprop depends on bootstrap-emacs,

View file

@ -1947,6 +1947,9 @@ resize_string_data (Lisp_Object string, ptrdiff_t cidx_byte,
/* No need to reallocate, as the size change falls within the
alignment slop. */
XSTRING (string)->u.s.size_byte = new_nbytes;
#ifdef GC_CHECK_STRING_BYTES
SDATA_NBYTES (old_sdata) = new_nbytes;
#endif
new_charaddr = data + cidx_byte;
memmove (new_charaddr + new_clen, new_charaddr + clen,
nbytes - (cidx_byte + (clen - 1)));
@ -4658,7 +4661,16 @@ mark_maybe_object (Lisp_Object obj)
break;
}
void *po = (char *) XLP (obj) + (offset - LISP_WORD_TAG (type_tag));
bool overflow
= INT_SUBTRACT_WRAPV (offset, LISP_WORD_TAG (type_tag), &offset);
#if !defined WIDE_EMACS_INT || USE_LSB_TAG
/* If we don't use wide integers, then `intptr_t' should always be
large enough to not overflow. Furthermore, when using the least
significant bits as tag bits, the tag is small enough to not
overflow either. */
eassert (!overflow);
#endif
void *po = (char *) ((intptr_t) (char *) XLP (obj) + offset);
/* If the pointer is in the dump image and the dump has a record
of the object starting at the place where the pointer points, we
@ -4869,7 +4881,7 @@ mark_memory (void const *start, void const *end)
On a host with 32-bit pointers and 64-bit Lisp_Objects,
a Lisp_Object might be split into registers saved into
non-adjacent words and P might be the low-order word's value. */
p += (intptr_t) lispsym;
p = (char *) ((uintptr_t) p + (uintptr_t) lispsym);
mark_maybe_pointer (p);
verify (alignof (Lisp_Object) % GC_POINTER_ALIGNMENT == 0);
@ -4986,27 +4998,6 @@ typedef union
#endif
} stacktop_sentry;
/* Force callee-saved registers and register windows onto the stack.
Use the platform-defined __builtin_unwind_init if available,
obviating the need for machine dependent methods. */
#ifndef HAVE___BUILTIN_UNWIND_INIT
# ifdef __sparc__
/* This trick flushes the register windows so that all the state of
the process is contained in the stack.
FreeBSD does not have a ta 3 handler, so handle it specially.
FIXME: Code in the Boehm GC suggests flushing (with 'flushrs') is
needed on ia64 too. See mach_dep.c, where it also says inline
assembler doesn't work with relevant proprietary compilers. */
# if defined __sparc64__ && defined __FreeBSD__
# define __builtin_unwind_init() asm ("flushw")
# else
# define __builtin_unwind_init() asm ("ta 3")
# endif
# else
# define __builtin_unwind_init() ((void) 0)
# endif
#endif
/* Yield an address close enough to the top of the stack that the
garbage collector need not scan above it. Callers should be
declared NO_INLINE. */
@ -5042,16 +5033,14 @@ typedef union
We have to mark Lisp objects in CPU registers that can hold local
variables or are used to pass parameters.
This code assumes that calling setjmp saves registers we need
If __builtin_unwind_init is available, it should suffice to save
registers.
Otherwise, assume that calling setjmp saves registers we need
to see in a jmp_buf which itself lies on the stack. This doesn't
have to be true! It must be verified for each system, possibly
by taking a look at the source code of setjmp.
If __builtin_unwind_init is available (defined by GCC >= 2.8) we
can use it as a machine independent method to store all registers
to the stack. In this case the macros described in the previous
two paragraphs are not used.
Stack Layout
Architectures differ in the way their processor stack is organized.

View file

@ -28,6 +28,10 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
#include <stdlib.h>
#include <unistd.h>
#ifdef HAVE_SANITIZER_LSAN_INTERFACE_H
#include <sanitizer/lsan_interface.h>
#endif
#include <verify.h>
#include "lisp.h"
@ -5083,6 +5087,9 @@ enlarge_buffer_text (struct buffer *b, ptrdiff_t delta)
#else
p = xrealloc (b->text->beg, new_nbytes);
#endif
#ifdef HAVE___LSAN_IGNORE_OBJECT
__lsan_ignore_object (p);
#endif
if (p == NULL)
{

View file

@ -1167,7 +1167,9 @@ composition_compute_stop_pos (struct composition_it *cmp_it, ptrdiff_t charpos,
character to check, and CHARPOS and BYTEPOS are indices in the
string. In that case, FACE must not be NULL. BIDI_LEVEL is the bidi
embedding level of the current paragraph, and is used to calculate the
direction argument to pass to the font shaper.
direction argument to pass to the font shaper; value of -1 means the
caller doesn't know the embedding level (used by callers which didn't
invoke the display routines that perform bidi-display-reordering).
If the character is composed, setup members of CMP_IT (id, nglyphs,
from, to, reversed_p), and return true. Otherwise, update
@ -1213,7 +1215,9 @@ composition_reseat_it (struct composition_it *cmp_it, ptrdiff_t charpos,
continue;
if (charpos < endpos)
{
if ((bidi_level & 1) == 0)
if (bidi_level < 0)
direction = Qnil;
else if ((bidi_level & 1) == 0)
direction = QL2R;
else
direction = QR2L;
@ -1250,7 +1254,16 @@ composition_reseat_it (struct composition_it *cmp_it, ptrdiff_t charpos,
else
bpos = CHAR_TO_BYTE (cpos);
}
if ((bidi_level & 1) == 0)
/* The bidi_level < 0 case below strictly speaking should
never happen, since we get here when bidi scan direction
is backward in the buffer, which can only happen if the
display routines were called to perform the bidi
reordering. But it doesn't harm to test for that, and
avoid someon raising their brows and thinking it's a
subtle bug... */
if (bidi_level < 0)
direction = Qnil;
else if ((bidi_level & 1) == 0)
direction = QL2R;
else
direction = QR2L;

View file

@ -23,6 +23,10 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
#include <math.h>
#include <stdio.h>
#ifdef HAVE_SANITIZER_LSAN_INTERFACE_H
#include <sanitizer/lsan_interface.h>
#endif
#include <byteswap.h>
#include <count-one-bits.h>
#include <count-trailing-zeros.h>
@ -1830,6 +1834,9 @@ make_blv (struct Lisp_Symbol *sym, bool forwarded,
set_blv_defcell (blv, tem);
set_blv_valcell (blv, tem);
set_blv_found (blv, false);
#ifdef HAVE___LSAN_IGNORE_OBJECT
__lsan_ignore_object (blv);
#endif
return blv;
}

View file

@ -3538,7 +3538,7 @@ void recompute_basic_faces (struct frame *);
int face_at_buffer_position (struct window *, ptrdiff_t, ptrdiff_t *,
ptrdiff_t, bool, int, enum lface_attribute_index);
int face_for_overlay_string (struct window *, ptrdiff_t, ptrdiff_t *, ptrdiff_t,
bool, Lisp_Object);
bool, Lisp_Object, enum lface_attribute_index);
int face_at_string_position (struct window *, Lisp_Object, ptrdiff_t, ptrdiff_t,
ptrdiff_t *, enum face_id, bool,
enum lface_attribute_index);

View file

@ -84,6 +84,10 @@ To add a new module function, proceed as follows:
#include <stdlib.h>
#include <time.h>
#ifdef HAVE_SANITIZER_LSAN_INTERFACE_H
#include <sanitizer/lsan_interface.h>
#endif
#include "lisp.h"
#include "bignum.h"
#include "dynlib.h"
@ -190,7 +194,7 @@ struct emacs_runtime_private
/* Forward declarations. */
static Lisp_Object value_to_lisp (emacs_value);
static emacs_value allocate_emacs_value (emacs_env *, struct emacs_value_storage *, Lisp_Object);
static emacs_value allocate_emacs_value (emacs_env *, Lisp_Object);
static emacs_value lisp_to_value (emacs_env *, Lisp_Object);
static enum emacs_funcall_exit module_non_local_exit_check (emacs_env *);
static void module_assert_thread (void);
@ -1095,7 +1099,16 @@ DEFUN ("module-load", Fmodule_load, Smodule_load, 1, 1, 0,
for two different runtime objects are guaranteed to be distinct,
which we can use for checking the liveness of runtime
pointers. */
struct emacs_runtime *rt = module_assertions ? xmalloc (sizeof *rt) : &rt_pub;
struct emacs_runtime *rt;
if (module_assertions)
{
rt = xmalloc (sizeof *rt);
#ifdef HAVE___LSAN_IGNORE_OBJECT
__lsan_ignore_object (rt);
#endif
}
else
rt = &rt_pub;
rt->size = sizeof *rt;
rt->private_members = &rt_priv;
rt->get_environment = module_get_environment;
@ -1321,7 +1334,7 @@ lisp_to_value (emacs_env *env, Lisp_Object o)
struct emacs_env_private *p = env->private_members;
if (p->pending_non_local_exit != emacs_funcall_exit_return)
return NULL;
return allocate_emacs_value (env, &p->storage, o);
return allocate_emacs_value (env, o);
}
/* Must be called for each frame before it can be used for allocation. */
@ -1358,9 +1371,9 @@ finalize_storage (struct emacs_value_storage *storage)
/* Allocate a new value from STORAGE and stores OBJ in it. Return
NULL if allocation fails and use ENV for non local exit reporting. */
static emacs_value
allocate_emacs_value (emacs_env *env, struct emacs_value_storage *storage,
Lisp_Object obj)
allocate_emacs_value (emacs_env *env, Lisp_Object obj)
{
struct emacs_value_storage *storage = &env->private_members->storage;
eassert (storage->current);
eassert (storage->current->offset < value_frame_size);
eassert (! storage->current->next);
@ -1411,7 +1424,12 @@ static emacs_env *
initialize_environment (emacs_env *env, struct emacs_env_private *priv)
{
if (module_assertions)
{
env = xmalloc (sizeof *env);
#ifdef HAVE___LSAN_IGNORE_OBJECT
__lsan_ignore_object (env);
#endif
}
priv->pending_non_local_exit = emacs_funcall_exit_return;
initialize_storage (&priv->storage);

View file

@ -2031,7 +2031,7 @@ permissions. */)
ptrdiff_t count = SPECPDL_INDEX ();
Lisp_Object encoded_file, encoded_newname;
#if HAVE_LIBSELINUX
security_context_t con;
char *con;
int conlength = 0;
#endif
#ifdef WINDOWSNT
@ -3118,7 +3118,7 @@ or if SELinux is disabled, or if Emacs lacks SELinux support. */)
#if HAVE_LIBSELINUX
if (is_selinux_enabled ())
{
security_context_t con;
char *con;
int conlength = lgetfilecon (SSDATA (ENCODE_FILE (absname)), &con);
if (conlength > 0)
{
@ -3163,7 +3163,7 @@ or if Emacs was not compiled with SELinux support. */)
Lisp_Object role = CAR_SAFE (CDR_SAFE (context));
Lisp_Object type = CAR_SAFE (CDR_SAFE (CDR_SAFE (context)));
Lisp_Object range = CAR_SAFE (CDR_SAFE (CDR_SAFE (CDR_SAFE (context))));
security_context_t con;
char *con;
bool fail;
int conlength;
context_t parsed_con;

View file

@ -596,7 +596,7 @@ scan_for_column (ptrdiff_t *endpos, EMACS_INT *goalcol, ptrdiff_t *prevcol)
if (cmp_it.id >= 0
|| (scan == cmp_it.stop_pos
&& composition_reseat_it (&cmp_it, scan, scan_byte, end,
w, NEUTRAL_DIR, NULL, Qnil)))
w, -1, NULL, Qnil)))
composition_update_it (&cmp_it, scan, scan_byte, Qnil);
if (cmp_it.id >= 0)
{
@ -1504,7 +1504,7 @@ compute_motion (ptrdiff_t from, ptrdiff_t frombyte, EMACS_INT fromvpos,
if (cmp_it.id >= 0
|| (pos == cmp_it.stop_pos
&& composition_reseat_it (&cmp_it, pos, pos_byte, to, win,
NEUTRAL_DIR, NULL, Qnil)))
-1, NULL, Qnil)))
composition_update_it (&cmp_it, pos, pos_byte, Qnil);
if (cmp_it.id >= 0)
{

View file

@ -3822,6 +3822,25 @@ extern void mark_maybe_objects (Lisp_Object const *, ptrdiff_t);
extern void mark_stack (char const *, char const *);
extern void flush_stack_call_func1 (void (*func) (void *arg), void *arg);
/* Force callee-saved registers and register windows onto the stack,
so that conservative garbage collection can see their values. */
#ifndef HAVE___BUILTIN_UNWIND_INIT
# ifdef __sparc__
/* This trick flushes the register windows so that all the state of
the process is contained in the stack.
FreeBSD does not have a ta 3 handler, so handle it specially.
FIXME: Code in the Boehm GC suggests flushing (with 'flushrs') is
needed on ia64 too. See mach_dep.c, where it also says inline
assembler doesn't work with relevant proprietary compilers. */
# if defined __sparc64__ && defined __FreeBSD__
# define __builtin_unwind_init() asm ("flushw")
# else
# define __builtin_unwind_init() asm ("ta 3")
# endif
# else
# define __builtin_unwind_init() ((void) 0)
# endif
#endif
INLINE void
flush_stack_call_func (void (*func) (void *arg), void *arg)
{

View file

@ -5476,7 +5476,8 @@ Needs to be here because ns_initialize_display_info () uses AppKit classes.
{
NSColorList *cl = [NSColorList colorListNamed: @"Emacs"];
if ( cl == nil )
/* There are 752 colors defined in rgb.txt. */
if ( cl == nil || [[cl allKeys] count] < 752)
{
Lisp_Object color_file, color_map, color;
unsigned long c;

View file

@ -764,8 +764,9 @@ dump_off_from_lisp (Lisp_Object value)
intmax_t n = intmax_t_from_lisp (value);
eassert (DUMP_OFF_MIN <= n && n <= DUMP_OFF_MAX);
ALLOW_IMPLICIT_CONVERSION;
return n;
dump_off converted = n;
DISALLOW_IMPLICIT_CONVERSION;
return converted;
}
static Lisp_Object

View file

@ -29,6 +29,10 @@
#include <stdlib.h>
#ifdef HAVE_SANITIZER_LSAN_INTERFACE_H
#include <sanitizer/lsan_interface.h>
#endif
#include "character.h"
#include "buffer.h"
#include "syntax.h"
@ -1757,6 +1761,9 @@ regex_compile (re_char *pattern, ptrdiff_t size,
/* Initialize the compile stack. */
compile_stack.stack = xmalloc (INIT_COMPILE_STACK_SIZE
* sizeof *compile_stack.stack);
#ifdef HAVE___LSAN_IGNORE_OBJECT
__lsan_ignore_object (compile_stack.stack);
#endif
compile_stack.size = INIT_COMPILE_STACK_SIZE;
compile_stack.avail = 0;

View file

@ -21,6 +21,10 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
#ifdef HAVE_SANITIZER_LSAN_INTERFACE_H
#include <sanitizer/lsan_interface.h>
#endif
#include "lisp.h"
#include "character.h"
#include "buffer.h"
@ -613,7 +617,12 @@ newline_cache_on_off (struct buffer *buf)
{
/* It should be on. */
if (base_buf->newline_cache == 0)
base_buf->newline_cache = new_region_cache ();
{
base_buf->newline_cache = new_region_cache ();
#ifdef HAVE___LSAN_IGNORE_OBJECT
__lsan_ignore_object (base_buf->newline_cache);
#endif
}
}
return base_buf->newline_cache;
}

View file

@ -4339,7 +4339,7 @@ face_at_pos (const struct it *it, enum lface_attribute_index attr_filter)
(IT_CHARPOS (*it)
+ TEXT_PROP_DISTANCE_LIMIT),
false,
from_overlay);
from_overlay, attr_filter);
}
else
{

View file

@ -6475,7 +6475,8 @@ face_at_buffer_position (struct window *w, ptrdiff_t pos,
int
face_for_overlay_string (struct window *w, ptrdiff_t pos,
ptrdiff_t *endptr, ptrdiff_t limit,
bool mouse, Lisp_Object overlay)
bool mouse, Lisp_Object overlay,
enum lface_attribute_index attr_filter)
{
struct frame *f = XFRAME (w->frame);
Lisp_Object attrs[LFACE_VECTOR_SIZE];
@ -6514,7 +6515,7 @@ face_for_overlay_string (struct window *w, ptrdiff_t pos,
/* Merge in attributes specified via text properties. */
if (!NILP (prop))
merge_face_ref (w, f, prop, attrs, true, NULL, 0);
merge_face_ref (w, f, prop, attrs, true, NULL, attr_filter);
*endptr = endpos;

View file

@ -256,7 +256,7 @@ FPIC_CFLAGS = -fPIC
endif
GMP_H = @GMP_H@
LIB_GMP = @LIB_GMP@
LIBGMP = @LIBGMP@
MODULE_CFLAGS = -I../src -I$(srcdir)/../src -I../lib -I$(srcdir)/../lib \
$(FPIC_CFLAGS) $(PROFILING_CFLAGS) \
@ -271,7 +271,7 @@ src/emacs-module-tests.log src/emacs-module-tests.elc: $(test_module)
$(test_module): $(test_module:${SO}=.c) ../src/emacs-module.h
$(AM_V_at)${MKDIR_P} $(dir $@)
$(AM_V_CCLD)$(CC) -shared $(CPPFLAGS) $(MODULE_CFLAGS) $(LDFLAGS) \
-o $@ $< $(LIB_GMP) \
-o $@ $< $(LIBGMP) \
$(and $(GMP_H),$(srcdir)/../lib/mini-gmp-gnulib.c) \
$(srcdir)/../lib/timespec.c $(srcdir)/../lib/gettime.c
endif

View file

@ -215,6 +215,35 @@ Fmod_test_globref_invalid_free (emacs_env *env, ptrdiff_t nargs,
return env->intern (env, "nil");
}
/* Allocate and free global references in a different order. */
static emacs_value
Fmod_test_globref_reordered (emacs_env *env, ptrdiff_t nargs,
emacs_value *args, void *data)
{
emacs_value booleans[2] = {
env->intern (env, "nil"),
env->intern (env, "t"),
};
emacs_value local = env->intern (env, "foo");
emacs_value globals[4] = {
env->make_global_ref (env, local),
env->make_global_ref (env, local),
env->make_global_ref (env, env->intern (env, "foo")),
env->make_global_ref (env, env->intern (env, "bar")),
};
emacs_value elements[4];
for (int i = 0; i < 4; ++i)
elements[i] = booleans[env->eq (env, globals[i], local)];
emacs_value ret = env->funcall (env, env->intern (env, "list"), 4, elements);
env->free_global_ref (env, globals[2]);
env->free_global_ref (env, globals[1]);
env->free_global_ref (env, globals[3]);
env->free_global_ref (env, globals[0]);
return ret;
}
/* Return a copy of the argument string where every 'a' is replaced
with 'b'. */
static emacs_value
@ -233,7 +262,9 @@ Fmod_test_string_a_to_b (emacs_env *env, ptrdiff_t nargs, emacs_value args[],
if (buf[i] == 'a')
buf[i] = 'b';
return env->make_string (env, buf, size - 1);
emacs_value ret = env->make_string (env, buf, size - 1);
free (buf);
return ret;
}
@ -708,6 +739,8 @@ emacs_module_init (struct emacs_runtime *ert)
DEFUN ("mod-test-globref-free", Fmod_test_globref_free, 4, 4, NULL, NULL);
DEFUN ("mod-test-globref-invalid-free", Fmod_test_globref_invalid_free, 0, 0,
NULL, NULL);
DEFUN ("mod-test-globref-reordered", Fmod_test_globref_reordered, 0, 0, NULL,
NULL);
DEFUN ("mod-test-string-a-to-b", Fmod_test_string_a_to_b, 1, 1, NULL, NULL);
DEFUN ("mod-test-userptr-make", Fmod_test_userptr_make, 1, 1, NULL, NULL);
DEFUN ("mod-test-userptr-get", Fmod_test_userptr_get, 1, 1, NULL, NULL);

View file

@ -65,8 +65,13 @@
"Test `gravatar-build-url'."
(let ((gravatar-default-image nil)
(gravatar-force-default nil)
(gravatar-size nil))
(should (equal (gravatar-build-url "foo") "\
https://seccdn.libravatar.org/avatar/acbd18db4cc2f85cedef654fccc4a4d8?r=g"))))
(gravatar-size nil)
(gravatar-service 'gravatar)
url)
(gravatar-build-url "foo" (lambda (u) (setq url u)))
(while (not url)
(sleep-for 0.01))
(should (equal url "\
https://www.gravatar.com/avatar/acbd18db4cc2f85cedef654fccc4a4d8?r=g"))))
;;; gravatar-tests.el ends here

Some files were not shown because too many files have changed in this diff Show more