aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Kaludercic2022-10-15 17:38:30 +0200
committerPhilip Kaludercic2022-10-15 17:38:30 +0200
commit01e45efcd44e92dd259283df0e62653c7c20e9cc (patch)
tree552c1a6ce7d52b897cf5f089d6c589921efbe9bd
parent982c0e6c15535defcf6ac3c4d4169708c60efc18 (diff)
parent5933055a3e7387b0095f0df7876a208ab15f4f45 (diff)
downloademacs-01e45efcd44e92dd259283df0e62653c7c20e9cc.tar.gz
emacs-01e45efcd44e92dd259283df0e62653c7c20e9cc.zip
Merge branch 'master' into feature/package+vc
-rw-r--r--.dir-locals.el2
-rw-r--r--ChangeLog.12
-rw-r--r--ChangeLog.36
-rw-r--r--INSTALL2
-rw-r--r--Makefile.in5
-rw-r--r--admin/charsets/mapfiles/stdenc.txt2
-rw-r--r--admin/charsets/mapfiles/symbol.txt2
-rw-r--r--admin/make-tarball.txt2
-rw-r--r--admin/unidata/README14
-rwxr-xr-xadmin/unidata/blocks.awk2
-rw-r--r--admin/unidata/copyright.html18
-rw-r--r--doc/emacs/custom.texi10
-rw-r--r--doc/emacs/maintaining.texi19
-rw-r--r--doc/emacs/vc1-xtra.texi9
-rw-r--r--doc/lispref/buffers.texi10
-rw-r--r--doc/lispref/compile.texi2
-rw-r--r--doc/lispref/customize.texi24
-rw-r--r--doc/lispref/files.texi34
-rw-r--r--doc/lispref/loading.texi2
-rw-r--r--doc/lispref/text.texi9
-rw-r--r--doc/lispref/windows.texi18
-rw-r--r--doc/misc/cc-mode.texi8
-rw-r--r--doc/misc/efaq-w32.texi8
-rw-r--r--doc/misc/efaq.texi6
-rw-r--r--doc/misc/gnus-faq.texi6
-rw-r--r--doc/misc/gnus.texi8
-rw-r--r--doc/misc/mh-e.texi14
-rw-r--r--doc/misc/org.org28
-rw-r--r--doc/misc/remember.texi7
-rw-r--r--doc/misc/semantic.texi2
-rw-r--r--doc/misc/sieve.texi2
-rw-r--r--doc/misc/vhdl-mode.texi2
-rw-r--r--etc/DEBUG2
-rw-r--r--etc/NEWS27
-rw-r--r--etc/NEWS.212
-rw-r--r--etc/NEWS.222
-rw-r--r--etc/NEWS.252
-rw-r--r--etc/NEWS.262
-rw-r--r--etc/TODO10
-rw-r--r--etc/images/gud/README4
-rw-r--r--etc/srecode/ede-autoconf.srt2
-rw-r--r--etc/srecode/ede-make.srt4
-rw-r--r--etc/themes/adwaita-theme.el5
-rw-r--r--etc/themes/deeper-blue-theme.el5
-rw-r--r--etc/themes/dichromacy-theme.el5
-rw-r--r--etc/themes/leuven-dark-theme.el8
-rw-r--r--etc/themes/leuven-theme.el8
-rw-r--r--etc/themes/light-blue-theme.el5
-rw-r--r--etc/themes/manoj-dark-theme.el5
-rw-r--r--etc/themes/misterioso-theme.el5
-rw-r--r--etc/themes/modus-operandi-theme.el2
-rw-r--r--etc/themes/modus-vivendi-theme.el2
-rw-r--r--etc/themes/tango-dark-theme.el7
-rw-r--r--etc/themes/tango-theme.el6
-rw-r--r--etc/themes/tsdh-dark-theme.el6
-rw-r--r--etc/themes/tsdh-light-theme.el6
-rw-r--r--etc/themes/wheatgrass-theme.el5
-rw-r--r--etc/themes/whiteboard-theme.el5
-rw-r--r--etc/themes/wombat-theme.el5
-rw-r--r--lib-src/seccomp-filter.c6
-rw-r--r--lisp/ChangeLog.102
-rw-r--r--lisp/ChangeLog.144
-rw-r--r--lisp/ChangeLog.152
-rw-r--r--lisp/ChangeLog.172
-rw-r--r--lisp/Makefile.in6
-rw-r--r--lisp/autoinsert.el2
-rw-r--r--lisp/cedet/pulse.el2
-rw-r--r--lisp/custom.el73
-rw-r--r--lisp/ecomplete.el46
-rw-r--r--lisp/emacs-lisp/comp.el11
-rw-r--r--lisp/emacs-lisp/loaddefs-gen.el15
-rw-r--r--lisp/emacs-lisp/memory-report.el7
-rw-r--r--lisp/emacs-lisp/package.el10
-rw-r--r--lisp/emacs-lisp/shortdoc.el2
-rw-r--r--lisp/emacs-lisp/vtable.el14
-rw-r--r--lisp/erc/ChangeLog.14
-rw-r--r--lisp/erc/erc.el4
-rw-r--r--lisp/eshell/em-unix.el6
-rw-r--r--lisp/eshell/esh-proc.el18
-rw-r--r--lisp/files-x.el4
-rw-r--r--lisp/files.el36
-rw-r--r--lisp/gnus/message.el8
-rw-r--r--lisp/gnus/mm-uu.el2
-rw-r--r--lisp/gnus/nndoc.el2
-rw-r--r--lisp/help.el135
-rw-r--r--lisp/hl-line.el3
-rw-r--r--lisp/info.el5
-rw-r--r--lisp/language/indonesian.el21
-rw-r--r--lisp/language/misc-lang.el18
-rw-r--r--lisp/language/philippine.el12
-rw-r--r--lisp/ldefs-boot.el51
-rw-r--r--lisp/mh-e/mh-junk.el4
-rw-r--r--lisp/net/browse-url.el5
-rw-r--r--lisp/net/rcirc.el14
-rw-r--r--lisp/net/tramp.el46
-rw-r--r--lisp/org/ob-matlab.el2
-rw-r--r--lisp/org/ob-plantuml.el2
-rw-r--r--lisp/org/org-ctags.el2
-rw-r--r--lisp/org/org-protocol.el2
-rw-r--r--lisp/outline.el228
-rw-r--r--lisp/play/zone.el24
-rw-r--r--lisp/printing.el6
-rw-r--r--lisp/progmodes/antlr-mode.el8
-rw-r--r--lisp/progmodes/cc-engine.el45
-rw-r--r--lisp/progmodes/cc-fonts.el20
-rw-r--r--lisp/progmodes/cc-langs.el14
-rw-r--r--lisp/progmodes/cc-mode.el6
-rw-r--r--lisp/progmodes/compile.el9
-rw-r--r--lisp/progmodes/cperl-mode.el2
-rw-r--r--lisp/progmodes/gdb-mi.el2
-rw-r--r--lisp/progmodes/make-mode.el21
-rw-r--r--lisp/progmodes/project.el2
-rw-r--r--lisp/progmodes/python.el32
-rw-r--r--lisp/progmodes/xref.el19
-rw-r--r--lisp/server.el19
-rw-r--r--lisp/simple.el8
-rw-r--r--lisp/startup.el3
-rw-r--r--lisp/textmodes/less-css-mode.el2
-rw-r--r--lisp/textmodes/sgml-mode.el4
-rw-r--r--lisp/textmodes/string-edit.el12
-rw-r--r--lisp/url/url-file.el1
-rw-r--r--lisp/vc/vc-git.el45
-rw-r--r--lisp/vc/vc.el46
-rw-r--r--lisp/view.el7
-rw-r--r--lisp/x-dnd.el5
-rw-r--r--nt/INSTALL24
-rw-r--r--nt/INSTALL.W642
-rw-r--r--src/ChangeLog.134
-rw-r--r--src/dired.c5
-rw-r--r--src/editfns.c13
-rw-r--r--src/fileio.c5
-rw-r--r--src/fns.c41
-rw-r--r--src/frame.c28
-rw-r--r--src/lisp.h15
-rw-r--r--src/minibuf.c12
-rw-r--r--src/nsterm.m23
-rw-r--r--src/pdumper.c2
-rw-r--r--src/sqlite.c173
-rw-r--r--src/sysdep.c2
-rw-r--r--src/widget.c42
-rw-r--r--src/widget.h2
-rw-r--r--src/widgetprv.h3
-rw-r--r--src/window.c97
-rw-r--r--src/xdisp.c15
-rw-r--r--src/xfns.c14
-rw-r--r--src/xterm.c226
-rw-r--r--test/lisp/calendar/icalendar-tests.el2
-rw-r--r--test/lisp/cedet/semantic-utest.el1
-rw-r--r--test/lisp/dnd-tests.el2
-rw-r--r--test/lisp/emacs-lisp/package-resources/ustar-withsub-0.1.tarbin0 -> 10240 bytes
-rw-r--r--test/lisp/emacs-lisp/package-resources/v7-withsub-0.1.tarbin0 -> 10240 bytes
-rw-r--r--test/lisp/emacs-lisp/package-tests.el24
-rw-r--r--test/lisp/net/puny-resources/IdnaTestV2.txt4
-rw-r--r--test/lisp/progmodes/python-tests.el126
-rw-r--r--test/lisp/progmodes/ruby-mode-resources/ruby.rb4
-rw-r--r--test/lisp/time-stamp-tests.el8
-rw-r--r--test/manual/image-circular-tests.el41
-rw-r--r--test/src/fns-tests.el2
-rw-r--r--test/src/lcms-tests.el2
-rw-r--r--test/src/sqlite-tests.el13
160 files changed, 1801 insertions, 808 deletions
diff --git a/.dir-locals.el b/.dir-locals.el
index 84617a79807..f7c73031cc8 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -1,4 +1,4 @@
1;;; Directory Local Variables 1;;; Directory Local Variables -*- no-byte-compile: t; -*-
2;;; For more information see (info "(emacs) Directory Variables") 2;;; For more information see (info "(emacs) Directory Variables")
3 3
4((nil . ((tab-width . 8) 4((nil . ((tab-width . 8)
diff --git a/ChangeLog.1 b/ChangeLog.1
index cd31aacafb4..35533d60fff 100644
--- a/ChangeLog.1
+++ b/ChangeLog.1
@@ -5685,7 +5685,7 @@
5685 (__mktime_internal): Use it systematically for all isdst comparisons. 5685 (__mktime_internal): Use it systematically for all isdst comparisons.
5686 This completes the fix for libc BZ #6723, and removes the need for 5686 This completes the fix for libc BZ #6723, and removes the need for
5687 normalizing tm_isdst. 5687 normalizing tm_isdst.
5688 See <http://sourceware.org/bugzilla/show_bug.cgi?id=6723> 5688 See <https://sourceware.org/bugzilla/show_bug.cgi?id=6723>
5689 (not_equal_tm) [DEBUG]: Use isdst_differ here, too. 5689 (not_equal_tm) [DEBUG]: Use isdst_differ here, too.
5690 5690
5691 mktime: fix some integer overflow issues and sidestep the rest 5691 mktime: fix some integer overflow issues and sidestep the rest
diff --git a/ChangeLog.3 b/ChangeLog.3
index a09dc29cbec..f2245a4ed53 100644
--- a/ChangeLog.3
+++ b/ChangeLog.3
@@ -185373,7 +185373,7 @@
185373 185373
185374 * lisp/image.el (image-type-header-regexps): 185374 * lisp/image.el (image-type-header-regexps):
185375 Allow two or more CRs or LFs in initial whitespace sequences. See: 185375 Allow two or more CRs or LFs in initial whitespace sequences. See:
185376 http://netpbm.sourceforge.net/doc/pbm.html 185376 https://netpbm.sourceforge.net/doc/pbm.html
185377 185377
1853782017-10-16 Paul Eggert <eggert@cs.ucla.edu> 1853782017-10-16 Paul Eggert <eggert@cs.ucla.edu>
185379 185379
@@ -197097,7 +197097,7 @@
197097 Clang on macOS warns about these with -Wtautological-compare. POSIX 197097 Clang on macOS warns about these with -Wtautological-compare. POSIX
197098 guarantees that rlim_t is 197098 guarantees that rlim_t is
197099 unsigned (cf. 197099 unsigned (cf.
197100 http://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/resource.h.html), 197100 https://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/resource.h.html),
197101 so these resource limits can never be negative. 197101 so these resource limits can never be negative.
197102 197102
197103 * src/emacs.c (main): Remove tautological comparisons. 197103 * src/emacs.c (main): Remove tautological comparisons.
@@ -199197,7 +199197,7 @@
199197 199197
199198 ' is commonly used as an apostrophe in the prose sections of spec 199198 ' is commonly used as an apostrophe in the prose sections of spec
199199 files, which was erroneously highlighted as strings. See for example 199199 files, which was erroneously highlighted as strings. See for example
199200 http://kmymoney2.sourceforge.net/phb/rpm-example.html 199200 https://kmymoney2.sourceforge.net/phb/rpm-example.html
199201 199201
199202 * lisp/progmodes/sh-script.el (sh-mode-syntax-table): Treat ' as 199202 * lisp/progmodes/sh-script.el (sh-mode-syntax-table): Treat ' as
199203 punctuation in RPM spec files. 199203 punctuation in RPM spec files.
diff --git a/INSTALL b/INSTALL
index 95d2dbda80c..c0323f770ba 100644
--- a/INSTALL
+++ b/INSTALL
@@ -187,7 +187,7 @@ X11 is being used.
187 libz (for PNG): https://www.zlib.net/ 187 libz (for PNG): https://www.zlib.net/
188 X libjpeg for JPEG: https://www.ijg.org/ 188 X libjpeg for JPEG: https://www.ijg.org/
189 X libtiff for TIFF: http://www.simplesystems.org/libtiff/ 189 X libtiff for TIFF: http://www.simplesystems.org/libtiff/
190 X libgif for GIF: http://giflib.sourceforge.net/ 190 X libgif for GIF: https://giflib.sourceforge.net/
191 librsvg2 for SVG: https://wiki.gnome.org/Projects/LibRsvg 191 librsvg2 for SVG: https://wiki.gnome.org/Projects/LibRsvg
192 libwebp for WebP: https://developers.google.com/speed/webp/ 192 libwebp for WebP: https://developers.google.com/speed/webp/
193 193
diff --git a/Makefile.in b/Makefile.in
index 741a4c5538a..2d617e2294d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -530,6 +530,11 @@ lisp: src
530lib lib-src lisp nt: Makefile 530lib lib-src lisp nt: Makefile
531 $(MAKE) -C $@ all 531 $(MAKE) -C $@ all
532 532
533trampolines: src lisp
534ifeq ($(HAVE_NATIVE_COMP),yes)
535 $(MAKE) -C lisp trampolines
536endif
537
533# Pass an unexpanded $srcdir to src's Makefile, which then 538# Pass an unexpanded $srcdir to src's Makefile, which then
534# expands it using its own value of srcdir (which points to the 539# expands it using its own value of srcdir (which points to the
535# source directory of src/). 540# source directory of src/).
diff --git a/admin/charsets/mapfiles/stdenc.txt b/admin/charsets/mapfiles/stdenc.txt
index e39486a3195..1c898bac0ba 100644
--- a/admin/charsets/mapfiles/stdenc.txt
+++ b/admin/charsets/mapfiles/stdenc.txt
@@ -54,7 +54,7 @@
54# 54#
55# [v0.1, 5 May 1995] First release. 55# [v0.1, 5 May 1995] First release.
56# 56#
57# Use the Unicode reporting form <http://www.unicode.org/reporting.html> 57# Use the Unicode reporting form <https://www.unicode.org/reporting.html>
58# for any questions or comments or to report errors in the data. 58# for any questions or comments or to report errors in the data.
59# 59#
600020 20 # SPACE # space 600020 20 # SPACE # space
diff --git a/admin/charsets/mapfiles/symbol.txt b/admin/charsets/mapfiles/symbol.txt
index b98baf6cf0c..0a5aac8b611 100644
--- a/admin/charsets/mapfiles/symbol.txt
+++ b/admin/charsets/mapfiles/symbol.txt
@@ -57,7 +57,7 @@
57# 57#
58# [v0.1, 5 May 1995] First release. 58# [v0.1, 5 May 1995] First release.
59# 59#
60# Use the Unicode reporting form <http://www.unicode.org/reporting.html> 60# Use the Unicode reporting form <https://www.unicode.org/reporting.html>
61# for any questions or comments or to report errors in the data. 61# for any questions or comments or to report errors in the data.
62# 62#
630020 20 # SPACE # space 630020 20 # SPACE # space
diff --git a/admin/make-tarball.txt b/admin/make-tarball.txt
index 9a406b24fa1..d881b816125 100644
--- a/admin/make-tarball.txt
+++ b/admin/make-tarball.txt
@@ -390,7 +390,7 @@ Next, regenerate the various manuals in HTML, PDF, and PS formats:
390 390
391Now change to the 'manual' directory and invoke upload-manuals: 391Now change to the 'manual' directory and invoke upload-manuals:
392 392
393 ../admin/updload-manuals /path/to/webpages/cvs/checkout 393 ../admin/upload-manuals /path/to/webpages/cvs/checkout
394 394
395 where /path/to/webpages/cvs/checkout is the place where you have the 395 where /path/to/webpages/cvs/checkout is the place where you have the
396 CVS checkout of the Emacs Web pages, with subdirectories 'manual' 396 CVS checkout of the Emacs Web pages, with subdirectories 'manual'
diff --git a/admin/unidata/README b/admin/unidata/README
index 2da01402b70..2d421dfb6bf 100644
--- a/admin/unidata/README
+++ b/admin/unidata/README
@@ -6,31 +6,31 @@ copyright.html.
6The names, URLs, and dates for these files are as follows. 6The names, URLs, and dates for these files are as follows.
7 7
8BidiBrackets.txt 8BidiBrackets.txt
9http://www.unicode.org/Public/UNIDATA/BidiBrackets.txt 9https://www.unicode.org/Public/UNIDATA/BidiBrackets.txt
102021-06-30 102021-06-30
11 11
12BidiMirroring.txt 12BidiMirroring.txt
13http://www.unicode.org/Public/UNIDATA/BidiMirroring.txt 13https://www.unicode.org/Public/UNIDATA/BidiMirroring.txt
142021-08-08 142021-08-08
15 15
16Blocks.txt 16Blocks.txt
17http://www.unicode.org/Public/8.0.0/ucd/Blocks.txt 17https://www.unicode.org/Public/8.0.0/ucd/Blocks.txt
182021-01-22 182021-01-22
19 19
20IVD_Sequences.txt 20IVD_Sequences.txt
21http://www.unicode.org/ivd/ 21https://www.unicode.org/ivd/
222020-11-06 222020-11-06
23 23
24NormalizationTest.txt 24NormalizationTest.txt
25http://www.unicode.org/Public/UNIDATA/NormalizationTest.txt 25https://www.unicode.org/Public/UNIDATA/NormalizationTest.txt
262021-05-28 262021-05-28
27 27
28SpecialCasing.txt 28SpecialCasing.txt
29http://unicode.org/Public/UNIDATA/SpecialCasing.txt 29https://unicode.org/Public/UNIDATA/SpecialCasing.txt
302021-03-08 302021-03-08
31 31
32UnicodeData.txt 32UnicodeData.txt
33http://www.unicode.org/Public/UNIDATA/UnicodeData.txt 33https://www.unicode.org/Public/UNIDATA/UnicodeData.txt
342021-07-06 342021-07-06
35 35
36emoji-data.txt 36emoji-data.txt
diff --git a/admin/unidata/blocks.awk b/admin/unidata/blocks.awk
index 1c571feff38..48a14ec3ca9 100755
--- a/admin/unidata/blocks.awk
+++ b/admin/unidata/blocks.awk
@@ -23,7 +23,7 @@
23### Commentary: 23### Commentary:
24 24
25## This script takes as input Unicode's Blocks.txt 25## This script takes as input Unicode's Blocks.txt
26## (http://www.unicode.org/Public/UNIDATA/Blocks.txt) 26## (https://www.unicode.org/Public/UNIDATA/Blocks.txt)
27## and produces output for Emacs's lisp/international/charscript.el. 27## and produces output for Emacs's lisp/international/charscript.el.
28 28
29## It lumps together all the blocks belonging to the same language. 29## It lumps together all the blocks belonging to the same language.
diff --git a/admin/unidata/copyright.html b/admin/unidata/copyright.html
index 0ae01c11ad1..567c54e72ac 100644
--- a/admin/unidata/copyright.html
+++ b/admin/unidata/copyright.html
@@ -13,7 +13,7 @@
13<title>Unicode Terms of Use</title> 13<title>Unicode Terms of Use</title>
14<link rel="stylesheet" type="text/css" 14<link rel="stylesheet" type="text/css"
15 15
16href="http://www.unicode.org/webscripts/standard_styles.css"> 16href="https://www.unicode.org/webscripts/standard_styles.css">
17 17
18<style type="text/css"> 18<style type="text/css">
19pre { 19pre {
@@ -32,8 +32,8 @@ pre {
32 <td colspan="2"> 32 <td colspan="2">
33 <table width="100%" border="0" cellpadding="0" cellspacing="0"> 33 <table width="100%" border="0" cellpadding="0" cellspacing="0">
34 <tr> 34 <tr>
35 <td class="icon" style="width:38px; height:35px"><a href="http://www.unicode.org/"><img border="0" 35 <td class="icon" style="width:38px; height:35px"><a href="https://www.unicode.org/"><img border="0"
36 src="http://www.unicode.org/webscripts/logo60s2.gif" align="middle" alt="[Unicode]" width="34" height="33"></a></td> 36 src="https://www.unicode.org/webscripts/logo60s2.gif" align="middle" alt="[Unicode]" width="34" height="33"></a></td>
37 <td class="icon" style="vertical-align:middle;"> &nbsp;<a class="bar" 37 <td class="icon" style="vertical-align:middle;"> &nbsp;<a class="bar"
38 href="https://www.unicode.org/copyright.html"><font size="3">Terms of Use</font></a></td> 38 href="https://www.unicode.org/copyright.html"><font size="3">Terms of Use</font></a></td>
39 <td class="bar"><a href="https://www.unicode.org/main.html" class="bar">Tech Site</a> 39 <td class="bar"><a href="https://www.unicode.org/main.html" class="bar">Tech Site</a>
@@ -112,7 +112,7 @@ pre {
112 112
113 <p>For the general privacy policy governing access to this site, see 113 <p>For the general privacy policy governing access to this site, see
114 the&nbsp; 114 the&nbsp;
115 <a href="http://www.unicode.org/policies/privacy_policy.html"> 115 <a href="https://www.unicode.org/policies/privacy_policy.html">
116 Unicode Privacy Policy</a>.</p> 116 Unicode Privacy Policy</a>.</p>
117 117
118 <ol type="A"> 118 <ol type="A">
@@ -158,7 +158,7 @@ http://site.icu-project.org/download/
158 specifications of rights and restrictions of use. For the book 158 specifications of rights and restrictions of use. For the book
159 editions (Unicode 5.0 and earlier), these are found on the back 159 editions (Unicode 5.0 and earlier), these are found on the back
160 of the 160 of the
161 <a href="http://www.unicode.org/versions/Unicode5.0.0/Title.pdf">title page</a>.</li> 161 <a href="https://www.unicode.org/versions/Unicode5.0.0/Title.pdf">title page</a>.</li>
162 <li> 162 <li>
163 The Unicode PDF <a href="https://www.unicode.org/charts/">online code charts</a> carry specific restrictions. Those restrictions are incorporated as the 163 The Unicode PDF <a href="https://www.unicode.org/charts/">online code charts</a> carry specific restrictions. Those restrictions are incorporated as the
164 first page of each PDF code chart.</li> 164 first page of each PDF code chart.</li>
@@ -224,7 +224,7 @@ http://site.icu-project.org/download/
224 <li><u><a name="5"></a>Trademarks &amp; Logos</u> 224 <li><u><a name="5"></a>Trademarks &amp; Logos</u>
225 <ol> 225 <ol>
226 <li>The Unicode Word Mark and the Unicode Logo are trademarks of Unicode, Inc. “The Unicode Consortium” and “Unicode, Inc.” are trade names of Unicode, Inc. Use of the information and materials found on this website indicates your acknowledgement of Unicode, Inc.’s exclusive worldwide rights in the Unicode Word Mark, the Unicode Logo, and the Unicode trade names.</li> 226 <li>The Unicode Word Mark and the Unicode Logo are trademarks of Unicode, Inc. “The Unicode Consortium” and “Unicode, Inc.” are trade names of Unicode, Inc. Use of the information and materials found on this website indicates your acknowledgement of Unicode, Inc.’s exclusive worldwide rights in the Unicode Word Mark, the Unicode Logo, and the Unicode trade names.</li>
227<li><a href="http://www.unicode.org/policies/logo_policy.html">The Unicode Consortium Name and Trademark Usage Policy</a> (“Trademark Policy”) are incorporated herein by reference and you agree to abide by the provisions of the Trademark Policy, which may be changed from time to time in the sole discretion of Unicode, Inc.</li> 227<li><a href="https://www.unicode.org/policies/logo_policy.html">The Unicode Consortium Name and Trademark Usage Policy</a> (“Trademark Policy”) are incorporated herein by reference and you agree to abide by the provisions of the Trademark Policy, which may be changed from time to time in the sole discretion of Unicode, Inc.</li>
228<li>All third party trademarks referenced herein are the property of their respective owners.</li> 228<li>All third party trademarks referenced herein are the property of their respective owners.</li>
229 </ol> 229 </ol>
230 </li> 230 </li>
@@ -270,15 +270,15 @@ http://site.icu-project.org/download/
270 <center> 270 <center>
271 <table cellspacing="0" cellpadding="0" border="0" id="table2"> 271 <table cellspacing="0" cellpadding="0" border="0" id="table2">
272 <tr> 272 <tr>
273 <td><a href="http://www.unicode.org/copyright.html"> 273 <td><a href="https://www.unicode.org/copyright.html">
274 <img src="http://www.unicode.org/img/hb_notice.gif" 274 <img src="https://www.unicode.org/img/hb_notice.gif"
275 border="0" alt="Access to Copyright and terms of use" 275 border="0" alt="Access to Copyright and terms of use"
276 width="216" height="50"></a></td> 276 width="216" height="50"></a></td>
277 </tr> 277 </tr>
278 </table> 278 </table>
279 279
280 <script language="Javascript" type="text/javascript" 280 <script language="Javascript" type="text/javascript"
281 src="http://www.unicode.org/webscripts/lastModified.js"> 281 src="https://www.unicode.org/webscripts/lastModified.js">
282 </script> 282 </script>
283 283
284 </center> 284 </center>
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi
index ff7ab83190c..f98527bf9a7 100644
--- a/doc/emacs/custom.texi
+++ b/doc/emacs/custom.texi
@@ -667,6 +667,16 @@ type @kbd{M-x disable-theme}.
667the @file{*Custom Themes*} buffer; or type @kbd{M-x describe-theme} 667the @file{*Custom Themes*} buffer; or type @kbd{M-x describe-theme}
668anywhere in Emacs and enter the theme name. 668anywhere in Emacs and enter the theme name.
669 669
670@findex theme-choose-variant
671Some themes have variants (most often just two: light and dark). You
672can switch to another variant using @kbd{M-x theme-choose-variant}.
673If the currently active theme has only one other variant, it will be
674selected; if there are more variants, the command will prompt you
675which one to switch to.
676
677Note that @code{theme-choose-variant} only works if a single theme
678is active.
679
670@node Creating Custom Themes 680@node Creating Custom Themes
671@subsection Creating Custom Themes 681@subsection Creating Custom Themes
672@cindex custom themes, creating 682@cindex custom themes, creating
diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi
index 6857e67def9..ad4a3ea3506 100644
--- a/doc/emacs/maintaining.texi
+++ b/doc/emacs/maintaining.texi
@@ -2302,7 +2302,9 @@ Display the reference on the current line in the other window
2302@item r @var{pattern} @key{RET} @var{replacement} @key{RET} 2302@item r @var{pattern} @key{RET} @var{replacement} @key{RET}
2303Perform interactive query-replace on references that match 2303Perform interactive query-replace on references that match
2304@var{pattern} (@code{xref-query-replace-in-results}), replacing 2304@var{pattern} (@code{xref-query-replace-in-results}), replacing
2305the match with @var{replacement}. @xref{Identifier Search}. 2305the match with @var{replacement}. This command can only be used in
2306@file{*xref*} buffers that show all the matches for an identifier in
2307all the relevant files. @xref{Identifier Search}.
2306 2308
2307@item g 2309@item g
2308@findex xref-revert-buffer 2310@findex xref-revert-buffer
@@ -2336,7 +2338,8 @@ them.
2336@item M-? 2338@item M-?
2337Find all the references for the identifier at point. 2339Find all the references for the identifier at point.
2338 2340
2339@item M-x xref-query-replace-in-results @key{RET} @var{replacement} @key{RET} 2341@item r
2342@itemx M-x xref-query-replace-in-results @key{RET} @var{replacement} @key{RET}
2340@itemx C-u M-x xref-query-replace-in-results @key{RET} @var{regexp} @key{RET} @var{replacement} @key{RET} 2343@itemx C-u M-x xref-query-replace-in-results @key{RET} @var{regexp} @key{RET} @var{replacement} @key{RET}
2341Interactively replace @var{regexp} with @var{replacement} in the names 2344Interactively replace @var{regexp} with @var{replacement} in the names
2342of all the identifiers shown in the @file{*xref*} buffer. 2345of all the identifiers shown in the @file{*xref*} buffer.
@@ -2382,16 +2385,18 @@ shown. The default value is @code{nil}, which just shows the results
2382in the @file{*xref*} buffer, but doesn't select any of them. 2385in the @file{*xref*} buffer, but doesn't select any of them.
2383 2386
2384@findex xref-query-replace-in-results 2387@findex xref-query-replace-in-results
2385 @kbd{M-x xref-query-replace-in-results} reads a @var{replacement} 2388 @kbd{r} (@code{xref-query-replace-in-results}) reads a @var{replacement}
2386string, just like ordinary @kbd{M-x query-replace-regexp}. It then 2389string, just like ordinary @kbd{M-x query-replace-regexp}. It then
2387renames the identifiers shown in the @file{*xref*} buffer in all the 2390renames the identifiers shown in the @file{*xref*} buffer in all the
2388places in all the files where these identifiers are referenced, such 2391places in all the files where these identifiers are referenced, such
2389that their new name is @var{replacement}. This is useful when you 2392that their new name is @var{replacement}. This is useful when you
2390rename your identifiers as part of refactoring. This command should 2393rename your identifiers as part of refactoring. This command should
2391be invoked in the @file{*xref*} buffer generated by @kbd{M-?}. With a 2394be invoked in the @file{*xref*} buffer generated by @kbd{M-?}. By
2392prefix argument, the command also prompts for a regexp to match 2395default, the command replaces the entire name of each identifier with
2393identifier names, and renames that regexp in the names of the matching 2396@var{replacement}, but if invoked with a prefix argument, the command
2394identifiers with @var{replacement}. 2397prompts for a regexp to match identifier names, and replaces only the
2398matches of that regexp in the names of the identifiers with
2399@var{replacement}.
2395 2400
2396@findex xref-find-references-and-replace 2401@findex xref-find-references-and-replace
2397 @kbd{M-x xref-find-references-and-replace} works similarly to 2402 @kbd{M-x xref-find-references-and-replace} works similarly to
diff --git a/doc/emacs/vc1-xtra.texi b/doc/emacs/vc1-xtra.texi
index 66d3f51c306..23d5f504322 100644
--- a/doc/emacs/vc1-xtra.texi
+++ b/doc/emacs/vc1-xtra.texi
@@ -291,8 +291,13 @@ When collaborating on projects it is common to send patches via email,
291to share changes. If you wish to do this using VC, you can use the 291to share changes. If you wish to do this using VC, you can use the
292@code{vc-prepare-patch} command. This will prompt you for the 292@code{vc-prepare-patch} command. This will prompt you for the
293revisions you wish to share, and which destination email address(es) 293revisions you wish to share, and which destination email address(es)
294to use. The command will then prepare those revisions using your 294to use. The revisions are separated using commas (or whatever was
295@abbr{MUA, Mail User Agent} for you to review and send. 295configured by @var{crm-separator}). The command will then prepare
296those revisions using your @abbr{MUA, Mail User Agent} for you to
297review and send.
298
299When invoked interactively in a Log View buffer with marked revisions,
300these revisions will be used.
296 301
297@vindex vc-prepare-patches-separately 302@vindex vc-prepare-patches-separately
298Depending on the value of the user option 303Depending on the value of the user option
diff --git a/doc/lispref/buffers.texi b/doc/lispref/buffers.texi
index 6a1d125701c..c40e088293e 100644
--- a/doc/lispref/buffers.texi
+++ b/doc/lispref/buffers.texi
@@ -427,19 +427,19 @@ It is a permanent local, unaffected by
427@end defvar 427@end defvar
428 428
429@defvar buffer-file-number 429@defvar buffer-file-number
430This buffer-local variable holds the file number and directory device 430This buffer-local variable holds the inode number and device
431number of the file visited in the current buffer, or @code{nil} if no 431identifier of the file visited in the current buffer, or @code{nil} if no
432file or a nonexistent file is visited. It is a permanent local, 432file or a nonexistent file is visited. It is a permanent local,
433unaffected by @code{kill-all-local-variables}. 433unaffected by @code{kill-all-local-variables}.
434 434
435The value is normally a list of the form @code{(@var{filenum} 435The value is normally a list of the form @code{(@var{inodenum}
436@var{devnum})}. This pair of numbers uniquely identifies the file among 436@var{device})}. This tuple uniquely identifies the file among
437all files accessible on the system. See the function 437all files accessible on the system. See the function
438@code{file-attributes}, in @ref{File Attributes}, for more information 438@code{file-attributes}, in @ref{File Attributes}, for more information
439about them. 439about them.
440 440
441If @code{buffer-file-name} is the name of a symbolic link, then both 441If @code{buffer-file-name} is the name of a symbolic link, then both
442numbers refer to the recursive target. 442@var{inodenum} and @var{device} refer to the recursive target of the link.
443@end defvar 443@end defvar
444 444
445@defun get-file-buffer filename 445@defun get-file-buffer filename
diff --git a/doc/lispref/compile.texi b/doc/lispref/compile.texi
index 7ccee08e53a..70e0f98f443 100644
--- a/doc/lispref/compile.texi
+++ b/doc/lispref/compile.texi
@@ -985,7 +985,7 @@ too late.
985While setting this variable disables automatic compilation of Lisp 985While setting this variable disables automatic compilation of Lisp
986files, the compiler may still be invoked to install @dfn{trampolines} 986files, the compiler may still be invoked to install @dfn{trampolines}
987if any built-in functions are redefined. However, these trampolines 987if any built-in functions are redefined. However, these trampolines
988will not get written to disk. 988will not get written to your cache directory.
989 989
990You can also use the @samp{EMACS_INHIBIT_AUTOMATIC_NATIVE_COMPILATION} 990You can also use the @samp{EMACS_INHIBIT_AUTOMATIC_NATIVE_COMPILATION}
991environment variable to disable native compilation. 991environment variable to disable native compilation.
diff --git a/doc/lispref/customize.texi b/doc/lispref/customize.texi
index 6ba35cffffe..204719e942b 100644
--- a/doc/lispref/customize.texi
+++ b/doc/lispref/customize.texi
@@ -1428,12 +1428,32 @@ emacs, The GNU Emacs Manual}.)
1428be a call to @code{deftheme}, and the last form should be a call to 1428be a call to @code{deftheme}, and the last form should be a call to
1429@code{provide-theme}. 1429@code{provide-theme}.
1430 1430
1431@defmac deftheme theme &optional doc 1431@defmac deftheme theme &optional doc &rest properties
1432This macro declares @var{theme} (a symbol) as the name of a Custom 1432This macro declares @var{theme} (a symbol) as the name of a Custom
1433theme. The optional argument @var{doc} should be a string describing 1433theme. The optional argument @var{doc} should be a string describing
1434the theme; this is the description shown when the user invokes the 1434the theme; this is the description shown when the user invokes the
1435@code{describe-theme} command or types @kbd{?} in the @samp{*Custom 1435@code{describe-theme} command or types @kbd{?} in the @samp{*Custom
1436Themes*} buffer. 1436Themes*} buffer. The remaining arguments @var{properties} are used
1437pass a property list with theme attributes.
1438
1439The following attributes are supported:
1440
1441@table @code
1442@item :family
1443A symbol designating what ``family'' a theme belongs to. A
1444@dfn{family} of themes is a set of similar themes that differ by minor
1445aspects, such as face colors that are meant for the light vs dark
1446background of the frame.
1447@item :kind
1448A symbol. If a theme is enabled and this property has the value
1449@code{color-scheme}, then the @code{theme-choose-variant} command will
1450look for other available themes that belong to the same family in
1451order to switch the themes. Other values are currently unspecified
1452and should not be used.
1453@item :background-mode
1454A symbol, either @code{light} or @code{dark}. This attribute is
1455currently unused, but should still be specified.
1456@end table
1437 1457
1438Two special theme names are disallowed (using them causes an error): 1458Two special theme names are disallowed (using them causes an error):
1439@code{user} is a dummy theme that stores the user's direct 1459@code{user} is a dummy theme that stores the user's direct
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi
index e1aa2de523c..b26d4f10585 100644
--- a/doc/lispref/files.texi
+++ b/doc/lispref/files.texi
@@ -1253,14 +1253,6 @@ the @samp{smb} method. For all other connection methods, runtime
1253tests are performed. 1253tests are performed.
1254@end defun 1254@end defun
1255 1255
1256@defun file-in-directory-p file dir
1257This function returns @code{t} if @var{file} is a file in directory
1258@var{dir}, or in a subdirectory of @var{dir}. It also returns
1259@code{t} if @var{file} and @var{dir} are the same directory. It
1260compares the truenames of the two directories. If @var{dir} does not
1261name an existing directory, the return value is @code{nil}.
1262@end defun
1263
1264@defun vc-responsible-backend file 1256@defun vc-responsible-backend file
1265This function determines the responsible VC backend of the given 1257This function determines the responsible VC backend of the given
1266@var{file}. For example, if @file{emacs.c} is a file tracked by Git, 1258@var{file}. For example, if @file{emacs.c} is a file tracked by Git,
@@ -1412,14 +1404,17 @@ The file's inode number (@code{file-attribute-inode-number}),
1412a nonnegative integer. 1404a nonnegative integer.
1413 1405
1414@item 1406@item
1415The filesystem number of the device that the file is on 1407The filesystem's identifier of the device that the file is on
1416@code{file-attribute-device-number}), an integer. 1408(@code{file-attribute-device-number}), an integer or a cons cell of
1417This element and the file's inode number 1409two integers. The latter is sometimes used by remote files, in order
1418together give enough information to distinguish any two files on the 1410to distinguish remote filesystems from local ones.
1419system---no two files can have the same values for both of these
1420numbers.
1421@end enumerate 1411@end enumerate
1422 1412
1413The file's inode and device together give enough information
1414to distinguish any two files on the system---no two files can have the
1415same values for both of these attributes. This tuple that uniquely
1416identifies the file is returned by @code{file-attribute-file-identifier}.
1417
1423For example, here are the file attributes for @file{files.texi}: 1418For example, here are the file attributes for @file{files.texi}:
1424 1419
1425@example 1420@example
@@ -3100,6 +3095,17 @@ is called with one argument (the file or directory) and should return
3100non-@code{nil} if that directory is the one it is looking for. 3095non-@code{nil} if that directory is the one it is looking for.
3101@end defun 3096@end defun
3102 3097
3098@cindex parent directory of file
3099@cindex ancestor directory of file
3100@cindex file, ancestor directory of
3101@defun file-in-directory-p file dir
3102This function returns @code{t} if @var{file} is a file in directory
3103@var{dir}, or in a subdirectory of @var{dir}. It also returns
3104@code{t} if @var{file} and @var{dir} are the same directory. It
3105compares the truenames of the two directories. If @var{dir} does not
3106name an existing directory, the return value is @code{nil}.
3107@end defun
3108
3103@defun directory-files-and-attributes directory &optional full-name match-regexp nosort id-format count 3109@defun directory-files-and-attributes directory &optional full-name match-regexp nosort id-format count
3104This is similar to @code{directory-files} in deciding which files 3110This is similar to @code{directory-files} in deciding which files
3105to report on and how to report their names. However, instead 3111to report on and how to report their names. However, instead
diff --git a/doc/lispref/loading.texi b/doc/lispref/loading.texi
index 4e4f12dc324..c7fbdac1d76 100644
--- a/doc/lispref/loading.texi
+++ b/doc/lispref/loading.texi
@@ -662,7 +662,7 @@ and @code{define-overloadable-function} (see the commentary in
662and @code{define-global-minor-mode}. 662and @code{define-global-minor-mode}.
663 663
664@item Other definition types: 664@item Other definition types:
665@code{defcustom}, @code{defgroup}, @code{defclass} 665@code{defcustom}, @code{defgroup}, @code{deftheme}, @code{defclass}
666(@pxref{Top,EIEIO,,eieio,EIEIO}), and @code{define-skeleton} 666(@pxref{Top,EIEIO,,eieio,EIEIO}), and @code{define-skeleton}
667(@pxref{Top,Autotyping,,autotype,Autotyping}). 667(@pxref{Top,Autotyping,,autotype,Autotyping}).
668@end table 668@end table
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index 8b859042ad0..509ce56725d 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -5321,9 +5321,12 @@ This has exactly the same effect as the previous example, but is more
5321efficient and safer (because it doesn't involve any string parsing or 5321efficient and safer (because it doesn't involve any string parsing or
5322interpolation). 5322interpolation).
5323 5323
5324@code{sqlite-execute} returns the number of affected rows. For 5324@code{sqlite-execute} usually returns the number of affected rows.
5325instance, an @samp{insert} statement will return @samp{1}, whereas an 5325For instance, an @samp{insert} statement will typically return
5326@samp{update} statement may return zero or a higher number. 5326@samp{1}, whereas an @samp{update} statement may return zero or a
5327higher number. However, when using @acronym{SQL} statements like
5328@w{@samp{insert into @dots{} returning @dots{}}} and the like, the values
5329specified by @w{@samp{returning @dots{}}} will be returned instead.
5327 5330
5328Strings in SQLite are, by default, stored as @code{utf-8}, and 5331Strings in SQLite are, by default, stored as @code{utf-8}, and
5329selecting a text column will decode the string using that charset. 5332selecting a text column will decode the string using that charset.
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index ee3b15992b7..e946a408fd6 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -6684,32 +6684,32 @@ time window change functions were run for @var{window}'s frame. If it
6684returns @code{nil}, @var{window} has been created after that. If it 6684returns @code{nil}, @var{window} has been created after that. If it
6685returns @code{t}, @var{window} was not shown at that time but has been 6685returns @code{t}, @var{window} was not shown at that time but has been
6686restored from a previously saved window configuration afterwards. 6686restored from a previously saved window configuration afterwards.
6687Otherwise, the return value is the buffer shown by @code{window} at 6687Otherwise, the return value is the buffer shown by @var{window} at
6688that time. 6688that time.
6689@end defun 6689@end defun
6690 6690
6691@defun window-old-pixel-width &optional window 6691@defun window-old-pixel-width &optional window
6692This function returns the total pixel width of @var{window} the 6692This function returns the total pixel width of @var{window} the
6693last time window change functions found @code{window} live on its 6693last time window change functions found @var{window} live on its
6694frame. It is zero if @code{window} was created after that. 6694frame. It is zero if @var{window} was created after that.
6695@end defun 6695@end defun
6696 6696
6697@defun window-old-pixel-height &optional window 6697@defun window-old-pixel-height &optional window
6698This function returns the total pixel height of @var{window} the last 6698This function returns the total pixel height of @var{window} the last
6699time window change functions found @code{window} live on its frame. 6699time window change functions found @var{window} live on its frame.
6700It is zero if @code{window} was created after that. 6700It is zero if @var{window} was created after that.
6701@end defun 6701@end defun
6702 6702
6703@defun window-old-body-pixel-width &optional window 6703@defun window-old-body-pixel-width &optional window
6704This function returns the pixel width of @var{window}'s text area the 6704This function returns the pixel width of @var{window}'s text area the
6705last time window change functions found @code{window} live on its 6705last time window change functions found @var{window} live on its
6706frame. It is zero if @code{window} was created after that. 6706frame. It is zero if @var{window} was created after that.
6707@end defun 6707@end defun
6708 6708
6709@defun window-old-body-pixel-height &optional window 6709@defun window-old-body-pixel-height &optional window
6710This function returns the pixel height of @var{window}'s text area the 6710This function returns the pixel height of @var{window}'s text area the
6711last time window change functions found @code{window} live on its 6711last time window change functions found @var{window} live on its
6712frame. It is zero if @code{window} was created after that. 6712frame. It is zero if @var{window} was created after that.
6713@end defun 6713@end defun
6714 6714
6715In order to find out which window or frame was selected the last time 6715In order to find out which window or frame was selected the last time
diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi
index 1f12c30b1f8..ab41737794c 100644
--- a/doc/misc/cc-mode.texi
+++ b/doc/misc/cc-mode.texi
@@ -580,7 +580,7 @@ you are going to be editing AWK files, @file{README} describes how to
580configure your (X)Emacs so that @ccmode{} will supersede the obsolete 580configure your (X)Emacs so that @ccmode{} will supersede the obsolete
581@code{awk-mode.el} which might have been supplied with your (X)Emacs. 581@code{awk-mode.el} which might have been supplied with your (X)Emacs.
582@ccmode{} might not work with older versions of Emacs or XEmacs. See 582@ccmode{} might not work with older versions of Emacs or XEmacs. See
583the @ccmode{} release notes at @uref{http://cc-mode.sourceforge.net} 583the @ccmode{} release notes at @uref{https://cc-mode.sourceforge.net}
584for the latest information on Emacs version and package compatibility 584for the latest information on Emacs version and package compatibility
585(@pxref{Updating CC Mode}). 585(@pxref{Updating CC Mode}).
586 586
@@ -3170,7 +3170,7 @@ E. Jones' Filladapt package@footnote{It's available from
3170lack a feature that makes it work suboptimally when 3170lack a feature that makes it work suboptimally when
3171@code{c-comment-prefix-regexp} matches the empty string (which it does 3171@code{c-comment-prefix-regexp} matches the empty string (which it does
3172by default). A patch for that is available from 3172by default). A patch for that is available from
3173@uref{http://cc-mode.sourceforge.net/,, the CC Mode web site}.}, 3173@uref{https://cc-mode.sourceforge.net/,, the CC Mode web site}.},
3174@c 2005/11/22: The above is still believed to be the case. 3174@c 2005/11/22: The above is still believed to be the case.
3175which handles things like bulleted lists nicely. There's a convenience 3175which handles things like bulleted lists nicely. There's a convenience
3176function @code{c-setup-filladapt} that tunes the relevant variables in 3176function @code{c-setup-filladapt} that tunes the relevant variables in
@@ -7583,7 +7583,7 @@ have old versions of @ccmode{} and so should be upgraded. Access to the
7583compatibility, etc.@: are all available on the web site: 7583compatibility, etc.@: are all available on the web site:
7584 7584
7585@quotation 7585@quotation
7586@uref{http://cc-mode.sourceforge.net/} 7586@uref{https://cc-mode.sourceforge.net/}
7587@end quotation 7587@end quotation
7588 7588
7589 7589
@@ -7617,7 +7617,7 @@ the GNU Bug Tracker at @url{https://debbugs.gnu.org}, then sends it on
7617to @email{bug-cc-mode@@gnu.org}. You can also send reports, other 7617to @email{bug-cc-mode@@gnu.org}. You can also send reports, other
7618questions, and suggestions (kudos?@: @t{;-)} to that address. It's a 7618questions, and suggestions (kudos?@: @t{;-)} to that address. It's a
7619mailing list which you can join or browse an archive of; see the web site at 7619mailing list which you can join or browse an archive of; see the web site at
7620@uref{http://cc-mode.sourceforge.net/} for further details. 7620@uref{https://cc-mode.sourceforge.net/} for further details.
7621 7621
7622@cindex announcement mailing list 7622@cindex announcement mailing list
7623If you want to get announcements of new @ccmode{} releases, send the 7623If you want to get announcements of new @ccmode{} releases, send the
diff --git a/doc/misc/efaq-w32.texi b/doc/misc/efaq-w32.texi
index 46c257e42e5..b58f6be7581 100644
--- a/doc/misc/efaq-w32.texi
+++ b/doc/misc/efaq-w32.texi
@@ -1744,7 +1744,7 @@ date now, so no concrete pointers are available.
1744 1744
1745You will need an implementation of TeX for Windows. 1745You will need an implementation of TeX for Windows.
1746A number of implementations are listed on the 1746A number of implementations are listed on the
1747@uref{http://www.tug.org/interest.html#free, TeX Users Group} website. 1747@uref{https://www.tug.org/interest.html#free, TeX Users Group} website.
1748 1748
1749@node Spell check 1749@node Spell check
1750@section How do I perform spell checks? 1750@section How do I perform spell checks?
@@ -1899,7 +1899,7 @@ Christopher Payne wrote a Visual Studio add-in that makes Emacs the
1899default text editor, this has now been taken over by Jeff Paquette. 1899default text editor, this has now been taken over by Jeff Paquette.
1900See the following two URLs for details: 1900See the following two URLs for details:
1901@itemize 1901@itemize
1902@item @uref{http://sourceforge.net/projects/visemacs/} for the latest version. 1902@item @uref{https://sourceforge.net/projects/visemacs/} for the latest version.
1903@item @uref{http://www.smathers.net/VisEmacs.htm} for notes on usage. 1903@item @uref{http://www.smathers.net/VisEmacs.htm} for notes on usage.
1904@end itemize 1904@end itemize
1905 1905
@@ -2039,7 +2039,7 @@ this option is set. (I don't see it on VC++ 4.0.)
2039@cindex Borland C++, integration with Emacs 2039@cindex Borland C++, integration with Emacs
2040 2040
2041Jonathan Arnold has written an 2041Jonathan Arnold has written an
2042@uref{http://www.buddydog.org/C++Builder/c++builder.html, EmacsEdit 2042@uref{https://www.buddydog.org/C++Builder/c++builder.html, EmacsEdit
2043``expert''} for interfacing C++ Builder and Emacs. 2043``expert''} for interfacing C++ Builder and Emacs.
2044 2044
2045@node Version control 2045@node Version control
@@ -2194,7 +2194,7 @@ to port software to Windows.
2194@cindex image libraries, gnuwin32 2194@cindex image libraries, gnuwin32
2195@cindex image libraries, development 2195@cindex image libraries, development
2196 2196
2197@uref{http://gnuwin32.sourceforge.net/} 2197@uref{https://gnuwin32.sourceforge.net/}
2198 2198
2199GnuWin32 provides precompiled native Windows ports of a wide selection 2199GnuWin32 provides precompiled native Windows ports of a wide selection
2200of Free software and libraries. Unfortunately, the ports are 2200of Free software and libraries. Unfortunately, the ports are
diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi
index 0da397919db..23e3b086a3a 100644
--- a/doc/misc/efaq.texi
+++ b/doc/misc/efaq.texi
@@ -3622,13 +3622,13 @@ To build Emacs from source for MS-DOS, see the instructions in the file
3622on plain DOS, and also on all versions of MS-Windows from version 3.X 3622on plain DOS, and also on all versions of MS-Windows from version 3.X
3623onwards, including Windows XP and Vista. Pre-built binaries may be 3623onwards, including Windows XP and Vista. Pre-built binaries may be
3624available at 3624available at
3625@uref{http://www.delorie.com/pub/djgpp/current/v2gnu/emacs.README} 3625@uref{https://www.delorie.com/pub/djgpp/current/v2gnu/emacs.README}
3626 3626
3627For a list of other implementations of Emacs (and Emacs 3627For a list of other implementations of Emacs (and Emacs
3628look-alikes), consult the list of ``Emacs implementations and literature,'' 3628look-alikes), consult the list of ``Emacs implementations and literature,''
3629available at 3629available at
3630 3630
3631@uref{http://www.finseth.com/emacs.html} 3631@uref{https://www.finseth.com/emacs.html}
3632 3632
3633Note that while many of these programs look similar to Emacs, they often 3633Note that while many of these programs look similar to Emacs, they often
3634lack certain features, such as the Emacs Lisp extension language. 3634lack certain features, such as the Emacs Lisp extension language.
@@ -3757,7 +3757,7 @@ Various spell-checkers are compatible with Emacs, including:
3757@table @b 3757@table @b
3758 3758
3759@item Hunspell 3759@item Hunspell
3760@uref{http://hunspell.sourceforge.net/} 3760@uref{https://hunspell.github.io/}
3761 3761
3762@item GNU Aspell 3762@item GNU Aspell
3763@uref{http://aspell.net/} 3763@uref{http://aspell.net/}
diff --git a/doc/misc/gnus-faq.texi b/doc/misc/gnus-faq.texi
index 3aad985c5a4..7cb5621b694 100644
--- a/doc/misc/gnus-faq.texi
+++ b/doc/misc/gnus-faq.texi
@@ -1330,7 +1330,7 @@ details.
1330 1330
1331However, what you really want is the Insidious Big Brother 1331However, what you really want is the Insidious Big Brother
1332Database bbdb. Get it from 1332Database bbdb. Get it from
1333@uref{http://bbdb.sourceforge.net/, bbdb's website}. 1333@uref{https://bbdb.sourceforge.net/, bbdb's website}.
1334Now place the following in @file{~/.gnus.el}, to activate bbdb for Gnus: 1334Now place the following in @file{~/.gnus.el}, to activate bbdb for Gnus:
1335 1335
1336@example 1336@example
@@ -1782,13 +1782,13 @@ when you're online.
1782Let's talk about Unix systems first: For the news part, 1782Let's talk about Unix systems first: For the news part,
1783the easiest solution is a small nntp server like 1783the easiest solution is a small nntp server like
1784@uref{https://www.leafnode.org/, Leafnode} or 1784@uref{https://www.leafnode.org/, Leafnode} or
1785@uref{http://patrik.iki.fi/sn/, sn}, 1785@uref{https://patrik.iki.fi/sn/, sn},
1786of course you can also install a full featured news 1786of course you can also install a full featured news
1787server like 1787server like
1788@uref{https://www.isc.org/othersoftware/, inn}. 1788@uref{https://www.isc.org/othersoftware/, inn}.
1789Then you want to fetch your Mail, popular choices 1789Then you want to fetch your Mail, popular choices
1790are @uref{https://www.fetchmail.info/, fetchmail} 1790are @uref{https://www.fetchmail.info/, fetchmail}
1791and @uref{http://pyropus.ca/software/getmail/, getmail}. 1791and @uref{https://pyropus.ca/software/getmail/, getmail}.
1792You should tell those to write the mail to your disk and 1792You should tell those to write the mail to your disk and
1793Gnus to read it from there. Last but not least the mail 1793Gnus to read it from there. Last but not least the mail
1794sending part: This can be done with every MTA like 1794sending part: This can be done with every MTA like
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
index b1331e79bf4..4180b9be108 100644
--- a/doc/misc/gnus.texi
+++ b/doc/misc/gnus.texi
@@ -8045,7 +8045,7 @@ to a string containing the default command and options (default
8045@findex gnus-summary-muttprint 8045@findex gnus-summary-muttprint
8046@vindex gnus-summary-muttprint-program 8046@vindex gnus-summary-muttprint-program
8047Save the current article into muttprint. That is, print it using the 8047Save the current article into muttprint. That is, print it using the
8048external program @uref{http://muttprint.sourceforge.net/, 8048external program @uref{https://muttprint.sourceforge.net/,
8049Muttprint}. The program name and options to use is controlled by the 8049Muttprint}. The program name and options to use is controlled by the
8050variable @code{gnus-summary-muttprint-program}. 8050variable @code{gnus-summary-muttprint-program}.
8051(@code{gnus-summary-muttprint}). 8051(@code{gnus-summary-muttprint}).
@@ -9343,7 +9343,7 @@ Use Gnus rendered based on w3m.
9343Use @uref{http://emacs-w3m.namazu.org/, emacs-w3m}. 9343Use @uref{http://emacs-w3m.namazu.org/, emacs-w3m}.
9344 9344
9345@item w3m-standalone 9345@item w3m-standalone
9346Use @uref{http://w3m.sourceforge.net/, w3m}. 9346Use @uref{https://w3m.sourceforge.net/, w3m}.
9347 9347
9348@item links 9348@item links
9349Use @uref{http://links.twibright.com/, Links}. 9349Use @uref{http://links.twibright.com/, Links}.
@@ -13602,7 +13602,7 @@ Here's the method for a public spool:
13602If you are behind a firewall and only have access to the @acronym{NNTP} 13602If you are behind a firewall and only have access to the @acronym{NNTP}
13603server from the firewall machine, you can instruct Gnus to @code{rlogin} 13603server from the firewall machine, you can instruct Gnus to @code{rlogin}
13604on the firewall machine and connect with 13604on the firewall machine and connect with
13605@uref{http://netcat.sourceforge.net/, netcat} from there to the 13605@uref{https://netcat.sourceforge.net/, netcat} from there to the
13606@acronym{NNTP} server. 13606@acronym{NNTP} server.
13607Doing this can be rather fiddly, but your virtual server definition 13607Doing this can be rather fiddly, but your virtual server definition
13608should probably look something like this: 13608should probably look something like this:
@@ -23794,7 +23794,7 @@ On a GNU/Linux system, the @code{display} program is included in the
23794ImageMagick package. For external conversion programs look for packages 23794ImageMagick package. For external conversion programs look for packages
23795with names like @code{netpbm}, @code{libgr-progs} and @code{compface}. 23795with names like @code{netpbm}, @code{libgr-progs} and @code{compface}.
23796On Windows, you may use the packages @code{netpbm} and @code{compface} 23796On Windows, you may use the packages @code{netpbm} and @code{compface}
23797from @url{http://gnuwin32.sourceforge.net}. You need to add the 23797from @url{https://gnuwin32.sourceforge.net}. You need to add the
23798@code{bin} directory to your @code{PATH} environment variable. 23798@code{bin} directory to your @code{PATH} environment variable.
23799@c In fact only the following DLLs and binaries seem to be required: 23799@c In fact only the following DLLs and binaries seem to be required:
23800@c compface1.dll uncompface.exe libnetpbm10.dll icontopbm.exe 23800@c compface1.dll uncompface.exe libnetpbm10.dll icontopbm.exe
diff --git a/doc/misc/mh-e.texi b/doc/misc/mh-e.texi
index 6aa2cf290da..1a80c62edba 100644
--- a/doc/misc/mh-e.texi
+++ b/doc/misc/mh-e.texi
@@ -3082,7 +3082,7 @@ retracted---without question@footnote{In previous versions of MH-E,
3082this option suppressed the confirmation in @code{mh-kill-folder}. 3082this option suppressed the confirmation in @code{mh-kill-folder}.
3083Since this kept most users from setting this option, 3083Since this kept most users from setting this option,
3084@code{mh-kill-folder} was modified in version 6.0 to always ask for 3084@code{mh-kill-folder} was modified in version 6.0 to always ask for
3085confirmation subject to @code{mh-kill-folder-suppress-prompt-hook}. 3085confirmation subject to @code{mh-kill-folder-suppress-prompt-functions}.
3086@xref{Folders}.}. 3086@xref{Folders}.}.
3087 3087
3088@cindex MH-Folder mode 3088@cindex MH-Folder mode
@@ -3364,7 +3364,7 @@ Hook run by q before quitting MH-E (default: @code{nil}).
3364Hook run by @code{mh-folder-mode} when visiting a new folder (default: 3364Hook run by @code{mh-folder-mode} when visiting a new folder (default:
3365@code{nil}). 3365@code{nil}).
3366@c ------------------------- 3366@c -------------------------
3367@item mh-kill-folder-suppress-prompt-hook 3367@item mh-kill-folder-suppress-prompt-functions
3368Abnormal hook run at the beginning of @code{mh-kill-folder} (default: 3368Abnormal hook run at the beginning of @code{mh-kill-folder} (default:
3369@code{'mh-search-p}). 3369@code{'mh-search-p}).
3370@c ------------------------- 3370@c -------------------------
@@ -7540,8 +7540,8 @@ Allowlisted message face
7540@cindex spam filters, bogofilter 7540@cindex spam filters, bogofilter
7541 7541
7542MH-E depends on @uref{https://spamassassin.apache.org/, SpamAssassin}, 7542MH-E depends on @uref{https://spamassassin.apache.org/, SpamAssassin},
7543@uref{http://bogofilter.sourceforge.net/, bogofilter}, or 7543@uref{https://bogofilter.sourceforge.net/, bogofilter}, or
7544@uref{http://spamprobe.sourceforge.net/, SpamProbe} to throw the dreck 7544@uref{https://spamprobe.sourceforge.net/, SpamProbe} to throw the dreck
7545away. This chapter describes briefly how to configure these programs 7545away. This chapter describes briefly how to configure these programs
7546to work well with MH-E and how to use MH-E's interface that provides 7546to work well with MH-E and how to use MH-E's interface that provides
7547continuing education for these programs. 7547continuing education for these programs.
@@ -7721,7 +7721,7 @@ done by adding the following to your @file{crontab}:
7721 7721
7722Bogofilter is a Bayesian spam filtering program. Get it from your 7722Bogofilter is a Bayesian spam filtering program. Get it from your
7723local distribution or from the 7723local distribution or from the
7724@uref{http://bogofilter.sourceforge.net/, bogofilter web site}. 7724@uref{https://bogofilter.sourceforge.net/, bogofilter web site}.
7725 7725
7726Bogofilter is taught by running: 7726Bogofilter is taught by running:
7727 7727
@@ -7791,7 +7791,7 @@ bogofilter.
7791@cindex spam filters, SpamProbe 7791@cindex spam filters, SpamProbe
7792 7792
7793SpamProbe is a Bayesian spam filtering program. Get it from your local 7793SpamProbe is a Bayesian spam filtering program. Get it from your local
7794distribution or from the @uref{http://spamprobe.sourceforge.net, 7794distribution or from the @uref{https://spamprobe.sourceforge.net,
7795SpamProbe web site}. 7795SpamProbe web site}.
7796 7796
7797To use SpamProbe, add the following recipes to @file{~/.procmailrc}: 7797To use SpamProbe, add the following recipes to @file{~/.procmailrc}:
@@ -8633,7 +8633,7 @@ via SourceForge (@pxref{Bug Reports}).
8633@cindex FAQ 8633@cindex FAQ
8634@cindex MH FAQ 8634@cindex MH FAQ
8635 8635
8636The article @uref{http://www.newt.com/faq/mh.html, @cite{MH Frequently 8636The article @uref{https://www.newt.com/faq/mh.html, @cite{MH Frequently
8637Asked Questions (FAQ) with Answers}} appears monthly in the newsgroup 8637Asked Questions (FAQ) with Answers}} appears monthly in the newsgroup
8638@samp{comp.mail.mh}. While very little is there that deals with MH-E 8638@samp{comp.mail.mh}. While very little is there that deals with MH-E
8639specifically, there is an incredible wealth of material about MH 8639specifically, there is an incredible wealth of material about MH
diff --git a/doc/misc/org.org b/doc/misc/org.org
index 1ce99728c60..ae3ca0b64f3 100644
--- a/doc/misc/org.org
+++ b/doc/misc/org.org
@@ -68,8 +68,8 @@ of Org, as well as additional information, frequently asked questions
68[[https://orgmode.org]]. 68[[https://orgmode.org]].
69 69
70#+cindex: print edition 70#+cindex: print edition
71An earlier version (7.3) of this manual is available as a [[http://www.network-theory.co.uk/org/manual/][paperback 71An earlier version (7.3) of this manual was published as a paperback book by
72book from Network Theory Ltd.]]. 72Network Theory Ltd. in 2010.
73 73
74** Installation 74** Installation
75:PROPERTIES: 75:PROPERTIES:
@@ -3234,7 +3234,7 @@ options:
3234 3234
3235| Link Type | Example | 3235| Link Type | Example |
3236|------------+----------------------------------------------------------| 3236|------------+----------------------------------------------------------|
3237| http | =http://staff.science.uva.nl/c.dominik/= | 3237| http | =https://staff.science.uva.nl/c.dominik/= |
3238| https | =https://orgmode.org/= | 3238| https | =https://orgmode.org/= |
3239| doi | =doi:10.1000/182= | 3239| doi | =doi:10.1000/182= |
3240| file | =file:/home/dominik/images/jupiter.jpg= | 3240| file | =file:/home/dominik/images/jupiter.jpg= |
@@ -3567,7 +3567,7 @@ replacement text. Here is an example:
3567 '(("bugzilla" . "http://10.1.2.9/bugzilla/show_bug.cgi?id=") 3567 '(("bugzilla" . "http://10.1.2.9/bugzilla/show_bug.cgi?id=")
3568 ("Nu Html Checker" . "https://validator.w3.org/nu/?doc=%h") 3568 ("Nu Html Checker" . "https://validator.w3.org/nu/?doc=%h")
3569 ("duckduckgo" . "https://duckduckgo.com/?q=%s") 3569 ("duckduckgo" . "https://duckduckgo.com/?q=%s")
3570 ("omap" . "http://nominatim.openstreetmap.org/search?q=%s&polygon=1") 3570 ("omap" . "https://nominatim.openstreetmap.org/search?q=%s&polygon=1")
3571 ("ads" . "https://ui.adsabs.harvard.edu/search/q=%20author%3A\"%s\""))) 3571 ("ads" . "https://ui.adsabs.harvard.edu/search/q=%20author%3A\"%s\"")))
3572#+end_src 3572#+end_src
3573 3573
@@ -3596,7 +3596,7 @@ can define them in the file with
3596 3596
3597#+cindex: @samp{LINK}, keyword 3597#+cindex: @samp{LINK}, keyword
3598#+begin_example 3598#+begin_example
3599,#+LINK: bugzilla http://10.1.2.9/bugzilla/show_bug.cgi?id= 3599,#+LINK: bugzilla https://10.1.2.9/bugzilla/show_bug.cgi?id=
3600,#+LINK: duckduckgo https://duckduckgo.com/?q=%s 3600,#+LINK: duckduckgo https://duckduckgo.com/?q=%s
3601#+end_example 3601#+end_example
3602 3602
@@ -13642,7 +13642,7 @@ not have descriptions, such as these links =[[file:img.jpg]]= or
13642=[[./img.jpg]]=, as direct image insertions in the final PDF output. In 13642=[[./img.jpg]]=, as direct image insertions in the final PDF output. In
13643the PDF, they are no longer links but actual images embedded on the 13643the PDF, they are no longer links but actual images embedded on the
13644page. The LaTeX export back-end uses =\includegraphics= macro to 13644page. The LaTeX export back-end uses =\includegraphics= macro to
13645insert the image. But for TikZ (http://sourceforge.net/projects/pgf/) 13645insert the image. But for TikZ (https://sourceforge.net/projects/pgf/)
13646images, the back-end uses an ~\input~ macro wrapped within 13646images, the back-end uses an ~\input~ macro wrapped within
13647a ~tikzpicture~ environment. 13647a ~tikzpicture~ environment.
13648 13648
@@ -13982,7 +13982,7 @@ some text in German...
13982#+cindex: Markdown export 13982#+cindex: Markdown export
13983 13983
13984The Markdown export back-end, "md", converts an Org file to Markdown 13984The Markdown export back-end, "md", converts an Org file to Markdown
13985format, as defined at http://daringfireball.net/projects/markdown/. 13985format, as defined at https://daringfireball.net/projects/markdown/.
13986 13986
13987Since it is built on top of the HTML back-end (see [[*HTML Export]]), it 13987Since it is built on top of the HTML back-end (see [[*HTML Export]]), it
13988converts every Org construct not defined in Markdown syntax, such as 13988converts every Org construct not defined in Markdown syntax, such as
@@ -22053,7 +22053,7 @@ MathJax are processed. When dvipng, dvisvgm, or ImageMagick suite is
22053used to create images, any LaTeX environment is handled. 22053used to create images, any LaTeX environment is handled.
22054 22054
22055[fn:112] These are respectively available at 22055[fn:112] These are respectively available at
22056[[http://sourceforge.net/projects/dvipng/]], [[http://dvisvgm.bplaced.net/]] 22056[[https://sourceforge.net/projects/dvipng/]], [[http://dvisvgm.bplaced.net/]]
22057and from the ImageMagick suite. Choose the converter by setting the 22057and from the ImageMagick suite. Choose the converter by setting the
22058variable ~org-preview-latex-default-process~ accordingly. 22058variable ~org-preview-latex-default-process~ accordingly.
22059 22059
@@ -22123,9 +22123,9 @@ semantic relevance.
22123 22123
22124[fn:130] Please note that exported formulas are part of an HTML 22124[fn:130] Please note that exported formulas are part of an HTML
22125document, and that signs such as =<=, =>=, or =&= have special 22125document, and that signs such as =<=, =>=, or =&= have special
22126meanings. See [[http://docs.mathjax.org/en/latest/tex.html#tex-and-latex-in-html-documents][MathJax TeX and LaTeX support]]. 22126meanings. See [[https://docs.mathjax.org/en/latest/tex.html#tex-and-latex-in-html-documents][MathJax TeX and LaTeX support]].
22127 22127
22128[fn:131] See [[http://docs.mathjax.org/en/latest/tex.html#tex-extensions][TeX and LaTeX extensions]] in the [[http://docs.mathjax.org][MathJax manual]] to learn 22128[fn:131] See [[https://docs.mathjax.org/en/latest/tex.html#tex-extensions][TeX and LaTeX extensions]] in the [[https://docs.mathjax.org][MathJax manual]] to learn
22129about extensions. 22129about extensions.
22130 22130
22131[fn:132] If the classes on TODO keywords and tags lead to conflicts, 22131[fn:132] If the classes on TODO keywords and tags lead to conflicts,
@@ -22140,14 +22140,14 @@ as latexmk, can select the correct bibliography compiler.
22140which requires the flag =-shell-escape= to be added to 22140which requires the flag =-shell-escape= to be added to
22141~org-latex-pdf-process~. 22141~org-latex-pdf-process~.
22142 22142
22143[fn:135] See [[http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2.html][Open Document Format for Office Applications 22143[fn:135] See [[https://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2.html][Open Document Format for Office Applications
22144(OpenDocument) Version 1.2]]. 22144(OpenDocument) Version 1.2]].
22145 22145
22146[fn:136] See [[http://www.mathtoweb.com/cgi-bin/mathtoweb_home.pl][MathToWeb]]. 22146[fn:136] See [[http://www.mathtoweb.com/cgi-bin/mathtoweb_home.pl][MathToWeb]].
22147 22147
22148[fn:137] See [[http://dlmf.nist.gov/LaTeXML/]]. 22148[fn:137] See [[https://dlmf.nist.gov/LaTeXML/]].
22149 22149
22150[fn:138] [[http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2.html][OpenDocument-v1.2 Specification]] 22150[fn:138] [[https://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2.html][OpenDocument-v1.2 Specification]]
22151 22151
22152[fn:139] See the =<table:table-template>= element of the 22152[fn:139] See the =<table:table-template>= element of the
22153OpenDocument-v1.2 specification. 22153OpenDocument-v1.2 specification.
@@ -22170,7 +22170,7 @@ are not evaluated when they appear in a keyword (see [[*Summary of
22170In-Buffer Settings]]). 22170In-Buffer Settings]]).
22171 22171
22172[fn:144] For noweb literate programming details, see 22172[fn:144] For noweb literate programming details, see
22173http://www.cs.tufts.edu/~nr/noweb/. 22173https://www.cs.tufts.edu/~nr/noweb/.
22174 22174
22175[fn:145] For more information, please refer to the commentary section 22175[fn:145] For more information, please refer to the commentary section
22176in =org-tempo.el=. 22176in =org-tempo.el=.
diff --git a/doc/misc/remember.texi b/doc/misc/remember.texi
index 9d1fe545d47..80bb6966e2b 100644
--- a/doc/misc/remember.texi
+++ b/doc/misc/remember.texi
@@ -424,13 +424,6 @@ The default priority for remembered mail messages.
424@section Saving to an Org Mode file 424@section Saving to an Org Mode file
425@cindex org mode, integration 425@cindex org mode, integration
426 426
427@ignore
428From org.texi:
429Up to version 6.36 Org used a special setup
430for @file{remember.el}. @file{org-remember.el} is still part of Org mode for
431backward compatibility with existing setups. You can find the documentation
432for org-remember at @url{http://orgmode.org/org-remember.pdf}.
433@end ignore
434For instructions on how to integrate Remember with Org Mode, 427For instructions on how to integrate Remember with Org Mode,
435consult @ref{Capture, , , org}. 428consult @ref{Capture, , , org}.
436 429
diff --git a/doc/misc/semantic.texi b/doc/misc/semantic.texi
index 25ba30d13c9..b23e4c36fe3 100644
--- a/doc/misc/semantic.texi
+++ b/doc/misc/semantic.texi
@@ -82,7 +82,7 @@ hippie-expand, and several other parts of Emacs.
82 82
83To send bug reports, or participate in discussions about semantic, 83To send bug reports, or participate in discussions about semantic,
84use the mailing list cedet-semantic@@sourceforge.net via the URL: 84use the mailing list cedet-semantic@@sourceforge.net via the URL:
85@url{http://lists.sourceforge.net/lists/listinfo/cedet-semantic} 85@url{https://lists.sourceforge.net/lists/listinfo/cedet-semantic}
86 86
87@ifnottex 87@ifnottex
88@insertcopying 88@insertcopying
diff --git a/doc/misc/sieve.texi b/doc/misc/sieve.texi
index df03dd01442..77a393192c2 100644
--- a/doc/misc/sieve.texi
+++ b/doc/misc/sieve.texi
@@ -339,7 +339,7 @@ Indicate which script on the server should be active.
339The Emacs Sieve package implements all or parts of a small but 339The Emacs Sieve package implements all or parts of a small but
340hopefully growing number of RFCs and drafts documents. This chapter 340hopefully growing number of RFCs and drafts documents. This chapter
341lists the relevant ones. They can all be fetched from 341lists the relevant ones. They can all be fetched from
342@uref{http://quimby.gnus.org/notes/}. 342@uref{https://quimby.gnus.org/notes/}.
343 343
344@table @dfn 344@table @dfn
345 345
diff --git a/doc/misc/vhdl-mode.texi b/doc/misc/vhdl-mode.texi
index 7d451c71bd4..8abf882a291 100644
--- a/doc/misc/vhdl-mode.texi
+++ b/doc/misc/vhdl-mode.texi
@@ -892,7 +892,7 @@ list. Send email to the maintainer @email{reto@@gnu.org} to join
892either of these lists. 892either of these lists.
893 893
894The official Emacs VHDL Mode Home Page can be found at 894The official Emacs VHDL Mode Home Page can be found at
895@uref{http://www.iis.ee.ethz.ch/~zimmi/emacs/vhdl-mode.html}. 895@uref{https://www.iis.ee.ethz.ch/~zimmi/emacs/vhdl-mode.html}.
896 896
897@node Sample Init File 897@node Sample Init File
898@chapter Sample Init File 898@chapter Sample Init File
diff --git a/etc/DEBUG b/etc/DEBUG
index f57e6f197bf..ef9160a2090 100644
--- a/etc/DEBUG
+++ b/etc/DEBUG
@@ -1004,7 +1004,7 @@ incompatible with the --with-dumping=unexec option of 'configure'.
1004 1004
1005** Running Emacs under Valgrind 1005** Running Emacs under Valgrind
1006 1006
1007Valgrind <http://valgrind.org/> is free software that can be useful 1007Valgrind <https://valgrind.org/> is free software that can be useful
1008when debugging low-level Emacs problems. Unlike GCC sanitizers, 1008when debugging low-level Emacs problems. Unlike GCC sanitizers,
1009Valgrind does not need you to compile Emacs with special debugging 1009Valgrind does not need you to compile Emacs with special debugging
1010flags, so it can be helpful in investigating problems that vanish when 1010flags, so it can be helpful in investigating problems that vanish when
diff --git a/etc/NEWS b/etc/NEWS
index ab7145b0d97..965d2689b20 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1024,6 +1024,12 @@ The apropos commands will now select the apropos window if
1024If the symbol at point is a keymap, 'describe-keymap' suggests it as 1024If the symbol at point is a keymap, 'describe-keymap' suggests it as
1025the default candidate. 1025the default candidate.
1026 1026
1027---
1028*** New command 'help-quick' displays an overview of common commands.
1029The command pops up a buffer at the bottom of the screen with a few
1030helpful commands for various tasks. You can toggle the display using
1031'C-h q'.
1032
1027** Outline Mode 1033** Outline Mode
1028 1034
1029+++ 1035+++
@@ -1376,6 +1382,11 @@ the ecomplete database.
1376*** New user option 'ecomplete-auto-select'. 1382*** New user option 'ecomplete-auto-select'.
1377If non-nil and there's only one matching option, auto-select that. 1383If non-nil and there's only one matching option, auto-select that.
1378 1384
1385---
1386*** New user option 'ecomplete-filter-regexp'.
1387If non-nil, this user option describes what entries not to add to the
1388database stored on disk.
1389
1379** Dired 1390** Dired
1380 1391
1381+++ 1392+++
@@ -1897,7 +1908,7 @@ If non-nil, multiple revisions can be queried. This is done using
1897'completing-read-multiple'. 1908'completing-read-multiple'.
1898 1909
1899--- 1910---
1900*** New function 'vc-read-multiple-revisions' 1911*** New function 'vc-read-multiple-revisions'.
1901This function invokes 'vc-read-revision' with a non-nil value for 1912This function invokes 'vc-read-revision' with a non-nil value for
1902MULTIPLE. 1913MULTIPLE.
1903 1914
@@ -1905,7 +1916,7 @@ MULTIPLE.
1905*** New command 'vc-prepare-patch'. 1916*** New command 'vc-prepare-patch'.
1906Patches for any version control system can be prepared using VC. The 1917Patches for any version control system can be prepared using VC. The
1907command will query what commits to send and will compose messages for 1918command will query what commits to send and will compose messages for
1908your mail user agent. The behaviour of 'vc-prepare-patch' can be 1919your mail user agent. The behavior of 'vc-prepare-patch' can be
1909modified by the user options 'vc-prepare-patches-separately' and 1920modified by the user options 'vc-prepare-patches-separately' and
1910'vc-default-patch-addressee'. 1921'vc-default-patch-addressee'.
1911 1922
@@ -2860,6 +2871,11 @@ Previously, ';;;###' specs inside a top-level form (i.e., something
2860like '(when ... ;;;### ...)' would be ignored. They are now parsed as 2871like '(when ... ;;;### ...)' would be ignored. They are now parsed as
2861normal. 2872normal.
2862 2873
2874---
2875** Themes have special autoload cookies.
2876All build-in themes are scraped for ;;;###theme-autoload cookies that
2877are loaded along with the regular auto-loaded code.
2878
2863+++ 2879+++
2864** 'buffer-modified-p' has been extended. 2880** 'buffer-modified-p' has been extended.
2865This function was previously documented to return only nil or t. This 2881This function was previously documented to return only nil or t. This
@@ -3173,6 +3189,13 @@ The following generalized variables have been made obsolete:
3173* Lisp Changes in Emacs 29.1 3189* Lisp Changes in Emacs 29.1
3174 3190
3175+++ 3191+++
3192** New accessor function 'file-attribute-file-identifier'.
3193It returns the list of the inode number and device identifier
3194retrieved by 'file-attributes'. This value can be used to identify a
3195file uniquely. The device identifier can be a single number or (for
3196remote files) a cons of 2 numbers.
3197
3198+++
3176** New macro 'while-let'. 3199** New macro 'while-let'.
3177This is like 'when-let', but repeats until a binding form is nil. 3200This is like 'when-let', but repeats until a binding form is nil.
3178 3201
diff --git a/etc/NEWS.21 b/etc/NEWS.21
index 6c25a763785..a718283191b 100644
--- a/etc/NEWS.21
+++ b/etc/NEWS.21
@@ -217,7 +217,7 @@ Default is 'grow-only'.
217** LessTif support. 217** LessTif support.
218 218
219Emacs now runs with the LessTif toolkit (see 219Emacs now runs with the LessTif toolkit (see
220<http://lesstif.sourceforge.net>). You will need version 0.92.26, or later. 220<https://lesstif.sourceforge.net>). You will need version 0.92.26, or later.
221 221
222** LessTif/Motif file selection dialog. 222** LessTif/Motif file selection dialog.
223 223
diff --git a/etc/NEWS.22 b/etc/NEWS.22
index d7b26dda515..b4ecbe70393 100644
--- a/etc/NEWS.22
+++ b/etc/NEWS.22
@@ -3540,7 +3540,7 @@ read-only on computers that are administered by someone else.
3540PBM and XBM images are supported out of the box. Other image formats 3540PBM and XBM images are supported out of the box. Other image formats
3541depend on external libraries. All of these libraries have been ported 3541depend on external libraries. All of these libraries have been ported
3542to Windows, and can be found in both source and binary form at 3542to Windows, and can be found in both source and binary form at
3543http://gnuwin32.sourceforge.net/. Note that libpng also depends on 3543https://gnuwin32.sourceforge.net/. Note that libpng also depends on
3544zlib, and tiff depends on the version of jpeg that it was compiled 3544zlib, and tiff depends on the version of jpeg that it was compiled
3545against. For additional information, see nt/INSTALL. 3545against. For additional information, see nt/INSTALL.
3546 3546
diff --git a/etc/NEWS.25 b/etc/NEWS.25
index d1e43e0538e..e716f8194f5 100644
--- a/etc/NEWS.25
+++ b/etc/NEWS.25
@@ -72,7 +72,7 @@ using large fonts, at the price of a larger memory footprint.
72** The version number of CC Mode has been changed from 5.33 to 72** The version number of CC Mode has been changed from 5.33 to
735.32.99, although the software itself hasn't changed. This aims to 735.32.99, although the software itself hasn't changed. This aims to
74reduce confusion with the standalone CC Mode 5.33 (available from 74reduce confusion with the standalone CC Mode 5.33 (available from
75http://cc-mode.sourceforge.net), which is a more mature version than 75https://cc-mode.sourceforge.net), which is a more mature version than
76the one included in Emacs 25.2. 76the one included in Emacs 25.2.
77 77
78 78
diff --git a/etc/NEWS.26 b/etc/NEWS.26
index 50a711a0d14..9a6a7992088 100644
--- a/etc/NEWS.26
+++ b/etc/NEWS.26
@@ -1223,7 +1223,7 @@ specialized for editing freedesktop.org desktop entries.
1223editing Less files. 1223editing Less files.
1224 1224
1225** New package 'auth-source-pass' integrates 'auth-source' with the 1225** New package 'auth-source-pass' integrates 'auth-source' with the
1226password manager password-store (http://passwordstore.org). 1226password manager password-store (https://passwordstore.org).
1227 1227
1228 1228
1229* Incompatible Lisp Changes in Emacs 26.1 1229* Incompatible Lisp Changes in Emacs 26.1
diff --git a/etc/TODO b/etc/TODO
index d884539037d..cd02cf70230 100644
--- a/etc/TODO
+++ b/etc/TODO
@@ -509,7 +509,7 @@ Also for listing fonts, displaying a font as a sample, etc.
509 509
510** Program Enriched mode to read and save in RTF 510** Program Enriched mode to read and save in RTF
511Is there actually a decent single definition of RTF? Maybe see info at 511Is there actually a decent single definition of RTF? Maybe see info at
512http://latex2rtf.sourceforge.net/. 512https://latex2rtf.sourceforge.net/.
513 513
514This task seems to be addressed by 514This task seems to be addressed by
515https://savannah.nongnu.org/projects/emacs-rtf/, which is still in 515https://savannah.nongnu.org/projects/emacs-rtf/, which is still in
@@ -886,7 +886,6 @@ window associated with that modeline.
886https://lists.gnu.org/r/emacs-devel/2007-09/msg02416.html 886https://lists.gnu.org/r/emacs-devel/2007-09/msg02416.html
887 887
888** Random things that were planned for Emacs-24 888** Random things that were planned for Emacs-24
889
890Stefan Monnier writes: "Random things that cross my mind right now 889Stefan Monnier writes: "Random things that cross my mind right now
891that I'd like to see. Some of them from my local hacks, but it's not 890that I'd like to see. Some of them from my local hacks, but it's not
892obvious at all whether they'll make it." 891obvious at all whether they'll make it."
@@ -1737,11 +1736,18 @@ https://lists.gnu.org/r/emacs-devel/2012-06/msg00354.html
1737** Maybe replace lib-src/rcs2log with a Lisp implementation 1736** Maybe replace lib-src/rcs2log with a Lisp implementation
1738It wouldn't have to be a complete replacement, just enough 1737It wouldn't have to be a complete replacement, just enough
1739for vc-rcs-update-changelog. 1738for vc-rcs-update-changelog.
1739
1740** Allow Emacs to use the bottom-right corner of a TTY 1740** Allow Emacs to use the bottom-right corner of a TTY
1741Emacs doesn't use the bottom-right corner of a TTY when terminfo 1741Emacs doesn't use the bottom-right corner of a TTY when terminfo
1742capability "am" (auto_right_margin) is defined. It could use the 1742capability "am" (auto_right_margin) is defined. It could use the
1743bottom-right corner nonetheless when certain other capabilities are 1743bottom-right corner nonetheless when certain other capabilities are
1744defined. See bug#57607. 1744defined. See bug#57607.
1745
1746** Replace tramp-archive.el by a native libarchive(3) implementation.
1747The former is based on the GVFS archive backend, which makes it
1748available on GNU/Linux only. That implementation has further
1749drawbacks like it doesn't support to write into archives.
1750
1745* Other known bugs 1751* Other known bugs
1746 1752
1747** 'make-frame' forgets unhandled parameters, at least for X11 frames 1753** 'make-frame' forgets unhandled parameters, at least for X11 frames
diff --git a/etc/images/gud/README b/etc/images/gud/README
index 5edd99e2bf7..c56c3fc0ee3 100644
--- a/etc/images/gud/README
+++ b/etc/images/gud/README
@@ -13,10 +13,10 @@ License: GNU General Public License version 3 or later (see COPYING)
13 13
14Some icons are derived from Red Hat's Insight Debugger: 14Some icons are derived from Red Hat's Insight Debugger:
15 15
16<http://sourceware.org/insight/> 16<https://sourceware.org/insight/>
17"Insight is a graphical user interface to GDB, the GNU Debugger" 17"Insight is a graphical user interface to GDB, the GNU Debugger"
18 18
19<http://sourceware.org/insight/aboutus.php> 19<https://sourceware.org/insight/aboutus.php>
20"Insight is being released under the terms of the GNU General Public 20"Insight is being released under the terms of the GNU General Public
21License (GPL)" 21License (GPL)"
22 22
diff --git a/etc/srecode/ede-autoconf.srt b/etc/srecode/ede-autoconf.srt
index ecca7afd007..51656eb73c4 100644
--- a/etc/srecode/ede-autoconf.srt
+++ b/etc/srecode/ede-autoconf.srt
@@ -38,7 +38,7 @@ template ede-empty :project
38{{comment_prefix}} by EDE when this file is updated. 38{{comment_prefix}} by EDE when this file is updated.
39{{comment_prefix}} 39{{comment_prefix}}
40{{comment_prefix}} EDE is the Emacs Development Environment. 40{{comment_prefix}} EDE is the Emacs Development Environment.
41{{comment_prefix}} http://cedet.sourceforge.net/ede.shtml 41{{comment_prefix}} https://cedet.sourceforge.net/ede.shtml
42{{comment_prefix}} 42{{comment_prefix}}
43{{comment_prefix}} Process this file with autoconf to produce a configure script 43{{comment_prefix}} Process this file with autoconf to produce a configure script
44 44
diff --git a/etc/srecode/ede-make.srt b/etc/srecode/ede-make.srt
index cde1690f54f..c01054e0420 100644
--- a/etc/srecode/ede-make.srt
+++ b/etc/srecode/ede-make.srt
@@ -34,7 +34,7 @@ template ede-empty :file :project
34# 34#
35# DO NOT MODIFY THIS FILE OR YOUR CHANGES MAY BE LOST. 35# DO NOT MODIFY THIS FILE OR YOUR CHANGES MAY BE LOST.
36# EDE is the Emacs Development Environment. 36# EDE is the Emacs Development Environment.
37# http://cedet.sourceforge.net/ede.shtml 37# https://cedet.sourceforge.net/ede.shtml
38# 38#
39 39
40---- 40----
@@ -58,7 +58,7 @@ template ede-empty :file
58# 58#
59# DO NOT MODIFY THIS FILE OR YOUR CHANGES MAY BE LOST. 59# DO NOT MODIFY THIS FILE OR YOUR CHANGES MAY BE LOST.
60# EDE is the Emacs Development Environment. 60# EDE is the Emacs Development Environment.
61# http://cedet.sourceforge.net/ede.shtml 61# https://cedet.sourceforge.net/ede.shtml
62 62
63ARDUINO_DIR = {{ARDUINO_HOME}} 63ARDUINO_DIR = {{ARDUINO_HOME}}
64 64
diff --git a/etc/themes/adwaita-theme.el b/etc/themes/adwaita-theme.el
index ba83a0578cd..6ad84055595 100644
--- a/etc/themes/adwaita-theme.el
+++ b/etc/themes/adwaita-theme.el
@@ -21,10 +21,13 @@
21 21
22;;; Code: 22;;; Code:
23 23
24;;;###theme-autoload
24(deftheme adwaita 25(deftheme adwaita
25 "Face colors similar to the default theme of Gnome 3 (Adwaita). 26 "Face colors similar to the default theme of Gnome 3 (Adwaita).
26The colors are chosen to match Adwaita window decorations and the 27The colors are chosen to match Adwaita window decorations and the
27default look of the Gnome 3 desktop.") 28default look of the Gnome 3 desktop."
29 :background-mode 'light
30 :kind 'color-scheme)
28 31
29(let ((class '((class color) (min-colors 89)))) 32(let ((class '((class color) (min-colors 89))))
30 (custom-theme-set-faces 33 (custom-theme-set-faces
diff --git a/etc/themes/deeper-blue-theme.el b/etc/themes/deeper-blue-theme.el
index 8f19147f916..48ed9ba061d 100644
--- a/etc/themes/deeper-blue-theme.el
+++ b/etc/themes/deeper-blue-theme.el
@@ -21,8 +21,11 @@
21 21
22;;; Code: 22;;; Code:
23 23
24;;;###theme-autoload
24(deftheme deeper-blue 25(deftheme deeper-blue
25 "Face colors using a deep blue background.") 26 "Face colors using a deep blue background."
27 :background-mode 'dark
28 :kind 'color-scheme)
26 29
27(let ((class '((class color) (min-colors 89)))) 30(let ((class '((class color) (min-colors 89))))
28 (custom-theme-set-faces 31 (custom-theme-set-faces
diff --git a/etc/themes/dichromacy-theme.el b/etc/themes/dichromacy-theme.el
index d53c075d923..fe44d520cca 100644
--- a/etc/themes/dichromacy-theme.el
+++ b/etc/themes/dichromacy-theme.el
@@ -21,6 +21,7 @@
21 21
22;;; Code: 22;;; Code:
23 23
24;;;###theme-autoload
24(deftheme dichromacy 25(deftheme dichromacy
25 "Face colors suitable for red/green color-blind users. 26 "Face colors suitable for red/green color-blind users.
26The color palette is from B. Wong, Nature Methods 8, 441 (2011). 27The color palette is from B. Wong, Nature Methods 8, 441 (2011).
@@ -28,7 +29,9 @@ It is intended to provide good variability while being easily
28differentiated by individuals with protanopia or deuteranopia. 29differentiated by individuals with protanopia or deuteranopia.
29 30
30Basic, Font Lock, Isearch, Gnus, Message, Flyspell, and 31Basic, Font Lock, Isearch, Gnus, Message, Flyspell, and
31Ansi-Color faces are included.") 32Ansi-Color faces are included."
33 :background-mode 'light
34 :kind 'color-scheme)
32 35
33(let ((class '((class color) (min-colors 89))) 36(let ((class '((class color) (min-colors 89)))
34 (orange "#e69f00") 37 (orange "#e69f00")
diff --git a/etc/themes/leuven-dark-theme.el b/etc/themes/leuven-dark-theme.el
index 0e162c8bab9..08978a26682 100644
--- a/etc/themes/leuven-dark-theme.el
+++ b/etc/themes/leuven-dark-theme.el
@@ -5,7 +5,7 @@
5;; Author: Fabrice Niessen <(concat "fniessen" at-sign "pirilampo.org")> 5;; Author: Fabrice Niessen <(concat "fniessen" at-sign "pirilampo.org")>
6;; Contributor: Thibault Polge <(concat "thibault" at-sign "thb.lt")> 6;; Contributor: Thibault Polge <(concat "thibault" at-sign "thb.lt")>
7;; URL: https://github.com/fniessen/emacs-leuven-dark-theme 7;; URL: https://github.com/fniessen/emacs-leuven-dark-theme
8;; Version: 20220202.1126 8;; Version: 20221010.1208
9;; Keywords: color theme 9;; Keywords: color theme
10 10
11;; This file is part of GNU Emacs. 11;; This file is part of GNU Emacs.
@@ -93,11 +93,15 @@ CONTROL can be a number, nil, or t. When t, use DEFAULT-HEIGHT."
93 93
94;;; Theme Faces. 94;;; Theme Faces.
95 95
96;;;###theme-autoload
96(deftheme leuven-dark 97(deftheme leuven-dark
97 "Face colors with a light background. 98 "Face colors with a light background.
98Basic, Font Lock, Isearch, Gnus, Message, Org mode, Diff, Ediff, 99Basic, Font Lock, Isearch, Gnus, Message, Org mode, Diff, Ediff,
99Flyspell, Semantic, and Ansi-Color faces are included -- and much 100Flyspell, Semantic, and Ansi-Color faces are included -- and much
100more...") 101more..."
102 :background-mode 'dark
103 :family 'leuven
104 :kind 'color-scheme)
101 105
102(let ((class '((class color) (min-colors 89))) 106(let ((class '((class color) (min-colors 89)))
103 107
diff --git a/etc/themes/leuven-theme.el b/etc/themes/leuven-theme.el
index d9a8d5391ae..e712a79adf1 100644
--- a/etc/themes/leuven-theme.el
+++ b/etc/themes/leuven-theme.el
@@ -4,7 +4,7 @@
4 4
5;; Author: Fabrice Niessen <(concat "fniessen" at-sign "pirilampo.org")> 5;; Author: Fabrice Niessen <(concat "fniessen" at-sign "pirilampo.org")>
6;; URL: https://github.com/fniessen/emacs-leuven-theme 6;; URL: https://github.com/fniessen/emacs-leuven-theme
7;; Version: 20200513.1928 7;; Version: 20221010.1209
8;; Keywords: color theme 8;; Keywords: color theme
9 9
10;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
@@ -74,11 +74,15 @@ CONTROL can be a number, nil, or t. When t, use DEFAULT-HEIGHT."
74 74
75;;; Theme Faces. 75;;; Theme Faces.
76 76
77;;;###theme-autoload
77(deftheme leuven 78(deftheme leuven
78 "Face colors with a light background. 79 "Face colors with a light background.
79Basic, Font Lock, Isearch, Gnus, Message, Org mode, Diff, Ediff, 80Basic, Font Lock, Isearch, Gnus, Message, Org mode, Diff, Ediff,
80Flyspell, Semantic, and Ansi-Color faces are included -- and much 81Flyspell, Semantic, and Ansi-Color faces are included -- and much
81more...") 82more..."
83 :background-mode 'light
84 :kind 'color-scheme
85 :family 'leuven)
82 86
83(let ((class '((class color) (min-colors 89))) 87(let ((class '((class color) (min-colors 89)))
84 88
diff --git a/etc/themes/light-blue-theme.el b/etc/themes/light-blue-theme.el
index eeca46210cc..808fcbfeb2d 100644
--- a/etc/themes/light-blue-theme.el
+++ b/etc/themes/light-blue-theme.el
@@ -26,8 +26,11 @@
26 26
27;;; Code: 27;;; Code:
28 28
29;;;###theme-autoload
29(deftheme light-blue 30(deftheme light-blue
30 "Face colors utilizing a light blue background.") 31 "Face colors utilizing a light blue background."
32 :background-mode 'light
33 :kind 'color-scheme)
31 34
32(make-obsolete 'light-blue nil "29.1") 35(make-obsolete 'light-blue nil "29.1")
33 36
diff --git a/etc/themes/manoj-dark-theme.el b/etc/themes/manoj-dark-theme.el
index af5576386c6..f9aaa97c258 100644
--- a/etc/themes/manoj-dark-theme.el
+++ b/etc/themes/manoj-dark-theme.el
@@ -64,10 +64,13 @@
64 64
65;;; Code: 65;;; Code:
66 66
67;;;###theme-autoload
67(deftheme manoj-dark 68(deftheme manoj-dark
68 "Very high contrast faces with a black background. 69 "Very high contrast faces with a black background.
69This theme avoids subtle color variations, while avoiding the 70This theme avoids subtle color variations, while avoiding the
70jarring angry fruit salad look to reduce eye fatigue.") 71jarring angry fruit salad look to reduce eye fatigue."
72 :background-mode 'dark
73 :kind 'color-scheme)
71 74
72(custom-theme-set-faces 75(custom-theme-set-faces
73 'manoj-dark 76 'manoj-dark
diff --git a/etc/themes/misterioso-theme.el b/etc/themes/misterioso-theme.el
index 55186384ad1..3fd6cdb5afb 100644
--- a/etc/themes/misterioso-theme.el
+++ b/etc/themes/misterioso-theme.el
@@ -21,8 +21,11 @@
21 21
22;;; Code: 22;;; Code:
23 23
24;;;###theme-autoload
24(deftheme misterioso 25(deftheme misterioso
25 "Predominantly blue/cyan faces on a dark cyan background.") 26 "Predominantly blue/cyan faces on a dark cyan background."
27 :background-mode 'dark
28 :kind 'color-scheme)
26 29
27(let ((class '((class color) (min-colors 89)))) 30(let ((class '((class color) (min-colors 89))))
28 31
diff --git a/etc/themes/modus-operandi-theme.el b/etc/themes/modus-operandi-theme.el
index 6e609c08036..0f0630a6d1d 100644
--- a/etc/themes/modus-operandi-theme.el
+++ b/etc/themes/modus-operandi-theme.el
@@ -71,4 +71,6 @@ which corresponds to a minimum contrast in relative luminance of
71 71
72 (provide-theme 'modus-operandi)) 72 (provide-theme 'modus-operandi))
73 73
74;;;###theme-autoload (put 'modus-operandi 'theme-properties '(:background-mode light :kind color-scheme :family modus))
75
74;;; modus-operandi-theme.el ends here 76;;; modus-operandi-theme.el ends here
diff --git a/etc/themes/modus-vivendi-theme.el b/etc/themes/modus-vivendi-theme.el
index 0983e26c786..02c2d9e129a 100644
--- a/etc/themes/modus-vivendi-theme.el
+++ b/etc/themes/modus-vivendi-theme.el
@@ -71,4 +71,6 @@ which corresponds to a minimum contrast in relative luminance of
71 71
72 (provide-theme 'modus-vivendi)) 72 (provide-theme 'modus-vivendi))
73 73
74;;;###theme-autoload (put 'modus-vivendi 'theme-properties '(:background-mode dark :kind color-scheme :family modus))
75
74;;; modus-vivendi-theme.el ends here 76;;; modus-vivendi-theme.el ends here
diff --git a/etc/themes/tango-dark-theme.el b/etc/themes/tango-dark-theme.el
index ef00d2ac49f..85995e4e995 100644
--- a/etc/themes/tango-dark-theme.el
+++ b/etc/themes/tango-dark-theme.el
@@ -27,10 +27,15 @@
27 27
28;;; Code: 28;;; Code:
29 29
30;;;###theme-autoload
30(deftheme tango-dark 31(deftheme tango-dark
31 "Face colors using the Tango palette (dark background). 32 "Face colors using the Tango palette (dark background).
32Basic, Font Lock, Isearch, Gnus, Message, Ediff, Flyspell, 33Basic, Font Lock, Isearch, Gnus, Message, Ediff, Flyspell,
33Semantic, and Ansi-Color faces are included.") 34Semantic, and Ansi-Color faces are included."
35 :background-mode 'dark
36 :kind 'color-scheme
37 :family 'tango)
38
34 39
35(let ((class '((class color) (min-colors 89))) 40(let ((class '((class color) (min-colors 89)))
36 ;; Tango palette colors. 41 ;; Tango palette colors.
diff --git a/etc/themes/tango-theme.el b/etc/themes/tango-theme.el
index ecbbf037536..2ac1b42294b 100644
--- a/etc/themes/tango-theme.el
+++ b/etc/themes/tango-theme.el
@@ -27,10 +27,14 @@
27 27
28;;; Code: 28;;; Code:
29 29
30;;;###theme-autoload
30(deftheme tango 31(deftheme tango
31 "Face colors using the Tango palette (light background). 32 "Face colors using the Tango palette (light background).
32Basic, Font Lock, Isearch, Gnus, Message, Ediff, Flyspell, 33Basic, Font Lock, Isearch, Gnus, Message, Ediff, Flyspell,
33Semantic, and Ansi-Color faces are included.") 34Semantic, and Ansi-Color faces are included."
35 :background-mode 'light
36 :kind 'color-scheme
37 :family 'tango)
34 38
35(let ((class '((class color) (min-colors 89))) 39(let ((class '((class color) (min-colors 89)))
36 ;; Tango palette colors. 40 ;; Tango palette colors.
diff --git a/etc/themes/tsdh-dark-theme.el b/etc/themes/tsdh-dark-theme.el
index a88ad75520b..6b1e865e427 100644
--- a/etc/themes/tsdh-dark-theme.el
+++ b/etc/themes/tsdh-dark-theme.el
@@ -19,8 +19,12 @@
19 19
20;;; Code: 20;;; Code:
21 21
22;;;###theme-autoload
22(deftheme tsdh-dark 23(deftheme tsdh-dark
23 "A dark theme used and created by Tassilo Horn.") 24 "A dark theme used and created by Tassilo Horn."
25 :background-mode 'dark
26 :kind 'color-scheme
27 :family 'tsdh)
24 28
25(custom-theme-set-faces 29(custom-theme-set-faces
26 'tsdh-dark 30 'tsdh-dark
diff --git a/etc/themes/tsdh-light-theme.el b/etc/themes/tsdh-light-theme.el
index d9d09b702b7..ac964d66d67 100644
--- a/etc/themes/tsdh-light-theme.el
+++ b/etc/themes/tsdh-light-theme.el
@@ -19,9 +19,13 @@
19 19
20;;; Code: 20;;; Code:
21 21
22;;;###theme-autoload
22(deftheme tsdh-light 23(deftheme tsdh-light
23 "A light Emacs theme. 24 "A light Emacs theme.
24Used and created by Tassilo Horn.") 25Used and created by Tassilo Horn."
26 :background-mode 'light
27 :kind 'color-scheme
28 :family 'tsdh)
25 29
26(custom-theme-set-faces 30(custom-theme-set-faces
27 'tsdh-light 31 'tsdh-light
diff --git a/etc/themes/wheatgrass-theme.el b/etc/themes/wheatgrass-theme.el
index c56c8a2d8a4..20e7bbbac29 100644
--- a/etc/themes/wheatgrass-theme.el
+++ b/etc/themes/wheatgrass-theme.el
@@ -19,11 +19,14 @@
19 19
20;;; Code: 20;;; Code:
21 21
22;;;###theme-autoload
22(deftheme wheatgrass 23(deftheme wheatgrass
23 "High-contrast green/blue/brown faces on a black background. 24 "High-contrast green/blue/brown faces on a black background.
24Basic, Font Lock, Isearch, Gnus, and Message faces are included. 25Basic, Font Lock, Isearch, Gnus, and Message faces are included.
25The default face foreground is wheat, with other faces in shades 26The default face foreground is wheat, with other faces in shades
26of green, brown, and blue.") 27of green, brown, and blue."
28 :background-mode 'dark
29 :kind 'color-scheme)
27 30
28(let ((class '((class color) (min-colors 89)))) 31(let ((class '((class color) (min-colors 89))))
29 (custom-theme-set-faces 32 (custom-theme-set-faces
diff --git a/etc/themes/whiteboard-theme.el b/etc/themes/whiteboard-theme.el
index f21b18b421d..2f86234b32a 100644
--- a/etc/themes/whiteboard-theme.el
+++ b/etc/themes/whiteboard-theme.el
@@ -21,8 +21,11 @@
21 21
22;;; Code: 22;;; Code:
23 23
24;;;###theme-autoload
24(deftheme whiteboard 25(deftheme whiteboard
25 "Face colors similar to markers on a whiteboard.") 26 "Face colors similar to markers on a whiteboard."
27 :background-mode 'light
28 :kind 'color-scheme)
26 29
27(let ((class '((class color) (min-colors 89)))) 30(let ((class '((class color) (min-colors 89))))
28 (custom-theme-set-faces 31 (custom-theme-set-faces
diff --git a/etc/themes/wombat-theme.el b/etc/themes/wombat-theme.el
index d9fab8ac782..9bb026ead14 100644
--- a/etc/themes/wombat-theme.el
+++ b/etc/themes/wombat-theme.el
@@ -21,11 +21,14 @@
21 21
22;;; Code: 22;;; Code:
23 23
24;;;###theme-autoload
24(deftheme wombat 25(deftheme wombat
25 "Medium-contrast faces with a dark gray background. 26 "Medium-contrast faces with a dark gray background.
26Adapted, with permission, from a Vim color scheme by Lars H. Nielsen. 27Adapted, with permission, from a Vim color scheme by Lars H. Nielsen.
27Basic, Font Lock, Isearch, Gnus, Message, and Ansi-Color faces 28Basic, Font Lock, Isearch, Gnus, Message, and Ansi-Color faces
28are included.") 29are included."
30 :background-mode 'dark
31 :kind 'color-scheme)
29 32
30(let ((class '((class color) (min-colors 89)))) 33(let ((class '((class color) (min-colors 89))))
31 (custom-theme-set-faces 34 (custom-theme-set-faces
diff --git a/lib-src/seccomp-filter.c b/lib-src/seccomp-filter.c
index 041bf5c749b..7e54b878a22 100644
--- a/lib-src/seccomp-filter.c
+++ b/lib-src/seccomp-filter.c
@@ -206,6 +206,9 @@ main (int argc, char **argv)
206 SCMP_A2_32 (SCMP_CMP_MASKED_EQ, 206 SCMP_A2_32 (SCMP_CMP_MASKED_EQ,
207 ~(PROT_NONE | PROT_READ | PROT_WRITE), 0)); 207 ~(PROT_NONE | PROT_READ | PROT_WRITE), 0));
208 208
209 /* Allow restartable sequences. The dynamic linker uses them. */
210 RULE (SCMP_ACT_ALLOW, SCMP_SYS (rseq));
211
209 /* Futexes are used everywhere. */ 212 /* Futexes are used everywhere. */
210 RULE (SCMP_ACT_ALLOW, SCMP_SYS (futex), 213 RULE (SCMP_ACT_ALLOW, SCMP_SYS (futex),
211 SCMP_A1_32 (SCMP_CMP_EQ, FUTEX_WAKE_PRIVATE)); 214 SCMP_A1_32 (SCMP_CMP_EQ, FUTEX_WAKE_PRIVATE));
@@ -218,6 +221,7 @@ main (int argc, char **argv)
218 RULE (SCMP_ACT_ALLOW, SCMP_SYS (getuid)); 221 RULE (SCMP_ACT_ALLOW, SCMP_SYS (getuid));
219 RULE (SCMP_ACT_ALLOW, SCMP_SYS (geteuid)); 222 RULE (SCMP_ACT_ALLOW, SCMP_SYS (geteuid));
220 RULE (SCMP_ACT_ALLOW, SCMP_SYS (getpid)); 223 RULE (SCMP_ACT_ALLOW, SCMP_SYS (getpid));
224 RULE (SCMP_ACT_ALLOW, SCMP_SYS (gettid));
221 RULE (SCMP_ACT_ALLOW, SCMP_SYS (getpgrp)); 225 RULE (SCMP_ACT_ALLOW, SCMP_SYS (getpgrp));
222 226
223 /* Allow operations on open file descriptors. File descriptors are 227 /* Allow operations on open file descriptors. File descriptors are
@@ -324,6 +328,8 @@ main (int argc, char **argv)
324 | CLONE_SETTLS | CLONE_PARENT_SETTID 328 | CLONE_SETTLS | CLONE_PARENT_SETTID
325 | CLONE_CHILD_CLEARTID), 329 | CLONE_CHILD_CLEARTID),
326 0)); 330 0));
331 /* glibc 2.34+ pthread_create uses clone3. */
332 RULE (SCMP_ACT_ALLOW, SCMP_SYS (clone3));
327 RULE (SCMP_ACT_ALLOW, SCMP_SYS (sigaltstack)); 333 RULE (SCMP_ACT_ALLOW, SCMP_SYS (sigaltstack));
328 RULE (SCMP_ACT_ALLOW, SCMP_SYS (set_robust_list)); 334 RULE (SCMP_ACT_ALLOW, SCMP_SYS (set_robust_list));
329 335
diff --git a/lisp/ChangeLog.10 b/lisp/ChangeLog.10
index 0b97a641099..6053ffa65aa 100644
--- a/lisp/ChangeLog.10
+++ b/lisp/ChangeLog.10
@@ -9490,7 +9490,7 @@
9490 toolbar/rescan.pbm, toolbar/rescan.xpm, toolbar/show.pbm, 9490 toolbar/rescan.pbm, toolbar/rescan.xpm, toolbar/show.pbm,
9491 toolbar/show.xpm, toolbar/widen.pbm, toolbar/widen.xpm: 9491 toolbar/show.xpm, toolbar/widen.pbm, toolbar/widen.xpm:
9492 Upgraded to mh-e version 6.1.1. Full ChangeLog available in 9492 Upgraded to mh-e version 6.1.1. Full ChangeLog available in
9493 http://prdownloads.sourceforge.net/mh-e/mh-e-6.1.tgz?download . 9493 https://prdownloads.sourceforge.net/mh-e/mh-e-6.1.tgz?download .
9494 There were no user-visible changes in 6.1.1 from 6.1--only the 9494 There were no user-visible changes in 6.1.1 from 6.1--only the
9495 section of the Makefile that installs the files into Emacs was changed. 9495 section of the Makefile that installs the files into Emacs was changed.
9496 9496
diff --git a/lisp/ChangeLog.14 b/lisp/ChangeLog.14
index c84e44536d2..686746abe0b 100644
--- a/lisp/ChangeLog.14
+++ b/lisp/ChangeLog.14
@@ -155,7 +155,7 @@
155 155
156 * epa.el (epa-decrypt-region): Detect encoding if 156 * epa.el (epa-decrypt-region): Detect encoding if
157 coding-system-for-read is not specified. 157 coding-system-for-read is not specified.
158 <http://sourceforge.jp/ticket/browse.php?group_id=2267&tid=17018> 158 <https://sourceforge.jp/ticket/browse.php?group_id=2267&tid=17018>
159 (epa-verify-region): Ditto. 159 (epa-verify-region): Ditto.
160 160
1612009-06-04 Stefan Monnier <monnier@iro.umontreal.ca> 1612009-06-04 Stefan Monnier <monnier@iro.umontreal.ca>
@@ -540,7 +540,7 @@
540 540
541 * epa-file.el (epa-file-decode-and-insert): 541 * epa-file.el (epa-file-decode-and-insert):
542 Use string-to-multibyte instead of set-buffer-multibyte. 542 Use string-to-multibyte instead of set-buffer-multibyte.
543 <http://sourceforge.jp/ticket/browse.php?group_id=2267&tid=15259> 543 <https://sourceforge.jp/ticket/browse.php?group_id=2267&tid=15259>
544 544
5452009-04-18 Yann Hodique <yann.hodique@gmail.com> (tiny change) 5452009-04-18 Yann Hodique <yann.hodique@gmail.com> (tiny change)
546 546
diff --git a/lisp/ChangeLog.15 b/lisp/ChangeLog.15
index 53caf69e1ce..23e61ff7872 100644
--- a/lisp/ChangeLog.15
+++ b/lisp/ChangeLog.15
@@ -22762,7 +22762,7 @@
22762 22762
22763 Automatically handle .xz suffix (XZ-compressed files), too. 22763 Automatically handle .xz suffix (XZ-compressed files), too.
22764 * jka-cmpr-hook.el (jka-compr-compression-info-list): Add xz. 22764 * jka-cmpr-hook.el (jka-compr-compression-info-list): Add xz.
22765 XZ is the successor to LZMA: <http://tukaani.org/xz/> 22765 XZ is the successor to LZMA: <https://tukaani.org/xz/>
22766 22766
227672009-06-22 Dmitry Dzhus <dima@sphinx.net.ru> 227672009-06-22 Dmitry Dzhus <dima@sphinx.net.ru>
22768 Nick Roberts <nickrob@snap.net.nz> 22768 Nick Roberts <nickrob@snap.net.nz>
diff --git a/lisp/ChangeLog.17 b/lisp/ChangeLog.17
index cebafe18aa0..df731fe9ed2 100644
--- a/lisp/ChangeLog.17
+++ b/lisp/ChangeLog.17
@@ -14039,7 +14039,7 @@
14039 14039
14040 * epa-file.el (epa-file-write-region): Encode the region according 14040 * epa-file.el (epa-file-write-region): Encode the region according
14041 to `buffer-file-format'. Problem reported at: 14041 to `buffer-file-format'. Problem reported at:
14042 <http://sourceforge.jp/ticket/browse.php?group_id=2267&tid=32917>. 14042 <https://sourceforge.jp/ticket/browse.php?group_id=2267&tid=32917>.
14043 14043
140442014-01-14 Stefan Monnier <monnier@iro.umontreal.ca> 140442014-01-14 Stefan Monnier <monnier@iro.umontreal.ca>
14045 14045
diff --git a/lisp/Makefile.in b/lisp/Makefile.in
index 256017f6c5b..338814fdda2 100644
--- a/lisp/Makefile.in
+++ b/lisp/Makefile.in
@@ -430,6 +430,12 @@ compile-always:
430 find $(lisp) -name '*.elc' $(FIND_DELETE) 430 find $(lisp) -name '*.elc' $(FIND_DELETE)
431 $(MAKE) compile 431 $(MAKE) compile
432 432
433.PHONY: trampolines
434trampolines: compile
435ifeq ($(HAVE_NATIVE_COMP),yes)
436 $(emacs) -l comp -f comp-compile-all-trampolines
437endif
438
433.PHONY: backup-compiled-files compile-after-backup 439.PHONY: backup-compiled-files compile-after-backup
434 440
435# Backup compiled Lisp files in elc.tar.gz. If that file already 441# Backup compiled Lisp files in elc.tar.gz. If that file already
diff --git a/lisp/autoinsert.el b/lisp/autoinsert.el
index 580f6b3ced2..51d939151ce 100644
--- a/lisp/autoinsert.el
+++ b/lisp/autoinsert.el
@@ -168,7 +168,7 @@ If this contains a %s, that will be replaced by the matching rule."
168 168
169 (".dir-locals.el" 169 (".dir-locals.el"
170 nil 170 nil
171 ";;; Directory Local Variables\n" 171 ";;; Directory Local Variables -*- no-byte-compile: t; -*-\n"
172 ";;; For more information see (info \"(emacs) Directory Variables\")\n\n" 172 ";;; For more information see (info \"(emacs) Directory Variables\")\n\n"
173 "((" 173 "(("
174 '(setq v1 (let (modes) 174 '(setq v1 (let (modes)
diff --git a/lisp/cedet/pulse.el b/lisp/cedet/pulse.el
index 0564cf6d048..5b0df013a3c 100644
--- a/lisp/cedet/pulse.el
+++ b/lisp/cedet/pulse.el
@@ -47,7 +47,7 @@
47;; The original pulse code was written for semantic tag highlighting. 47;; The original pulse code was written for semantic tag highlighting.
48;; It has been extracted, and adapted for general purpose pulsing. 48;; It has been extracted, and adapted for general purpose pulsing.
49;; 49;;
50;; Pulse is a part of CEDET. http://cedet.sf.net 50;; Pulse is a part of CEDET. https://cedet.sourceforge.net
51 51
52(require 'color) 52(require 'color)
53 53
diff --git a/lisp/custom.el b/lisp/custom.el
index 604b1a3ff48..0d3e2e5d0c2 100644
--- a/lisp/custom.el
+++ b/lisp/custom.el
@@ -1152,9 +1152,11 @@ list, in which A occurs before B if B was defined with a
1152;; (provide-theme 'THEME) 1152;; (provide-theme 'THEME)
1153 1153
1154 1154
1155(defmacro deftheme (theme &optional doc) 1155(defmacro deftheme (theme &optional doc &rest properties)
1156 "Declare THEME to be a Custom theme. 1156 "Declare THEME to be a Custom theme.
1157The optional argument DOC is a doc string describing the theme. 1157The optional argument DOC is a doc string describing the theme.
1158PROPERTIES are interpreted as a property list that will be stored
1159in the `theme-properties' property for THEME.
1158 1160
1159Any theme `foo' should be defined in a file called `foo-theme.el'; 1161Any theme `foo' should be defined in a file called `foo-theme.el';
1160see `custom-make-theme-feature' for more information." 1162see `custom-make-theme-feature' for more information."
@@ -1164,18 +1166,25 @@ see `custom-make-theme-feature' for more information."
1164 ;; It is better not to use backquote in this file, 1166 ;; It is better not to use backquote in this file,
1165 ;; because that makes a bootstrapping problem 1167 ;; because that makes a bootstrapping problem
1166 ;; if you need to recompile all the Lisp files using interpreted code. 1168 ;; if you need to recompile all the Lisp files using interpreted code.
1167 (list 'custom-declare-theme (list 'quote theme) (list 'quote feature) doc))) 1169 (list 'custom-declare-theme (list 'quote theme) (list 'quote feature) doc
1170 (cons 'list properties))))
1168 1171
1169(defun custom-declare-theme (theme feature &optional doc) 1172(defun custom-declare-theme (theme feature &optional doc properties)
1170 "Like `deftheme', but THEME is evaluated as a normal argument. 1173 "Like `deftheme', but THEME is evaluated as a normal argument.
1171FEATURE is the feature this theme provides. Normally, this is a symbol 1174FEATURE is the feature this theme provides. Normally, this is a
1172created from THEME by `custom-make-theme-feature'." 1175symbol created from THEME by `custom-make-theme-feature'. The
1176optional argument DOC may contain the documentation for THEME.
1177The optional argument PROPERTIES may contain a property list of
1178attributes associated with THEME."
1173 (unless (custom-theme-name-valid-p theme) 1179 (unless (custom-theme-name-valid-p theme)
1174 (error "Custom theme cannot be named %S" theme)) 1180 (error "Custom theme cannot be named %S" theme))
1175 (unless (memq theme custom-known-themes) 1181 (unless (memq theme custom-known-themes)
1176 (push theme custom-known-themes)) 1182 (push theme custom-known-themes))
1177 (put theme 'theme-feature feature) 1183 (put theme 'theme-feature feature)
1178 (when doc (put theme 'theme-documentation doc))) 1184 (when doc
1185 (put theme 'theme-documentation doc))
1186 (when properties
1187 (put theme 'theme-properties properties)))
1179 1188
1180(defun custom-make-theme-feature (theme) 1189(defun custom-make-theme-feature (theme)
1181 "Given a symbol THEME, create a new symbol by appending \"-theme\". 1190 "Given a symbol THEME, create a new symbol by appending \"-theme\".
@@ -1372,6 +1381,58 @@ Return t if THEME was successfully loaded, nil otherwise."
1372 (enable-theme theme)) 1381 (enable-theme theme))
1373 t) 1382 t)
1374 1383
1384(defun theme-list-variants (theme &rest list)
1385 "Return a list of theme variants for THEME.
1386By default this will use all known custom themes (see
1387`custom-available-themes') to check for variants. This can be
1388restricted if the optional argument LIST containing a list of
1389theme symbols to consider."
1390 (let* ((properties (get theme 'theme-properties))
1391 (family (plist-get properties :family)))
1392 (seq-filter
1393 (lambda (variant)
1394 (and (eq (plist-get (get variant 'theme-properties) :family)
1395 family)
1396 (not (eq variant theme))))
1397 (or list (custom-available-themes)))))
1398
1399(defun theme-choose-variant (&optional no-confirm no-enable)
1400 "Switch from the current theme to one of its variants.
1401The current theme will be disabled before variant is enabled. If
1402the current theme has only one variant, switch to that variant
1403without prompting, otherwise prompt for the variant to select.
1404See `load-theme' for the meaning of NO-CONFIRM and NO-ENABLE."
1405 (interactive)
1406 (let ((active-color-schemes
1407 (seq-filter
1408 (lambda (theme)
1409 ;; FIXME: As most themes currently do not have a `:kind'
1410 ;; tag, it is assumed that a theme is a color scheme by
1411 ;; default. This should be reconsidered in the future.
1412 (memq (plist-get (get theme 'theme-properties) :kind)
1413 '(color-scheme nil)))
1414 custom-enabled-themes)))
1415 (cond
1416 ((length= active-color-schemes 0)
1417 (user-error "No theme is active, cannot toggle"))
1418 ((length> active-color-schemes 1)
1419 (user-error "More than one theme active, cannot unambiguously toggle")))
1420 (let* ((theme (car active-color-schemes))
1421 (family (plist-get (get theme 'theme-properties) :family)))
1422 (unless family
1423 (error "Theme `%s' does not have any known variants" theme))
1424 (let* ((variants (theme-list-variants theme))
1425 (choice (cond
1426 ((null variants)
1427 (error "`%s' has no variants" theme))
1428 ((length= variants 1)
1429 (car variants))
1430 ((intern (completing-read "Load custom theme: " variants))))))
1431 (disable-theme theme)
1432 (load-theme choice no-confirm no-enable)))))
1433
1434(defalias 'toggle-theme #'theme-choose-variant)
1435
1375(defun custom-theme-load-confirm (hash) 1436(defun custom-theme-load-confirm (hash)
1376 "Query the user about loading a Custom theme that may not be safe. 1437 "Query the user about loading a Custom theme that may not be safe.
1377The theme should be in the current buffer. If the user agrees, 1438The theme should be in the current buffer. If the user agrees,
diff --git a/lisp/ecomplete.el b/lisp/ecomplete.el
index 6ff67d46d20..54d60c84d4f 100644
--- a/lisp/ecomplete.el
+++ b/lisp/ecomplete.el
@@ -70,9 +70,9 @@
70 :type '(symbol :tag "Coding system")) 70 :type '(symbol :tag "Coding system"))
71 71
72(defcustom ecomplete-sort-predicate #'ecomplete-decay 72(defcustom ecomplete-sort-predicate #'ecomplete-decay
73 "Predicate to use when sorting matched. 73 "Predicate to use when sorting matched ecomplete candidates.
74The predicate is called with two parameters that represent the 74The predicate is called with two arguments that represent the
75completion. Each parameter is a list where the first element is 75completion. Each argument is a list where the first element is
76the times the completion has been used, the second is the 76the times the completion has been used, the second is the
77timestamp of the most recent usage, and the third item is the 77timestamp of the most recent usage, and the third item is the
78string that was matched." 78string that was matched."
@@ -86,6 +86,11 @@ string that was matched."
86 :type 'boolean 86 :type 'boolean
87 :version "29.1") 87 :version "29.1")
88 88
89(defcustom ecomplete-filter-regexp nil
90 "Regular expression of addresses that should not be stored by ecomplete."
91 :type 'regexp
92 :version "29.1")
93
89;;; Internal variables. 94;;; Internal variables.
90 95
91(defvar ecomplete-database nil) 96(defvar ecomplete-database nil)
@@ -104,20 +109,22 @@ string that was matched."
104By default, the longest version of TEXT will be preserved, but if 109By default, the longest version of TEXT will be preserved, but if
105FORCE is non-nil, use TEXT exactly as is." 110FORCE is non-nil, use TEXT exactly as is."
106 (unless ecomplete-database (ecomplete-setup)) 111 (unless ecomplete-database (ecomplete-setup))
107 (let ((elems (assq type ecomplete-database)) 112 (unless (and ecomplete-filter-regexp
108 (now (time-convert nil 'integer)) 113 (string-match-p ecomplete-filter-regexp key))
109 entry) 114 (let ((elems (assq type ecomplete-database))
110 (unless elems 115 (now (time-convert nil 'integer))
111 (push (setq elems (list type)) ecomplete-database)) 116 entry)
112 (if (setq entry (assoc key (cdr elems))) 117 (unless elems
113 (pcase-let ((`(,_key ,count ,_time ,oldtext) entry)) 118 (push (setq elems (list type)) ecomplete-database))
114 (setcdr entry (list (1+ count) now 119 (if (setq entry (assoc key (cdr elems)))
115 ;; Preserve the "more complete" text. 120 (pcase-let ((`(,_key ,count ,_time ,oldtext) entry))
116 (if (or force 121 (setcdr entry (list (1+ count) now
117 (>= (length text) (length oldtext))) 122 ;; Preserve the "more complete" text.
118 text 123 (if (or force
119 oldtext)))) 124 (>= (length text) (length oldtext)))
120 (nconc elems (list (list key 1 now text)))))) 125 text
126 oldtext))))
127 (nconc elems (list (list key 1 now text)))))))
121 128
122(defun ecomplete--remove-item (type key) 129(defun ecomplete--remove-item (type key)
123 "Remove the element of TYPE and KEY from the ecomplete database." 130 "Remove the element of TYPE and KEY from the ecomplete database."
@@ -289,7 +296,7 @@ non-nil and there is only a single completion option available."
289 nil t))) 296 nil t)))
290 297
291(defun ecomplete-edit () 298(defun ecomplete-edit ()
292 "Prompt for an item and allow editing it." 299 "Prompt for an ecomplete item and allow editing it."
293 (interactive) 300 (interactive)
294 (let* ((type (ecomplete--prompt-type)) 301 (let* ((type (ecomplete--prompt-type))
295 (data (cdr (assq type ecomplete-database))) 302 (data (cdr (assq type ecomplete-database)))
@@ -305,7 +312,8 @@ non-nil and there is only a single completion option available."
305 (ecomplete-save))) 312 (ecomplete-save)))
306 313
307(defun ecomplete-remove () 314(defun ecomplete-remove ()
308 "Remove entries matching a regexp from the ecomplete database." 315 "Remove from the ecomplete database the entries matching a regexp.
316Prompt for the regexp to match the database entries to be removed."
309 (interactive) 317 (interactive)
310 (let* ((type (ecomplete--prompt-type)) 318 (let* ((type (ecomplete--prompt-type))
311 (data (cdr (assq type ecomplete-database))) 319 (data (cdr (assq type ecomplete-database)))
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index 6656b7e57c1..889bffa3f5c 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -4204,6 +4204,17 @@ bytecode definition was not changed in the meantime)."
4204 4204
4205;;; Compiler entry points. 4205;;; Compiler entry points.
4206 4206
4207(defun comp-compile-all-trampolines ()
4208 "Pre-compile AOT all trampolines."
4209 (let ((comp-running-batch-compilation t)
4210 ;; We want to target only the 'native-lisp' directory.
4211 (native-compile-target-directory
4212 (car (last native-comp-eln-load-path))))
4213 (mapatoms (lambda (f)
4214 (when (subr-primitive-p (symbol-function f))
4215 (message "Compiling trampoline for: %s" f)
4216 (comp-trampoline-compile f))))))
4217
4207;;;###autoload 4218;;;###autoload
4208(defun comp-lookup-eln (filename) 4219(defun comp-lookup-eln (filename)
4209 "Given a Lisp source FILENAME return the corresponding .eln file if found. 4220 "Given a Lisp source FILENAME return the corresponding .eln file if found.
diff --git a/lisp/emacs-lisp/loaddefs-gen.el b/lisp/emacs-lisp/loaddefs-gen.el
index 964d23c770e..a1c4f91579e 100644
--- a/lisp/emacs-lisp/loaddefs-gen.el
+++ b/lisp/emacs-lisp/loaddefs-gen.el
@@ -283,6 +283,12 @@ expression, in which case we want to handle forms differently."
283 ,@(when-let ((safe (plist-get props :safe))) 283 ,@(when-let ((safe (plist-get props :safe)))
284 `((put ',varname 'safe-local-variable ,safe)))))) 284 `((put ',varname 'safe-local-variable ,safe))))))
285 285
286 ;; Extract theme properties.
287 ((eq car 'deftheme)
288 (let* ((name (car-safe (cdr-safe form)))
289 (props (nthcdr 3 form)))
290 `(put ',name 'theme-properties (list ,@props))))
291
286 ((eq car 'defgroup) 292 ((eq car 'defgroup)
287 ;; In Emacs this is normally handled separately by cus-dep.el, but for 293 ;; In Emacs this is normally handled separately by cus-dep.el, but for
288 ;; third party packages, it can be convenient to explicitly autoload 294 ;; third party packages, it can be convenient to explicitly autoload
@@ -730,7 +736,14 @@ rules for built-in packages and excluded files."
730 ;; updated. 736 ;; updated.
731 (file-newer-than-file-p 737 (file-newer-than-file-p
732 (expand-file-name "emacs-lisp/loaddefs-gen.el" lisp-directory) 738 (expand-file-name "emacs-lisp/loaddefs-gen.el" lisp-directory)
733 output-file)))) 739 output-file)))
740 (let ((lisp-mode-autoload-regexp
741 "^;;;###\\(\\(noexist\\)-\\)?\\(theme-autoload\\)"))
742 (loaddefs-generate
743 (expand-file-name "../etc/themes/" lisp-directory)
744 (expand-file-name "theme-loaddefs.el" lisp-directory))))
745
746;;;###autoload (load "theme-loaddefs.el")
734 747
735(provide 'loaddefs-gen) 748(provide 'loaddefs-gen)
736 749
diff --git a/lisp/emacs-lisp/memory-report.el b/lisp/emacs-lisp/memory-report.el
index 56b1ea6ed48..968a80b59e7 100644
--- a/lisp/emacs-lisp/memory-report.el
+++ b/lisp/emacs-lisp/memory-report.el
@@ -262,12 +262,7 @@ by counted more than once."
262 (cl-struct-slot-info struct-type))))) 262 (cl-struct-slot-info struct-type)))))
263 263
264(defun memory-report--format (bytes) 264(defun memory-report--format (bytes)
265 (setq bytes (/ bytes 1024.0)) 265 (format "%10s" (file-size-human-readable bytes 'iec " ")))
266 (let ((units '("KiB" "MiB" "GiB" "TiB")))
267 (while (>= bytes 1024)
268 (setq bytes (/ bytes 1024.0))
269 (setq units (cdr units)))
270 (format "%6.1f %s" bytes (car units))))
271 266
272(defun memory-report--gc-elem (elems type) 267(defun memory-report--gc-elem (elems type)
273 (* (nth 1 (assq type elems)) 268 (* (nth 1 (assq type elems))
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 106b7d5a8de..92f15337671 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -975,7 +975,7 @@ untar into a directory named DIR; otherwise, signal an error."
975 (or (string-match regexp name) 975 (or (string-match regexp name)
976 ;; Tarballs created by some utilities don't list 976 ;; Tarballs created by some utilities don't list
977 ;; directories with a trailing slash (Bug#13136). 977 ;; directories with a trailing slash (Bug#13136).
978 (and (string-equal dir name) 978 (and (string-equal (expand-file-name dir) name)
979 (eq (tar-header-link-type tar-data) 5)) 979 (eq (tar-header-link-type tar-data) 5))
980 (error "Package does not untar cleanly into directory %s/" dir))))) 980 (error "Package does not untar cleanly into directory %s/" dir)))))
981 (tar-untar-buffer)) 981 (tar-untar-buffer))
@@ -1240,8 +1240,12 @@ Return the pkg-desc, with desc-kind set to KIND."
1240 "Find package information for a tar file. 1240 "Find package information for a tar file.
1241The return result is a `package-desc'." 1241The return result is a `package-desc'."
1242 (cl-assert (derived-mode-p 'tar-mode)) 1242 (cl-assert (derived-mode-p 'tar-mode))
1243 (let* ((dir-name (file-name-directory 1243 (let* ((dir-name (named-let loop
1244 (tar-header-name (car tar-parse-info)))) 1244 ((filename (tar-header-name (car tar-parse-info))))
1245 (let ((dirname (file-name-directory filename)))
1246 ;; The first file can be in a subdir: look for the top.
1247 (if dirname (loop (directory-file-name dirname))
1248 (file-name-as-directory filename)))))
1245 (desc-file (package--description-file dir-name)) 1249 (desc-file (package--description-file dir-name))
1246 (tar-desc (tar-get-file-descriptor (concat dir-name desc-file)))) 1250 (tar-desc (tar-get-file-descriptor (concat dir-name desc-file))))
1247 (unless tar-desc 1251 (unless tar-desc
diff --git a/lisp/emacs-lisp/shortdoc.el b/lisp/emacs-lisp/shortdoc.el
index 4cfd658e10d..dbac03432c1 100644
--- a/lisp/emacs-lisp/shortdoc.el
+++ b/lisp/emacs-lisp/shortdoc.el
@@ -897,6 +897,8 @@ A FUNC form can have any number of `:no-eval' (or `:no-value'),
897 :eval (seq-drop-while #'numberp '(1 2 c d 5))) 897 :eval (seq-drop-while #'numberp '(1 2 c d 5)))
898 (seq-filter 898 (seq-filter
899 :eval (seq-filter #'numberp '(a b 3 4 f 6))) 899 :eval (seq-filter #'numberp '(a b 3 4 f 6)))
900 (seq-keep
901 :eval (seq-keep #'cl-digit-char-p '(?6 ?a ?7)))
900 (seq-remove 902 (seq-remove
901 :eval (seq-remove #'numberp '(1 2 c d 5))) 903 :eval (seq-remove #'numberp '(1 2 c d 5)))
902 (seq-remove-at-position 904 (seq-remove-at-position
diff --git a/lisp/emacs-lisp/vtable.el b/lisp/emacs-lisp/vtable.el
index 9bdf90bf1d6..de8503a1cb1 100644
--- a/lisp/emacs-lisp/vtable.el
+++ b/lisp/emacs-lisp/vtable.el
@@ -353,6 +353,11 @@ This also updates the displayed table."
353 (let* ((cache (vtable--cache table)) 353 (let* ((cache (vtable--cache table))
354 (inhibit-read-only t) 354 (inhibit-read-only t)
355 (keymap (get-text-property (point) 'keymap)) 355 (keymap (get-text-property (point) 'keymap))
356 (ellipsis (if (vtable-ellipsis table)
357 (propertize (truncate-string-ellipsis)
358 'face (vtable-face table))
359 ""))
360 (ellipsis-width (string-pixel-width ellipsis))
356 (elem (and after-object 361 (elem (and after-object
357 (assq after-object (car cache)))) 362 (assq after-object (car cache))))
358 (line (cons object (vtable--compute-cached-line table object)))) 363 (line (cons object (vtable--compute-cached-line table object))))
@@ -370,7 +375,8 @@ This also updates the displayed table."
370 ;; FIXME: We have to adjust colors in lines below this if we 375 ;; FIXME: We have to adjust colors in lines below this if we
371 ;; have :row-colors. 376 ;; have :row-colors.
372 (vtable--insert-line table line 0 377 (vtable--insert-line table line 0
373 (nth 1 cache) (vtable--spacer table)) 378 (nth 1 cache) (vtable--spacer table)
379 ellipsis ellipsis-width)
374 (add-text-properties start (point) (list 'keymap keymap 380 (add-text-properties start (point) (list 'keymap keymap
375 'vtable table))) 381 'vtable table)))
376 ;; We may have inserted a non-numerical value into a previously 382 ;; We may have inserted a non-numerical value into a previously
@@ -516,7 +522,8 @@ This also updates the displayed table."
516 (if (> (nth 1 elem) (elt widths index)) 522 (if (> (nth 1 elem) (elt widths index))
517 (concat 523 (concat
518 (vtable--limit-string 524 (vtable--limit-string
519 pre-computed (- (elt widths index) ellipsis-width)) 525 pre-computed (- (elt widths index)
526 (or ellipsis-width 0)))
520 ellipsis) 527 ellipsis)
521 pre-computed)) 528 pre-computed))
522 ;; Recompute widths. 529 ;; Recompute widths.
@@ -524,7 +531,8 @@ This also updates the displayed table."
524 (if (> (string-pixel-width value) (elt widths index)) 531 (if (> (string-pixel-width value) (elt widths index))
525 (concat 532 (concat
526 (vtable--limit-string 533 (vtable--limit-string
527 value (- (elt widths index) ellipsis-width)) 534 value (- (elt widths index)
535 (or ellipsis-width 0)))
528 ellipsis) 536 ellipsis)
529 value)))) 537 value))))
530 (start (point)) 538 (start (point))
diff --git a/lisp/erc/ChangeLog.1 b/lisp/erc/ChangeLog.1
index 0ea7ef09aa7..8fc97854303 100644
--- a/lisp/erc/ChangeLog.1
+++ b/lisp/erc/ChangeLog.1
@@ -3779,7 +3779,7 @@
3779 doesn't appear). 3779 doesn't appear).
3780 3780
3781 * NEWS: Added the information from 3781 * NEWS: Added the information from
3782 http://emacswiki.org/cgi-bin/wiki/ErcCvsFeatures and the newer 3782 https://emacswiki.org/cgi-bin/wiki/ErcCvsFeatures and the newer
3783 changes which weren't yet documented on that page. 3783 changes which weren't yet documented on that page.
3784 3784
37852005-01-06 Hoan Ton-That <hoan@ton-that.org> 37852005-01-06 Hoan Ton-That <hoan@ton-that.org>
@@ -8298,7 +8298,7 @@
8298 it doesn't move point to end-of-buffer in non-ERC buffers. Fixed 8298 it doesn't move point to end-of-buffer in non-ERC buffers. Fixed
8299 erc-kill-buffer-function so it doesn't run the erc-kill-server-hook hooks if the 8299 erc-kill-buffer-function so it doesn't run the erc-kill-server-hook hooks if the
8300 server connection is closed. Fixed bug 658552, which is described in detail at 8300 server connection is closed. Fixed bug 658552, which is described in detail at
8301 http://sourceforge.net/tracker/index.php?func=detail&aid=658552&group_id=30118&atid=398125 8301 https://sourceforge.net/tracker/index.php?func=detail&aid=658552&group_id=30118&atid=398125
8302 8302
83032002-12-26 Alex Schroeder <alex@gnu.org> 83032002-12-26 Alex Schroeder <alex@gnu.org>
8304 8304
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index f128387bcf6..db39e341b2f 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -6961,6 +6961,8 @@ shortened server name instead."
6961 6961
6962(defvar tabbar--local-hlf) 6962(defvar tabbar--local-hlf)
6963 6963
6964;; FIXME when 29.1 is cut and `format-spec' is added to ELPA Compat,
6965;; remove the function invocations from the spec form below.
6964(defun erc-update-mode-line-buffer (buffer) 6966(defun erc-update-mode-line-buffer (buffer)
6965 "Update the mode line in a single ERC buffer BUFFER." 6967 "Update the mode line in a single ERC buffer BUFFER."
6966 (with-current-buffer buffer 6968 (with-current-buffer buffer
@@ -7325,7 +7327,7 @@ See also `format-spec'."
7325 (error "No format spec for message %s" msg)) 7327 (error "No format spec for message %s" msg))
7326 (when (functionp entry) 7328 (when (functionp entry)
7327 (setq entry (apply entry args))) 7329 (setq entry (apply entry args)))
7328 (format-spec entry (apply #'format-spec-make args)))) 7330 (format-spec entry (apply #'format-spec-make args) 'ignore)))
7329 7331
7330;;; Various hook functions 7332;;; Various hook functions
7331 7333
diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el
index 40b83010f94..4b5e4dd53ed 100644
--- a/lisp/eshell/em-unix.el
+++ b/lisp/eshell/em-unix.el
@@ -372,12 +372,10 @@ Remove the DIRECTORY(ies), if they are empty.")
372 (setq attr (eshell-file-attributes (car files))) 372 (setq attr (eshell-file-attributes (car files)))
373 (file-attribute-inode-number attr-target) 373 (file-attribute-inode-number attr-target)
374 (file-attribute-inode-number attr) 374 (file-attribute-inode-number attr)
375 (equal (file-attribute-inode-number attr-target)
376 (file-attribute-inode-number attr))
377 (file-attribute-device-number attr-target) 375 (file-attribute-device-number attr-target)
378 (file-attribute-device-number attr) 376 (file-attribute-device-number attr)
379 (equal (file-attribute-device-number attr-target) 377 (equal (file-attribute-file-identifier attr-target)
380 (file-attribute-device-number attr))) 378 (file-attribute-file-identifier attr)))
381 (eshell-error (format-message "%s: `%s' and `%s' are the same file\n" 379 (eshell-error (format-message "%s: `%s' and `%s' are the same file\n"
382 command (car files) target))) 380 command (car files) target)))
383 (t 381 (t
diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el
index 7e005a0fc1c..bb928fc5fb0 100644
--- a/lisp/eshell/esh-proc.el
+++ b/lisp/eshell/esh-proc.el
@@ -277,7 +277,23 @@ Used only on systems which do not support async subprocesses.")
277 eshell-delete-exited-processes 277 eshell-delete-exited-processes
278 delete-exited-processes)) 278 delete-exited-processes))
279 (process-environment (eshell-environment-variables)) 279 (process-environment (eshell-environment-variables))
280 (coding-system-for-read coding-system-for-read)
281 (coding-system-for-write coding-system-for-write)
280 proc stderr-proc decoding encoding changed) 282 proc stderr-proc decoding encoding changed)
283 ;; MS-Windows needs special setting of encoding/decoding, because
284 ;; (a) non-ASCII text in command-line arguments needs to be
285 ;; encoded in the system's codepage; and (b) because many Windows
286 ;; programs will always interpret any non-ASCII input as encoded
287 ;; in the system codepage.
288 (when (eq system-type 'windows-nt)
289 (or coding-system-for-read ; Honor manual decoding settings
290 (setq coding-system-for-read
291 (coding-system-change-eol-conversion locale-coding-system
292 'dos)))
293 (or coding-system-for-write ; Honor manual encoding settings
294 (setq coding-system-for-write
295 (coding-system-change-eol-conversion locale-coding-system
296 'unix))))
281 (cond 297 (cond
282 ((fboundp 'make-process) 298 ((fboundp 'make-process)
283 (unless (equal (car (aref eshell-current-handles eshell-output-handle)) 299 (unless (equal (car (aref eshell-current-handles eshell-output-handle))
@@ -325,7 +341,7 @@ Used only on systems which do not support async subprocesses.")
325 (setq decoding (coding-system-change-eol-conversion decoding 'dos) 341 (setq decoding (coding-system-change-eol-conversion decoding 'dos)
326 changed t)) 342 changed t))
327 ;; Even if `make-process' left the coding system for encoding 343 ;; Even if `make-process' left the coding system for encoding
328 ;; data sent from the process undecided, we had better use the 344 ;; data sent to the process undecided, we had better use the
329 ;; same one as what we use for decoding. But, we should 345 ;; same one as what we use for decoding. But, we should
330 ;; suppress EOL conversion. 346 ;; suppress EOL conversion.
331 (if (and decoding (not encoding)) 347 (if (and decoding (not encoding))
diff --git a/lisp/files-x.el b/lisp/files-x.el
index da1e44e2504..0131d495f27 100644
--- a/lisp/files-x.el
+++ b/lisp/files-x.el
@@ -489,7 +489,9 @@ from the MODE alist ignoring the input argument VALUE."
489 dir-locals-directory-cache)) 489 dir-locals-directory-cache))
490 490
491 ;; Insert modified alist of directory-local variables. 491 ;; Insert modified alist of directory-local variables.
492 (insert ";;; Directory Local Variables\n") 492 ;; When changing this, also update the ".dir-locals.el" file for
493 ;; Emacs itself, as well as the template in autoinsert.el.
494 (insert ";;; Directory Local Variables -*- no-byte-compile: t -*-\n")
493 (insert ";;; For more information see (info \"(emacs) Directory Variables\")\n\n") 495 (insert ";;; For more information see (info \"(emacs) Directory Variables\")\n\n")
494 (princ (dir-locals-to-string 496 (princ (dir-locals-to-string
495 (sort variables 497 (sort variables
diff --git a/lisp/files.el b/lisp/files.el
index 43c5d7d1da1..3fa0f2f3b81 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -208,9 +208,10 @@ if the file has changed on disk and you have not edited the buffer."
208 :group 'find-file) 208 :group 'find-file)
209 209
210(defvar-local buffer-file-number nil 210(defvar-local buffer-file-number nil
211 "The device number and file number of the file visited in the current buffer. 211 "The inode number and the device of the file visited in the current buffer.
212The value is a list of the form (FILENUM DEVNUM). 212The value is a list of the form (INODENUM DEVICE), where DEVICE can be
213This pair of numbers uniquely identifies the file. 213either a single number or a cons cell of two numbers.
214This tuple of numbers uniquely identifies the file.
214If the buffer is visiting a new file, the value is nil.") 215If the buffer is visiting a new file, the value is nil.")
215(put 'buffer-file-number 'permanent-local t) 216(put 'buffer-file-number 'permanent-local t)
216 217
@@ -2163,7 +2164,7 @@ If there is no such live buffer, return nil."
2163 (setq list (cdr list))) 2164 (setq list (cdr list)))
2164 found) 2165 found)
2165 (let* ((attributes (file-attributes truename)) 2166 (let* ((attributes (file-attributes truename))
2166 (number (nthcdr 10 attributes)) 2167 (number (file-attribute-file-identifier attributes))
2167 (list (buffer-list)) found) 2168 (list (buffer-list)) found)
2168 (and buffer-file-numbers-unique 2169 (and buffer-file-numbers-unique
2169 (car-safe number) ;Make sure the inode is not just nil. 2170 (car-safe number) ;Make sure the inode is not just nil.
@@ -2366,7 +2367,7 @@ the various files."
2366 (let* ((buf (get-file-buffer filename)) 2367 (let* ((buf (get-file-buffer filename))
2367 (truename (abbreviate-file-name (file-truename filename))) 2368 (truename (abbreviate-file-name (file-truename filename)))
2368 (attributes (file-attributes truename)) 2369 (attributes (file-attributes truename))
2369 (number (nthcdr 10 attributes)) 2370 (number (file-attribute-file-identifier attributes))
2370 ;; Find any buffer for a file that has same truename. 2371 ;; Find any buffer for a file that has same truename.
2371 (other (and (not buf) 2372 (other (and (not buf)
2372 (find-buffer-visiting 2373 (find-buffer-visiting
@@ -4744,7 +4745,7 @@ the old visited file has been renamed to the new name FILENAME."
4744 (setq buffer-file-name truename)))) 4745 (setq buffer-file-name truename))))
4745 (setq buffer-file-number 4746 (setq buffer-file-number
4746 (if filename 4747 (if filename
4747 (nthcdr 10 (file-attributes buffer-file-name)) 4748 (file-attribute-file-identifier (file-attributes buffer-file-name))
4748 nil)) 4749 nil))
4749 ;; write-file-functions is normally used for things like ftp-find-file 4750 ;; write-file-functions is normally used for things like ftp-find-file
4750 ;; that visit things that are not local files as if they were files. 4751 ;; that visit things that are not local files as if they were files.
@@ -5733,7 +5734,8 @@ Before and after saving the buffer, this function runs
5733 (setq save-buffer-coding-system last-coding-system-used) 5734 (setq save-buffer-coding-system last-coding-system-used)
5734 (setq buffer-file-coding-system last-coding-system-used)) 5735 (setq buffer-file-coding-system last-coding-system-used))
5735 (setq buffer-file-number 5736 (setq buffer-file-number
5736 (nthcdr 10 (file-attributes buffer-file-name))) 5737 (file-attribute-file-identifier
5738 (file-attributes buffer-file-name)))
5737 (if setmodes 5739 (if setmodes
5738 (condition-case () 5740 (condition-case ()
5739 (progn 5741 (progn
@@ -6344,9 +6346,10 @@ If FILE1 or FILE2 does not exist, the return value is unspecified."
6344 (equal f1-attr f2-attr)))))) 6346 (equal f1-attr f2-attr))))))
6345 6347
6346(defun file-in-directory-p (file dir) 6348(defun file-in-directory-p (file dir)
6347 "Return non-nil if FILE is in DIR or a subdirectory of DIR. 6349 "Return non-nil if DIR is a parent directory of FILE.
6348A directory is considered to be \"in\" itself. 6350Value is non-nil if FILE is inside DIR or inside a subdirectory of DIR.
6349Return nil if DIR is not an existing directory." 6351A directory is considered to be a \"parent\" of itself.
6352DIR must be an existing directory, otherwise the function returns nil."
6350 (let ((handler (or (find-file-name-handler file 'file-in-directory-p) 6353 (let ((handler (or (find-file-name-handler file 'file-in-directory-p)
6351 (find-file-name-handler dir 'file-in-directory-p)))) 6354 (find-file-name-handler dir 'file-in-directory-p))))
6352 (if handler 6355 (if handler
@@ -8657,19 +8660,26 @@ It is a nonnegative integer."
8657 8660
8658(defsubst file-attribute-device-number (attributes) 8661(defsubst file-attribute-device-number (attributes)
8659 "The file system device number in ATTRIBUTES returned by `file-attributes'. 8662 "The file system device number in ATTRIBUTES returned by `file-attributes'.
8660It is an integer." 8663It is an integer or a cons cell of integers."
8661 (nth 11 attributes)) 8664 (nth 11 attributes))
8662 8665
8666(defsubst file-attribute-file-identifier (attributes)
8667 "The inode and device numbers in ATTRIBUTES returned by `file-attributes'.
8668The value is a list of the form (INODENUM DEVICE), where DEVICE could be
8669either a single number or a cons cell of two numbers.
8670This tuple of numbers uniquely identifies the file."
8671 (nthcdr 10 attributes))
8672
8663(defun file-attribute-collect (attributes &rest attr-names) 8673(defun file-attribute-collect (attributes &rest attr-names)
8664 "Return a sublist of ATTRIBUTES returned by `file-attributes'. 8674 "Return a sublist of ATTRIBUTES returned by `file-attributes'.
8665ATTR-NAMES are symbols with the selected attribute names. 8675ATTR-NAMES are symbols with the selected attribute names.
8666 8676
8667Valid attribute names are: type, link-number, user-id, group-id, 8677Valid attribute names are: type, link-number, user-id, group-id,
8668access-time, modification-time, status-change-time, size, modes, 8678access-time, modification-time, status-change-time, size, modes,
8669inode-number and device-number." 8679inode-number, device-number and file-number."
8670 (let ((all '(type link-number user-id group-id access-time 8680 (let ((all '(type link-number user-id group-id access-time
8671 modification-time status-change-time 8681 modification-time status-change-time
8672 size modes inode-number device-number)) 8682 size modes inode-number device-number file-number))
8673 result) 8683 result)
8674 (while attr-names 8684 (while attr-names
8675 (let ((attr (pop attr-names))) 8685 (let ((attr (pop attr-names)))
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 67ec0531fa4..5e4e9854a6b 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -4361,10 +4361,10 @@ arguments. If METHOD is nil in this case, the return value of
4361the function will be inserted instead. 4361the function will be inserted instead.
4362If the buffer already has a\"X-Message-SMTP-Method\" header, 4362If the buffer already has a\"X-Message-SMTP-Method\" header,
4363it is left unchanged." 4363it is left unchanged."
4364 :type '(alist :key-type '(choice 4364 :type '(alist :key-type (choice
4365 (string :tag "From Address") 4365 (string :tag "From Address")
4366 (function :tag "Predicate")) 4366 (function :tag "Predicate"))
4367 :value-type 'string) 4367 :value-type string)
4368 :version "29.1" 4368 :version "29.1"
4369 :group 'message-sending) 4369 :group 'message-sending)
4370 4370
diff --git a/lisp/gnus/mm-uu.el b/lisp/gnus/mm-uu.el
index 8646998deb9..8d314706340 100644
--- a/lisp/gnus/mm-uu.el
+++ b/lisp/gnus/mm-uu.el
@@ -194,7 +194,7 @@ This can be either \"inline\" or \"attachment\".")
194 nil) 194 nil)
195 (verbatim-marks 195 (verbatim-marks
196 ;; slrn-style verbatim marks, see 196 ;; slrn-style verbatim marks, see
197 ;; http://slrn.sourceforge.net/docs/slrn-manual-6.html#process_verbatim_marks 197 ;; https://slrn.sourceforge.net/docs/slrn-manual-6.html#process_verbatim_marks
198 "^#v\\+" 198 "^#v\\+"
199 "^#v\\-$" 199 "^#v\\-$"
200 ,(lambda () (mm-uu-verbatim-marks-extract 0 0)) 200 ,(lambda () (mm-uu-verbatim-marks-extract 0 0))
diff --git a/lisp/gnus/nndoc.el b/lisp/gnus/nndoc.el
index cdff7c9accf..378ada62475 100644
--- a/lisp/gnus/nndoc.el
+++ b/lisp/gnus/nndoc.el
@@ -23,7 +23,7 @@
23 23
24;;; Commentary: 24;;; Commentary:
25 25
26;; For Outlook mail boxes format, see http://mbx2mbox.sourceforge.net/ 26;; For Outlook mail boxes format, see https://mbx2mbox.sourceforge.net/
27 27
28;;; Code: 28;;; Code:
29 29
diff --git a/lisp/help.el b/lisp/help.el
index b4b9120da3e..3f5e57d7d5f 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -112,7 +112,7 @@ buffer.")
112 (define-key map "v" 'describe-variable) 112 (define-key map "v" 'describe-variable)
113 (define-key map "w" 'where-is) 113 (define-key map "w" 'where-is)
114 (define-key map "x" 'describe-command) 114 (define-key map "x" 'describe-command)
115 (define-key map "q" 'help-quit) 115 (define-key map "q" 'help-quit-or-quick)
116 map) 116 map)
117 "Keymap for characters following the Help key.") 117 "Keymap for characters following the Help key.")
118 118
@@ -125,11 +125,143 @@ buffer.")
125(defvar help-button-cache nil) 125(defvar help-button-cache nil)
126 126
127 127
128
129(defvar help-quick-sections
130 '(("File"
131 (save-buffers-kill-terminal . "exit")
132 (find-file . "find")
133 (write-file . "write")
134 (save-buffer . "save")
135 (save-some-buffers . "all"))
136 ("Buffer"
137 (kill-buffer . "kill")
138 (list-buffers . "list")
139 (switch-to-buffer . "switch")
140 (goto-line . "goto line")
141 (read-only-mode . "read only"))
142 ("Window"
143 (delete-window . "only other")
144 (delete-other-windows . "only this")
145 (split-window-below . "split vert.")
146 (split-window-right . "split horiz.")
147 (other-window . "other window"))
148 ("Mark & Kill"
149 (set-mark-command . "mark")
150 (kill-line . "kill line")
151 (kill-ring-save . "kill region")
152 (yank . "yank")
153 (exchange-point-and-mark . "swap"))
154 ("Projects"
155 (project-switch-project . "switch")
156 (project-find-file . "find file")
157 (project-find-regexp . "search")
158 (project-query-replace-regexp . "search & replace")
159 (project-compile . "compile"))
160 ("Misc."
161 (undo . "undo")
162 (isearch-forward . "search")
163 (isearch-backward . "reverse search")
164 (query-replace . "search & replace")
165 (fill-paragraph . "reformat"))))
166
167(declare-function prop-match-value "text-property-search" (match))
168
169;; Inspired by a mg fork (https://github.com/troglobit/mg)
170(defun help-quick ()
171 "Display a quick-help buffer."
172 (interactive)
173 (with-current-buffer (get-buffer-create "*Quick Help*")
174 (let ((inhibit-read-only t) (padding 2) blocks)
175
176 ;; Go through every section and prepare a text-rectangle to be
177 ;; inserted later.
178 (dolist (section help-quick-sections)
179 (let ((max-key-len 0) (max-cmd-len 0) keys)
180 (dolist (ent (reverse (cdr section)))
181 (catch 'skip
182 (let* ((bind (where-is-internal (car ent) nil t))
183 (key (if bind
184 (propertize
185 (key-description bind)
186 'face 'help-key-binding)
187 (throw 'skip nil))))
188 (setq max-cmd-len (max (length (cdr ent)) max-cmd-len)
189 max-key-len (max (length key) max-key-len))
190 (push (list key (cdr ent) (car ent)) keys))))
191 (when keys
192 (let ((fmt (format "%%-%ds %%-%ds%s" max-key-len max-cmd-len
193 (make-string padding ?\s)))
194 (width (+ max-key-len 1 max-cmd-len padding)))
195 (push `(,width
196 ,(propertize
197 (concat
198 (car section)
199 (make-string (- width (length (car section))) ?\s))
200 'face 'bold)
201 ,@(mapcar (lambda (ent)
202 (format fmt
203 (propertize
204 (car ent)
205 'quick-help-cmd
206 (caddr ent))
207 (cadr ent)))
208 keys))
209 blocks)))))
210
211 ;; Insert each rectangle in order until they don't fit into the
212 ;; frame any more, in which case the next sections are inserted
213 ;; in a new "line".
214 (erase-buffer)
215 (dolist (block (nreverse blocks))
216 (when (> (+ (car block) (current-column)) (frame-width))
217 (goto-char (point-max))
218 (newline 2))
219 (save-excursion
220 (insert-rectangle (cdr block)))
221 (end-of-line))
222 (delete-trailing-whitespace)
223
224 (save-excursion
225 (goto-char (point-min))
226 (while-let ((match (text-property-search-forward 'quick-help-cmd)))
227 (make-text-button (prop-match-beginning match)
228 (prop-match-end match)
229 'mouse-face 'highlight
230 'button t
231 'keymap button-map
232 'action #'describe-symbol
233 'button-data (prop-match-value match)))))
234
235 (help-mode)
236
237 ;; Display the buffer at the bottom of the frame...
238 (with-selected-window (display-buffer-at-bottom (current-buffer) '())
239 ;; ... mark it as dedicated to prevent focus from being stolen
240 (set-window-dedicated-p (selected-window) t)
241 ;; ... and shrink it immediately.
242 (fit-window-to-buffer))
243 (message
244 (substitute-command-keys "Toggle the quick help buffer using \\[help-quit-or-quick]."))))
245
246(defalias 'cheat-sheet #'help-quick)
247
128(defun help-quit () 248(defun help-quit ()
129 "Just exit from the Help command's command loop." 249 "Just exit from the Help command's command loop."
130 (interactive) 250 (interactive)
131 nil) 251 nil)
132 252
253(defun help-quit-or-quick ()
254 "Call `help-quit' or `help-quick' depending on the context."
255 (interactive)
256 (cond
257 (help-buffer-under-preparation
258 ;; FIXME: There should be a better way to detect if we are in the
259 ;; help command loop.
260 (help-quit))
261 ((and-let* ((window (get-buffer-window "*Quick Help*")))
262 (quit-window t window)))
263 ((help-quick))))
264
133(defvar help-return-method nil 265(defvar help-return-method nil
134 "What to do to \"exit\" the help buffer. 266 "What to do to \"exit\" the help buffer.
135This is a list 267This is a list
@@ -279,6 +411,7 @@ Do not call this in the scope of `with-help-window'."
279 ("describe-package" "Describe a specific Emacs package") 411 ("describe-package" "Describe a specific Emacs package")
280 "" 412 ""
281 ("help-with-tutorial" "Start the Emacs tutorial") 413 ("help-with-tutorial" "Start the Emacs tutorial")
414 ("help-quick-or-quit" "Display the quick help buffer.")
282 ("view-echo-area-messages" 415 ("view-echo-area-messages"
283 "Show recent messages (from echo area)") 416 "Show recent messages (from echo area)")
284 ("view-lossage" ,(format "Show last %d input keystrokes (lossage)" 417 ("view-lossage" ,(format "Show last %d input keystrokes (lossage)"
diff --git a/lisp/hl-line.el b/lisp/hl-line.el
index 693c94eea8c..87bea1017f1 100644
--- a/lisp/hl-line.el
+++ b/lisp/hl-line.el
@@ -156,7 +156,8 @@ line about point in the selected window only."
156 :group 'hl-line 156 :group 'hl-line
157 ;; If the global mode is switched on, then `M-x hl-line-mode' should 157 ;; If the global mode is switched on, then `M-x hl-line-mode' should
158 ;; switch the mode off in this buffer. 158 ;; switch the mode off in this buffer.
159 (when global-hl-line-mode 159 (when (and global-hl-line-mode
160 (eq arg 'toggle))
160 (setq hl-line-mode nil) 161 (setq hl-line-mode nil)
161 (setq-local global-hl-line-mode nil) 162 (setq-local global-hl-line-mode nil)
162 (global-hl-line-unhighlight)) 163 (global-hl-line-unhighlight))
diff --git a/lisp/info.el b/lisp/info.el
index 292bf93a6f4..fabba2734a3 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -763,6 +763,11 @@ See a list of available Info commands in `Info-mode'."
763 (read-file-name "Info file name: " nil nil t)) 763 (read-file-name "Info file name: " nil nil t))
764 (if (numberp current-prefix-arg) 764 (if (numberp current-prefix-arg)
765 (format "*info*<%s>" current-prefix-arg)))) 765 (format "*info*<%s>" current-prefix-arg))))
766 (when file-or-node
767 ;; Info node names don't contain newlines, so allow for easier use
768 ;; of names that might have been wrapped (in emails, etc.).
769 (setq file-or-node
770 (string-replace "\n" " " file-or-node)))
766 (info-setup file-or-node 771 (info-setup file-or-node
767 (pop-to-buffer-same-window (or buffer "*info*")))) 772 (pop-to-buffer-same-window (or buffer "*info*"))))
768 773
diff --git a/lisp/language/indonesian.el b/lisp/language/indonesian.el
index 699f8192543..5afcd27759d 100644
--- a/lisp/language/indonesian.el
+++ b/lisp/language/indonesian.el
@@ -34,7 +34,8 @@
34 (input-method . "balinese") 34 (input-method . "balinese")
35 (sample-text . "Balinese (ᬅᬓ᭄ᬱᬭᬩᬮᬶ) ᬒᬁᬲ᭄ᬯᬲ᭄ᬢ᭄ᬬᬲ᭄ᬢᬸ") 35 (sample-text . "Balinese (ᬅᬓ᭄ᬱᬭᬩᬮᬶ) ᬒᬁᬲ᭄ᬯᬲ᭄ᬢ᭄ᬬᬲ᭄ᬢᬸ")
36 (documentation . "\ 36 (documentation . "\
37Balinese language and its script are supported in this language environment."))) 37Balinese language and its script are supported in this language environment."))
38 '("Indonesian"))
38 39
39(set-language-info-alist 40(set-language-info-alist
40 "Javanese" '((charset unicode) 41 "Javanese" '((charset unicode)
@@ -43,7 +44,8 @@ Balinese language and its script are supported in this language environment.")))
43 (input-method . "javanese") 44 (input-method . "javanese")
44 (sample-text . "Javanese (ꦲꦏ꧀ꦱꦫꦗꦮ) ꦲꦭꦺꦴ") 45 (sample-text . "Javanese (ꦲꦏ꧀ꦱꦫꦗꦮ) ꦲꦭꦺꦴ")
45 (documentation . "\ 46 (documentation . "\
46Javanese language and its script are supported in this language environment."))) 47Javanese language and its script are supported in this language environment."))
48 '("Indonesian"))
47 49
48(set-language-info-alist 50(set-language-info-alist
49 "Sundanese" '((charset unicode) 51 "Sundanese" '((charset unicode)
@@ -52,7 +54,8 @@ Javanese language and its script are supported in this language environment.")))
52 (input-method . "sundanese") 54 (input-method . "sundanese")
53 (sample-text . "Sundanese (ᮃᮊ᮪ᮞᮛᮞᮥᮔ᮪ᮓ) ᮞᮙ᮪ᮕᮥᮛᮞᮥᮔ᮪") 55 (sample-text . "Sundanese (ᮃᮊ᮪ᮞᮛᮞᮥᮔ᮪ᮓ) ᮞᮙ᮪ᮕᮥᮛᮞᮥᮔ᮪")
54 (documentation . "\ 56 (documentation . "\
55Sundanese language and its script are supported in this language environment."))) 57Sundanese language and its script are supported in this language environment."))
58 '("Indonesian"))
56 59
57(set-language-info-alist 60(set-language-info-alist
58 "Batak" '((charset unicode) 61 "Batak" '((charset unicode)
@@ -62,7 +65,8 @@ Sundanese language and its script are supported in this language environment."))
62 (sample-text . "Batak (ᯘᯮᯒᯗ᯲ᯅᯗᯂ᯲) ᯂᯬᯒᯘ᯲ / ᯔᯧᯐᯬᯀᯱᯐᯬᯀᯱ") 65 (sample-text . "Batak (ᯘᯮᯒᯗ᯲ᯅᯗᯂ᯲) ᯂᯬᯒᯘ᯲ / ᯔᯧᯐᯬᯀᯱᯐᯬᯀᯱ")
63 (documentation . "\ 66 (documentation . "\
64Languages that use the Batak script, such as Karo, Toba, Pakpak, Mandailing 67Languages that use the Batak script, such as Karo, Toba, Pakpak, Mandailing
65and Simalungun, are supported in this language environment."))) 68and Simalungun, are supported in this language environment."))
69 '("Indonesian"))
66 70
67(set-language-info-alist 71(set-language-info-alist
68 "Rejang" '((charset unicode) 72 "Rejang" '((charset unicode)
@@ -71,7 +75,8 @@ and Simalungun, are supported in this language environment.")))
71 (input-method . "rejang") 75 (input-method . "rejang")
72 (sample-text . "Rejang (ꥆꤰ꥓ꤼꤽ ꤽꥍꤺꥏ) ꤸꥉꥐꤺꥉꥂꥎ") 76 (sample-text . "Rejang (ꥆꤰ꥓ꤼꤽ ꤽꥍꤺꥏ) ꤸꥉꥐꤺꥉꥂꥎ")
73 (documentation . "\ 77 (documentation . "\
74Rejang language and its script are supported in this language environment."))) 78Rejang language and its script are supported in this language environment."))
79 '("Indonesian"))
75 80
76(set-language-info-alist 81(set-language-info-alist
77 "Makasar" '((charset unicode) 82 "Makasar" '((charset unicode)
@@ -80,7 +85,8 @@ Rejang language and its script are supported in this language environment.")))
80 (input-method . "makasar") 85 (input-method . "makasar")
81 (sample-text . "Makasar (𑻪𑻢𑻪𑻢) 𑻦𑻤𑻵𑻱") 86 (sample-text . "Makasar (𑻪𑻢𑻪𑻢) 𑻦𑻤𑻵𑻱")
82 (documentation . "\ 87 (documentation . "\
83Makassarese language and its script Makasar are supported in this language environment."))) 88Makassarese language and its script Makasar are supported in this language environment."))
89 '("Indonesian"))
84 90
85(set-language-info-alist 91(set-language-info-alist
86 "Buginese" '((charset unicode) 92 "Buginese" '((charset unicode)
@@ -89,7 +95,8 @@ Makassarese language and its script Makasar are supported in this language envir
89 (input-method . "lontara") 95 (input-method . "lontara")
90 (sample-text . "Buginese (ᨒᨚᨈᨑ) ᨖᨒᨚ") 96 (sample-text . "Buginese (ᨒᨚᨈᨑ) ᨖᨒᨚ")
91 (documentation . "\ 97 (documentation . "\
92Buginese language and its script Lontara are supported in this language environment."))) 98Buginese language and its script Lontara are supported in this language environment."))
99 '("Indonesian"))
93 100
94;; Balinese composition rules 101;; Balinese composition rules
95(let ((consonant "[\x1B13-\x1B33\x1B45-\x1B4B]") 102(let ((consonant "[\x1B13-\x1B33\x1B45-\x1B4B]")
diff --git a/lisp/language/misc-lang.el b/lisp/language/misc-lang.el
index 370be4b4a39..c34017d9b3a 100644
--- a/lisp/language/misc-lang.el
+++ b/lisp/language/misc-lang.el
@@ -228,7 +228,8 @@ thin (i.e. 1-dot width) space."
228 (sample-text . "Hanifi Rohingya (𐴌𐴟𐴇𐴥𐴝𐴚𐴒𐴙𐴝 𐴇𐴝𐴕𐴞𐴉𐴞 𐴓𐴠𐴑𐴤𐴝) 𐴀𐴝𐴏𐴓𐴝𐴀𐴡𐴤𐴛𐴝𐴓𐴝𐴙𐴑𐴟𐴔") 228 (sample-text . "Hanifi Rohingya (𐴌𐴟𐴇𐴥𐴝𐴚𐴒𐴙𐴝 𐴇𐴝𐴕𐴞𐴉𐴞 𐴓𐴠𐴑𐴤𐴝) 𐴀𐴝𐴏𐴓𐴝𐴀𐴡𐴤𐴛𐴝𐴓𐴝𐴙𐴑𐴟𐴔")
229 (documentation . "\ 229 (documentation . "\
230Rohingya language and its script Hanifi Rohingya are supported 230Rohingya language and its script Hanifi Rohingya are supported
231in this language environment."))) 231in this language environment."))
232 '("Misc"))
232 233
233;; Hanifi Rohingya composition rules 234;; Hanifi Rohingya composition rules
234(set-char-table-range 235(set-char-table-range
@@ -251,7 +252,8 @@ in this language environment.")))
251 (sample-text . "Kharoṣṭhī (𐨑𐨪𐨆𐨛𐨁) 𐨣𐨨𐨲𐨪𐨆 𐨐𐨪𐨅𐨨𐨁") 252 (sample-text . "Kharoṣṭhī (𐨑𐨪𐨆𐨛𐨁) 𐨣𐨨𐨲𐨪𐨆 𐨐𐨪𐨅𐨨𐨁")
252 (documentation . "\ 253 (documentation . "\
253Language environment for Gāndhārī, Sanskrit, and other languages 254Language environment for Gāndhārī, Sanskrit, and other languages
254using the Kharoṣṭhī script."))) 255using the Kharoṣṭhī script."))
256 '("Misc"))
255 257
256(let ((consonant "[\U00010A00\U00010A10-\U00010A35]") 258(let ((consonant "[\U00010A00\U00010A10-\U00010A35]")
257 (vowel "[\U00010A01-\U00010A06]") 259 (vowel "[\U00010A01-\U00010A06]")
@@ -281,7 +283,8 @@ using the Kharoṣṭhī script.")))
281 (sample-text . "Adlam (𞤀𞤣𞤤𞤢𞤥) 𞤅𞤢𞤤𞤢𞥄𞤥") 283 (sample-text . "Adlam (𞤀𞤣𞤤𞤢𞤥) 𞤅𞤢𞤤𞤢𞥄𞤥")
282 (documentation . "\ 284 (documentation . "\
283Fulani language and its script Adlam are supported 285Fulani language and its script Adlam are supported
284in this language environment."))) 286in this language environment."))
287 '("Misc"))
285 288
286;; Adlam composition rules 289;; Adlam composition rules
287(set-char-table-range 290(set-char-table-range
@@ -303,7 +306,8 @@ in this language environment.")))
303 (sample-text . "Mende Kikakui (𞠀𞠁𞠂) 𞠛𞠉") 306 (sample-text . "Mende Kikakui (𞠀𞠁𞠂) 𞠛𞠉")
304 (documentation . "\ 307 (documentation . "\
305Mende language and its script Kikakui are supported 308Mende language and its script Kikakui are supported
306in this language environment."))) 309in this language environment."))
310 '("Misc"))
307 311
308;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 312;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
309;; Gothic 313;; Gothic
@@ -317,7 +321,8 @@ in this language environment.")))
317 (sample-text . "Gothic (𐌲𐌿𐍄𐌹𐍃𐌺𐌰) 𐌷𐌰𐌹𐌻𐍃 / 𐌷𐌰𐌹𐌻𐌰") 321 (sample-text . "Gothic (𐌲𐌿𐍄𐌹𐍃𐌺𐌰) 𐌷𐌰𐌹𐌻𐍃 / 𐌷𐌰𐌹𐌻𐌰")
318 (documentation . "\ 322 (documentation . "\
319Ancient Gothic language using the Gothic script is supported in this 323Ancient Gothic language using the Gothic script is supported in this
320language environment."))) 324language environment."))
325 '("Misc"))
321 326
322;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 327;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
323;; Coptic 328;; Coptic
@@ -331,7 +336,8 @@ language environment.")))
331 (sample-text . "Coptic (ⲘⲉⲧⲢⲉⲙ̀ⲛⲭⲏⲙⲓ) Ⲛⲟⲩϥⲣⲓ") 336 (sample-text . "Coptic (ⲘⲉⲧⲢⲉⲙ̀ⲛⲭⲏⲙⲓ) Ⲛⲟⲩϥⲣⲓ")
332 (documentation . "\ 337 (documentation . "\
333Coptic language using the Coptic script is supported in this 338Coptic language using the Coptic script is supported in this
334language environment."))) 339language environment."))
340 '("Misc"))
335 341
336(provide 'misc-lang) 342(provide 'misc-lang)
337 343
diff --git a/lisp/language/philippine.el b/lisp/language/philippine.el
index e52ad6912cd..ce619bdaa1d 100644
--- a/lisp/language/philippine.el
+++ b/lisp/language/philippine.el
@@ -35,7 +35,8 @@
35 (sample-text . "Tagalog (ᜊᜌ᜔ᜊᜌᜒᜈ᜔) ᜃᜓᜋᜓᜐ᜔ᜆ") 35 (sample-text . "Tagalog (ᜊᜌ᜔ᜊᜌᜒᜈ᜔) ᜃᜓᜋᜓᜐ᜔ᜆ")
36 (documentation . "\ 36 (documentation . "\
37Tagalog language using the Baybayin script is supported in 37Tagalog language using the Baybayin script is supported in
38this language environment."))) 38this language environment."))
39 '("Philippine"))
39 40
40(set-language-info-alist 41(set-language-info-alist
41 "Hanunoo" '((charset unicode) 42 "Hanunoo" '((charset unicode)
@@ -44,7 +45,8 @@ this language environment.")))
44 (input-method . "hanunoo") 45 (input-method . "hanunoo")
45 (sample-text . "Hanunoo (ᜱᜨᜳᜨᜳᜢ) ᜫᜬᜧ᜴ ᜣᜭᜯᜥ᜴ ᜰᜲᜭᜥ᜴") 46 (sample-text . "Hanunoo (ᜱᜨᜳᜨᜳᜢ) ᜫᜬᜧ᜴ ᜣᜭᜯᜥ᜴ ᜰᜲᜭᜥ᜴")
46 (documentation . "\ 47 (documentation . "\
47Philippine Language Hanunoo is supported in this language environment."))) 48Philippine Language Hanunoo is supported in this language environment."))
49 '("Philippine"))
48 50
49(set-language-info-alist 51(set-language-info-alist
50 "Buhid" '((charset unicode) 52 "Buhid" '((charset unicode)
@@ -52,7 +54,8 @@ Philippine Language Hanunoo is supported in this language environment.")))
52 (coding-priority utf-8) 54 (coding-priority utf-8)
53 (input-method . "buhid") 55 (input-method . "buhid")
54 (documentation . "\ 56 (documentation . "\
55Philippine Language Buhid is supported in this language environment."))) 57Philippine Language Buhid is supported in this language environment."))
58 '("Philippine"))
56 59
57(set-language-info-alist 60(set-language-info-alist
58 "Tagbanwa" '((charset unicode) 61 "Tagbanwa" '((charset unicode)
@@ -61,7 +64,8 @@ Philippine Language Buhid is supported in this language environment.")))
61 (input-method . "tagbanwa") 64 (input-method . "tagbanwa")
62 (sample-text . "Tagbanwa (ᝦᝪᝯ) ᝫᝩᝬᝥ ᝣᝮᝧᝯ") 65 (sample-text . "Tagbanwa (ᝦᝪᝯ) ᝫᝩᝬᝥ ᝣᝮᝧᝯ")
63 (documentation . "\ 66 (documentation . "\
64Philippine Languages Tagbanwa are supported in this language environment."))) 67Philippine Languages Tagbanwa are supported in this language environment."))
68 '("Philippine"))
65 69
66;; Tagalog composition rules 70;; Tagalog composition rules
67(let ((akshara "[\x1700-\x1711\x171F]") 71(let ((akshara "[\x1700-\x1711\x171F]")
diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el
index c9502fbb212..517b23b1ea9 100644
--- a/lisp/ldefs-boot.el
+++ b/lisp/ldefs-boot.el
@@ -15397,7 +15397,7 @@ it is disabled.
15397 15397
15398;;; Generated autoloads from progmodes/hideshow.el 15398;;; Generated autoloads from progmodes/hideshow.el
15399 15399
15400(defvar hs-special-modes-alist (mapcar 'purecopy '((c-mode "{" "}" "/[*/]" nil nil) (c++-mode "{" "}" "/[*/]" nil nil) (bibtex-mode ("@\\S(*\\(\\s(\\)" 1)) (java-mode "{" "}" "/[*/]" nil nil) (js-mode "{" "}" "/[*/]" nil) (mhtml-mode "{\\|<[^/>]*?" "}\\|</[^/>]*[^/]>" "<!--" mhtml-forward nil))) "\ 15400(defvar hs-special-modes-alist (mapcar #'purecopy '((c-mode "{" "}" "/[*/]" nil nil) (c++-mode "{" "}" "/[*/]" nil nil) (bibtex-mode ("@\\S(*\\(\\s(\\)" 1)) (java-mode "{" "}" "/[*/]" nil nil) (js-mode "{" "}" "/[*/]" nil) (mhtml-mode "{\\|<[^/>]*?" "}\\|</[^/>]*[^/]>" "<!--" mhtml-forward nil))) "\
15401Alist for initializing the hideshow variables for different modes. 15401Alist for initializing the hideshow variables for different modes.
15402Each element has the form 15402Each element has the form
15403 (MODE START END COMMENT-START FORWARD-SEXP-FUNC ADJUST-BEG-FUNC 15403 (MODE START END COMMENT-START FORWARD-SEXP-FUNC ADJUST-BEG-FUNC
@@ -18847,6 +18847,8 @@ done. Otherwise, this function will use the current buffer.
18847Major mode for browsing CVS log output. 18847Major mode for browsing CVS log output.
18848 18848
18849(fn)" t) 18849(fn)" t)
18850(autoload 'log-view-get-marked "log-view" "\
18851Return the list of tags for the marked log entries.")
18850(register-definition-prefixes "log-view" '("log-view-")) 18852(register-definition-prefixes "log-view" '("log-view-"))
18851 18853
18852 18854
@@ -24534,7 +24536,7 @@ Open profile FILENAME.
24534 24536
24535;;; Generated autoloads from progmodes/project.el 24537;;; Generated autoloads from progmodes/project.el
24536 24538
24537(push (purecopy '(project 0 8 1)) package--builtin-versions) 24539(push (purecopy '(project 0 8 2)) package--builtin-versions)
24538(autoload 'project-current "project" "\ 24540(autoload 'project-current "project" "\
24539Return the project instance in DIRECTORY, defaulting to `default-directory'. 24541Return the project instance in DIRECTORY, defaulting to `default-directory'.
24540 24542
@@ -25926,6 +25928,9 @@ The mode's hook is called both when the mode is enabled and when
25926it is disabled. 25928it is disabled.
25927 25929
25928(fn &optional ARG)" t) 25930(fn &optional ARG)" t)
25931(autoload 'repeat-exit "repeat" "\
25932Exit the repeating sequence.
25933This function can be used to force exit of repetition while it's active." t)
25929(register-definition-prefixes "repeat" '("describe-repeat-maps" "repeat-")) 25934(register-definition-prefixes "repeat" '("describe-repeat-maps" "repeat-"))
25930 25935
25931 25936
@@ -29436,6 +29441,8 @@ PROMPT will be inserted at the start of the buffer, but won't be
29436included in the resulting string. If PROMPT is nil, no help text 29441included in the resulting string. If PROMPT is nil, no help text
29437will be inserted. 29442will be inserted.
29438 29443
29444Also see `read-string-from-buffer'.
29445
29439(fn PROMPT STRING SUCCESS-CALLBACK &key ABORT-CALLBACK)") 29446(fn PROMPT STRING SUCCESS-CALLBACK &key ABORT-CALLBACK)")
29440(autoload 'read-string-from-buffer "string-edit" "\ 29447(autoload 'read-string-from-buffer "string-edit" "\
29441Switch to a new buffer to edit STRING in a recursive edit. 29448Switch to a new buffer to edit STRING in a recursive edit.
@@ -29445,6 +29452,8 @@ PROMPT will be inserted at the start of the buffer, but won't be
29445included in the resulting string. If nil, no prompt will be 29452included in the resulting string. If nil, no prompt will be
29446inserted in the buffer. 29453inserted in the buffer.
29447 29454
29455Also see `string-edit'.
29456
29448(fn PROMPT STRING)") 29457(fn PROMPT STRING)")
29449(register-definition-prefixes "string-edit" '("string-edit-")) 29458(register-definition-prefixes "string-edit" '("string-edit-"))
29450 29459
@@ -32000,14 +32009,14 @@ Add archive file name handler to `file-name-handler-alist'." (when (and tramp-ar
32000(register-definition-prefixes "tramp-compat" '("tramp-")) 32009(register-definition-prefixes "tramp-compat" '("tramp-"))
32001 32010
32002 32011
32003;;; Generated autoloads from net/tramp-crypt.el 32012;;; Generated autoloads from net/tramp-container.el
32004 32013
32005(register-definition-prefixes "tramp-crypt" '("tramp-crypt-")) 32014(register-definition-prefixes "tramp-container" '("tramp-"))
32006 32015
32007 32016
32008;;; Generated autoloads from net/tramp-docker.el 32017;;; Generated autoloads from net/tramp-crypt.el
32009 32018
32010(register-definition-prefixes "tramp-docker" '("tramp-docker-")) 32019(register-definition-prefixes "tramp-crypt" '("tramp-crypt-"))
32011 32020
32012 32021
32013;;; Generated autoloads from net/tramp-ftp.el 32022;;; Generated autoloads from net/tramp-ftp.el
@@ -32740,6 +32749,10 @@ if it had been inserted from a file named URL.
32740 32749
32741 32750
32742(fn URL &optional VISIT BEG END REPLACE)") 32751(fn URL &optional VISIT BEG END REPLACE)")
32752(autoload 'url-insert-file-contents-literally "url-handlers" "\
32753Insert the data retrieved from URL literally in the current buffer.
32754
32755(fn URL)")
32743(register-definition-prefixes "url-handlers" '("url-")) 32756(register-definition-prefixes "url-handlers" '("url-"))
32744 32757
32745 32758
@@ -33440,11 +33453,13 @@ Show the change log for BRANCH root in a window.
33440(autoload 'vc-log-incoming "vc" "\ 33453(autoload 'vc-log-incoming "vc" "\
33441Show log of changes that will be received with pull from REMOTE-LOCATION. 33454Show log of changes that will be received with pull from REMOTE-LOCATION.
33442When called interactively with a prefix argument, prompt for REMOTE-LOCATION. 33455When called interactively with a prefix argument, prompt for REMOTE-LOCATION.
33456In some version control systems REMOTE-LOCATION can be a remote branch name.
33443 33457
33444(fn &optional REMOTE-LOCATION)" t) 33458(fn &optional REMOTE-LOCATION)" t)
33445(autoload 'vc-log-outgoing "vc" "\ 33459(autoload 'vc-log-outgoing "vc" "\
33446Show log of changes that will be sent with a push operation to REMOTE-LOCATION. 33460Show log of changes that will be sent with a push operation to REMOTE-LOCATION.
33447When called interactively with a prefix argument, prompt for REMOTE-LOCATION. 33461When called interactively with a prefix argument, prompt for REMOTE-LOCATION.
33462In some version control systems REMOTE-LOCATION can be a remote branch name.
33448 33463
33449(fn &optional REMOTE-LOCATION)" t) 33464(fn &optional REMOTE-LOCATION)" t)
33450(autoload 'vc-log-search "vc" "\ 33465(autoload 'vc-log-search "vc" "\
@@ -33571,6 +33586,18 @@ log entries should be gathered.
33571Request editing the next VC shell command before execution. 33586Request editing the next VC shell command before execution.
33572This is a prefix command. It affects only a VC command executed 33587This is a prefix command. It affects only a VC command executed
33573immediately after this one." t) 33588immediately after this one." t)
33589(autoload 'vc-prepare-patch "vc" "\
33590Compose an Email sending patches for REVISIONS to ADDRESSEE.
33591If `vc-prepare-patches-separately' is nil, SUBJECT will be used
33592as the default subject for the message (and it will be prompted
33593for when called interactively). Otherwise a separate message
33594will be composed for each revision, with SUBJECT derived from the
33595invidividual commits.
33596
33597When invoked interactively in a Log View buffer with marked
33598revisions, those revisions will be used.
33599
33600(fn ADDRESSEE SUBJECT REVISIONS)" t)
33574(register-definition-prefixes "vc" '("vc-" "with-vc-properties")) 33601(register-definition-prefixes "vc" '("vc-" "with-vc-properties"))
33575 33602
33576 33603
@@ -34565,10 +34592,6 @@ Convert Vietnamese characters of the current buffer to `VIQR' mnemonics." t)
34565 34592
34566;;; Generated autoloads from view.el 34593;;; Generated autoloads from view.el
34567 34594
34568(defvar view-remove-frame-by-deleting t "\
34569Determine how View mode removes a frame no longer needed.
34570If nil, make an icon of the frame. If non-nil, delete the frame.")
34571(custom-autoload 'view-remove-frame-by-deleting "view" t)
34572(defvar-local view-mode nil "\ 34595(defvar-local view-mode nil "\
34573Non-nil if View mode is enabled. 34596Non-nil if View mode is enabled.
34574Don't change this variable directly, you must change it by one of the 34597Don't change this variable directly, you must change it by one of the
@@ -36122,7 +36145,13 @@ Extract file name from an yenc header.")
36122;;; Generated autoloads from play/zone.el 36145;;; Generated autoloads from play/zone.el
36123 36146
36124(autoload 'zone "zone" "\ 36147(autoload 'zone "zone" "\
36125Zone out, completely." t) 36148Zone out, completely.
36149With a prefix argument the user is prompted for a program to run.
36150When called from Lisp the optional argument PGM can be used to
36151run a specific program. The program must be a member of
36152`zone-programs'.
36153
36154(fn &optional PGM)" t)
36126(register-definition-prefixes "zone" '("zone-")) 36155(register-definition-prefixes "zone" '("zone-"))
36127 36156
36128;;; End of scraped data 36157;;; End of scraped data
diff --git a/lisp/mh-e/mh-junk.el b/lisp/mh-e/mh-junk.el
index be1b7642eb3..38a8216dc0c 100644
--- a/lisp/mh-e/mh-junk.el
+++ b/lisp/mh-e/mh-junk.el
@@ -402,7 +402,7 @@ information can be used so that you can replace multiple
402 402
403Bogofilter is a Bayesian spam filtering program. Get it from your 403Bogofilter is a Bayesian spam filtering program. Get it from your
404local distribution or from the bogofilter web site at URL 404local distribution or from the bogofilter web site at URL
405`http://bogofilter.sourceforge.net/'. 405`https://bogofilter.sourceforge.io/'.
406 406
407Bogofilter is taught by running: 407Bogofilter is taught by running:
408 408
@@ -487,7 +487,7 @@ See `mh-bogofilter-blocklist' for more information."
487 487
488SpamProbe is a Bayesian spam filtering program. Get it from your 488SpamProbe is a Bayesian spam filtering program. Get it from your
489local distribution or from the SpamProbe web site at URL 489local distribution or from the SpamProbe web site at URL
490`http://spamprobe.sourceforge.net'. 490`https://spamprobe.sourceforge.net'.
491 491
492To use SpamProbe, add the following recipes to \".procmailrc\": 492To use SpamProbe, add the following recipes to \".procmailrc\":
493 493
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index 2d528c4862c..1597f3651a5 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -1294,6 +1294,11 @@ currently selected window instead."
1294 (let ((file (url-unhex-string (url-filename parsed)))) 1294 (let ((file (url-unhex-string (url-filename parsed))))
1295 (when-let ((coding (browse-url--file-name-coding-system))) 1295 (when-let ((coding (browse-url--file-name-coding-system)))
1296 (setq file (decode-coding-string file 'utf-8))) 1296 (setq file (decode-coding-string file 'utf-8)))
1297 ;; The local-part of file: URLs on Windows is supposed to
1298 ;; start with an extra slash.
1299 (when (eq system-type 'windows-nt)
1300 (setq file (replace-regexp-in-string
1301 "\\`/\\([a-z]:\\)" "\\1" file)))
1297 (funcall func file)) 1302 (funcall func file))
1298 (let ((file-name-handler-alist 1303 (let ((file-name-handler-alist
1299 (cons (cons url-handler-regexp 'url-file-handler) 1304 (cons (cons url-handler-regexp 'url-file-handler)
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index fa481ce5283..eadaf00c4b8 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -2176,9 +2176,11 @@ connection."
2176 2176
2177(defun rcirc-generate-log-filename (process target) 2177(defun rcirc-generate-log-filename (process target)
2178 "Return filename for log file based on PROCESS and TARGET." 2178 "Return filename for log file based on PROCESS and TARGET."
2179 (if target 2179 (concat
2180 (rcirc-generate-new-buffer-name process target) 2180 (if target
2181 (process-name process))) 2181 (rcirc-generate-new-buffer-name process target)
2182 (process-name process))
2183 ".log"))
2182 2184
2183(defcustom rcirc-log-filename-function 'rcirc-generate-log-filename 2185(defcustom rcirc-log-filename-function 'rcirc-generate-log-filename
2184 "A function to generate the filename used by rcirc's logging facility. 2186 "A function to generate the filename used by rcirc's logging facility.
@@ -3018,11 +3020,7 @@ for nick completion."
3018 :version "29.1") 3020 :version "29.1")
3019 3021
3020(defface rcirc-bridged-nick 3022(defface rcirc-bridged-nick
3021 '((((class color) (min-colors 88) (background light)) :background "SlateGray1") 3023 '((t :inherit highlight))
3022 (((class color) (min-colors 88) (background dark)) :background "DarkSlateGray4")
3023 (((class color) (min-colors 16) (background light)) :background "LightBlue")
3024 (((class color) (min-colors 16) (background dark)) :background "DarkSlateGray")
3025 (t :background "blue"))
3026 "Face used for pseudo-nick ." 3024 "Face used for pseudo-nick ."
3027 :version "29.1") 3025 :version "29.1")
3028 3026
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 03dc47a053f..4ff57e5d560 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1088,34 +1088,18 @@ Derived from `tramp-postfix-host-format'.")
1088(defun tramp-build-remote-file-name-spec-regexp () 1088(defun tramp-build-remote-file-name-spec-regexp ()
1089 "Construct a regexp matching a Tramp file name for a Tramp syntax. 1089 "Construct a regexp matching a Tramp file name for a Tramp syntax.
1090It is expected, that `tramp-syntax' has the proper value." 1090It is expected, that `tramp-syntax' has the proper value."
1091 ;; Starting with Emacs 27, we can use `rx-let'. 1091 (tramp-compat-rx
1092 (let* ((user-regexp 1092 ;; Method.
1093 (tramp-compat-rx 1093 (group (regexp tramp-method-regexp)) (regexp tramp-postfix-method-regexp)
1094 (group-n 6 (regexp tramp-user-regexp)) 1094 ;; Optional user. This includes domain.
1095 (regexp tramp-postfix-user-regexp))) 1095 (? (group (regexp tramp-user-regexp)) (regexp tramp-postfix-user-regexp))
1096 (host-regexp 1096 ;; Optional host.
1097 (tramp-compat-rx 1097 (? (group (| (regexp tramp-host-regexp)
1098 (group-n 7 (| (regexp tramp-host-regexp) 1098 (: (regexp tramp-prefix-ipv6-regexp)
1099 (: (regexp tramp-prefix-ipv6-regexp) 1099 (? (regexp tramp-ipv6-regexp))
1100 (? (regexp tramp-ipv6-regexp)) 1100 (regexp tramp-postfix-ipv6-regexp)))
1101 (regexp tramp-postfix-ipv6-regexp))) 1101 ;; Optional port.
1102 ;; Optional port. 1102 (? (regexp tramp-prefix-port-regexp) (regexp tramp-port-regexp))))))
1103 (? (regexp tramp-prefix-port-regexp)
1104 (regexp tramp-port-regexp)))))
1105 (user-host-regexp
1106 (if (eq tramp-syntax 'simplified)
1107 ;; There must be either user or host.
1108 (tramp-compat-rx
1109 (| (: (regexp user-regexp) (? (regexp host-regexp)))
1110 (: (? (regexp user-regexp)) (regexp host-regexp))))
1111 (tramp-compat-rx
1112 (? (regexp user-regexp)) (? (regexp host-regexp))))))
1113 (tramp-compat-rx
1114 ;; Method.
1115 (group-n 5 (regexp tramp-method-regexp))
1116 (regexp tramp-postfix-method-regexp)
1117 ;; User and host.
1118 (regexp user-host-regexp))))
1119 1103
1120(defvar tramp-remote-file-name-spec-regexp 1104(defvar tramp-remote-file-name-spec-regexp
1121 nil ; Initialized when defining `tramp-syntax'! 1105 nil ; Initialized when defining `tramp-syntax'!
@@ -1214,7 +1198,8 @@ The `ftp' syntax does not support methods.")
1214 ;; "/ssh:host:~/path" becomes "c:/ssh:host:~/path". See also 1198 ;; "/ssh:host:~/path" becomes "c:/ssh:host:~/path". See also
1215 ;; `tramp-drop-volume-letter'. 1199 ;; `tramp-drop-volume-letter'.
1216 (? (regexp tramp-volume-letter-regexp)) 1200 (? (regexp tramp-volume-letter-regexp))
1217 (regexp tramp-prefix-regexp) 1201 ;; We cannot use `tramp-prefix-regexp', because it starts with `bol'.
1202 (literal tramp-prefix-format)
1218 1203
1219 ;; Optional multi hops. 1204 ;; Optional multi hops.
1220 (* (regexp tramp-remote-file-name-spec-regexp) 1205 (* (regexp tramp-remote-file-name-spec-regexp)
@@ -1862,7 +1847,8 @@ the form (METHOD USER DOMAIN HOST PORT LOCALNAME &optional HOP)."
1862 tramp-prefix-regexp "" 1847 tramp-prefix-regexp ""
1863 (replace-regexp-in-string 1848 (replace-regexp-in-string
1864 (tramp-compat-rx 1849 (tramp-compat-rx
1865 (regexp tramp-postfix-host-regexp) eos) tramp-postfix-hop-format 1850 (regexp tramp-postfix-host-regexp) eos)
1851 tramp-postfix-hop-format
1866 (tramp-make-tramp-file-name vec 'noloc))))) 1852 (tramp-make-tramp-file-name vec 'noloc)))))
1867 1853
1868(defun tramp-completion-make-tramp-file-name (method user host localname) 1854(defun tramp-completion-make-tramp-file-name (method user host localname)
diff --git a/lisp/org/ob-matlab.el b/lisp/org/ob-matlab.el
index 4ee090e4ac7..f50da0ea434 100644
--- a/lisp/org/ob-matlab.el
+++ b/lisp/org/ob-matlab.el
@@ -32,7 +32,7 @@
32 32
33;; matlab.el required for interactive emacs sessions and matlab-mode 33;; matlab.el required for interactive emacs sessions and matlab-mode
34;; major mode for source code editing buffer 34;; major mode for source code editing buffer
35;; http://matlab-emacs.sourceforge.net/ 35;; https://matlab-emacs.sourceforge.net/
36 36
37;;; Code: 37;;; Code:
38(require 'ob) 38(require 'ob)
diff --git a/lisp/org/ob-plantuml.el b/lisp/org/ob-plantuml.el
index ced00fbdda4..7a495e8e7f4 100644
--- a/lisp/org/ob-plantuml.el
+++ b/lisp/org/ob-plantuml.el
@@ -30,7 +30,7 @@
30 30
31;;; Requirements: 31;;; Requirements:
32 32
33;; plantuml | http://plantuml.sourceforge.net/ 33;; plantuml | https://plantuml.com/
34;; plantuml.jar | `org-plantuml-jar-path' should point to the jar file (when exec mode is `jar') 34;; plantuml.jar | `org-plantuml-jar-path' should point to the jar file (when exec mode is `jar')
35 35
36;;; Code: 36;;; Code:
diff --git a/lisp/org/org-ctags.el b/lisp/org/org-ctags.el
index 6fc97ca399d..67db49e9a67 100644
--- a/lisp/org/org-ctags.el
+++ b/lisp/org/org-ctags.el
@@ -47,7 +47,7 @@
47;; 47;;
48;; Install org mode 48;; Install org mode
49;; Ensure org-ctags.el is somewhere in your emacs load path. 49;; Ensure org-ctags.el is somewhere in your emacs load path.
50;; Download and install Exuberant ctags -- "http://ctags.sourceforge.net/" 50;; Download and install Exuberant ctags -- "https://ctags.sourceforge.net/"
51;; Edit your .emacs file (see next section) and load emacs. 51;; Edit your .emacs file (see next section) and load emacs.
52 52
53;; To put in your init file (.emacs): 53;; To put in your init file (.emacs):
diff --git a/lisp/org/org-protocol.el b/lisp/org/org-protocol.el
index 7c4de03bc24..7a91a33b745 100644
--- a/lisp/org/org-protocol.el
+++ b/lisp/org/org-protocol.el
@@ -66,7 +66,7 @@
66;; 66;;
67;; 67;;
68;; As of March 2009 Firefox users follow the steps documented on 68;; As of March 2009 Firefox users follow the steps documented on
69;; http://kb.mozillazine.org/Register_protocol, Opera setup is described here: 69;; https://kb.mozillazine.org/Register_protocol, Opera setup is described here:
70;; http://www.opera.com/support/kb/view/535/ 70;; http://www.opera.com/support/kb/view/535/
71;; 71;;
72;; 72;;
diff --git a/lisp/outline.el b/lisp/outline.el
index 93a9247f613..b87d3ac5e7f 100644
--- a/lisp/outline.el
+++ b/lisp/outline.el
@@ -516,13 +516,7 @@ See the command `outline-mode' for more information on this mode."
516 (set-window-buffer nil (window-buffer))) 516 (set-window-buffer nil (window-buffer)))
517 (when (or outline--use-buttons outline--use-margins) 517 (when (or outline--use-buttons outline--use-margins)
518 (add-hook 'after-change-functions 518 (add-hook 'after-change-functions
519 (lambda (beg end _len) 519 #'outline--fix-buttons-after-change nil t))
520 (when outline--use-buttons
521 (remove-overlays beg end 'outline-button t))
522 (when outline--use-margins
523 (remove-overlays beg end 'outline-margin t))
524 (outline--fix-up-all-buttons beg end))
525 nil t))
526 (when outline-minor-mode-highlight 520 (when outline-minor-mode-highlight
527 (if (and global-font-lock-mode (font-lock-specified-p major-mode)) 521 (if (and global-font-lock-mode (font-lock-specified-p major-mode))
528 (progn 522 (progn
@@ -1065,107 +1059,6 @@ If non-nil, EVENT should be a mouse event."
1065 (mouse-set-point event)) 1059 (mouse-set-point event))
1066 (outline-flag-subtree t))) 1060 (outline-flag-subtree t)))
1067 1061
1068(defun outline--make-button-overlay (type)
1069 (let ((o (seq-find (lambda (o)
1070 (overlay-get o 'outline-button))
1071 (overlays-at (point)))))
1072 (unless o
1073 (setq o (make-overlay (point) (1+ (point))))
1074 (overlay-put o 'evaporate t)
1075 (overlay-put o 'follow-link 'mouse-face)
1076 (overlay-put o 'mouse-face 'highlight)
1077 (overlay-put o 'outline-button t))
1078 (let ((icon (icon-elements (if (eq type 'close)
1079 (if outline--use-rtl
1080 'outline-close-rtl
1081 'outline-close)
1082 'outline-open)))
1083 (inhibit-read-only t))
1084 ;; In editing buffers we use overlays only, but in other buffers
1085 ;; we use a mix of text properties, text and overlays to make
1086 ;; movement commands work more logically.
1087 (when (derived-mode-p 'special-mode)
1088 (put-text-property (point) (1+ (point)) 'face (plist-get icon 'face)))
1089 (if-let ((image (plist-get icon 'image)))
1090 (overlay-put o 'display image)
1091 (overlay-put o 'display (concat (plist-get icon 'string)
1092 (string (char-after (point)))))
1093 (overlay-put o 'face (plist-get icon 'face))))
1094 o))
1095
1096(defun outline--make-margin-overlay (type)
1097 (let ((o (seq-find (lambda (o)
1098 (overlay-get o 'outline-margin))
1099 (overlays-at (point)))))
1100 (unless o
1101 (setq o (make-overlay (point) (1+ (point))))
1102 (overlay-put o 'evaporate t)
1103 (overlay-put o 'outline-margin t))
1104 (let ((icon (icon-elements (if (eq type 'close)
1105 (if outline--use-rtl
1106 'outline-close-rtl-in-margins
1107 'outline-close-in-margins)
1108 'outline-open-in-margins)))
1109 (inhibit-read-only t))
1110 (overlay-put
1111 o 'before-string
1112 (propertize " " 'display
1113 `((margin ,(if outline--use-rtl
1114 'right-margin 'left-margin))
1115 ,(or (plist-get icon 'image)
1116 (plist-get icon 'string))))))
1117 o))
1118
1119(defun outline--insert-open-button (&optional use-margins)
1120 (with-silent-modifications
1121 (save-excursion
1122 (beginning-of-line)
1123 (if use-margins
1124 (outline--make-margin-overlay 'open)
1125 (when (derived-mode-p 'special-mode)
1126 (let ((inhibit-read-only t))
1127 (insert " ")
1128 (beginning-of-line)))
1129 (let ((o (outline--make-button-overlay 'open)))
1130 (overlay-put o 'help-echo "Click to hide")
1131 (overlay-put o 'keymap
1132 (define-keymap
1133 "RET" #'outline-hide-subtree
1134 "<mouse-2>" #'outline-hide-subtree)))))))
1135
1136(defun outline--insert-close-button (&optional use-margins)
1137 (with-silent-modifications
1138 (save-excursion
1139 (beginning-of-line)
1140 (if use-margins
1141 (outline--make-margin-overlay 'close)
1142 (when (derived-mode-p 'special-mode)
1143 (let ((inhibit-read-only t))
1144 (insert " ")
1145 (beginning-of-line)))
1146 (let ((o (outline--make-button-overlay 'close)))
1147 (overlay-put o 'help-echo "Click to show")
1148 (overlay-put o 'keymap
1149 (define-keymap
1150 "RET" #'outline-show-subtree
1151 "<mouse-2>" #'outline-show-subtree)))))))
1152
1153(defun outline--fix-up-all-buttons (&optional from to)
1154 (when (or outline--use-buttons outline--use-margins)
1155 (when from
1156 (save-excursion
1157 (goto-char from)
1158 (setq from (line-beginning-position))))
1159 (outline-map-region
1160 (lambda ()
1161 (if (save-excursion
1162 (outline-end-of-heading)
1163 (seq-some (lambda (o) (eq (overlay-get o 'invisible) 'outline))
1164 (overlays-at (point))))
1165 (outline--insert-close-button outline--use-margins)
1166 (outline--insert-open-button outline--use-margins)))
1167 (or from (point-min)) (or to (point-max)))))
1168
1169(define-obsolete-function-alias 'hide-subtree #'outline-hide-subtree "25.1") 1062(define-obsolete-function-alias 'hide-subtree #'outline-hide-subtree "25.1")
1170 1063
1171(defun outline-hide-leaves () 1064(defun outline-hide-leaves ()
@@ -1451,6 +1344,9 @@ convenient way to make a table of contents of the buffer."
1451 (insert "\n\n")))))) 1344 (insert "\n\n"))))))
1452 (kill-new (buffer-string))))))) 1345 (kill-new (buffer-string)))))))
1453 1346
1347
1348;;; Initial visibility
1349
1454(defcustom outline-default-state nil 1350(defcustom outline-default-state nil
1455 "If non-nil, some headings are initially outlined. 1351 "If non-nil, some headings are initially outlined.
1456 1352
@@ -1629,6 +1525,9 @@ LEVEL, decides of subtree visibility according to
1629 beg end))) 1525 beg end)))
1630 (run-hooks 'outline-view-change-hook))) 1526 (run-hooks 'outline-view-change-hook)))
1631 1527
1528
1529;;; Visibility cycling
1530
1632(defun outline--cycle-state () 1531(defun outline--cycle-state ()
1633 "Return the cycle state of current heading. 1532 "Return the cycle state of current heading.
1634Return either `hide-all', `headings-only', or `show-all'." 1533Return either `hide-all', `headings-only', or `show-all'."
@@ -1742,6 +1641,119 @@ With a prefix argument, show headings up to that LEVEL."
1742 (message "Show all"))))) 1641 (message "Show all")))))
1743 1642
1744 1643
1644;;; Button/margin indicators
1645
1646(defun outline--make-button-overlay (type)
1647 (let ((o (seq-find (lambda (o)
1648 (overlay-get o 'outline-button))
1649 (overlays-at (point)))))
1650 (unless o
1651 (setq o (make-overlay (point) (1+ (point))))
1652 (overlay-put o 'evaporate t)
1653 (overlay-put o 'follow-link 'mouse-face)
1654 (overlay-put o 'mouse-face 'highlight)
1655 (overlay-put o 'outline-button t))
1656 (let ((icon (icon-elements (if (eq type 'close)
1657 (if outline--use-rtl
1658 'outline-close-rtl
1659 'outline-close)
1660 'outline-open)))
1661 (inhibit-read-only t))
1662 ;; In editing buffers we use overlays only, but in other buffers
1663 ;; we use a mix of text properties, text and overlays to make
1664 ;; movement commands work more logically.
1665 (when (derived-mode-p 'special-mode)
1666 (put-text-property (point) (1+ (point)) 'face (plist-get icon 'face)))
1667 (if-let ((image (plist-get icon 'image)))
1668 (overlay-put o 'display image)
1669 (overlay-put o 'display (concat (plist-get icon 'string)
1670 (string (char-after (point)))))
1671 (overlay-put o 'face (plist-get icon 'face))))
1672 o))
1673
1674(defun outline--make-margin-overlay (type)
1675 (let ((o (seq-find (lambda (o)
1676 (overlay-get o 'outline-margin))
1677 (overlays-at (point)))))
1678 (unless o
1679 (setq o (make-overlay (point) (1+ (point))))
1680 (overlay-put o 'evaporate t)
1681 (overlay-put o 'outline-margin t))
1682 (let ((icon (icon-elements (if (eq type 'close)
1683 (if outline--use-rtl
1684 'outline-close-rtl-in-margins
1685 'outline-close-in-margins)
1686 'outline-open-in-margins))))
1687 (overlay-put
1688 o 'before-string
1689 (propertize " " 'display
1690 `((margin ,(if outline--use-rtl
1691 'right-margin 'left-margin))
1692 ,(or (plist-get icon 'image)
1693 (plist-get icon 'string))))))
1694 o))
1695
1696(defun outline--insert-open-button (&optional use-margins)
1697 (with-silent-modifications
1698 (save-excursion
1699 (beginning-of-line)
1700 (if use-margins
1701 (outline--make-margin-overlay 'open)
1702 (when (derived-mode-p 'special-mode)
1703 (let ((inhibit-read-only t))
1704 (insert " ")
1705 (beginning-of-line)))
1706 (let ((o (outline--make-button-overlay 'open)))
1707 (overlay-put o 'help-echo "Click to hide")
1708 (overlay-put o 'keymap
1709 (define-keymap
1710 "RET" #'outline-hide-subtree
1711 "<mouse-2>" #'outline-hide-subtree)))))))
1712
1713(defun outline--insert-close-button (&optional use-margins)
1714 (with-silent-modifications
1715 (save-excursion
1716 (beginning-of-line)
1717 (if use-margins
1718 (outline--make-margin-overlay 'close)
1719 (when (derived-mode-p 'special-mode)
1720 (let ((inhibit-read-only t))
1721 (insert " ")
1722 (beginning-of-line)))
1723 (let ((o (outline--make-button-overlay 'close)))
1724 (overlay-put o 'help-echo "Click to show")
1725 (overlay-put o 'keymap
1726 (define-keymap
1727 "RET" #'outline-show-subtree
1728 "<mouse-2>" #'outline-show-subtree)))))))
1729
1730(defun outline--fix-up-all-buttons (&optional from to)
1731 (when (or outline--use-buttons outline--use-margins)
1732 (when from
1733 (save-excursion
1734 (goto-char from)
1735 (setq from (line-beginning-position))))
1736 (outline-map-region
1737 (lambda ()
1738 (if (save-excursion
1739 (outline-end-of-heading)
1740 (seq-some (lambda (o) (eq (overlay-get o 'invisible) 'outline))
1741 (overlays-at (point))))
1742 (outline--insert-close-button outline--use-margins)
1743 (outline--insert-open-button outline--use-margins)))
1744 (or from (point-min)) (or to (point-max)))))
1745
1746(defun outline--fix-buttons-after-change (beg end _len)
1747 ;; Handle whole lines
1748 (save-excursion (goto-char beg) (setq beg (pos-bol)))
1749 (save-excursion (goto-char end) (setq end (pos-eol)))
1750 (when outline--use-buttons
1751 (remove-overlays beg end 'outline-button t))
1752 (when outline--use-margins
1753 (remove-overlays beg end 'outline-margin t))
1754 (outline--fix-up-all-buttons beg end))
1755
1756
1745(defvar-keymap outline-navigation-repeat-map 1757(defvar-keymap outline-navigation-repeat-map
1746 "C-b" #'outline-backward-same-level 1758 "C-b" #'outline-backward-same-level
1747 "b" #'outline-backward-same-level 1759 "b" #'outline-backward-same-level
diff --git a/lisp/play/zone.el b/lisp/play/zone.el
index b0ce0194cf0..5ea5bbc9267 100644
--- a/lisp/play/zone.el
+++ b/lisp/play/zone.el
@@ -103,9 +103,24 @@ If the element is a function or a list of a function and a number,
103 program)))) 103 program))))
104 104
105;;;###autoload 105;;;###autoload
106(defun zone () 106(defun zone (&optional pgm)
107 "Zone out, completely." 107 "Zone out, completely.
108 (interactive) 108With a prefix argument the user is prompted for a program to run.
109When called from Lisp the optional argument PGM can be used to
110run a specific program. The program must be a member of
111`zone-programs'."
112 (interactive
113 (and current-prefix-arg
114 (let ((choice (completing-read
115 "Program: "
116 (mapcar
117 (lambda (prog)
118 (substring (symbol-name prog) 9))
119 zone-programs)
120 nil t)))
121 (list (intern (concat "zone-pgm-" choice))))))
122 (unless pgm
123 (setq pgm (aref zone-programs (random (length zone-programs)))))
109 (save-window-excursion 124 (save-window-excursion
110 (let ((f (selected-frame)) 125 (let ((f (selected-frame))
111 (outbuf (get-buffer-create "*zone*")) 126 (outbuf (get-buffer-create "*zone*"))
@@ -125,8 +140,7 @@ If the element is a function or a list of a function and a number,
125 (set-window-start (selected-window) (point-min)) 140 (set-window-start (selected-window) (point-min))
126 (set-window-point (selected-window) wp) 141 (set-window-point (selected-window) wp)
127 (sit-for 0 500) 142 (sit-for 0 500)
128 (let ((pgm (elt zone-programs (random (length zone-programs)))) 143 (let ((ct (and f (frame-parameter f 'cursor-type)))
129 (ct (and f (frame-parameter f 'cursor-type)))
130 (show-trailing-whitespace nil) 144 (show-trailing-whitespace nil)
131 restore) 145 restore)
132 (when ct 146 (when ct
diff --git a/lisp/printing.el b/lisp/printing.el
index 0654dcda3df..767648df4d5 100644
--- a/lisp/printing.el
+++ b/lisp/printing.el
@@ -944,7 +944,7 @@
944;; `https://www.gnu.org/software/ghostscript/ghostscript.html' 944;; `https://www.gnu.org/software/ghostscript/ghostscript.html'
945;; gsprint `https://www.cs.wisc.edu/~ghost/gsview/gsprint.htm'. 945;; gsprint `https://www.cs.wisc.edu/~ghost/gsview/gsprint.htm'.
946;; enscript `https://people.ssh.fi/mtr/genscript/' 946;; enscript `https://people.ssh.fi/mtr/genscript/'
947;; psnup `http://gnuwin32.sourceforge.net/packages/psutils.htm' 947;; psnup `https://gnuwin32.sourceforge.net/packages/psutils.htm'
948;; redmon `http://www.ghostgum.com.au/software/redmon.htm' 948;; redmon `http://www.ghostgum.com.au/software/redmon.htm'
949;; 949;;
950;; 950;;
@@ -1752,7 +1752,7 @@ Useful links:
1752 `https://linux.die.net/man/1/lp' 1752 `https://linux.die.net/man/1/lp'
1753 1753
1754* GNU utilities for w32 (cp.exe) 1754* GNU utilities for w32 (cp.exe)
1755 `http://unxutils.sourceforge.net/'" 1755 `https://unxutils.sourceforge.net/'"
1756 :type '(repeat 1756 :type '(repeat
1757 (list 1757 (list
1758 :tag "PostScript Printer" 1758 :tag "PostScript Printer"
@@ -2382,7 +2382,7 @@ Useful links:
2382 `http://gershwin.ens.fr/vdaniel/Doc-Locale/Outils-Gnu-Linux/PsUtils/' 2382 `http://gershwin.ens.fr/vdaniel/Doc-Locale/Outils-Gnu-Linux/PsUtils/'
2383 2383
2384* psnup (PsUtils for Windows) 2384* psnup (PsUtils for Windows)
2385 `http://gnuwin32.sourceforge.net/packages/psutils.htm' 2385 `https://gnuwin32.sourceforge.net/packages/psutils.htm'
2386 2386
2387* psnup documentation (GNU or Unix - or type `man psnup') 2387* psnup documentation (GNU or Unix - or type `man psnup')
2388 `https://linux.die.net/man/1/psnup' 2388 `https://linux.die.net/man/1/psnup'
diff --git a/lisp/progmodes/antlr-mode.el b/lisp/progmodes/antlr-mode.el
index 733deebdf53..1aee1107e62 100644
--- a/lisp/progmodes/antlr-mode.el
+++ b/lisp/progmodes/antlr-mode.el
@@ -5,7 +5,7 @@
5;; Author: Christoph Wedler <Christoph.Wedler@sap.com> 5;; Author: Christoph Wedler <Christoph.Wedler@sap.com>
6;; Keywords: languages, ANTLR, code generator 6;; Keywords: languages, ANTLR, code generator
7;; Version: 2.2c 7;; Version: 2.2c
8;; URL: http://antlr-mode.sourceforge.net/ 8;; URL: https://antlr-mode.sourceforge.net/
9 9
10;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
11 11
@@ -29,7 +29,7 @@
29;; supported options and various other things like running ANTLR from within 29;; supported options and various other things like running ANTLR from within
30;; Emacs. 30;; Emacs.
31 31
32;; For details, check <http://antlr-mode.sourceforge.net/> or, if you prefer 32;; For details, check <https://antlr-mode.sourceforge.net/> or, if you prefer
33;; the manual style, follow all commands mentioned in the documentation of 33;; the manual style, follow all commands mentioned in the documentation of
34;; `antlr-mode'. ANTLR is a LL(k)-based recognition tool which generates 34;; `antlr-mode'. ANTLR is a LL(k)-based recognition tool which generates
35;; lexers, parsers and tree transformers in Java, C++ or Sather and can be 35;; lexers, parsers and tree transformers in Java, C++ or Sather and can be
@@ -106,12 +106,12 @@
106 "Major mode for ANTLR grammar files." 106 "Major mode for ANTLR grammar files."
107 :group 'languages 107 :group 'languages
108 :link '(emacs-commentary-link "antlr-mode.el") 108 :link '(emacs-commentary-link "antlr-mode.el")
109 :link '(url-link "http://antlr-mode.sourceforge.net/") 109 :link '(url-link "https://antlr-mode.sourceforge.net/")
110 :prefix "antlr-") 110 :prefix "antlr-")
111 111
112(defconst antlr-version "2.2c" 112(defconst antlr-version "2.2c"
113 "ANTLR major mode version number. 113 "ANTLR major mode version number.
114Check <http://antlr-mode.sourceforge.net/> for the newest.") 114Check <https://antlr-mode.sourceforge.net/> for the newest.")
115 115
116 116
117;;;=========================================================================== 117;;;===========================================================================
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index 0ac96219a19..223b1e917fe 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -8356,6 +8356,23 @@ multi-line strings (but not C++, for example)."
8356 (goto-char here)))) 8356 (goto-char here))))
8357 t) 8357 t)
8358 8358
8359(defun c-forward-over-colon-type-list ()
8360 ;; If we're at a sequence of characters which can extend from, e.g.,
8361 ;; a class name up to a colon introducing an inheritance list,
8362 ;; move forward over them, including the colon, and return non-nil.
8363 ;; Otherwise return nil, leaving point unmoved.
8364 (let ((here (point)) pos)
8365 (while (and (re-search-forward c-sub-colon-type-list-re nil t)
8366 (not (eq (char-after) ?:))
8367 (c-major-mode-is 'c++-mode)
8368 (setq pos (c-looking-at-c++-attribute)))
8369 (goto-char pos))
8370 (if (eq (char-after) ?:)
8371 (progn (forward-char)
8372 t)
8373 (goto-char here)
8374 nil)))
8375
8359(defun c-forward-keyword-clause (match) 8376(defun c-forward-keyword-clause (match)
8360 ;; Submatch MATCH in the current match data is assumed to surround a 8377 ;; Submatch MATCH in the current match data is assumed to surround a
8361 ;; token. If it's a keyword, move over it and any immediately 8378 ;; token. If it's a keyword, move over it and any immediately
@@ -8463,12 +8480,11 @@ multi-line strings (but not C++, for example)."
8463 (and c-record-type-identifiers 8480 (and c-record-type-identifiers
8464 (progn 8481 (progn
8465 ;; If a keyword matched both one of the types above and 8482 ;; If a keyword matched both one of the types above and
8466 ;; this one, we match `c-colon-type-list-re' after the 8483 ;; this one, we move forward to the colon following the
8467 ;; clause matched above. 8484 ;; clause matched above.
8468 (goto-char safe-pos) 8485 (goto-char safe-pos)
8469 (looking-at c-colon-type-list-re)) 8486 (c-forward-over-colon-type-list))
8470 (progn 8487 (progn
8471 (goto-char (match-end 0))
8472 (c-forward-syntactic-ws) 8488 (c-forward-syntactic-ws)
8473 (c-forward-keyword-prefixed-id type)) 8489 (c-forward-keyword-prefixed-id type))
8474 ;; There's a type after the `c-colon-type-list-re' match 8490 ;; There's a type after the `c-colon-type-list-re' match
@@ -8921,8 +8937,16 @@ multi-line strings (but not C++, for example)."
8921 ;; Got some other operator. 8937 ;; Got some other operator.
8922 (setq c-last-identifier-range 8938 (setq c-last-identifier-range
8923 (cons (point) (match-end 0))) 8939 (cons (point) (match-end 0)))
8940 (if (and (eq (char-after) ?\")
8941 (eq (char-after (1+ (point))) ?\"))
8942 ;; operator"" has an (?)optional tag after it.
8943 (progn
8944 (goto-char (match-end 0))
8945 (c-forward-syntactic-ws lim+)
8946 (when (c-on-identifier)
8947 (c-forward-token-2 1 nil lim+)))
8924 (goto-char (match-end 0)) 8948 (goto-char (match-end 0))
8925 (c-forward-syntactic-ws lim+) 8949 (c-forward-syntactic-ws lim+))
8926 (setq pos (point) 8950 (setq pos (point)
8927 res 'operator))) 8951 res 'operator)))
8928 8952
@@ -9676,7 +9700,7 @@ point unchanged and return nil."
9676 ;; (e.g. "," or ";" or "}"). 9700 ;; (e.g. "," or ";" or "}").
9677 (let ((here (point)) 9701 (let ((here (point))
9678 id-start id-end brackets-after-id paren-depth decorated 9702 id-start id-end brackets-after-id paren-depth decorated
9679 got-init arglist) 9703 got-init arglist double-double-quote)
9680 (or limit (setq limit (point-max))) 9704 (or limit (setq limit (point-max)))
9681 (if (and 9705 (if (and
9682 (< (point) limit) 9706 (< (point) limit)
@@ -9705,6 +9729,10 @@ point unchanged and return nil."
9705 (setq id-start (point)) 9729 (setq id-start (point))
9706 (if (looking-at c-overloadable-operators-regexp) 9730 (if (looking-at c-overloadable-operators-regexp)
9707 (progn 9731 (progn
9732 (when (and (c-major-mode-is 'c++-mode)
9733 (eq (char-after) ?\")
9734 (eq (char-after (1+ (point))) ?\"))
9735 (setq double-double-quote t))
9708 (goto-char (match-end 0)) 9736 (goto-char (match-end 0))
9709 (c-forward-syntactic-ws limit) 9737 (c-forward-syntactic-ws limit)
9710 (setq got-identifier t) 9738 (setq got-identifier t)
@@ -9756,6 +9784,13 @@ point unchanged and return nil."
9756 t) 9784 t)
9757 (t nil))) 9785 (t nil)))
9758 9786
9787 (progn
9788 (c-forward-syntactic-ws limit)
9789 (when (and double-double-quote ; C++'s operator"" _tag
9790 (c-on-identifier))
9791 (c-forward-token-2 1 nil limit))
9792 t)
9793
9759 ;; Skip out of the parens surrounding the identifier. If closing 9794 ;; Skip out of the parens surrounding the identifier. If closing
9760 ;; parens are missing, this form returns nil. 9795 ;; parens are missing, this form returns nil.
9761 (or (= paren-depth 0) 9796 (or (= paren-depth 0)
diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el
index 2e71285cb36..b4ff32b9070 100644
--- a/lisp/progmodes/cc-fonts.el
+++ b/lisp/progmodes/cc-fonts.el
@@ -1141,12 +1141,28 @@ casts and declarations are fontified. Used on level 2 and higher."
1141 (while (and (< (point) id-end) 1141 (while (and (< (point) id-end)
1142 (re-search-forward c-opt-identifier-prefix-key id-end t)) 1142 (re-search-forward c-opt-identifier-prefix-key id-end t))
1143 (c-forward-syntactic-ws limit)))) 1143 (c-forward-syntactic-ws limit))))
1144 (when (not (get-text-property (point) 'face)) 1144 ;; Only apply the face when the text doesn't have one yet.
1145 ;; Exception: The "" in C++'s operator"" will already wrongly have
1146 ;; string face.
1147 (when (memq (get-text-property (point) 'face)
1148 '(nil font-lock-string-face))
1145 (c-put-font-lock-face (point) id-end 1149 (c-put-font-lock-face (point) id-end
1146 (cond 1150 (cond
1147 ((not (memq types '(nil t))) types) 1151 ((not (memq types '(nil t))) types)
1148 (is-function 'font-lock-function-name-face) 1152 (is-function 'font-lock-function-name-face)
1149 (t 'font-lock-variable-name-face)))))) 1153 (t 'font-lock-variable-name-face))))
1154 ;; Fontify any _tag in C++'s operator"" _tag.
1155 (when (and
1156 (c-major-mode-is 'c++-mode)
1157 (equal (buffer-substring-no-properties id-start id-end)
1158 "\"\""))
1159 (goto-char id-end)
1160 (c-forward-syntactic-ws limit)
1161 (when (c-on-identifier)
1162 (c-put-font-lock-face
1163 (point)
1164 (progn (c-forward-over-token) (point))
1165 font-lock-function-name-face)))))
1150 (and template-class 1166 (and template-class
1151 (eq init-char ?=) ; C++ "<class X = Y>"? 1167 (eq init-char ?=) ; C++ "<class X = Y>"?
1152 (progn 1168 (progn
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el
index cd23483a58f..b17718cfd54 100644
--- a/lisp/progmodes/cc-langs.el
+++ b/lisp/progmodes/cc-langs.el
@@ -93,7 +93,7 @@
93;; definitions (i.e. this file and/or cc-fonts.el) if necessary. 93;; definitions (i.e. this file and/or cc-fonts.el) if necessary.
94;; 94;;
95;; A small example of a derived mode is available at 95;; A small example of a derived mode is available at
96;; <http://cc-mode.sourceforge.net/derived-mode-ex.el>. It also 96;; <https://cc-mode.sourceforge.net/derived-mode-ex.el>. It also
97;; contains some useful hints for derived mode developers. 97;; contains some useful hints for derived mode developers.
98 98
99;;; Using language variables: 99;;; Using language variables:
@@ -1449,8 +1449,7 @@ form\". See also `c-op-identifier-prefix'."
1449 "??'=" "xor_eq" "&=" "and_eq" "|=" "??!=" "or_eq" 1449 "??'=" "xor_eq" "&=" "and_eq" "|=" "??!=" "or_eq"
1450 "<<" ">>" ">>=" "<<=" "==" "!=" "not_eq" "<=>" "<=" ">=" 1450 "<<" ">>" ">>=" "<<=" "==" "!=" "not_eq" "<=>" "<=" ">="
1451 "&&" "and" "||" "??!??!" "or" "++" "--" "," "->*" "->" 1451 "&&" "and" "||" "??!??!" "or" "++" "--" "," "->*" "->"
1452 "()" "[]" "<::>" "??(??)") 1452 "()" "[]" "\"\"" "<::>" "??(??)")
1453 ;; These work like identifiers in Pike.
1454 pike '("`+" "`-" "`&" "`|" "`^" "`<<" "`>>" "`*" "`/" "`%" "`~" 1453 pike '("`+" "`-" "`&" "`|" "`^" "`<<" "`>>" "`*" "`/" "`%" "`~"
1455 "`==" "`<" "`>" "`!" "`[]" "`[]=" "`->" "`->=" "`()" "``+" 1454 "`==" "`<" "`>" "`!" "`[]" "`[]=" "`->" "`->=" "`()" "``+"
1456 "``-" "``&" "``|" "``^" "``<<" "``>>" "``*" "``/" "``%" 1455 "``-" "``&" "``|" "``^" "``<<" "``>>" "``*" "``/" "``%"
@@ -2936,6 +2935,15 @@ regexp if `c-colon-type-list-kwds' isn't nil."
2936 "[^][{}();,/#=:]*:"))) 2935 "[^][{}();,/#=:]*:")))
2937(c-lang-defvar c-colon-type-list-re (c-lang-const c-colon-type-list-re)) 2936(c-lang-defvar c-colon-type-list-re (c-lang-const c-colon-type-list-re))
2938 2937
2938(c-lang-defconst c-sub-colon-type-list-re
2939 "Regexp matching buffer content that may come between a keyword in
2940`c-colon-type-list-kwds' and a putative colon, or nil if there are no
2941such keywords. Exception: it does not match any C++ attributes."
2942 t (if (c-lang-const c-colon-type-list-re)
2943 (substring (c-lang-const c-colon-type-list-re) 0 -1)))
2944(c-lang-defvar c-sub-colon-type-list-re
2945 (c-lang-const c-sub-colon-type-list-re))
2946
2939(c-lang-defconst c-paren-nontype-kwds 2947(c-lang-defconst c-paren-nontype-kwds
2940 "Keywords that may be followed by a parenthesis expression that doesn't 2948 "Keywords that may be followed by a parenthesis expression that doesn't
2941contain type identifiers." 2949contain type identifiers."
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index 2003b09ded2..dce300f33c9 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -66,12 +66,12 @@
66;; You can get the latest version of CC Mode, including PostScript 66;; You can get the latest version of CC Mode, including PostScript
67;; documentation and separate individual files from: 67;; documentation and separate individual files from:
68;; 68;;
69;; http://cc-mode.sourceforge.net/ 69;; https://cc-mode.sourceforge.net/
70;; 70;;
71;; You can join a moderated CC Mode announcement-only mailing list by 71;; You can join a moderated CC Mode announcement-only mailing list by
72;; visiting 72;; visiting
73;; 73;;
74;; http://lists.sourceforge.net/mailman/listinfo/cc-mode-announce 74;; https://lists.sourceforge.net/mailman/listinfo/cc-mode-announce
75 75
76;; Externally maintained major modes which use CC-mode's engine include: 76;; Externally maintained major modes which use CC-mode's engine include:
77;; - cuda-mode 77;; - cuda-mode
@@ -172,7 +172,7 @@
172;; `c-font-lock-init' too to set up CC Mode's font lock support. 172;; `c-font-lock-init' too to set up CC Mode's font lock support.
173;; 173;;
174;; See cc-langs.el for further info. A small example of a derived mode 174;; See cc-langs.el for further info. A small example of a derived mode
175;; is also available at <http://cc-mode.sourceforge.net/ 175;; is also available at <https://cc-mode.sourceforge.net/
176;; derived-mode-ex.el>. 176;; derived-mode-ex.el>.
177 177
178(defun c-leave-cc-mode-mode () 178(defun c-leave-cc-mode-mode ()
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index ded5d2130e5..6473b507785 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -980,12 +980,17 @@ Faces `compilation-error-face', `compilation-warning-face',
980 "Face name to use for leaving directory messages.") 980 "Face name to use for leaving directory messages.")
981 981
982(defcustom compilation-auto-jump-to-first-error nil 982(defcustom compilation-auto-jump-to-first-error nil
983 "If non-nil, automatically jump to the first error during compilation." 983 "If non-nil, automatically jump to the first error during compilation.
984
985The value `if-location-known' means automatically jump to the first error
986if the error's file can be found. The value `first-known' means jump to
987the first error whose file can be found. Any other non-nil value means
988jump to the first error unconditionally."
984 :type '(choice (const :tag "Never" nil) 989 :type '(choice (const :tag "Never" nil)
985 (const :tag "Always" t) 990 (const :tag "Always" t)
986 (const :tag "If location known" if-location-known) 991 (const :tag "If location known" if-location-known)
987 (const :tag "First known location" first-known)) 992 (const :tag "First known location" first-known))
988 :version "23.1") 993 :version "29.1")
989 994
990(defvar-local compilation-auto-jump-to-next nil 995(defvar-local compilation-auto-jump-to-next nil
991 "If non-nil, automatically jump to the next error encountered.") 996 "If non-nil, automatically jump to the next error encountered.")
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index 20a73e238e9..539b2771490 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -8323,7 +8323,7 @@ the appropriate statement modifier."
8323 'cperl-short-docs 8323 'cperl-short-docs
8324 'variable-documentation)))) 8324 'variable-documentation))))
8325 (Man-switches "") 8325 (Man-switches "")
8326 (manual-program (if is-func "perldoc -f" "perldoc"))) 8326 (manual-program (concat "perldoc -i" (if is-func " -f"))))
8327 (Man-getpage-in-background word))) 8327 (Man-getpage-in-background word)))
8328 8328
8329;;;###autoload 8329;;;###autoload
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index 6e8032b7eae..0de3d213a4d 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -966,7 +966,7 @@ detailed description of this mode.
966 (if gdb-active-process 966 (if gdb-active-process
967 (gdb-gud-context-command "-exec-continue") 967 (gdb-gud-context-command "-exec-continue")
968 "-exec-run"))) 968 "-exec-run")))
969 "C-v" "Start or continue execution. Use a prefix to specify arguments.") 969 "\C-v" "Start or continue execution. Use a prefix to specify arguments.")
970 970
971 ;; For debugging Emacs only. 971 ;; For debugging Emacs only.
972 (gud-def gud-pp 972 (gud-def gud-pp
diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el
index cbbcf1c2b7c..5f265212992 100644
--- a/lisp/progmodes/make-mode.el
+++ b/lisp/progmodes/make-mode.el
@@ -488,17 +488,12 @@ not be enclosed in { } or ( )."
488 488
489 489
490(defconst makefile-imake-font-lock-keywords 490(defconst makefile-imake-font-lock-keywords
491 (append 491 (append (list '("XCOMM.*$" . font-lock-comment-face)
492 (makefile-make-font-lock-keywords 492 '("XVAR\\(?:use\\|def\\)[0-9]" 0
493 makefile-var-use-regex 493 font-lock-keyword-face prepend)
494 makefile-statements 494 '("@@" . font-lock-preprocessor-face))
495 t 495 cpp-font-lock-keywords
496 nil 496 makefile-font-lock-keywords))
497 '("^XCOMM.*$" . font-lock-comment-face)
498 '("XVAR\\(?:use\\|def\\)[0-9]" 0 font-lock-keyword-face prepend)
499 '("@@" . font-lock-preprocessor-face)
500 )
501 cpp-font-lock-keywords))
502 497
503 498
504(defconst makefile-syntax-propertize-function 499(defconst makefile-syntax-propertize-function
@@ -932,7 +927,9 @@ Makefile mode can be configured by modifying the following variables:
932 :syntax-table makefile-imake-mode-syntax-table 927 :syntax-table makefile-imake-mode-syntax-table
933 (setq-local syntax-propertize-function nil) 928 (setq-local syntax-propertize-function nil)
934 (setq font-lock-defaults 929 (setq font-lock-defaults
935 `(makefile-imake-font-lock-keywords ,@(cdr font-lock-defaults)))) 930 `(makefile-imake-font-lock-keywords ,@(cdr font-lock-defaults)))
931 (setq-local comment-start "XCOMM")
932 (setq-local comment-start-skip "XCOMM[ \t]*"))
936 933
937 934
938 935
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index ee94d0d85d8..ac278edd409 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -1,7 +1,7 @@
1;;; project.el --- Operations on the current project -*- lexical-binding: t; -*- 1;;; project.el --- Operations on the current project -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 2015-2022 Free Software Foundation, Inc. 3;; Copyright (C) 2015-2022 Free Software Foundation, Inc.
4;; Version: 0.8.1 4;; Version: 0.8.2
5;; Package-Requires: ((emacs "26.1") (xref "1.4.0")) 5;; Package-Requires: ((emacs "26.1") (xref "1.4.0"))
6 6
7;; This is a GNU ELPA :core package. Avoid using functionality that 7;; This is a GNU ELPA :core package. Avoid using functionality that
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 80c5b31b6ea..0de76b0bde3 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -3413,15 +3413,25 @@ detecting a prompt at the end of the buffer."
3413 "Send STRING to PROCESS and inhibit output. 3413 "Send STRING to PROCESS and inhibit output.
3414Return the output." 3414Return the output."
3415 (or process (setq process (python-shell-get-process-or-error))) 3415 (or process (setq process (python-shell-get-process-or-error)))
3416 (cl-letf (((process-filter process) 3416 (cl-letf* (((process-filter process)
3417 (lambda (_proc str) 3417 (lambda (_proc str)
3418 (with-current-buffer (process-buffer process) 3418 (with-current-buffer (process-buffer process)
3419 (python-shell-output-filter str)))) 3419 (python-shell-output-filter str))))
3420 (python-shell-output-filter-in-progress t) 3420 (python-shell-output-filter-in-progress t)
3421 (inhibit-quit t)) 3421 (inhibit-quit t)
3422 (buffer (process-buffer process))
3423 (last-prompt (cond ((boundp 'comint-last-prompt-overlay)
3424 'comint-last-prompt-overlay)
3425 ((boundp 'comint-last-prompt)
3426 'comint-last-prompt)))
3427 (last-prompt-value (buffer-local-value last-prompt buffer)))
3422 (or 3428 (or
3423 (with-local-quit 3429 (with-local-quit
3424 (python-shell-send-string string process) 3430 (unwind-protect
3431 (python-shell-send-string string process)
3432 (when (not (null last-prompt))
3433 (with-current-buffer buffer
3434 (set last-prompt last-prompt-value))))
3425 (while python-shell-output-filter-in-progress 3435 (while python-shell-output-filter-in-progress
3426 ;; `python-shell-output-filter' takes care of setting 3436 ;; `python-shell-output-filter' takes care of setting
3427 ;; `python-shell-output-filter-in-progress' to NIL after it 3437 ;; `python-shell-output-filter-in-progress' to NIL after it
@@ -3430,7 +3440,7 @@ Return the output."
3430 (prog1 3440 (prog1
3431 python-shell-output-filter-buffer 3441 python-shell-output-filter-buffer
3432 (setq python-shell-output-filter-buffer nil))) 3442 (setq python-shell-output-filter-buffer nil)))
3433 (with-current-buffer (process-buffer process) 3443 (with-current-buffer buffer
3434 (comint-interrupt-subjob))))) 3444 (comint-interrupt-subjob)))))
3435 3445
3436(defun python-shell-internal-send-string (string) 3446(defun python-shell-internal-send-string (string)
@@ -4059,7 +4069,8 @@ With argument MSG show activation/deactivation message."
4059Optional argument PROCESS forces completions to be retrieved 4069Optional argument PROCESS forces completions to be retrieved
4060using that one instead of current buffer's process." 4070using that one instead of current buffer's process."
4061 (setq process (or process (get-buffer-process (current-buffer)))) 4071 (setq process (or process (get-buffer-process (current-buffer))))
4062 (let* ((line-start (if (derived-mode-p 'inferior-python-mode) 4072 (let* ((is-shell-buffer (derived-mode-p 'inferior-python-mode))
4073 (line-start (if is-shell-buffer
4063 ;; Working on a shell buffer: use prompt end. 4074 ;; Working on a shell buffer: use prompt end.
4064 (cdr (python-util-comint-last-prompt)) 4075 (cdr (python-util-comint-last-prompt))
4065 (line-beginning-position))) 4076 (line-beginning-position)))
@@ -4090,7 +4101,8 @@ using that one instead of current buffer's process."
4090 (completion-fn 4101 (completion-fn
4091 (with-current-buffer (process-buffer process) 4102 (with-current-buffer (process-buffer process)
4092 (cond ((or (null prompt) 4103 (cond ((or (null prompt)
4093 (< (point) (cdr prompt-boundaries))) 4104 (and is-shell-buffer
4105 (< (point) (cdr prompt-boundaries))))
4094 #'ignore) 4106 #'ignore)
4095 ((or (not python-shell-completion-native-enable) 4107 ((or (not python-shell-completion-native-enable)
4096 ;; Even if native completion is enabled, for 4108 ;; Even if native completion is enabled, for
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index ac04b64ce59..bb36688ef85 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -751,17 +751,22 @@ quit the *xref* buffer."
751(defun xref-query-replace-in-results (from to) 751(defun xref-query-replace-in-results (from to)
752 "Perform interactive replacement of FROM with TO in all displayed xrefs. 752 "Perform interactive replacement of FROM with TO in all displayed xrefs.
753 753
754This command interactively replaces FROM with TO in the names of the 754This function interactively replaces FROM with TO in the names of the
755references displayed in the current *xref* buffer. 755references displayed in the current *xref* buffer.
756 756
757When called interactively, it uses '.*' as FROM, which means 757When called interactively, it uses '.*' as FROM, which means replace
758replace the whole name. Unless called with prefix argument, in 758the whole name, and prompts the user for TO.
759which case the user is prompted for both FROM and TO. 759If invoked with prefix argument, it prompts the user for both FROM and TO.
760 760
761As each match is found, the user must type a character saying 761As each match is found, the user must type a character saying
762what to do with it. Type SPC or `y' to replace the match, 762what to do with it. Type SPC or `y' to replace the match,
763DEL or `n' to skip and go to the next match. For more directions, 763DEL or `n' to skip and go to the next match. For more directions,
764type \\[help-command] at that time." 764type \\[help-command] at that time.
765
766Note that this function cannot be used in *xref* buffers that show
767a partial list of all references, such as the *xref* buffer created
768by \\[xref-find-definitions] and its variants, since those list only
769some of the references to the identifiers."
765 (interactive 770 (interactive
766 (let* ((fr 771 (let* ((fr
767 (if current-prefix-arg 772 (if current-prefix-arg
@@ -891,7 +896,9 @@ ITEMS is an xref item which " ; FIXME: Expand documentation.
891 (setq pairs (cdr buf-pairs)) 896 (setq pairs (cdr buf-pairs))
892 (setq continue 897 (setq continue
893 (perform-replace from to t t nil nil multi-query-replace-map))) 898 (perform-replace from to t t nil nil multi-query-replace-map)))
894 (unless did-it-once (user-error "No suitable matches here")) 899 (unless did-it-once
900 (user-error
901 "Cannot perform global renaming of symbols using find-definition results"))
895 (when (and continue (not buf-pairs)) 902 (when (and continue (not buf-pairs))
896 (message "All results processed")))) 903 (message "All results processed"))))
897 904
diff --git a/lisp/server.el b/lisp/server.el
index 3caa335c4eb..90d97c1538e 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -1589,14 +1589,19 @@ specifically for the clients and did not exist before their request for it."
1589 (server-buffer-done (current-buffer)))) 1589 (server-buffer-done (current-buffer))))
1590 1590
1591(defun server-kill-emacs-query-function () 1591(defun server-kill-emacs-query-function ()
1592 "Ask before exiting Emacs if it has live clients. 1592 "Ask before exiting Emacs if it has other live clients.
1593A \"live client\" is a client with at least one live buffer 1593A \"live client\" is a client with at least one live buffer
1594associated with it." 1594associated with it. These clients were (probably) started by
1595 (or (not (seq-some (lambda (proc) 1595external processes that are waiting for some buffers to be
1596 (seq-some #'buffer-live-p 1596edited. If there are any other clients, we don't want to fail
1597 (process-get proc 'buffers))) 1597their waiting processes, so ask the user to be sure."
1598 server-clients)) 1598 (let ((this-client (frame-parameter nil 'client)))
1599 (yes-or-no-p "This Emacs session has clients; exit anyway? "))) 1599 (or (not (seq-some (lambda (proc)
1600 (unless (eq proc this-client)
1601 (seq-some #'buffer-live-p
1602 (process-get proc 'buffers))))
1603 server-clients))
1604 (yes-or-no-p "This Emacs session has other clients; exit anyway? "))))
1600 1605
1601(defun server-kill-buffer () 1606(defun server-kill-buffer ()
1602 "Remove the current buffer from its clients' buffer list. 1607 "Remove the current buffer from its clients' buffer list.
diff --git a/lisp/simple.el b/lisp/simple.el
index d2dcbe27a07..e804f717b01 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -2465,9 +2465,13 @@ Also see `suggest-key-bindings'."
2465 2465
2466(defun execute-extended-command--shorter (name typed) 2466(defun execute-extended-command--shorter (name typed)
2467 (let ((candidates '()) 2467 (let ((candidates '())
2468 commands
2468 (max (length typed)) 2469 (max (length typed))
2469 (len 1) 2470 (len 1)
2470 binding) 2471 binding)
2472 ;; Precompute a list of commands once to avoid repeated `commandp' testing
2473 ;; of symbols in the `completion-try-completion' call inside the loop below
2474 (mapatoms (lambda (s) (when (commandp s) (push s commands))))
2471 (while (and (not binding) 2475 (while (and (not binding)
2472 (progn 2476 (progn
2473 (unless candidates 2477 (unless candidates
@@ -2480,8 +2484,8 @@ Also see `suggest-key-bindings'."
2480 (input-pending-p) ;Dummy call to trigger input-processing, bug#23002. 2484 (input-pending-p) ;Dummy call to trigger input-processing, bug#23002.
2481 (let ((candidate (pop candidates))) 2485 (let ((candidate (pop candidates)))
2482 (when (equal name 2486 (when (equal name
2483 (car-safe (completion-try-completion 2487 (car-safe (completion-try-completion
2484 candidate obarray 'commandp len))) 2488 candidate commands nil len)))
2485 (setq binding candidate)))) 2489 (setq binding candidate))))
2486 binding)) 2490 binding))
2487 2491
diff --git a/lisp/startup.el b/lisp/startup.el
index 04de7e42fea..725984b815b 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -458,7 +458,8 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'."
458 ;; The Windows version doesn't report meaningful inode numbers, so 458 ;; The Windows version doesn't report meaningful inode numbers, so
459 ;; use the canonicalized absolute file name of the directory instead. 459 ;; use the canonicalized absolute file name of the directory instead.
460 (setq attrs (or canonicalized 460 (setq attrs (or canonicalized
461 (nthcdr 10 (file-attributes this-dir)))) 461 (file-attribute-file-identifier
462 (file-attributes this-dir))))
462 (unless (member attrs normal-top-level-add-subdirs-inode-list) 463 (unless (member attrs normal-top-level-add-subdirs-inode-list)
463 (push attrs normal-top-level-add-subdirs-inode-list) 464 (push attrs normal-top-level-add-subdirs-inode-list)
464 (dolist (file contents) 465 (dolist (file contents)
diff --git a/lisp/textmodes/less-css-mode.el b/lisp/textmodes/less-css-mode.el
index 5d17b390f4d..bfb5566e896 100644
--- a/lisp/textmodes/less-css-mode.el
+++ b/lisp/textmodes/less-css-mode.el
@@ -24,7 +24,7 @@
24;;; Commentary: 24;;; Commentary:
25 25
26;; This mode provides syntax highlighting for Less CSS files 26;; This mode provides syntax highlighting for Less CSS files
27;; (http://lesscss.org/), plus optional support for compilation of 27;; (https://lesscss.org/), plus optional support for compilation of
28;; .less files to .css files at the time they are saved: use 28;; .less files to .css files at the time they are saved: use
29;; `less-css-compile-at-save' to enable this. 29;; `less-css-compile-at-save' to enable this.
30;; 30;;
diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el
index 7d691430ec6..7ce30cba8a4 100644
--- a/lisp/textmodes/sgml-mode.el
+++ b/lisp/textmodes/sgml-mode.el
@@ -268,7 +268,7 @@ Currently, only Latin-1 characters are supported.")
268 ;; prefer tidy because (o)nsgmls is often built without --enable-http 268 ;; prefer tidy because (o)nsgmls is often built without --enable-http
269 ;; which makes it next to useless 269 ;; which makes it next to useless
270 (cond ((executable-find "tidy") 270 (cond ((executable-find "tidy")
271 ;; tidy is available from http://tidy.sourceforge.net/ 271 ;; tidy is available from https://tidy.sourceforge.net/
272 "tidy --gnu-emacs yes -utf8 -e -q") 272 "tidy --gnu-emacs yes -utf8 -e -q")
273 ((executable-find "nsgmls") 273 ((executable-find "nsgmls")
274 ;; nsgmls is a free SGML parser in the SP suite available from 274 ;; nsgmls is a free SGML parser in the SP suite available from
@@ -276,7 +276,7 @@ Currently, only Latin-1 characters are supported.")
276 "nsgmls -s") 276 "nsgmls -s")
277 ((executable-find "onsgmls") 277 ((executable-find "onsgmls")
278 ;; onsgmls is the community version of `nsgmls' 278 ;; onsgmls is the community version of `nsgmls'
279 ;; hosted on http://openjade.sourceforge.net/ 279 ;; hosted on https://openjade.sourceforge.net/
280 "onsgmls -s") 280 "onsgmls -s")
281 (t "Install (o)nsgmls, tidy, or some other SGML validator, and set `sgml-validate-command'")) 281 (t "Install (o)nsgmls, tidy, or some other SGML validator, and set `sgml-validate-command'"))
282 "The command to validate an SGML document. 282 "The command to validate an SGML document.
diff --git a/lisp/textmodes/string-edit.el b/lisp/textmodes/string-edit.el
index 53850674ac0..3270050ca4a 100644
--- a/lisp/textmodes/string-edit.el
+++ b/lisp/textmodes/string-edit.el
@@ -46,7 +46,9 @@ called with no parameters.
46 46
47PROMPT will be inserted at the start of the buffer, but won't be 47PROMPT will be inserted at the start of the buffer, but won't be
48included in the resulting string. If PROMPT is nil, no help text 48included in the resulting string. If PROMPT is nil, no help text
49will be inserted." 49will be inserted.
50
51Also see `read-string-from-buffer'."
50 (with-current-buffer (generate-new-buffer "*edit string*") 52 (with-current-buffer (generate-new-buffer "*edit string*")
51 (when prompt 53 (when prompt
52 (let ((inhibit-read-only t)) 54 (let ((inhibit-read-only t))
@@ -88,7 +90,9 @@ The user finishes editing with \\<string-edit-mode-map>\\[string-edit-done], or
88 90
89PROMPT will be inserted at the start of the buffer, but won't be 91PROMPT will be inserted at the start of the buffer, but won't be
90included in the resulting string. If nil, no prompt will be 92included in the resulting string. If nil, no prompt will be
91inserted in the buffer." 93inserted in the buffer.
94
95Also see `string-edit'."
92 (string-edit 96 (string-edit
93 prompt 97 prompt
94 string 98 string
@@ -115,9 +119,7 @@ This will kill the current buffer."
115 (interactive) 119 (interactive)
116 (goto-char (point-min)) 120 (goto-char (point-min))
117 ;; Skip past the help text. 121 ;; Skip past the help text.
118 (when-let ((match (text-property-search-forward 122 (text-property-search-forward 'string-edit--prompt)
119 'string-edit--prompt nil t)))
120 (goto-char (prop-match-beginning match)))
121 (let ((string (buffer-substring (point) (point-max))) 123 (let ((string (buffer-substring (point) (point-max)))
122 (callback string-edit--success-callback)) 124 (callback string-edit--success-callback))
123 (quit-window 'kill) 125 (quit-window 'kill)
diff --git a/lisp/url/url-file.el b/lisp/url/url-file.el
index a72b2e67a6a..6258e999c1d 100644
--- a/lisp/url/url-file.el
+++ b/lisp/url/url-file.el
@@ -150,7 +150,6 @@ it up to them."
150 (uncompressed-filename nil) 150 (uncompressed-filename nil)
151 (content-type nil) 151 (content-type nil)
152 (content-encoding nil) 152 (content-encoding nil)
153 (coding-system-for-read 'binary)
154 (filename (url-file-build-filename url))) 153 (filename (url-file-build-filename url)))
155 (or filename (error "File does not exist: %s" (url-recreate-url url))) 154 (or filename (error "File does not exist: %s" (url-recreate-url url)))
156 ;; Need to figure out the content-type from the real extension, 155 ;; Need to figure out the content-type from the real extension,
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index 8ffe41758ed..d63d755a287 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -373,8 +373,9 @@ in the order given by `git status'."
373 373
374(defun vc-git-working-revision (_file) 374(defun vc-git-working-revision (_file)
375 "Git-specific version of `vc-working-revision'." 375 "Git-specific version of `vc-working-revision'."
376 (let (process-file-side-effects) 376 (let* ((process-file-side-effects nil)
377 (vc-git--rev-parse "HEAD"))) 377 (commit (vc-git--rev-parse "HEAD" t)))
378 (or (vc-git-symbolic-commit commit) commit)))
378 379
379(defun vc-git--symbolic-ref (file) 380(defun vc-git--symbolic-ref (file)
380 (or 381 (or
@@ -1638,7 +1639,7 @@ This requires git 1.8.4 or later, for the \"-L\" option of \"git log\"."
1638 (start-point (when branchp (vc-read-revision 1639 (start-point (when branchp (vc-read-revision
1639 (format-prompt "Start point" 1640 (format-prompt "Start point"
1640 (car (vc-git-branches))) 1641 (car (vc-git-branches)))
1641 (list dir) 'Git)))) 1642 (list dir) 'Git (car (vc-git-branches))))))
1642 (and (or (zerop (vc-git-command nil t nil "update-index" "--refresh")) 1643 (and (or (zerop (vc-git-command nil t nil "update-index" "--refresh"))
1643 (y-or-n-p "Modified files exist. Proceed? ") 1644 (y-or-n-p "Modified files exist. Proceed? ")
1644 (user-error (format "Can't create %s with modified files" 1645 (user-error (format "Can't create %s with modified files"
@@ -1677,11 +1678,15 @@ This requires git 1.8.4 or later, for the \"-L\" option of \"git log\"."
1677 ;; does not (and cannot) quote. 1678 ;; does not (and cannot) quote.
1678 (vc-git--rev-parse (concat rev "~1")))) 1679 (vc-git--rev-parse (concat rev "~1"))))
1679 1680
1680(defun vc-git--rev-parse (rev) 1681(defun vc-git--rev-parse (rev &optional short)
1681 (with-temp-buffer 1682 (with-temp-buffer
1682 (and 1683 (and
1683 (vc-git--out-ok "rev-parse" rev) 1684 (if short
1684 (buffer-substring-no-properties (point-min) (+ (point-min) 40))))) 1685 (vc-git--out-ok "rev-parse" "--short" rev)
1686 (vc-git--out-ok "rev-parse" rev))
1687 (string-trim-right
1688 (buffer-substring-no-properties (point-min) (min (+ (point-min) 40)
1689 (point-max)))))))
1685 1690
1686(defun vc-git-next-revision (file rev) 1691(defun vc-git-next-revision (file rev)
1687 "Git-specific version of `vc-next-revision'." 1692 "Git-specific version of `vc-next-revision'."
@@ -2028,19 +2033,23 @@ FILE can be nil."
2028 (setq ok nil)))))) 2033 (setq ok nil))))))
2029 (and ok str))) 2034 (and ok str)))
2030 2035
2031(defun vc-git-symbolic-commit (commit) 2036(defun vc-git-symbolic-commit (commit &optional force)
2032 "Translate COMMIT string into symbolic form. 2037 "Translate revision string of COMMIT to a symbolic form.
2033Returns nil if not possible." 2038If the optional argument FORCE is non-nil, the returned value is
2039allowed to include revision specifications like \"master~8\"
2040\(the 8th parent of the commit currently pointed to by the master
2041branch), otherwise such revision specifications are rejected, and
2042the function returns nil."
2034 (and commit 2043 (and commit
2035 (let ((name (with-temp-buffer 2044 (with-temp-buffer
2036 (and 2045 (and
2037 (vc-git--out-ok "name-rev" "--name-only" commit) 2046 (vc-git--out-ok "name-rev" "--no-undefined" "--name-only" commit)
2038 (goto-char (point-min)) 2047 (goto-char (point-min))
2039 (= (forward-line 2) 1) 2048 (or force (not (looking-at "^.*[~^].*$" t)))
2040 (bolp) 2049 (= (forward-line 2) 1)
2041 (buffer-substring-no-properties (point-min) 2050 (bolp)
2042 (1- (point-max))))))) 2051 (buffer-substring-no-properties (point-min)
2043 (and name (not (string= name "undefined")) name)))) 2052 (1- (point-max)))))))
2044 2053
2045(defvar-keymap vc-dir-git-mode-map 2054(defvar-keymap vc-dir-git-mode-map
2046 "z c" #'vc-git-stash 2055 "z c" #'vc-git-stash
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 14b149310c4..49bb7a27aad 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -1926,6 +1926,13 @@ Return t if the buffer had changes, nil otherwise."
1926 "History for `vc-read-revision'.") 1926 "History for `vc-read-revision'.")
1927 1927
1928(defun vc-read-revision (prompt &optional files backend default initial-input multiple) 1928(defun vc-read-revision (prompt &optional files backend default initial-input multiple)
1929 "Query the user for a revision using PROMPT.
1930All subsequent arguments are optional. FILES may specify a file
1931set to restrict the revisions to. BACKEND is a VC backend as
1932listed in `vc-handled-backends'. DEFAULT and INITIAL-INPUT are
1933handled as defined by `completing-read'. If MULTIPLE is non-nil,
1934the user may be prompted for multiple revisions. If possible
1935this means that `completing-read-multiple' will be used."
1929 (cond 1936 (cond
1930 ((null files) 1937 ((null files)
1931 (let ((vc-fileset (vc-deduce-fileset t))) ;FIXME: why t? --Stef 1938 (let ((vc-fileset (vc-deduce-fileset t))) ;FIXME: why t? --Stef
@@ -1947,6 +1954,10 @@ Return t if the buffer had changes, nil otherwise."
1947 answer))))) 1954 answer)))))
1948 1955
1949(defun vc-read-multiple-revisions (prompt &optional files backend default initial-input) 1956(defun vc-read-multiple-revisions (prompt &optional files backend default initial-input)
1957 "Query the user for multiple revisions.
1958This is equivalent to invoking `vc-read-revision' with t for
1959MULTIPLE. The arguments PROMPT, FILES, BACKEND, DEFAULT and
1960INITIAL-INPUT are passed on to `vc-read-revision' directly."
1950 (vc-read-revision prompt files backend default initial-input t)) 1961 (vc-read-revision prompt files backend default initial-input t))
1951 1962
1952(defun vc-diff-build-argument-list-internal (&optional fileset) 1963(defun vc-diff-build-argument-list-internal (&optional fileset)
@@ -3287,10 +3298,11 @@ immediately after this one."
3287 (apply #'vc-user-edit-command (apply old args)))))) 3298 (apply #'vc-user-edit-command (apply old args))))))
3288 3299
3289(defcustom vc-prepare-patches-separately t 3300(defcustom vc-prepare-patches-separately t
3290 "Non-nil means that `vc-prepare-patch' creates a single message. 3301 "Whether `vc-prepare-patch' should generate a separate message for each patch.
3291A single message is created by attaching all patches to the body 3302If nil, `vc-prepare-patch' creates a single email message by attaching
3292of a single message. If nil, each patch will be sent out in a 3303all the patches to the body of that message. If non-nil, each patch
3293separate message, which will be prepared sequentially." 3304will be sent out in a separate message, and the messages will be
3305prepared sequentially."
3294 :type 'boolean 3306 :type 'boolean
3295 :safe #'booleanp 3307 :safe #'booleanp
3296 :version "29.1") 3308 :version "29.1")
@@ -3308,7 +3320,7 @@ If nil, no default will be used. This option may be set locally."
3308 (buffer &optional type description disposition)) 3320 (buffer &optional type description disposition))
3309(declare-function log-view-get-marked "log-view" ()) 3321(declare-function log-view-get-marked "log-view" ())
3310 3322
3311(defun vc-default-prepare-patch (rev) 3323(defun vc-default-prepare-patch (_backend rev)
3312 (let ((backend (vc-backend buffer-file-name))) 3324 (let ((backend (vc-backend buffer-file-name)))
3313 (with-current-buffer (generate-new-buffer " *vc-default-prepare-patch*") 3325 (with-current-buffer (generate-new-buffer " *vc-default-prepare-patch*")
3314 (vc-diff-internal 3326 (vc-diff-internal
@@ -3325,15 +3337,21 @@ If nil, no default will be used. This option may be set locally."
3325;;;###autoload 3337;;;###autoload
3326(defun vc-prepare-patch (addressee subject revisions) 3338(defun vc-prepare-patch (addressee subject revisions)
3327 "Compose an Email sending patches for REVISIONS to ADDRESSEE. 3339 "Compose an Email sending patches for REVISIONS to ADDRESSEE.
3328If `vc-prepare-patches-separately' is non-nil, SUBJECT will be used 3340If `vc-prepare-patches-separately' is nil, SUBJECT will be used
3329as the default subject for the message. Otherwise a separate 3341as the default subject for the message (and it will be prompted
3330message will be composed for each revision. 3342for when called interactively). Otherwise a separate message
3343will be composed for each revision, with SUBJECT derived from the
3344invidividual commits.
3331 3345
3332When invoked interactively in a Log View buffer with marked 3346When invoked interactively in a Log View buffer with marked
3333revisions, these revisions will be used." 3347revisions, those revisions will be used."
3334 (interactive 3348 (interactive
3335 (let ((revs (or (log-view-get-marked) 3349 (let ((revs (vc-read-multiple-revisions
3336 (vc-read-multiple-revisions "Revisions: "))) 3350 "Revisions: " nil nil nil
3351 (or (and-let* ((revs (log-view-get-marked)))
3352 (mapconcat #'identity revs ","))
3353 (and-let* ((file (buffer-file-name)))
3354 (vc-working-revision file)))))
3337 to) 3355 to)
3338 (require 'message) 3356 (require 'message)
3339 (while (null (setq to (completing-read-multiple 3357 (while (null (setq to (completing-read-multiple
@@ -3357,7 +3375,8 @@ revisions, these revisions will be used."
3357 'prepare-patch rev)) 3375 'prepare-patch rev))
3358 revisions))) 3376 revisions)))
3359 (if vc-prepare-patches-separately 3377 (if vc-prepare-patches-separately
3360 (dolist (patch patches) 3378 (dolist (patch (reverse patches)
3379 (message "Prepared %d patches..." (length patches)))
3361 (compose-mail addressee 3380 (compose-mail addressee
3362 (plist-get patch :subject) 3381 (plist-get patch :subject)
3363 nil nil nil nil 3382 nil nil nil nil
@@ -3368,8 +3387,7 @@ revisions, these revisions will be used."
3368 (insert-buffer-substring 3387 (insert-buffer-substring
3369 (plist-get patch :buffer) 3388 (plist-get patch :buffer)
3370 (plist-get patch :body-start) 3389 (plist-get patch :body-start)
3371 (plist-get patch :body-end))) 3390 (plist-get patch :body-end))))
3372 (recursive-edit))
3373 (compose-mail addressee subject nil nil nil nil 3391 (compose-mail addressee subject nil nil nil nil
3374 (mapcar 3392 (mapcar
3375 (lambda (p) 3393 (lambda (p)
diff --git a/lisp/view.el b/lisp/view.el
index 1207f01db21..d9b1a2d0e7d 100644
--- a/lisp/view.el
+++ b/lisp/view.el
@@ -68,13 +68,6 @@ the F command in `view-mode', but you can set it to t if you want the action
68for all scroll commands in view mode." 68for all scroll commands in view mode."
69 :type 'boolean) 69 :type 'boolean)
70 70
71;;;###autoload
72(defcustom view-remove-frame-by-deleting t
73 "Determine how View mode removes a frame no longer needed.
74If nil, make an icon of the frame. If non-nil, delete the frame."
75 :type 'boolean
76 :version "23.1")
77
78(defcustom view-exits-all-viewing-windows nil 71(defcustom view-exits-all-viewing-windows nil
79 "Non-nil means restore all windows used to view buffer. 72 "Non-nil means restore all windows used to view buffer.
80Commands that restore windows when finished viewing a buffer, 73Commands that restore windows when finished viewing a buffer,
diff --git a/lisp/x-dnd.el b/lisp/x-dnd.el
index 2bda67fe3f3..ee80e41a22e 100644
--- a/lisp/x-dnd.el
+++ b/lisp/x-dnd.el
@@ -1640,8 +1640,9 @@ VERSION is the version of the XDND protocol understood by SOURCE."
1640 desired-name 1640 desired-name
1641 (or file-name-coding-system 1641 (or file-name-coding-system
1642 default-file-name-coding-system))) 1642 default-file-name-coding-system)))
1643 (let ((name (funcall x-dnd-direct-save-function 1643 (let ((name (expand-file-name
1644 t desired-name))) 1644 (funcall x-dnd-direct-save-function
1645 t desired-name))))
1645 (setq save-to name save-to-remote name)) 1646 (setq save-to name save-to-remote name))
1646 (when save-to 1647 (when save-to
1647 (if (file-remote-p save-to) 1648 (if (file-remote-p save-to)
diff --git a/nt/INSTALL b/nt/INSTALL
index 0b8ca98c8ad..81d4c6293c5 100644
--- a/nt/INSTALL
+++ b/nt/INSTALL
@@ -214,7 +214,7 @@ build will run on Windows 9X and newer systems).
214 of the 'bsdtar' program to unpack the tarballs. 'bsdtar' is 214 of the 'bsdtar' program to unpack the tarballs. 'bsdtar' is
215 available as part of the 'libarchive' package from here: 215 available as part of the 'libarchive' package from here:
216 216
217 http://sourceforge.net/projects/ezwinports/files/ 217 https://sourceforge.net/projects/ezwinports/files/
218 218
219 The recommended place to install these packages is a single tree 219 The recommended place to install these packages is a single tree
220 starting from some directory on a drive other than the system drive 220 starting from some directory on a drive other than the system drive
@@ -242,16 +242,16 @@ build will run on Windows 9X and newer systems).
242 . Texinfo (needed to produce the Info manuals when building from 242 . Texinfo (needed to produce the Info manuals when building from
243 the repository, and for "make install") 243 the repository, and for "make install")
244 244
245 Available from http://sourceforge.net/projects/ezwinports/files/. 245 Available from https://sourceforge.net/projects/ezwinports/files/.
246 246
247 . pkg-config (invoked by the configure script to look for optional 247 . pkg-config (invoked by the configure script to look for optional
248 packages) 248 packages)
249 249
250 Available from http://sourceforge.net/projects/ezwinports/files/. 250 Available from https://sourceforge.net/projects/ezwinports/files/.
251 251
252 . gzip (needed to compress files during "make install") 252 . gzip (needed to compress files during "make install")
253 253
254 Available from http://gnuwin32.sourceforge.net/packages/gzip.htm. 254 Available from https://gnuwin32.sourceforge.net/packages/gzip.htm.
255 255
256 Each package might list other packages as prerequisites on its 256 Each package might list other packages as prerequisites on its
257 download page (under "Runtime requirements"); download those as 257 download page (under "Runtime requirements"); download those as
@@ -294,7 +294,7 @@ build will run on Windows 9X and newer systems).
294 . Additional package (needed only if building from the repository): 294 . Additional package (needed only if building from the repository):
295 Autoconf. It is available from here: 295 Autoconf. It is available from here:
296 296
297 http://sourceforge.net/projects/ezwinports/files/autoconf-2.65-msys-bin.zip/download 297 https://sourceforge.net/projects/ezwinports/files/autoconf-2.65-msys-bin.zip/download
298 298
299 MSYS packages are distributed as .tar.lzma compressed archives. To 299 MSYS packages are distributed as .tar.lzma compressed archives. To
300 install the packages manually, we recommend to use the Windows port 300 install the packages manually, we recommend to use the Windows port
@@ -642,7 +642,7 @@ build will run on Windows 9X and newer systems).
642 642
643 To support XPM images (required for color tool-bar icons), you will 643 To support XPM images (required for color tool-bar icons), you will
644 need the libXpm library. It is available from the ezwinports site, 644 need the libXpm library. It is available from the ezwinports site,
645 http://sourceforge.net/projects/ezwinports/files/ and from 645 https://sourceforge.net/projects/ezwinports/files/ and from
646 https://ftp.gnu.org/gnu/emacs/windows/. 646 https://ftp.gnu.org/gnu/emacs/windows/.
647 647
648 For PNG images, we recommend to use versions 1.4.x and later of 648 For PNG images, we recommend to use versions 1.4.x and later of
@@ -665,7 +665,7 @@ build will run on Windows 9X and newer systems).
665 For GIF images, we recommend to use versions 5.0.0 or later of 665 For GIF images, we recommend to use versions 5.0.0 or later of
666 giflib, as it is much enhanced wrt previous versions. You can find 666 giflib, as it is much enhanced wrt previous versions. You can find
667 precompiled binaries and headers for giflib on the ezwinports site, 667 precompiled binaries and headers for giflib on the ezwinports site,
668 http://sourceforge.net/projects/ezwinports/files/ and on 668 https://sourceforge.net/projects/ezwinports/files/ and on
669 https://ftp.gnu.org/gnu/emacs/windows/. 669 https://ftp.gnu.org/gnu/emacs/windows/.
670 670
671 Version 5.0.0 and later of giflib are binary incompatible with 671 Version 5.0.0 and later of giflib are binary incompatible with
@@ -689,7 +689,7 @@ build will run on Windows 9X and newer systems).
689 Pre-built versions of librsvg and its dependencies can be found 689 Pre-built versions of librsvg and its dependencies can be found
690 here: 690 here:
691 691
692 http://sourceforge.net/projects/ezwinports/files/ 692 https://sourceforge.net/projects/ezwinports/files/
693 693
694 This site includes a minimal (as much as possible for librsvg) 694 This site includes a minimal (as much as possible for librsvg)
695 build of the library and its dependencies; it is also more 695 build of the library and its dependencies; it is also more
@@ -739,7 +739,7 @@ build will run on Windows 9X and newer systems).
739 739
740 For WebP images you will need libwebp. You can find it here: 740 For WebP images you will need libwebp. You can find it here:
741 741
742 http://sourceforge.net/projects/ezwinports/files/ 742 https://sourceforge.net/projects/ezwinports/files/
743 743
744 Note: the MS-Windows binary distribution on the Google site: 744 Note: the MS-Windows binary distribution on the Google site:
745 745
@@ -779,7 +779,7 @@ build will run on Windows 9X and newer systems).
779 session. 779 session.
780 780
781 You can get pre-built binaries (including any required DLL and the 781 You can get pre-built binaries (including any required DLL and the
782 header files) at http://sourceforge.net/projects/ezwinports/files/ 782 header files) at https://sourceforge.net/projects/ezwinports/files/
783 and on https://ftp.gnu.org/gnu/emacs/windows/. 783 and on https://ftp.gnu.org/gnu/emacs/windows/.
784 784
785* Optional libxml2 support 785* Optional libxml2 support
@@ -801,7 +801,7 @@ build will run on Windows 9X and newer systems).
801 One place where you can get pre-built Windows binaries of libxml2 801 One place where you can get pre-built Windows binaries of libxml2
802 (including any required DLL and the header files) is here: 802 (including any required DLL and the header files) is here:
803 803
804 http://sourceforge.net/projects/ezwinports/files/ 804 https://sourceforge.net/projects/ezwinports/files/
805 https://ftp.gnu.org/gnu/emacs/windows/ 805 https://ftp.gnu.org/gnu/emacs/windows/
806 806
807 For runtime support of libxml2, you will also need to install the 807 For runtime support of libxml2, you will also need to install the
@@ -809,7 +809,7 @@ build will run on Windows 9X and newer systems).
809 be available to the compiler when you compile with libxml2 support. 809 be available to the compiler when you compile with libxml2 support.
810 A MinGW port of libiconv can be found on the MinGW site: 810 A MinGW port of libiconv can be found on the MinGW site:
811 811
812 http://sourceforge.net/projects/mingw/files/MinGW/Base/libiconv/ 812 https://sourceforge.net/projects/mingw/files/MinGW/Base/libiconv/
813 813
814 You need the libiconv-X.Y.Z-N-mingw32-dev.tar.lzma tarball from that 814 You need the libiconv-X.Y.Z-N-mingw32-dev.tar.lzma tarball from that
815 site. 815 site.
diff --git a/nt/INSTALL.W64 b/nt/INSTALL.W64
index fd8f60bb0b5..9261c82db1b 100644
--- a/nt/INSTALL.W64
+++ b/nt/INSTALL.W64
@@ -19,7 +19,7 @@ Emacs with the full repository, or less if you're using a release tarball.
19* Set up the MinGW-w64 / MSYS2 build environment 19* Set up the MinGW-w64 / MSYS2 build environment
20 20
21MinGW-w64 provides a complete runtime for projects built with GCC for 64-bit 21MinGW-w64 provides a complete runtime for projects built with GCC for 64-bit
22Windows -- it's located at http://mingw-w64.org/. 22Windows -- it's located at https://mingw-w64.org/.
23 23
24MSYS2 is a Cygwin-derived software distribution for Windows which provides 24MSYS2 is a Cygwin-derived software distribution for Windows which provides
25build tools for MinGW-w64 -- see https://msys2.github.io/. 25build tools for MinGW-w64 -- see https://msys2.github.io/.
diff --git a/src/ChangeLog.13 b/src/ChangeLog.13
index abf2a9421a2..268a59219c4 100644
--- a/src/ChangeLog.13
+++ b/src/ChangeLog.13
@@ -11147,7 +11147,7 @@
111472013-11-01 Claudio Bley <claudio.bley@googlemail.com> 111472013-11-01 Claudio Bley <claudio.bley@googlemail.com>
11148 11148
11149 * image.c (pbm_next_char): New function. 11149 * image.c (pbm_next_char): New function.
11150 See http://netpbm.sourceforge.net/doc/pbm.html for the details. 11150 See https://netpbm.sourceforge.net/doc/pbm.html for the details.
11151 (pbm_scan_number): Use it. 11151 (pbm_scan_number): Use it.
11152 (Qlibjpeg_version): New variable. 11152 (Qlibjpeg_version): New variable.
11153 (syms_of_image): DEFSYM and initialize it. 11153 (syms_of_image): DEFSYM and initialize it.
@@ -14215,7 +14215,7 @@
14215 * w32.c (PEXCEPTION_POINTERS, PEXCEPTION_RECORD, PCONTEXT): Define 14215 * w32.c (PEXCEPTION_POINTERS, PEXCEPTION_RECORD, PCONTEXT): Define
14216 variables of these types so that GDB would know about them, as aid 14216 variables of these types so that GDB would know about them, as aid
14217 for debugging fatal exceptions. (Bug#15024) See also 14217 for debugging fatal exceptions. (Bug#15024) See also
14218 http://sourceware.org/ml/gdb/2013-08/msg00010.html for related 14218 https://sourceware.org/ml/gdb/2013-08/msg00010.html for related
14219 discussions. 14219 discussions.
14220 14220
142212013-08-08 Jan Djärv <jan.h.d@swipnet.se> 142212013-08-08 Jan Djärv <jan.h.d@swipnet.se>
diff --git a/src/dired.c b/src/dired.c
index c2c099f0a5f..ef729df5d2b 100644
--- a/src/dired.c
+++ b/src/dired.c
@@ -923,11 +923,12 @@ Elements of the attribute list are:
923 8. File modes, as a string of ten letters or dashes as in ls -l. 923 8. File modes, as a string of ten letters or dashes as in ls -l.
924 9. An unspecified value, present only for backward compatibility. 924 9. An unspecified value, present only for backward compatibility.
92510. inode number, as a nonnegative integer. 92510. inode number, as a nonnegative integer.
92611. Filesystem device number, as an integer. 92611. Filesystem device identifier, as an integer or a cons cell of integers.
927 927
928Large integers are bignums, so `eq' might not work on them. 928Large integers are bignums, so `eq' might not work on them.
929On most filesystems, the combination of the inode and the device 929On most filesystems, the combination of the inode and the device
930number uniquely identifies the file. 930identifier uniquely identifies the file. This unique file identification
931is provided by the access function `file-attribute-file-identifier'.
931 932
932On MS-Windows, performance depends on `w32-get-true-file-attributes', 933On MS-Windows, performance depends on `w32-get-true-file-attributes',
933which see. 934which see.
diff --git a/src/editfns.c b/src/editfns.c
index c1414071c79..3f9618edb08 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -3551,10 +3551,15 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message)
3551 || float_conversion || conversion == 'i' 3551 || float_conversion || conversion == 'i'
3552 || conversion == 'o' || conversion == 'x' 3552 || conversion == 'o' || conversion == 'x'
3553 || conversion == 'X')) 3553 || conversion == 'X'))
3554 error ("Invalid format operation %%%c", 3554 {
3555 multibyte_format 3555 unsigned char *p = (unsigned char *) format - 1;
3556 ? STRING_CHAR ((unsigned char *) format - 1) 3556 if (multibyte_format)
3557 : *((unsigned char *) format - 1)); 3557 error ("Invalid format operation %%%c", STRING_CHAR (p));
3558 else
3559 error (*p <= 127 ? "Invalid format operation %%%c"
3560 : "Invalid format operation char #o%03o",
3561 *p);
3562 }
3558 else if (! (FIXNUMP (arg) || ((BIGNUMP (arg) || FLOATP (arg)) 3563 else if (! (FIXNUMP (arg) || ((BIGNUMP (arg) || FLOATP (arg))
3559 && conversion != 'c'))) 3564 && conversion != 'c')))
3560 error ("Format specifier doesn't match argument type"); 3565 error ("Format specifier doesn't match argument type");
diff --git a/src/fileio.c b/src/fileio.c
index dd7f85ec97f..8f96e973b25 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -5000,9 +5000,10 @@ by calling `format-decode', which see. */)
5000 unbind_to (count1, Qnil); 5000 unbind_to (count1, Qnil);
5001 } 5001 }
5002 5002
5003 if (!NILP (visit) && current_buffer->modtime.tv_nsec < 0) 5003 if (save_errno != 0)
5004 { 5004 {
5005 /* Signal an error if visiting a file that could not be opened. */ 5005 /* Signal an error if visiting a file that could not be opened. */
5006 eassert (!NILP (visit) && NILP (handler));
5006 report_file_errno ("Opening input file", orig_filename, save_errno); 5007 report_file_errno ("Opening input file", orig_filename, save_errno);
5007 } 5008 }
5008 5009
@@ -6362,7 +6363,7 @@ init_fileio (void)
6362 For more on why fsync does not suffice even if it works properly, see: 6363 For more on why fsync does not suffice even if it works properly, see:
6363 Roche X. Necessary step(s) to synchronize filename operations on disk. 6364 Roche X. Necessary step(s) to synchronize filename operations on disk.
6364 Austin Group Defect 672, 2013-03-19 6365 Austin Group Defect 672, 2013-03-19
6365 http://austingroupbugs.net/view.php?id=672 */ 6366 https://austingroupbugs.net/view.php?id=672 */
6366 write_region_inhibit_fsync = noninteractive; 6367 write_region_inhibit_fsync = noninteractive;
6367} 6368}
6368 6369
diff --git a/src/fns.c b/src/fns.c
index bc4915eb25b..40557923827 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -433,6 +433,22 @@ If string STR1 is greater, the value is a positive number N;
433 return Qt; 433 return Qt;
434} 434}
435 435
436/* Check whether the platform allows access to unaligned addresses for
437 size_t integers without trapping or undue penalty (a few cycles is OK).
438
439 This whitelist is incomplete but since it is only used to improve
440 performance, omitting cases is safe. */
441#if defined __x86_64__|| defined __amd64__ \
442 || defined __i386__ || defined __i386 \
443 || defined __arm64__ || defined __aarch64__ \
444 || defined __powerpc__ || defined __powerpc \
445 || defined __ppc__ || defined __ppc \
446 || defined __s390__ || defined __s390x__
447#define HAVE_FAST_UNALIGNED_ACCESS 1
448#else
449#define HAVE_FAST_UNALIGNED_ACCESS 0
450#endif
451
436DEFUN ("string-lessp", Fstring_lessp, Sstring_lessp, 2, 2, 0, 452DEFUN ("string-lessp", Fstring_lessp, Sstring_lessp, 2, 2, 0,
437 doc: /* Return non-nil if STRING1 is less than STRING2 in lexicographic order. 453 doc: /* Return non-nil if STRING1 is less than STRING2 in lexicographic order.
438Case is significant. 454Case is significant.
@@ -468,18 +484,23 @@ Symbols are also allowed; their print names are used instead. */)
468 ptrdiff_t nb1 = SBYTES (string1); 484 ptrdiff_t nb1 = SBYTES (string1);
469 ptrdiff_t nb2 = SBYTES (string2); 485 ptrdiff_t nb2 = SBYTES (string2);
470 ptrdiff_t nb = min (nb1, nb2); 486 ptrdiff_t nb = min (nb1, nb2);
471
472 /* First compare entire machine words. (String data is allocated
473 with word alignment.) */
474 typedef size_t word_t;
475 int ws = sizeof (word_t);
476 const word_t *w1 = (const word_t *) SDATA (string1);
477 const word_t *w2 = (const word_t *) SDATA (string2);
478 ptrdiff_t b = 0; 487 ptrdiff_t b = 0;
479 while (b < nb - ws + 1 && w1[b / ws] == w2[b / ws])
480 b += ws;
481 488
482 /* Scan forward to the differing byte (at most ws-1 bytes). */ 489 /* String data is normally allocated with word alignment, but
490 there are exceptions (notably pure strings) so we restrict the
491 wordwise skipping to safe architectures. */
492 if (HAVE_FAST_UNALIGNED_ACCESS)
493 {
494 /* First compare entire machine words. */
495 typedef size_t word_t;
496 int ws = sizeof (word_t);
497 const word_t *w1 = (const word_t *) SDATA (string1);
498 const word_t *w2 = (const word_t *) SDATA (string2);
499 while (b < nb - ws + 1 && w1[b / ws] == w2[b / ws])
500 b += ws;
501 }
502
503 /* Scan forward to the differing byte. */
483 while (b < nb && SREF (string1, b) == SREF (string2, b)) 504 while (b < nb && SREF (string1, b) == SREF (string2, b))
484 b++; 505 b++;
485 506
diff --git a/src/frame.c b/src/frame.c
index 91b9bec82c3..f076a5ba54e 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -1503,17 +1503,7 @@ do_switch_frame (Lisp_Object frame, int for_deletion, Lisp_Object norecord)
1503 1503
1504 sf->select_mini_window_flag = MINI_WINDOW_P (XWINDOW (sf->selected_window)); 1504 sf->select_mini_window_flag = MINI_WINDOW_P (XWINDOW (sf->selected_window));
1505 1505
1506 selected_frame = frame; 1506 move_minibuffers_onto_frame (sf, frame, for_deletion);
1507
1508 move_minibuffers_onto_frame (sf, for_deletion);
1509
1510 if (f->select_mini_window_flag
1511 && !NILP (Fminibufferp (XWINDOW (f->minibuffer_window)->contents, Qt)))
1512 f->selected_window = f->minibuffer_window;
1513 f->select_mini_window_flag = false;
1514
1515 if (! FRAME_MINIBUF_ONLY_P (XFRAME (selected_frame)))
1516 last_nonminibuf_frame = XFRAME (selected_frame);
1517 1507
1518 /* If the selected window in the target frame is its mini-window, we move 1508 /* If the selected window in the target frame is its mini-window, we move
1519 to a different window, the most recently used one, unless there is a 1509 to a different window, the most recently used one, unless there is a
@@ -1528,6 +1518,20 @@ do_switch_frame (Lisp_Object frame, int for_deletion, Lisp_Object norecord)
1528 Fset_frame_selected_window (frame, w, Qnil); 1518 Fset_frame_selected_window (frame, w, Qnil);
1529 } 1519 }
1530 1520
1521 /* After setting `selected_frame`, we're temporarily in an inconsistent
1522 state where (selected-window) != (frame-selected-window). Until this
1523 invariant is restored we should be very careful not to run ELisp code.
1524 (bug#58343) */
1525 selected_frame = frame;
1526
1527 if (f->select_mini_window_flag
1528 && !NILP (Fminibufferp (XWINDOW (f->minibuffer_window)->contents, Qt)))
1529 f->selected_window = f->minibuffer_window;
1530 f->select_mini_window_flag = false;
1531
1532 if (! FRAME_MINIBUF_ONLY_P (XFRAME (selected_frame)))
1533 last_nonminibuf_frame = XFRAME (selected_frame);
1534
1531 Fselect_window (f->selected_window, norecord); 1535 Fselect_window (f->selected_window, norecord);
1532 1536
1533 /* We want to make sure that the next event generates a frame-switch 1537 /* We want to make sure that the next event generates a frame-switch
@@ -2110,7 +2114,7 @@ delete_frame (Lisp_Object frame, Lisp_Object force)
2110 else 2114 else
2111 /* Ensure any minibuffers on FRAME are moved onto the selected 2115 /* Ensure any minibuffers on FRAME are moved onto the selected
2112 frame. */ 2116 frame. */
2113 move_minibuffers_onto_frame (f, true); 2117 move_minibuffers_onto_frame (f, selected_frame, true);
2114 2118
2115 /* Don't let echo_area_window to remain on a deleted frame. */ 2119 /* Don't let echo_area_window to remain on a deleted frame. */
2116 if (EQ (f->minibuffer_window, echo_area_window)) 2120 if (EQ (f->minibuffer_window, echo_area_window))
diff --git a/src/lisp.h b/src/lisp.h
index 9710dbef8d2..5f6721595c0 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -1575,10 +1575,15 @@ struct Lisp_String
1575 { 1575 {
1576 struct 1576 struct
1577 { 1577 {
1578 ptrdiff_t size; /* MSB is used as the markbit. */ 1578 /* Number of characters in string; MSB is used as the mark bit. */
1579 ptrdiff_t size_byte; /* Set to -1 for unibyte strings, 1579 ptrdiff_t size;
1580 -2 for data in rodata, 1580 /* If nonnegative, number of bytes in the string (which is multibyte).
1581 -3 for immovable unibyte strings. */ 1581 If negative, the string is unibyte:
1582 -1 for data normally allocated
1583 -2 for data in rodata (C string constants)
1584 -3 for data that must be immovable (used for bytecode) */
1585 ptrdiff_t size_byte;
1586
1582 INTERVAL intervals; /* Text properties in this string. */ 1587 INTERVAL intervals; /* Text properties in this string. */
1583 unsigned char *data; 1588 unsigned char *data;
1584 } s; 1589 } s;
@@ -4787,7 +4792,7 @@ extern void clear_regexp_cache (void);
4787 4792
4788extern Lisp_Object Vminibuffer_list; 4793extern Lisp_Object Vminibuffer_list;
4789extern Lisp_Object last_minibuf_string; 4794extern Lisp_Object last_minibuf_string;
4790extern void move_minibuffers_onto_frame (struct frame *, bool); 4795extern void move_minibuffers_onto_frame (struct frame *, Lisp_Object, bool);
4791extern bool is_minibuffer (EMACS_INT, Lisp_Object); 4796extern bool is_minibuffer (EMACS_INT, Lisp_Object);
4792extern EMACS_INT this_minibuffer_depth (Lisp_Object); 4797extern EMACS_INT this_minibuffer_depth (Lisp_Object);
4793extern EMACS_INT minibuf_level; 4798extern EMACS_INT minibuf_level;
diff --git a/src/minibuf.c b/src/minibuf.c
index bedc5644807..3f34b1b0834 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -187,13 +187,15 @@ zip_minibuffer_stacks (Lisp_Object dest_window, Lisp_Object source_window)
187 187
188/* If `minibuffer_follows_selected_frame' is t, or we're about to 188/* If `minibuffer_follows_selected_frame' is t, or we're about to
189 delete a frame which potentially "contains" minibuffers, move them 189 delete a frame which potentially "contains" minibuffers, move them
190 from the old frame to the selected frame. This function is 190 from the old frame to the to-be-selected frame. This function is
191 intended to be called from `do_switch_frame' in frame.c. OF is the 191 intended to be called from `do_switch_frame' in frame.c. OF is the
192 old frame, FOR_DELETION is true if OF is about to be deleted. */ 192 old frame, FRAME is the to-be-selected frame, and FOR_DELETION is true
193 if OF is about to be deleted. */
193void 194void
194move_minibuffers_onto_frame (struct frame *of, bool for_deletion) 195move_minibuffers_onto_frame (struct frame *of, Lisp_Object frame,
196 bool for_deletion)
195{ 197{
196 struct frame *f = XFRAME (selected_frame); 198 struct frame *f = XFRAME (frame);
197 199
198 minibuf_window = f->minibuffer_window; 200 minibuf_window = f->minibuffer_window;
199 if (!(minibuf_level 201 if (!(minibuf_level
@@ -206,7 +208,7 @@ move_minibuffers_onto_frame (struct frame *of, bool for_deletion)
206 { 208 {
207 zip_minibuffer_stacks (f->minibuffer_window, of->minibuffer_window); 209 zip_minibuffer_stacks (f->minibuffer_window, of->minibuffer_window);
208 if (for_deletion && XFRAME (MB_frame) != of) 210 if (for_deletion && XFRAME (MB_frame) != of)
209 MB_frame = selected_frame; 211 MB_frame = frame;
210 } 212 }
211} 213}
212 214
diff --git a/src/nsterm.m b/src/nsterm.m
index 82fe58e90ec..1fc72d83f66 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -2479,7 +2479,7 @@ get_keysym_name (int keysym)
2479{ 2479{
2480 static char value[16]; 2480 static char value[16];
2481 NSTRACE ("get_keysym_name"); 2481 NSTRACE ("get_keysym_name");
2482 sprintf (value, "%d", keysym); 2482 snprintf (value, 16, "%d", keysym);
2483 return value; 2483 return value;
2484} 2484}
2485 2485
@@ -4263,7 +4263,7 @@ ns_draw_glyphless_glyph_string_foreground (struct glyph_string *s)
4263 { 4263 {
4264 unsigned int ch = glyph->u.glyphless.ch; 4264 unsigned int ch = glyph->u.glyphless.ch;
4265 eassume (ch <= MAX_CHAR); 4265 eassume (ch <= MAX_CHAR);
4266 sprintf (buf, "%0*X", ch < 0x10000 ? 4 : 6, ch); 4266 snprintf (buf, 7, "%0*X", ch < 0x10000 ? 4 : 6, ch);
4267 str = buf; 4267 str = buf;
4268 } 4268 }
4269 4269
@@ -6116,17 +6116,20 @@ ns_term_shutdown (int sig)
6116 6116
6117- (void) terminate: (id)sender 6117- (void) terminate: (id)sender
6118{ 6118{
6119 struct input_event ie;
6120 struct frame *f;
6121
6119 NSTRACE ("[EmacsApp terminate:]"); 6122 NSTRACE ("[EmacsApp terminate:]");
6120 6123
6121 struct frame *emacsframe = SELECTED_FRAME (); 6124 f = SELECTED_FRAME ();
6125 EVENT_INIT (ie);
6122 6126
6123 if (!emacs_event) 6127 ie.kind = NS_NONKEY_EVENT;
6124 return; 6128 ie.code = KEY_NS_POWER_OFF;
6129 ie.arg = Qt; /* mark as non-key event */
6130 XSETFRAME (ie.frame_or_window, f);
6125 6131
6126 emacs_event->kind = NS_NONKEY_EVENT; 6132 kbd_buffer_store_event (&ie);
6127 emacs_event->code = KEY_NS_POWER_OFF;
6128 emacs_event->arg = Qt; /* mark as non-key event */
6129 EV_TRAILER ((id)nil);
6130} 6133}
6131 6134
6132static bool 6135static bool
@@ -8593,7 +8596,7 @@ ns_create_font_panel_buttons (id target, SEL select, SEL cancel_action)
8593 EmacsLayer *layer = (EmacsLayer *)[self layer]; 8596 EmacsLayer *layer = (EmacsLayer *)[self layer];
8594 8597
8595 [layer setContentsScale:[[notification object] backingScaleFactor]]; 8598 [layer setContentsScale:[[notification object] backingScaleFactor]];
8596 [layer setColorSpace:[[[notification object] colorSpace] CGColorSpace]]; 8599 [layer setColorSpace:[(id) [[notification object] colorSpace] CGColorSpace]];
8597 8600
8598 ns_clear_frame (emacsframe); 8601 ns_clear_frame (emacsframe);
8599 expose_frame (emacsframe, 0, 0, NSWidth (frame), NSHeight (frame)); 8602 expose_frame (emacsframe, 0, 0, NSWidth (frame), NSHeight (frame));
diff --git a/src/pdumper.c b/src/pdumper.c
index 903298f17d2..5e6ccd9bd88 100644
--- a/src/pdumper.c
+++ b/src/pdumper.c
@@ -2067,7 +2067,7 @@ dump_interval_tree (struct dump_context *ctx,
2067static dump_off 2067static dump_off
2068dump_string (struct dump_context *ctx, const struct Lisp_String *string) 2068dump_string (struct dump_context *ctx, const struct Lisp_String *string)
2069{ 2069{
2070#if CHECK_STRUCTS && !defined (HASH_Lisp_String_C2CAF90352) 2070#if CHECK_STRUCTS && !defined (HASH_Lisp_String_03B2DF1C8E)
2071# error "Lisp_String changed. See CHECK_STRUCTS comment in config.h." 2071# error "Lisp_String changed. See CHECK_STRUCTS comment in config.h."
2072#endif 2072#endif
2073 /* If we have text properties, write them _after_ the string so that 2073 /* If we have text properties, write them _after_ the string so that
diff --git a/src/sqlite.c b/src/sqlite.c
index 54bfb7b6c61..1526e344e53 100644
--- a/src/sqlite.c
+++ b/src/sqlite.c
@@ -51,6 +51,7 @@ DEF_DLL_FN (SQLITE_API int, sqlite3_bind_double, (sqlite3_stmt*, int, double));
51DEF_DLL_FN (SQLITE_API int, sqlite3_bind_null, (sqlite3_stmt*, int)); 51DEF_DLL_FN (SQLITE_API int, sqlite3_bind_null, (sqlite3_stmt*, int));
52DEF_DLL_FN (SQLITE_API int, sqlite3_bind_int, (sqlite3_stmt*, int, int)); 52DEF_DLL_FN (SQLITE_API int, sqlite3_bind_int, (sqlite3_stmt*, int, int));
53DEF_DLL_FN (SQLITE_API const char*, sqlite3_errmsg, (sqlite3*)); 53DEF_DLL_FN (SQLITE_API const char*, sqlite3_errmsg, (sqlite3*));
54DEF_DLL_FN (SQLITE_API const char*, sqlite3_errstr, (int));
54DEF_DLL_FN (SQLITE_API int, sqlite3_step, (sqlite3_stmt*)); 55DEF_DLL_FN (SQLITE_API int, sqlite3_step, (sqlite3_stmt*));
55DEF_DLL_FN (SQLITE_API int, sqlite3_changes, (sqlite3*)); 56DEF_DLL_FN (SQLITE_API int, sqlite3_changes, (sqlite3*));
56DEF_DLL_FN (SQLITE_API int, sqlite3_column_count, (sqlite3_stmt*)); 57DEF_DLL_FN (SQLITE_API int, sqlite3_column_count, (sqlite3_stmt*));
@@ -88,6 +89,7 @@ DEF_DLL_FN (SQLITE_API int, sqlite3_load_extension,
88# undef sqlite3_bind_null 89# undef sqlite3_bind_null
89# undef sqlite3_bind_int 90# undef sqlite3_bind_int
90# undef sqlite3_errmsg 91# undef sqlite3_errmsg
92# undef sqlite3_errstr
91# undef sqlite3_step 93# undef sqlite3_step
92# undef sqlite3_changes 94# undef sqlite3_changes
93# undef sqlite3_column_count 95# undef sqlite3_column_count
@@ -112,6 +114,7 @@ DEF_DLL_FN (SQLITE_API int, sqlite3_load_extension,
112# define sqlite3_bind_null fn_sqlite3_bind_null 114# define sqlite3_bind_null fn_sqlite3_bind_null
113# define sqlite3_bind_int fn_sqlite3_bind_int 115# define sqlite3_bind_int fn_sqlite3_bind_int
114# define sqlite3_errmsg fn_sqlite3_errmsg 116# define sqlite3_errmsg fn_sqlite3_errmsg
117# define sqlite3_errstr fn_sqlite3_errstr
115# define sqlite3_step fn_sqlite3_step 118# define sqlite3_step fn_sqlite3_step
116# define sqlite3_changes fn_sqlite3_changes 119# define sqlite3_changes fn_sqlite3_changes
117# define sqlite3_column_count fn_sqlite3_column_count 120# define sqlite3_column_count fn_sqlite3_column_count
@@ -139,6 +142,7 @@ load_dll_functions (HMODULE library)
139 LOAD_DLL_FN (library, sqlite3_bind_null); 142 LOAD_DLL_FN (library, sqlite3_bind_null);
140 LOAD_DLL_FN (library, sqlite3_bind_int); 143 LOAD_DLL_FN (library, sqlite3_bind_int);
141 LOAD_DLL_FN (library, sqlite3_errmsg); 144 LOAD_DLL_FN (library, sqlite3_errmsg);
145 LOAD_DLL_FN (library, sqlite3_errstr);
142 LOAD_DLL_FN (library, sqlite3_step); 146 LOAD_DLL_FN (library, sqlite3_step);
143 LOAD_DLL_FN (library, sqlite3_changes); 147 LOAD_DLL_FN (library, sqlite3_changes);
144 LOAD_DLL_FN (library, sqlite3_column_count); 148 LOAD_DLL_FN (library, sqlite3_column_count);
@@ -373,72 +377,6 @@ bind_values (sqlite3 *db, sqlite3_stmt *stmt, Lisp_Object values)
373 return NULL; 377 return NULL;
374} 378}
375 379
376DEFUN ("sqlite-execute", Fsqlite_execute, Ssqlite_execute, 2, 3, 0,
377 doc: /* Execute a non-select SQL statement.
378If VALUES is non-nil, it should be a vector or a list of values
379to bind when executing a statement like
380
381 insert into foo values (?, ?, ...)
382
383Value is the number of affected rows. */)
384 (Lisp_Object db, Lisp_Object query, Lisp_Object values)
385{
386 check_sqlite (db, false);
387 CHECK_STRING (query);
388 if (!(NILP (values) || CONSP (values) || VECTORP (values)))
389 xsignal1 (Qerror, build_string ("VALUES must be a list or a vector"));
390
391 sqlite3 *sdb = XSQLITE (db)->db;
392 Lisp_Object retval = Qnil;
393 const char *errmsg = NULL;
394 Lisp_Object encoded = encode_string (query);
395 sqlite3_stmt *stmt = NULL;
396
397 /* We only execute the first statement -- if there's several
398 (separated by a semicolon), the subsequent statements won't be
399 done. */
400 int ret = sqlite3_prepare_v2 (sdb, SSDATA (encoded), -1, &stmt, NULL);
401 if (ret != SQLITE_OK)
402 {
403 if (stmt != NULL)
404 {
405 sqlite3_finalize (stmt);
406 sqlite3_reset (stmt);
407 }
408
409 errmsg = sqlite3_errmsg (sdb);
410 goto exit;
411 }
412
413 /* Bind ? values. */
414 if (!NILP (values)) {
415 const char *err = bind_values (sdb, stmt, values);
416 if (err != NULL)
417 {
418 errmsg = err;
419 goto exit;
420 }
421 }
422
423 ret = sqlite3_step (stmt);
424 sqlite3_finalize (stmt);
425 if (ret != SQLITE_OK && ret != SQLITE_DONE)
426 {
427 errmsg = sqlite3_errmsg (sdb);
428 goto exit;
429 }
430
431 retval = make_fixnum (sqlite3_changes (sdb));
432
433 exit:
434 if (errmsg != NULL)
435 xsignal1 (ret == SQLITE_LOCKED || ret == SQLITE_BUSY?
436 Qsqlite_locked_error: Qerror,
437 build_string (errmsg));
438
439 return retval;
440}
441
442static Lisp_Object 380static Lisp_Object
443row_to_value (sqlite3_stmt *stmt) 381row_to_value (sqlite3_stmt *stmt)
444{ 382{
@@ -484,6 +422,94 @@ row_to_value (sqlite3_stmt *stmt)
484} 422}
485 423
486static Lisp_Object 424static Lisp_Object
425sqlite_prepare_errmsg (int code, sqlite3 *sdb)
426{
427 Lisp_Object errmsg = build_string (sqlite3_errstr (code));
428 /* More details about what went wrong. */
429 const char *sql_error = sqlite3_errmsg (sdb);
430 if (sql_error)
431 return CALLN (Fformat, build_string ("%s (%s)"),
432 errmsg, build_string (sql_error));
433 else
434 return errmsg;
435}
436
437DEFUN ("sqlite-execute", Fsqlite_execute, Ssqlite_execute, 2, 3, 0,
438 doc: /* Execute a non-select SQL statement.
439If VALUES is non-nil, it should be a vector or a list of values
440to bind when executing a statement like
441
442 insert into foo values (?, ?, ...)
443
444Value is the number of affected rows. */)
445 (Lisp_Object db, Lisp_Object query, Lisp_Object values)
446{
447 check_sqlite (db, false);
448 CHECK_STRING (query);
449 if (!(NILP (values) || CONSP (values) || VECTORP (values)))
450 xsignal1 (Qerror, build_string ("VALUES must be a list or a vector"));
451
452 sqlite3 *sdb = XSQLITE (db)->db;
453 Lisp_Object errmsg = Qnil,
454 encoded = encode_string (query);
455 sqlite3_stmt *stmt = NULL;
456
457 /* We only execute the first statement -- if there's several
458 (separated by a semicolon), the subsequent statements won't be
459 done. */
460 int ret = sqlite3_prepare_v2 (sdb, SSDATA (encoded), -1, &stmt, NULL);
461 if (ret != SQLITE_OK)
462 {
463 if (stmt != NULL)
464 {
465 sqlite3_finalize (stmt);
466 sqlite3_reset (stmt);
467 }
468
469 errmsg = sqlite_prepare_errmsg (ret, sdb);
470 goto exit;
471 }
472
473 /* Bind ? values. */
474 if (!NILP (values))
475 {
476 const char *err = bind_values (sdb, stmt, values);
477 if (err != NULL)
478 {
479 errmsg = build_string (err);
480 goto exit;
481 }
482 }
483
484 ret = sqlite3_step (stmt);
485
486 if (ret == SQLITE_ROW)
487 {
488 Lisp_Object data = Qnil;
489 do
490 data = Fcons (row_to_value (stmt), data);
491 while (sqlite3_step (stmt) == SQLITE_ROW);
492
493 sqlite3_finalize (stmt);
494 return Fnreverse (data);
495 }
496 else if (ret == SQLITE_OK || ret == SQLITE_DONE)
497 {
498 Lisp_Object rows = make_fixnum (sqlite3_changes (sdb));
499 sqlite3_finalize (stmt);
500 return rows;
501 }
502 else
503 errmsg = build_string (sqlite3_errmsg (sdb));
504
505 exit:
506 sqlite3_finalize (stmt);
507 xsignal1 (ret == SQLITE_LOCKED || ret == SQLITE_BUSY?
508 Qsqlite_locked_error: Qerror,
509 errmsg);
510}
511
512static Lisp_Object
487column_names (sqlite3_stmt *stmt) 513column_names (sqlite3_stmt *stmt)
488{ 514{
489 Lisp_Object columns = Qnil; 515 Lisp_Object columns = Qnil;
@@ -517,9 +543,8 @@ which means that we return a set object that can be queried with
517 xsignal1 (Qerror, build_string ("VALUES must be a list or a vector")); 543 xsignal1 (Qerror, build_string ("VALUES must be a list or a vector"));
518 544
519 sqlite3 *sdb = XSQLITE (db)->db; 545 sqlite3 *sdb = XSQLITE (db)->db;
520 Lisp_Object retval = Qnil; 546 Lisp_Object retval = Qnil, errmsg = Qnil,
521 const char *errmsg = NULL; 547 encoded = encode_string (query);
522 Lisp_Object encoded = encode_string (query);
523 548
524 sqlite3_stmt *stmt = NULL; 549 sqlite3_stmt *stmt = NULL;
525 int ret = sqlite3_prepare_v2 (sdb, SSDATA (encoded), SBYTES (encoded), 550 int ret = sqlite3_prepare_v2 (sdb, SSDATA (encoded), SBYTES (encoded),
@@ -528,7 +553,7 @@ which means that we return a set object that can be queried with
528 { 553 {
529 if (stmt) 554 if (stmt)
530 sqlite3_finalize (stmt); 555 sqlite3_finalize (stmt);
531 556 errmsg = sqlite_prepare_errmsg (ret, sdb);
532 goto exit; 557 goto exit;
533 } 558 }
534 559
@@ -539,7 +564,7 @@ which means that we return a set object that can be queried with
539 if (err != NULL) 564 if (err != NULL)
540 { 565 {
541 sqlite3_finalize (stmt); 566 sqlite3_finalize (stmt);
542 errmsg = err; 567 errmsg = build_string (err);
543 goto exit; 568 goto exit;
544 } 569 }
545 } 570 }
@@ -553,7 +578,7 @@ which means that we return a set object that can be queried with
553 578
554 /* Return the data directly. */ 579 /* Return the data directly. */
555 Lisp_Object data = Qnil; 580 Lisp_Object data = Qnil;
556 while ((ret = sqlite3_step (stmt)) == SQLITE_ROW) 581 while (sqlite3_step (stmt) == SQLITE_ROW)
557 data = Fcons (row_to_value (stmt), data); 582 data = Fcons (row_to_value (stmt), data);
558 583
559 if (EQ (return_type, Qfull)) 584 if (EQ (return_type, Qfull))
@@ -563,8 +588,8 @@ which means that we return a set object that can be queried with
563 sqlite3_finalize (stmt); 588 sqlite3_finalize (stmt);
564 589
565 exit: 590 exit:
566 if (errmsg != NULL) 591 if (! NILP (errmsg))
567 xsignal1 (Qerror, build_string (errmsg)); 592 xsignal1 (Qerror, errmsg);
568 593
569 return retval; 594 return retval;
570} 595}
diff --git a/src/sysdep.c b/src/sysdep.c
index abb385d1388..736723bdf3d 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -2432,7 +2432,7 @@ emacs_pipe (int fd[2])
2432 2432
2433/* Approximate posix_close and POSIX_CLOSE_RESTART well enough for Emacs. 2433/* Approximate posix_close and POSIX_CLOSE_RESTART well enough for Emacs.
2434 For the background behind this mess, please see Austin Group defect 529 2434 For the background behind this mess, please see Austin Group defect 529
2435 <http://austingroupbugs.net/view.php?id=529>. */ 2435 <https://austingroupbugs.net/view.php?id=529>. */
2436 2436
2437#ifndef POSIX_CLOSE_RESTART 2437#ifndef POSIX_CLOSE_RESTART
2438# define POSIX_CLOSE_RESTART 1 2438# define POSIX_CLOSE_RESTART 1
diff --git a/src/widget.c b/src/widget.c
index 5a75cdaca8e..aaab33b6d8e 100644
--- a/src/widget.c
+++ b/src/widget.c
@@ -195,7 +195,7 @@ round_size_to_char (EmacsFrame ew, Dimension in_width, Dimension in_height,
195 out_width, out_height); 195 out_width, out_height);
196} 196}
197 197
198static Widget 198static WMShellWidget
199get_wm_shell (Widget w) 199get_wm_shell (Widget w)
200{ 200{
201 Widget wmshell; 201 Widget wmshell;
@@ -204,7 +204,7 @@ get_wm_shell (Widget w)
204 wmshell && !XtIsWMShell (wmshell); 204 wmshell && !XtIsWMShell (wmshell);
205 wmshell = XtParent (wmshell)); 205 wmshell = XtParent (wmshell));
206 206
207 return wmshell; 207 return (WMShellWidget) wmshell;
208} 208}
209 209
210#if 0 /* Currently not used. */ 210#if 0 /* Currently not used. */
@@ -269,8 +269,8 @@ set_frame_size (EmacsFrame ew)
269 (f, build_string ("set_frame_size")); 269 (f, build_string ("set_frame_size"));
270} 270}
271 271
272static void 272static bool
273update_wm_hints (Widget wmshell, EmacsFrame ew) 273update_wm_hints (WMShellWidget wmshell, EmacsFrame ew)
274{ 274{
275 int cw; 275 int cw;
276 int ch; 276 int ch;
@@ -280,6 +280,12 @@ update_wm_hints (Widget wmshell, EmacsFrame ew)
280 int char_height; 280 int char_height;
281 int base_width; 281 int base_width;
282 int base_height; 282 int base_height;
283 char buffer[sizeof wmshell->wm.size_hints];
284 char *hints_ptr;
285
286 /* Copy the old size hints to the buffer. */
287 memcpy (buffer, &wmshell->wm.size_hints,
288 sizeof wmshell->wm.size_hints);
283 289
284 pixel_to_char_size (ew, ew->core.width, ew->core.height, 290 pixel_to_char_size (ew, ew->core.width, ew->core.height,
285 &char_width, &char_height); 291 &char_width, &char_height);
@@ -292,27 +298,29 @@ update_wm_hints (Widget wmshell, EmacsFrame ew)
292 base_height = (wmshell->core.height - ew->core.height 298 base_height = (wmshell->core.height - ew->core.height
293 + (rounded_height - (char_height * ch))); 299 + (rounded_height - (char_height * ch)));
294 300
295 /* Ensure that Xt actually sets window manager hint flags specified 301 XtVaSetValues ((Widget) wmshell,
296 by the caller by making sure XtNminWidth (a relatively harmless
297 resource) always changes each time this function is invoked. */
298 ew->emacs_frame.size_switch = !ew->emacs_frame.size_switch;
299
300 XtVaSetValues (wmshell,
301 XtNbaseWidth, (XtArgVal) base_width, 302 XtNbaseWidth, (XtArgVal) base_width,
302 XtNbaseHeight, (XtArgVal) base_height, 303 XtNbaseHeight, (XtArgVal) base_height,
303 XtNwidthInc, (XtArgVal) (frame_resize_pixelwise ? 1 : cw), 304 XtNwidthInc, (XtArgVal) (frame_resize_pixelwise ? 1 : cw),
304 XtNheightInc, (XtArgVal) (frame_resize_pixelwise ? 1 : ch), 305 XtNheightInc, (XtArgVal) (frame_resize_pixelwise ? 1 : ch),
305 XtNminWidth, (XtArgVal) (base_width 306 XtNminWidth, (XtArgVal) base_width,
306 + ew->emacs_frame.size_switch), 307 XtNminHeight, (XtArgVal) base_height,
307 XtNminHeight, (XtArgVal) (base_height
308 + ew->emacs_frame.size_switch),
309 NULL); 308 NULL);
309
310 /* Return if size hints really changed. If they did not, then Xt
311 probably didn't set them either (or take the flags into
312 account.) */
313 hints_ptr = (char *) &wmshell->wm.size_hints;
314
315 /* Skip flags, which is unsigned long. */
316 return memcmp (hints_ptr + sizeof (long), buffer + sizeof (long),
317 sizeof wmshell->wm.wm_hints - sizeof (long));
310} 318}
311 319
312void 320bool
313widget_update_wm_size_hints (Widget widget, Widget frame) 321widget_update_wm_size_hints (Widget widget, Widget frame)
314{ 322{
315 update_wm_hints (widget, (EmacsFrame) frame); 323 return update_wm_hints ((WMShellWidget) widget, (EmacsFrame) frame);
316} 324}
317 325
318static void 326static void
@@ -357,8 +365,6 @@ EmacsFrameInitialize (Widget request, Widget new,
357 exit (1); 365 exit (1);
358 } 366 }
359 367
360 ew->emacs_frame.size_switch = 1;
361
362 update_from_various_frame_slots (ew); 368 update_from_various_frame_slots (ew);
363 set_frame_size (ew); 369 set_frame_size (ew);
364} 370}
diff --git a/src/widget.h b/src/widget.h
index 2906d5ff9ec..cf83cb10781 100644
--- a/src/widget.h
+++ b/src/widget.h
@@ -97,6 +97,6 @@ extern struct _DisplayContext *display_context;
97/* Special entry points */ 97/* Special entry points */
98void EmacsFrameSetCharSize (Widget, int, int); 98void EmacsFrameSetCharSize (Widget, int, int);
99void widget_store_internal_border (Widget widget); 99void widget_store_internal_border (Widget widget);
100void widget_update_wm_size_hints (Widget widget, Widget frame); 100bool widget_update_wm_size_hints (Widget widget, Widget frame);
101 101
102#endif /* _EmacsFrame_h */ 102#endif /* _EmacsFrame_h */
diff --git a/src/widgetprv.h b/src/widgetprv.h
index fe960326b03..3a4d9206ffe 100644
--- a/src/widgetprv.h
+++ b/src/widgetprv.h
@@ -49,9 +49,6 @@ typedef struct {
49 49
50 Boolean visual_bell; /* flash instead of beep */ 50 Boolean visual_bell; /* flash instead of beep */
51 int bell_volume; /* how loud is beep */ 51 int bell_volume; /* how loud is beep */
52 int size_switch; /* hack to make setting size
53 hints work correctly */
54
55 /* private state */ 52 /* private state */
56 53
57} EmacsFramePart; 54} EmacsFramePart;
diff --git a/src/window.c b/src/window.c
index da80fabe33f..4e8b352e164 100644
--- a/src/window.c
+++ b/src/window.c
@@ -52,6 +52,7 @@ static ptrdiff_t get_leaf_windows (struct window *, struct window **,
52 ptrdiff_t); 52 ptrdiff_t);
53static void window_scroll_pixel_based (Lisp_Object, int, bool, bool); 53static void window_scroll_pixel_based (Lisp_Object, int, bool, bool);
54static void window_scroll_line_based (Lisp_Object, int, bool, bool); 54static void window_scroll_line_based (Lisp_Object, int, bool, bool);
55static void window_scroll_for_long_lines (struct window *, int, bool);
55static void foreach_window (struct frame *, 56static void foreach_window (struct frame *,
56 bool (* fn) (struct window *, void *), 57 bool (* fn) (struct window *, void *),
57 void *); 58 void *);
@@ -5536,19 +5537,40 @@ window_internal_height (struct window *w)
5536static void 5537static void
5537window_scroll (Lisp_Object window, EMACS_INT n, bool whole, bool noerror) 5538window_scroll (Lisp_Object window, EMACS_INT n, bool whole, bool noerror)
5538{ 5539{
5540 struct window *w = XWINDOW (window);
5541 struct buffer *b = XBUFFER (w->contents);
5542 bool long_lines_truncated =
5543 b->long_line_optimizations_p && !NILP (BVAR (b, truncate_lines));
5539 specpdl_ref count = SPECPDL_INDEX (); 5544 specpdl_ref count = SPECPDL_INDEX ();
5540 5545
5541 n = clip_to_bounds (INT_MIN, n, INT_MAX); 5546 n = clip_to_bounds (INT_MIN, n, INT_MAX);
5542 5547
5543 wset_redisplay (XWINDOW (window)); 5548 wset_redisplay (w);
5544 5549
5545 if (whole && fast_but_imprecise_scrolling) 5550 /* Does this window's buffer have very long and truncated lines? */
5551 if (b->long_line_optimizations_p
5552 && !long_lines_truncated
5553 && !NILP (Vtruncate_partial_width_windows)
5554 && w->total_cols < FRAME_COLS (XFRAME (WINDOW_FRAME (w))))
5555 {
5556 if (FIXNUMP (Vtruncate_partial_width_windows))
5557 long_lines_truncated =
5558 w->total_cols < XFIXNAT (Vtruncate_partial_width_windows);
5559 else
5560 long_lines_truncated = true;
5561 }
5562
5563 if (whole && (fast_but_imprecise_scrolling || long_lines_truncated))
5546 specbind (Qfontification_functions, Qnil); 5564 specbind (Qfontification_functions, Qnil);
5547 5565
5548 /* On GUI frames, use the pixel-based version which is much slower 5566 if (whole && long_lines_truncated)
5549 than the line-based one but can handle varying line heights. */ 5567 window_scroll_for_long_lines (w, n, noerror);
5550 if (FRAME_WINDOW_P (XFRAME (XWINDOW (window)->frame))) 5568 else if (FRAME_WINDOW_P (XFRAME (XWINDOW (window)->frame)))
5551 { 5569 {
5570
5571 /* On GUI frames, use the pixel-based version which is much
5572 slower than the line-based one, but can handle varying
5573 line heights. */
5552 record_unwind_protect_void (unwind_display_working_on_window); 5574 record_unwind_protect_void (unwind_display_working_on_window);
5553 display_working_on_window_p = true; 5575 display_working_on_window_p = true;
5554 window_scroll_pixel_based (window, n, whole, noerror); 5576 window_scroll_pixel_based (window, n, whole, noerror);
@@ -5598,6 +5620,71 @@ sanitize_next_screen_context_lines (void)
5598 return clip_to_bounds (0, next_screen_context_lines, 1000000); 5620 return clip_to_bounds (0, next_screen_context_lines, 1000000);
5599} 5621}
5600 5622
5623/* Implementation of window_scroll for very long and truncated lines.
5624 This is a simplified version, it only handles WHOLE window scrolls,
5625 and doesn't honor scroll-preserve-screen-position nor scroll-margin. */
5626static void
5627window_scroll_for_long_lines (struct window *w, int n, bool noerror)
5628{
5629 ptrdiff_t startpos = marker_position (w->start);
5630 ptrdiff_t startbyte = marker_byte_position (w->start);
5631 int nscls = sanitize_next_screen_context_lines ();
5632 register int ht = window_internal_height (w);
5633
5634 n *= max (1, ht - nscls);
5635
5636 /* If point is not visible in window, bring it inside window. */
5637 struct position pos;
5638 int rtop, rbot, dummy_rowh, dummy_vpos, dummy_x, dummy_y;
5639 if (!(PT >= startpos
5640 && PT <= ZV
5641 && startpos <= ZV
5642 && pos_visible_p (w, PT, &dummy_x, &dummy_y, &rtop, &rbot, &dummy_rowh,
5643 &dummy_vpos)
5644 && !rtop && !rbot))
5645 {
5646 pos = *vmotion (PT, PT_BYTE, - (ht / 2), w);
5647 startpos = pos.bufpos;
5648 startbyte = pos.bytepos;
5649 }
5650 SET_PT_BOTH (startpos, startbyte);
5651
5652 bool lose = n < 0 && PT == BEGV;
5653 pos = *vmotion (PT, PT_BYTE, n, w);
5654 if (lose)
5655 {
5656 if (noerror)
5657 return;
5658 else
5659 xsignal0 (Qbeginning_of_buffer);
5660 }
5661
5662 bool bolp = pos.bufpos == BEGV || FETCH_BYTE (pos.bytepos - 1) == '\n';
5663 if (pos.bufpos < ZV)
5664 {
5665 set_marker_restricted_both (w->start, w->contents,
5666 pos.bufpos, pos.bytepos);
5667 w->start_at_line_beg = bolp;
5668 wset_update_mode_line (w);
5669 /* Set force_start so that redisplay_window will run
5670 the window-scroll-functions. */
5671 w->force_start = true;
5672 SET_PT_BOTH (pos.bufpos, pos.bytepos);
5673 if (n > 0)
5674 pos = *vmotion (PT, PT_BYTE, ht / 2, w);
5675 else if (n < 0)
5676 pos = *vmotion (PT, PT_BYTE, - (ht / 2), w);
5677 SET_PT_BOTH (pos.bufpos, pos.bytepos);
5678 }
5679 else
5680 {
5681 if (noerror)
5682 return;
5683 else
5684 xsignal0 (Qend_of_buffer);
5685 }
5686}
5687
5601/* Implementation of window_scroll that works based on pixel line 5688/* Implementation of window_scroll that works based on pixel line
5602 heights. See the comment of window_scroll for parameter 5689 heights. See the comment of window_scroll for parameter
5603 descriptions. */ 5690 descriptions. */
diff --git a/src/xdisp.c b/src/xdisp.c
index 9534e27843e..e390de6a336 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -20165,7 +20165,20 @@ redisplay_window (Lisp_Object window, bool just_this_one_p)
20165 from point. */ 20165 from point. */
20166 centering_position = window_box_height (w) / 2; 20166 centering_position = window_box_height (w) / 2;
20167 } 20167 }
20168 move_it_vertically_backward (&it, centering_position); 20168 if (current_buffer->long_line_optimizations_p
20169 && it.line_wrap == TRUNCATE)
20170 {
20171 /* For very long and truncated lines, go back using a simplified
20172 method, which ignored any inaccuracies due to line-height
20173 differences, display properties/overlays, etc. */
20174 int nlines = centering_position / frame_line_height;
20175
20176 while (nlines-- && IT_CHARPOS (it) > BEGV)
20177 back_to_previous_visible_line_start (&it);
20178 reseat_1 (&it, it.current.pos, true);
20179 }
20180 else
20181 move_it_vertically_backward (&it, centering_position);
20169 20182
20170 eassert (IT_CHARPOS (it) >= BEGV); 20183 eassert (IT_CHARPOS (it) >= BEGV);
20171 20184
diff --git a/src/xfns.c b/src/xfns.c
index 8cea93c6698..91124488994 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -4179,11 +4179,15 @@ x_window (struct frame *f)
4179 { 4179 {
4180 /* XIM server might require some X events. */ 4180 /* XIM server might require some X events. */
4181 unsigned long fevent = NoEventMask; 4181 unsigned long fevent = NoEventMask;
4182 XGetICValues (FRAME_XIC (f), XNFilterEvents, &fevent, NULL); 4182
4183 attributes.event_mask |= fevent; 4183 if (fevent)
4184 attribute_mask = CWEventMask; 4184 {
4185 XChangeWindowAttributes (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 4185 XGetICValues (FRAME_XIC (f), XNFilterEvents, &fevent, NULL);
4186 attribute_mask, &attributes); 4186 attributes.event_mask |= fevent;
4187 attribute_mask = CWEventMask;
4188 XChangeWindowAttributes (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
4189 attribute_mask, &attributes);
4190 }
4187 } 4191 }
4188 } 4192 }
4189#endif /* HAVE_X_I18N */ 4193#endif /* HAVE_X_I18N */
diff --git a/src/xterm.c b/src/xterm.c
index aaf2e7988be..d35af7a8de2 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -1425,9 +1425,6 @@ struct x_client_list_window
1425 /* The width and height of the window. */ 1425 /* The width and height of the window. */
1426 int width, height; 1426 int width, height;
1427 1427
1428 /* Whether or not the window is mapped. */
1429 bool mapped_p;
1430
1431 /* A bitmask describing events Emacs was listening for from the 1428 /* A bitmask describing events Emacs was listening for from the
1432 window before some extra events were added in 1429 window before some extra events were added in
1433 `x_dnd_compute_toplevels'. */ 1430 `x_dnd_compute_toplevels'. */
@@ -1439,9 +1436,6 @@ struct x_client_list_window
1439 /* The next window in this list. */ 1436 /* The next window in this list. */
1440 struct x_client_list_window *next; 1437 struct x_client_list_window *next;
1441 1438
1442 /* The Motif protocol style of this window, if any. */
1443 uint8_t xm_protocol_style;
1444
1445 /* The extents of the frame window in each direction. */ 1439 /* The extents of the frame window in each direction. */
1446 int frame_extents_left; 1440 int frame_extents_left;
1447 int frame_extents_right; 1441 int frame_extents_right;
@@ -1452,18 +1446,24 @@ struct x_client_list_window
1452 /* The border width of this window. */ 1446 /* The border width of this window. */
1453 int border_width; 1447 int border_width;
1454 1448
1455 /* The rectangles making up the input shape. */
1456 XRectangle *input_rects;
1457
1458 /* The number of rectangles composing the input shape. */ 1449 /* The number of rectangles composing the input shape. */
1459 int n_input_rects; 1450 int n_input_rects;
1460 1451
1452 /* The rectangles making up the input shape. */
1453 XRectangle *input_rects;
1454
1461 /* The rectangles making up the bounding shape. */ 1455 /* The rectangles making up the bounding shape. */
1462 XRectangle *bounding_rects; 1456 XRectangle *bounding_rects;
1463 1457
1464 /* The number of rectangles composing the bounding shape. */ 1458 /* The number of rectangles composing the bounding shape. */
1465 int n_bounding_rects; 1459 int n_bounding_rects;
1466#endif 1460#endif
1461
1462 /* The Motif protocol style of this window, if any. */
1463 uint8_t xm_protocol_style;
1464
1465 /* Whether or not the window is mapped. */
1466 bool mapped_p;
1467}; 1467};
1468 1468
1469/* List of all toplevels in stacking order, from top to bottom. */ 1469/* List of all toplevels in stacking order, from top to bottom. */
@@ -5139,24 +5139,20 @@ x_update_opaque_region (struct frame *f, XEvent *configure)
5139 if (!FRAME_DISPLAY_INFO (f)->alpha_bits) 5139 if (!FRAME_DISPLAY_INFO (f)->alpha_bits)
5140 return; 5140 return;
5141 5141
5142 block_input ();
5143 if (f->alpha_background < 1.0) 5142 if (f->alpha_background < 1.0)
5144 XChangeProperty (FRAME_X_DISPLAY (f), 5143 XChangeProperty (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
5145 FRAME_X_WINDOW (f),
5146 FRAME_DISPLAY_INFO (f)->Xatom_net_wm_opaque_region, 5144 FRAME_DISPLAY_INFO (f)->Xatom_net_wm_opaque_region,
5147 XA_CARDINAL, 32, PropModeReplace, 5145 XA_CARDINAL, 32, PropModeReplace,
5148 NULL, 0); 5146 NULL, 0);
5149#ifndef HAVE_GTK3 5147#ifndef HAVE_GTK3
5150 else 5148 else
5151 XChangeProperty (FRAME_X_DISPLAY (f), 5149 XChangeProperty (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
5152 FRAME_X_WINDOW (f),
5153 FRAME_DISPLAY_INFO (f)->Xatom_net_wm_opaque_region, 5150 FRAME_DISPLAY_INFO (f)->Xatom_net_wm_opaque_region,
5154 XA_CARDINAL, 32, PropModeReplace, 5151 XA_CARDINAL, 32, PropModeReplace,
5155 (unsigned char *) &opaque_region, 4); 5152 (unsigned char *) &opaque_region, 4);
5156#else 5153#else
5157 else if (FRAME_TOOLTIP_P (f)) 5154 else if (FRAME_TOOLTIP_P (f))
5158 XChangeProperty (FRAME_X_DISPLAY (f), 5155 XChangeProperty (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
5159 FRAME_X_WINDOW (f),
5160 FRAME_DISPLAY_INFO (f)->Xatom_net_wm_opaque_region, 5156 FRAME_DISPLAY_INFO (f)->Xatom_net_wm_opaque_region,
5161 XA_CARDINAL, 32, PropModeReplace, 5157 XA_CARDINAL, 32, PropModeReplace,
5162 (unsigned char *) &opaque_region, 4); 5158 (unsigned char *) &opaque_region, 4);
@@ -5174,7 +5170,6 @@ x_update_opaque_region (struct frame *f, XEvent *configure)
5174 } 5170 }
5175 } 5171 }
5176#endif 5172#endif
5177 unblock_input ();
5178} 5173}
5179 5174
5180 5175
@@ -7144,8 +7139,6 @@ show_back_buffer (struct frame *f)
7144 cairo_t *cr; 7139 cairo_t *cr;
7145#endif 7140#endif
7146 7141
7147 block_input ();
7148
7149 if (FRAME_X_DOUBLE_BUFFERED_P (f)) 7142 if (FRAME_X_DOUBLE_BUFFERED_P (f))
7150 { 7143 {
7151#if defined HAVE_XSYNC && !defined USE_GTK && defined HAVE_CLOCK_GETTIME 7144#if defined HAVE_XSYNC && !defined USE_GTK && defined HAVE_CLOCK_GETTIME
@@ -7174,8 +7167,6 @@ show_back_buffer (struct frame *f)
7174 } 7167 }
7175 7168
7176 FRAME_X_NEED_BUFFER_FLIP (f) = false; 7169 FRAME_X_NEED_BUFFER_FLIP (f) = false;
7177
7178 unblock_input ();
7179} 7170}
7180 7171
7181#endif 7172#endif
@@ -7283,8 +7274,12 @@ XTframe_up_to_date (struct frame *f)
7283static void 7274static void
7284XTbuffer_flipping_unblocked_hook (struct frame *f) 7275XTbuffer_flipping_unblocked_hook (struct frame *f)
7285{ 7276{
7277 block_input ();
7278
7286 if (FRAME_X_NEED_BUFFER_FLIP (f)) 7279 if (FRAME_X_NEED_BUFFER_FLIP (f))
7287 show_back_buffer (f); 7280 show_back_buffer (f);
7281
7282 unblock_input ();
7288} 7283}
7289#endif 7284#endif
7290 7285
@@ -7313,8 +7308,6 @@ x_clear_under_internal_border (struct frame *f)
7313 : INTERNAL_BORDER_FACE_ID)); 7308 : INTERNAL_BORDER_FACE_ID));
7314 struct face *face = FACE_FROM_ID_OR_NULL (f, face_id); 7309 struct face *face = FACE_FROM_ID_OR_NULL (f, face_id);
7315 7310
7316 block_input ();
7317
7318 if (face) 7311 if (face)
7319 { 7312 {
7320 unsigned long color = face->background; 7313 unsigned long color = face->background;
@@ -7335,8 +7328,6 @@ x_clear_under_internal_border (struct frame *f)
7335 x_clear_area (f, width - border, 0, border, height); 7328 x_clear_area (f, width - border, 0, border, height);
7336 x_clear_area (f, 0, height - border, width, border); 7329 x_clear_area (f, 0, height - border, width, border);
7337 } 7330 }
7338
7339 unblock_input ();
7340 } 7331 }
7341} 7332}
7342 7333
@@ -7384,7 +7375,6 @@ x_after_update_window_line (struct window *w, struct glyph_row *desired_row)
7384 : INTERNAL_BORDER_FACE_ID)); 7375 : INTERNAL_BORDER_FACE_ID));
7385 struct face *face = FACE_FROM_ID_OR_NULL (f, face_id); 7376 struct face *face = FACE_FROM_ID_OR_NULL (f, face_id);
7386 7377
7387 block_input ();
7388 if (face) 7378 if (face)
7389 { 7379 {
7390 unsigned long color = face->background; 7380 unsigned long color = face->background;
@@ -7402,7 +7392,6 @@ x_after_update_window_line (struct window *w, struct glyph_row *desired_row)
7402 x_clear_area (f, 0, y, width, height); 7392 x_clear_area (f, 0, y, width, height);
7403 x_clear_area (f, FRAME_PIXEL_WIDTH (f) - width, y, width, height); 7393 x_clear_area (f, FRAME_PIXEL_WIDTH (f) - width, y, width, height);
7404 } 7394 }
7405 unblock_input ();
7406 } 7395 }
7407 } 7396 }
7408#endif 7397#endif
@@ -7601,11 +7590,27 @@ static void x_check_font (struct frame *, struct font *);
7601 user time. We don't sanitize timestamps from events sent by the X 7590 user time. We don't sanitize timestamps from events sent by the X
7602 server itself because some Lisp might have set the user time to a 7591 server itself because some Lisp might have set the user time to a
7603 ridiculously large value, and this way a more reasonable timestamp 7592 ridiculously large value, and this way a more reasonable timestamp
7604 can be obtained upon the next event. */ 7593 can be obtained upon the next event.
7594
7595 Alternatively, the server time could've overflowed.
7596
7597 SET_PROPERTY specifies whether or not to change the user time
7598 property for the active frame. The important thing is to not set
7599 the last user time upon leave events; on Metacity and GNOME Shell,
7600 mapping a new frame on top of the old frame potentially causes
7601 crossing events to be sent to the old frame if it contains the
7602 pointer, as the new frame will initially stack above the old frame.
7603 If _NET_WM_USER_TIME is changed at that point, then GNOME may get
7604 notified about the user time change on the old frame before it
7605 tries to focus the new frame, which will make it consider the new
7606 frame (whose user time property will not have been updated at that
7607 point, due to not being focused) as having been mapped
7608 out-of-order, and lower the new frame, which is typically not what
7609 users want. */
7605 7610
7606static void 7611static void
7607x_display_set_last_user_time (struct x_display_info *dpyinfo, Time time, 7612x_display_set_last_user_time (struct x_display_info *dpyinfo, Time time,
7608 bool send_event) 7613 bool send_event, bool set_property)
7609{ 7614{
7610#if defined HAVE_XSYNC && !defined USE_GTK && defined HAVE_CLOCK_GETTIME 7615#if defined HAVE_XSYNC && !defined USE_GTK && defined HAVE_CLOCK_GETTIME
7611 uint_fast64_t monotonic_time; 7616 uint_fast64_t monotonic_time;
@@ -7678,7 +7683,8 @@ x_display_set_last_user_time (struct x_display_info *dpyinfo, Time time,
7678 7683
7679#ifndef USE_GTK 7684#ifndef USE_GTK
7680 /* Don't waste bandwidth if the time hasn't actually changed. */ 7685 /* Don't waste bandwidth if the time hasn't actually changed. */
7681 if (focus_frame && old_time != dpyinfo->last_user_time) 7686 if (focus_frame && old_time != dpyinfo->last_user_time
7687 && set_property)
7682 { 7688 {
7683 time = dpyinfo->last_user_time; 7689 time = dpyinfo->last_user_time;
7684 7690
@@ -7719,6 +7725,7 @@ x_set_gtk_user_time (struct frame *f, Time time)
7719 itself. */ 7725 itself. */
7720 7726
7721#ifndef USE_GTK 7727#ifndef USE_GTK
7728
7722static void 7729static void
7723x_update_frame_user_time_window (struct frame *f) 7730x_update_frame_user_time_window (struct frame *f)
7724{ 7731{
@@ -7782,13 +7789,14 @@ x_update_frame_user_time_window (struct frame *f)
7782 } 7789 }
7783 } 7790 }
7784} 7791}
7792
7785#endif 7793#endif
7786 7794
7787void 7795void
7788x_set_last_user_time_from_lisp (struct x_display_info *dpyinfo, 7796x_set_last_user_time_from_lisp (struct x_display_info *dpyinfo,
7789 Time time) 7797 Time time)
7790{ 7798{
7791 x_display_set_last_user_time (dpyinfo, time, true); 7799 x_display_set_last_user_time (dpyinfo, time, true, true);
7792} 7800}
7793 7801
7794 7802
@@ -9595,31 +9603,49 @@ x_draw_glyph_string_box (struct glyph_string *s)
9595 9603
9596 9604
9597#ifndef USE_CAIRO 9605#ifndef USE_CAIRO
9606
9598static void 9607static void
9599x_composite_image (struct glyph_string *s, Pixmap dest, 9608x_composite_image (struct glyph_string *s, Pixmap dest,
9609#ifdef HAVE_XRENDER
9610 Picture destination,
9611#endif
9600 int srcX, int srcY, int dstX, int dstY, 9612 int srcX, int srcY, int dstX, int dstY,
9601 int width, int height) 9613 int width, int height)
9602{ 9614{
9603 Display *display = FRAME_X_DISPLAY (s->f); 9615 Display *display;
9604#ifdef HAVE_XRENDER 9616#ifdef HAVE_XRENDER
9605 if (s->img->picture && FRAME_X_PICTURE_FORMAT (s->f)) 9617 XRenderPictFormat *default_format;
9606 { 9618 XRenderPictureAttributes attr UNINIT;
9607 Picture destination; 9619#endif
9608 XRenderPictFormat *default_format;
9609 XRenderPictureAttributes attr UNINIT;
9610 9620
9611 default_format = FRAME_X_PICTURE_FORMAT (s->f); 9621 display = FRAME_X_DISPLAY (s->f);
9612 destination = XRenderCreatePicture (display, dest,
9613 default_format, 0, &attr);
9614 9622
9615 XRenderComposite (display, s->img->mask_picture ? PictOpOver : PictOpSrc, 9623#ifdef HAVE_XRENDER
9616 s->img->picture, s->img->mask_picture, destination, 9624 if (s->img->picture && FRAME_X_PICTURE_FORMAT (s->f))
9617 srcX, srcY, 9625 {
9618 srcX, srcY, 9626 if (destination == None)
9619 dstX, dstY, 9627 {
9620 width, height); 9628 /* The destination picture was not specified. This means we
9629 have to create a picture representing the */
9630 default_format = FRAME_X_PICTURE_FORMAT (s->f);
9631 destination = XRenderCreatePicture (display, dest,
9632 default_format, 0, &attr);
9633
9634 XRenderComposite (display, (s->img->mask_picture
9635 ? PictOpOver : PictOpSrc),
9636 s->img->picture, s->img->mask_picture,
9637 destination, srcX, srcY, srcX, srcY,
9638 dstX, dstY, width, height);
9639
9640 XRenderFreePicture (display, destination);
9641 }
9642 else
9643 XRenderComposite (display, (s->img->mask_picture
9644 ? PictOpOver : PictOpSrc),
9645 s->img->picture, s->img->mask_picture,
9646 destination, srcX, srcY, srcX, srcY,
9647 dstX, dstY, width, height);
9621 9648
9622 XRenderFreePicture (display, destination);
9623 return; 9649 return;
9624 } 9650 }
9625#endif 9651#endif
@@ -9629,6 +9655,7 @@ x_composite_image (struct glyph_string *s, Pixmap dest,
9629 srcX, srcY, 9655 srcX, srcY,
9630 width, height, dstX, dstY); 9656 width, height, dstX, dstY);
9631} 9657}
9658
9632#endif /* !USE_CAIRO */ 9659#endif /* !USE_CAIRO */
9633 9660
9634 9661
@@ -9707,6 +9734,9 @@ x_draw_image_foreground (struct glyph_string *s)
9707 image_rect.height = s->slice.height; 9734 image_rect.height = s->slice.height;
9708 if (gui_intersect_rectangles (&clip_rect, &image_rect, &r)) 9735 if (gui_intersect_rectangles (&clip_rect, &image_rect, &r))
9709 x_composite_image (s, FRAME_X_DRAWABLE (s->f), 9736 x_composite_image (s, FRAME_X_DRAWABLE (s->f),
9737#ifdef HAVE_XRENDER
9738 FRAME_X_PICTURE (s->f),
9739#endif
9710 s->slice.x + r.x - x, s->slice.y + r.y - y, 9740 s->slice.x + r.x - x, s->slice.y + r.y - y,
9711 r.x, r.y, r.width, r.height); 9741 r.x, r.y, r.width, r.height);
9712 } 9742 }
@@ -9720,7 +9750,12 @@ x_draw_image_foreground (struct glyph_string *s)
9720 image_rect.width = s->slice.width; 9750 image_rect.width = s->slice.width;
9721 image_rect.height = s->slice.height; 9751 image_rect.height = s->slice.height;
9722 if (gui_intersect_rectangles (&clip_rect, &image_rect, &r)) 9752 if (gui_intersect_rectangles (&clip_rect, &image_rect, &r))
9723 x_composite_image (s, FRAME_X_DRAWABLE (s->f), s->slice.x + r.x - x, s->slice.y + r.y - y, 9753 x_composite_image (s, FRAME_X_DRAWABLE (s->f),
9754#ifdef HAVE_XRENDER
9755 FRAME_X_PICTURE (s->f),
9756#endif
9757 s->slice.x + r.x - x,
9758 s->slice.y + r.y - y,
9724 r.x, r.y, r.width, r.height); 9759 r.x, r.y, r.width, r.height);
9725 9760
9726 /* When the image has a mask, we can expect that at 9761 /* When the image has a mask, we can expect that at
@@ -9886,8 +9921,11 @@ x_draw_image_foreground_1 (struct glyph_string *s, Pixmap pixmap)
9886 XChangeGC (display, s->gc, mask, &xgcv); 9921 XChangeGC (display, s->gc, mask, &xgcv);
9887 9922
9888 x_composite_image (s, pixmap, 9923 x_composite_image (s, pixmap,
9889 s->slice.x, s->slice.y, 9924#ifdef HAVE_XRENDER
9890 x, y, s->slice.width, s->slice.height); 9925 None,
9926#endif
9927 s->slice.x, s->slice.y, x, y,
9928 s->slice.width, s->slice.height);
9891 XSetClipMask (display, s->gc, None); 9929 XSetClipMask (display, s->gc, None);
9892 } 9930 }
9893 else 9931 else
@@ -12761,7 +12799,7 @@ xi_focus_handle_for_device (struct x_display_info *dpyinfo,
12761 /* The last-focus-change time of the device changed, so update the 12799 /* The last-focus-change time of the device changed, so update the
12762 frame's user time. */ 12800 frame's user time. */
12763 x_display_set_last_user_time (dpyinfo, event->time, 12801 x_display_set_last_user_time (dpyinfo, event->time,
12764 event->send_event); 12802 event->send_event, true);
12765 12803
12766 device->focus_frame = mentioned_frame; 12804 device->focus_frame = mentioned_frame;
12767 device->focus_frame_time = event->time; 12805 device->focus_frame_time = event->time;
@@ -12771,7 +12809,7 @@ xi_focus_handle_for_device (struct x_display_info *dpyinfo,
12771 /* The last-focus-change time of the device changed, so update the 12809 /* The last-focus-change time of the device changed, so update the
12772 frame's user time. */ 12810 frame's user time. */
12773 x_display_set_last_user_time (dpyinfo, event->time, 12811 x_display_set_last_user_time (dpyinfo, event->time,
12774 event->send_event); 12812 event->send_event, false);
12775 12813
12776 device->focus_frame = NULL; 12814 device->focus_frame = NULL;
12777 12815
@@ -14153,7 +14191,8 @@ XTmouse_position (struct frame **fp, int insist, Lisp_Object *bar_window,
14153 < dpyinfo->last_mouse_movement_time)) 14191 < dpyinfo->last_mouse_movement_time))
14154 x_display_set_last_user_time (dpyinfo, 14192 x_display_set_last_user_time (dpyinfo,
14155 dpyinfo->last_mouse_movement_time, 14193 dpyinfo->last_mouse_movement_time,
14156 dpyinfo->last_mouse_movement_time_send_event); 14194 dpyinfo->last_mouse_movement_time_send_event,
14195 true);
14157 14196
14158 if ((!f1 || FRAME_TOOLTIP_P (f1)) 14197 if ((!f1 || FRAME_TOOLTIP_P (f1))
14159 && (EQ (track_mouse, Qdropping) 14198 && (EQ (track_mouse, Qdropping)
@@ -14769,7 +14808,8 @@ xg_scroll_callback (GtkRange *range, GtkScrollType scroll,
14769 dpyinfo = FRAME_DISPLAY_INFO (f); 14808 dpyinfo = FRAME_DISPLAY_INFO (f);
14770 14809
14771 if (time != GDK_CURRENT_TIME) 14810 if (time != GDK_CURRENT_TIME)
14772 x_display_set_last_user_time (dpyinfo, time, true); 14811 x_display_set_last_user_time (dpyinfo, time, true,
14812 true);
14773 14813
14774 switch (scroll) 14814 switch (scroll)
14775 { 14815 {
@@ -18091,7 +18131,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
18091 required for SetInputFocus to work correctly after 18131 required for SetInputFocus to work correctly after
18092 taking the input focus. */ 18132 taking the input focus. */
18093 x_display_set_last_user_time (dpyinfo, event->xclient.data.l[1], 18133 x_display_set_last_user_time (dpyinfo, event->xclient.data.l[1],
18094 true); 18134 true, true);
18095 goto done; 18135 goto done;
18096 } 18136 }
18097 18137
@@ -19079,7 +19119,8 @@ handle_one_xevent (struct x_display_info *dpyinfo,
19079 19119
19080 case KeyPress: 19120 case KeyPress:
19081 x_display_set_last_user_time (dpyinfo, event->xkey.time, 19121 x_display_set_last_user_time (dpyinfo, event->xkey.time,
19082 event->xkey.send_event); 19122 event->xkey.send_event,
19123 true);
19083 ignore_next_mouse_click_timeout = 0; 19124 ignore_next_mouse_click_timeout = 0;
19084 19125
19085 coding = Qlatin_1; 19126 coding = Qlatin_1;
@@ -19558,7 +19599,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
19558 19599
19559 case EnterNotify: 19600 case EnterNotify:
19560 x_display_set_last_user_time (dpyinfo, event->xcrossing.time, 19601 x_display_set_last_user_time (dpyinfo, event->xcrossing.time,
19561 event->xcrossing.send_event); 19602 event->xcrossing.send_event, false);
19562 19603
19563#ifdef HAVE_XINPUT2 19604#ifdef HAVE_XINPUT2
19564 /* For whatever reason, the X server continues to deliver 19605 /* For whatever reason, the X server continues to deliver
@@ -19681,7 +19722,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
19681 19722
19682 case LeaveNotify: 19723 case LeaveNotify:
19683 x_display_set_last_user_time (dpyinfo, event->xcrossing.time, 19724 x_display_set_last_user_time (dpyinfo, event->xcrossing.time,
19684 event->xcrossing.send_event); 19725 event->xcrossing.send_event, false);
19685 19726
19686#ifdef HAVE_XINPUT2 19727#ifdef HAVE_XINPUT2
19687 /* For whatever reason, the X server continues to deliver 19728 /* For whatever reason, the X server continues to deliver
@@ -20496,7 +20537,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
20496 { 20537 {
20497 if (event->xbutton.type == ButtonPress) 20538 if (event->xbutton.type == ButtonPress)
20498 x_display_set_last_user_time (dpyinfo, event->xbutton.time, 20539 x_display_set_last_user_time (dpyinfo, event->xbutton.time,
20499 event->xbutton.send_event); 20540 event->xbutton.send_event, true);
20500 20541
20501#ifdef HAVE_XWIDGETS 20542#ifdef HAVE_XWIDGETS
20502 struct xwidget_view *xvw = xwidget_view_from_window (event->xbutton.window); 20543 struct xwidget_view *xvw = xwidget_view_from_window (event->xbutton.window);
@@ -20548,7 +20589,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
20548 if (event->type == ButtonPress) 20589 if (event->type == ButtonPress)
20549 { 20590 {
20550 x_display_set_last_user_time (dpyinfo, event->xbutton.time, 20591 x_display_set_last_user_time (dpyinfo, event->xbutton.time,
20551 event->xbutton.send_event); 20592 event->xbutton.send_event, true);
20552 20593
20553 dpyinfo->grabbed |= (1 << event->xbutton.button); 20594 dpyinfo->grabbed |= (1 << event->xbutton.button);
20554 dpyinfo->last_mouse_frame = f; 20595 dpyinfo->last_mouse_frame = f;
@@ -21105,7 +21146,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
21105 ev.send_event = enter->send_event; 21146 ev.send_event = enter->send_event;
21106 21147
21107 x_display_set_last_user_time (dpyinfo, enter->time, 21148 x_display_set_last_user_time (dpyinfo, enter->time,
21108 enter->send_event); 21149 enter->send_event, false);
21109 21150
21110#ifdef USE_MOTIF 21151#ifdef USE_MOTIF
21111 use_copy = true; 21152 use_copy = true;
@@ -21291,7 +21332,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
21291#endif 21332#endif
21292 21333
21293 x_display_set_last_user_time (dpyinfo, leave->time, 21334 x_display_set_last_user_time (dpyinfo, leave->time,
21294 leave->send_event); 21335 leave->send_event, false);
21295 21336
21296#ifdef HAVE_XWIDGETS 21337#ifdef HAVE_XWIDGETS
21297 { 21338 {
@@ -21566,7 +21607,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
21566 21607
21567 state = xi_convert_event_state (xev); 21608 state = xi_convert_event_state (xev);
21568 x_display_set_last_user_time (dpyinfo, xev->time, 21609 x_display_set_last_user_time (dpyinfo, xev->time,
21569 xev->send_event); 21610 xev->send_event, true);
21570 21611
21571 if (found_valuator) 21612 if (found_valuator)
21572 xwidget_scroll (xv, xev->event_x, xev->event_y, 21613 xwidget_scroll (xv, xev->event_x, xev->event_y,
@@ -21586,7 +21627,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
21586 if (found_valuator) 21627 if (found_valuator)
21587 { 21628 {
21588 x_display_set_last_user_time (dpyinfo, xev->time, 21629 x_display_set_last_user_time (dpyinfo, xev->time,
21589 xev->send_event); 21630 xev->send_event, true);
21590 21631
21591 21632
21592#if defined USE_GTK && !defined HAVE_GTK3 21633#if defined USE_GTK && !defined HAVE_GTK3
@@ -22077,7 +22118,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
22077 if (xev->evtype == XI_ButtonPress) 22118 if (xev->evtype == XI_ButtonPress)
22078 { 22119 {
22079 x_display_set_last_user_time (dpyinfo, xev->time, 22120 x_display_set_last_user_time (dpyinfo, xev->time,
22080 xev->send_event); 22121 xev->send_event, true);
22081 22122
22082 dpyinfo->grabbed |= (1 << xev->detail); 22123 dpyinfo->grabbed |= (1 << xev->detail);
22083 dpyinfo->last_mouse_frame = f; 22124 dpyinfo->last_mouse_frame = f;
@@ -22120,7 +22161,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
22120 22161
22121 if (xev->flags & XIPointerEmulated) 22162 if (xev->flags & XIPointerEmulated)
22122 x_display_set_last_user_time (dpyinfo, xev->time, 22163 x_display_set_last_user_time (dpyinfo, xev->time,
22123 xev->send_event); 22164 xev->send_event, true);
22124#endif 22165#endif
22125 x_dnd_note_self_wheel (dpyinfo, 22166 x_dnd_note_self_wheel (dpyinfo,
22126 x_dnd_last_seen_window, 22167 x_dnd_last_seen_window,
@@ -22356,7 +22397,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
22356 22397
22357 if (xev->evtype == XI_ButtonPress) 22398 if (xev->evtype == XI_ButtonPress)
22358 x_display_set_last_user_time (dpyinfo, xev->time, 22399 x_display_set_last_user_time (dpyinfo, xev->time,
22359 xev->send_event); 22400 xev->send_event, true);
22360 22401
22361 source = xi_device_from_id (dpyinfo, xev->sourceid); 22402 source = xi_device_from_id (dpyinfo, xev->sourceid);
22362 device = xi_device_from_id (dpyinfo, xev->deviceid); 22403 device = xi_device_from_id (dpyinfo, xev->deviceid);
@@ -22735,7 +22776,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
22735#endif 22776#endif
22736 22777
22737 x_display_set_last_user_time (dpyinfo, xev->time, 22778 x_display_set_last_user_time (dpyinfo, xev->time,
22738 xev->send_event); 22779 xev->send_event, true);
22739 ignore_next_mouse_click_timeout = 0; 22780 ignore_next_mouse_click_timeout = 0;
22740 22781
22741 f = x_any_window_to_frame (dpyinfo, xev->event); 22782 f = x_any_window_to_frame (dpyinfo, xev->event);
@@ -23374,7 +23415,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
23374 device = xi_device_from_id (dpyinfo, xev->deviceid); 23415 device = xi_device_from_id (dpyinfo, xev->deviceid);
23375 source = xi_device_from_id (dpyinfo, xev->sourceid); 23416 source = xi_device_from_id (dpyinfo, xev->sourceid);
23376 x_display_set_last_user_time (dpyinfo, xev->time, 23417 x_display_set_last_user_time (dpyinfo, xev->time,
23377 xev->send_event); 23418 xev->send_event, true);
23378 23419
23379 if (!device) 23420 if (!device)
23380 goto XI_OTHER; 23421 goto XI_OTHER;
@@ -23472,7 +23513,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
23472 device = xi_device_from_id (dpyinfo, xev->deviceid); 23513 device = xi_device_from_id (dpyinfo, xev->deviceid);
23473 source = xi_device_from_id (dpyinfo, xev->sourceid); 23514 source = xi_device_from_id (dpyinfo, xev->sourceid);
23474 x_display_set_last_user_time (dpyinfo, xev->time, 23515 x_display_set_last_user_time (dpyinfo, xev->time,
23475 xev->send_event); 23516 xev->send_event, true);
23476 23517
23477 if (!device) 23518 if (!device)
23478 goto XI_OTHER; 23519 goto XI_OTHER;
@@ -23519,7 +23560,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
23519 device = xi_device_from_id (dpyinfo, xev->deviceid); 23560 device = xi_device_from_id (dpyinfo, xev->deviceid);
23520 source = xi_device_from_id (dpyinfo, xev->sourceid); 23561 source = xi_device_from_id (dpyinfo, xev->sourceid);
23521 x_display_set_last_user_time (dpyinfo, xev->time, 23562 x_display_set_last_user_time (dpyinfo, xev->time,
23522 xev->send_event); 23563 xev->send_event, true);
23523 23564
23524 if (!device) 23565 if (!device)
23525 goto XI_OTHER; 23566 goto XI_OTHER;
@@ -23560,7 +23601,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
23560 device = xi_device_from_id (dpyinfo, pev->deviceid); 23601 device = xi_device_from_id (dpyinfo, pev->deviceid);
23561 source = xi_device_from_id (dpyinfo, pev->sourceid); 23602 source = xi_device_from_id (dpyinfo, pev->sourceid);
23562 x_display_set_last_user_time (dpyinfo, pev->time, 23603 x_display_set_last_user_time (dpyinfo, pev->time,
23563 pev->send_event); 23604 pev->send_event, true);
23564 23605
23565 if (!device) 23606 if (!device)
23566 goto XI_OTHER; 23607 goto XI_OTHER;
@@ -27995,6 +28036,7 @@ x_wm_set_size_hint (struct frame *f, long flags, bool user_position)
27995 Window window = FRAME_OUTER_WINDOW (f); 28036 Window window = FRAME_OUTER_WINDOW (f);
27996#ifdef USE_X_TOOLKIT 28037#ifdef USE_X_TOOLKIT
27997 WMShellWidget shell; 28038 WMShellWidget shell;
28039 bool hints_changed;
27998#endif 28040#endif
27999 28041
28000 if (!window) 28042 if (!window)
@@ -28021,8 +28063,9 @@ x_wm_set_size_hint (struct frame *f, long flags, bool user_position)
28021 shell->wm.size_hints.flags |= USPosition; 28063 shell->wm.size_hints.flags |= USPosition;
28022 } 28064 }
28023 28065
28024 widget_update_wm_size_hints (f->output_data.x->widget, 28066 hints_changed
28025 f->output_data.x->edit_widget); 28067 = widget_update_wm_size_hints (f->output_data.x->widget,
28068 f->output_data.x->edit_widget);
28026 28069
28027#ifdef USE_MOTIF 28070#ifdef USE_MOTIF
28028 /* Do this all over again for the benefit of Motif, which always 28071 /* Do this all over again for the benefit of Motif, which always
@@ -28035,6 +28078,7 @@ x_wm_set_size_hint (struct frame *f, long flags, bool user_position)
28035 shell->wm.size_hints.flags &= ~PPosition; 28078 shell->wm.size_hints.flags &= ~PPosition;
28036 shell->wm.size_hints.flags |= USPosition; 28079 shell->wm.size_hints.flags |= USPosition;
28037 } 28080 }
28081#endif
28038 28082
28039 /* Drill hints into Motif, since it keeps setting its own. */ 28083 /* Drill hints into Motif, since it keeps setting its own. */
28040 size_hints.flags = shell->wm.size_hints.flags; 28084 size_hints.flags = shell->wm.size_hints.flags;
@@ -28052,15 +28096,23 @@ x_wm_set_size_hint (struct frame *f, long flags, bool user_position)
28052 size_hints.min_aspect.y = shell->wm.size_hints.min_aspect.y; 28096 size_hints.min_aspect.y = shell->wm.size_hints.min_aspect.y;
28053 size_hints.max_aspect.x = shell->wm.size_hints.max_aspect.x; 28097 size_hints.max_aspect.x = shell->wm.size_hints.max_aspect.x;
28054 size_hints.max_aspect.y = shell->wm.size_hints.max_aspect.y; 28098 size_hints.max_aspect.y = shell->wm.size_hints.max_aspect.y;
28055#ifdef HAVE_X11XTR6
28056 size_hints.base_width = shell->wm.base_width; 28099 size_hints.base_width = shell->wm.base_width;
28057 size_hints.base_height = shell->wm.base_height; 28100 size_hints.base_height = shell->wm.base_height;
28058 size_hints.win_gravity = shell->wm.win_gravity; 28101 size_hints.win_gravity = shell->wm.win_gravity;
28059#endif
28060 28102
28103#ifdef USE_MOTIF
28061 XSetWMNormalHints (XtDisplay (f->output_data.x->widget), 28104 XSetWMNormalHints (XtDisplay (f->output_data.x->widget),
28062 XtWindow (f->output_data.x->widget), 28105 XtWindow (f->output_data.x->widget),
28063 &size_hints); 28106 &size_hints);
28107#else
28108 /* In many cases, widget_update_wm_size_hints will not have
28109 updated the size hints if only flags changed. When that
28110 happens, set the WM hints manually. */
28111
28112 if (!hints_changed)
28113 XSetWMNormalHints (XtDisplay (f->output_data.x->widget),
28114 XtWindow (f->output_data.x->widget),
28115 &size_hints);
28064#endif 28116#endif
28065 28117
28066 return; 28118 return;
@@ -28475,9 +28527,10 @@ xi_check_toolkit (Display *display)
28475 28527
28476#endif 28528#endif
28477 28529
28478/* Open a connection to X display DISPLAY_NAME, and return 28530/* Open a connection to X display DISPLAY_NAME, and return the
28479 the structure that describes the open display. 28531 structure that describes the open display. If obtaining the XCB
28480 If we cannot contact the display, return null. */ 28532 connection or toolkit-specific display fails, return NULL. Signal
28533 an error if opening the display itself failed. */
28481 28534
28482struct x_display_info * 28535struct x_display_info *
28483x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) 28536x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
@@ -28504,9 +28557,13 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
28504 ++x_initialized; 28557 ++x_initialized;
28505 } 28558 }
28506 28559
28507 if (! x_display_ok (SSDATA (display_name))) 28560#if defined USE_X_TOOLKIT || defined USE_GTK
28561
28562 if (!x_display_ok (SSDATA (display_name)))
28508 error ("Display %s can't be opened", SSDATA (display_name)); 28563 error ("Display %s can't be opened", SSDATA (display_name));
28509 28564
28565#endif
28566
28510#ifdef USE_GTK 28567#ifdef USE_GTK
28511 { 28568 {
28512#define NUM_ARGV 10 28569#define NUM_ARGV 10
@@ -28633,6 +28690,15 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
28633 /* Detect failure. */ 28690 /* Detect failure. */
28634 if (dpy == 0) 28691 if (dpy == 0)
28635 { 28692 {
28693#if !defined USE_X_TOOLKIT && !defined USE_GTK
28694 /* Avoid opening a display three times (once in dispextern.c
28695 upon startup, once in x_display_ok, and once above) to
28696 determine whether or not the display is alive on no toolkit
28697 builds, where no toolkit initialization happens at all. */
28698
28699 error ("Display %s can't be opened", SSDATA (display_name));
28700#endif
28701
28636 unblock_input (); 28702 unblock_input ();
28637 return 0; 28703 return 0;
28638 } 28704 }
diff --git a/test/lisp/calendar/icalendar-tests.el b/test/lisp/calendar/icalendar-tests.el
index 7f8cd479146..2e9353a09b8 100644
--- a/test/lisp/calendar/icalendar-tests.el
+++ b/test/lisp/calendar/icalendar-tests.el
@@ -1310,7 +1310,7 @@ SUMMARY:and diary-anniversary
1310 "import-real-world-2003-05-29.diary-european" 1310 "import-real-world-2003-05-29.diary-european"
1311 "import-real-world-2003-05-29.diary-american") 1311 "import-real-world-2003-05-29.diary-american")
1312 1312
1313 ;; created with http://apps.marudot.com/ical/ 1313 ;; created with https://apps.marudot.com/ical/
1314 (icalendar-tests--test-import "import-real-world-no-dst.ics" 1314 (icalendar-tests--test-import "import-real-world-no-dst.ics"
1315 nil 1315 nil
1316 "import-real-world-no-dst.diary-european" 1316 "import-real-world-no-dst.diary-european"
diff --git a/test/lisp/cedet/semantic-utest.el b/test/lisp/cedet/semantic-utest.el
index 24a467474b9..b577b198089 100644
--- a/test/lisp/cedet/semantic-utest.el
+++ b/test/lisp/cedet/semantic-utest.el
@@ -609,7 +609,6 @@ INSERTME is the text to be inserted after the deletion."
609 (semantic-utest-generic (semantic-utest-fname "phptest.php") semantic-utest-PHP-buffer-contents semantic-utest-PHP-name-contents '("fun1") "fun2" "%^@") 609 (semantic-utest-generic (semantic-utest-fname "phptest.php") semantic-utest-PHP-buffer-contents semantic-utest-PHP-name-contents '("fun1") "fun2" "%^@")
610 ) 610 )
611 611
612;look at http://mfgames.com/linux/csharp-mode
613(ert-deftest semantic-utest-Csharp() ;; hmm i don't even know how to edit a scharp file. need a csharp mode implementation i suppose 612(ert-deftest semantic-utest-Csharp() ;; hmm i don't even know how to edit a scharp file. need a csharp mode implementation i suppose
614 (skip-unless (featurep 'csharp-mode)) 613 (skip-unless (featurep 'csharp-mode))
615 (semantic-utest-generic (semantic-utest-fname "csharptest.cs") semantic-utest-Csharp-buffer-contents semantic-utest-Csharp-name-contents '("fun2") "//1" "//deleted line") 614 (semantic-utest-generic (semantic-utest-fname "csharptest.cs") semantic-utest-Csharp-buffer-contents semantic-utest-Csharp-name-contents '("fun2") "//1" "//deleted line")
diff --git a/test/lisp/dnd-tests.el b/test/lisp/dnd-tests.el
index 67b660fc124..bdadc0f2801 100644
--- a/test/lisp/dnd-tests.el
+++ b/test/lisp/dnd-tests.el
@@ -416,7 +416,7 @@ This function only tries to handle strings."
416 ;; system specific test is in x-dnd-tests.el. When running this 416 ;; system specific test is in x-dnd-tests.el. When running this
417 ;; interactively, keep in mind that there are only two file managers 417 ;; interactively, keep in mind that there are only two file managers
418 ;; which are known to implement XDS correctly: System G (see 418 ;; which are known to implement XDS correctly: System G (see
419 ;; http://nps-systemg.sourceforge.net), and Emacs itself. GTK file 419 ;; https://nps-systemg.sourceforge.net), and Emacs itself. GTK file
420 ;; managers such as Nautilus will not work, since they prefer the 420 ;; managers such as Nautilus will not work, since they prefer the
421 ;; `text/uri-list' selection target to `XdndDirectSave0', contrary 421 ;; `text/uri-list' selection target to `XdndDirectSave0', contrary
422 ;; to the XDS specification. 422 ;; to the XDS specification.
diff --git a/test/lisp/emacs-lisp/package-resources/ustar-withsub-0.1.tar b/test/lisp/emacs-lisp/package-resources/ustar-withsub-0.1.tar
new file mode 100644
index 00000000000..009c4fc420c
--- /dev/null
+++ b/test/lisp/emacs-lisp/package-resources/ustar-withsub-0.1.tar
Binary files differ
diff --git a/test/lisp/emacs-lisp/package-resources/v7-withsub-0.1.tar b/test/lisp/emacs-lisp/package-resources/v7-withsub-0.1.tar
new file mode 100644
index 00000000000..16c79e529f4
--- /dev/null
+++ b/test/lisp/emacs-lisp/package-resources/v7-withsub-0.1.tar
Binary files differ
diff --git a/test/lisp/emacs-lisp/package-tests.el b/test/lisp/emacs-lisp/package-tests.el
index b903cd781ba..ffe4d7cd5fd 100644
--- a/test/lisp/emacs-lisp/package-tests.el
+++ b/test/lisp/emacs-lisp/package-tests.el
@@ -275,11 +275,31 @@ Must called from within a `tar-mode' buffer."
275 275
276 (let* ((pkg-el "multi-file-0.2.3.tar") 276 (let* ((pkg-el "multi-file-0.2.3.tar")
277 (source-file (expand-file-name pkg-el (ert-resource-directory)))) 277 (source-file (expand-file-name pkg-el (ert-resource-directory))))
278 (package-initialize)
279 (should-not (package-installed-p 'multie-file)) 278 (should-not (package-installed-p 'multie-file))
280 (package-install-file source-file) 279 (package-install-file source-file)
281 (should (package-installed-p 'multi-file)) 280 (should (package-installed-p 'multi-file))
282 (package-delete (cadr (assq 'multi-file package-alist)))) 281 (package-delete (cadr (assq 'multi-file package-alist))))))
282
283(ert-deftest package-test-bug58367 ()
284 "Check variations in tarball formats."
285 (with-package-test (:basedir (ert-resource-directory))
286 (package-initialize)
287
288 ;; A package whose first entry is the main dir but without trailing /.
289 (let* ((pkg-el "ustar-withsub-0.1.tar")
290 (source-file (expand-file-name pkg-el (ert-resource-directory))))
291 (should-not (package-installed-p 'ustar-withsub))
292 (package-install-file source-file)
293 (should (package-installed-p 'ustar-withsub))
294 (package-delete (cadr (assq 'ustar-withsub package-alist))))
295
296 ;; A package whose first entry is a file in a subdir.
297 (let* ((pkg-el "v7-withsub-0.1.tar")
298 (source-file (expand-file-name pkg-el (ert-resource-directory))))
299 (should-not (package-installed-p 'v7-withsub))
300 (package-install-file source-file)
301 (should (package-installed-p 'v7-withsub))
302 (package-delete (cadr (assq 'v7-withsub package-alist))))
283 )) 303 ))
284 304
285(ert-deftest package-test-install-file-EOLs () 305(ert-deftest package-test-install-file-EOLs ()
diff --git a/test/lisp/net/puny-resources/IdnaTestV2.txt b/test/lisp/net/puny-resources/IdnaTestV2.txt
index ed2f32e129f..4b8d5984a7c 100644
--- a/test/lisp/net/puny-resources/IdnaTestV2.txt
+++ b/test/lisp/net/puny-resources/IdnaTestV2.txt
@@ -2,12 +2,12 @@
2# Date: 2021-08-17, 19:34:01 GMT 2# Date: 2021-08-17, 19:34:01 GMT
3# © 2021 Unicode®, Inc. 3# © 2021 Unicode®, Inc.
4# Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries. 4# Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries.
5# For terms of use, see http://www.unicode.org/terms_of_use.html 5# For terms of use, see https://www.unicode.org/terms_of_use.html
6# 6#
7# Unicode IDNA Compatible Preprocessing for UTS #46 7# Unicode IDNA Compatible Preprocessing for UTS #46
8# Version: 14.0.0 8# Version: 14.0.0
9# 9#
10# For documentation and usage, see http://www.unicode.org/reports/tr46 10# For documentation and usage, see https://www.unicode.org/reports/tr46
11# 11#
12# Test cases for verifying UTS #46 conformance. 12# Test cases for verifying UTS #46 conformance.
13# 13#
diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el
index fdaedb5fd7a..9ad2d169308 100644
--- a/test/lisp/progmodes/python-tests.el
+++ b/test/lisp/progmodes/python-tests.el
@@ -43,6 +43,37 @@ always located at the beginning of buffer."
43 (goto-char (point-min)) 43 (goto-char (point-min))
44 ,@body))) 44 ,@body)))
45 45
46(defun python-tests-shell-wait-for-prompt ()
47 "Wait for the prompt in the shell buffer."
48 (python-shell-with-shell-buffer
49 (while (not (if-let ((prompt (python-util-comint-last-prompt)))
50 (python-shell-comint-end-of-output-p
51 (buffer-substring-no-properties
52 (car prompt) (cdr prompt)))))
53 (sit-for 0.1))))
54
55(defmacro python-tests-with-temp-buffer-with-shell (contents &rest body)
56 "Create a `python-mode' enabled temp buffer with CONTENTS and `run-python'.
57BODY is code to be executed within the temp buffer. Point is
58always located at the beginning of buffer. Native completion is
59turned off. Shell buffer will be killed on exit."
60 (declare (indent 1) (debug t))
61 `(with-temp-buffer
62 (let ((python-indent-guess-indent-offset nil)
63 (python-shell-completion-native-enable nil))
64 (python-mode)
65 (unwind-protect
66 (progn
67 (run-python nil t)
68 (insert ,contents)
69 (goto-char (point-min))
70 (python-tests-shell-wait-for-prompt)
71 ,@body)
72 (when (python-shell-get-buffer)
73 (python-shell-with-shell-buffer
74 (let (kill-buffer-hook kill-buffer-query-functions)
75 (kill-buffer))))))))
76
46(defmacro python-tests-with-temp-file (contents &rest body) 77(defmacro python-tests-with-temp-file (contents &rest body)
47 "Create a `python-mode' enabled file with CONTENTS. 78 "Create a `python-mode' enabled file with CONTENTS.
48BODY is code to be executed within the temp buffer. Point is 79BODY is code to be executed within the temp buffer. Point is
@@ -4365,6 +4396,101 @@ def foo():
4365 (python-shell-interpreter "/some/path/to/bin/pypy")) 4396 (python-shell-interpreter "/some/path/to/bin/pypy"))
4366 (should (python-shell-completion-native-interpreter-disabled-p)))) 4397 (should (python-shell-completion-native-interpreter-disabled-p))))
4367 4398
4399(ert-deftest python-shell-completion-1 ()
4400 (skip-unless (executable-find python-tests-shell-interpreter))
4401 (python-tests-with-temp-buffer-with-shell
4402 "
4403import abc
4404"
4405 (let ((inhibit-message t))
4406 (python-shell-send-buffer)
4407 (python-tests-shell-wait-for-prompt)
4408 (goto-char (point-max))
4409 (insert "abc.")
4410 (should (completion-at-point))
4411 (insert "A")
4412 (should (completion-at-point)))))
4413
4414(ert-deftest python-shell-completion-2 ()
4415 "Should work regardless of the point in the Shell buffer."
4416 (skip-unless (executable-find python-tests-shell-interpreter))
4417 (python-tests-with-temp-buffer-with-shell
4418 "
4419import abc
4420"
4421 (let ((inhibit-message t))
4422 (python-shell-send-buffer)
4423 (python-tests-shell-wait-for-prompt)
4424 (python-shell-with-shell-buffer
4425 (goto-char (point-min)))
4426 (goto-char (point-max))
4427 (insert "abc.")
4428 (should (completion-at-point)))))
4429
4430(ert-deftest python-shell-completion-native-1 ()
4431 (skip-unless (executable-find python-tests-shell-interpreter))
4432 (python-tests-with-temp-buffer-with-shell
4433 "
4434import abc
4435"
4436 (let ((inhibit-message t))
4437 (python-shell-completion-native-turn-on)
4438 (python-shell-send-buffer)
4439 (python-tests-shell-wait-for-prompt)
4440 (goto-char (point-max))
4441 (insert "abc.")
4442 (should (completion-at-point))
4443 (insert "A")
4444 (should (completion-at-point)))))
4445
4446(ert-deftest python-shell-completion-native-2 ()
4447 "Should work regardless of the point in the Shell buffer."
4448 (skip-unless (executable-find python-tests-shell-interpreter))
4449 (python-tests-with-temp-buffer-with-shell
4450 "
4451import abc
4452"
4453 (let ((inhibit-message t))
4454 (python-shell-completion-native-turn-on)
4455 (python-shell-send-buffer)
4456 (python-tests-shell-wait-for-prompt)
4457 (python-shell-with-shell-buffer
4458 (goto-char (point-min)))
4459 (goto-char (point-max))
4460 (insert "abc.")
4461 (should (completion-at-point)))))
4462
4463(ert-deftest python-shell-completion-native-with-ffap-1 ()
4464 (skip-unless (executable-find python-tests-shell-interpreter))
4465 (python-tests-with-temp-buffer-with-shell
4466 "
4467import abc
4468"
4469 (let ((inhibit-message t))
4470 (python-shell-completion-native-turn-on)
4471 (python-shell-send-buffer)
4472 (python-tests-shell-wait-for-prompt)
4473 (goto-char (point-max))
4474 (insert "abc.")
4475 ;; This is called when FFAP is enabled and a find-file function is called.
4476 (python-ffap-module-path "abc.")
4477 (should (completion-at-point)))))
4478
4479(ert-deftest python-shell-completion-native-with-eldoc-1 ()
4480 (skip-unless (executable-find python-tests-shell-interpreter))
4481 (python-tests-with-temp-buffer-with-shell
4482 "
4483import abc
4484"
4485 (let ((inhibit-message t))
4486 (python-shell-completion-native-turn-on)
4487 (python-shell-send-buffer)
4488 (python-tests-shell-wait-for-prompt)
4489 (goto-char (point-max))
4490 (insert "abc.")
4491 ;; This is called by idle-timer when ElDoc is enabled.
4492 (python-eldoc-function)
4493 (should (completion-at-point)))))
4368 4494
4369 4495
4370 4496
diff --git a/test/lisp/progmodes/ruby-mode-resources/ruby.rb b/test/lisp/progmodes/ruby-mode-resources/ruby.rb
index 0c206b1e0c2..f39489071ec 100644
--- a/test/lisp/progmodes/ruby-mode-resources/ruby.rb
+++ b/test/lisp/progmodes/ruby-mode-resources/ruby.rb
@@ -177,11 +177,11 @@ qux :+,
177b = $: 177b = $:
178c = ?? 178c = ??
179 179
180# Example from http://www.ruby-doc.org/docs/ProgrammingRuby/html/language.html 180# Example from https://ruby-doc.com/docs/ProgrammingRuby/
181d = 4 + 5 + # no '\' needed 181d = 4 + 5 + # no '\' needed
182 6 + 7 182 6 + 7
183 183
184# Example from http://www.ruby-doc.org/docs/ProgrammingRuby/html/language.html 184# Example from https://www.ruby-doc.org/docs/ProgrammingRuby/
185e = 8 + 9 \ 185e = 8 + 9 \
186 + 10 # '\' needed 186 + 10 # '\' needed
187 187
diff --git a/test/lisp/time-stamp-tests.el b/test/lisp/time-stamp-tests.el
index 55e37b71d80..1b5ef04436d 100644
--- a/test/lisp/time-stamp-tests.el
+++ b/test/lisp/time-stamp-tests.el
@@ -89,11 +89,11 @@
89(iter-defun time-stamp-test-pattern-sequential () 89(iter-defun time-stamp-test-pattern-sequential ()
90 "Iterate through each possibility for a part of `time-stamp-pattern'." 90 "Iterate through each possibility for a part of `time-stamp-pattern'."
91 (let ((pattern-value-parts 91 (let ((pattern-value-parts
92 '(("4/" "10/" "-4/" "0/" "") ;0: line limit 92 '(("4/" "10/" "-9/" "0/" "") ;0: line limit
93 ("stamp<" "") ;1: start 93 ("stamp<" "") ;1: start
94 ("%-d" "%_H" "%^a" "%#Z" "%:A" "%02H" "%%" "") ;2: format part 1 94 ("%-d" "%_H" "%^a" "%#Z" "%:A" "%09z" "%%" "") ;2: format part 1
95 (" " "x" ":" "\n" "") ;3: format part 2 95 (" " "x" ":" "\n" "") ;3: format part 2
96 ("%-d" "%_H" "%^a" "%#Z" "%:A" "%02H" "%%") ;4: format part 3 96 ("%-d" "%_H" "%^a" "%#Z" "%:A" "%09z" "%%") ;4: format part 3
97 (">end" "")))) ;5: end 97 (">end" "")))) ;5: end
98 (dotimes (cur (length pattern-value-parts)) 98 (dotimes (cur (length pattern-value-parts))
99 (dotimes (cur-index (length (nth cur pattern-value-parts))) 99 (dotimes (cur-index (length (nth cur pattern-value-parts)))
@@ -118,7 +118,7 @@
118(iter-defun time-stamp-test-pattern-multiply () 118(iter-defun time-stamp-test-pattern-multiply ()
119 "Iterate through every combination of parts of `time-stamp-pattern'." 119 "Iterate through every combination of parts of `time-stamp-pattern'."
120 (let ((line-limit-values '("" "4/")) 120 (let ((line-limit-values '("" "4/"))
121 (start-values '("" "stamp<")) 121 (start-values '("" "/stamp/"))
122 (format-values '("%%" "%m")) 122 (format-values '("%%" "%m"))
123 (end-values '("" ">end"))) 123 (end-values '("" ">end")))
124 ;; yield all combinations of the above 124 ;; yield all combinations of the above
diff --git a/test/manual/image-circular-tests.el b/test/manual/image-circular-tests.el
index 1299970f827..d2187cbbadc 100644
--- a/test/manual/image-circular-tests.el
+++ b/test/manual/image-circular-tests.el
@@ -27,8 +27,11 @@
27 27
28(require 'ert) 28(require 'ert)
29 29
30(declare-function image-size "image.c" (spec &optional pixels frame))
31
30(ert-deftest image-test-duplicate-keywords () 32(ert-deftest image-test-duplicate-keywords ()
31 "Test that duplicate keywords in an image spec lead to rejection." 33 "Test that duplicate keywords in an image spec lead to rejection."
34 (skip-unless (display-images-p))
32 (should-error (image-size `(image :type xbm :type xbm 35 (should-error (image-size `(image :type xbm :type xbm
33 :data-width 1 :data-height 1 36 :data-width 1 :data-height 1
34 :data ,(bool-vector t)) 37 :data ,(bool-vector t))
@@ -36,33 +39,37 @@
36 39
37(ert-deftest image-test-circular-plist () 40(ert-deftest image-test-circular-plist ()
38 "Test that a circular image spec is rejected." 41 "Test that a circular image spec is rejected."
39 (should-error 42 (skip-unless (display-images-p))
40 (let ((l `(image :type xbm :data-width 1 :data-height 1 43 (let ((spec `(image :type xbm :data-width 1 :data-height 1
41 :data ,(bool-vector t)))) 44 :data ,(bool-vector t)
42 (setcdr (last l) '#1=(:invalid . #1#)) 45 . ,'#1=(:invalid . #1#))))
43 (image-size l t)))) 46 (should-error (image-size spec t))))
44 47
45(ert-deftest image-test-:type-property-value () 48(ert-deftest image-test-:type-property-value ()
46 "Test that :type is allowed as a property value in an image spec." 49 "Test that :type is allowed as a property value in an image spec."
50 (skip-unless (display-images-p))
47 (should (equal (image-size `(image :dummy :type :type xbm 51 (should (equal (image-size `(image :dummy :type :type xbm
48 :data-width 1 :data-height 1 52 :data-width 1 :data-height 1
49 :data ,(bool-vector t)) 53 :data ,(bool-vector t))
50 t) 54 t)
51 (cons 1 1)))) 55 '(1 . 1))))
52 56
53(ert-deftest image-test-circular-specs () 57(ert-deftest image-test-circular-specs ()
54 "Test that circular image spec property values do not cause infinite recursion." 58 "Test with circular image spec property values.
55 (should 59In particular, test that they do not cause infinite recursion."
56 (let* ((circ1 (cons :dummy nil)) 60 :expected-result :failed ;; FIXME: bug#36403#63.
57 (circ2 (cons :dummy nil)) 61 (skip-unless (display-images-p))
58 (spec1 `(image :type xbm :data-width 1 :data-height 1 62 ;; Two copies needed to warm up image cache.
59 :data ,(bool-vector 1) :ignored ,circ1)) 63 (let* ((circ1 (list :dummy))
60 (spec2 `(image :type xbm :data-width 1 :data-height 1 64 (circ2 (list :dummy))
65 (spec1 `(image :type xbm :data-width 1 :data-height 1
66 :data ,(bool-vector 1) :ignored ,circ1))
67 (spec2 `(image :type xbm :data-width 1 :data-height 1
61 :data ,(bool-vector 1) :ignored ,circ2))) 68 :data ,(bool-vector 1) :ignored ,circ2)))
62 (setcdr circ1 circ1) 69 (setcdr circ1 circ1)
63 (setcdr circ2 circ2) 70 (setcdr circ2 circ2)
64 (and (equal (image-size spec1 t) (cons 1 1)) 71 (should (equal (image-size spec1 t) '(1 . 1)))
65 (equal (image-size spec2 t) (cons 1 1)))))) 72 (should (equal (image-size spec2 t) '(1 . 1)))))
66 73
67(provide 'image-circular-tests) 74(provide 'image-circular-tests)
68;;; image-circular-tests.el ends here. 75;;; image-circular-tests.el ends here.
diff --git a/test/src/fns-tests.el b/test/src/fns-tests.el
index 9a2bd5cef34..5d5d497c997 100644
--- a/test/src/fns-tests.el
+++ b/test/src/fns-tests.el
@@ -152,6 +152,8 @@
152 (,(string-to-multibyte "abc") < "abd") 152 (,(string-to-multibyte "abc") < "abd")
153 (,(string-to-multibyte "abc") < ,(string-to-multibyte "abd")) 153 (,(string-to-multibyte "abc") < ,(string-to-multibyte "abd"))
154 (,(string-to-multibyte "\x80") = ,(string-to-multibyte "\x80")) 154 (,(string-to-multibyte "\x80") = ,(string-to-multibyte "\x80"))
155 ("Liberté, Égalité, Fraternité" = "Liberté, Égalité, Fraternité")
156 ("Liberté, Égalité, Fraternité" < "Liberté, Égalité, Sororité")
155 157
156 ;; Cases concerning the ordering of raw bytes: these are 158 ;; Cases concerning the ordering of raw bytes: these are
157 ;; troublesome because the current `string<' order is not very useful as 159 ;; troublesome because the current `string<' order is not very useful as
diff --git a/test/src/lcms-tests.el b/test/src/lcms-tests.el
index 1829a7ea1f1..7f0f660d13e 100644
--- a/test/src/lcms-tests.el
+++ b/test/src/lcms-tests.el
@@ -28,7 +28,7 @@
28;; https://github.com/njsmith/colorspacious 28;; https://github.com/njsmith/colorspacious
29 29
30;; Other references: 30;; Other references:
31;; http://www.babelcolor.com/index_htm_files/A%20review%20of%20RGB%20color%20spaces.pdf 31;; https://www.babelcolor.com/index_htm_files/A%20review%20of%20RGB%20color%20spaces.pdf
32 32
33;;; Code: 33;;; Code:
34 34
diff --git a/test/src/sqlite-tests.el b/test/src/sqlite-tests.el
index 5af43923012..be4f60ab57f 100644
--- a/test/src/sqlite-tests.el
+++ b/test/src/sqlite-tests.el
@@ -241,4 +241,17 @@
241 (should (multibyte-string-p c1)) 241 (should (multibyte-string-p c1))
242 (should-not (multibyte-string-p c2))))))) 242 (should-not (multibyte-string-p c2)))))))
243 243
244(ert-deftest sqlite-returning ()
245 (skip-unless (sqlite-available-p))
246 (let (db)
247 (progn
248 (setq db (sqlite-open))
249 (sqlite-execute db "CREATE TABLE people1 (people_id INTEGER PRIMARY KEY, first TEXT, last TEXT)")
250 (should (null (sqlite-select db "select * from people1")))
251 (should
252 (equal
253 (sqlite-execute db "INSERT INTO people1 (first, last) values (?, ?) RETURNING people_id, first"
254 '("Joe" "Doe"))
255 '((1 "Joe")))))))
256
244;;; sqlite-tests.el ends here 257;;; sqlite-tests.el ends here