aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--.gitlab-ci.yml2
-rw-r--r--CONTRIBUTE170
-rwxr-xr-xadmin/merge-gnulib6
-rw-r--r--admin/notes/hydra25
-rw-r--r--admin/notes/unicode3
-rw-r--r--admin/unidata/BidiBrackets.txt8
-rw-r--r--admin/unidata/BidiMirroring.txt24
-rw-r--r--admin/unidata/Blocks.txt17
-rw-r--r--admin/unidata/IVD_Sequences.txt34
-rw-r--r--admin/unidata/NormalizationTest.txt30
-rw-r--r--admin/unidata/README18
-rw-r--r--admin/unidata/SpecialCasing.txt8
-rw-r--r--admin/unidata/UnicodeData.txt1028
-rwxr-xr-xbuild-aux/config.guess6
-rw-r--r--configure.ac109
-rw-r--r--doc/emacs/basic.texi3
-rw-r--r--doc/emacs/custom.texi2
-rw-r--r--doc/emacs/dired.texi2
-rw-r--r--doc/emacs/display.texi62
-rw-r--r--doc/emacs/fixit.texi1
-rw-r--r--doc/emacs/frames.texi3
-rw-r--r--doc/emacs/maintaining.texi1
-rw-r--r--doc/emacs/modes.texi8
-rw-r--r--doc/emacs/mule.texi40
-rw-r--r--doc/emacs/search.texi15
-rw-r--r--doc/emacs/xresources.texi5
-rw-r--r--doc/lispref/display.texi57
-rw-r--r--doc/lispref/elisp.texi1
-rw-r--r--doc/lispref/lists.texi42
-rw-r--r--doc/lispref/text.texi201
-rw-r--r--doc/misc/ses.texi29
-rw-r--r--doc/misc/texinfo.tex14
-rw-r--r--doc/misc/tramp.texi263
-rw-r--r--doc/misc/trampver.texi2
-rw-r--r--etc/NEWS154
-rw-r--r--etc/NEWS.212
-rw-r--r--etc/themes/leuven-theme.el11
-rw-r--r--etc/themes/manoj-dark-theme.el22
-rw-r--r--etc/themes/tango-dark-theme.el10
-rw-r--r--etc/themes/tango-theme.el10
-rw-r--r--etc/themes/tsdh-dark-theme.el20
-rw-r--r--etc/themes/tsdh-light-theme.el9
-rw-r--r--etc/themes/wheatgrass-theme.el4
-rw-r--r--etc/themes/whiteboard-theme.el10
-rw-r--r--lib-src/etags.c29
-rw-r--r--lib-src/make-docfile.c4
-rw-r--r--lib/explicit_bzero.c48
-rw-r--r--lib/fpending.c4
-rw-r--r--lib/getdtablesize.c2
-rw-r--r--lib/gnulib.mk.in39
-rw-r--r--lib/nstrftime.c (renamed from lib/strftime.c)0
-rw-r--r--lib/stdio-impl.h2
-rw-r--r--lib/string.in.h17
-rw-r--r--lib/xalloc-oversized.h2
-rw-r--r--lisp/calendar/todo-mode.el291
-rw-r--r--lisp/cus-start.el32
-rw-r--r--lisp/dired-aux.el8
-rw-r--r--lisp/dired-x.el8
-rw-r--r--lisp/dired.el13
-rw-r--r--lisp/display-line-numbers.el106
-rw-r--r--lisp/electric.el94
-rw-r--r--lisp/emacs-lisp/bytecomp.el43
-rw-r--r--lisp/emacs-lisp/cl-generic.el16
-rw-r--r--lisp/emacs-lisp/cl-lib.el10
-rw-r--r--lisp/emacs-lisp/edebug.el2
-rw-r--r--lisp/emacs-lisp/eldoc.el49
-rw-r--r--lisp/emacs-lisp/ert.el15
-rw-r--r--lisp/emacs-lisp/gv.el6
-rw-r--r--lisp/emacs-lisp/map.el19
-rw-r--r--lisp/emacs-lisp/nadvice.el12
-rw-r--r--lisp/emacs-lisp/pcase.el1
-rw-r--r--lisp/emacs-lisp/rx.el56
-rw-r--r--lisp/eshell/em-prompt.el15
-rw-r--r--lisp/faces.el34
-rw-r--r--lisp/files.el7
-rw-r--r--lisp/frame.el15
-rw-r--r--lisp/gnus/gnus-sum.el7
-rw-r--r--lisp/help-fns.el1
-rw-r--r--lisp/help.el3
-rw-r--r--lisp/international/characters.el22
-rw-r--r--lisp/international/fontset.el4
-rw-r--r--lisp/international/mule-cmds.el6
-rw-r--r--lisp/kmacro.el11
-rw-r--r--lisp/leim/quail/latin-alt.el16
-rw-r--r--lisp/loadhist.el95
-rw-r--r--lisp/ls-lisp.el6
-rw-r--r--lisp/mail/rmail.el2
-rw-r--r--lisp/menu-bar.el64
-rw-r--r--lisp/net/shr.el3
-rw-r--r--lisp/net/tramp-cache.el12
-rw-r--r--lisp/net/tramp-sh.el7
-rw-r--r--lisp/net/tramp.el12
-rw-r--r--lisp/net/trampver.el6
-rw-r--r--lisp/progmodes/cc-cmds.el27
-rw-r--r--lisp/progmodes/cc-defs.el12
-rw-r--r--lisp/progmodes/cc-engine.el21
-rw-r--r--lisp/progmodes/cc-mode.el66
-rw-r--r--lisp/progmodes/cperl-mode.el4
-rw-r--r--lisp/progmodes/executable.el36
-rw-r--r--lisp/progmodes/grep.el104
-rw-r--r--lisp/progmodes/ld-script.el9
-rw-r--r--lisp/progmodes/perl-mode.el43
-rw-r--r--lisp/progmodes/xref.el33
-rw-r--r--lisp/ses.el232
-rw-r--r--lisp/simple.el21
-rw-r--r--lisp/startup.el1
-rw-r--r--lisp/subr.el12
-rw-r--r--lisp/vc/vc-src.el2
-rw-r--r--lisp/wid-edit.el20
-rw-r--r--lisp/window.el6
-rw-r--r--m4/dirfd.m49
-rw-r--r--m4/explicit_bzero.m422
-rw-r--r--m4/getdtablesize.m454
-rw-r--r--m4/gettimeofday.m44
-rw-r--r--m4/gnulib-comp.m417
-rw-r--r--m4/lstat.m46
-rw-r--r--m4/mktime.m410
-rw-r--r--m4/nstrftime.m4 (renamed from m4/strftime.m4)0
-rw-r--r--m4/pselect.m45
-rw-r--r--m4/putenv.m44
-rw-r--r--m4/stdint.m4108
-rw-r--r--m4/string_h.m42
-rw-r--r--m4/strtoimax.m412
-rw-r--r--m4/utimes.m422
-rw-r--r--nextstep/INSTALL16
-rw-r--r--src/alloc.c6
-rw-r--r--src/bidi.c29
-rw-r--r--src/buffer.c88
-rw-r--r--src/buffer.h6
-rw-r--r--src/charset.c90
-rw-r--r--src/coding.c6
-rw-r--r--src/dbusbind.c6
-rw-r--r--src/dispextern.h22
-rw-r--r--src/emacs-module.c22
-rw-r--r--src/eval.c9
-rw-r--r--src/fns.c160
-rw-r--r--src/font.c2
-rw-r--r--src/fontset.c2
-rw-r--r--src/ftcrfont.c6
-rw-r--r--src/gfilenotify.c2
-rw-r--r--src/gnutls.c811
-rw-r--r--src/gnutls.h5
-rw-r--r--src/gtkutil.c63
-rw-r--r--src/gtkutil.h5
-rw-r--r--src/image.c99
-rw-r--r--src/indent.c70
-rw-r--r--src/intervals.c66
-rw-r--r--src/intervals.h3
-rw-r--r--src/keyboard.c2
-rw-r--r--src/keymap.c2
-rw-r--r--src/lisp.h7
-rw-r--r--src/lread.c239
-rw-r--r--src/nsfns.m20
-rw-r--r--src/nsterm.m31
-rw-r--r--src/print.c8
-rw-r--r--src/process.c2
-rw-r--r--src/sysdep.c2
-rw-r--r--src/term.c8
-rw-r--r--src/thread.c10
-rw-r--r--src/thread.h10
-rw-r--r--src/w32fns.c2
-rw-r--r--src/w32font.c2
-rw-r--r--src/w32notify.c4
-rw-r--r--src/w32proc.c63
-rw-r--r--src/w32term.c2
-rw-r--r--src/xdisp.c620
-rw-r--r--src/xfns.c4
-rw-r--r--src/xfont.c3
-rw-r--r--src/xmenu.c5
-rw-r--r--test/Makefile.in3
-rw-r--r--test/data/emacs-module/mod-test.c23
-rw-r--r--test/lisp/dired-tests.el105
-rw-r--r--test/lisp/electric-tests.el4
-rw-r--r--test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el2
-rw-r--r--test/lisp/emacs-lisp/eieio-tests/eieio-tests.el2
-rw-r--r--test/lisp/emacs-lisp/map-tests.el12
-rw-r--r--test/lisp/emacs-lisp/rx-tests.el10
-rw-r--r--test/lisp/filenotify-tests.el4
-rw-r--r--test/lisp/ibuffer-tests.el34
-rw-r--r--test/lisp/international/ucs-normalize-tests.el247
-rw-r--r--test/lisp/net/gnutls-tests.el295
-rw-r--r--test/lisp/net/network-stream-tests.el7
-rw-r--r--test/lisp/net/tramp-tests.el82
-rw-r--r--test/lisp/ses-tests.el175
-rw-r--r--test/lisp/subr-tests.el6
-rw-r--r--test/manual/BidiCharacterTest.txt6
-rw-r--r--test/manual/etags/CTAGS.good8
-rw-r--r--test/manual/etags/ETAGS.good_126
-rw-r--r--test/manual/etags/ETAGS.good_226
-rw-r--r--test/manual/etags/ETAGS.good_326
-rw-r--r--test/manual/etags/ETAGS.good_426
-rw-r--r--test/manual/etags/ETAGS.good_526
-rw-r--r--test/manual/etags/ETAGS.good_626
-rw-r--r--test/manual/etags/Makefile3
-rw-r--r--test/manual/etags/el-src/TAGTEST.EL1
-rw-r--r--test/manual/etags/scm-src/test.scm20
-rw-r--r--test/manual/image-size-tests.el10
-rwxr-xr-xtest/manual/indent/perl.perl8
-rw-r--r--test/src/emacs-module-tests.el87
-rw-r--r--test/src/fns-tests.el6
-rw-r--r--test/src/lread-tests.el23
202 files changed, 6978 insertions, 1694 deletions
diff --git a/.gitignore b/.gitignore
index 46ed4a137de..9229297833a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -111,7 +111,6 @@ lisp/mh-e/mh-autoloads.el
111lisp/subdirs.el 111lisp/subdirs.el
112 112
113# Dependencies. 113# Dependencies.
114.deps/
115deps/ 114deps/
116 115
117# Logs and temporaries. 116# Logs and temporaries.
@@ -138,6 +137,7 @@ gmon.out
138oo/ 137oo/
139oo-spd/ 138oo-spd/
140src/*.map 139src/*.map
140vgcore.*[0-9]
141 141
142# Tests. 142# Tests.
143test/manual/biditest.txt 143test/manual/biditest.txt
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 9b25ead37f1..5fcd54fd944 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -28,7 +28,7 @@ image: debian:unstable
28 28
29before_script: 29before_script:
30 - apt update -qq 30 - apt update -qq
31 - apt install -y -qq build-essential autoconf automake libncurses-dev gnutls-dev 31 - DEBIAN_FRONTEND=noninteractive apt install --no-install-recommends -y -qq -o=Dpkg::Use-Pty=0 libc-dev gcc make autoconf automake libncurses-dev gnutls-dev
32 32
33stages: 33stages:
34 - test 34 - test
diff --git a/CONTRIBUTE b/CONTRIBUTE
index 3ed587c6918..365e4232499 100644
--- a/CONTRIBUTE
+++ b/CONTRIBUTE
@@ -26,6 +26,7 @@ admin/notes/git-workflow.
26 26
27** Getting involved with development 27** Getting involved with development
28 28
29Discussion about Emacs development takes place on emacs-devel@gnu.org.
29You can subscribe to the emacs-devel@gnu.org mailing list, paying 30You can subscribe to the emacs-devel@gnu.org mailing list, paying
30attention to postings with subject lines containing "emacs-announce", 31attention to postings with subject lines containing "emacs-announce",
31as these discuss important events like feature freezes. See 32as these discuss important events like feature freezes. See
@@ -35,11 +36,85 @@ own copy of the repository, and discuss proposed changes on the
35mailing list. Frequent contributors to Emacs can request write access 36mailing list. Frequent contributors to Emacs can request write access
36there. 37there.
37 38
38** Committing changes by others 39Bug reports and fixes, feature requests and patches/implementations
40should be sent to bug-gnu-emacs@gnu.org, the bug/feature list. This
41is coupled to the http://debbugs.gnu.org tracker. It is best to use
42the command 'M-x report-emacs-bug RET' to report issues to the tracker
43(described below). Be prepared to receive comments and requests for
44changes in your patches, following your submission.
39 45
40If committing changes written by someone else, commit in their name, 46The Savannah info page http://savannah.gnu.org/mail/?group=emacs
41not yours. You can use 'git commit --author="AUTHOR"' to specify a 47describes how to subscribe to the mailing lists, or see the list
42change's author. 48archives.
49
50To email a patch you can use a shell command like 'git format-patch -1'
51to create a file, and then attach the file to your email. This nicely
52packages the patch's commit message and changes. To send just one
53such patch without additional remarks, you can use a command like
54'git send-email --to=bug-gnu-emacs@gnu.org 0001-DESCRIPTION.patch'.
55
56** Issue tracker (a.k.a. "bug tracker")
57
58The Emacs issue tracker at http://debbugs.gnu.org lets you view bug
59reports and search the database for bugs matching several criteria.
60Messages posted to the bug-gnu-emacs@gnu.org mailing list, mentioned
61above, are recorded by the tracker with the corresponding bugs/issues.
62
63GNU ELPA has a 'debbugs' package that allows accessing the tracker
64database from Emacs.
65
66Bugs needs regular attention. A large backlog of bugs is
67disheartening to the developers, and a culture of ignoring bugs is
68harmful to users, who expect software that works. Bugs have to be
69regularly looked at and acted upon. Not all bugs are critical, but at
70the least, each bug needs to be regularly re-reviewed to make sure it
71is still reproducible.
72
73The process of going through old or new bugs and acting on them is
74called bug triage. This process is described in the file
75admin/notes/bug-triage.
76
77** Documenting your changes
78
79Any change that matters to end-users should have an entry in etc/NEWS.
80
81Doc-strings should be updated together with the code.
82
83Think about whether your change requires updating the manuals. If you
84know it does not, mark the NEWS entry with "---". If you know
85that *all* the necessary documentation updates have been made, mark
86the entry with "+++". Otherwise do not mark it.
87
88If your change requires updating the manuals to document new
89functions/commands/variables/faces, then use the proper Texinfo
90command to index them; for instance, use @vindex for variables and
91@findex for functions/commands. For the full list of predefine indices, see
92http://www.gnu.org/software/texinfo/manual/texinfo/html_node/Predefined-Indices.html
93or run the shell command 'info "(texinfo)Predefined Indices"'.
94
95For more specific tips on Emacs's doc style, see
96http://www.gnu.org/software/emacs/manual/html_node/elisp/Documentation-Tips.html
97Use 'checkdoc' to check for documentation errors before submitting a patch.
98
99** Testing your changes
100
101Please test your changes before committing them or sending them to the
102list. If possible, add a new test along with any bug fix or new
103functionality you commit (of course, some changes cannot be easily
104tested).
105
106Emacs uses ERT, Emacs Lisp Regression Testing, for testing. See
107http://www.gnu.org/software/emacs/manual/html_node/ert/
108or run 'info "(ert)"' for for more information on writing and running
109tests.
110
111If your test lasts longer than some few seconds, mark it in its
112'ert-deftest' definition with ":tags '(:expensive-test)".
113
114To run tests on the entire Emacs tree, run "make check" from the
115top-level directory. Most tests are in the directory "test/". From
116the "test/" directory, run "make <filename>" to run the tests for
117<filename>.el(c). See "test/README" for more information.
43 118
44** Commit messages 119** Commit messages
45 120
@@ -176,6 +251,12 @@ them right the first time, so here are guidelines for formatting them:
176 with Emacs commands like 'C-x 4 a', and commit the change using the 251 with Emacs commands like 'C-x 4 a', and commit the change using the
177 shell command 'vc-dwim --commit'. Type 'vc-dwim --help' for more. 252 shell command 'vc-dwim --commit'. Type 'vc-dwim --help' for more.
178 253
254** Committing changes by others
255
256If committing changes written by someone else, commit in their name,
257not yours. You can use 'git commit --author="AUTHOR"' to specify a
258change's author.
259
179** Branches 260** Branches
180 261
181Future development normally takes place on the master branch. 262Future development normally takes place on the master branch.
@@ -218,87 +299,6 @@ This repository does not contain the Emacs Lisp package archive
218(elpa.gnu.org). See admin/notes/elpa for how to access the GNU ELPA 299(elpa.gnu.org). See admin/notes/elpa for how to access the GNU ELPA
219repository. 300repository.
220 301
221** Emacs Mailing lists.
222
223Discussion about Emacs development takes place on emacs-devel@gnu.org.
224
225Bug reports and fixes, feature requests and implementations should be
226sent to bug-gnu-emacs@gnu.org, the bug/feature list. This is coupled
227to the http://debbugs.gnu.org tracker.
228
229The Savannah info page http://savannah.gnu.org/mail/?group=emacs
230describes how to subscribe to the mailing lists, or see the list
231archives.
232
233To email a patch you can use a shell command like 'git format-patch -1'
234to create a file, and then attach the file to your email. This nicely
235packages the patch's commit message and changes. To send just one
236such patch without additional remarks, you can use a command like
237'git send-email --to=bug-gnu-emacs@gnu.org 0001-DESCRIPTION.patch'.
238
239** Issue tracker (a.k.a. "bug tracker")
240
241The Emacs issue tracker at http://debbugs.gnu.org lets you view bug
242reports and search the database for bugs matching several criteria.
243Messages posted to the bug-gnu-emacs@gnu.org mailing list, mentioned
244above, are recorded by the tracker with the corresponding bugs/issues.
245
246GNU ELPA has a 'debbugs' package that allows accessing the tracker
247database from Emacs.
248
249Bugs needs regular attention. A large backlog of bugs is
250disheartening to the developers, and a culture of ignoring bugs is
251harmful to users, who expect software that works. Bugs have to be
252regularly looked at and acted upon. Not all bugs are critical, but at
253the least, each bug needs to be regularly re-reviewed to make sure it
254is still reproducible.
255
256The process of going through old or new bugs and acting on them is
257called bug triage. This process is described in the file
258admin/notes/bug-triage.
259
260** Documenting your changes
261
262Any change that matters to end-users should have an entry in etc/NEWS.
263
264Doc-strings should be updated together with the code.
265
266Think about whether your change requires updating the manuals. If you
267know it does not, mark the NEWS entry with "---". If you know
268that *all* the necessary documentation updates have been made, mark
269the entry with "+++". Otherwise do not mark it.
270
271If your change requires updating the manuals to document new
272functions/commands/variables/faces, then use the proper Texinfo
273command to index them; for instance, use @vindex for variables and
274@findex for functions/commands. For the full list of predefine indices, see
275http://www.gnu.org/software/texinfo/manual/texinfo/html_node/Predefined-Indices.html
276or run the shell command 'info "(texinfo)Predefined Indices"'.
277
278For more specific tips on Emacs's doc style, see
279http://www.gnu.org/software/emacs/manual/html_node/elisp/Documentation-Tips.html
280Use 'checkdoc' to check for documentation errors before submitting a patch.
281
282** Testing your changes
283
284Please test your changes before committing them or sending them to the
285list. If possible, add a new test along with any bug fix or new
286functionality you commit (of course, some changes cannot be easily
287tested).
288
289Emacs uses ERT, Emacs Lisp Regression Testing, for testing. See
290http://www.gnu.org/software/emacs/manual/html_node/ert/
291or run 'info "(ert)"' for for more information on writing and running
292tests.
293
294If your test lasts longer than some few seconds, mark it in its
295'ert-deftest' definition with ":tags '(:expensive-test)".
296
297To run tests on the entire Emacs tree, run "make check" from the
298top-level directory. Most tests are in the directory "test/". From
299the "test/" directory, run "make <filename>" to run the tests for
300<filename>.el(c). See "test/README" for more information.
301
302** Understanding Emacs internals 302** Understanding Emacs internals
303 303
304The best way to understand Emacs internals is to read the code. Some 304The best way to understand Emacs internals is to read the code. Some
diff --git a/admin/merge-gnulib b/admin/merge-gnulib
index 85921ba1ba6..18c9ee8def7 100755
--- a/admin/merge-gnulib
+++ b/admin/merge-gnulib
@@ -30,15 +30,15 @@ GNULIB_MODULES='
30 careadlinkat close-stream 30 careadlinkat close-stream
31 count-leading-zeros count-one-bits count-trailing-zeros 31 count-leading-zeros count-one-bits count-trailing-zeros
32 crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 32 crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512
33 diffseq dtoastr dtotimespec dup2 environ execinfo faccessat 33 diffseq dtoastr dtotimespec dup2 environ execinfo explicit_bzero faccessat
34 fcntl fcntl-h fdatasync fdopendir 34 fcntl fcntl-h fdatasync fdopendir
35 filemode filevercmp flexmember fstatat fsync 35 filemode filevercmp flexmember fstatat fsync
36 getloadavg getopt-gnu gettime gettimeofday gitlog-to-changelog 36 getloadavg getopt-gnu gettime gettimeofday gitlog-to-changelog
37 ignore-value intprops largefile lstat 37 ignore-value intprops largefile lstat
38 manywarnings memrchr minmax mkostemp mktime 38 manywarnings memrchr minmax mkostemp mktime nstrftime
39 pipe2 pselect pthread_sigmask putenv qcopy-acl readlink readlinkat 39 pipe2 pselect pthread_sigmask putenv qcopy-acl readlink readlinkat
40 sig2str socklen stat-time std-gnu11 stdalign stddef stdio 40 sig2str socklen stat-time std-gnu11 stdalign stddef stdio
41 stpcpy strftime strtoimax symlink sys_stat 41 stpcpy strtoimax symlink sys_stat
42 sys_time time time_r time_rz timegm timer-time timespec-add timespec-sub 42 sys_time time time_r time_rz timegm timer-time timespec-add timespec-sub
43 update-copyright unlocked-io utimens 43 update-copyright unlocked-io utimens
44 vla warnings 44 vla warnings
diff --git a/admin/notes/hydra b/admin/notes/hydra
index d5959354b08..4c1944a57da 100644
--- a/admin/notes/hydra
+++ b/admin/notes/hydra
@@ -6,13 +6,12 @@ See the end of the file for license conditions.
6NOTES FOR EMACS CONTINUOUS BUILD ON HYDRA 6NOTES FOR EMACS CONTINUOUS BUILD ON HYDRA
7 7
8A continuous build for Emacs can be found at 8A continuous build for Emacs can be found at
9http://hydra.nixos.org/jobset/gnu/emacs-trunk 9https://hydra.nixos.org/jobset/gnu/emacs-trunk
10http://hydra.nixos.org/jobset/gnu/emacs-24
11 10
12* It builds Emacs on various platforms. 11* It builds Emacs on various platforms.
13Sometimes jobs fail due to hydra problems rather than Emacs problems. 12Sometimes jobs fail due to hydra problems rather than Emacs problems.
14Eg it seems like the cygwin build will never work again. 13Eg it seems like the darwin build will never work again.
15http://lists.gnu.org/archive/html/hydra-users/2013-08/msg00000.html 14https://lists.gnu.org/archive/html/hydra-users/2016-01/msg00000.html
16 15
17* Mail notifications 16* Mail notifications
18In addition to the web interface, Hydra can send notifications by 17In addition to the web interface, Hydra can send notifications by
@@ -21,7 +20,7 @@ SUCCEEDED to FAILED. It sends notifications about build status in
21Emacs trunk to emacs-buildstatus@gnu.org. 20Emacs trunk to emacs-buildstatus@gnu.org.
22 21
23If you want to receive these notifications, please subscribe at 22If you want to receive these notifications, please subscribe at
24http://lists.gnu.org/mailman/listinfo/emacs-buildstatus 23https://lists.gnu.org/mailman/listinfo/emacs-buildstatus
25 24
26* The Emacs jobset consists of the following jobs: 25* The Emacs jobset consists of the following jobs:
27 26
@@ -31,23 +30,29 @@ by running make-dist to create a tarball. If this job fails, all the
31others will too (because they use the tarball as input). 30others will too (because they use the tarball as input).
32 31
33** The 'build' job 32** The 'build' job
34which starts from the tarball and does a normal build 33which starts from the tarball and does a normal build.
35 34
36** The 'coverage' job 35** The 'coverage' job
37does a gcov build and then runs 'make check'. Fails if any test fails. 36does a gcov build and then runs 'make check-expensive'. Fails if any
37test fails.
38 38
39* Nix expressions 39* Nix expressions
40The recipe for GNU Emacs are available via Git: 40The recipe for GNU Emacs are available via Git:
41http://git.savannah.gnu.org/cgit/hydra-recipes.git/tree/emacs 41https://git.savannah.gnu.org/cgit/hydra-recipes.git/tree/emacs
42 42
43To modify the build job, email the patch to hydra-users@gnu.org. The 43To modify the build job, email the patch to hydra-users@gnu.org. The
44build recipes are written in the Nix language. 44build recipes are written in the Nix language.
45 45
46* Identifying hydra
47Lisp packages, Makefiles, scripts, and other software could determine
48whether they run on hydra by checking for the environment variable
49EMACS_HYDRA_CI.
50
46* Other Information 51* Other Information
47For a list of other GNU packages that have a continuous build on 52For a list of other GNU packages that have a continuous build on
48Hydra, see http://hydra.nixos.org/project/gnu 53Hydra, see https://hydra.nixos.org/project/gnu
49 54
50See http://www.gnu.org/software/devel.html#Hydra for more information. 55See https://www.gnu.org/software/devel.html#Hydra for more information.
51 56
52 57
53This file is part of GNU Emacs. 58This file is part of GNU Emacs.
diff --git a/admin/notes/unicode b/admin/notes/unicode
index 0d6c6af015f..8284e1b44cf 100644
--- a/admin/notes/unicode
+++ b/admin/notes/unicode
@@ -15,9 +15,10 @@ Emacs uses the following files from the Unicode Character Database
15 . BidiBrackets.txt 15 . BidiBrackets.txt
16 . IVD_Sequences.txt 16 . IVD_Sequences.txt
17 . NormalizationTest.txt 17 . NormalizationTest.txt
18 . SpecialCasing.txt
18 . BidiCharacterTest.txt 19 . BidiCharacterTest.txt
19 20
20First, the first 6 files need to be copied into admin/unidata/, and 21First, the first 7 files need to be copied into admin/unidata/, and
21then Emacs should be rebuilt for them to take effect. Rebuilding 22then Emacs should be rebuilt for them to take effect. Rebuilding
22Emacs updates several derived files elsewhere in the Emacs source 23Emacs updates several derived files elsewhere in the Emacs source
23tree, mainly in lisp/international/. 24tree, mainly in lisp/international/.
diff --git a/admin/unidata/BidiBrackets.txt b/admin/unidata/BidiBrackets.txt
index eb02a24bfc0..2114e632b9f 100644
--- a/admin/unidata/BidiBrackets.txt
+++ b/admin/unidata/BidiBrackets.txt
@@ -1,6 +1,6 @@
1# BidiBrackets-9.0.0.txt 1# BidiBrackets-10.0.0.txt
2# Date: 2016-06-07, 22:30:00 GMT [AG, LI, KW] 2# Date: 2017-04-12, 17:30:00 GMT [AG, LI, KW]
3# © 2016 Unicode®, Inc. 3# © 2017 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 http://www.unicode.org/terms_of_use.html
6# 6#
@@ -8,7 +8,7 @@
8# For documentation, see http://www.unicode.org/reports/tr44/ 8# For documentation, see http://www.unicode.org/reports/tr44/
9# 9#
10# Bidi_Paired_Bracket and Bidi_Paired_Bracket_Type Properties 10# Bidi_Paired_Bracket and Bidi_Paired_Bracket_Type Properties
11# 11#
12# This file is a normative contributory data file in the Unicode 12# This file is a normative contributory data file in the Unicode
13# Character Database. 13# Character Database.
14# 14#
diff --git a/admin/unidata/BidiMirroring.txt b/admin/unidata/BidiMirroring.txt
index 68142c5e326..cbb61c4b570 100644
--- a/admin/unidata/BidiMirroring.txt
+++ b/admin/unidata/BidiMirroring.txt
@@ -1,13 +1,13 @@
1# BidiMirroring-9.0.0.txt 1# BidiMirroring-10.0.0.txt
2# Date: 2016-01-21, 22:00:00 GMT [KW, LI] 2# Date: 2017-04-12, 17:30:00 GMT [KW, LI]
3# © 2016 Unicode®, Inc. 3# © 2017 Unicode®, Inc.
4# For terms of use, see http://www.unicode.org/terms_of_use.html 4# For terms of use, see http://www.unicode.org/terms_of_use.html
5# 5#
6# Unicode Character Database 6# Unicode Character Database
7# For documentation, see http://www.unicode.org/reports/tr44/ 7# For documentation, see http://www.unicode.org/reports/tr44/
8# 8#
9# Bidi_Mirroring_Glyph Property 9# Bidi_Mirroring_Glyph Property
10# 10#
11# This file is an informative contributory data file in the 11# This file is an informative contributory data file in the
12# Unicode Character Database. 12# Unicode Character Database.
13# 13#
@@ -15,20 +15,20 @@
15# value, for which there is another Unicode character that typically has a glyph 15# value, for which there is another Unicode character that typically has a glyph
16# that is the mirror image of the original character's glyph. 16# that is the mirror image of the original character's glyph.
17# 17#
18# The repertoire covered by the file is Unicode 9.0.0. 18# The repertoire covered by the file is Unicode 10.0.0.
19# 19#
20# The file contains a list of lines with mappings from one code point 20# The file contains a list of lines with mappings from one code point
21# to another one for character-based mirroring. 21# to another one for character-based mirroring.
22# Note that for "real" mirroring, a rendering engine needs to select 22# Note that for "real" mirroring, a rendering engine needs to select
23# appropriate alternative glyphs, and that many Unicode characters do not 23# appropriate alternative glyphs, and that many Unicode characters do not
24# have a mirror-image Unicode character. 24# have a mirror-image Unicode character.
25# 25#
26# Each mapping line contains two fields, separated by a semicolon (';'). 26# Each mapping line contains two fields, separated by a semicolon (';').
27# Each of the two fields contains a code point represented as a 27# Each of the two fields contains a code point represented as a
28# variable-length hexadecimal value with 4 to 6 digits. 28# variable-length hexadecimal value with 4 to 6 digits.
29# A comment indicates where the characters are "BEST FIT" mirroring. 29# A comment indicates where the characters are "BEST FIT" mirroring.
30# 30#
31# Code points for which Bidi_Mirrored=Yes, but for which no appropriate 31# Code points for which Bidi_Mirrored=Yes, but for which no appropriate
32# characters exist with mirrored glyphs, are 32# characters exist with mirrored glyphs, are
33# listed as comments at the end of the file. 33# listed as comments at the end of the file.
34# 34#
@@ -38,14 +38,14 @@
38# point has the default value for the Bidi_Mirroring_Glyph property, 38# point has the default value for the Bidi_Mirroring_Glyph property,
39# that means that no other character exists whose glyph is suitable 39# that means that no other character exists whose glyph is suitable
40# for character-based mirroring. 40# for character-based mirroring.
41# 41#
42# For information on bidi mirroring, see UAX #9: Unicode Bidirectional Algorithm, 42# For information on bidi mirroring, see UAX #9: Unicode Bidirectional Algorithm,
43# at http://www.unicode.org/unicode/reports/tr9/ 43# at http://www.unicode.org/unicode/reports/tr9/
44# 44#
45# This file was originally created by Markus Scherer. 45# This file was originally created by Markus Scherer.
46# Extended for Unicode 3.2, 4.0, 4.1, 5.0, 5.1, 5.2, and 6.0 by Ken Whistler, 46# Extended for Unicode 3.2, 4.0, 4.1, 5.0, 5.1, 5.2, and 6.0 by Ken Whistler,
47# and for subsequent versions by Ken Whistler and Laurentiu Iancu. 47# and for subsequent versions by Ken Whistler and Laurentiu Iancu.
48# 48#
49# ############################################################ 49# ############################################################
50# 50#
51# Property: Bidi_Mirroring_Glyph 51# Property: Bidi_Mirroring_Glyph
diff --git a/admin/unidata/Blocks.txt b/admin/unidata/Blocks.txt
index 74c41e58a81..a4f851b14a5 100644
--- a/admin/unidata/Blocks.txt
+++ b/admin/unidata/Blocks.txt
@@ -1,6 +1,6 @@
1# Blocks-9.0.0.txt 1# Blocks-10.0.0.txt
2# Date: 2016-02-05, 23:48:00 GMT [KW] 2# Date: 2017-04-12, 17:30:00 GMT [KW]
3# © 2016 Unicode®, Inc. 3# © 2017 Unicode®, Inc.
4# For terms of use, see http://www.unicode.org/terms_of_use.html 4# For terms of use, see http://www.unicode.org/terms_of_use.html
5# 5#
6# Unicode Character Database 6# Unicode Character Database
@@ -14,12 +14,12 @@
14# Note: When comparing block names, casing, whitespace, hyphens, 14# Note: When comparing block names, casing, whitespace, hyphens,
15# and underbars are ignored. 15# and underbars are ignored.
16# For example, "Latin Extended-A" and "latin extended a" are equivalent. 16# For example, "Latin Extended-A" and "latin extended a" are equivalent.
17# For more information on the comparison of property values, 17# For more information on the comparison of property values,
18# see UAX #44: http://www.unicode.org/reports/tr44/ 18# see UAX #44: http://www.unicode.org/reports/tr44/
19# 19#
20# All block ranges start with a value where (cp MOD 16) = 0, 20# All block ranges start with a value where (cp MOD 16) = 0,
21# and end with a value where (cp MOD 16) = 15. In other words, 21# and end with a value where (cp MOD 16) = 15. In other words,
22# the last hexadecimal digit of the start of range is ...0 22# the last hexadecimal digit of the start of range is ...0
23# and the last hexadecimal digit of the end of range is ...F. 23# and the last hexadecimal digit of the end of range is ...F.
24# This constraint on block ranges guarantees that allocations 24# This constraint on block ranges guarantees that allocations
25# are done in terms of whole columns, and that code chart display 25# are done in terms of whole columns, and that code chart display
@@ -51,6 +51,7 @@
5107C0..07FF; NKo 5107C0..07FF; NKo
520800..083F; Samaritan 520800..083F; Samaritan
530840..085F; Mandaic 530840..085F; Mandaic
540860..086F; Syriac Supplement
5408A0..08FF; Arabic Extended-A 5508A0..08FF; Arabic Extended-A
550900..097F; Devanagari 560900..097F; Devanagari
560980..09FF; Bengali 570980..09FF; Bengali
@@ -253,9 +254,12 @@ FFF0..FFFF; Specials
25311680..116CF; Takri 25411680..116CF; Takri
25411700..1173F; Ahom 25511700..1173F; Ahom
255118A0..118FF; Warang Citi 256118A0..118FF; Warang Citi
25711A00..11A4F; Zanabazar Square
25811A50..11AAF; Soyombo
25611AC0..11AFF; Pau Cin Hau 25911AC0..11AFF; Pau Cin Hau
25711C00..11C6F; Bhaiksuki 26011C00..11C6F; Bhaiksuki
25811C70..11CBF; Marchen 26111C70..11CBF; Marchen
26211D00..11D5F; Masaram Gondi
25912000..123FF; Cuneiform 26312000..123FF; Cuneiform
26012400..1247F; Cuneiform Numbers and Punctuation 26412400..1247F; Cuneiform Numbers and Punctuation
26112480..1254F; Early Dynastic Cuneiform 26512480..1254F; Early Dynastic Cuneiform
@@ -270,6 +274,8 @@ FFF0..FFFF; Specials
27017000..187FF; Tangut 27417000..187FF; Tangut
27118800..18AFF; Tangut Components 27518800..18AFF; Tangut Components
2721B000..1B0FF; Kana Supplement 2761B000..1B0FF; Kana Supplement
2771B100..1B12F; Kana Extended-A
2781B170..1B2FF; Nushu
2731BC00..1BC9F; Duployan 2791BC00..1BC9F; Duployan
2741BCA0..1BCAF; Shorthand Format Controls 2801BCA0..1BCAF; Shorthand Format Controls
2751D000..1D0FF; Byzantine Musical Symbols 2811D000..1D0FF; Byzantine Musical Symbols
@@ -300,6 +306,7 @@ FFF0..FFFF; Specials
3002A700..2B73F; CJK Unified Ideographs Extension C 3062A700..2B73F; CJK Unified Ideographs Extension C
3012B740..2B81F; CJK Unified Ideographs Extension D 3072B740..2B81F; CJK Unified Ideographs Extension D
3022B820..2CEAF; CJK Unified Ideographs Extension E 3082B820..2CEAF; CJK Unified Ideographs Extension E
3092CEB0..2EBEF; CJK Unified Ideographs Extension F
3032F800..2FA1F; CJK Compatibility Ideographs Supplement 3102F800..2FA1F; CJK Compatibility Ideographs Supplement
304E0000..E007F; Tags 311E0000..E007F; Tags
305E0100..E01EF; Variation Selectors Supplement 312E0100..E01EF; Variation Selectors Supplement
diff --git a/admin/unidata/IVD_Sequences.txt b/admin/unidata/IVD_Sequences.txt
index fdf21e8a308..304bf91d9b0 100644
--- a/admin/unidata/IVD_Sequences.txt
+++ b/admin/unidata/IVD_Sequences.txt
@@ -2,6 +2,9 @@
2# 2#
3# History: 3# History:
4# 4#
5# 2016-08-15 Combined registration of the MSARG collection and of
6# sequences in that collection.
7#
5# 2014-05-16 Combined registration of the Moji_Joho collection and of 8# 2014-05-16 Combined registration of the Moji_Joho collection and of
6# sequences in that collection. 9# sequences in that collection.
7# 10#
@@ -11,17 +14,17 @@
11# collection. Registration of additional sequences in the 14# collection. Registration of additional sequences in the
12# Hanyo-Denshi collection. 15# Hanyo-Denshi collection.
13# 16#
14# 2010-11-14 Combined registration of the Hanyo-Denshi collection and of 17# 2010-11-14 Combined registration of the Hanyo-Denshi collection and
15# sequences in that collection. 18# of sequences in that collection.
16# 19#
17# 2007-12-14 Combined registration of the Adobe-Japan1 collection and of 20# 2007-12-14 Combined registration of the Adobe-Japan1 collection and
18# sequences in that collection. 21# of sequences in that collection.
19# 22#
20# This file is part of the Unicode Ideographic Variation Database (IVD). 23# This file is part of the Unicode Ideographic Variation Database (IVD).
21# For more details on the IVD, see UTS #37: 24# For more details on the IVD, see UTS #37:
22# http://www.unicode.org/reports/tr37/ 25# http://www.unicode.org/reports/tr37/
23# 26#
24# Copyright 2006-2014 Unicode, Inc. 27# Copyright 2006-2016 Unicode, Inc.
25# For terms of use, see: http://www.unicode.org/terms_of_use.html 28# For terms of use, see: http://www.unicode.org/terms_of_use.html
26# 29#
273402 E0100; Adobe-Japan1; CID+13698 303402 E0100; Adobe-Japan1; CID+13698
@@ -268,6 +271,9 @@
26836C3 E0100; Hanyo-Denshi; IA1426 27136C3 E0100; Hanyo-Denshi; IA1426
26936C3 E0101; Hanyo-Denshi; TK01020180 27236C3 E0101; Hanyo-Denshi; TK01020180
27036C3 E0102; Hanyo-Denshi; TK01020240 27336C3 E0102; Hanyo-Denshi; TK01020240
27436C7 E0100; MSARG; MA_9856
27536C7 E0101; MSARG; ME_36C7_001
27636C7 E0102; MSARG; ME_36C7_002
27136CF E0100; Adobe-Japan1; CID+17494 27736CF E0100; Adobe-Japan1; CID+17494
27236EE E0100; Moji_Joho; MJ000648 27836EE E0100; Moji_Joho; MJ000648
27336EE E0101; Moji_Joho; MJ000649 27936EE E0101; Moji_Joho; MJ000649
@@ -4847,6 +4853,8 @@
48475554 E0101; Hanyo-Denshi; TK01014490 48535554 E0101; Hanyo-Denshi; TK01014490
48485556 E0100; Adobe-Japan1; CID+4394 48545556 E0100; Adobe-Japan1; CID+4394
48495557 E0100; Adobe-Japan1; CID+4395 48555557 E0100; Adobe-Japan1; CID+4395
48565557 E0101; MSARG; MB_B0E8
48575557 E0102; MSARG; ME_5557_001
48505558 E0100; Adobe-Japan1; CID+21280 48585558 E0100; Adobe-Japan1; CID+21280
4851555A E0100; Adobe-Japan1; CID+21281 4859555A E0100; Adobe-Japan1; CID+21281
4852555A E0101; Hanyo-Denshi; JB2162 4860555A E0101; Hanyo-Denshi; JB2162
@@ -8319,6 +8327,8 @@
83195EF8 E0100; Adobe-Japan1; CID+4762 83275EF8 E0100; Adobe-Japan1; CID+4762
83205EF8 E0101; Moji_Joho; MJ011106 83285EF8 E0101; Moji_Joho; MJ011106
83215EF8 E0102; Moji_Joho; MJ011107 83295EF8 E0102; Moji_Joho; MJ011107
83305EF8 E0103; MSARG; MA_9059
83315EF8 E0104; MSARG; ME_5EF8_001
83225EF9 E0100; Adobe-Japan1; CID+16853 83325EF9 E0100; Adobe-Japan1; CID+16853
83235EF9 E0101; Moji_Joho; MJ011108 83335EF9 E0101; Moji_Joho; MJ011108
83245EF9 E0102; Moji_Joho; MJ011109 83345EF9 E0102; Moji_Joho; MJ011109
@@ -8529,6 +8539,8 @@
85295F55 E0100; Moji_Joho; MJ011232 85395F55 E0100; Moji_Joho; MJ011232
85305F55 E0101; Hanyo-Denshi; KS112100 85405F55 E0101; Hanyo-Denshi; KS112100
85315F55 E0101; Moji_Joho; MJ057475 85415F55 E0101; Moji_Joho; MJ057475
85425F55 E0102; MSARG; MD_5F55
85435F55 E0103; MSARG; ME_5F55_001
85325F56 E0100; Adobe-Japan1; CID+4780 85445F56 E0100; Adobe-Japan1; CID+4780
85335F56 E0101; Hanyo-Denshi; JA5533 85455F56 E0101; Hanyo-Denshi; JA5533
85345F56 E0101; Moji_Joho; MJ011233 85465F56 E0101; Moji_Joho; MJ011233
@@ -26361,6 +26373,8 @@
263618846 E0105; Hanyo-Denshi; KS386520 263738846 E0105; Hanyo-Denshi; KS386520
263628846 E0105; Moji_Joho; MJ058677 263748846 E0105; Moji_Joho; MJ058677
263638846 E0106; Hanyo-Denshi; TK01083450 263758846 E0106; Hanyo-Denshi; TK01083450
263768846 E0107; MSARG; MA_8FBC
263778846 E0108; MSARG; ME_8846_001
263648848 E0100; Adobe-Japan1; CID+22465 263788848 E0100; Adobe-Japan1; CID+22465
263658849 E0100; Adobe-Japan1; CID+22466 263798849 E0100; Adobe-Japan1; CID+22466
26366884A E0100; Adobe-Japan1; CID+18635 26380884A E0100; Adobe-Japan1; CID+18635
@@ -31073,6 +31087,8 @@
3107393C5 E0101; Hanyo-Denshi; JB6930 3108793C5 E0101; Hanyo-Denshi; JB6930
3107493C5 E0102; Hanyo-Denshi; TK01093900 3108893C5 E0102; Hanyo-Denshi; TK01093900
3107593C6 E0100; Adobe-Japan1; CID+8679 3108993C6 E0100; Adobe-Japan1; CID+8679
3109093C6 E0101; MSARG; MA_9264
3109193C6 E0102; MSARG; ME_93C6_001
3107693C7 E0100; Adobe-Japan1; CID+18865 3109293C7 E0100; Adobe-Japan1; CID+18865
3107793C8 E0100; Adobe-Japan1; CID+7029 3109393C8 E0100; Adobe-Japan1; CID+7029
3107893C8 E0101; Hanyo-Denshi; JA7926 3109493C8 E0101; Hanyo-Denshi; JA7926
@@ -32678,6 +32694,8 @@
3267898EB E0102; Moji_Joho; MJ028359 3269498EB E0102; Moji_Joho; MJ028359
3267998EB E0103; Hanyo-Denshi; FT2689 3269598EB E0103; Hanyo-Denshi; FT2689
3268098EB E0103; Moji_Joho; MJ028358 3269698EB E0103; Moji_Joho; MJ028358
3269798EC E0100; MSARG; MA_914B
3269898EC E0101; MSARG; ME_98EC_001
3268198ED E0100; Adobe-Japan1; CID+4289 3269998ED E0100; Adobe-Japan1; CID+4289
3268298ED E0101; Hanyo-Denshi; JA5012 3270098ED E0101; Hanyo-Denshi; JA5012
3268398ED E0101; Moji_Joho; MJ028362 3270198ED E0101; Moji_Joho; MJ028362
@@ -33545,6 +33563,8 @@
335459AE3 E0100; Adobe-Japan1; CID+7278 335639AE3 E0100; Adobe-Japan1; CID+7278
335469AE4 E0100; Adobe-Japan1; CID+22934 335649AE4 E0100; Adobe-Japan1; CID+22934
335479AE5 E0100; Adobe-Japan1; CID+19007 335659AE5 E0100; Adobe-Japan1; CID+19007
335669AE5 E0101; MSARG; MD_9AE5
335679AE5 E0102; MSARG; ME_9AE5_001
335489AE6 E0100; Adobe-Japan1; CID+7279 335689AE6 E0100; Adobe-Japan1; CID+7279
335499AE7 E0100; Adobe-Japan1; CID+22935 335699AE7 E0100; Adobe-Japan1; CID+22935
335509AE9 E0100; Adobe-Japan1; CID+19008 335709AE9 E0100; Adobe-Japan1; CID+19008
@@ -35487,6 +35507,8 @@ FA29 E0100; Adobe-Japan1; CID+8687
3548720C50 E0101; Moji_Joho; MJ057161 3550720C50 E0101; Moji_Joho; MJ057161
3548820C74 E0100; Hanyo-Denshi; KS041540 3550820C74 E0100; Hanyo-Denshi; KS041540
3548920C74 E0101; Hanyo-Denshi; TK01014200 3550920C74 E0101; Hanyo-Denshi; TK01014200
3551020C98 E0100; MSARG; MD_20C98
3551120C98 E0101; MSARG; ME_20C98_001
3549020C9C E0100; Hanyo-Denshi; TK01014280 3551220C9C E0100; Hanyo-Denshi; TK01014280
3549120C9C E0101; Hanyo-Denshi; TK01014620 3551320C9C E0101; Hanyo-Denshi; TK01014620
3549220D45 E0100; Adobe-Japan1; CID+17359 3551420D45 E0100; Adobe-Japan1; CID+17359
@@ -35689,6 +35711,8 @@ FA29 E0100; Adobe-Japan1; CID+8687
3568921A41 E0101; Hanyo-Denshi; TK01022390 3571121A41 E0101; Hanyo-Denshi; TK01022390
3569021A62 E0100; Hanyo-Denshi; KS082510 3571221A62 E0100; Hanyo-Denshi; KS082510
3569121A62 E0101; Hanyo-Denshi; TK01022590 3571321A62 E0101; Hanyo-Denshi; TK01022590
3571421A74 E0100; MSARG; MD_21A74
3571521A74 E0101; MSARG; ME_21A74_001
3569221AA2 E0100; Moji_Joho; MJ034079 3571621AA2 E0100; Moji_Joho; MJ034079
3569321AA2 E0101; Moji_Joho; MJ034080 3571721AA2 E0101; Moji_Joho; MJ034080
3569421B33 E0100; Hanyo-Denshi; KS084630 3571821B33 E0100; Hanyo-Denshi; KS084630
diff --git a/admin/unidata/NormalizationTest.txt b/admin/unidata/NormalizationTest.txt
index e133fa8a788..71f2371c5eb 100644
--- a/admin/unidata/NormalizationTest.txt
+++ b/admin/unidata/NormalizationTest.txt
@@ -1,6 +1,6 @@
1# NormalizationTest-9.0.0.txt 1# NormalizationTest-10.0.0.txt
2# Date: 2016-04-04, 11:41:55 GMT 2# Date: 2017-03-08, 08:41:55 GMT
3# © 2016 Unicode®, Inc. 3# © 2017 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 http://www.unicode.org/terms_of_use.html
6# 6#
@@ -17653,6 +17653,10 @@ FFEE;FFEE;FFEE;25CB;25CB; # (○; ○; ○; ○; ○; ) HALFWIDTH WHITE CIRCLE
176530061 0CBC 3099 093C 0334 0062;0061 0334 0CBC 093C 3099 0062;0061 0334 0CBC 093C 3099 0062;0061 0334 0CBC 093C 3099 0062;0061 0334 0CBC 093C 3099 0062; # (a◌಼◌゙◌़◌̴b; a◌̴◌಼◌़◌゙b; a◌̴◌಼◌़◌゙b; a◌̴◌಼◌़◌゙b; a◌̴◌಼◌़◌゙b; ) LATIN SMALL LETTER A, KANNADA SIGN NUKTA, COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK, DEVANAGARI SIGN NUKTA, COMBINING TILDE OVERLAY, LATIN SMALL LETTER B 176530061 0CBC 3099 093C 0334 0062;0061 0334 0CBC 093C 3099 0062;0061 0334 0CBC 093C 3099 0062;0061 0334 0CBC 093C 3099 0062;0061 0334 0CBC 093C 3099 0062; # (a◌಼◌゙◌़◌̴b; a◌̴◌಼◌़◌゙b; a◌̴◌಼◌़◌゙b; a◌̴◌಼◌़◌゙b; a◌̴◌಼◌़◌゙b; ) LATIN SMALL LETTER A, KANNADA SIGN NUKTA, COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK, DEVANAGARI SIGN NUKTA, COMBINING TILDE OVERLAY, LATIN SMALL LETTER B
176540061 05B0 094D 3099 0CCD 0062;0061 3099 094D 0CCD 05B0 0062;0061 3099 094D 0CCD 05B0 0062;0061 3099 094D 0CCD 05B0 0062;0061 3099 094D 0CCD 05B0 0062; # (a◌ְ◌्◌゙◌್b; a◌゙◌्◌್◌ְb; a◌゙◌्◌್◌ְb; a◌゙◌्◌್◌ְb; a◌゙◌्◌್◌ְb; ) LATIN SMALL LETTER A, HEBREW POINT SHEVA, DEVANAGARI SIGN VIRAMA, COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK, KANNADA SIGN VIRAMA, LATIN SMALL LETTER B 176540061 05B0 094D 3099 0CCD 0062;0061 3099 094D 0CCD 05B0 0062;0061 3099 094D 0CCD 05B0 0062;0061 3099 094D 0CCD 05B0 0062;0061 3099 094D 0CCD 05B0 0062; # (a◌ְ◌्◌゙◌್b; a◌゙◌्◌್◌ְb; a◌゙◌्◌್◌ְb; a◌゙◌्◌್◌ְb; a◌゙◌्◌್◌ְb; ) LATIN SMALL LETTER A, HEBREW POINT SHEVA, DEVANAGARI SIGN VIRAMA, COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK, KANNADA SIGN VIRAMA, LATIN SMALL LETTER B
176550061 0CCD 05B0 094D 3099 0062;0061 3099 0CCD 094D 05B0 0062;0061 3099 0CCD 094D 05B0 0062;0061 3099 0CCD 094D 05B0 0062;0061 3099 0CCD 094D 05B0 0062; # (a◌್◌ְ◌्◌゙b; a◌゙◌್◌्◌ְb; a◌゙◌್◌्◌ְb; a◌゙◌್◌्◌ְb; a◌゙◌್◌्◌ְb; ) LATIN SMALL LETTER A, KANNADA SIGN VIRAMA, HEBREW POINT SHEVA, DEVANAGARI SIGN VIRAMA, COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK, LATIN SMALL LETTER B 176550061 0CCD 05B0 094D 3099 0062;0061 3099 0CCD 094D 05B0 0062;0061 3099 0CCD 094D 05B0 0062;0061 3099 0CCD 094D 05B0 0062;0061 3099 0CCD 094D 05B0 0062; # (a◌್◌ְ◌्◌゙b; a◌゙◌್◌्◌ְb; a◌゙◌್◌्◌ְb; a◌゙◌್◌्◌ְb; a◌゙◌್◌्◌ְb; ) LATIN SMALL LETTER A, KANNADA SIGN VIRAMA, HEBREW POINT SHEVA, DEVANAGARI SIGN VIRAMA, COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK, LATIN SMALL LETTER B
176560061 05B0 094D 3099 0D3B 0062;0061 3099 094D 0D3B 05B0 0062;0061 3099 094D 0D3B 05B0 0062;0061 3099 094D 0D3B 05B0 0062;0061 3099 094D 0D3B 05B0 0062; # (a◌ְ◌्◌゙◌഻b; a◌゙◌्◌഻◌ְb; a◌゙◌्◌഻◌ְb; a◌゙◌्◌഻◌ְb; a◌゙◌्◌഻◌ְb; ) LATIN SMALL LETTER A, HEBREW POINT SHEVA, DEVANAGARI SIGN VIRAMA, COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK, MALAYALAM SIGN VERTICAL BAR VIRAMA, LATIN SMALL LETTER B
176570061 0D3B 05B0 094D 3099 0062;0061 3099 0D3B 094D 05B0 0062;0061 3099 0D3B 094D 05B0 0062;0061 3099 0D3B 094D 05B0 0062;0061 3099 0D3B 094D 05B0 0062; # (a◌഻◌ְ◌्◌゙b; a◌゙◌഻◌्◌ְb; a◌゙◌഻◌्◌ְb; a◌゙◌഻◌्◌ְb; a◌゙◌഻◌्◌ְb; ) LATIN SMALL LETTER A, MALAYALAM SIGN VERTICAL BAR VIRAMA, HEBREW POINT SHEVA, DEVANAGARI SIGN VIRAMA, COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK, LATIN SMALL LETTER B
176580061 05B0 094D 3099 0D3C 0062;0061 3099 094D 0D3C 05B0 0062;0061 3099 094D 0D3C 05B0 0062;0061 3099 094D 0D3C 05B0 0062;0061 3099 094D 0D3C 05B0 0062; # (a◌ְ◌्◌゙◌഼b; a◌゙◌्◌഼◌ְb; a◌゙◌्◌഼◌ְb; a◌゙◌्◌഼◌ְb; a◌゙◌्◌഼◌ְb; ) LATIN SMALL LETTER A, HEBREW POINT SHEVA, DEVANAGARI SIGN VIRAMA, COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK, MALAYALAM SIGN CIRCULAR VIRAMA, LATIN SMALL LETTER B
176590061 0D3C 05B0 094D 3099 0062;0061 3099 0D3C 094D 05B0 0062;0061 3099 0D3C 094D 05B0 0062;0061 3099 0D3C 094D 05B0 0062;0061 3099 0D3C 094D 05B0 0062; # (a◌഼◌ְ◌्◌゙b; a◌゙◌഼◌्◌ְb; a◌゙◌഼◌्◌ְb; a◌゙◌഼◌्◌ְb; a◌゙◌഼◌्◌ְb; ) LATIN SMALL LETTER A, MALAYALAM SIGN CIRCULAR VIRAMA, HEBREW POINT SHEVA, DEVANAGARI SIGN VIRAMA, COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK, LATIN SMALL LETTER B
176560061 05B0 094D 3099 0D4D 0062;0061 3099 094D 0D4D 05B0 0062;0061 3099 094D 0D4D 05B0 0062;0061 3099 094D 0D4D 05B0 0062;0061 3099 094D 0D4D 05B0 0062; # (a◌ְ◌्◌゙◌്b; a◌゙◌्◌്◌ְb; a◌゙◌्◌്◌ְb; a◌゙◌्◌്◌ְb; a◌゙◌्◌്◌ְb; ) LATIN SMALL LETTER A, HEBREW POINT SHEVA, DEVANAGARI SIGN VIRAMA, COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK, MALAYALAM SIGN VIRAMA, LATIN SMALL LETTER B 176600061 05B0 094D 3099 0D4D 0062;0061 3099 094D 0D4D 05B0 0062;0061 3099 094D 0D4D 05B0 0062;0061 3099 094D 0D4D 05B0 0062;0061 3099 094D 0D4D 05B0 0062; # (a◌ְ◌्◌゙◌്b; a◌゙◌्◌്◌ְb; a◌゙◌्◌്◌ְb; a◌゙◌्◌്◌ְb; a◌゙◌्◌്◌ְb; ) LATIN SMALL LETTER A, HEBREW POINT SHEVA, DEVANAGARI SIGN VIRAMA, COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK, MALAYALAM SIGN VIRAMA, LATIN SMALL LETTER B
176570061 0D4D 05B0 094D 3099 0062;0061 3099 0D4D 094D 05B0 0062;0061 3099 0D4D 094D 05B0 0062;0061 3099 0D4D 094D 05B0 0062;0061 3099 0D4D 094D 05B0 0062; # (a◌്◌ְ◌्◌゙b; a◌゙◌്◌्◌ְb; a◌゙◌്◌्◌ְb; a◌゙◌്◌्◌ְb; a◌゙◌്◌्◌ְb; ) LATIN SMALL LETTER A, MALAYALAM SIGN VIRAMA, HEBREW POINT SHEVA, DEVANAGARI SIGN VIRAMA, COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK, LATIN SMALL LETTER B 176610061 0D4D 05B0 094D 3099 0062;0061 3099 0D4D 094D 05B0 0062;0061 3099 0D4D 094D 05B0 0062;0061 3099 0D4D 094D 05B0 0062;0061 3099 0D4D 094D 05B0 0062; # (a◌്◌ְ◌्◌゙b; a◌゙◌്◌्◌ְb; a◌゙◌്◌्◌ְb; a◌゙◌്◌्◌ְb; a◌゙◌്◌्◌ְb; ) LATIN SMALL LETTER A, MALAYALAM SIGN VIRAMA, HEBREW POINT SHEVA, DEVANAGARI SIGN VIRAMA, COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK, LATIN SMALL LETTER B
176580061 05B0 094D 3099 0DCA 0062;0061 3099 094D 0DCA 05B0 0062;0061 3099 094D 0DCA 05B0 0062;0061 3099 094D 0DCA 05B0 0062;0061 3099 094D 0DCA 05B0 0062; # (a◌ְ◌्◌゙◌්b; a◌゙◌्◌්◌ְb; a◌゙◌्◌්◌ְb; a◌゙◌्◌්◌ְb; a◌゙◌्◌්◌ְb; ) LATIN SMALL LETTER A, HEBREW POINT SHEVA, DEVANAGARI SIGN VIRAMA, COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK, SINHALA SIGN AL-LAKUNA, LATIN SMALL LETTER B 176620061 05B0 094D 3099 0DCA 0062;0061 3099 094D 0DCA 05B0 0062;0061 3099 094D 0DCA 05B0 0062;0061 3099 094D 0DCA 05B0 0062;0061 3099 094D 0DCA 05B0 0062; # (a◌ְ◌्◌゙◌්b; a◌゙◌्◌්◌ְb; a◌゙◌्◌්◌ְb; a◌゙◌्◌්◌ְb; a◌゙◌्◌්◌ְb; ) LATIN SMALL LETTER A, HEBREW POINT SHEVA, DEVANAGARI SIGN VIRAMA, COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK, SINHALA SIGN AL-LAKUNA, LATIN SMALL LETTER B
@@ -17999,6 +18003,14 @@ FFEE;FFEE;FFEE;25CB;25CB; # (○; ○; ○; ○; ○; ) HALFWIDTH WHITE CIRCLE
179990061 1DF4 0315 0300 05AE 0062;0061 05AE 1DF4 0300 0315 0062;0061 05AE 1DF4 0300 0315 0062;0061 05AE 1DF4 0300 0315 0062;0061 05AE 1DF4 0300 0315 0062; # (a◌ᷴ◌̕◌̀◌֮b; a◌֮◌ᷴ◌̀◌̕b; a◌֮◌ᷴ◌̀◌̕b; a◌֮◌ᷴ◌̀◌̕b; a◌֮◌ᷴ◌̀◌̕b; ) LATIN SMALL LETTER A, COMBINING LATIN SMALL LETTER U WITH DIAERESIS, COMBINING COMMA ABOVE RIGHT, COMBINING GRAVE ACCENT, HEBREW ACCENT ZINOR, LATIN SMALL LETTER B 180030061 1DF4 0315 0300 05AE 0062;0061 05AE 1DF4 0300 0315 0062;0061 05AE 1DF4 0300 0315 0062;0061 05AE 1DF4 0300 0315 0062;0061 05AE 1DF4 0300 0315 0062; # (a◌ᷴ◌̕◌̀◌֮b; a◌֮◌ᷴ◌̀◌̕b; a◌֮◌ᷴ◌̀◌̕b; a◌֮◌ᷴ◌̀◌̕b; a◌֮◌ᷴ◌̀◌̕b; ) LATIN SMALL LETTER A, COMBINING LATIN SMALL LETTER U WITH DIAERESIS, COMBINING COMMA ABOVE RIGHT, COMBINING GRAVE ACCENT, HEBREW ACCENT ZINOR, LATIN SMALL LETTER B
180000061 0315 0300 05AE 1DF5 0062;00E0 05AE 1DF5 0315 0062;0061 05AE 0300 1DF5 0315 0062;00E0 05AE 1DF5 0315 0062;0061 05AE 0300 1DF5 0315 0062; # (a◌̕◌̀◌֮◌᷵b; à◌֮◌᷵◌̕b; a◌֮◌̀◌᷵◌̕b; à◌֮◌᷵◌̕b; a◌֮◌̀◌᷵◌̕b; ) LATIN SMALL LETTER A, COMBINING COMMA ABOVE RIGHT, COMBINING GRAVE ACCENT, HEBREW ACCENT ZINOR, COMBINING UP TACK ABOVE, LATIN SMALL LETTER B 180040061 0315 0300 05AE 1DF5 0062;00E0 05AE 1DF5 0315 0062;0061 05AE 0300 1DF5 0315 0062;00E0 05AE 1DF5 0315 0062;0061 05AE 0300 1DF5 0315 0062; # (a◌̕◌̀◌֮◌᷵b; à◌֮◌᷵◌̕b; a◌֮◌̀◌᷵◌̕b; à◌֮◌᷵◌̕b; a◌֮◌̀◌᷵◌̕b; ) LATIN SMALL LETTER A, COMBINING COMMA ABOVE RIGHT, COMBINING GRAVE ACCENT, HEBREW ACCENT ZINOR, COMBINING UP TACK ABOVE, LATIN SMALL LETTER B
180010061 1DF5 0315 0300 05AE 0062;0061 05AE 1DF5 0300 0315 0062;0061 05AE 1DF5 0300 0315 0062;0061 05AE 1DF5 0300 0315 0062;0061 05AE 1DF5 0300 0315 0062; # (a◌᷵◌̕◌̀◌֮b; a◌֮◌᷵◌̀◌̕b; a◌֮◌᷵◌̀◌̕b; a◌֮◌᷵◌̀◌̕b; a◌֮◌᷵◌̀◌̕b; ) LATIN SMALL LETTER A, COMBINING UP TACK ABOVE, COMBINING COMMA ABOVE RIGHT, COMBINING GRAVE ACCENT, HEBREW ACCENT ZINOR, LATIN SMALL LETTER B 180050061 1DF5 0315 0300 05AE 0062;0061 05AE 1DF5 0300 0315 0062;0061 05AE 1DF5 0300 0315 0062;0061 05AE 1DF5 0300 0315 0062;0061 05AE 1DF5 0300 0315 0062; # (a◌᷵◌̕◌̀◌֮b; a◌֮◌᷵◌̀◌̕b; a◌֮◌᷵◌̀◌̕b; a◌֮◌᷵◌̀◌̕b; a◌֮◌᷵◌̀◌̕b; ) LATIN SMALL LETTER A, COMBINING UP TACK ABOVE, COMBINING COMMA ABOVE RIGHT, COMBINING GRAVE ACCENT, HEBREW ACCENT ZINOR, LATIN SMALL LETTER B
180060061 035C 0315 0300 1DF6 0062;00E0 0315 1DF6 035C 0062;0061 0300 0315 1DF6 035C 0062;00E0 0315 1DF6 035C 0062;0061 0300 0315 1DF6 035C 0062; # (a◌͜◌̕◌̀◌᷶b; à◌̕◌᷶◌͜b; a◌̀◌̕◌᷶◌͜b; à◌̕◌᷶◌͜b; a◌̀◌̕◌᷶◌͜b; ) LATIN SMALL LETTER A, COMBINING DOUBLE BREVE BELOW, COMBINING COMMA ABOVE RIGHT, COMBINING GRAVE ACCENT, COMBINING KAVYKA ABOVE RIGHT, LATIN SMALL LETTER B
180070061 1DF6 035C 0315 0300 0062;00E0 1DF6 0315 035C 0062;0061 0300 1DF6 0315 035C 0062;00E0 1DF6 0315 035C 0062;0061 0300 1DF6 0315 035C 0062; # (a◌᷶◌͜◌̕◌̀b; à◌᷶◌̕◌͜b; a◌̀◌᷶◌̕◌͜b; à◌᷶◌̕◌͜b; a◌̀◌᷶◌̕◌͜b; ) LATIN SMALL LETTER A, COMBINING KAVYKA ABOVE RIGHT, COMBINING DOUBLE BREVE BELOW, COMBINING COMMA ABOVE RIGHT, COMBINING GRAVE ACCENT, LATIN SMALL LETTER B
180080061 0300 05AE 1D16D 1DF7 0062;00E0 1D16D 05AE 1DF7 0062;0061 1D16D 05AE 1DF7 0300 0062;00E0 1D16D 05AE 1DF7 0062;0061 1D16D 05AE 1DF7 0300 0062; # (a◌̀◌𝅭֮◌᷷b; à𝅭◌֮◌᷷b; a𝅭◌֮◌᷷◌̀b; à𝅭◌֮◌᷷b; a𝅭◌֮◌᷷◌̀b; ) LATIN SMALL LETTER A, COMBINING GRAVE ACCENT, HEBREW ACCENT ZINOR, MUSICAL SYMBOL COMBINING AUGMENTATION DOT, COMBINING KAVYKA ABOVE LEFT, LATIN SMALL LETTER B
180090061 1DF7 0300 05AE 1D16D 0062;00E0 1D16D 1DF7 05AE 0062;0061 1D16D 1DF7 05AE 0300 0062;00E0 1D16D 1DF7 05AE 0062;0061 1D16D 1DF7 05AE 0300 0062; # (a◌᷷◌̀◌𝅭֮b; à𝅭◌᷷◌֮b; a𝅭◌᷷◌֮◌̀b; à𝅭◌᷷◌֮b; a𝅭◌᷷◌֮◌̀b; ) LATIN SMALL LETTER A, COMBINING KAVYKA ABOVE LEFT, COMBINING GRAVE ACCENT, HEBREW ACCENT ZINOR, MUSICAL SYMBOL COMBINING AUGMENTATION DOT, LATIN SMALL LETTER B
180100061 0300 05AE 1D16D 1DF8 0062;00E0 1D16D 05AE 1DF8 0062;0061 1D16D 05AE 1DF8 0300 0062;00E0 1D16D 05AE 1DF8 0062;0061 1D16D 05AE 1DF8 0300 0062; # (a◌̀◌𝅭֮◌᷸b; à𝅭◌֮◌᷸b; a𝅭◌֮◌᷸◌̀b; à𝅭◌֮◌᷸b; a𝅭◌֮◌᷸◌̀b; ) LATIN SMALL LETTER A, COMBINING GRAVE ACCENT, HEBREW ACCENT ZINOR, MUSICAL SYMBOL COMBINING AUGMENTATION DOT, COMBINING DOT ABOVE LEFT, LATIN SMALL LETTER B
180110061 1DF8 0300 05AE 1D16D 0062;00E0 1D16D 1DF8 05AE 0062;0061 1D16D 1DF8 05AE 0300 0062;00E0 1D16D 1DF8 05AE 0062;0061 1D16D 1DF8 05AE 0300 0062; # (a◌᷸◌̀◌𝅭֮b; à𝅭◌᷸◌֮b; a𝅭◌᷸◌֮◌̀b; à𝅭◌᷸◌֮b; a𝅭◌᷸◌֮◌̀b; ) LATIN SMALL LETTER A, COMBINING DOT ABOVE LEFT, COMBINING GRAVE ACCENT, HEBREW ACCENT ZINOR, MUSICAL SYMBOL COMBINING AUGMENTATION DOT, LATIN SMALL LETTER B
180120061 059A 0316 302A 1DF9 0062;0061 302A 0316 1DF9 059A 0062;0061 302A 0316 1DF9 059A 0062;0061 302A 0316 1DF9 059A 0062;0061 302A 0316 1DF9 059A 0062; # (a◌֚◌̖◌〪◌᷹b; a◌〪◌̖◌᷹◌֚b; a◌〪◌̖◌᷹◌֚b; a◌〪◌̖◌᷹◌֚b; a◌〪◌̖◌᷹◌֚b; ) LATIN SMALL LETTER A, HEBREW ACCENT YETIV, COMBINING GRAVE ACCENT BELOW, IDEOGRAPHIC LEVEL TONE MARK, COMBINING WIDE INVERTED BRIDGE BELOW, LATIN SMALL LETTER B
180130061 1DF9 059A 0316 302A 0062;0061 302A 1DF9 0316 059A 0062;0061 302A 1DF9 0316 059A 0062;0061 302A 1DF9 0316 059A 0062;0061 302A 1DF9 0316 059A 0062; # (a◌᷹◌֚◌̖◌〪b; a◌〪◌᷹◌̖◌֚b; a◌〪◌᷹◌̖◌֚b; a◌〪◌᷹◌̖◌֚b; a◌〪◌᷹◌̖◌֚b; ) LATIN SMALL LETTER A, COMBINING WIDE INVERTED BRIDGE BELOW, HEBREW ACCENT YETIV, COMBINING GRAVE ACCENT BELOW, IDEOGRAPHIC LEVEL TONE MARK, LATIN SMALL LETTER B
180020061 0315 0300 05AE 1DFB 0062;00E0 05AE 1DFB 0315 0062;0061 05AE 0300 1DFB 0315 0062;00E0 05AE 1DFB 0315 0062;0061 05AE 0300 1DFB 0315 0062; # (a◌̕◌̀◌֮◌᷻b; à◌֮◌᷻◌̕b; a◌֮◌̀◌᷻◌̕b; à◌֮◌᷻◌̕b; a◌֮◌̀◌᷻◌̕b; ) LATIN SMALL LETTER A, COMBINING COMMA ABOVE RIGHT, COMBINING GRAVE ACCENT, HEBREW ACCENT ZINOR, COMBINING DELETION MARK, LATIN SMALL LETTER B 180140061 0315 0300 05AE 1DFB 0062;00E0 05AE 1DFB 0315 0062;0061 05AE 0300 1DFB 0315 0062;00E0 05AE 1DFB 0315 0062;0061 05AE 0300 1DFB 0315 0062; # (a◌̕◌̀◌֮◌᷻b; à◌֮◌᷻◌̕b; a◌֮◌̀◌᷻◌̕b; à◌֮◌᷻◌̕b; a◌֮◌̀◌᷻◌̕b; ) LATIN SMALL LETTER A, COMBINING COMMA ABOVE RIGHT, COMBINING GRAVE ACCENT, HEBREW ACCENT ZINOR, COMBINING DELETION MARK, LATIN SMALL LETTER B
180030061 1DFB 0315 0300 05AE 0062;0061 05AE 1DFB 0300 0315 0062;0061 05AE 1DFB 0300 0315 0062;0061 05AE 1DFB 0300 0315 0062;0061 05AE 1DFB 0300 0315 0062; # (a◌᷻◌̕◌̀◌֮b; a◌֮◌᷻◌̀◌̕b; a◌֮◌᷻◌̀◌̕b; a◌֮◌᷻◌̀◌̕b; a◌֮◌᷻◌̀◌̕b; ) LATIN SMALL LETTER A, COMBINING DELETION MARK, COMBINING COMMA ABOVE RIGHT, COMBINING GRAVE ACCENT, HEBREW ACCENT ZINOR, LATIN SMALL LETTER B 180150061 1DFB 0315 0300 05AE 0062;0061 05AE 1DFB 0300 0315 0062;0061 05AE 1DFB 0300 0315 0062;0061 05AE 1DFB 0300 0315 0062;0061 05AE 1DFB 0300 0315 0062; # (a◌᷻◌̕◌̀◌֮b; a◌֮◌᷻◌̀◌̕b; a◌֮◌᷻◌̀◌̕b; a◌֮◌᷻◌̀◌̕b; a◌֮◌᷻◌̀◌̕b; ) LATIN SMALL LETTER A, COMBINING DELETION MARK, COMBINING COMMA ABOVE RIGHT, COMBINING GRAVE ACCENT, HEBREW ACCENT ZINOR, LATIN SMALL LETTER B
180040061 035D 035C 0315 1DFC 0062;0061 0315 035C 1DFC 035D 0062;0061 0315 035C 1DFC 035D 0062;0061 0315 035C 1DFC 035D 0062;0061 0315 035C 1DFC 035D 0062; # (a◌͝◌͜◌̕◌᷼b; a◌̕◌͜◌᷼◌͝b; a◌̕◌͜◌᷼◌͝b; a◌̕◌͜◌᷼◌͝b; a◌̕◌͜◌᷼◌͝b; ) LATIN SMALL LETTER A, COMBINING DOUBLE BREVE, COMBINING DOUBLE BREVE BELOW, COMBINING COMMA ABOVE RIGHT, COMBINING DOUBLE INVERTED BREVE BELOW, LATIN SMALL LETTER B 180160061 035D 035C 0315 1DFC 0062;0061 0315 035C 1DFC 035D 0062;0061 0315 035C 1DFC 035D 0062;0061 0315 035C 1DFC 035D 0062;0061 0315 035C 1DFC 035D 0062; # (a◌͝◌͜◌̕◌᷼b; a◌̕◌͜◌᷼◌͝b; a◌̕◌͜◌᷼◌͝b; a◌̕◌͜◌᷼◌͝b; a◌̕◌͜◌᷼◌͝b; ) LATIN SMALL LETTER A, COMBINING DOUBLE BREVE, COMBINING DOUBLE BREVE BELOW, COMBINING COMMA ABOVE RIGHT, COMBINING DOUBLE INVERTED BREVE BELOW, LATIN SMALL LETTER B
@@ -18397,8 +18409,20 @@ FFEE;FFEE;FFEE;25CB;25CB; # (○; ○; ○; ○; ○; ) HALFWIDTH WHITE CIRCLE
183970061 116B7 3099 093C 0334 0062;0061 0334 116B7 093C 3099 0062;0061 0334 116B7 093C 3099 0062;0061 0334 116B7 093C 3099 0062;0061 0334 116B7 093C 3099 0062; # (a◌𑚷◌゙◌़◌̴b; a◌̴◌𑚷◌़◌゙b; a◌̴◌𑚷◌़◌゙b; a◌̴◌𑚷◌़◌゙b; a◌̴◌𑚷◌़◌゙b; ) LATIN SMALL LETTER A, TAKRI SIGN NUKTA, COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK, DEVANAGARI SIGN NUKTA, COMBINING TILDE OVERLAY, LATIN SMALL LETTER B 184090061 116B7 3099 093C 0334 0062;0061 0334 116B7 093C 3099 0062;0061 0334 116B7 093C 3099 0062;0061 0334 116B7 093C 3099 0062;0061 0334 116B7 093C 3099 0062; # (a◌𑚷◌゙◌़◌̴b; a◌̴◌𑚷◌़◌゙b; a◌̴◌𑚷◌़◌゙b; a◌̴◌𑚷◌़◌゙b; a◌̴◌𑚷◌़◌゙b; ) LATIN SMALL LETTER A, TAKRI SIGN NUKTA, COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK, DEVANAGARI SIGN NUKTA, COMBINING TILDE OVERLAY, LATIN SMALL LETTER B
183980061 05B0 094D 3099 1172B 0062;0061 3099 094D 1172B 05B0 0062;0061 3099 094D 1172B 05B0 0062;0061 3099 094D 1172B 05B0 0062;0061 3099 094D 1172B 05B0 0062; # (a◌ְ◌्◌゙◌𑜫b; a◌゙◌्◌𑜫◌ְb; a◌゙◌्◌𑜫◌ְb; a◌゙◌्◌𑜫◌ְb; a◌゙◌्◌𑜫◌ְb; ) LATIN SMALL LETTER A, HEBREW POINT SHEVA, DEVANAGARI SIGN VIRAMA, COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK, AHOM SIGN KILLER, LATIN SMALL LETTER B 184100061 05B0 094D 3099 1172B 0062;0061 3099 094D 1172B 05B0 0062;0061 3099 094D 1172B 05B0 0062;0061 3099 094D 1172B 05B0 0062;0061 3099 094D 1172B 05B0 0062; # (a◌ְ◌्◌゙◌𑜫b; a◌゙◌्◌𑜫◌ְb; a◌゙◌्◌𑜫◌ְb; a◌゙◌्◌𑜫◌ְb; a◌゙◌्◌𑜫◌ְb; ) LATIN SMALL LETTER A, HEBREW POINT SHEVA, DEVANAGARI SIGN VIRAMA, COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK, AHOM SIGN KILLER, LATIN SMALL LETTER B
183990061 1172B 05B0 094D 3099 0062;0061 3099 1172B 094D 05B0 0062;0061 3099 1172B 094D 05B0 0062;0061 3099 1172B 094D 05B0 0062;0061 3099 1172B 094D 05B0 0062; # (a◌𑜫◌ְ◌्◌゙b; a◌゙◌𑜫◌्◌ְb; a◌゙◌𑜫◌्◌ְb; a◌゙◌𑜫◌्◌ְb; a◌゙◌𑜫◌्◌ְb; ) LATIN SMALL LETTER A, AHOM SIGN KILLER, HEBREW POINT SHEVA, DEVANAGARI SIGN VIRAMA, COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK, LATIN SMALL LETTER B 184110061 1172B 05B0 094D 3099 0062;0061 3099 1172B 094D 05B0 0062;0061 3099 1172B 094D 05B0 0062;0061 3099 1172B 094D 05B0 0062;0061 3099 1172B 094D 05B0 0062; # (a◌𑜫◌ְ◌्◌゙b; a◌゙◌𑜫◌्◌ְb; a◌゙◌𑜫◌्◌ְb; a◌゙◌𑜫◌्◌ְb; a◌゙◌𑜫◌्◌ְb; ) LATIN SMALL LETTER A, AHOM SIGN KILLER, HEBREW POINT SHEVA, DEVANAGARI SIGN VIRAMA, COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK, LATIN SMALL LETTER B
184120061 05B0 094D 3099 11A34 0062;0061 3099 094D 11A34 05B0 0062;0061 3099 094D 11A34 05B0 0062;0061 3099 094D 11A34 05B0 0062;0061 3099 094D 11A34 05B0 0062; # (a◌ְ◌्◌゙◌𑨴b; a◌゙◌्◌𑨴◌ְb; a◌゙◌्◌𑨴◌ְb; a◌゙◌्◌𑨴◌ְb; a◌゙◌्◌𑨴◌ְb; ) LATIN SMALL LETTER A, HEBREW POINT SHEVA, DEVANAGARI SIGN VIRAMA, COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK, ZANABAZAR SQUARE SIGN VIRAMA, LATIN SMALL LETTER B
184130061 11A34 05B0 094D 3099 0062;0061 3099 11A34 094D 05B0 0062;0061 3099 11A34 094D 05B0 0062;0061 3099 11A34 094D 05B0 0062;0061 3099 11A34 094D 05B0 0062; # (a◌𑨴◌ְ◌्◌゙b; a◌゙◌𑨴◌्◌ְb; a◌゙◌𑨴◌्◌ְb; a◌゙◌𑨴◌्◌ְb; a◌゙◌𑨴◌्◌ְb; ) LATIN SMALL LETTER A, ZANABAZAR SQUARE SIGN VIRAMA, HEBREW POINT SHEVA, DEVANAGARI SIGN VIRAMA, COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK, LATIN SMALL LETTER B
184140061 05B0 094D 3099 11A47 0062;0061 3099 094D 11A47 05B0 0062;0061 3099 094D 11A47 05B0 0062;0061 3099 094D 11A47 05B0 0062;0061 3099 094D 11A47 05B0 0062; # (a◌ְ◌्◌゙◌𑩇b; a◌゙◌्◌𑩇◌ְb; a◌゙◌्◌𑩇◌ְb; a◌゙◌्◌𑩇◌ְb; a◌゙◌्◌𑩇◌ְb; ) LATIN SMALL LETTER A, HEBREW POINT SHEVA, DEVANAGARI SIGN VIRAMA, COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK, ZANABAZAR SQUARE SUBJOINER, LATIN SMALL LETTER B
184150061 11A47 05B0 094D 3099 0062;0061 3099 11A47 094D 05B0 0062;0061 3099 11A47 094D 05B0 0062;0061 3099 11A47 094D 05B0 0062;0061 3099 11A47 094D 05B0 0062; # (a◌𑩇◌ְ◌्◌゙b; a◌゙◌𑩇◌्◌ְb; a◌゙◌𑩇◌्◌ְb; a◌゙◌𑩇◌्◌ְb; a◌゙◌𑩇◌्◌ְb; ) LATIN SMALL LETTER A, ZANABAZAR SQUARE SUBJOINER, HEBREW POINT SHEVA, DEVANAGARI SIGN VIRAMA, COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK, LATIN SMALL LETTER B
184160061 05B0 094D 3099 11A99 0062;0061 3099 094D 11A99 05B0 0062;0061 3099 094D 11A99 05B0 0062;0061 3099 094D 11A99 05B0 0062;0061 3099 094D 11A99 05B0 0062; # (a◌ְ◌्◌゙◌𑪙b; a◌゙◌्◌𑪙◌ְb; a◌゙◌्◌𑪙◌ְb; a◌゙◌्◌𑪙◌ְb; a◌゙◌्◌𑪙◌ְb; ) LATIN SMALL LETTER A, HEBREW POINT SHEVA, DEVANAGARI SIGN VIRAMA, COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK, SOYOMBO SUBJOINER, LATIN SMALL LETTER B
184170061 11A99 05B0 094D 3099 0062;0061 3099 11A99 094D 05B0 0062;0061 3099 11A99 094D 05B0 0062;0061 3099 11A99 094D 05B0 0062;0061 3099 11A99 094D 05B0 0062; # (a◌𑪙◌ְ◌्◌゙b; a◌゙◌𑪙◌्◌ְb; a◌゙◌𑪙◌्◌ְb; a◌゙◌𑪙◌्◌ְb; a◌゙◌𑪙◌्◌ְb; ) LATIN SMALL LETTER A, SOYOMBO SUBJOINER, HEBREW POINT SHEVA, DEVANAGARI SIGN VIRAMA, COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK, LATIN SMALL LETTER B
184000061 05B0 094D 3099 11C3F 0062;0061 3099 094D 11C3F 05B0 0062;0061 3099 094D 11C3F 05B0 0062;0061 3099 094D 11C3F 05B0 0062;0061 3099 094D 11C3F 05B0 0062; # (a◌ְ◌्◌゙◌𑰿b; a◌゙◌्◌𑰿◌ְb; a◌゙◌्◌𑰿◌ְb; a◌゙◌्◌𑰿◌ְb; a◌゙◌्◌𑰿◌ְb; ) LATIN SMALL LETTER A, HEBREW POINT SHEVA, DEVANAGARI SIGN VIRAMA, COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK, BHAIKSUKI SIGN VIRAMA, LATIN SMALL LETTER B 184180061 05B0 094D 3099 11C3F 0062;0061 3099 094D 11C3F 05B0 0062;0061 3099 094D 11C3F 05B0 0062;0061 3099 094D 11C3F 05B0 0062;0061 3099 094D 11C3F 05B0 0062; # (a◌ְ◌्◌゙◌𑰿b; a◌゙◌्◌𑰿◌ְb; a◌゙◌्◌𑰿◌ְb; a◌゙◌्◌𑰿◌ְb; a◌゙◌्◌𑰿◌ְb; ) LATIN SMALL LETTER A, HEBREW POINT SHEVA, DEVANAGARI SIGN VIRAMA, COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK, BHAIKSUKI SIGN VIRAMA, LATIN SMALL LETTER B
184010061 11C3F 05B0 094D 3099 0062;0061 3099 11C3F 094D 05B0 0062;0061 3099 11C3F 094D 05B0 0062;0061 3099 11C3F 094D 05B0 0062;0061 3099 11C3F 094D 05B0 0062; # (a◌𑰿◌ְ◌्◌゙b; a◌゙◌𑰿◌्◌ְb; a◌゙◌𑰿◌्◌ְb; a◌゙◌𑰿◌्◌ְb; a◌゙◌𑰿◌्◌ְb; ) LATIN SMALL LETTER A, BHAIKSUKI SIGN VIRAMA, HEBREW POINT SHEVA, DEVANAGARI SIGN VIRAMA, COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK, LATIN SMALL LETTER B 184190061 11C3F 05B0 094D 3099 0062;0061 3099 11C3F 094D 05B0 0062;0061 3099 11C3F 094D 05B0 0062;0061 3099 11C3F 094D 05B0 0062;0061 3099 11C3F 094D 05B0 0062; # (a◌𑰿◌ְ◌्◌゙b; a◌゙◌𑰿◌्◌ְb; a◌゙◌𑰿◌्◌ְb; a◌゙◌𑰿◌्◌ְb; a◌゙◌𑰿◌्◌ְb; ) LATIN SMALL LETTER A, BHAIKSUKI SIGN VIRAMA, HEBREW POINT SHEVA, DEVANAGARI SIGN VIRAMA, COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK, LATIN SMALL LETTER B
184200061 3099 093C 0334 11D42 0062;0061 0334 093C 11D42 3099 0062;0061 0334 093C 11D42 3099 0062;0061 0334 093C 11D42 3099 0062;0061 0334 093C 11D42 3099 0062; # (a◌゙◌़◌̴◌𑵂b; a◌̴◌़◌𑵂◌゙b; a◌̴◌़◌𑵂◌゙b; a◌̴◌़◌𑵂◌゙b; a◌̴◌़◌𑵂◌゙b; ) LATIN SMALL LETTER A, COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK, DEVANAGARI SIGN NUKTA, COMBINING TILDE OVERLAY, MASARAM GONDI SIGN NUKTA, LATIN SMALL LETTER B
184210061 11D42 3099 093C 0334 0062;0061 0334 11D42 093C 3099 0062;0061 0334 11D42 093C 3099 0062;0061 0334 11D42 093C 3099 0062;0061 0334 11D42 093C 3099 0062; # (a◌𑵂◌゙◌़◌̴b; a◌̴◌𑵂◌़◌゙b; a◌̴◌𑵂◌़◌゙b; a◌̴◌𑵂◌़◌゙b; a◌̴◌𑵂◌़◌゙b; ) LATIN SMALL LETTER A, MASARAM GONDI SIGN NUKTA, COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK, DEVANAGARI SIGN NUKTA, COMBINING TILDE OVERLAY, LATIN SMALL LETTER B
184220061 05B0 094D 3099 11D44 0062;0061 3099 094D 11D44 05B0 0062;0061 3099 094D 11D44 05B0 0062;0061 3099 094D 11D44 05B0 0062;0061 3099 094D 11D44 05B0 0062; # (a◌ְ◌्◌゙◌𑵄b; a◌゙◌्◌𑵄◌ְb; a◌゙◌्◌𑵄◌ְb; a◌゙◌्◌𑵄◌ְb; a◌゙◌्◌𑵄◌ְb; ) LATIN SMALL LETTER A, HEBREW POINT SHEVA, DEVANAGARI SIGN VIRAMA, COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK, MASARAM GONDI SIGN HALANTA, LATIN SMALL LETTER B
184230061 11D44 05B0 094D 3099 0062;0061 3099 11D44 094D 05B0 0062;0061 3099 11D44 094D 05B0 0062;0061 3099 11D44 094D 05B0 0062;0061 3099 11D44 094D 05B0 0062; # (a◌𑵄◌ְ◌्◌゙b; a◌゙◌𑵄◌्◌ְb; a◌゙◌𑵄◌्◌ְb; a◌゙◌𑵄◌्◌ְb; a◌゙◌𑵄◌्◌ְb; ) LATIN SMALL LETTER A, MASARAM GONDI SIGN HALANTA, HEBREW POINT SHEVA, DEVANAGARI SIGN VIRAMA, COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK, LATIN SMALL LETTER B
184240061 05B0 094D 3099 11D45 0062;0061 3099 094D 11D45 05B0 0062;0061 3099 094D 11D45 05B0 0062;0061 3099 094D 11D45 05B0 0062;0061 3099 094D 11D45 05B0 0062; # (a◌ְ◌्◌゙◌𑵅b; a◌゙◌्◌𑵅◌ְb; a◌゙◌्◌𑵅◌ְb; a◌゙◌्◌𑵅◌ְb; a◌゙◌्◌𑵅◌ְb; ) LATIN SMALL LETTER A, HEBREW POINT SHEVA, DEVANAGARI SIGN VIRAMA, COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK, MASARAM GONDI VIRAMA, LATIN SMALL LETTER B
184250061 11D45 05B0 094D 3099 0062;0061 3099 11D45 094D 05B0 0062;0061 3099 11D45 094D 05B0 0062;0061 3099 11D45 094D 05B0 0062;0061 3099 11D45 094D 05B0 0062; # (a◌𑵅◌ְ◌्◌゙b; a◌゙◌𑵅◌्◌ְb; a◌゙◌𑵅◌्◌ְb; a◌゙◌𑵅◌्◌ְb; a◌゙◌𑵅◌्◌ְb; ) LATIN SMALL LETTER A, MASARAM GONDI VIRAMA, HEBREW POINT SHEVA, DEVANAGARI SIGN VIRAMA, COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK, LATIN SMALL LETTER B
184020061 093C 0334 16AF0 0062;0061 0334 16AF0 093C 0062;0061 0334 16AF0 093C 0062;0061 0334 16AF0 093C 0062;0061 0334 16AF0 093C 0062; # (a◌़◌̴◌𖫰b; a◌̴◌𖫰◌़b; a◌̴◌𖫰◌़b; a◌̴◌𖫰◌़b; a◌̴◌𖫰◌़b; ) LATIN SMALL LETTER A, DEVANAGARI SIGN NUKTA, COMBINING TILDE OVERLAY, BASSA VAH COMBINING HIGH TONE, LATIN SMALL LETTER B 184260061 093C 0334 16AF0 0062;0061 0334 16AF0 093C 0062;0061 0334 16AF0 093C 0062;0061 0334 16AF0 093C 0062;0061 0334 16AF0 093C 0062; # (a◌़◌̴◌𖫰b; a◌̴◌𖫰◌़b; a◌̴◌𖫰◌़b; a◌̴◌𖫰◌़b; a◌̴◌𖫰◌़b; ) LATIN SMALL LETTER A, DEVANAGARI SIGN NUKTA, COMBINING TILDE OVERLAY, BASSA VAH COMBINING HIGH TONE, LATIN SMALL LETTER B
184030061 16AF0 093C 0334 0062;0061 16AF0 0334 093C 0062;0061 16AF0 0334 093C 0062;0061 16AF0 0334 093C 0062;0061 16AF0 0334 093C 0062; # (a◌𖫰◌़◌̴b; a◌𖫰◌̴◌़b; a◌𖫰◌̴◌़b; a◌𖫰◌̴◌़b; a◌𖫰◌̴◌़b; ) LATIN SMALL LETTER A, BASSA VAH COMBINING HIGH TONE, DEVANAGARI SIGN NUKTA, COMBINING TILDE OVERLAY, LATIN SMALL LETTER B 184270061 16AF0 093C 0334 0062;0061 16AF0 0334 093C 0062;0061 16AF0 0334 093C 0062;0061 16AF0 0334 093C 0062;0061 16AF0 0334 093C 0062; # (a◌𖫰◌़◌̴b; a◌𖫰◌̴◌़b; a◌𖫰◌̴◌़b; a◌𖫰◌̴◌़b; a◌𖫰◌̴◌़b; ) LATIN SMALL LETTER A, BASSA VAH COMBINING HIGH TONE, DEVANAGARI SIGN NUKTA, COMBINING TILDE OVERLAY, LATIN SMALL LETTER B
184040061 093C 0334 16AF1 0062;0061 0334 16AF1 093C 0062;0061 0334 16AF1 093C 0062;0061 0334 16AF1 093C 0062;0061 0334 16AF1 093C 0062; # (a◌़◌̴◌𖫱b; a◌̴◌𖫱◌़b; a◌̴◌𖫱◌़b; a◌̴◌𖫱◌़b; a◌̴◌𖫱◌़b; ) LATIN SMALL LETTER A, DEVANAGARI SIGN NUKTA, COMBINING TILDE OVERLAY, BASSA VAH COMBINING LOW TONE, LATIN SMALL LETTER B 184280061 093C 0334 16AF1 0062;0061 0334 16AF1 093C 0062;0061 0334 16AF1 093C 0062;0061 0334 16AF1 093C 0062;0061 0334 16AF1 093C 0062; # (a◌़◌̴◌𖫱b; a◌̴◌𖫱◌़b; a◌̴◌𖫱◌़b; a◌̴◌𖫱◌़b; a◌̴◌𖫱◌़b; ) LATIN SMALL LETTER A, DEVANAGARI SIGN NUKTA, COMBINING TILDE OVERLAY, BASSA VAH COMBINING LOW TONE, LATIN SMALL LETTER B
diff --git a/admin/unidata/README b/admin/unidata/README
index 06a66663a72..f5881a1a149 100644
--- a/admin/unidata/README
+++ b/admin/unidata/README
@@ -5,26 +5,30 @@ copyright.html.
5 5
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
9http://www.unicode.org/Public/UNIDATA/BidiBrackets.txt
102017-04-20
11
8BidiMirroring.txt 12BidiMirroring.txt
9http://www.unicode.org/Public/UNIDATA/BidiMirroring.txt 13http://www.unicode.org/Public/UNIDATA/BidiMirroring.txt
102013-12-17 142017-04-20
11 15
12IVD_Sequences.txt 16IVD_Sequences.txt
13http://www.unicode.org/ivd/data/2014-05-16/IVD_Sequences.txt 17http://www.unicode.org/ivd/
142014-05-16 182016-08-15
15 19
16UnicodeData.txt 20UnicodeData.txt
17http://www.unicode.org/Public/UNIDATA/UnicodeData.txt 21http://www.unicode.org/Public/UNIDATA/UnicodeData.txt
182014-03-10 222017-03-07
19 23
20Blocks.txt 24Blocks.txt
21http://www.unicode.org/Public/8.0.0/ucd/Blocks.txt 25http://www.unicode.org/Public/8.0.0/ucd/Blocks.txt
222014-11-10 262017-04-20
23 27
24NormalizationTest.txt 28NormalizationTest.txt
25http://www.unicode.org/Public/UNIDATA/NormalizationTest.txt 29http://www.unicode.org/Public/UNIDATA/NormalizationTest.txt
262016-07-16 302017-03-08
27 31
28SpecialCasing.txt 32SpecialCasing.txt
29http://unicode.org/Public/UNIDATA/SpecialCasing.txt 33http://unicode.org/Public/UNIDATA/SpecialCasing.txt
302016-03-03 342017-04-20
diff --git a/admin/unidata/SpecialCasing.txt b/admin/unidata/SpecialCasing.txt
index b23fa7f7680..b9ba0d81c16 100644
--- a/admin/unidata/SpecialCasing.txt
+++ b/admin/unidata/SpecialCasing.txt
@@ -1,6 +1,6 @@
1# SpecialCasing-9.0.0.txt 1# SpecialCasing-10.0.0.txt
2# Date: 2016-03-02, 18:55:13 GMT 2# Date: 2017-04-14, 05:40:43 GMT
3# © 2016 Unicode®, Inc. 3# © 2017 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 http://www.unicode.org/terms_of_use.html
6# 6#
@@ -197,7 +197,7 @@ FB17; FB17; 0544 056D; 0544 053D; # ARMENIAN SMALL LIGATURE MEN XEH
197 197
198# ================================================================================ 198# ================================================================================
199# Conditional Mappings 199# Conditional Mappings
200# The remainder of this file provides conditional casing data used to produce 200# The remainder of this file provides conditional casing data used to produce
201# full case mappings. 201# full case mappings.
202# ================================================================================ 202# ================================================================================
203# Language-Insensitive Mappings 203# Language-Insensitive Mappings
diff --git a/admin/unidata/UnicodeData.txt b/admin/unidata/UnicodeData.txt
index a756976461b..d89c64f526a 100644
--- a/admin/unidata/UnicodeData.txt
+++ b/admin/unidata/UnicodeData.txt
@@ -2072,6 +2072,17 @@
2072085A;MANDAIC VOCALIZATION MARK;Mn;220;NSM;;;;;N;;;;; 2072085A;MANDAIC VOCALIZATION MARK;Mn;220;NSM;;;;;N;;;;;
2073085B;MANDAIC GEMINATION MARK;Mn;220;NSM;;;;;N;;;;; 2073085B;MANDAIC GEMINATION MARK;Mn;220;NSM;;;;;N;;;;;
2074085E;MANDAIC PUNCTUATION;Po;0;R;;;;;N;;;;; 2074085E;MANDAIC PUNCTUATION;Po;0;R;;;;;N;;;;;
20750860;SYRIAC LETTER MALAYALAM NGA;Lo;0;AL;;;;;N;;;;;
20760861;SYRIAC LETTER MALAYALAM JA;Lo;0;AL;;;;;N;;;;;
20770862;SYRIAC LETTER MALAYALAM NYA;Lo;0;AL;;;;;N;;;;;
20780863;SYRIAC LETTER MALAYALAM TTA;Lo;0;AL;;;;;N;;;;;
20790864;SYRIAC LETTER MALAYALAM NNA;Lo;0;AL;;;;;N;;;;;
20800865;SYRIAC LETTER MALAYALAM NNNA;Lo;0;AL;;;;;N;;;;;
20810866;SYRIAC LETTER MALAYALAM BHA;Lo;0;AL;;;;;N;;;;;
20820867;SYRIAC LETTER MALAYALAM RA;Lo;0;AL;;;;;N;;;;;
20830868;SYRIAC LETTER MALAYALAM LLA;Lo;0;AL;;;;;N;;;;;
20840869;SYRIAC LETTER MALAYALAM LLLA;Lo;0;AL;;;;;N;;;;;
2085086A;SYRIAC LETTER MALAYALAM SSA;Lo;0;AL;;;;;N;;;;;
207508A0;ARABIC LETTER BEH WITH SMALL V BELOW;Lo;0;AL;;;;;N;;;;; 208608A0;ARABIC LETTER BEH WITH SMALL V BELOW;Lo;0;AL;;;;;N;;;;;
207608A1;ARABIC LETTER BEH WITH HAMZA ABOVE;Lo;0;AL;;;;;N;;;;; 208708A1;ARABIC LETTER BEH WITH HAMZA ABOVE;Lo;0;AL;;;;;N;;;;;
207708A2;ARABIC LETTER JEEM WITH TWO DOTS ABOVE;Lo;0;AL;;;;;N;;;;; 208808A2;ARABIC LETTER JEEM WITH TWO DOTS ABOVE;Lo;0;AL;;;;;N;;;;;
@@ -2366,6 +2377,8 @@
236609F9;BENGALI CURRENCY DENOMINATOR SIXTEEN;No;0;L;;;;16;N;;;;; 237709F9;BENGALI CURRENCY DENOMINATOR SIXTEEN;No;0;L;;;;16;N;;;;;
236709FA;BENGALI ISSHAR;So;0;L;;;;;N;;;;; 237809FA;BENGALI ISSHAR;So;0;L;;;;;N;;;;;
236809FB;BENGALI GANDA MARK;Sc;0;ET;;;;;N;;;;; 237909FB;BENGALI GANDA MARK;Sc;0;ET;;;;;N;;;;;
238009FC;BENGALI LETTER VEDIC ANUSVARA;Lo;0;L;;;;;N;;;;;
238109FD;BENGALI ABBREVIATION SIGN;Po;0;L;;;;;N;;;;;
23690A01;GURMUKHI SIGN ADAK BINDI;Mn;0;NSM;;;;;N;;;;; 23820A01;GURMUKHI SIGN ADAK BINDI;Mn;0;NSM;;;;;N;;;;;
23700A02;GURMUKHI SIGN BINDI;Mn;0;NSM;;;;;N;;;;; 23830A02;GURMUKHI SIGN BINDI;Mn;0;NSM;;;;;N;;;;;
23710A03;GURMUKHI SIGN VISARGA;Mc;0;L;;;;;N;;;;; 23840A03;GURMUKHI SIGN VISARGA;Mc;0;L;;;;;N;;;;;
@@ -2530,6 +2543,12 @@
25300AF0;GUJARATI ABBREVIATION SIGN;Po;0;L;;;;;N;;;;; 25430AF0;GUJARATI ABBREVIATION SIGN;Po;0;L;;;;;N;;;;;
25310AF1;GUJARATI RUPEE SIGN;Sc;0;ET;;;;;N;;;;; 25440AF1;GUJARATI RUPEE SIGN;Sc;0;ET;;;;;N;;;;;
25320AF9;GUJARATI LETTER ZHA;Lo;0;L;;;;;N;;;;; 25450AF9;GUJARATI LETTER ZHA;Lo;0;L;;;;;N;;;;;
25460AFA;GUJARATI SIGN SUKUN;Mn;0;NSM;;;;;N;;;;;
25470AFB;GUJARATI SIGN SHADDA;Mn;0;NSM;;;;;N;;;;;
25480AFC;GUJARATI SIGN MADDAH;Mn;0;NSM;;;;;N;;;;;
25490AFD;GUJARATI SIGN THREE-DOT NUKTA ABOVE;Mn;0;NSM;;;;;N;;;;;
25500AFE;GUJARATI SIGN CIRCLE NUKTA ABOVE;Mn;0;NSM;;;;;N;;;;;
25510AFF;GUJARATI SIGN TWO-CIRCLE NUKTA ABOVE;Mn;0;NSM;;;;;N;;;;;
25330B01;ORIYA SIGN CANDRABINDU;Mn;0;NSM;;;;;N;;;;; 25520B01;ORIYA SIGN CANDRABINDU;Mn;0;NSM;;;;;N;;;;;
25340B02;ORIYA SIGN ANUSVARA;Mc;0;L;;;;;N;;;;; 25530B02;ORIYA SIGN ANUSVARA;Mc;0;L;;;;;N;;;;;
25350B03;ORIYA SIGN VISARGA;Mc;0;L;;;;;N;;;;; 25540B03;ORIYA SIGN VISARGA;Mc;0;L;;;;;N;;;;;
@@ -2876,6 +2895,7 @@
28760CEF;KANNADA DIGIT NINE;Nd;0;L;;9;9;9;N;;;;; 28950CEF;KANNADA DIGIT NINE;Nd;0;L;;9;9;9;N;;;;;
28770CF1;KANNADA SIGN JIHVAMULIYA;Lo;0;L;;;;;N;;;;; 28960CF1;KANNADA SIGN JIHVAMULIYA;Lo;0;L;;;;;N;;;;;
28780CF2;KANNADA SIGN UPADHMANIYA;Lo;0;L;;;;;N;;;;; 28970CF2;KANNADA SIGN UPADHMANIYA;Lo;0;L;;;;;N;;;;;
28980D00;MALAYALAM SIGN COMBINING ANUSVARA ABOVE;Mn;0;NSM;;;;;N;;;;;
28790D01;MALAYALAM SIGN CANDRABINDU;Mn;0;NSM;;;;;N;;;;; 28990D01;MALAYALAM SIGN CANDRABINDU;Mn;0;NSM;;;;;N;;;;;
28800D02;MALAYALAM SIGN ANUSVARA;Mc;0;L;;;;;N;;;;; 29000D02;MALAYALAM SIGN ANUSVARA;Mc;0;L;;;;;N;;;;;
28810D03;MALAYALAM SIGN VISARGA;Mc;0;L;;;;;N;;;;; 29010D03;MALAYALAM SIGN VISARGA;Mc;0;L;;;;;N;;;;;
@@ -2931,6 +2951,8 @@
29310D38;MALAYALAM LETTER SA;Lo;0;L;;;;;N;;;;; 29510D38;MALAYALAM LETTER SA;Lo;0;L;;;;;N;;;;;
29320D39;MALAYALAM LETTER HA;Lo;0;L;;;;;N;;;;; 29520D39;MALAYALAM LETTER HA;Lo;0;L;;;;;N;;;;;
29330D3A;MALAYALAM LETTER TTTA;Lo;0;L;;;;;N;;;;; 29530D3A;MALAYALAM LETTER TTTA;Lo;0;L;;;;;N;;;;;
29540D3B;MALAYALAM SIGN VERTICAL BAR VIRAMA;Mn;9;NSM;;;;;N;;;;;
29550D3C;MALAYALAM SIGN CIRCULAR VIRAMA;Mn;9;NSM;;;;;N;;;;;
29340D3D;MALAYALAM SIGN AVAGRAHA;Lo;0;L;;;;;N;;;;; 29560D3D;MALAYALAM SIGN AVAGRAHA;Lo;0;L;;;;;N;;;;;
29350D3E;MALAYALAM VOWEL SIGN AA;Mc;0;L;;;;;N;;;;; 29570D3E;MALAYALAM VOWEL SIGN AA;Mc;0;L;;;;;N;;;;;
29360D3F;MALAYALAM VOWEL SIGN I;Mc;0;L;;;;;N;;;;; 29580D3F;MALAYALAM VOWEL SIGN I;Mc;0;L;;;;;N;;;;;
@@ -6413,6 +6435,7 @@
64131CF4;VEDIC TONE CANDRA ABOVE;Mn;230;NSM;;;;;N;;;;; 64351CF4;VEDIC TONE CANDRA ABOVE;Mn;230;NSM;;;;;N;;;;;
64141CF5;VEDIC SIGN JIHVAMULIYA;Lo;0;L;;;;;N;;;;; 64361CF5;VEDIC SIGN JIHVAMULIYA;Lo;0;L;;;;;N;;;;;
64151CF6;VEDIC SIGN UPADHMANIYA;Lo;0;L;;;;;N;;;;; 64371CF6;VEDIC SIGN UPADHMANIYA;Lo;0;L;;;;;N;;;;;
64381CF7;VEDIC SIGN ATIKRAMA;Mc;0;L;;;;;N;;;;;
64161CF8;VEDIC TONE RING ABOVE;Mn;230;NSM;;;;;N;;;;; 64391CF8;VEDIC TONE RING ABOVE;Mn;230;NSM;;;;;N;;;;;
64171CF9;VEDIC TONE DOUBLE RING ABOVE;Mn;230;NSM;;;;;N;;;;; 64401CF9;VEDIC TONE DOUBLE RING ABOVE;Mn;230;NSM;;;;;N;;;;;
64181D00;LATIN LETTER SMALL CAPITAL A;Ll;0;L;;;;;N;;;;; 64411D00;LATIN LETTER SMALL CAPITAL A;Ll;0;L;;;;;N;;;;;
@@ -6661,6 +6684,10 @@
66611DF3;COMBINING LATIN SMALL LETTER O WITH DIAERESIS;Mn;230;NSM;;;;;N;;;;; 66841DF3;COMBINING LATIN SMALL LETTER O WITH DIAERESIS;Mn;230;NSM;;;;;N;;;;;
66621DF4;COMBINING LATIN SMALL LETTER U WITH DIAERESIS;Mn;230;NSM;;;;;N;;;;; 66851DF4;COMBINING LATIN SMALL LETTER U WITH DIAERESIS;Mn;230;NSM;;;;;N;;;;;
66631DF5;COMBINING UP TACK ABOVE;Mn;230;NSM;;;;;N;;;;; 66861DF5;COMBINING UP TACK ABOVE;Mn;230;NSM;;;;;N;;;;;
66871DF6;COMBINING KAVYKA ABOVE RIGHT;Mn;232;NSM;;;;;N;;;;;
66881DF7;COMBINING KAVYKA ABOVE LEFT;Mn;228;NSM;;;;;N;;;;;
66891DF8;COMBINING DOT ABOVE LEFT;Mn;228;NSM;;;;;N;;;;;
66901DF9;COMBINING WIDE INVERTED BRIDGE BELOW;Mn;220;NSM;;;;;N;;;;;
66641DFB;COMBINING DELETION MARK;Mn;230;NSM;;;;;N;;;;; 66911DFB;COMBINING DELETION MARK;Mn;230;NSM;;;;;N;;;;;
66651DFC;COMBINING DOUBLE INVERTED BREVE BELOW;Mn;233;NSM;;;;;N;;;;; 66921DFC;COMBINING DOUBLE INVERTED BREVE BELOW;Mn;233;NSM;;;;;N;;;;;
66661DFD;COMBINING ALMOST EQUAL TO BELOW;Mn;220;NSM;;;;;N;;;;; 66931DFD;COMBINING ALMOST EQUAL TO BELOW;Mn;220;NSM;;;;;N;;;;;
@@ -7339,6 +7366,7 @@
733920BC;MANAT SIGN;Sc;0;ET;;;;;N;;;;; 736620BC;MANAT SIGN;Sc;0;ET;;;;;N;;;;;
734020BD;RUBLE SIGN;Sc;0;ET;;;;;N;;;;; 736720BD;RUBLE SIGN;Sc;0;ET;;;;;N;;;;;
734120BE;LARI SIGN;Sc;0;ET;;;;;N;;;;; 736820BE;LARI SIGN;Sc;0;ET;;;;;N;;;;;
736920BF;BITCOIN SIGN;Sc;0;ET;;;;;N;;;;;
734220D0;COMBINING LEFT HARPOON ABOVE;Mn;230;NSM;;;;;N;NON-SPACING LEFT HARPOON ABOVE;;;; 737020D0;COMBINING LEFT HARPOON ABOVE;Mn;230;NSM;;;;;N;NON-SPACING LEFT HARPOON ABOVE;;;;
734320D1;COMBINING RIGHT HARPOON ABOVE;Mn;230;NSM;;;;;N;NON-SPACING RIGHT HARPOON ABOVE;;;; 737120D1;COMBINING RIGHT HARPOON ABOVE;Mn;230;NSM;;;;;N;NON-SPACING RIGHT HARPOON ABOVE;;;;
734420D2;COMBINING LONG VERTICAL LINE OVERLAY;Mn;1;NSM;;;;;N;NON-SPACING LONG VERTICAL BAR OVERLAY;;;; 737220D2;COMBINING LONG VERTICAL LINE OVERLAY;Mn;1;NSM;;;;;N;NON-SPACING LONG VERTICAL BAR OVERLAY;;;;
@@ -8135,6 +8163,7 @@
813523FC;POWER ON-OFF SYMBOL;So;0;ON;;;;;N;;;;; 816323FC;POWER ON-OFF SYMBOL;So;0;ON;;;;;N;;;;;
813623FD;POWER ON SYMBOL;So;0;ON;;;;;N;;;;; 816423FD;POWER ON SYMBOL;So;0;ON;;;;;N;;;;;
813723FE;POWER SLEEP SYMBOL;So;0;ON;;;;;N;;;;; 816523FE;POWER SLEEP SYMBOL;So;0;ON;;;;;N;;;;;
816623FF;OBSERVER EYE SYMBOL;So;0;ON;;;;;N;;;;;
81382400;SYMBOL FOR NULL;So;0;ON;;;;;N;GRAPHIC FOR NULL;;;; 81672400;SYMBOL FOR NULL;So;0;ON;;;;;N;GRAPHIC FOR NULL;;;;
81392401;SYMBOL FOR START OF HEADING;So;0;ON;;;;;N;GRAPHIC FOR START OF HEADING;;;; 81682401;SYMBOL FOR START OF HEADING;So;0;ON;;;;;N;GRAPHIC FOR START OF HEADING;;;;
81402402;SYMBOL FOR START OF TEXT;So;0;ON;;;;;N;GRAPHIC FOR START OF TEXT;;;; 81692402;SYMBOL FOR START OF TEXT;So;0;ON;;;;;N;GRAPHIC FOR START OF TEXT;;;;
@@ -10083,6 +10112,7 @@
100832BCF;ROTATED WHITE FOUR POINTED CUSP;So;0;ON;;;;;N;;;;; 101122BCF;ROTATED WHITE FOUR POINTED CUSP;So;0;ON;;;;;N;;;;;
100842BD0;SQUARE POSITION INDICATOR;So;0;ON;;;;;N;;;;; 101132BD0;SQUARE POSITION INDICATOR;So;0;ON;;;;;N;;;;;
100852BD1;UNCERTAINTY SIGN;So;0;ON;;;;;N;;;;; 101142BD1;UNCERTAINTY SIGN;So;0;ON;;;;;N;;;;;
101152BD2;GROUP MARK;So;0;ON;;;;;N;;;;;
100862BEC;LEFTWARDS TWO-HEADED ARROW WITH TRIANGLE ARROWHEADS;So;0;ON;;;;;N;;;;; 101162BEC;LEFTWARDS TWO-HEADED ARROW WITH TRIANGLE ARROWHEADS;So;0;ON;;;;;N;;;;;
100872BED;UPWARDS TWO-HEADED ARROW WITH TRIANGLE ARROWHEADS;So;0;ON;;;;;N;;;;; 101172BED;UPWARDS TWO-HEADED ARROW WITH TRIANGLE ARROWHEADS;So;0;ON;;;;;N;;;;;
100882BEE;RIGHTWARDS TWO-HEADED ARROW WITH TRIANGLE ARROWHEADS;So;0;ON;;;;;N;;;;; 101182BEE;RIGHTWARDS TWO-HEADED ARROW WITH TRIANGLE ARROWHEADS;So;0;ON;;;;;N;;;;;
@@ -10615,6 +10645,11 @@
106152E42;DOUBLE LOW-REVERSED-9 QUOTATION MARK;Ps;0;ON;;;;;N;;;;; 106452E42;DOUBLE LOW-REVERSED-9 QUOTATION MARK;Ps;0;ON;;;;;N;;;;;
106162E43;DASH WITH LEFT UPTURN;Po;0;ON;;;;;N;;;;; 106462E43;DASH WITH LEFT UPTURN;Po;0;ON;;;;;N;;;;;
106172E44;DOUBLE SUSPENSION MARK;Po;0;ON;;;;;N;;;;; 106472E44;DOUBLE SUSPENSION MARK;Po;0;ON;;;;;N;;;;;
106482E45;INVERTED LOW KAVYKA;Po;0;ON;;;;;N;;;;;
106492E46;INVERTED LOW KAVYKA WITH KAVYKA ABOVE;Po;0;ON;;;;;N;;;;;
106502E47;LOW KAVYKA;Po;0;ON;;;;;N;;;;;
106512E48;LOW KAVYKA WITH DOT;Po;0;ON;;;;;N;;;;;
106522E49;DOUBLE STACKED COMMA;Po;0;ON;;;;;N;;;;;
106182E80;CJK RADICAL REPEAT;So;0;ON;;;;;N;;;;; 106532E80;CJK RADICAL REPEAT;So;0;ON;;;;;N;;;;;
106192E81;CJK RADICAL CLIFF;So;0;ON;;;;;N;;;;; 106542E81;CJK RADICAL CLIFF;So;0;ON;;;;;N;;;;;
106202E82;CJK RADICAL SECOND ONE;So;0;ON;;;;;N;;;;; 106552E82;CJK RADICAL SECOND ONE;So;0;ON;;;;;N;;;;;
@@ -11250,6 +11285,7 @@
11250312B;BOPOMOFO LETTER NG;Lo;0;L;;;;;N;;;;; 11285312B;BOPOMOFO LETTER NG;Lo;0;L;;;;;N;;;;;
11251312C;BOPOMOFO LETTER GN;Lo;0;L;;;;;N;;;;; 11286312C;BOPOMOFO LETTER GN;Lo;0;L;;;;;N;;;;;
11252312D;BOPOMOFO LETTER IH;Lo;0;L;;;;;N;;;;; 11287312D;BOPOMOFO LETTER IH;Lo;0;L;;;;;N;;;;;
11288312E;BOPOMOFO LETTER O WITH DOT ABOVE;Lo;0;L;;;;;N;;;;;
112533131;HANGUL LETTER KIYEOK;Lo;0;L;<compat> 1100;;;;N;HANGUL LETTER GIYEOG;;;; 112893131;HANGUL LETTER KIYEOK;Lo;0;L;<compat> 1100;;;;N;HANGUL LETTER GIYEOG;;;;
112543132;HANGUL LETTER SSANGKIYEOK;Lo;0;L;<compat> 1101;;;;N;HANGUL LETTER SSANG GIYEOG;;;; 112903132;HANGUL LETTER SSANGKIYEOK;Lo;0;L;<compat> 1101;;;;N;HANGUL LETTER SSANG GIYEOG;;;;
112553133;HANGUL LETTER KIYEOK-SIOS;Lo;0;L;<compat> 11AA;;;;N;HANGUL LETTER GIYEOG SIOS;;;; 112913133;HANGUL LETTER KIYEOK-SIOS;Lo;0;L;<compat> 11AA;;;;N;HANGUL LETTER GIYEOG SIOS;;;;
@@ -12016,7 +12052,7 @@
120164DFE;HEXAGRAM FOR AFTER COMPLETION;So;0;ON;;;;;N;;;;; 120524DFE;HEXAGRAM FOR AFTER COMPLETION;So;0;ON;;;;;N;;;;;
120174DFF;HEXAGRAM FOR BEFORE COMPLETION;So;0;ON;;;;;N;;;;; 120534DFF;HEXAGRAM FOR BEFORE COMPLETION;So;0;ON;;;;;N;;;;;
120184E00;<CJK Ideograph, First>;Lo;0;L;;;;;N;;;;; 120544E00;<CJK Ideograph, First>;Lo;0;L;;;;;N;;;;;
120199FD5;<CJK Ideograph, Last>;Lo;0;L;;;;;N;;;;; 120559FEA;<CJK Ideograph, Last>;Lo;0;L;;;;;N;;;;;
12020A000;YI SYLLABLE IT;Lo;0;L;;;;;N;;;;; 12056A000;YI SYLLABLE IT;Lo;0;L;;;;;N;;;;;
12021A001;YI SYLLABLE IX;Lo;0;L;;;;;N;;;;; 12057A001;YI SYLLABLE IX;Lo;0;L;;;;;N;;;;;
12022A002;YI SYLLABLE I;Lo;0;L;;;;;N;;;;; 12058A002;YI SYLLABLE I;Lo;0;L;;;;;N;;;;;
@@ -17093,6 +17129,9 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;;
1709310321;OLD ITALIC NUMERAL FIVE;No;0;L;;;;5;N;;;;; 1712910321;OLD ITALIC NUMERAL FIVE;No;0;L;;;;5;N;;;;;
1709410322;OLD ITALIC NUMERAL TEN;No;0;L;;;;10;N;;;;; 1713010322;OLD ITALIC NUMERAL TEN;No;0;L;;;;10;N;;;;;
1709510323;OLD ITALIC NUMERAL FIFTY;No;0;L;;;;50;N;;;;; 1713110323;OLD ITALIC NUMERAL FIFTY;No;0;L;;;;50;N;;;;;
171321032D;OLD ITALIC LETTER YE;Lo;0;L;;;;;N;;;;;
171331032E;OLD ITALIC LETTER NORTHERN TSE;Lo;0;L;;;;;N;;;;;
171341032F;OLD ITALIC LETTER SOUTHERN TSE;Lo;0;L;;;;;N;;;;;
1709610330;GOTHIC LETTER AHSA;Lo;0;L;;;;;N;;;;; 1713510330;GOTHIC LETTER AHSA;Lo;0;L;;;;;N;;;;;
1709710331;GOTHIC LETTER BAIRKAN;Lo;0;L;;;;;N;;;;; 1713610331;GOTHIC LETTER BAIRKAN;Lo;0;L;;;;;N;;;;;
1709810332;GOTHIC LETTER GIBA;Lo;0;L;;;;;N;;;;; 1713710332;GOTHIC LETTER GIBA;Lo;0;L;;;;;N;;;;;
@@ -20068,6 +20107,158 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;;
20068118F1;WARANG CITI NUMBER EIGHTY;No;0;L;;;;80;N;;;;; 20107118F1;WARANG CITI NUMBER EIGHTY;No;0;L;;;;80;N;;;;;
20069118F2;WARANG CITI NUMBER NINETY;No;0;L;;;;90;N;;;;; 20108118F2;WARANG CITI NUMBER NINETY;No;0;L;;;;90;N;;;;;
20070118FF;WARANG CITI OM;Lo;0;L;;;;;N;;;;; 20109118FF;WARANG CITI OM;Lo;0;L;;;;;N;;;;;
2011011A00;ZANABAZAR SQUARE LETTER A;Lo;0;L;;;;;N;;;;;
2011111A01;ZANABAZAR SQUARE VOWEL SIGN I;Mn;0;NSM;;;;;N;;;;;
2011211A02;ZANABAZAR SQUARE VOWEL SIGN UE;Mn;0;NSM;;;;;N;;;;;
2011311A03;ZANABAZAR SQUARE VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;;
2011411A04;ZANABAZAR SQUARE VOWEL SIGN E;Mn;0;NSM;;;;;N;;;;;
2011511A05;ZANABAZAR SQUARE VOWEL SIGN OE;Mn;0;NSM;;;;;N;;;;;
2011611A06;ZANABAZAR SQUARE VOWEL SIGN O;Mn;0;NSM;;;;;N;;;;;
2011711A07;ZANABAZAR SQUARE VOWEL SIGN AI;Mc;0;L;;;;;N;;;;;
2011811A08;ZANABAZAR SQUARE VOWEL SIGN AU;Mc;0;L;;;;;N;;;;;
2011911A09;ZANABAZAR SQUARE VOWEL SIGN REVERSED I;Mn;0;NSM;;;;;N;;;;;
2012011A0A;ZANABAZAR SQUARE VOWEL LENGTH MARK;Mn;0;NSM;;;;;N;;;;;
2012111A0B;ZANABAZAR SQUARE LETTER KA;Lo;0;L;;;;;N;;;;;
2012211A0C;ZANABAZAR SQUARE LETTER KHA;Lo;0;L;;;;;N;;;;;
2012311A0D;ZANABAZAR SQUARE LETTER GA;Lo;0;L;;;;;N;;;;;
2012411A0E;ZANABAZAR SQUARE LETTER GHA;Lo;0;L;;;;;N;;;;;
2012511A0F;ZANABAZAR SQUARE LETTER NGA;Lo;0;L;;;;;N;;;;;
2012611A10;ZANABAZAR SQUARE LETTER CA;Lo;0;L;;;;;N;;;;;
2012711A11;ZANABAZAR SQUARE LETTER CHA;Lo;0;L;;;;;N;;;;;
2012811A12;ZANABAZAR SQUARE LETTER JA;Lo;0;L;;;;;N;;;;;
2012911A13;ZANABAZAR SQUARE LETTER NYA;Lo;0;L;;;;;N;;;;;
2013011A14;ZANABAZAR SQUARE LETTER TTA;Lo;0;L;;;;;N;;;;;
2013111A15;ZANABAZAR SQUARE LETTER TTHA;Lo;0;L;;;;;N;;;;;
2013211A16;ZANABAZAR SQUARE LETTER DDA;Lo;0;L;;;;;N;;;;;
2013311A17;ZANABAZAR SQUARE LETTER DDHA;Lo;0;L;;;;;N;;;;;
2013411A18;ZANABAZAR SQUARE LETTER NNA;Lo;0;L;;;;;N;;;;;
2013511A19;ZANABAZAR SQUARE LETTER TA;Lo;0;L;;;;;N;;;;;
2013611A1A;ZANABAZAR SQUARE LETTER THA;Lo;0;L;;;;;N;;;;;
2013711A1B;ZANABAZAR SQUARE LETTER DA;Lo;0;L;;;;;N;;;;;
2013811A1C;ZANABAZAR SQUARE LETTER DHA;Lo;0;L;;;;;N;;;;;
2013911A1D;ZANABAZAR SQUARE LETTER NA;Lo;0;L;;;;;N;;;;;
2014011A1E;ZANABAZAR SQUARE LETTER PA;Lo;0;L;;;;;N;;;;;
2014111A1F;ZANABAZAR SQUARE LETTER PHA;Lo;0;L;;;;;N;;;;;
2014211A20;ZANABAZAR SQUARE LETTER BA;Lo;0;L;;;;;N;;;;;
2014311A21;ZANABAZAR SQUARE LETTER BHA;Lo;0;L;;;;;N;;;;;
2014411A22;ZANABAZAR SQUARE LETTER MA;Lo;0;L;;;;;N;;;;;
2014511A23;ZANABAZAR SQUARE LETTER TSA;Lo;0;L;;;;;N;;;;;
2014611A24;ZANABAZAR SQUARE LETTER TSHA;Lo;0;L;;;;;N;;;;;
2014711A25;ZANABAZAR SQUARE LETTER DZA;Lo;0;L;;;;;N;;;;;
2014811A26;ZANABAZAR SQUARE LETTER DZHA;Lo;0;L;;;;;N;;;;;
2014911A27;ZANABAZAR SQUARE LETTER ZHA;Lo;0;L;;;;;N;;;;;
2015011A28;ZANABAZAR SQUARE LETTER ZA;Lo;0;L;;;;;N;;;;;
2015111A29;ZANABAZAR SQUARE LETTER -A;Lo;0;L;;;;;N;;;;;
2015211A2A;ZANABAZAR SQUARE LETTER YA;Lo;0;L;;;;;N;;;;;
2015311A2B;ZANABAZAR SQUARE LETTER RA;Lo;0;L;;;;;N;;;;;
2015411A2C;ZANABAZAR SQUARE LETTER LA;Lo;0;L;;;;;N;;;;;
2015511A2D;ZANABAZAR SQUARE LETTER VA;Lo;0;L;;;;;N;;;;;
2015611A2E;ZANABAZAR SQUARE LETTER SHA;Lo;0;L;;;;;N;;;;;
2015711A2F;ZANABAZAR SQUARE LETTER SSA;Lo;0;L;;;;;N;;;;;
2015811A30;ZANABAZAR SQUARE LETTER SA;Lo;0;L;;;;;N;;;;;
2015911A31;ZANABAZAR SQUARE LETTER HA;Lo;0;L;;;;;N;;;;;
2016011A32;ZANABAZAR SQUARE LETTER KSSA;Lo;0;L;;;;;N;;;;;
2016111A33;ZANABAZAR SQUARE FINAL CONSONANT MARK;Mn;0;NSM;;;;;N;;;;;
2016211A34;ZANABAZAR SQUARE SIGN VIRAMA;Mn;9;NSM;;;;;N;;;;;
2016311A35;ZANABAZAR SQUARE SIGN CANDRABINDU;Mn;0;NSM;;;;;N;;;;;
2016411A36;ZANABAZAR SQUARE SIGN CANDRABINDU WITH ORNAMENT;Mn;0;NSM;;;;;N;;;;;
2016511A37;ZANABAZAR SQUARE SIGN CANDRA WITH ORNAMENT;Mn;0;NSM;;;;;N;;;;;
2016611A38;ZANABAZAR SQUARE SIGN ANUSVARA;Mn;0;NSM;;;;;N;;;;;
2016711A39;ZANABAZAR SQUARE SIGN VISARGA;Mc;0;L;;;;;N;;;;;
2016811A3A;ZANABAZAR SQUARE CLUSTER-INITIAL LETTER RA;Lo;0;L;;;;;N;;;;;
2016911A3B;ZANABAZAR SQUARE CLUSTER-FINAL LETTER YA;Mn;0;NSM;;;;;N;;;;;
2017011A3C;ZANABAZAR SQUARE CLUSTER-FINAL LETTER RA;Mn;0;NSM;;;;;N;;;;;
2017111A3D;ZANABAZAR SQUARE CLUSTER-FINAL LETTER LA;Mn;0;NSM;;;;;N;;;;;
2017211A3E;ZANABAZAR SQUARE CLUSTER-FINAL LETTER VA;Mn;0;NSM;;;;;N;;;;;
2017311A3F;ZANABAZAR SQUARE INITIAL HEAD MARK;Po;0;L;;;;;N;;;;;
2017411A40;ZANABAZAR SQUARE CLOSING HEAD MARK;Po;0;L;;;;;N;;;;;
2017511A41;ZANABAZAR SQUARE MARK TSHEG;Po;0;L;;;;;N;;;;;
2017611A42;ZANABAZAR SQUARE MARK SHAD;Po;0;L;;;;;N;;;;;
2017711A43;ZANABAZAR SQUARE MARK DOUBLE SHAD;Po;0;L;;;;;N;;;;;
2017811A44;ZANABAZAR SQUARE MARK LONG TSHEG;Po;0;L;;;;;N;;;;;
2017911A45;ZANABAZAR SQUARE INITIAL DOUBLE-LINED HEAD MARK;Po;0;L;;;;;N;;;;;
2018011A46;ZANABAZAR SQUARE CLOSING DOUBLE-LINED HEAD MARK;Po;0;L;;;;;N;;;;;
2018111A47;ZANABAZAR SQUARE SUBJOINER;Mn;9;NSM;;;;;N;;;;;
2018211A50;SOYOMBO LETTER A;Lo;0;L;;;;;N;;;;;
2018311A51;SOYOMBO VOWEL SIGN I;Mn;0;NSM;;;;;N;;;;;
2018411A52;SOYOMBO VOWEL SIGN UE;Mn;0;NSM;;;;;N;;;;;
2018511A53;SOYOMBO VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;;
2018611A54;SOYOMBO VOWEL SIGN E;Mn;0;NSM;;;;;N;;;;;
2018711A55;SOYOMBO VOWEL SIGN O;Mn;0;NSM;;;;;N;;;;;
2018811A56;SOYOMBO VOWEL SIGN OE;Mn;0;NSM;;;;;N;;;;;
2018911A57;SOYOMBO VOWEL SIGN AI;Mc;0;L;;;;;N;;;;;
2019011A58;SOYOMBO VOWEL SIGN AU;Mc;0;L;;;;;N;;;;;
2019111A59;SOYOMBO VOWEL SIGN VOCALIC R;Mn;0;NSM;;;;;N;;;;;
2019211A5A;SOYOMBO VOWEL SIGN VOCALIC L;Mn;0;NSM;;;;;N;;;;;
2019311A5B;SOYOMBO VOWEL LENGTH MARK;Mn;0;NSM;;;;;N;;;;;
2019411A5C;SOYOMBO LETTER KA;Lo;0;L;;;;;N;;;;;
2019511A5D;SOYOMBO LETTER KHA;Lo;0;L;;;;;N;;;;;
2019611A5E;SOYOMBO LETTER GA;Lo;0;L;;;;;N;;;;;
2019711A5F;SOYOMBO LETTER GHA;Lo;0;L;;;;;N;;;;;
2019811A60;SOYOMBO LETTER NGA;Lo;0;L;;;;;N;;;;;
2019911A61;SOYOMBO LETTER CA;Lo;0;L;;;;;N;;;;;
2020011A62;SOYOMBO LETTER CHA;Lo;0;L;;;;;N;;;;;
2020111A63;SOYOMBO LETTER JA;Lo;0;L;;;;;N;;;;;
2020211A64;SOYOMBO LETTER JHA;Lo;0;L;;;;;N;;;;;
2020311A65;SOYOMBO LETTER NYA;Lo;0;L;;;;;N;;;;;
2020411A66;SOYOMBO LETTER TTA;Lo;0;L;;;;;N;;;;;
2020511A67;SOYOMBO LETTER TTHA;Lo;0;L;;;;;N;;;;;
2020611A68;SOYOMBO LETTER DDA;Lo;0;L;;;;;N;;;;;
2020711A69;SOYOMBO LETTER DDHA;Lo;0;L;;;;;N;;;;;
2020811A6A;SOYOMBO LETTER NNA;Lo;0;L;;;;;N;;;;;
2020911A6B;SOYOMBO LETTER TA;Lo;0;L;;;;;N;;;;;
2021011A6C;SOYOMBO LETTER THA;Lo;0;L;;;;;N;;;;;
2021111A6D;SOYOMBO LETTER DA;Lo;0;L;;;;;N;;;;;
2021211A6E;SOYOMBO LETTER DHA;Lo;0;L;;;;;N;;;;;
2021311A6F;SOYOMBO LETTER NA;Lo;0;L;;;;;N;;;;;
2021411A70;SOYOMBO LETTER PA;Lo;0;L;;;;;N;;;;;
2021511A71;SOYOMBO LETTER PHA;Lo;0;L;;;;;N;;;;;
2021611A72;SOYOMBO LETTER BA;Lo;0;L;;;;;N;;;;;
2021711A73;SOYOMBO LETTER BHA;Lo;0;L;;;;;N;;;;;
2021811A74;SOYOMBO LETTER MA;Lo;0;L;;;;;N;;;;;
2021911A75;SOYOMBO LETTER TSA;Lo;0;L;;;;;N;;;;;
2022011A76;SOYOMBO LETTER TSHA;Lo;0;L;;;;;N;;;;;
2022111A77;SOYOMBO LETTER DZA;Lo;0;L;;;;;N;;;;;
2022211A78;SOYOMBO LETTER ZHA;Lo;0;L;;;;;N;;;;;
2022311A79;SOYOMBO LETTER ZA;Lo;0;L;;;;;N;;;;;
2022411A7A;SOYOMBO LETTER -A;Lo;0;L;;;;;N;;;;;
2022511A7B;SOYOMBO LETTER YA;Lo;0;L;;;;;N;;;;;
2022611A7C;SOYOMBO LETTER RA;Lo;0;L;;;;;N;;;;;
2022711A7D;SOYOMBO LETTER LA;Lo;0;L;;;;;N;;;;;
2022811A7E;SOYOMBO LETTER VA;Lo;0;L;;;;;N;;;;;
2022911A7F;SOYOMBO LETTER SHA;Lo;0;L;;;;;N;;;;;
2023011A80;SOYOMBO LETTER SSA;Lo;0;L;;;;;N;;;;;
2023111A81;SOYOMBO LETTER SA;Lo;0;L;;;;;N;;;;;
2023211A82;SOYOMBO LETTER HA;Lo;0;L;;;;;N;;;;;
2023311A83;SOYOMBO LETTER KSSA;Lo;0;L;;;;;N;;;;;
2023411A86;SOYOMBO CLUSTER-INITIAL LETTER RA;Lo;0;L;;;;;N;;;;;
2023511A87;SOYOMBO CLUSTER-INITIAL LETTER LA;Lo;0;L;;;;;N;;;;;
2023611A88;SOYOMBO CLUSTER-INITIAL LETTER SHA;Lo;0;L;;;;;N;;;;;
2023711A89;SOYOMBO CLUSTER-INITIAL LETTER SA;Lo;0;L;;;;;N;;;;;
2023811A8A;SOYOMBO FINAL CONSONANT SIGN G;Mn;0;NSM;;;;;N;;;;;
2023911A8B;SOYOMBO FINAL CONSONANT SIGN K;Mn;0;NSM;;;;;N;;;;;
2024011A8C;SOYOMBO FINAL CONSONANT SIGN NG;Mn;0;NSM;;;;;N;;;;;
2024111A8D;SOYOMBO FINAL CONSONANT SIGN D;Mn;0;NSM;;;;;N;;;;;
2024211A8E;SOYOMBO FINAL CONSONANT SIGN N;Mn;0;NSM;;;;;N;;;;;
2024311A8F;SOYOMBO FINAL CONSONANT SIGN B;Mn;0;NSM;;;;;N;;;;;
2024411A90;SOYOMBO FINAL CONSONANT SIGN M;Mn;0;NSM;;;;;N;;;;;
2024511A91;SOYOMBO FINAL CONSONANT SIGN R;Mn;0;NSM;;;;;N;;;;;
2024611A92;SOYOMBO FINAL CONSONANT SIGN L;Mn;0;NSM;;;;;N;;;;;
2024711A93;SOYOMBO FINAL CONSONANT SIGN SH;Mn;0;NSM;;;;;N;;;;;
2024811A94;SOYOMBO FINAL CONSONANT SIGN S;Mn;0;NSM;;;;;N;;;;;
2024911A95;SOYOMBO FINAL CONSONANT SIGN -A;Mn;0;NSM;;;;;N;;;;;
2025011A96;SOYOMBO SIGN ANUSVARA;Mn;0;NSM;;;;;N;;;;;
2025111A97;SOYOMBO SIGN VISARGA;Mc;0;L;;;;;N;;;;;
2025211A98;SOYOMBO GEMINATION MARK;Mn;0;NSM;;;;;N;;;;;
2025311A99;SOYOMBO SUBJOINER;Mn;9;NSM;;;;;N;;;;;
2025411A9A;SOYOMBO MARK TSHEG;Po;0;L;;;;;N;;;;;
2025511A9B;SOYOMBO MARK SHAD;Po;0;L;;;;;N;;;;;
2025611A9C;SOYOMBO MARK DOUBLE SHAD;Po;0;L;;;;;N;;;;;
2025711A9E;SOYOMBO HEAD MARK WITH MOON AND SUN AND TRIPLE FLAME;Po;0;L;;;;;N;;;;;
2025811A9F;SOYOMBO HEAD MARK WITH MOON AND SUN AND FLAME;Po;0;L;;;;;N;;;;;
2025911AA0;SOYOMBO HEAD MARK WITH MOON AND SUN;Po;0;L;;;;;N;;;;;
2026011AA1;SOYOMBO TERMINAL MARK-1;Po;0;L;;;;;N;;;;;
2026111AA2;SOYOMBO TERMINAL MARK-2;Po;0;L;;;;;N;;;;;
2007111AC0;PAU CIN HAU LETTER PA;Lo;0;L;;;;;N;;;;; 2026211AC0;PAU CIN HAU LETTER PA;Lo;0;L;;;;;N;;;;;
2007211AC1;PAU CIN HAU LETTER KA;Lo;0;L;;;;;N;;;;; 2026311AC1;PAU CIN HAU LETTER KA;Lo;0;L;;;;;N;;;;;
2007311AC2;PAU CIN HAU LETTER LA;Lo;0;L;;;;;N;;;;; 2026411AC2;PAU CIN HAU LETTER LA;Lo;0;L;;;;;N;;;;;
@@ -20290,6 +20481,81 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;;
2029011CB4;MARCHEN VOWEL SIGN O;Mc;0;L;;;;;N;;;;; 2048111CB4;MARCHEN VOWEL SIGN O;Mc;0;L;;;;;N;;;;;
2029111CB5;MARCHEN SIGN ANUSVARA;Mn;0;NSM;;;;;N;;;;; 2048211CB5;MARCHEN SIGN ANUSVARA;Mn;0;NSM;;;;;N;;;;;
2029211CB6;MARCHEN SIGN CANDRABINDU;Mn;0;NSM;;;;;N;;;;; 2048311CB6;MARCHEN SIGN CANDRABINDU;Mn;0;NSM;;;;;N;;;;;
2048411D00;MASARAM GONDI LETTER A;Lo;0;L;;;;;N;;;;;
2048511D01;MASARAM GONDI LETTER AA;Lo;0;L;;;;;N;;;;;
2048611D02;MASARAM GONDI LETTER I;Lo;0;L;;;;;N;;;;;
2048711D03;MASARAM GONDI LETTER II;Lo;0;L;;;;;N;;;;;
2048811D04;MASARAM GONDI LETTER U;Lo;0;L;;;;;N;;;;;
2048911D05;MASARAM GONDI LETTER UU;Lo;0;L;;;;;N;;;;;
2049011D06;MASARAM GONDI LETTER E;Lo;0;L;;;;;N;;;;;
2049111D08;MASARAM GONDI LETTER AI;Lo;0;L;;;;;N;;;;;
2049211D09;MASARAM GONDI LETTER O;Lo;0;L;;;;;N;;;;;
2049311D0B;MASARAM GONDI LETTER AU;Lo;0;L;;;;;N;;;;;
2049411D0C;MASARAM GONDI LETTER KA;Lo;0;L;;;;;N;;;;;
2049511D0D;MASARAM GONDI LETTER KHA;Lo;0;L;;;;;N;;;;;
2049611D0E;MASARAM GONDI LETTER GA;Lo;0;L;;;;;N;;;;;
2049711D0F;MASARAM GONDI LETTER GHA;Lo;0;L;;;;;N;;;;;
2049811D10;MASARAM GONDI LETTER NGA;Lo;0;L;;;;;N;;;;;
2049911D11;MASARAM GONDI LETTER CA;Lo;0;L;;;;;N;;;;;
2050011D12;MASARAM GONDI LETTER CHA;Lo;0;L;;;;;N;;;;;
2050111D13;MASARAM GONDI LETTER JA;Lo;0;L;;;;;N;;;;;
2050211D14;MASARAM GONDI LETTER JHA;Lo;0;L;;;;;N;;;;;
2050311D15;MASARAM GONDI LETTER NYA;Lo;0;L;;;;;N;;;;;
2050411D16;MASARAM GONDI LETTER TTA;Lo;0;L;;;;;N;;;;;
2050511D17;MASARAM GONDI LETTER TTHA;Lo;0;L;;;;;N;;;;;
2050611D18;MASARAM GONDI LETTER DDA;Lo;0;L;;;;;N;;;;;
2050711D19;MASARAM GONDI LETTER DDHA;Lo;0;L;;;;;N;;;;;
2050811D1A;MASARAM GONDI LETTER NNA;Lo;0;L;;;;;N;;;;;
2050911D1B;MASARAM GONDI LETTER TA;Lo;0;L;;;;;N;;;;;
2051011D1C;MASARAM GONDI LETTER THA;Lo;0;L;;;;;N;;;;;
2051111D1D;MASARAM GONDI LETTER DA;Lo;0;L;;;;;N;;;;;
2051211D1E;MASARAM GONDI LETTER DHA;Lo;0;L;;;;;N;;;;;
2051311D1F;MASARAM GONDI LETTER NA;Lo;0;L;;;;;N;;;;;
2051411D20;MASARAM GONDI LETTER PA;Lo;0;L;;;;;N;;;;;
2051511D21;MASARAM GONDI LETTER PHA;Lo;0;L;;;;;N;;;;;
2051611D22;MASARAM GONDI LETTER BA;Lo;0;L;;;;;N;;;;;
2051711D23;MASARAM GONDI LETTER BHA;Lo;0;L;;;;;N;;;;;
2051811D24;MASARAM GONDI LETTER MA;Lo;0;L;;;;;N;;;;;
2051911D25;MASARAM GONDI LETTER YA;Lo;0;L;;;;;N;;;;;
2052011D26;MASARAM GONDI LETTER RA;Lo;0;L;;;;;N;;;;;
2052111D27;MASARAM GONDI LETTER LA;Lo;0;L;;;;;N;;;;;
2052211D28;MASARAM GONDI LETTER VA;Lo;0;L;;;;;N;;;;;
2052311D29;MASARAM GONDI LETTER SHA;Lo;0;L;;;;;N;;;;;
2052411D2A;MASARAM GONDI LETTER SSA;Lo;0;L;;;;;N;;;;;
2052511D2B;MASARAM GONDI LETTER SA;Lo;0;L;;;;;N;;;;;
2052611D2C;MASARAM GONDI LETTER HA;Lo;0;L;;;;;N;;;;;
2052711D2D;MASARAM GONDI LETTER LLA;Lo;0;L;;;;;N;;;;;
2052811D2E;MASARAM GONDI LETTER KSSA;Lo;0;L;;;;;N;;;;;
2052911D2F;MASARAM GONDI LETTER JNYA;Lo;0;L;;;;;N;;;;;
2053011D30;MASARAM GONDI LETTER TRA;Lo;0;L;;;;;N;;;;;
2053111D31;MASARAM GONDI VOWEL SIGN AA;Mn;0;NSM;;;;;N;;;;;
2053211D32;MASARAM GONDI VOWEL SIGN I;Mn;0;NSM;;;;;N;;;;;
2053311D33;MASARAM GONDI VOWEL SIGN II;Mn;0;NSM;;;;;N;;;;;
2053411D34;MASARAM GONDI VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;;
2053511D35;MASARAM GONDI VOWEL SIGN UU;Mn;0;NSM;;;;;N;;;;;
2053611D36;MASARAM GONDI VOWEL SIGN VOCALIC R;Mn;0;NSM;;;;;N;;;;;
2053711D3A;MASARAM GONDI VOWEL SIGN E;Mn;0;NSM;;;;;N;;;;;
2053811D3C;MASARAM GONDI VOWEL SIGN AI;Mn;0;NSM;;;;;N;;;;;
2053911D3D;MASARAM GONDI VOWEL SIGN O;Mn;0;NSM;;;;;N;;;;;
2054011D3F;MASARAM GONDI VOWEL SIGN AU;Mn;0;NSM;;;;;N;;;;;
2054111D40;MASARAM GONDI SIGN ANUSVARA;Mn;0;NSM;;;;;N;;;;;
2054211D41;MASARAM GONDI SIGN VISARGA;Mn;0;NSM;;;;;N;;;;;
2054311D42;MASARAM GONDI SIGN NUKTA;Mn;7;NSM;;;;;N;;;;;
2054411D43;MASARAM GONDI SIGN CANDRA;Mn;0;NSM;;;;;N;;;;;
2054511D44;MASARAM GONDI SIGN HALANTA;Mn;9;NSM;;;;;N;;;;;
2054611D45;MASARAM GONDI VIRAMA;Mn;9;NSM;;;;;N;;;;;
2054711D46;MASARAM GONDI REPHA;Lo;0;L;;;;;N;;;;;
2054811D47;MASARAM GONDI RA-KARA;Mn;0;NSM;;;;;N;;;;;
2054911D50;MASARAM GONDI DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;;
2055011D51;MASARAM GONDI DIGIT ONE;Nd;0;L;;1;1;1;N;;;;;
2055111D52;MASARAM GONDI DIGIT TWO;Nd;0;L;;2;2;2;N;;;;;
2055211D53;MASARAM GONDI DIGIT THREE;Nd;0;L;;3;3;3;N;;;;;
2055311D54;MASARAM GONDI DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;;
2055411D55;MASARAM GONDI DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;;
2055511D56;MASARAM GONDI DIGIT SIX;Nd;0;L;;6;6;6;N;;;;;
2055611D57;MASARAM GONDI DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;;
2055711D58;MASARAM GONDI DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;;
2055811D59;MASARAM GONDI DIGIT NINE;Nd;0;L;;9;9;9;N;;;;;
2029312000;CUNEIFORM SIGN A;Lo;0;L;;;;;N;;;;; 2055912000;CUNEIFORM SIGN A;Lo;0;L;;;;;N;;;;;
2029412001;CUNEIFORM SIGN A TIMES A;Lo;0;L;;;;;N;;;;; 2056012001;CUNEIFORM SIGN A TIMES A;Lo;0;L;;;;;N;;;;;
2029512002;CUNEIFORM SIGN A TIMES BAD;Lo;0;L;;;;;N;;;;; 2056112002;CUNEIFORM SIGN A TIMES BAD;Lo;0;L;;;;;N;;;;;
@@ -24087,6 +24353,7 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;;
2408716F9E;MIAO LETTER REFORMED TONE-6;Lm;0;L;;;;;N;;;;; 2435316F9E;MIAO LETTER REFORMED TONE-6;Lm;0;L;;;;;N;;;;;
2408816F9F;MIAO LETTER REFORMED TONE-8;Lm;0;L;;;;;N;;;;; 2435416F9F;MIAO LETTER REFORMED TONE-8;Lm;0;L;;;;;N;;;;;
2408916FE0;TANGUT ITERATION MARK;Lm;0;L;;;;;N;;;;; 2435516FE0;TANGUT ITERATION MARK;Lm;0;L;;;;;N;;;;;
2435616FE1;NUSHU ITERATION MARK;Lm;0;L;;;;;N;;;;;
2409017000;<Tangut Ideograph, First>;Lo;0;L;;;;;N;;;;; 2435717000;<Tangut Ideograph, First>;Lo;0;L;;;;;N;;;;;
24091187EC;<Tangut Ideograph, Last>;Lo;0;L;;;;;N;;;;; 24358187EC;<Tangut Ideograph, Last>;Lo;0;L;;;;;N;;;;;
2409218800;TANGUT COMPONENT-001;Lo;0;L;;;;;N;;;;; 2435918800;TANGUT COMPONENT-001;Lo;0;L;;;;;N;;;;;
@@ -24846,6 +25113,687 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;;
2484618AF2;TANGUT COMPONENT-755;Lo;0;L;;;;;N;;;;; 2511318AF2;TANGUT COMPONENT-755;Lo;0;L;;;;;N;;;;;
248471B000;KATAKANA LETTER ARCHAIC E;Lo;0;L;;;;;N;;;;; 251141B000;KATAKANA LETTER ARCHAIC E;Lo;0;L;;;;;N;;;;;
248481B001;HIRAGANA LETTER ARCHAIC YE;Lo;0;L;;;;;N;;;;; 251151B001;HIRAGANA LETTER ARCHAIC YE;Lo;0;L;;;;;N;;;;;
251161B002;HENTAIGANA LETTER A-1;Lo;0;L;;;;;N;;;;;
251171B003;HENTAIGANA LETTER A-2;Lo;0;L;;;;;N;;;;;
251181B004;HENTAIGANA LETTER A-3;Lo;0;L;;;;;N;;;;;
251191B005;HENTAIGANA LETTER A-WO;Lo;0;L;;;;;N;;;;;
251201B006;HENTAIGANA LETTER I-1;Lo;0;L;;;;;N;;;;;
251211B007;HENTAIGANA LETTER I-2;Lo;0;L;;;;;N;;;;;
251221B008;HENTAIGANA LETTER I-3;Lo;0;L;;;;;N;;;;;
251231B009;HENTAIGANA LETTER I-4;Lo;0;L;;;;;N;;;;;
251241B00A;HENTAIGANA LETTER U-1;Lo;0;L;;;;;N;;;;;
251251B00B;HENTAIGANA LETTER U-2;Lo;0;L;;;;;N;;;;;
251261B00C;HENTAIGANA LETTER U-3;Lo;0;L;;;;;N;;;;;
251271B00D;HENTAIGANA LETTER U-4;Lo;0;L;;;;;N;;;;;
251281B00E;HENTAIGANA LETTER U-5;Lo;0;L;;;;;N;;;;;
251291B00F;HENTAIGANA LETTER E-2;Lo;0;L;;;;;N;;;;;
251301B010;HENTAIGANA LETTER E-3;Lo;0;L;;;;;N;;;;;
251311B011;HENTAIGANA LETTER E-4;Lo;0;L;;;;;N;;;;;
251321B012;HENTAIGANA LETTER E-5;Lo;0;L;;;;;N;;;;;
251331B013;HENTAIGANA LETTER E-6;Lo;0;L;;;;;N;;;;;
251341B014;HENTAIGANA LETTER O-1;Lo;0;L;;;;;N;;;;;
251351B015;HENTAIGANA LETTER O-2;Lo;0;L;;;;;N;;;;;
251361B016;HENTAIGANA LETTER O-3;Lo;0;L;;;;;N;;;;;
251371B017;HENTAIGANA LETTER KA-1;Lo;0;L;;;;;N;;;;;
251381B018;HENTAIGANA LETTER KA-2;Lo;0;L;;;;;N;;;;;
251391B019;HENTAIGANA LETTER KA-3;Lo;0;L;;;;;N;;;;;
251401B01A;HENTAIGANA LETTER KA-4;Lo;0;L;;;;;N;;;;;
251411B01B;HENTAIGANA LETTER KA-5;Lo;0;L;;;;;N;;;;;
251421B01C;HENTAIGANA LETTER KA-6;Lo;0;L;;;;;N;;;;;
251431B01D;HENTAIGANA LETTER KA-7;Lo;0;L;;;;;N;;;;;
251441B01E;HENTAIGANA LETTER KA-8;Lo;0;L;;;;;N;;;;;
251451B01F;HENTAIGANA LETTER KA-9;Lo;0;L;;;;;N;;;;;
251461B020;HENTAIGANA LETTER KA-10;Lo;0;L;;;;;N;;;;;
251471B021;HENTAIGANA LETTER KA-11;Lo;0;L;;;;;N;;;;;
251481B022;HENTAIGANA LETTER KA-KE;Lo;0;L;;;;;N;;;;;
251491B023;HENTAIGANA LETTER KI-1;Lo;0;L;;;;;N;;;;;
251501B024;HENTAIGANA LETTER KI-2;Lo;0;L;;;;;N;;;;;
251511B025;HENTAIGANA LETTER KI-3;Lo;0;L;;;;;N;;;;;
251521B026;HENTAIGANA LETTER KI-4;Lo;0;L;;;;;N;;;;;
251531B027;HENTAIGANA LETTER KI-5;Lo;0;L;;;;;N;;;;;
251541B028;HENTAIGANA LETTER KI-6;Lo;0;L;;;;;N;;;;;
251551B029;HENTAIGANA LETTER KI-7;Lo;0;L;;;;;N;;;;;
251561B02A;HENTAIGANA LETTER KI-8;Lo;0;L;;;;;N;;;;;
251571B02B;HENTAIGANA LETTER KU-1;Lo;0;L;;;;;N;;;;;
251581B02C;HENTAIGANA LETTER KU-2;Lo;0;L;;;;;N;;;;;
251591B02D;HENTAIGANA LETTER KU-3;Lo;0;L;;;;;N;;;;;
251601B02E;HENTAIGANA LETTER KU-4;Lo;0;L;;;;;N;;;;;
251611B02F;HENTAIGANA LETTER KU-5;Lo;0;L;;;;;N;;;;;
251621B030;HENTAIGANA LETTER KU-6;Lo;0;L;;;;;N;;;;;
251631B031;HENTAIGANA LETTER KU-7;Lo;0;L;;;;;N;;;;;
251641B032;HENTAIGANA LETTER KE-1;Lo;0;L;;;;;N;;;;;
251651B033;HENTAIGANA LETTER KE-2;Lo;0;L;;;;;N;;;;;
251661B034;HENTAIGANA LETTER KE-3;Lo;0;L;;;;;N;;;;;
251671B035;HENTAIGANA LETTER KE-4;Lo;0;L;;;;;N;;;;;
251681B036;HENTAIGANA LETTER KE-5;Lo;0;L;;;;;N;;;;;
251691B037;HENTAIGANA LETTER KE-6;Lo;0;L;;;;;N;;;;;
251701B038;HENTAIGANA LETTER KO-1;Lo;0;L;;;;;N;;;;;
251711B039;HENTAIGANA LETTER KO-2;Lo;0;L;;;;;N;;;;;
251721B03A;HENTAIGANA LETTER KO-3;Lo;0;L;;;;;N;;;;;
251731B03B;HENTAIGANA LETTER KO-KI;Lo;0;L;;;;;N;;;;;
251741B03C;HENTAIGANA LETTER SA-1;Lo;0;L;;;;;N;;;;;
251751B03D;HENTAIGANA LETTER SA-2;Lo;0;L;;;;;N;;;;;
251761B03E;HENTAIGANA LETTER SA-3;Lo;0;L;;;;;N;;;;;
251771B03F;HENTAIGANA LETTER SA-4;Lo;0;L;;;;;N;;;;;
251781B040;HENTAIGANA LETTER SA-5;Lo;0;L;;;;;N;;;;;
251791B041;HENTAIGANA LETTER SA-6;Lo;0;L;;;;;N;;;;;
251801B042;HENTAIGANA LETTER SA-7;Lo;0;L;;;;;N;;;;;
251811B043;HENTAIGANA LETTER SA-8;Lo;0;L;;;;;N;;;;;
251821B044;HENTAIGANA LETTER SI-1;Lo;0;L;;;;;N;;;;;
251831B045;HENTAIGANA LETTER SI-2;Lo;0;L;;;;;N;;;;;
251841B046;HENTAIGANA LETTER SI-3;Lo;0;L;;;;;N;;;;;
251851B047;HENTAIGANA LETTER SI-4;Lo;0;L;;;;;N;;;;;
251861B048;HENTAIGANA LETTER SI-5;Lo;0;L;;;;;N;;;;;
251871B049;HENTAIGANA LETTER SI-6;Lo;0;L;;;;;N;;;;;
251881B04A;HENTAIGANA LETTER SU-1;Lo;0;L;;;;;N;;;;;
251891B04B;HENTAIGANA LETTER SU-2;Lo;0;L;;;;;N;;;;;
251901B04C;HENTAIGANA LETTER SU-3;Lo;0;L;;;;;N;;;;;
251911B04D;HENTAIGANA LETTER SU-4;Lo;0;L;;;;;N;;;;;
251921B04E;HENTAIGANA LETTER SU-5;Lo;0;L;;;;;N;;;;;
251931B04F;HENTAIGANA LETTER SU-6;Lo;0;L;;;;;N;;;;;
251941B050;HENTAIGANA LETTER SU-7;Lo;0;L;;;;;N;;;;;
251951B051;HENTAIGANA LETTER SU-8;Lo;0;L;;;;;N;;;;;
251961B052;HENTAIGANA LETTER SE-1;Lo;0;L;;;;;N;;;;;
251971B053;HENTAIGANA LETTER SE-2;Lo;0;L;;;;;N;;;;;
251981B054;HENTAIGANA LETTER SE-3;Lo;0;L;;;;;N;;;;;
251991B055;HENTAIGANA LETTER SE-4;Lo;0;L;;;;;N;;;;;
252001B056;HENTAIGANA LETTER SE-5;Lo;0;L;;;;;N;;;;;
252011B057;HENTAIGANA LETTER SO-1;Lo;0;L;;;;;N;;;;;
252021B058;HENTAIGANA LETTER SO-2;Lo;0;L;;;;;N;;;;;
252031B059;HENTAIGANA LETTER SO-3;Lo;0;L;;;;;N;;;;;
252041B05A;HENTAIGANA LETTER SO-4;Lo;0;L;;;;;N;;;;;
252051B05B;HENTAIGANA LETTER SO-5;Lo;0;L;;;;;N;;;;;
252061B05C;HENTAIGANA LETTER SO-6;Lo;0;L;;;;;N;;;;;
252071B05D;HENTAIGANA LETTER SO-7;Lo;0;L;;;;;N;;;;;
252081B05E;HENTAIGANA LETTER TA-1;Lo;0;L;;;;;N;;;;;
252091B05F;HENTAIGANA LETTER TA-2;Lo;0;L;;;;;N;;;;;
252101B060;HENTAIGANA LETTER TA-3;Lo;0;L;;;;;N;;;;;
252111B061;HENTAIGANA LETTER TA-4;Lo;0;L;;;;;N;;;;;
252121B062;HENTAIGANA LETTER TI-1;Lo;0;L;;;;;N;;;;;
252131B063;HENTAIGANA LETTER TI-2;Lo;0;L;;;;;N;;;;;
252141B064;HENTAIGANA LETTER TI-3;Lo;0;L;;;;;N;;;;;
252151B065;HENTAIGANA LETTER TI-4;Lo;0;L;;;;;N;;;;;
252161B066;HENTAIGANA LETTER TI-5;Lo;0;L;;;;;N;;;;;
252171B067;HENTAIGANA LETTER TI-6;Lo;0;L;;;;;N;;;;;
252181B068;HENTAIGANA LETTER TI-7;Lo;0;L;;;;;N;;;;;
252191B069;HENTAIGANA LETTER TU-1;Lo;0;L;;;;;N;;;;;
252201B06A;HENTAIGANA LETTER TU-2;Lo;0;L;;;;;N;;;;;
252211B06B;HENTAIGANA LETTER TU-3;Lo;0;L;;;;;N;;;;;
252221B06C;HENTAIGANA LETTER TU-4;Lo;0;L;;;;;N;;;;;
252231B06D;HENTAIGANA LETTER TU-TO;Lo;0;L;;;;;N;;;;;
252241B06E;HENTAIGANA LETTER TE-1;Lo;0;L;;;;;N;;;;;
252251B06F;HENTAIGANA LETTER TE-2;Lo;0;L;;;;;N;;;;;
252261B070;HENTAIGANA LETTER TE-3;Lo;0;L;;;;;N;;;;;
252271B071;HENTAIGANA LETTER TE-4;Lo;0;L;;;;;N;;;;;
252281B072;HENTAIGANA LETTER TE-5;Lo;0;L;;;;;N;;;;;
252291B073;HENTAIGANA LETTER TE-6;Lo;0;L;;;;;N;;;;;
252301B074;HENTAIGANA LETTER TE-7;Lo;0;L;;;;;N;;;;;
252311B075;HENTAIGANA LETTER TE-8;Lo;0;L;;;;;N;;;;;
252321B076;HENTAIGANA LETTER TE-9;Lo;0;L;;;;;N;;;;;
252331B077;HENTAIGANA LETTER TO-1;Lo;0;L;;;;;N;;;;;
252341B078;HENTAIGANA LETTER TO-2;Lo;0;L;;;;;N;;;;;
252351B079;HENTAIGANA LETTER TO-3;Lo;0;L;;;;;N;;;;;
252361B07A;HENTAIGANA LETTER TO-4;Lo;0;L;;;;;N;;;;;
252371B07B;HENTAIGANA LETTER TO-5;Lo;0;L;;;;;N;;;;;
252381B07C;HENTAIGANA LETTER TO-6;Lo;0;L;;;;;N;;;;;
252391B07D;HENTAIGANA LETTER TO-RA;Lo;0;L;;;;;N;;;;;
252401B07E;HENTAIGANA LETTER NA-1;Lo;0;L;;;;;N;;;;;
252411B07F;HENTAIGANA LETTER NA-2;Lo;0;L;;;;;N;;;;;
252421B080;HENTAIGANA LETTER NA-3;Lo;0;L;;;;;N;;;;;
252431B081;HENTAIGANA LETTER NA-4;Lo;0;L;;;;;N;;;;;
252441B082;HENTAIGANA LETTER NA-5;Lo;0;L;;;;;N;;;;;
252451B083;HENTAIGANA LETTER NA-6;Lo;0;L;;;;;N;;;;;
252461B084;HENTAIGANA LETTER NA-7;Lo;0;L;;;;;N;;;;;
252471B085;HENTAIGANA LETTER NA-8;Lo;0;L;;;;;N;;;;;
252481B086;HENTAIGANA LETTER NA-9;Lo;0;L;;;;;N;;;;;
252491B087;HENTAIGANA LETTER NI-1;Lo;0;L;;;;;N;;;;;
252501B088;HENTAIGANA LETTER NI-2;Lo;0;L;;;;;N;;;;;
252511B089;HENTAIGANA LETTER NI-3;Lo;0;L;;;;;N;;;;;
252521B08A;HENTAIGANA LETTER NI-4;Lo;0;L;;;;;N;;;;;
252531B08B;HENTAIGANA LETTER NI-5;Lo;0;L;;;;;N;;;;;
252541B08C;HENTAIGANA LETTER NI-6;Lo;0;L;;;;;N;;;;;
252551B08D;HENTAIGANA LETTER NI-7;Lo;0;L;;;;;N;;;;;
252561B08E;HENTAIGANA LETTER NI-TE;Lo;0;L;;;;;N;;;;;
252571B08F;HENTAIGANA LETTER NU-1;Lo;0;L;;;;;N;;;;;
252581B090;HENTAIGANA LETTER NU-2;Lo;0;L;;;;;N;;;;;
252591B091;HENTAIGANA LETTER NU-3;Lo;0;L;;;;;N;;;;;
252601B092;HENTAIGANA LETTER NE-1;Lo;0;L;;;;;N;;;;;
252611B093;HENTAIGANA LETTER NE-2;Lo;0;L;;;;;N;;;;;
252621B094;HENTAIGANA LETTER NE-3;Lo;0;L;;;;;N;;;;;
252631B095;HENTAIGANA LETTER NE-4;Lo;0;L;;;;;N;;;;;
252641B096;HENTAIGANA LETTER NE-5;Lo;0;L;;;;;N;;;;;
252651B097;HENTAIGANA LETTER NE-6;Lo;0;L;;;;;N;;;;;
252661B098;HENTAIGANA LETTER NE-KO;Lo;0;L;;;;;N;;;;;
252671B099;HENTAIGANA LETTER NO-1;Lo;0;L;;;;;N;;;;;
252681B09A;HENTAIGANA LETTER NO-2;Lo;0;L;;;;;N;;;;;
252691B09B;HENTAIGANA LETTER NO-3;Lo;0;L;;;;;N;;;;;
252701B09C;HENTAIGANA LETTER NO-4;Lo;0;L;;;;;N;;;;;
252711B09D;HENTAIGANA LETTER NO-5;Lo;0;L;;;;;N;;;;;
252721B09E;HENTAIGANA LETTER HA-1;Lo;0;L;;;;;N;;;;;
252731B09F;HENTAIGANA LETTER HA-2;Lo;0;L;;;;;N;;;;;
252741B0A0;HENTAIGANA LETTER HA-3;Lo;0;L;;;;;N;;;;;
252751B0A1;HENTAIGANA LETTER HA-4;Lo;0;L;;;;;N;;;;;
252761B0A2;HENTAIGANA LETTER HA-5;Lo;0;L;;;;;N;;;;;
252771B0A3;HENTAIGANA LETTER HA-6;Lo;0;L;;;;;N;;;;;
252781B0A4;HENTAIGANA LETTER HA-7;Lo;0;L;;;;;N;;;;;
252791B0A5;HENTAIGANA LETTER HA-8;Lo;0;L;;;;;N;;;;;
252801B0A6;HENTAIGANA LETTER HA-9;Lo;0;L;;;;;N;;;;;
252811B0A7;HENTAIGANA LETTER HA-10;Lo;0;L;;;;;N;;;;;
252821B0A8;HENTAIGANA LETTER HA-11;Lo;0;L;;;;;N;;;;;
252831B0A9;HENTAIGANA LETTER HI-1;Lo;0;L;;;;;N;;;;;
252841B0AA;HENTAIGANA LETTER HI-2;Lo;0;L;;;;;N;;;;;
252851B0AB;HENTAIGANA LETTER HI-3;Lo;0;L;;;;;N;;;;;
252861B0AC;HENTAIGANA LETTER HI-4;Lo;0;L;;;;;N;;;;;
252871B0AD;HENTAIGANA LETTER HI-5;Lo;0;L;;;;;N;;;;;
252881B0AE;HENTAIGANA LETTER HI-6;Lo;0;L;;;;;N;;;;;
252891B0AF;HENTAIGANA LETTER HI-7;Lo;0;L;;;;;N;;;;;
252901B0B0;HENTAIGANA LETTER HU-1;Lo;0;L;;;;;N;;;;;
252911B0B1;HENTAIGANA LETTER HU-2;Lo;0;L;;;;;N;;;;;
252921B0B2;HENTAIGANA LETTER HU-3;Lo;0;L;;;;;N;;;;;
252931B0B3;HENTAIGANA LETTER HE-1;Lo;0;L;;;;;N;;;;;
252941B0B4;HENTAIGANA LETTER HE-2;Lo;0;L;;;;;N;;;;;
252951B0B5;HENTAIGANA LETTER HE-3;Lo;0;L;;;;;N;;;;;
252961B0B6;HENTAIGANA LETTER HE-4;Lo;0;L;;;;;N;;;;;
252971B0B7;HENTAIGANA LETTER HE-5;Lo;0;L;;;;;N;;;;;
252981B0B8;HENTAIGANA LETTER HE-6;Lo;0;L;;;;;N;;;;;
252991B0B9;HENTAIGANA LETTER HE-7;Lo;0;L;;;;;N;;;;;
253001B0BA;HENTAIGANA LETTER HO-1;Lo;0;L;;;;;N;;;;;
253011B0BB;HENTAIGANA LETTER HO-2;Lo;0;L;;;;;N;;;;;
253021B0BC;HENTAIGANA LETTER HO-3;Lo;0;L;;;;;N;;;;;
253031B0BD;HENTAIGANA LETTER HO-4;Lo;0;L;;;;;N;;;;;
253041B0BE;HENTAIGANA LETTER HO-5;Lo;0;L;;;;;N;;;;;
253051B0BF;HENTAIGANA LETTER HO-6;Lo;0;L;;;;;N;;;;;
253061B0C0;HENTAIGANA LETTER HO-7;Lo;0;L;;;;;N;;;;;
253071B0C1;HENTAIGANA LETTER HO-8;Lo;0;L;;;;;N;;;;;
253081B0C2;HENTAIGANA LETTER MA-1;Lo;0;L;;;;;N;;;;;
253091B0C3;HENTAIGANA LETTER MA-2;Lo;0;L;;;;;N;;;;;
253101B0C4;HENTAIGANA LETTER MA-3;Lo;0;L;;;;;N;;;;;
253111B0C5;HENTAIGANA LETTER MA-4;Lo;0;L;;;;;N;;;;;
253121B0C6;HENTAIGANA LETTER MA-5;Lo;0;L;;;;;N;;;;;
253131B0C7;HENTAIGANA LETTER MA-6;Lo;0;L;;;;;N;;;;;
253141B0C8;HENTAIGANA LETTER MA-7;Lo;0;L;;;;;N;;;;;
253151B0C9;HENTAIGANA LETTER MI-1;Lo;0;L;;;;;N;;;;;
253161B0CA;HENTAIGANA LETTER MI-2;Lo;0;L;;;;;N;;;;;
253171B0CB;HENTAIGANA LETTER MI-3;Lo;0;L;;;;;N;;;;;
253181B0CC;HENTAIGANA LETTER MI-4;Lo;0;L;;;;;N;;;;;
253191B0CD;HENTAIGANA LETTER MI-5;Lo;0;L;;;;;N;;;;;
253201B0CE;HENTAIGANA LETTER MI-6;Lo;0;L;;;;;N;;;;;
253211B0CF;HENTAIGANA LETTER MI-7;Lo;0;L;;;;;N;;;;;
253221B0D0;HENTAIGANA LETTER MU-1;Lo;0;L;;;;;N;;;;;
253231B0D1;HENTAIGANA LETTER MU-2;Lo;0;L;;;;;N;;;;;
253241B0D2;HENTAIGANA LETTER MU-3;Lo;0;L;;;;;N;;;;;
253251B0D3;HENTAIGANA LETTER MU-4;Lo;0;L;;;;;N;;;;;
253261B0D4;HENTAIGANA LETTER ME-1;Lo;0;L;;;;;N;;;;;
253271B0D5;HENTAIGANA LETTER ME-2;Lo;0;L;;;;;N;;;;;
253281B0D6;HENTAIGANA LETTER ME-MA;Lo;0;L;;;;;N;;;;;
253291B0D7;HENTAIGANA LETTER MO-1;Lo;0;L;;;;;N;;;;;
253301B0D8;HENTAIGANA LETTER MO-2;Lo;0;L;;;;;N;;;;;
253311B0D9;HENTAIGANA LETTER MO-3;Lo;0;L;;;;;N;;;;;
253321B0DA;HENTAIGANA LETTER MO-4;Lo;0;L;;;;;N;;;;;
253331B0DB;HENTAIGANA LETTER MO-5;Lo;0;L;;;;;N;;;;;
253341B0DC;HENTAIGANA LETTER MO-6;Lo;0;L;;;;;N;;;;;
253351B0DD;HENTAIGANA LETTER YA-1;Lo;0;L;;;;;N;;;;;
253361B0DE;HENTAIGANA LETTER YA-2;Lo;0;L;;;;;N;;;;;
253371B0DF;HENTAIGANA LETTER YA-3;Lo;0;L;;;;;N;;;;;
253381B0E0;HENTAIGANA LETTER YA-4;Lo;0;L;;;;;N;;;;;
253391B0E1;HENTAIGANA LETTER YA-5;Lo;0;L;;;;;N;;;;;
253401B0E2;HENTAIGANA LETTER YA-YO;Lo;0;L;;;;;N;;;;;
253411B0E3;HENTAIGANA LETTER YU-1;Lo;0;L;;;;;N;;;;;
253421B0E4;HENTAIGANA LETTER YU-2;Lo;0;L;;;;;N;;;;;
253431B0E5;HENTAIGANA LETTER YU-3;Lo;0;L;;;;;N;;;;;
253441B0E6;HENTAIGANA LETTER YU-4;Lo;0;L;;;;;N;;;;;
253451B0E7;HENTAIGANA LETTER YO-1;Lo;0;L;;;;;N;;;;;
253461B0E8;HENTAIGANA LETTER YO-2;Lo;0;L;;;;;N;;;;;
253471B0E9;HENTAIGANA LETTER YO-3;Lo;0;L;;;;;N;;;;;
253481B0EA;HENTAIGANA LETTER YO-4;Lo;0;L;;;;;N;;;;;
253491B0EB;HENTAIGANA LETTER YO-5;Lo;0;L;;;;;N;;;;;
253501B0EC;HENTAIGANA LETTER YO-6;Lo;0;L;;;;;N;;;;;
253511B0ED;HENTAIGANA LETTER RA-1;Lo;0;L;;;;;N;;;;;
253521B0EE;HENTAIGANA LETTER RA-2;Lo;0;L;;;;;N;;;;;
253531B0EF;HENTAIGANA LETTER RA-3;Lo;0;L;;;;;N;;;;;
253541B0F0;HENTAIGANA LETTER RA-4;Lo;0;L;;;;;N;;;;;
253551B0F1;HENTAIGANA LETTER RI-1;Lo;0;L;;;;;N;;;;;
253561B0F2;HENTAIGANA LETTER RI-2;Lo;0;L;;;;;N;;;;;
253571B0F3;HENTAIGANA LETTER RI-3;Lo;0;L;;;;;N;;;;;
253581B0F4;HENTAIGANA LETTER RI-4;Lo;0;L;;;;;N;;;;;
253591B0F5;HENTAIGANA LETTER RI-5;Lo;0;L;;;;;N;;;;;
253601B0F6;HENTAIGANA LETTER RI-6;Lo;0;L;;;;;N;;;;;
253611B0F7;HENTAIGANA LETTER RI-7;Lo;0;L;;;;;N;;;;;
253621B0F8;HENTAIGANA LETTER RU-1;Lo;0;L;;;;;N;;;;;
253631B0F9;HENTAIGANA LETTER RU-2;Lo;0;L;;;;;N;;;;;
253641B0FA;HENTAIGANA LETTER RU-3;Lo;0;L;;;;;N;;;;;
253651B0FB;HENTAIGANA LETTER RU-4;Lo;0;L;;;;;N;;;;;
253661B0FC;HENTAIGANA LETTER RU-5;Lo;0;L;;;;;N;;;;;
253671B0FD;HENTAIGANA LETTER RU-6;Lo;0;L;;;;;N;;;;;
253681B0FE;HENTAIGANA LETTER RE-1;Lo;0;L;;;;;N;;;;;
253691B0FF;HENTAIGANA LETTER RE-2;Lo;0;L;;;;;N;;;;;
253701B100;HENTAIGANA LETTER RE-3;Lo;0;L;;;;;N;;;;;
253711B101;HENTAIGANA LETTER RE-4;Lo;0;L;;;;;N;;;;;
253721B102;HENTAIGANA LETTER RO-1;Lo;0;L;;;;;N;;;;;
253731B103;HENTAIGANA LETTER RO-2;Lo;0;L;;;;;N;;;;;
253741B104;HENTAIGANA LETTER RO-3;Lo;0;L;;;;;N;;;;;
253751B105;HENTAIGANA LETTER RO-4;Lo;0;L;;;;;N;;;;;
253761B106;HENTAIGANA LETTER RO-5;Lo;0;L;;;;;N;;;;;
253771B107;HENTAIGANA LETTER RO-6;Lo;0;L;;;;;N;;;;;
253781B108;HENTAIGANA LETTER WA-1;Lo;0;L;;;;;N;;;;;
253791B109;HENTAIGANA LETTER WA-2;Lo;0;L;;;;;N;;;;;
253801B10A;HENTAIGANA LETTER WA-3;Lo;0;L;;;;;N;;;;;
253811B10B;HENTAIGANA LETTER WA-4;Lo;0;L;;;;;N;;;;;
253821B10C;HENTAIGANA LETTER WA-5;Lo;0;L;;;;;N;;;;;
253831B10D;HENTAIGANA LETTER WI-1;Lo;0;L;;;;;N;;;;;
253841B10E;HENTAIGANA LETTER WI-2;Lo;0;L;;;;;N;;;;;
253851B10F;HENTAIGANA LETTER WI-3;Lo;0;L;;;;;N;;;;;
253861B110;HENTAIGANA LETTER WI-4;Lo;0;L;;;;;N;;;;;
253871B111;HENTAIGANA LETTER WI-5;Lo;0;L;;;;;N;;;;;
253881B112;HENTAIGANA LETTER WE-1;Lo;0;L;;;;;N;;;;;
253891B113;HENTAIGANA LETTER WE-2;Lo;0;L;;;;;N;;;;;
253901B114;HENTAIGANA LETTER WE-3;Lo;0;L;;;;;N;;;;;
253911B115;HENTAIGANA LETTER WE-4;Lo;0;L;;;;;N;;;;;
253921B116;HENTAIGANA LETTER WO-1;Lo;0;L;;;;;N;;;;;
253931B117;HENTAIGANA LETTER WO-2;Lo;0;L;;;;;N;;;;;
253941B118;HENTAIGANA LETTER WO-3;Lo;0;L;;;;;N;;;;;
253951B119;HENTAIGANA LETTER WO-4;Lo;0;L;;;;;N;;;;;
253961B11A;HENTAIGANA LETTER WO-5;Lo;0;L;;;;;N;;;;;
253971B11B;HENTAIGANA LETTER WO-6;Lo;0;L;;;;;N;;;;;
253981B11C;HENTAIGANA LETTER WO-7;Lo;0;L;;;;;N;;;;;
253991B11D;HENTAIGANA LETTER N-MU-MO-1;Lo;0;L;;;;;N;;;;;
254001B11E;HENTAIGANA LETTER N-MU-MO-2;Lo;0;L;;;;;N;;;;;
254011B170;NUSHU CHARACTER-1B170;Lo;0;L;;;;;N;;;;;
254021B171;NUSHU CHARACTER-1B171;Lo;0;L;;;;;N;;;;;
254031B172;NUSHU CHARACTER-1B172;Lo;0;L;;;;;N;;;;;
254041B173;NUSHU CHARACTER-1B173;Lo;0;L;;;;;N;;;;;
254051B174;NUSHU CHARACTER-1B174;Lo;0;L;;;;;N;;;;;
254061B175;NUSHU CHARACTER-1B175;Lo;0;L;;;;;N;;;;;
254071B176;NUSHU CHARACTER-1B176;Lo;0;L;;;;;N;;;;;
254081B177;NUSHU CHARACTER-1B177;Lo;0;L;;;;;N;;;;;
254091B178;NUSHU CHARACTER-1B178;Lo;0;L;;;;;N;;;;;
254101B179;NUSHU CHARACTER-1B179;Lo;0;L;;;;;N;;;;;
254111B17A;NUSHU CHARACTER-1B17A;Lo;0;L;;;;;N;;;;;
254121B17B;NUSHU CHARACTER-1B17B;Lo;0;L;;;;;N;;;;;
254131B17C;NUSHU CHARACTER-1B17C;Lo;0;L;;;;;N;;;;;
254141B17D;NUSHU CHARACTER-1B17D;Lo;0;L;;;;;N;;;;;
254151B17E;NUSHU CHARACTER-1B17E;Lo;0;L;;;;;N;;;;;
254161B17F;NUSHU CHARACTER-1B17F;Lo;0;L;;;;;N;;;;;
254171B180;NUSHU CHARACTER-1B180;Lo;0;L;;;;;N;;;;;
254181B181;NUSHU CHARACTER-1B181;Lo;0;L;;;;;N;;;;;
254191B182;NUSHU CHARACTER-1B182;Lo;0;L;;;;;N;;;;;
254201B183;NUSHU CHARACTER-1B183;Lo;0;L;;;;;N;;;;;
254211B184;NUSHU CHARACTER-1B184;Lo;0;L;;;;;N;;;;;
254221B185;NUSHU CHARACTER-1B185;Lo;0;L;;;;;N;;;;;
254231B186;NUSHU CHARACTER-1B186;Lo;0;L;;;;;N;;;;;
254241B187;NUSHU CHARACTER-1B187;Lo;0;L;;;;;N;;;;;
254251B188;NUSHU CHARACTER-1B188;Lo;0;L;;;;;N;;;;;
254261B189;NUSHU CHARACTER-1B189;Lo;0;L;;;;;N;;;;;
254271B18A;NUSHU CHARACTER-1B18A;Lo;0;L;;;;;N;;;;;
254281B18B;NUSHU CHARACTER-1B18B;Lo;0;L;;;;;N;;;;;
254291B18C;NUSHU CHARACTER-1B18C;Lo;0;L;;;;;N;;;;;
254301B18D;NUSHU CHARACTER-1B18D;Lo;0;L;;;;;N;;;;;
254311B18E;NUSHU CHARACTER-1B18E;Lo;0;L;;;;;N;;;;;
254321B18F;NUSHU CHARACTER-1B18F;Lo;0;L;;;;;N;;;;;
254331B190;NUSHU CHARACTER-1B190;Lo;0;L;;;;;N;;;;;
254341B191;NUSHU CHARACTER-1B191;Lo;0;L;;;;;N;;;;;
254351B192;NUSHU CHARACTER-1B192;Lo;0;L;;;;;N;;;;;
254361B193;NUSHU CHARACTER-1B193;Lo;0;L;;;;;N;;;;;
254371B194;NUSHU CHARACTER-1B194;Lo;0;L;;;;;N;;;;;
254381B195;NUSHU CHARACTER-1B195;Lo;0;L;;;;;N;;;;;
254391B196;NUSHU CHARACTER-1B196;Lo;0;L;;;;;N;;;;;
254401B197;NUSHU CHARACTER-1B197;Lo;0;L;;;;;N;;;;;
254411B198;NUSHU CHARACTER-1B198;Lo;0;L;;;;;N;;;;;
254421B199;NUSHU CHARACTER-1B199;Lo;0;L;;;;;N;;;;;
254431B19A;NUSHU CHARACTER-1B19A;Lo;0;L;;;;;N;;;;;
254441B19B;NUSHU CHARACTER-1B19B;Lo;0;L;;;;;N;;;;;
254451B19C;NUSHU CHARACTER-1B19C;Lo;0;L;;;;;N;;;;;
254461B19D;NUSHU CHARACTER-1B19D;Lo;0;L;;;;;N;;;;;
254471B19E;NUSHU CHARACTER-1B19E;Lo;0;L;;;;;N;;;;;
254481B19F;NUSHU CHARACTER-1B19F;Lo;0;L;;;;;N;;;;;
254491B1A0;NUSHU CHARACTER-1B1A0;Lo;0;L;;;;;N;;;;;
254501B1A1;NUSHU CHARACTER-1B1A1;Lo;0;L;;;;;N;;;;;
254511B1A2;NUSHU CHARACTER-1B1A2;Lo;0;L;;;;;N;;;;;
254521B1A3;NUSHU CHARACTER-1B1A3;Lo;0;L;;;;;N;;;;;
254531B1A4;NUSHU CHARACTER-1B1A4;Lo;0;L;;;;;N;;;;;
254541B1A5;NUSHU CHARACTER-1B1A5;Lo;0;L;;;;;N;;;;;
254551B1A6;NUSHU CHARACTER-1B1A6;Lo;0;L;;;;;N;;;;;
254561B1A7;NUSHU CHARACTER-1B1A7;Lo;0;L;;;;;N;;;;;
254571B1A8;NUSHU CHARACTER-1B1A8;Lo;0;L;;;;;N;;;;;
254581B1A9;NUSHU CHARACTER-1B1A9;Lo;0;L;;;;;N;;;;;
254591B1AA;NUSHU CHARACTER-1B1AA;Lo;0;L;;;;;N;;;;;
254601B1AB;NUSHU CHARACTER-1B1AB;Lo;0;L;;;;;N;;;;;
254611B1AC;NUSHU CHARACTER-1B1AC;Lo;0;L;;;;;N;;;;;
254621B1AD;NUSHU CHARACTER-1B1AD;Lo;0;L;;;;;N;;;;;
254631B1AE;NUSHU CHARACTER-1B1AE;Lo;0;L;;;;;N;;;;;
254641B1AF;NUSHU CHARACTER-1B1AF;Lo;0;L;;;;;N;;;;;
254651B1B0;NUSHU CHARACTER-1B1B0;Lo;0;L;;;;;N;;;;;
254661B1B1;NUSHU CHARACTER-1B1B1;Lo;0;L;;;;;N;;;;;
254671B1B2;NUSHU CHARACTER-1B1B2;Lo;0;L;;;;;N;;;;;
254681B1B3;NUSHU CHARACTER-1B1B3;Lo;0;L;;;;;N;;;;;
254691B1B4;NUSHU CHARACTER-1B1B4;Lo;0;L;;;;;N;;;;;
254701B1B5;NUSHU CHARACTER-1B1B5;Lo;0;L;;;;;N;;;;;
254711B1B6;NUSHU CHARACTER-1B1B6;Lo;0;L;;;;;N;;;;;
254721B1B7;NUSHU CHARACTER-1B1B7;Lo;0;L;;;;;N;;;;;
254731B1B8;NUSHU CHARACTER-1B1B8;Lo;0;L;;;;;N;;;;;
254741B1B9;NUSHU CHARACTER-1B1B9;Lo;0;L;;;;;N;;;;;
254751B1BA;NUSHU CHARACTER-1B1BA;Lo;0;L;;;;;N;;;;;
254761B1BB;NUSHU CHARACTER-1B1BB;Lo;0;L;;;;;N;;;;;
254771B1BC;NUSHU CHARACTER-1B1BC;Lo;0;L;;;;;N;;;;;
254781B1BD;NUSHU CHARACTER-1B1BD;Lo;0;L;;;;;N;;;;;
254791B1BE;NUSHU CHARACTER-1B1BE;Lo;0;L;;;;;N;;;;;
254801B1BF;NUSHU CHARACTER-1B1BF;Lo;0;L;;;;;N;;;;;
254811B1C0;NUSHU CHARACTER-1B1C0;Lo;0;L;;;;;N;;;;;
254821B1C1;NUSHU CHARACTER-1B1C1;Lo;0;L;;;;;N;;;;;
254831B1C2;NUSHU CHARACTER-1B1C2;Lo;0;L;;;;;N;;;;;
254841B1C3;NUSHU CHARACTER-1B1C3;Lo;0;L;;;;;N;;;;;
254851B1C4;NUSHU CHARACTER-1B1C4;Lo;0;L;;;;;N;;;;;
254861B1C5;NUSHU CHARACTER-1B1C5;Lo;0;L;;;;;N;;;;;
254871B1C6;NUSHU CHARACTER-1B1C6;Lo;0;L;;;;;N;;;;;
254881B1C7;NUSHU CHARACTER-1B1C7;Lo;0;L;;;;;N;;;;;
254891B1C8;NUSHU CHARACTER-1B1C8;Lo;0;L;;;;;N;;;;;
254901B1C9;NUSHU CHARACTER-1B1C9;Lo;0;L;;;;;N;;;;;
254911B1CA;NUSHU CHARACTER-1B1CA;Lo;0;L;;;;;N;;;;;
254921B1CB;NUSHU CHARACTER-1B1CB;Lo;0;L;;;;;N;;;;;
254931B1CC;NUSHU CHARACTER-1B1CC;Lo;0;L;;;;;N;;;;;
254941B1CD;NUSHU CHARACTER-1B1CD;Lo;0;L;;;;;N;;;;;
254951B1CE;NUSHU CHARACTER-1B1CE;Lo;0;L;;;;;N;;;;;
254961B1CF;NUSHU CHARACTER-1B1CF;Lo;0;L;;;;;N;;;;;
254971B1D0;NUSHU CHARACTER-1B1D0;Lo;0;L;;;;;N;;;;;
254981B1D1;NUSHU CHARACTER-1B1D1;Lo;0;L;;;;;N;;;;;
254991B1D2;NUSHU CHARACTER-1B1D2;Lo;0;L;;;;;N;;;;;
255001B1D3;NUSHU CHARACTER-1B1D3;Lo;0;L;;;;;N;;;;;
255011B1D4;NUSHU CHARACTER-1B1D4;Lo;0;L;;;;;N;;;;;
255021B1D5;NUSHU CHARACTER-1B1D5;Lo;0;L;;;;;N;;;;;
255031B1D6;NUSHU CHARACTER-1B1D6;Lo;0;L;;;;;N;;;;;
255041B1D7;NUSHU CHARACTER-1B1D7;Lo;0;L;;;;;N;;;;;
255051B1D8;NUSHU CHARACTER-1B1D8;Lo;0;L;;;;;N;;;;;
255061B1D9;NUSHU CHARACTER-1B1D9;Lo;0;L;;;;;N;;;;;
255071B1DA;NUSHU CHARACTER-1B1DA;Lo;0;L;;;;;N;;;;;
255081B1DB;NUSHU CHARACTER-1B1DB;Lo;0;L;;;;;N;;;;;
255091B1DC;NUSHU CHARACTER-1B1DC;Lo;0;L;;;;;N;;;;;
255101B1DD;NUSHU CHARACTER-1B1DD;Lo;0;L;;;;;N;;;;;
255111B1DE;NUSHU CHARACTER-1B1DE;Lo;0;L;;;;;N;;;;;
255121B1DF;NUSHU CHARACTER-1B1DF;Lo;0;L;;;;;N;;;;;
255131B1E0;NUSHU CHARACTER-1B1E0;Lo;0;L;;;;;N;;;;;
255141B1E1;NUSHU CHARACTER-1B1E1;Lo;0;L;;;;;N;;;;;
255151B1E2;NUSHU CHARACTER-1B1E2;Lo;0;L;;;;;N;;;;;
255161B1E3;NUSHU CHARACTER-1B1E3;Lo;0;L;;;;;N;;;;;
255171B1E4;NUSHU CHARACTER-1B1E4;Lo;0;L;;;;;N;;;;;
255181B1E5;NUSHU CHARACTER-1B1E5;Lo;0;L;;;;;N;;;;;
255191B1E6;NUSHU CHARACTER-1B1E6;Lo;0;L;;;;;N;;;;;
255201B1E7;NUSHU CHARACTER-1B1E7;Lo;0;L;;;;;N;;;;;
255211B1E8;NUSHU CHARACTER-1B1E8;Lo;0;L;;;;;N;;;;;
255221B1E9;NUSHU CHARACTER-1B1E9;Lo;0;L;;;;;N;;;;;
255231B1EA;NUSHU CHARACTER-1B1EA;Lo;0;L;;;;;N;;;;;
255241B1EB;NUSHU CHARACTER-1B1EB;Lo;0;L;;;;;N;;;;;
255251B1EC;NUSHU CHARACTER-1B1EC;Lo;0;L;;;;;N;;;;;
255261B1ED;NUSHU CHARACTER-1B1ED;Lo;0;L;;;;;N;;;;;
255271B1EE;NUSHU CHARACTER-1B1EE;Lo;0;L;;;;;N;;;;;
255281B1EF;NUSHU CHARACTER-1B1EF;Lo;0;L;;;;;N;;;;;
255291B1F0;NUSHU CHARACTER-1B1F0;Lo;0;L;;;;;N;;;;;
255301B1F1;NUSHU CHARACTER-1B1F1;Lo;0;L;;;;;N;;;;;
255311B1F2;NUSHU CHARACTER-1B1F2;Lo;0;L;;;;;N;;;;;
255321B1F3;NUSHU CHARACTER-1B1F3;Lo;0;L;;;;;N;;;;;
255331B1F4;NUSHU CHARACTER-1B1F4;Lo;0;L;;;;;N;;;;;
255341B1F5;NUSHU CHARACTER-1B1F5;Lo;0;L;;;;;N;;;;;
255351B1F6;NUSHU CHARACTER-1B1F6;Lo;0;L;;;;;N;;;;;
255361B1F7;NUSHU CHARACTER-1B1F7;Lo;0;L;;;;;N;;;;;
255371B1F8;NUSHU CHARACTER-1B1F8;Lo;0;L;;;;;N;;;;;
255381B1F9;NUSHU CHARACTER-1B1F9;Lo;0;L;;;;;N;;;;;
255391B1FA;NUSHU CHARACTER-1B1FA;Lo;0;L;;;;;N;;;;;
255401B1FB;NUSHU CHARACTER-1B1FB;Lo;0;L;;;;;N;;;;;
255411B1FC;NUSHU CHARACTER-1B1FC;Lo;0;L;;;;;N;;;;;
255421B1FD;NUSHU CHARACTER-1B1FD;Lo;0;L;;;;;N;;;;;
255431B1FE;NUSHU CHARACTER-1B1FE;Lo;0;L;;;;;N;;;;;
255441B1FF;NUSHU CHARACTER-1B1FF;Lo;0;L;;;;;N;;;;;
255451B200;NUSHU CHARACTER-1B200;Lo;0;L;;;;;N;;;;;
255461B201;NUSHU CHARACTER-1B201;Lo;0;L;;;;;N;;;;;
255471B202;NUSHU CHARACTER-1B202;Lo;0;L;;;;;N;;;;;
255481B203;NUSHU CHARACTER-1B203;Lo;0;L;;;;;N;;;;;
255491B204;NUSHU CHARACTER-1B204;Lo;0;L;;;;;N;;;;;
255501B205;NUSHU CHARACTER-1B205;Lo;0;L;;;;;N;;;;;
255511B206;NUSHU CHARACTER-1B206;Lo;0;L;;;;;N;;;;;
255521B207;NUSHU CHARACTER-1B207;Lo;0;L;;;;;N;;;;;
255531B208;NUSHU CHARACTER-1B208;Lo;0;L;;;;;N;;;;;
255541B209;NUSHU CHARACTER-1B209;Lo;0;L;;;;;N;;;;;
255551B20A;NUSHU CHARACTER-1B20A;Lo;0;L;;;;;N;;;;;
255561B20B;NUSHU CHARACTER-1B20B;Lo;0;L;;;;;N;;;;;
255571B20C;NUSHU CHARACTER-1B20C;Lo;0;L;;;;;N;;;;;
255581B20D;NUSHU CHARACTER-1B20D;Lo;0;L;;;;;N;;;;;
255591B20E;NUSHU CHARACTER-1B20E;Lo;0;L;;;;;N;;;;;
255601B20F;NUSHU CHARACTER-1B20F;Lo;0;L;;;;;N;;;;;
255611B210;NUSHU CHARACTER-1B210;Lo;0;L;;;;;N;;;;;
255621B211;NUSHU CHARACTER-1B211;Lo;0;L;;;;;N;;;;;
255631B212;NUSHU CHARACTER-1B212;Lo;0;L;;;;;N;;;;;
255641B213;NUSHU CHARACTER-1B213;Lo;0;L;;;;;N;;;;;
255651B214;NUSHU CHARACTER-1B214;Lo;0;L;;;;;N;;;;;
255661B215;NUSHU CHARACTER-1B215;Lo;0;L;;;;;N;;;;;
255671B216;NUSHU CHARACTER-1B216;Lo;0;L;;;;;N;;;;;
255681B217;NUSHU CHARACTER-1B217;Lo;0;L;;;;;N;;;;;
255691B218;NUSHU CHARACTER-1B218;Lo;0;L;;;;;N;;;;;
255701B219;NUSHU CHARACTER-1B219;Lo;0;L;;;;;N;;;;;
255711B21A;NUSHU CHARACTER-1B21A;Lo;0;L;;;;;N;;;;;
255721B21B;NUSHU CHARACTER-1B21B;Lo;0;L;;;;;N;;;;;
255731B21C;NUSHU CHARACTER-1B21C;Lo;0;L;;;;;N;;;;;
255741B21D;NUSHU CHARACTER-1B21D;Lo;0;L;;;;;N;;;;;
255751B21E;NUSHU CHARACTER-1B21E;Lo;0;L;;;;;N;;;;;
255761B21F;NUSHU CHARACTER-1B21F;Lo;0;L;;;;;N;;;;;
255771B220;NUSHU CHARACTER-1B220;Lo;0;L;;;;;N;;;;;
255781B221;NUSHU CHARACTER-1B221;Lo;0;L;;;;;N;;;;;
255791B222;NUSHU CHARACTER-1B222;Lo;0;L;;;;;N;;;;;
255801B223;NUSHU CHARACTER-1B223;Lo;0;L;;;;;N;;;;;
255811B224;NUSHU CHARACTER-1B224;Lo;0;L;;;;;N;;;;;
255821B225;NUSHU CHARACTER-1B225;Lo;0;L;;;;;N;;;;;
255831B226;NUSHU CHARACTER-1B226;Lo;0;L;;;;;N;;;;;
255841B227;NUSHU CHARACTER-1B227;Lo;0;L;;;;;N;;;;;
255851B228;NUSHU CHARACTER-1B228;Lo;0;L;;;;;N;;;;;
255861B229;NUSHU CHARACTER-1B229;Lo;0;L;;;;;N;;;;;
255871B22A;NUSHU CHARACTER-1B22A;Lo;0;L;;;;;N;;;;;
255881B22B;NUSHU CHARACTER-1B22B;Lo;0;L;;;;;N;;;;;
255891B22C;NUSHU CHARACTER-1B22C;Lo;0;L;;;;;N;;;;;
255901B22D;NUSHU CHARACTER-1B22D;Lo;0;L;;;;;N;;;;;
255911B22E;NUSHU CHARACTER-1B22E;Lo;0;L;;;;;N;;;;;
255921B22F;NUSHU CHARACTER-1B22F;Lo;0;L;;;;;N;;;;;
255931B230;NUSHU CHARACTER-1B230;Lo;0;L;;;;;N;;;;;
255941B231;NUSHU CHARACTER-1B231;Lo;0;L;;;;;N;;;;;
255951B232;NUSHU CHARACTER-1B232;Lo;0;L;;;;;N;;;;;
255961B233;NUSHU CHARACTER-1B233;Lo;0;L;;;;;N;;;;;
255971B234;NUSHU CHARACTER-1B234;Lo;0;L;;;;;N;;;;;
255981B235;NUSHU CHARACTER-1B235;Lo;0;L;;;;;N;;;;;
255991B236;NUSHU CHARACTER-1B236;Lo;0;L;;;;;N;;;;;
256001B237;NUSHU CHARACTER-1B237;Lo;0;L;;;;;N;;;;;
256011B238;NUSHU CHARACTER-1B238;Lo;0;L;;;;;N;;;;;
256021B239;NUSHU CHARACTER-1B239;Lo;0;L;;;;;N;;;;;
256031B23A;NUSHU CHARACTER-1B23A;Lo;0;L;;;;;N;;;;;
256041B23B;NUSHU CHARACTER-1B23B;Lo;0;L;;;;;N;;;;;
256051B23C;NUSHU CHARACTER-1B23C;Lo;0;L;;;;;N;;;;;
256061B23D;NUSHU CHARACTER-1B23D;Lo;0;L;;;;;N;;;;;
256071B23E;NUSHU CHARACTER-1B23E;Lo;0;L;;;;;N;;;;;
256081B23F;NUSHU CHARACTER-1B23F;Lo;0;L;;;;;N;;;;;
256091B240;NUSHU CHARACTER-1B240;Lo;0;L;;;;;N;;;;;
256101B241;NUSHU CHARACTER-1B241;Lo;0;L;;;;;N;;;;;
256111B242;NUSHU CHARACTER-1B242;Lo;0;L;;;;;N;;;;;
256121B243;NUSHU CHARACTER-1B243;Lo;0;L;;;;;N;;;;;
256131B244;NUSHU CHARACTER-1B244;Lo;0;L;;;;;N;;;;;
256141B245;NUSHU CHARACTER-1B245;Lo;0;L;;;;;N;;;;;
256151B246;NUSHU CHARACTER-1B246;Lo;0;L;;;;;N;;;;;
256161B247;NUSHU CHARACTER-1B247;Lo;0;L;;;;;N;;;;;
256171B248;NUSHU CHARACTER-1B248;Lo;0;L;;;;;N;;;;;
256181B249;NUSHU CHARACTER-1B249;Lo;0;L;;;;;N;;;;;
256191B24A;NUSHU CHARACTER-1B24A;Lo;0;L;;;;;N;;;;;
256201B24B;NUSHU CHARACTER-1B24B;Lo;0;L;;;;;N;;;;;
256211B24C;NUSHU CHARACTER-1B24C;Lo;0;L;;;;;N;;;;;
256221B24D;NUSHU CHARACTER-1B24D;Lo;0;L;;;;;N;;;;;
256231B24E;NUSHU CHARACTER-1B24E;Lo;0;L;;;;;N;;;;;
256241B24F;NUSHU CHARACTER-1B24F;Lo;0;L;;;;;N;;;;;
256251B250;NUSHU CHARACTER-1B250;Lo;0;L;;;;;N;;;;;
256261B251;NUSHU CHARACTER-1B251;Lo;0;L;;;;;N;;;;;
256271B252;NUSHU CHARACTER-1B252;Lo;0;L;;;;;N;;;;;
256281B253;NUSHU CHARACTER-1B253;Lo;0;L;;;;;N;;;;;
256291B254;NUSHU CHARACTER-1B254;Lo;0;L;;;;;N;;;;;
256301B255;NUSHU CHARACTER-1B255;Lo;0;L;;;;;N;;;;;
256311B256;NUSHU CHARACTER-1B256;Lo;0;L;;;;;N;;;;;
256321B257;NUSHU CHARACTER-1B257;Lo;0;L;;;;;N;;;;;
256331B258;NUSHU CHARACTER-1B258;Lo;0;L;;;;;N;;;;;
256341B259;NUSHU CHARACTER-1B259;Lo;0;L;;;;;N;;;;;
256351B25A;NUSHU CHARACTER-1B25A;Lo;0;L;;;;;N;;;;;
256361B25B;NUSHU CHARACTER-1B25B;Lo;0;L;;;;;N;;;;;
256371B25C;NUSHU CHARACTER-1B25C;Lo;0;L;;;;;N;;;;;
256381B25D;NUSHU CHARACTER-1B25D;Lo;0;L;;;;;N;;;;;
256391B25E;NUSHU CHARACTER-1B25E;Lo;0;L;;;;;N;;;;;
256401B25F;NUSHU CHARACTER-1B25F;Lo;0;L;;;;;N;;;;;
256411B260;NUSHU CHARACTER-1B260;Lo;0;L;;;;;N;;;;;
256421B261;NUSHU CHARACTER-1B261;Lo;0;L;;;;;N;;;;;
256431B262;NUSHU CHARACTER-1B262;Lo;0;L;;;;;N;;;;;
256441B263;NUSHU CHARACTER-1B263;Lo;0;L;;;;;N;;;;;
256451B264;NUSHU CHARACTER-1B264;Lo;0;L;;;;;N;;;;;
256461B265;NUSHU CHARACTER-1B265;Lo;0;L;;;;;N;;;;;
256471B266;NUSHU CHARACTER-1B266;Lo;0;L;;;;;N;;;;;
256481B267;NUSHU CHARACTER-1B267;Lo;0;L;;;;;N;;;;;
256491B268;NUSHU CHARACTER-1B268;Lo;0;L;;;;;N;;;;;
256501B269;NUSHU CHARACTER-1B269;Lo;0;L;;;;;N;;;;;
256511B26A;NUSHU CHARACTER-1B26A;Lo;0;L;;;;;N;;;;;
256521B26B;NUSHU CHARACTER-1B26B;Lo;0;L;;;;;N;;;;;
256531B26C;NUSHU CHARACTER-1B26C;Lo;0;L;;;;;N;;;;;
256541B26D;NUSHU CHARACTER-1B26D;Lo;0;L;;;;;N;;;;;
256551B26E;NUSHU CHARACTER-1B26E;Lo;0;L;;;;;N;;;;;
256561B26F;NUSHU CHARACTER-1B26F;Lo;0;L;;;;;N;;;;;
256571B270;NUSHU CHARACTER-1B270;Lo;0;L;;;;;N;;;;;
256581B271;NUSHU CHARACTER-1B271;Lo;0;L;;;;;N;;;;;
256591B272;NUSHU CHARACTER-1B272;Lo;0;L;;;;;N;;;;;
256601B273;NUSHU CHARACTER-1B273;Lo;0;L;;;;;N;;;;;
256611B274;NUSHU CHARACTER-1B274;Lo;0;L;;;;;N;;;;;
256621B275;NUSHU CHARACTER-1B275;Lo;0;L;;;;;N;;;;;
256631B276;NUSHU CHARACTER-1B276;Lo;0;L;;;;;N;;;;;
256641B277;NUSHU CHARACTER-1B277;Lo;0;L;;;;;N;;;;;
256651B278;NUSHU CHARACTER-1B278;Lo;0;L;;;;;N;;;;;
256661B279;NUSHU CHARACTER-1B279;Lo;0;L;;;;;N;;;;;
256671B27A;NUSHU CHARACTER-1B27A;Lo;0;L;;;;;N;;;;;
256681B27B;NUSHU CHARACTER-1B27B;Lo;0;L;;;;;N;;;;;
256691B27C;NUSHU CHARACTER-1B27C;Lo;0;L;;;;;N;;;;;
256701B27D;NUSHU CHARACTER-1B27D;Lo;0;L;;;;;N;;;;;
256711B27E;NUSHU CHARACTER-1B27E;Lo;0;L;;;;;N;;;;;
256721B27F;NUSHU CHARACTER-1B27F;Lo;0;L;;;;;N;;;;;
256731B280;NUSHU CHARACTER-1B280;Lo;0;L;;;;;N;;;;;
256741B281;NUSHU CHARACTER-1B281;Lo;0;L;;;;;N;;;;;
256751B282;NUSHU CHARACTER-1B282;Lo;0;L;;;;;N;;;;;
256761B283;NUSHU CHARACTER-1B283;Lo;0;L;;;;;N;;;;;
256771B284;NUSHU CHARACTER-1B284;Lo;0;L;;;;;N;;;;;
256781B285;NUSHU CHARACTER-1B285;Lo;0;L;;;;;N;;;;;
256791B286;NUSHU CHARACTER-1B286;Lo;0;L;;;;;N;;;;;
256801B287;NUSHU CHARACTER-1B287;Lo;0;L;;;;;N;;;;;
256811B288;NUSHU CHARACTER-1B288;Lo;0;L;;;;;N;;;;;
256821B289;NUSHU CHARACTER-1B289;Lo;0;L;;;;;N;;;;;
256831B28A;NUSHU CHARACTER-1B28A;Lo;0;L;;;;;N;;;;;
256841B28B;NUSHU CHARACTER-1B28B;Lo;0;L;;;;;N;;;;;
256851B28C;NUSHU CHARACTER-1B28C;Lo;0;L;;;;;N;;;;;
256861B28D;NUSHU CHARACTER-1B28D;Lo;0;L;;;;;N;;;;;
256871B28E;NUSHU CHARACTER-1B28E;Lo;0;L;;;;;N;;;;;
256881B28F;NUSHU CHARACTER-1B28F;Lo;0;L;;;;;N;;;;;
256891B290;NUSHU CHARACTER-1B290;Lo;0;L;;;;;N;;;;;
256901B291;NUSHU CHARACTER-1B291;Lo;0;L;;;;;N;;;;;
256911B292;NUSHU CHARACTER-1B292;Lo;0;L;;;;;N;;;;;
256921B293;NUSHU CHARACTER-1B293;Lo;0;L;;;;;N;;;;;
256931B294;NUSHU CHARACTER-1B294;Lo;0;L;;;;;N;;;;;
256941B295;NUSHU CHARACTER-1B295;Lo;0;L;;;;;N;;;;;
256951B296;NUSHU CHARACTER-1B296;Lo;0;L;;;;;N;;;;;
256961B297;NUSHU CHARACTER-1B297;Lo;0;L;;;;;N;;;;;
256971B298;NUSHU CHARACTER-1B298;Lo;0;L;;;;;N;;;;;
256981B299;NUSHU CHARACTER-1B299;Lo;0;L;;;;;N;;;;;
256991B29A;NUSHU CHARACTER-1B29A;Lo;0;L;;;;;N;;;;;
257001B29B;NUSHU CHARACTER-1B29B;Lo;0;L;;;;;N;;;;;
257011B29C;NUSHU CHARACTER-1B29C;Lo;0;L;;;;;N;;;;;
257021B29D;NUSHU CHARACTER-1B29D;Lo;0;L;;;;;N;;;;;
257031B29E;NUSHU CHARACTER-1B29E;Lo;0;L;;;;;N;;;;;
257041B29F;NUSHU CHARACTER-1B29F;Lo;0;L;;;;;N;;;;;
257051B2A0;NUSHU CHARACTER-1B2A0;Lo;0;L;;;;;N;;;;;
257061B2A1;NUSHU CHARACTER-1B2A1;Lo;0;L;;;;;N;;;;;
257071B2A2;NUSHU CHARACTER-1B2A2;Lo;0;L;;;;;N;;;;;
257081B2A3;NUSHU CHARACTER-1B2A3;Lo;0;L;;;;;N;;;;;
257091B2A4;NUSHU CHARACTER-1B2A4;Lo;0;L;;;;;N;;;;;
257101B2A5;NUSHU CHARACTER-1B2A5;Lo;0;L;;;;;N;;;;;
257111B2A6;NUSHU CHARACTER-1B2A6;Lo;0;L;;;;;N;;;;;
257121B2A7;NUSHU CHARACTER-1B2A7;Lo;0;L;;;;;N;;;;;
257131B2A8;NUSHU CHARACTER-1B2A8;Lo;0;L;;;;;N;;;;;
257141B2A9;NUSHU CHARACTER-1B2A9;Lo;0;L;;;;;N;;;;;
257151B2AA;NUSHU CHARACTER-1B2AA;Lo;0;L;;;;;N;;;;;
257161B2AB;NUSHU CHARACTER-1B2AB;Lo;0;L;;;;;N;;;;;
257171B2AC;NUSHU CHARACTER-1B2AC;Lo;0;L;;;;;N;;;;;
257181B2AD;NUSHU CHARACTER-1B2AD;Lo;0;L;;;;;N;;;;;
257191B2AE;NUSHU CHARACTER-1B2AE;Lo;0;L;;;;;N;;;;;
257201B2AF;NUSHU CHARACTER-1B2AF;Lo;0;L;;;;;N;;;;;
257211B2B0;NUSHU CHARACTER-1B2B0;Lo;0;L;;;;;N;;;;;
257221B2B1;NUSHU CHARACTER-1B2B1;Lo;0;L;;;;;N;;;;;
257231B2B2;NUSHU CHARACTER-1B2B2;Lo;0;L;;;;;N;;;;;
257241B2B3;NUSHU CHARACTER-1B2B3;Lo;0;L;;;;;N;;;;;
257251B2B4;NUSHU CHARACTER-1B2B4;Lo;0;L;;;;;N;;;;;
257261B2B5;NUSHU CHARACTER-1B2B5;Lo;0;L;;;;;N;;;;;
257271B2B6;NUSHU CHARACTER-1B2B6;Lo;0;L;;;;;N;;;;;
257281B2B7;NUSHU CHARACTER-1B2B7;Lo;0;L;;;;;N;;;;;
257291B2B8;NUSHU CHARACTER-1B2B8;Lo;0;L;;;;;N;;;;;
257301B2B9;NUSHU CHARACTER-1B2B9;Lo;0;L;;;;;N;;;;;
257311B2BA;NUSHU CHARACTER-1B2BA;Lo;0;L;;;;;N;;;;;
257321B2BB;NUSHU CHARACTER-1B2BB;Lo;0;L;;;;;N;;;;;
257331B2BC;NUSHU CHARACTER-1B2BC;Lo;0;L;;;;;N;;;;;
257341B2BD;NUSHU CHARACTER-1B2BD;Lo;0;L;;;;;N;;;;;
257351B2BE;NUSHU CHARACTER-1B2BE;Lo;0;L;;;;;N;;;;;
257361B2BF;NUSHU CHARACTER-1B2BF;Lo;0;L;;;;;N;;;;;
257371B2C0;NUSHU CHARACTER-1B2C0;Lo;0;L;;;;;N;;;;;
257381B2C1;NUSHU CHARACTER-1B2C1;Lo;0;L;;;;;N;;;;;
257391B2C2;NUSHU CHARACTER-1B2C2;Lo;0;L;;;;;N;;;;;
257401B2C3;NUSHU CHARACTER-1B2C3;Lo;0;L;;;;;N;;;;;
257411B2C4;NUSHU CHARACTER-1B2C4;Lo;0;L;;;;;N;;;;;
257421B2C5;NUSHU CHARACTER-1B2C5;Lo;0;L;;;;;N;;;;;
257431B2C6;NUSHU CHARACTER-1B2C6;Lo;0;L;;;;;N;;;;;
257441B2C7;NUSHU CHARACTER-1B2C7;Lo;0;L;;;;;N;;;;;
257451B2C8;NUSHU CHARACTER-1B2C8;Lo;0;L;;;;;N;;;;;
257461B2C9;NUSHU CHARACTER-1B2C9;Lo;0;L;;;;;N;;;;;
257471B2CA;NUSHU CHARACTER-1B2CA;Lo;0;L;;;;;N;;;;;
257481B2CB;NUSHU CHARACTER-1B2CB;Lo;0;L;;;;;N;;;;;
257491B2CC;NUSHU CHARACTER-1B2CC;Lo;0;L;;;;;N;;;;;
257501B2CD;NUSHU CHARACTER-1B2CD;Lo;0;L;;;;;N;;;;;
257511B2CE;NUSHU CHARACTER-1B2CE;Lo;0;L;;;;;N;;;;;
257521B2CF;NUSHU CHARACTER-1B2CF;Lo;0;L;;;;;N;;;;;
257531B2D0;NUSHU CHARACTER-1B2D0;Lo;0;L;;;;;N;;;;;
257541B2D1;NUSHU CHARACTER-1B2D1;Lo;0;L;;;;;N;;;;;
257551B2D2;NUSHU CHARACTER-1B2D2;Lo;0;L;;;;;N;;;;;
257561B2D3;NUSHU CHARACTER-1B2D3;Lo;0;L;;;;;N;;;;;
257571B2D4;NUSHU CHARACTER-1B2D4;Lo;0;L;;;;;N;;;;;
257581B2D5;NUSHU CHARACTER-1B2D5;Lo;0;L;;;;;N;;;;;
257591B2D6;NUSHU CHARACTER-1B2D6;Lo;0;L;;;;;N;;;;;
257601B2D7;NUSHU CHARACTER-1B2D7;Lo;0;L;;;;;N;;;;;
257611B2D8;NUSHU CHARACTER-1B2D8;Lo;0;L;;;;;N;;;;;
257621B2D9;NUSHU CHARACTER-1B2D9;Lo;0;L;;;;;N;;;;;
257631B2DA;NUSHU CHARACTER-1B2DA;Lo;0;L;;;;;N;;;;;
257641B2DB;NUSHU CHARACTER-1B2DB;Lo;0;L;;;;;N;;;;;
257651B2DC;NUSHU CHARACTER-1B2DC;Lo;0;L;;;;;N;;;;;
257661B2DD;NUSHU CHARACTER-1B2DD;Lo;0;L;;;;;N;;;;;
257671B2DE;NUSHU CHARACTER-1B2DE;Lo;0;L;;;;;N;;;;;
257681B2DF;NUSHU CHARACTER-1B2DF;Lo;0;L;;;;;N;;;;;
257691B2E0;NUSHU CHARACTER-1B2E0;Lo;0;L;;;;;N;;;;;
257701B2E1;NUSHU CHARACTER-1B2E1;Lo;0;L;;;;;N;;;;;
257711B2E2;NUSHU CHARACTER-1B2E2;Lo;0;L;;;;;N;;;;;
257721B2E3;NUSHU CHARACTER-1B2E3;Lo;0;L;;;;;N;;;;;
257731B2E4;NUSHU CHARACTER-1B2E4;Lo;0;L;;;;;N;;;;;
257741B2E5;NUSHU CHARACTER-1B2E5;Lo;0;L;;;;;N;;;;;
257751B2E6;NUSHU CHARACTER-1B2E6;Lo;0;L;;;;;N;;;;;
257761B2E7;NUSHU CHARACTER-1B2E7;Lo;0;L;;;;;N;;;;;
257771B2E8;NUSHU CHARACTER-1B2E8;Lo;0;L;;;;;N;;;;;
257781B2E9;NUSHU CHARACTER-1B2E9;Lo;0;L;;;;;N;;;;;
257791B2EA;NUSHU CHARACTER-1B2EA;Lo;0;L;;;;;N;;;;;
257801B2EB;NUSHU CHARACTER-1B2EB;Lo;0;L;;;;;N;;;;;
257811B2EC;NUSHU CHARACTER-1B2EC;Lo;0;L;;;;;N;;;;;
257821B2ED;NUSHU CHARACTER-1B2ED;Lo;0;L;;;;;N;;;;;
257831B2EE;NUSHU CHARACTER-1B2EE;Lo;0;L;;;;;N;;;;;
257841B2EF;NUSHU CHARACTER-1B2EF;Lo;0;L;;;;;N;;;;;
257851B2F0;NUSHU CHARACTER-1B2F0;Lo;0;L;;;;;N;;;;;
257861B2F1;NUSHU CHARACTER-1B2F1;Lo;0;L;;;;;N;;;;;
257871B2F2;NUSHU CHARACTER-1B2F2;Lo;0;L;;;;;N;;;;;
257881B2F3;NUSHU CHARACTER-1B2F3;Lo;0;L;;;;;N;;;;;
257891B2F4;NUSHU CHARACTER-1B2F4;Lo;0;L;;;;;N;;;;;
257901B2F5;NUSHU CHARACTER-1B2F5;Lo;0;L;;;;;N;;;;;
257911B2F6;NUSHU CHARACTER-1B2F6;Lo;0;L;;;;;N;;;;;
257921B2F7;NUSHU CHARACTER-1B2F7;Lo;0;L;;;;;N;;;;;
257931B2F8;NUSHU CHARACTER-1B2F8;Lo;0;L;;;;;N;;;;;
257941B2F9;NUSHU CHARACTER-1B2F9;Lo;0;L;;;;;N;;;;;
257951B2FA;NUSHU CHARACTER-1B2FA;Lo;0;L;;;;;N;;;;;
257961B2FB;NUSHU CHARACTER-1B2FB;Lo;0;L;;;;;N;;;;;
248491BC00;DUPLOYAN LETTER H;Lo;0;L;;;;;N;;;;; 257971BC00;DUPLOYAN LETTER H;Lo;0;L;;;;;N;;;;;
248501BC01;DUPLOYAN LETTER X;Lo;0;L;;;;;N;;;;; 257981BC01;DUPLOYAN LETTER X;Lo;0;L;;;;;N;;;;;
248511BC02;DUPLOYAN LETTER P;Lo;0;L;;;;;N;;;;; 257991BC02;DUPLOYAN LETTER P;Lo;0;L;;;;;N;;;;;
@@ -28269,6 +29217,12 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;;
282691F248;TORTOISE SHELL BRACKETED CJK UNIFIED IDEOGRAPH-6557;So;0;L;<compat> 3014 6557 3015;;;;N;;;;; 292171F248;TORTOISE SHELL BRACKETED CJK UNIFIED IDEOGRAPH-6557;So;0;L;<compat> 3014 6557 3015;;;;N;;;;;
282701F250;CIRCLED IDEOGRAPH ADVANTAGE;So;0;L;<circle> 5F97;;;;N;;;;; 292181F250;CIRCLED IDEOGRAPH ADVANTAGE;So;0;L;<circle> 5F97;;;;N;;;;;
282711F251;CIRCLED IDEOGRAPH ACCEPT;So;0;L;<circle> 53EF;;;;N;;;;; 292191F251;CIRCLED IDEOGRAPH ACCEPT;So;0;L;<circle> 53EF;;;;N;;;;;
292201F260;ROUNDED SYMBOL FOR FU;So;0;ON;;;;;N;;;;;
292211F261;ROUNDED SYMBOL FOR LU;So;0;ON;;;;;N;;;;;
292221F262;ROUNDED SYMBOL FOR SHOU;So;0;ON;;;;;N;;;;;
292231F263;ROUNDED SYMBOL FOR XI;So;0;ON;;;;;N;;;;;
292241F264;ROUNDED SYMBOL FOR SHUANGXI;So;0;ON;;;;;N;;;;;
292251F265;ROUNDED SYMBOL FOR CAI;So;0;ON;;;;;N;;;;;
282721F300;CYCLONE;So;0;ON;;;;;N;;;;; 292261F300;CYCLONE;So;0;ON;;;;;N;;;;;
282731F301;FOGGY;So;0;ON;;;;;N;;;;; 292271F301;FOGGY;So;0;ON;;;;;N;;;;;
282741F302;CLOSED UMBRELLA;So;0;ON;;;;;N;;;;; 292281F302;CLOSED UMBRELLA;So;0;ON;;;;;N;;;;;
@@ -29248,6 +30202,8 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;;
292481F6D0;PLACE OF WORSHIP;So;0;ON;;;;;N;;;;; 302021F6D0;PLACE OF WORSHIP;So;0;ON;;;;;N;;;;;
292491F6D1;OCTAGONAL SIGN;So;0;ON;;;;;N;;;;; 302031F6D1;OCTAGONAL SIGN;So;0;ON;;;;;N;;;;;
292501F6D2;SHOPPING TROLLEY;So;0;ON;;;;;N;;;;; 302041F6D2;SHOPPING TROLLEY;So;0;ON;;;;;N;;;;;
302051F6D3;STUPA;So;0;ON;;;;;N;;;;;
302061F6D4;PAGODA;So;0;ON;;;;;N;;;;;
292511F6E0;HAMMER AND WRENCH;So;0;ON;;;;;N;;;;; 302071F6E0;HAMMER AND WRENCH;So;0;ON;;;;;N;;;;;
292521F6E1;SHIELD;So;0;ON;;;;;N;;;;; 302081F6E1;SHIELD;So;0;ON;;;;;N;;;;;
292531F6E2;OIL DRUM;So;0;ON;;;;;N;;;;; 302091F6E2;OIL DRUM;So;0;ON;;;;;N;;;;;
@@ -29268,6 +30224,8 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;;
292681F6F4;SCOOTER;So;0;ON;;;;;N;;;;; 302241F6F4;SCOOTER;So;0;ON;;;;;N;;;;;
292691F6F5;MOTOR SCOOTER;So;0;ON;;;;;N;;;;; 302251F6F5;MOTOR SCOOTER;So;0;ON;;;;;N;;;;;
292701F6F6;CANOE;So;0;ON;;;;;N;;;;; 302261F6F6;CANOE;So;0;ON;;;;;N;;;;;
302271F6F7;SLED;So;0;ON;;;;;N;;;;;
302281F6F8;FLYING SAUCER;So;0;ON;;;;;N;;;;;
292711F700;ALCHEMICAL SYMBOL FOR QUINTESSENCE;So;0;ON;;;;;N;;;;; 302291F700;ALCHEMICAL SYMBOL FOR QUINTESSENCE;So;0;ON;;;;;N;;;;;
292721F701;ALCHEMICAL SYMBOL FOR AIR;So;0;ON;;;;;N;;;;; 302301F701;ALCHEMICAL SYMBOL FOR AIR;So;0;ON;;;;;N;;;;;
292731F702;ALCHEMICAL SYMBOL FOR FIRE;So;0;ON;;;;;N;;;;; 302311F702;ALCHEMICAL SYMBOL FOR FIRE;So;0;ON;;;;;N;;;;;
@@ -29617,6 +30575,18 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;;
296171F8AB;RIGHTWARDS FRONT-TILTED SHADOWED WHITE ARROW;So;0;ON;;;;;N;;;;; 305751F8AB;RIGHTWARDS FRONT-TILTED SHADOWED WHITE ARROW;So;0;ON;;;;;N;;;;;
296181F8AC;WHITE ARROW SHAFT WIDTH ONE;So;0;ON;;;;;N;;;;; 305761F8AC;WHITE ARROW SHAFT WIDTH ONE;So;0;ON;;;;;N;;;;;
296191F8AD;WHITE ARROW SHAFT WIDTH TWO THIRDS;So;0;ON;;;;;N;;;;; 305771F8AD;WHITE ARROW SHAFT WIDTH TWO THIRDS;So;0;ON;;;;;N;;;;;
305781F900;CIRCLED CROSS FORMEE WITH FOUR DOTS;So;0;ON;;;;;N;;;;;
305791F901;CIRCLED CROSS FORMEE WITH TWO DOTS;So;0;ON;;;;;N;;;;;
305801F902;CIRCLED CROSS FORMEE;So;0;ON;;;;;N;;;;;
305811F903;LEFT HALF CIRCLE WITH FOUR DOTS;So;0;ON;;;;;N;;;;;
305821F904;LEFT HALF CIRCLE WITH THREE DOTS;So;0;ON;;;;;N;;;;;
305831F905;LEFT HALF CIRCLE WITH TWO DOTS;So;0;ON;;;;;N;;;;;
305841F906;LEFT HALF CIRCLE WITH DOT;So;0;ON;;;;;N;;;;;
305851F907;LEFT HALF CIRCLE;So;0;ON;;;;;N;;;;;
305861F908;DOWNWARD FACING HOOK;So;0;ON;;;;;N;;;;;
305871F909;DOWNWARD FACING NOTCHED HOOK;So;0;ON;;;;;N;;;;;
305881F90A;DOWNWARD FACING HOOK WITH DOT;So;0;ON;;;;;N;;;;;
305891F90B;DOWNWARD FACING NOTCHED HOOK WITH DOT;So;0;ON;;;;;N;;;;;
296201F910;ZIPPER-MOUTH FACE;So;0;ON;;;;;N;;;;; 305901F910;ZIPPER-MOUTH FACE;So;0;ON;;;;;N;;;;;
296211F911;MONEY-MOUTH FACE;So;0;ON;;;;;N;;;;; 305911F911;MONEY-MOUTH FACE;So;0;ON;;;;;N;;;;;
296221F912;FACE WITH THERMOMETER;So;0;ON;;;;;N;;;;; 305921F912;FACE WITH THERMOMETER;So;0;ON;;;;;N;;;;;
@@ -29632,6 +30602,7 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;;
296321F91C;RIGHT-FACING FIST;So;0;ON;;;;;N;;;;; 306021F91C;RIGHT-FACING FIST;So;0;ON;;;;;N;;;;;
296331F91D;HANDSHAKE;So;0;ON;;;;;N;;;;; 306031F91D;HANDSHAKE;So;0;ON;;;;;N;;;;;
296341F91E;HAND WITH INDEX AND MIDDLE FINGERS CROSSED;So;0;ON;;;;;N;;;;; 306041F91E;HAND WITH INDEX AND MIDDLE FINGERS CROSSED;So;0;ON;;;;;N;;;;;
306051F91F;I LOVE YOU HAND SIGN;So;0;ON;;;;;N;;;;;
296351F920;FACE WITH COWBOY HAT;So;0;ON;;;;;N;;;;; 306061F920;FACE WITH COWBOY HAT;So;0;ON;;;;;N;;;;;
296361F921;CLOWN FACE;So;0;ON;;;;;N;;;;; 306071F921;CLOWN FACE;So;0;ON;;;;;N;;;;;
296371F922;NAUSEATED FACE;So;0;ON;;;;;N;;;;; 306081F922;NAUSEATED FACE;So;0;ON;;;;;N;;;;;
@@ -29640,7 +30611,17 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;;
296401F925;LYING FACE;So;0;ON;;;;;N;;;;; 306111F925;LYING FACE;So;0;ON;;;;;N;;;;;
296411F926;FACE PALM;So;0;ON;;;;;N;;;;; 306121F926;FACE PALM;So;0;ON;;;;;N;;;;;
296421F927;SNEEZING FACE;So;0;ON;;;;;N;;;;; 306131F927;SNEEZING FACE;So;0;ON;;;;;N;;;;;
306141F928;FACE WITH ONE EYEBROW RAISED;So;0;ON;;;;;N;;;;;
306151F929;GRINNING FACE WITH STAR EYES;So;0;ON;;;;;N;;;;;
306161F92A;GRINNING FACE WITH ONE LARGE AND ONE SMALL EYE;So;0;ON;;;;;N;;;;;
306171F92B;FACE WITH FINGER COVERING CLOSED LIPS;So;0;ON;;;;;N;;;;;
306181F92C;SERIOUS FACE WITH SYMBOLS COVERING MOUTH;So;0;ON;;;;;N;;;;;
306191F92D;SMILING FACE WITH SMILING EYES AND HAND COVERING MOUTH;So;0;ON;;;;;N;;;;;
306201F92E;FACE WITH OPEN MOUTH VOMITING;So;0;ON;;;;;N;;;;;
306211F92F;SHOCKED FACE WITH EXPLODING HEAD;So;0;ON;;;;;N;;;;;
296431F930;PREGNANT WOMAN;So;0;ON;;;;;N;;;;; 306221F930;PREGNANT WOMAN;So;0;ON;;;;;N;;;;;
306231F931;BREAST-FEEDING;So;0;ON;;;;;N;;;;;
306241F932;PALMS UP TOGETHER;So;0;ON;;;;;N;;;;;
296441F933;SELFIE;So;0;ON;;;;;N;;;;; 306251F933;SELFIE;So;0;ON;;;;;N;;;;;
296451F934;PRINCE;So;0;ON;;;;;N;;;;; 306261F934;PRINCE;So;0;ON;;;;;N;;;;;
296461F935;MAN IN TUXEDO;So;0;ON;;;;;N;;;;; 306271F935;MAN IN TUXEDO;So;0;ON;;;;;N;;;;;
@@ -29665,6 +30646,7 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;;
296651F949;THIRD PLACE MEDAL;So;0;ON;;;;;N;;;;; 306461F949;THIRD PLACE MEDAL;So;0;ON;;;;;N;;;;;
296661F94A;BOXING GLOVE;So;0;ON;;;;;N;;;;; 306471F94A;BOXING GLOVE;So;0;ON;;;;;N;;;;;
296671F94B;MARTIAL ARTS UNIFORM;So;0;ON;;;;;N;;;;; 306481F94B;MARTIAL ARTS UNIFORM;So;0;ON;;;;;N;;;;;
306491F94C;CURLING STONE;So;0;ON;;;;;N;;;;;
296681F950;CROISSANT;So;0;ON;;;;;N;;;;; 306501F950;CROISSANT;So;0;ON;;;;;N;;;;;
296691F951;AVOCADO;So;0;ON;;;;;N;;;;; 306511F951;AVOCADO;So;0;ON;;;;;N;;;;;
296701F952;CUCUMBER;So;0;ON;;;;;N;;;;; 306521F952;CUCUMBER;So;0;ON;;;;;N;;;;;
@@ -29680,6 +30662,19 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;;
296801F95C;PEANUTS;So;0;ON;;;;;N;;;;; 306621F95C;PEANUTS;So;0;ON;;;;;N;;;;;
296811F95D;KIWIFRUIT;So;0;ON;;;;;N;;;;; 306631F95D;KIWIFRUIT;So;0;ON;;;;;N;;;;;
296821F95E;PANCAKES;So;0;ON;;;;;N;;;;; 306641F95E;PANCAKES;So;0;ON;;;;;N;;;;;
306651F95F;DUMPLING;So;0;ON;;;;;N;;;;;
306661F960;FORTUNE COOKIE;So;0;ON;;;;;N;;;;;
306671F961;TAKEOUT BOX;So;0;ON;;;;;N;;;;;
306681F962;CHOPSTICKS;So;0;ON;;;;;N;;;;;
306691F963;BOWL WITH SPOON;So;0;ON;;;;;N;;;;;
306701F964;CUP WITH STRAW;So;0;ON;;;;;N;;;;;
306711F965;COCONUT;So;0;ON;;;;;N;;;;;
306721F966;BROCCOLI;So;0;ON;;;;;N;;;;;
306731F967;PIE;So;0;ON;;;;;N;;;;;
306741F968;PRETZEL;So;0;ON;;;;;N;;;;;
306751F969;CUT OF MEAT;So;0;ON;;;;;N;;;;;
306761F96A;SANDWICH;So;0;ON;;;;;N;;;;;
306771F96B;CANNED FOOD;So;0;ON;;;;;N;;;;;
296831F980;CRAB;So;0;ON;;;;;N;;;;; 306781F980;CRAB;So;0;ON;;;;;N;;;;;
296841F981;LION FACE;So;0;ON;;;;;N;;;;; 306791F981;LION FACE;So;0;ON;;;;;N;;;;;
296851F982;SCORPION;So;0;ON;;;;;N;;;;; 306801F982;SCORPION;So;0;ON;;;;;N;;;;;
@@ -29698,7 +30693,36 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;;
296981F98F;RHINOCEROS;So;0;ON;;;;;N;;;;; 306931F98F;RHINOCEROS;So;0;ON;;;;;N;;;;;
296991F990;SHRIMP;So;0;ON;;;;;N;;;;; 306941F990;SHRIMP;So;0;ON;;;;;N;;;;;
297001F991;SQUID;So;0;ON;;;;;N;;;;; 306951F991;SQUID;So;0;ON;;;;;N;;;;;
306961F992;GIRAFFE FACE;So;0;ON;;;;;N;;;;;
306971F993;ZEBRA FACE;So;0;ON;;;;;N;;;;;
306981F994;HEDGEHOG;So;0;ON;;;;;N;;;;;
306991F995;SAUROPOD;So;0;ON;;;;;N;;;;;
307001F996;T-REX;So;0;ON;;;;;N;;;;;
307011F997;CRICKET;So;0;ON;;;;;N;;;;;
297011F9C0;CHEESE WEDGE;So;0;ON;;;;;N;;;;; 307021F9C0;CHEESE WEDGE;So;0;ON;;;;;N;;;;;
307031F9D0;FACE WITH MONOCLE;So;0;ON;;;;;N;;;;;
307041F9D1;ADULT;So;0;ON;;;;;N;;;;;
307051F9D2;CHILD;So;0;ON;;;;;N;;;;;
307061F9D3;OLDER ADULT;So;0;ON;;;;;N;;;;;
307071F9D4;BEARDED PERSON;So;0;ON;;;;;N;;;;;
307081F9D5;PERSON WITH HEADSCARF;So;0;ON;;;;;N;;;;;
307091F9D6;PERSON IN STEAMY ROOM;So;0;ON;;;;;N;;;;;
307101F9D7;PERSON CLIMBING;So;0;ON;;;;;N;;;;;
307111F9D8;PERSON IN LOTUS POSITION;So;0;ON;;;;;N;;;;;
307121F9D9;MAGE;So;0;ON;;;;;N;;;;;
307131F9DA;FAIRY;So;0;ON;;;;;N;;;;;
307141F9DB;VAMPIRE;So;0;ON;;;;;N;;;;;
307151F9DC;MERPERSON;So;0;ON;;;;;N;;;;;
307161F9DD;ELF;So;0;ON;;;;;N;;;;;
307171F9DE;GENIE;So;0;ON;;;;;N;;;;;
307181F9DF;ZOMBIE;So;0;ON;;;;;N;;;;;
307191F9E0;BRAIN;So;0;ON;;;;;N;;;;;
307201F9E1;ORANGE HEART;So;0;ON;;;;;N;;;;;
307211F9E2;BILLED CAP;So;0;ON;;;;;N;;;;;
307221F9E3;SCARF;So;0;ON;;;;;N;;;;;
307231F9E4;GLOVES;So;0;ON;;;;;N;;;;;
307241F9E5;COAT;So;0;ON;;;;;N;;;;;
307251F9E6;SOCKS;So;0;ON;;;;;N;;;;;
2970220000;<CJK Ideograph Extension B, First>;Lo;0;L;;;;;N;;;;; 3072620000;<CJK Ideograph Extension B, First>;Lo;0;L;;;;;N;;;;;
297032A6D6;<CJK Ideograph Extension B, Last>;Lo;0;L;;;;;N;;;;; 307272A6D6;<CJK Ideograph Extension B, Last>;Lo;0;L;;;;;N;;;;;
297042A700;<CJK Ideograph Extension C, First>;Lo;0;L;;;;;N;;;;; 307282A700;<CJK Ideograph Extension C, First>;Lo;0;L;;;;;N;;;;;
@@ -29707,6 +30731,8 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;;
297072B81D;<CJK Ideograph Extension D, Last>;Lo;0;L;;;;;N;;;;; 307312B81D;<CJK Ideograph Extension D, Last>;Lo;0;L;;;;;N;;;;;
297082B820;<CJK Ideograph Extension E, First>;Lo;0;L;;;;;N;;;;; 307322B820;<CJK Ideograph Extension E, First>;Lo;0;L;;;;;N;;;;;
297092CEA1;<CJK Ideograph Extension E, Last>;Lo;0;L;;;;;N;;;;; 307332CEA1;<CJK Ideograph Extension E, Last>;Lo;0;L;;;;;N;;;;;
307342CEB0;<CJK Ideograph Extension F, First>;Lo;0;L;;;;;N;;;;;
307352EBE0;<CJK Ideograph Extension F, Last>;Lo;0;L;;;;;N;;;;;
297102F800;CJK COMPATIBILITY IDEOGRAPH-2F800;Lo;0;L;4E3D;;;;N;;;;; 307362F800;CJK COMPATIBILITY IDEOGRAPH-2F800;Lo;0;L;4E3D;;;;N;;;;;
297112F801;CJK COMPATIBILITY IDEOGRAPH-2F801;Lo;0;L;4E38;;;;N;;;;; 307372F801;CJK COMPATIBILITY IDEOGRAPH-2F801;Lo;0;L;4E38;;;;N;;;;;
297122F802;CJK COMPATIBILITY IDEOGRAPH-2F802;Lo;0;L;4E41;;;;N;;;;; 307382F802;CJK COMPATIBILITY IDEOGRAPH-2F802;Lo;0;L;4E41;;;;N;;;;;
diff --git a/build-aux/config.guess b/build-aux/config.guess
index 2193702b12a..07785f54515 100755
--- a/build-aux/config.guess
+++ b/build-aux/config.guess
@@ -2,7 +2,7 @@
2# Attempt to guess a canonical system name. 2# Attempt to guess a canonical system name.
3# Copyright 1992-2017 Free Software Foundation, Inc. 3# Copyright 1992-2017 Free Software Foundation, Inc.
4 4
5timestamp='2017-05-27' 5timestamp='2017-07-19'
6 6
7# This file is free software; you can redistribute it and/or modify it 7# This file is free software; you can redistribute it and/or modify it
8# under the terms of the GNU General Public License as published by 8# under the terms of the GNU General Public License as published by
@@ -1429,8 +1429,8 @@ cat >&2 <<EOF
1429$0: unable to guess system type 1429$0: unable to guess system type
1430 1430
1431This script (version $timestamp), has failed to recognize the 1431This script (version $timestamp), has failed to recognize the
1432operating system you are using. If your script is old, overwrite 1432operating system you are using. If your script is old, overwrite *all*
1433config.guess and config.sub with the latest versions from: 1433copies of config.guess and config.sub with the latest versions from:
1434 1434
1435 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess 1435 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
1436and 1436and
diff --git a/configure.ac b/configure.ac
index 980b4c633ba..e4647c6a301 100644
--- a/configure.ac
+++ b/configure.ac
@@ -352,7 +352,8 @@ OPTION_DEFAULT_OFF([w32], [use native MS Windows GUI in a Cygwin build])
352 352
353OPTION_DEFAULT_ON([gpm],[don't use -lgpm for mouse support on a GNU/Linux console]) 353OPTION_DEFAULT_ON([gpm],[don't use -lgpm for mouse support on a GNU/Linux console])
354OPTION_DEFAULT_ON([dbus],[don't compile with D-Bus support]) 354OPTION_DEFAULT_ON([dbus],[don't compile with D-Bus support])
355OPTION_DEFAULT_ON([gconf],[don't compile with GConf support]) 355AC_ARG_WITH([gconf],[AS_HELP_STRING([--with-gconf],
356[compile with Gconf support (Gsettings replaces this)])],[],[with_gconf=maybe])
356OPTION_DEFAULT_ON([gsettings],[don't compile with GSettings support]) 357OPTION_DEFAULT_ON([gsettings],[don't compile with GSettings support])
357OPTION_DEFAULT_ON([selinux],[don't compile with SELinux support]) 358OPTION_DEFAULT_ON([selinux],[don't compile with SELinux support])
358OPTION_DEFAULT_ON([gnutls],[don't use -lgnutls for SSL/TLS support]) 359OPTION_DEFAULT_ON([gnutls],[don't use -lgnutls for SSL/TLS support])
@@ -2506,7 +2507,8 @@ if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" || test "${HAVE_W32}"
2506 if test "${with_imagemagick}" != "no"; then 2507 if test "${with_imagemagick}" != "no"; then
2507 ## 6.3.5 is the earliest version known to work; see Bug#17339. 2508 ## 6.3.5 is the earliest version known to work; see Bug#17339.
2508 ## 6.8.2 makes Emacs crash; see Bug#13867. 2509 ## 6.8.2 makes Emacs crash; see Bug#13867.
2509 IMAGEMAGICK_MODULE="Wand >= 6.3.5 Wand != 6.8.2" 2510 ## 7 and later have not been ported to; See Bug#25967.
2511 IMAGEMAGICK_MODULE="Wand >= 6.3.5 Wand != 6.8.2 Wand < 7"
2510 EMACS_CHECK_MODULES([IMAGEMAGICK], [$IMAGEMAGICK_MODULE]) 2512 EMACS_CHECK_MODULES([IMAGEMAGICK], [$IMAGEMAGICK_MODULE])
2511 2513
2512 if test $HAVE_IMAGEMAGICK = yes; then 2514 if test $HAVE_IMAGEMAGICK = yes; then
@@ -2775,6 +2777,7 @@ if test "${HAVE_X11}" = "yes" && test "${with_gsettings}" = "yes"; then
2775 AC_DEFINE(HAVE_GSETTINGS, 1, [Define to 1 if using GSettings.]) 2777 AC_DEFINE(HAVE_GSETTINGS, 1, [Define to 1 if using GSettings.])
2776 SETTINGS_CFLAGS="$GSETTINGS_CFLAGS" 2778 SETTINGS_CFLAGS="$GSETTINGS_CFLAGS"
2777 SETTINGS_LIBS="$GSETTINGS_LIBS" 2779 SETTINGS_LIBS="$GSETTINGS_LIBS"
2780 test "$with_gconf" = "yes" || with_gconf=no
2778 fi 2781 fi
2779 CFLAGS=$old_CFLAGS 2782 CFLAGS=$old_CFLAGS
2780 LIBS=$old_LIBS 2783 LIBS=$old_LIBS
@@ -2784,7 +2787,7 @@ fi
2784dnl GConf has been tested under GNU/Linux only. 2787dnl GConf has been tested under GNU/Linux only.
2785dnl The version is really arbitrary, it is about the same age as Gtk+ 2.6. 2788dnl The version is really arbitrary, it is about the same age as Gtk+ 2.6.
2786HAVE_GCONF=no 2789HAVE_GCONF=no
2787if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then 2790if test "${HAVE_X11}" = "yes" && test "${with_gconf}" != "no"; then
2788 EMACS_CHECK_MODULES([GCONF], [gconf-2.0 >= 2.13]) 2791 EMACS_CHECK_MODULES([GCONF], [gconf-2.0 >= 2.13])
2789 if test "$HAVE_GCONF" = yes; then 2792 if test "$HAVE_GCONF" = yes; then
2790 AC_DEFINE(HAVE_GCONF, 1, [Define to 1 if using GConf.]) 2793 AC_DEFINE(HAVE_GCONF, 1, [Define to 1 if using GConf.])
@@ -2831,6 +2834,87 @@ if test "${with_gnutls}" = "yes" ; then
2831 AC_DEFINE(HAVE_GNUTLS, 1, [Define if using GnuTLS.]) 2834 AC_DEFINE(HAVE_GNUTLS, 1, [Define if using GnuTLS.])
2832 EMACS_CHECK_MODULES([LIBGNUTLS3], [gnutls >= 3.0.0], 2835 EMACS_CHECK_MODULES([LIBGNUTLS3], [gnutls >= 3.0.0],
2833 [AC_DEFINE(HAVE_GNUTLS3, 1, [Define if using GnuTLS v3.])], []) 2836 [AC_DEFINE(HAVE_GNUTLS3, 1, [Define if using GnuTLS v3.])], [])
2837
2838 AC_CACHE_CHECK([for GnuTLS v3 with HMAC], [emacs_cv_gnutls3_hmac],
2839 [AC_COMPILE_IFELSE(
2840 [AC_LANG_PROGRAM([[
2841 #include <gnutls/gnutls.h>
2842 #include <gnutls/crypto.h>
2843 ]], [[
2844 int
2845 main (void)
2846 {
2847 gnutls_hmac_hd_t handle;
2848 gnutls_hmac_deinit (handle, NULL);
2849 }
2850 ]])],
2851 [emacs_cv_gnutls3_hmac=yes],
2852 [emacs_cv_gnutls3_hmac=no])])
2853 if test "$emacs_cv_gnutls3_hmac" = yes; then
2854 AC_DEFINE([HAVE_GNUTLS3_HMAC], [1],
2855 [Define if using GnuTLS v3 with HMAC support.])
2856 fi
2857
2858 AC_CACHE_CHECK([for GnuTLS v3 with AEAD], [emacs_cv_gnutls3_aead],
2859 [AC_COMPILE_IFELSE(
2860 [AC_LANG_PROGRAM([[
2861 #include <gnutls/gnutls.h>
2862 #include <gnutls/crypto.h>
2863 ]], [[
2864 int
2865 main (void)
2866 {
2867 gnutls_aead_cipher_hd_t handle;
2868 gnutls_aead_cipher_deinit (handle);
2869 }
2870 ]])],
2871 [emacs_cv_gnutls3_aead=yes],
2872 [emacs_cv_gnutls3_aead=no])])
2873 if test "$emacs_cv_gnutls3_aead" = yes; then
2874 AC_DEFINE([HAVE_GNUTLS3_AEAD], [1],
2875 [Define if using GnuTLS v3 with AEAD support.])
2876 fi
2877
2878 AC_CACHE_CHECK([for GnuTLS v3 with cipher], [emacs_cv_gnutls3_cipher],
2879 [AC_COMPILE_IFELSE(
2880 [AC_LANG_PROGRAM([[
2881 #include <gnutls/gnutls.h>
2882 #include <gnutls/crypto.h>
2883 ]], [[
2884 int
2885 main (void)
2886 {
2887 gnutls_cipher_hd_t handle;
2888 gnutls_cipher_encrypt2 (handle, NULL, 0, NULL, 0);
2889 gnutls_cipher_deinit (handle);
2890 }
2891 ]])],
2892 [emacs_cv_gnutls3_cipher=yes],
2893 [emacs_cv_gnutls3_cipher=no])])
2894 if test "$emacs_cv_gnutls3_cipher" = yes; then
2895 AC_DEFINE([HAVE_GNUTLS3_CIPHER], [1],
2896 [Define if using GnuTLS v3 with cipher support.])
2897 fi
2898
2899 AC_CACHE_CHECK([for GnuTLS v3 with digest], [emacs_cv_gnutls3_digest],
2900 [AC_COMPILE_IFELSE(
2901 [AC_LANG_PROGRAM([[
2902 #include <gnutls/gnutls.h>
2903 #include <gnutls/crypto.h>
2904 ]], [[
2905 int
2906 main (void)
2907 {
2908 gnutls_hash_hd_t handle;
2909 gnutls_hash_deinit (handle, NULL);
2910 }
2911 ]])],
2912 [emacs_cv_gnutls3_digest=yes],
2913 [emacs_cv_gnutls3_digest=no])])
2914 if test "$emacs_cv_gnutls3_digest" = yes; then
2915 AC_DEFINE([HAVE_GNUTLS3_DIGEST], [1],
2916 [Define if using GnuTLS v3 with digest support.])
2917 fi
2834 fi 2918 fi
2835 2919
2836 # Windows loads GnuTLS dynamically 2920 # Windows loads GnuTLS dynamically
@@ -3476,27 +3560,22 @@ AC_SUBST(LIBZ)
3476LIBMODULES= 3560LIBMODULES=
3477HAVE_MODULES=no 3561HAVE_MODULES=no
3478MODULES_OBJ= 3562MODULES_OBJ=
3479MODULES_SUFFIX= 3563case $opsys in
3564 cygwin|mingw32) MODULES_SUFFIX=".dll" ;;
3565 *) MODULES_SUFFIX=".so" ;;
3566esac
3480if test "${with_modules}" != "no"; then 3567if test "${with_modules}" != "no"; then
3481 case $opsys in 3568 case $opsys in
3482 gnu|gnu-linux) 3569 gnu|gnu-linux)
3483 LIBMODULES="-ldl" 3570 LIBMODULES="-ldl"
3484 MODULES_SUFFIX=".so"
3485 HAVE_MODULES=yes
3486 ;;
3487 cygwin|mingw32)
3488 MODULES_SUFFIX=".dll"
3489 HAVE_MODULES=yes 3571 HAVE_MODULES=yes
3490 ;; 3572 ;;
3491 darwin) 3573 cygwin|mingw32|darwin)
3492 MODULES_SUFFIX=".so"
3493 HAVE_MODULES=yes 3574 HAVE_MODULES=yes
3494 ;; 3575 ;;
3495 *) 3576 *)
3496 # BSD systems have dlopen in libc. 3577 # BSD systems have dlopen in libc.
3497 AC_CHECK_FUNC([dlopen], 3578 AC_CHECK_FUNC([dlopen], [HAVE_MODULES=yes])
3498 [MODULES_SUFFIX=".so"
3499 HAVE_MODULES=yes])
3500 ;; 3579 ;;
3501 esac 3580 esac
3502 3581
@@ -5383,7 +5462,7 @@ AS_ECHO([" Does Emacs use -lXaw3d? ${HAVE_XAW3D
5383 Does Emacs use a png library? ${HAVE_PNG} $LIBPNG 5462 Does Emacs use a png library? ${HAVE_PNG} $LIBPNG
5384 Does Emacs use -lrsvg-2? ${HAVE_RSVG} 5463 Does Emacs use -lrsvg-2? ${HAVE_RSVG}
5385 Does Emacs use cairo? ${HAVE_CAIRO} 5464 Does Emacs use cairo? ${HAVE_CAIRO}
5386 Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK} 5465 Does Emacs use imagemagick (version 6)? ${HAVE_IMAGEMAGICK}
5387 Does Emacs support sound? ${HAVE_SOUND} 5466 Does Emacs support sound? ${HAVE_SOUND}
5388 Does Emacs use -lgpm? ${HAVE_GPM} 5467 Does Emacs use -lgpm? ${HAVE_GPM}
5389 Does Emacs use -ldbus? ${HAVE_DBUS} 5468 Does Emacs use -ldbus? ${HAVE_DBUS}
diff --git a/doc/emacs/basic.texi b/doc/emacs/basic.texi
index 6b66c18016b..5878e7da256 100644
--- a/doc/emacs/basic.texi
+++ b/doc/emacs/basic.texi
@@ -630,7 +630,8 @@ Display the line number of point.
630@item M-x line-number-mode 630@item M-x line-number-mode
631@itemx M-x column-number-mode 631@itemx M-x column-number-mode
632Toggle automatic display of the current line number or column number. 632Toggle automatic display of the current line number or column number.
633@xref{Optional Mode Line}. 633@xref{Optional Mode Line}. If you want to have a line number
634displayed before each line, see @ref{Display Custom}.
634 635
635@item M-= 636@item M-=
636Display the number of lines, words, and characters that are present in 637Display the number of lines, words, and characters that are present in
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi
index c84f4a975d8..1c9c14a962a 100644
--- a/doc/emacs/custom.texi
+++ b/doc/emacs/custom.texi
@@ -1701,7 +1701,7 @@ and mouse events:
1701(global-set-key (kbd "C-c y") 'clipboard-yank) 1701(global-set-key (kbd "C-c y") 'clipboard-yank)
1702(global-set-key (kbd "C-M-q") 'query-replace) 1702(global-set-key (kbd "C-M-q") 'query-replace)
1703(global-set-key (kbd "<f5>") 'flyspell-mode) 1703(global-set-key (kbd "<f5>") 'flyspell-mode)
1704(global-set-key (kbd "C-<f5>") 'linum-mode) 1704(global-set-key (kbd "C-<f5>") 'display-line-numbers-mode)
1705(global-set-key (kbd "C-<right>") 'forward-sentence) 1705(global-set-key (kbd "C-<right>") 'forward-sentence)
1706(global-set-key (kbd "<mouse-2>") 'mouse-save-then-kill) 1706(global-set-key (kbd "<mouse-2>") 'mouse-save-then-kill)
1707@end example 1707@end example
diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi
index 28cb51d88bb..ddd7229b0c8 100644
--- a/doc/emacs/dired.texi
+++ b/doc/emacs/dired.texi
@@ -1115,7 +1115,7 @@ parent directory.
1115@findex dired-next-dirline 1115@findex dired-next-dirline
1116@kindex > @r{(Dired)} 1116@kindex > @r{(Dired)}
1117@item > 1117@item >
1118Move down to the next directory-file line (@code{dired-prev-dirline}). 1118Move down to the next directory-file line (@code{dired-next-dirline}).
1119@end table 1119@end table
1120 1120
1121@node Hiding Subdirectories 1121@node Hiding Subdirectories
diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi
index c4554eb3187..083fcdf97a6 100644
--- a/doc/emacs/display.texi
+++ b/doc/emacs/display.texi
@@ -1333,7 +1333,7 @@ characters in the buffer, which means that @samp{k} for 10^3, @samp{M}
1333for 10^6, @samp{G} for 10^9, etc., are used to abbreviate. 1333for 10^6, @samp{G} for 10^9, etc., are used to abbreviate.
1334 1334
1335@cindex line number display 1335@cindex line number display
1336@cindex display of line number 1336@cindex display of current line number
1337@findex line-number-mode 1337@findex line-number-mode
1338 The current line number of point appears in the mode line when Line 1338 The current line number of point appears in the mode line when Line
1339Number mode is enabled. Use the command @kbd{M-x line-number-mode} to 1339Number mode is enabled. Use the command @kbd{M-x line-number-mode} to
@@ -1710,6 +1710,66 @@ variable @code{visual-line-fringe-indicators}.
1710 This section describes variables that control miscellaneous aspects 1710 This section describes variables that control miscellaneous aspects
1711of the appearance of the Emacs screen. Beginning users can skip it. 1711of the appearance of the Emacs screen. Beginning users can skip it.
1712 1712
1713@vindex display-line-numbers
1714@cindex number lines in a buffer
1715@cindex display line numbers
1716 If you want to have Emacs display line numbers for every line in the
1717buffer, customize the buffer-local variable
1718@code{display-line-numbers}; it is @code{nil} by default. This
1719variable can have several different values to support various modes of
1720line-number display:
1721
1722@table @asis
1723@item @code{t}
1724Display (an absolute) line number before each non-continuation screen
1725line that displays buffer text. If the line is a continuation line,
1726or if the entire screen line displays a display or an overlay string,
1727that line will not be numbered.
1728
1729@item @code{relative}
1730Display relative line numbers before non-continuation lines which show
1731buffer text. The line numbers are relative to the line showing point,
1732so the numbers grow both up and down as lines become farther from the
1733current line.
1734
1735@item @code{visual}
1736This value causes Emacs to count lines visually: only lines actually
1737shown on the display will be counted (disregarding any lines in
1738invisible parts of text), and lines which wrap to consume more than
1739one screen line will be numbered that many times. The displayed
1740numbers are relative, as with @code{relative} value above. This is
1741handy in modes that fold text, such as Outline mode (@pxref{Outline
1742Mode}), and need to move by exact number of screen lines.
1743
1744@item anything else
1745Any other non-@code{nil} value is treated as @code{t}.
1746@end table
1747
1748@vindex display-line-numbers-current-absolute
1749When Emacs displays relative line numbers, you can control the number
1750displayed before the current line, the line showing point. By
1751default, Emacs displays the absolute number of the current line there,
1752even though all the other line numbers are relative. If you customize
1753the variable @code{display-line-numbers-current-absolute} to a
1754@code{nil} value, the number displayed for the current line will be
1755zero. This is handy if you don't care about the number of the current
1756line, and want to leave more horizontal space for text in large
1757buffers.
1758
1759@vindex display-line-numbers-widen
1760In a narrowed buffer (@pxref{Narrowing}) lines are normally numbered
1761starting at the beginning of the narrowing. However, if you customize
1762the variable @code{display-line-numbers-widen} to a non-@code{nil}
1763value, line numbers will disregard any narrowing and will start at the
1764first character of the buffer.
1765
1766@cindex line-number face
1767The line numbers are displayed in a special face @code{line-number}.
1768The current line number is displayed in a different face,
1769@code{line-number-current-line}, so you can make the current line's
1770number have a distinct appearance, which will help locating the line
1771showing point.
1772
1713@vindex visible-bell 1773@vindex visible-bell
1714 If the variable @code{visible-bell} is non-@code{nil}, Emacs attempts 1774 If the variable @code{visible-bell} is non-@code{nil}, Emacs attempts
1715to make the whole screen blink when it would normally make an audible bell 1775to make the whole screen blink when it would normally make an audible bell
diff --git a/doc/emacs/fixit.texi b/doc/emacs/fixit.texi
index 2ba3e26c484..f833f572dfc 100644
--- a/doc/emacs/fixit.texi
+++ b/doc/emacs/fixit.texi
@@ -254,6 +254,7 @@ Restart the Aspell/Ispell/Hunspell process, using @var{dict} as the dictionary.
254Kill the Aspell/Ispell/Hunspell subprocess. 254Kill the Aspell/Ispell/Hunspell subprocess.
255@item M-@key{TAB} 255@item M-@key{TAB}
256@itemx @key{ESC} @key{TAB} 256@itemx @key{ESC} @key{TAB}
257@itemx C-M-i
257Complete the word before point based on the spelling dictionary 258Complete the word before point based on the spelling dictionary
258(@code{ispell-complete-word}). 259(@code{ispell-complete-word}).
259@item M-x flyspell-mode 260@item M-x flyspell-mode
diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi
index e3e59ad43ac..ee33a6848c5 100644
--- a/doc/emacs/frames.texi
+++ b/doc/emacs/frames.texi
@@ -575,7 +575,8 @@ font names in X resource files.
575If you are running Emacs on the GNOME desktop, you can tell Emacs to 575If you are running Emacs on the GNOME desktop, you can tell Emacs to
576use the default system font by setting the variable 576use the default system font by setting the variable
577@code{font-use-system-font} to @code{t} (the default is @code{nil}). 577@code{font-use-system-font} to @code{t} (the default is @code{nil}).
578For this to work, Emacs must have been compiled with Gconf support. 578For this to work, Emacs must have been compiled with support for
579Gsettings (or the older Gconf).
579 580
580@item 581@item
581Use the command line option @samp{-fn} (or @samp{--font}). @xref{Font 582Use the command line option @samp{-fn} (or @samp{--font}). @xref{Font
diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi
index 80a4467f639..431ef35ac7f 100644
--- a/doc/emacs/maintaining.texi
+++ b/doc/emacs/maintaining.texi
@@ -56,6 +56,7 @@ versions of a source file, storing information such as the creation
56time of each version, who made it, and a description of what was 56time of each version, who made it, and a description of what was
57changed. 57changed.
58 58
59@cindex VC
59 The Emacs version control interface is called @dfn{VC}@. VC 60 The Emacs version control interface is called @dfn{VC}@. VC
60commands work with several different version control systems; 61commands work with several different version control systems;
61currently, it supports Bazaar, CVS, Git, Mercurial, Monotone, RCS, 62currently, it supports Bazaar, CVS, Git, Mercurial, Monotone, RCS,
diff --git a/doc/emacs/modes.texi b/doc/emacs/modes.texi
index be893403012..876431aa9e9 100644
--- a/doc/emacs/modes.texi
+++ b/doc/emacs/modes.texi
@@ -225,10 +225,12 @@ Font-Lock mode automatically highlights certain textual units found in
225programs. It is enabled globally by default, but you can disable it 225programs. It is enabled globally by default, but you can disable it
226in individual buffers. @xref{Faces}. 226in individual buffers. @xref{Faces}.
227 227
228@findex linum-mode 228@findex display-line-numbers-mode
229@cindex Linum mode 229@cindex display-line-numbers-mode
230@item 230@item
231Linum mode displays each line's line number in the window's left margin. 231Display Line Numbers mode is a convenience wrapper around
232@code{display-line-numbers}, setting it using the value of
233@code{display-line-numbers-type}. @xref{Display Custom}.
232 234
233@item 235@item
234Outline minor mode provides similar facilities to the major mode 236Outline minor mode provides similar facilities to the major mode
diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi
index 8edf2640cfe..2f27b9aa0eb 100644
--- a/doc/emacs/mule.texi
+++ b/doc/emacs/mule.texi
@@ -1774,15 +1774,15 @@ Chars}).
1774@cindex bidirectional editing 1774@cindex bidirectional editing
1775@cindex right-to-left text 1775@cindex right-to-left text
1776 1776
1777 Emacs supports editing text written in scripts, such as Arabic and 1777 Emacs supports editing text written in scripts, such as Arabic,
1778Hebrew, whose natural ordering of horizontal text for display is from 1778Farsi, and Hebrew, whose natural ordering of horizontal text for
1779right to left. However, digits and Latin text embedded in these 1779display is from right to left. However, digits and Latin text
1780scripts are still displayed left to right. It is also not uncommon to 1780embedded in these scripts are still displayed left to right. It is
1781have small portions of text in Arabic or Hebrew embedded in an otherwise 1781also not uncommon to have small portions of text in Arabic or Hebrew
1782Latin document; e.g., as comments and strings in a program source 1782embedded in an otherwise Latin document; e.g., as comments and strings
1783file. For these reasons, text that uses these scripts is actually 1783in a program source file. For these reasons, text that uses these
1784@dfn{bidirectional}: a mixture of runs of left-to-right and 1784scripts is actually @dfn{bidirectional}: a mixture of runs of
1785right-to-left characters. 1785left-to-right and right-to-left characters.
1786 1786
1787 This section describes the facilities and options provided by Emacs 1787 This section describes the facilities and options provided by Emacs
1788for editing bidirectional text. 1788for editing bidirectional text.
@@ -1811,15 +1811,21 @@ directionality when they are displayed. The default value is
1811 1811
1812@cindex base direction of paragraphs 1812@cindex base direction of paragraphs
1813@cindex paragraph, base direction 1813@cindex paragraph, base direction
1814@vindex bidi-paragraph-start-re
1815@vindex bidi-paragraph-separate-re
1814 Each paragraph of bidirectional text can have its own @dfn{base 1816 Each paragraph of bidirectional text can have its own @dfn{base
1815direction}, either right-to-left or left-to-right. (Paragraph 1817direction}, either right-to-left or left-to-right. Text in
1816@c paragraph-separate etc have no influence on this? 1818left-to-right paragraphs begins on the screen at the left margin of
1817boundaries are empty lines, i.e., lines consisting entirely of 1819the window and is truncated or continued when it reaches the right
1818whitespace characters.) Text in left-to-right paragraphs begins on 1820margin. By contrast, text in right-to-left paragraphs is displayed
1819the screen at the left margin of the window and is truncated or 1821starting at the right margin and is continued or truncated at the left
1820continued when it reaches the right margin. By contrast, text in 1822margin. By default, paragraph boundaries are empty lines, i.e., lines
1821right-to-left paragraphs is displayed starting at the right margin and 1823consisting entirely of whitespace characters. To change that, you can
1822is continued or truncated at the left margin. 1824customize the two variables @code{bidi-paragraph-start-re} and
1825@code{bidi-paragraph-separate-re}, whose values should be regular
1826expressions (strings); e.g., to have a single newline start a new
1827paragraph, set both of these variables to @code{"^"}. These two
1828variables are buffer-local (@pxref{Locals}).
1823 1829
1824@vindex bidi-paragraph-direction 1830@vindex bidi-paragraph-direction
1825 Emacs determines the base direction of each paragraph dynamically, 1831 Emacs determines the base direction of each paragraph dynamically,
diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi
index 905df025d29..c9e83da173f 100644
--- a/doc/emacs/search.texi
+++ b/doc/emacs/search.texi
@@ -582,6 +582,8 @@ word search (@code{isearch-forward-word}).
582Search for @var{words}, using a forward nonincremental word search. 582Search for @var{words}, using a forward nonincremental word search.
583@item M-s w C-r @key{RET} @var{words} @key{RET} 583@item M-s w C-r @key{RET} @var{words} @key{RET}
584Search backward for @var{words}, using a nonincremental word search. 584Search backward for @var{words}, using a nonincremental word search.
585@item M-s M-w
586Search the Web for the text in region.
585@end table 587@end table
586 588
587@kindex M-s w 589@kindex M-s w
@@ -617,12 +619,15 @@ toggling lax whitespace matching (@pxref{Lax Search, lax space
617matching}) has no effect on them. 619matching}) has no effect on them.
618 620
619@kindex M-s M-w 621@kindex M-s M-w
620@findex eww-search-word 622@findex eww-search-words
621@vindex eww-search-prefix 623@vindex eww-search-prefix
622 Search the Web for the text in region. This command performs an 624 To search the Web for the text in region, type @kbd{M-s M-w}. This
623Internet search for the words in region using the search engine whose 625command performs an Internet search for the words in region using the
624@acronym{URL} is specified by the variable @code{eww-search-prefix}. 626search engine whose @acronym{URL} is specified by the variable
625@xref{Basics, EWW, , eww, The Emacs Web Wowser Manual}. 627@code{eww-search-prefix} (@pxref{Basics, EWW, , eww, The Emacs Web
628Wowser Manual}). If the region is not active, or doesn't contain any
629words, this command prompts the user for a URL or keywords to search.
630
626 631
627@node Symbol Search 632@node Symbol Search
628@section Symbol Search 633@section Symbol Search
diff --git a/doc/emacs/xresources.texi b/doc/emacs/xresources.texi
index 7e27ddd1d9a..eaefcee21c3 100644
--- a/doc/emacs/xresources.texi
+++ b/doc/emacs/xresources.texi
@@ -250,6 +250,11 @@ specified if @samp{off}.
250Gamma correction for colors, equivalent to the frame parameter 250Gamma correction for colors, equivalent to the frame parameter
251@code{screen-gamma}. 251@code{screen-gamma}.
252 252
253@item @code{scrollBar} (class @code{ScrollBar})
254@cindex tool bar
255If the value of this resource is @samp{off} or @samp{false} or
256@samp{0}, Emacs disables Scroll Bar mode at startup (@pxref{Scroll Bars}).
257
253@item @code{scrollBarWidth} (class @code{ScrollBarWidth}) 258@item @code{scrollBarWidth} (class @code{ScrollBarWidth})
254@cindex scrollbar width 259@cindex scrollbar width
255The scroll bar width in pixels, equivalent to the frame parameter 260The scroll bar width in pixels, equivalent to the frame parameter
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 2ebe872c362..f5c73e55a4f 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -2045,6 +2045,23 @@ selected window. The value includes the line spacing of the line
2045(@pxref{Line Height}). 2045(@pxref{Line Height}).
2046@end defun 2046@end defun
2047 2047
2048When a buffer is displayed with line numbers (@pxref{Display Custom,,,
2049emacs, The GNU Emacs Manual}), it is sometimes useful to know the
2050width taken for displaying the line numbers. The following function
2051is for Lisp programs which need this information for layout
2052calculations.
2053
2054@defun line-number-display-width &optional pixelwise
2055This function returns the width used for displaying the line numbers
2056in the selected window. Optional argument @var{pixelwise}, if
2057non-@code{nil}, means return the value in pixels; otherwise the value
2058is returned in column units of the font defined for the
2059@code{line-number} face. If line numbers are not displayed in the
2060selected window, the value is zero. Use @code{with-selected-window}
2061(@pxref{Selecting Windows}) if you need this information about another
2062window.
2063@end defun
2064
2048 2065
2049@node Line Height 2066@node Line Height
2050@section Line Height 2067@section Line Height
@@ -5288,6 +5305,17 @@ and if @code{:height} is set it will have precedence over
5288wish. @code{:max-width} and @code{:max-height} will always preserve 5305wish. @code{:max-width} and @code{:max-height} will always preserve
5289the aspect ratio. 5306the aspect ratio.
5290 5307
5308If both @code{:width} and @code{:max-height} has been set (but
5309@code{:height} has not been set), then @code{:max-height} will have
5310precedence. The same is the case for the opposite combination: The
5311``max'' keyword has precedence. That is, if you have a 200x100 image
5312and specify that @code{:width} should be 400 and @code{:max-height}
5313should be 150, you'll end up with an image that is 300x150: Preserving
5314the aspect ratio and not exceeding the ``max'' setting. This
5315combination of parameters is a useful way of saying ``display this
5316image as large as possible, but no larger than the available display
5317area''.
5318
5291@item :scale @var{scale} 5319@item :scale @var{scale}
5292This should be a number, where values higher than 1 means to increase 5320This should be a number, where values higher than 1 means to increase
5293the size, and lower means to decrease the size. For instance, a value 5321the size, and lower means to decrease the size. For instance, a value
@@ -7428,6 +7456,35 @@ truncated or continued when the text reaches the right margin.
7428Right-to-left paragraphs are displayed beginning at the right margin, 7456Right-to-left paragraphs are displayed beginning at the right margin,
7429and are continued or truncated at the left margin. 7457and are continued or truncated at the left margin.
7430 7458
7459@cindex paragraph-start, and bidirectional display
7460@cindex paragraph-separate, and bidirectional display
7461 Where exactly paragraphs start and end, for the purpose of the Emacs
7462@acronym{UBA} implementation, is determined by the following two
7463buffer-local variables (note that that @code{paragraph-start} and
7464@code{paragraph-separate} have no influence on this). By default both
7465of these variables are @code{nil}, and paragraphs are bounded by empty
7466lines, i.e., lines that consist entirely of zero or more whitespace
7467characters followed by a newline.
7468
7469@defvar bidi-paragraph-start-re
7470If non-@code{nil}, this variable's value should be a regular
7471expression matching a line that starts or separates two paragraphs.
7472The regular expression is always matched after a newline, so it is
7473best to anchor it, i.e., begin it with a @code{"^"}.
7474@end defvar
7475
7476@defvar bidi-paragraph-separate-re
7477If non-@code{nil}, this variable's value should be a regular
7478expression matching a line separates two paragraphs. The regular
7479expression is always matched after a newline, so it is best to anchor
7480it, i.e., begin it with a @code{"^"}.
7481@end defvar
7482
7483 If you modify any of these two variables, you should normally modify
7484both, to make sure they describe paragraphs consistently. For
7485example, to have each new line start a new paragraph for
7486bidi-reordering purposes, set both variables to @code{"^"}.
7487
7431 By default, Emacs determines the base direction of each paragraph by 7488 By default, Emacs determines the base direction of each paragraph by
7432looking at the text at its beginning. The precise method of 7489looking at the text at its beginning. The precise method of
7433determining the base direction is specified by the @acronym{UBA}; in a 7490determining the base direction is specified by the @acronym{UBA}; in a
diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi
index 4bedea3bdd1..f30d9f95e2c 100644
--- a/doc/lispref/elisp.texi
+++ b/doc/lispref/elisp.texi
@@ -1196,6 +1196,7 @@ Text
1196* Decompression:: Dealing with compressed data. 1196* Decompression:: Dealing with compressed data.
1197* Base 64:: Conversion to or from base 64 encoding. 1197* Base 64:: Conversion to or from base 64 encoding.
1198* Checksum/Hash:: Computing cryptographic hashes. 1198* Checksum/Hash:: Computing cryptographic hashes.
1199* GnuTLS Cryptography:: Cryptographic algorithms imported from GnuTLS.
1199* Parsing HTML/XML:: Parsing HTML and XML. 1200* Parsing HTML/XML:: Parsing HTML and XML.
1200* Atomic Changes:: Installing several buffer changes atomically. 1201* Atomic Changes:: Installing several buffer changes atomically.
1201* Change Hooks:: Supplying functions to be run when text is changed. 1202* Change Hooks:: Supplying functions to be run when text is changed.
diff --git a/doc/lispref/lists.texi b/doc/lispref/lists.texi
index 8eab2818f97..0c993806824 100644
--- a/doc/lispref/lists.texi
+++ b/doc/lispref/lists.texi
@@ -1511,12 +1511,12 @@ respects. A property list behaves like an association list in which
1511each key can occur only once. @xref{Property Lists}, for a comparison 1511each key can occur only once. @xref{Property Lists}, for a comparison
1512of property lists and association lists. 1512of property lists and association lists.
1513 1513
1514@defun assoc key alist 1514@defun assoc key alist &optional testfn
1515This function returns the first association for @var{key} in 1515This function returns the first association for @var{key} in
1516@var{alist}, comparing @var{key} against the alist elements using 1516@var{alist}, comparing @var{key} against the alist elements using
1517@code{equal} (@pxref{Equality Predicates}). It returns @code{nil} if no 1517@var{testfn} if non-nil, or @code{equal} if nil (@pxref{Equality
1518association in @var{alist} has a @sc{car} @code{equal} to @var{key}. 1518Predicates}). It returns @code{nil} if no association in @var{alist}
1519For example: 1519has a @sc{car} equal to @var{key}. For example:
1520 1520
1521@smallexample 1521@smallexample
1522(setq trees '((pine . cones) (oak . acorns) (maple . seeds))) 1522(setq trees '((pine . cones) (oak . acorns) (maple . seeds)))
@@ -1561,11 +1561,11 @@ this as reverse @code{assoc}, finding the key for a given value.
1561@defun assq key alist 1561@defun assq key alist
1562This function is like @code{assoc} in that it returns the first 1562This function is like @code{assoc} in that it returns the first
1563association for @var{key} in @var{alist}, but it makes the comparison 1563association for @var{key} in @var{alist}, but it makes the comparison
1564using @code{eq} instead of @code{equal}. @code{assq} returns @code{nil} 1564using @code{eq}. @code{assq} returns @code{nil} if no association in
1565if no association in @var{alist} has a @sc{car} @code{eq} to @var{key}. 1565@var{alist} has a @sc{car} @code{eq} to @var{key}. This function is
1566This function is used more often than @code{assoc}, since @code{eq} is 1566used more often than @code{assoc}, since @code{eq} is faster than
1567faster than @code{equal} and most alists use symbols as keys. 1567@code{equal} and most alists use symbols as keys. @xref{Equality
1568@xref{Equality Predicates}. 1568Predicates}.
1569 1569
1570@smallexample 1570@smallexample
1571(setq trees '((pine . cones) (oak . acorns) (maple . seeds))) 1571(setq trees '((pine . cones) (oak . acorns) (maple . seeds)))
@@ -1589,16 +1589,20 @@ keys may not be symbols:
1589@end smallexample 1589@end smallexample
1590@end defun 1590@end defun
1591 1591
1592@defun alist-get key alist &optional default remove 1592@defun alist-get key alist &optional default remove testfn
1593This function is like @code{assq}, but instead of returning the entire 1593This function is similar to @code{assq}. It finds the first
1594association for @var{key} in @var{alist}, 1594association @w{@code{(@var{key} . @var{value})}} by comparing
1595@w{@code{(@var{key} . @var{value})}}, it returns just the @var{value}. 1595@var{key} with @var{alist} elements, and, if found, returns the
1596If @var{key} is not found in @var{alist}, it returns @var{default}. 1596@var{value} of that association. If no association is found, the
1597 1597function returns @var{default}. Comparison of @var{key} against
1598This is a generalized variable (@pxref{Generalized Variables}) that 1598@var{alist} elements uses the function specified by @var{testfn},
1599can be used to change a value with @code{setf}. When using it to set 1599defaulting to @code{eq}.
1600a value, optional argument @var{remove} non-@code{nil} means to remove 1600
1601@var{key} from @var{alist} if the new value is @code{eql} to @var{default}. 1601This is a generalized variable (@pxref{Generalized Variables})
1602that can be used to change a value with @code{setf}. When
1603using it to set a value, optional argument @var{remove} non-@code{nil}
1604means to remove @var{key}'s association from @var{alist} if the new
1605value is @code{eql} to @var{default}.
1602@end defun 1606@end defun
1603 1607
1604@defun rassq value alist 1608@defun rassq value alist
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index 9696c73c484..b825b1d790b 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -57,6 +57,7 @@ the character after point.
57* Decompression:: Dealing with compressed data. 57* Decompression:: Dealing with compressed data.
58* Base 64:: Conversion to or from base 64 encoding. 58* Base 64:: Conversion to or from base 64 encoding.
59* Checksum/Hash:: Computing cryptographic hashes. 59* Checksum/Hash:: Computing cryptographic hashes.
60* GnuTLS Cryptography:: Cryptographic algorithms imported from GnuTLS.
60* Parsing HTML/XML:: Parsing HTML and XML. 61* Parsing HTML/XML:: Parsing HTML and XML.
61* Atomic Changes:: Installing several buffer changes atomically. 62* Atomic Changes:: Installing several buffer changes atomically.
62* Change Hooks:: Supplying functions to be run when text is changed. 63* Change Hooks:: Supplying functions to be run when text is changed.
@@ -4235,6 +4236,7 @@ A marker represents a buffer position to jump to.
4235A string is text saved in the register. 4236A string is text saved in the register.
4236 4237
4237@item a rectangle 4238@item a rectangle
4239@cindex rectangle, as contents of a register
4238A rectangle is represented by a list of strings. 4240A rectangle is represented by a list of strings.
4239 4241
4240@item @code{(@var{window-configuration} @var{position})} 4242@item @code{(@var{window-configuration} @var{position})}
@@ -4436,6 +4438,11 @@ similar theoretical weakness also exists in SHA-1. Therefore, for
4436security-related applications you should use the other hash types, 4438security-related applications you should use the other hash types,
4437such as SHA-2. 4439such as SHA-2.
4438 4440
4441@defun secure-hash-algorithms
4442This function returns a list of symbols representing algorithms that
4443@code{secure-hash} can use.
4444@end defun
4445
4439@defun secure-hash algorithm object &optional start end binary 4446@defun secure-hash algorithm object &optional start end binary
4440This function returns a hash for @var{object}. The argument 4447This function returns a hash for @var{object}. The argument
4441@var{algorithm} is a symbol stating which hash to compute: one of 4448@var{algorithm} is a symbol stating which hash to compute: one of
@@ -4494,6 +4501,200 @@ It should be somewhat more efficient on larger buffers than
4494@c according to what we find useful. 4501@c according to what we find useful.
4495@end defun 4502@end defun
4496 4503
4504@node GnuTLS Cryptography
4505@section GnuTLS Cryptography
4506@cindex MD5 checksum
4507@cindex SHA hash
4508@cindex hash, cryptographic
4509@cindex cryptographic hash
4510@cindex AEAD cipher
4511@cindex cipher, AEAD
4512@cindex symmetric cipher
4513@cindex cipher, symmetric
4514
4515If compiled with GnuTLS, Emacs offers built-in cryptographic support.
4516Following the GnuTLS API terminology, the available tools are digests,
4517MACs, symmetric ciphers, and AEAD ciphers.
4518
4519The terms used herein, such as IV (Initialization Vector), require
4520some familiarity with cryptography and will not be defined in detail.
4521Please consult @uref{https://www.gnutls.org/} for specific
4522documentation which may help you understand the terminology and
4523structure of the GnuTLS library.
4524
4525@menu
4526* Format of GnuTLS Cryptography Inputs::
4527* GnuTLS Cryptographic Functions::
4528@end menu
4529
4530@node Format of GnuTLS Cryptography Inputs
4531@subsection Format of GnuTLS Cryptography Inputs
4532@cindex format of gnutls cryptography inputs
4533@cindex gnutls cryptography inputs format
4534
4535The inputs to GnuTLS cryptographic functions can be specified in
4536several ways, both as primitive Emacs Lisp types or as lists.
4537
4538The list form is currently similar to how @code{md5} and
4539@code{secure-hash} operate.
4540
4541@table @code
4542@item @var{buffer}
4543Simply passing a buffer as input means the whole buffer should be used.
4544
4545@item @var{string}
4546A string as input will be used directly. It may be modified by the
4547function (unlike most other Emacs Lisp functions) to reduce the chance
4548of exposing sensitive data after the function does its work.
4549
4550@item (@var{buffer-or-string} @var{start} @var{end} @var{coding-system} @var{noerror})
4551This specifies a buffer or a string as described above, but an
4552optional range can be specified with @var{start} and @var{end}.
4553
4554In addition an optional @var{coding-system} can be specified if needed.
4555
4556The last optional item, @var{noerror}, overrides the normal error when
4557the text can't be encoded using the specified or chosen coding system.
4558When @var{noerror} is non-@code{nil}, this function silently uses
4559@code{raw-text} coding instead.
4560
4561@item (@code{iv-auto} @var{length})
4562This will generate an IV (Initialization Vector) of the specified
4563length using the GnuTLS @code{GNUTLS_RND_NONCE} generator and pass it
4564to the function. This ensures that the IV is unpredictable and
4565unlikely to be reused in the same session. The actual value of the IV
4566is returned by the function as described below.
4567
4568@end table
4569
4570@node GnuTLS Cryptographic Functions
4571@subsection GnuTLS Cryptographic Functions
4572@cindex gnutls cryptographic functions
4573
4574@defun gnutls-digests
4575This function returns the alist of the GnuTLS digest algorithms.
4576
4577Each entry has a key which represents the algorithm, followed by a
4578plist with internal details about the algorithm. The plist will have
4579@code{:type gnutls-digest-algorithm} and also will have the key
4580@code{:digest-algorithm-length 64} to indicate the size, in bytes, of
4581the resulting digest.
4582
4583There is a name parallel between GnuTLS MAC and digest algorithms but
4584they are separate things internally and should not be mixed.
4585@end defun
4586
4587@defun gnutls-hash-digest digest-method input
4588The @var{digest-method} can be the whole plist from
4589@code{gnutls-digests}, or just the symbol key, or a string with the
4590name of that symbol.
4591
4592The @var{input} can be specified as a buffer or string or in other
4593ways (@pxref{Format of GnuTLS Cryptography Inputs}).
4594
4595This function returns @code{nil} on error, and signals a Lisp error if
4596the @var{digest-method} or @var{input} are invalid. On success, it
4597returns a list of a binary string (the output) and the IV used.
4598@end defun
4599
4600@defun gnutls-macs
4601This function returns the alist of the GnuTLS MAC algorithms.
4602
4603Each entry has a key which represents the algorithm, followed by a
4604plist with internal details about the algorithm. The plist will have
4605@code{:type gnutls-mac-algorithm} and also will have the keys
4606@code{:mac-algorithm-length} @code{:mac-algorithm-keysize}
4607@code{:mac-algorithm-noncesize} to indicate the size, in bytes, of the
4608resulting hash, the key, and the nonce respectively.
4609
4610The nonce is currently unused and only some MACs support it.
4611
4612There is a name parallel between GnuTLS MAC and digest algorithms but
4613they are separate things internally and should not be mixed.
4614@end defun
4615
4616@defun gnutls-hash-mac hash-method key input
4617The @var{hash-method} can be the whole plist from
4618@code{gnutls-macs}, or just the symbol key, or a string with the
4619name of that symbol.
4620
4621The @var{key} can be specified as a buffer or string or in other ways
4622(@pxref{Format of GnuTLS Cryptography Inputs}). The @var{key} will be
4623wiped after use if it's a string.
4624
4625The @var{input} can be specified as a buffer or string or in other
4626ways (@pxref{Format of GnuTLS Cryptography Inputs}).
4627
4628This function returns @code{nil} on error, and signals a Lisp error if
4629the @var{hash-method} or @var{key} or @var{input} are invalid.
4630
4631On success, it returns a list of a binary string (the output) and the
4632IV used.
4633@end defun
4634
4635@defun gnutls-ciphers
4636This function returns the alist of the GnuTLS ciphers.
4637
4638Each entry has a key which represents the cipher, followed by a plist
4639with internal details about the algorithm. The plist will have
4640@code{:type gnutls-symmetric-cipher} and also will have the keys
4641@code{:cipher-aead-capable} set to @code{nil} or @code{t} to indicate
4642AEAD capability; and @code{:cipher-tagsize} @code{:cipher-blocksize}
4643@code{:cipher-keysize} @code{:cipher-ivsize} to indicate the size, in
4644bytes, of the tag, block size of the resulting data, the key, and the
4645IV respectively.
4646@end defun
4647
4648@defun gnutls-symmetric-encrypt cipher key iv input &optional aead_auth
4649The @var{cipher} can be the whole plist from
4650@code{gnutls-ciphers}, or just the symbol key, or a string with the
4651name of that symbol.
4652
4653The @var{key} can be specified as a buffer or string or in other ways
4654(@pxref{Format of GnuTLS Cryptography Inputs}). The @var{key} will be
4655wiped after use if it's a string.
4656
4657The @var{iv} and @var{input} and the optional @var{aead_auth} can be
4658specified as a buffer or string or in other ways (@pxref{Format of
4659GnuTLS Cryptography Inputs}).
4660
4661@var{aead_auth} is only checked with AEAD ciphers, that is, ciphers whose
4662plist has @code{:cipher-aead-capable t}. Otherwise it's ignored.
4663
4664This function returns @code{nil} on error, and signals a Lisp error if
4665the @var{cipher} or @var{key}, @var{iv}, or @var{input} are invalid,
4666or if @var{aead_auth} was specified with an AEAD cipher and was
4667invalid.
4668
4669On success, it returns a list of a binary string (the output) and the
4670IV used.
4671@end defun
4672
4673@defun gnutls-symmetric-decrypt cipher key iv input &optional aead_auth
4674The @var{cipher} can be the whole plist from
4675@code{gnutls-ciphers}, or just the symbol key, or a string with the
4676name of that symbol.
4677
4678The @var{key} can be specified as a buffer or string or in other ways
4679(@pxref{Format of GnuTLS Cryptography Inputs}). The @var{key} will be
4680wiped after use if it's a string.
4681
4682The @var{iv} and @var{input} and the optional @var{aead_auth} can be
4683specified as a buffer or string or in other ways (@pxref{Format of
4684GnuTLS Cryptography Inputs}).
4685
4686@var{aead_auth} is only checked with AEAD ciphers, that is, ciphers whose
4687plist has @code{:cipher-aead-capable t}. Otherwise it's ignored.
4688
4689This function returns @code{nil} on decryption error, and signals a
4690Lisp error if the @var{cipher} or @var{key}, @var{iv}, or @var{input}
4691are invalid, or if @var{aead_auth} was specified with an AEAD cipher
4692and was invalid.
4693
4694On success, it returns a list of a binary string (the output) and the
4695IV used.
4696@end defun
4697
4497@node Parsing HTML/XML 4698@node Parsing HTML/XML
4498@section Parsing HTML and XML 4699@section Parsing HTML and XML
4499@cindex parsing html 4700@cindex parsing html
diff --git a/doc/misc/ses.texi b/doc/misc/ses.texi
index cac874d0f02..fc79b027a1d 100644
--- a/doc/misc/ses.texi
+++ b/doc/misc/ses.texi
@@ -292,7 +292,13 @@ Self-insert an expression. The right-parenthesis is inserted for you
292(@code{ses-read-cell}). To access another cell's value, just use its 292(@code{ses-read-cell}). To access another cell's value, just use its
293identifier in your expression. Whenever the other cell is changed, 293identifier in your expression. Whenever the other cell is changed,
294this cell's formula will be reevaluated. While typing in the 294this cell's formula will be reevaluated. While typing in the
295expression, you can use @kbd{M-@key{TAB}} to complete symbol names. 295expression, you can use the following keys:
296@table @kbd
297@item M-@key{TAB}
298to complete symbol names, and
299@item C-h C-n
300to list the named cells symbols in a help buffer.
301@end table
296 302
297@item ' @r{(apostrophe)} 303@item ' @r{(apostrophe)}
298Enter a symbol (ses-read-symbol). @acronym{SES} remembers all symbols that have 304Enter a symbol (ses-read-symbol). @acronym{SES} remembers all symbols that have
@@ -458,11 +464,22 @@ Enter the default printer for the spreadsheet
458(@code{ses-read-default-printer}). 464(@code{ses-read-default-printer}).
459@end table 465@end table
460 466
461The @code{ses-read-@var{xxx}-printer} commands have their own 467The @code{ses-read-@var{xxx}-printer} allows the following commands during editing:
462minibuffer history, which is preloaded with the set of all printers 468
463used in this spreadsheet, plus the standard printers (@pxref{Standard 469@table @kbd
464printer functions}) and the local printers (@pxref{Local printer 470@item @key{arrow-up}
465functions}). 471@itemx @key{arrow-down}
472To browse history: the @code{ses-read-@var{xxx}-printer} commands have
473their own minibuffer history, which is preloaded with the set of all
474printers used in this spreadsheet, plus the standard printers
475(@pxref{Standard printer functions}) and the local printers
476(@pxref{Local printer functions}).
477@item @key{TAB}
478To complete the local printer symbols, and
479@item C-h C-p
480To list the local printers in a help buffer.
481@end table
482
466 483
467@node Standard printer functions 484@node Standard printer functions
468@subsection Standard printer functions 485@subsection Standard printer functions
diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex
index b40a6e2a2be..3844333faec 100644
--- a/doc/misc/texinfo.tex
+++ b/doc/misc/texinfo.tex
@@ -3,7 +3,7 @@
3% Load plain if necessary, i.e., if running under initex. 3% Load plain if necessary, i.e., if running under initex.
4\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi 4\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
5% 5%
6\def\texinfoversion{2017-06-04.19} 6\def\texinfoversion{2017-07-04.16}
7% 7%
8% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, 8% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
9% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 9% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -11009,7 +11009,6 @@ directory should work if nowhere else does.}
11009 \DeclareUnicodeCharacter{2113}{\ensuremath\ell}% 11009 \DeclareUnicodeCharacter{2113}{\ensuremath\ell}%
11010 \DeclareUnicodeCharacter{2118}{\ensuremath\wp}% 11010 \DeclareUnicodeCharacter{2118}{\ensuremath\wp}%
11011 \DeclareUnicodeCharacter{211C}{\ensuremath\Re}% 11011 \DeclareUnicodeCharacter{211C}{\ensuremath\Re}%
11012 \DeclareUnicodeCharacter{2127}{\ensuremath\mho}%
11013 \DeclareUnicodeCharacter{2135}{\ensuremath\aleph}% 11012 \DeclareUnicodeCharacter{2135}{\ensuremath\aleph}%
11014 \DeclareUnicodeCharacter{2190}{\ensuremath\leftarrow}% 11013 \DeclareUnicodeCharacter{2190}{\ensuremath\leftarrow}%
11015 \DeclareUnicodeCharacter{2191}{\ensuremath\uparrow}% 11014 \DeclareUnicodeCharacter{2191}{\ensuremath\uparrow}%
@@ -11025,7 +11024,6 @@ directory should work if nowhere else does.}
11025 \DeclareUnicodeCharacter{21AA}{\ensuremath\hookrightarrow}% 11024 \DeclareUnicodeCharacter{21AA}{\ensuremath\hookrightarrow}%
11026 \DeclareUnicodeCharacter{21BC}{\ensuremath\leftharpoonup}% 11025 \DeclareUnicodeCharacter{21BC}{\ensuremath\leftharpoonup}%
11027 \DeclareUnicodeCharacter{21BD}{\ensuremath\leftharpoondown}% 11026 \DeclareUnicodeCharacter{21BD}{\ensuremath\leftharpoondown}%
11028 \DeclareUnicodeCharacter{21BE}{\ensuremath\upharpoonright}%
11029 \DeclareUnicodeCharacter{21C0}{\ensuremath\rightharpoonup}% 11027 \DeclareUnicodeCharacter{21C0}{\ensuremath\rightharpoonup}%
11030 \DeclareUnicodeCharacter{21C1}{\ensuremath\rightharpoondown}% 11028 \DeclareUnicodeCharacter{21C1}{\ensuremath\rightharpoondown}%
11031 \DeclareUnicodeCharacter{21CC}{\ensuremath\rightleftharpoons}% 11029 \DeclareUnicodeCharacter{21CC}{\ensuremath\rightleftharpoons}%
@@ -11034,8 +11032,6 @@ directory should work if nowhere else does.}
11034 \DeclareUnicodeCharacter{21D3}{\ensuremath\Downarrow}% 11032 \DeclareUnicodeCharacter{21D3}{\ensuremath\Downarrow}%
11035 \DeclareUnicodeCharacter{21D4}{\ensuremath\Leftrightarrow}% 11033 \DeclareUnicodeCharacter{21D4}{\ensuremath\Leftrightarrow}%
11036 \DeclareUnicodeCharacter{21D5}{\ensuremath\Updownarrow}% 11034 \DeclareUnicodeCharacter{21D5}{\ensuremath\Updownarrow}%
11037 \DeclareUnicodeCharacter{21DD}{\ensuremath\leadsto}%
11038 \DeclareUnicodeCharacter{2201}{\ensuremath\complement}%
11039 \DeclareUnicodeCharacter{2202}{\ensuremath\partial}% 11035 \DeclareUnicodeCharacter{2202}{\ensuremath\partial}%
11040 \DeclareUnicodeCharacter{2205}{\ensuremath\emptyset}% 11036 \DeclareUnicodeCharacter{2205}{\ensuremath\emptyset}%
11041 \DeclareUnicodeCharacter{2207}{\ensuremath\nabla}% 11037 \DeclareUnicodeCharacter{2207}{\ensuremath\nabla}%
@@ -11069,8 +11065,6 @@ directory should work if nowhere else does.}
11069 \DeclareUnicodeCharacter{2283}{\ensuremath\supset}% 11065 \DeclareUnicodeCharacter{2283}{\ensuremath\supset}%
11070 \DeclareUnicodeCharacter{2286}{\ensuremath\subseteq}% 11066 \DeclareUnicodeCharacter{2286}{\ensuremath\subseteq}%
11071 \DeclareUnicodeCharacter{228E}{\ensuremath\uplus}% 11067 \DeclareUnicodeCharacter{228E}{\ensuremath\uplus}%
11072 \DeclareUnicodeCharacter{228F}{\ensuremath\sqsubset}%
11073 \DeclareUnicodeCharacter{2290}{\ensuremath\sqsupset}%
11074 \DeclareUnicodeCharacter{2291}{\ensuremath\sqsubseteq}% 11068 \DeclareUnicodeCharacter{2291}{\ensuremath\sqsubseteq}%
11075 \DeclareUnicodeCharacter{2292}{\ensuremath\sqsupseteq}% 11069 \DeclareUnicodeCharacter{2292}{\ensuremath\sqsupseteq}%
11076 \DeclareUnicodeCharacter{2293}{\ensuremath\sqcap}% 11070 \DeclareUnicodeCharacter{2293}{\ensuremath\sqcap}%
@@ -11085,8 +11079,6 @@ directory should work if nowhere else does.}
11085 \DeclareUnicodeCharacter{22A4}{\ensuremath\ptextop}% 11079 \DeclareUnicodeCharacter{22A4}{\ensuremath\ptextop}%
11086 \DeclareUnicodeCharacter{22A5}{\ensuremath\bot}% 11080 \DeclareUnicodeCharacter{22A5}{\ensuremath\bot}%
11087 \DeclareUnicodeCharacter{22A8}{\ensuremath\models}% 11081 \DeclareUnicodeCharacter{22A8}{\ensuremath\models}%
11088 \DeclareUnicodeCharacter{22B4}{\ensuremath\unlhd}%
11089 \DeclareUnicodeCharacter{22B5}{\ensuremath\unrhd}%
11090 \DeclareUnicodeCharacter{22C0}{\ensuremath\bigwedge}% 11082 \DeclareUnicodeCharacter{22C0}{\ensuremath\bigwedge}%
11091 \DeclareUnicodeCharacter{22C1}{\ensuremath\bigvee}% 11083 \DeclareUnicodeCharacter{22C1}{\ensuremath\bigvee}%
11092 \DeclareUnicodeCharacter{22C2}{\ensuremath\bigcap}% 11084 \DeclareUnicodeCharacter{22C2}{\ensuremath\bigcap}%
@@ -11102,12 +11094,11 @@ directory should work if nowhere else does.}
11102 \DeclareUnicodeCharacter{2322}{\ensuremath\frown}% 11094 \DeclareUnicodeCharacter{2322}{\ensuremath\frown}%
11103 \DeclareUnicodeCharacter{2323}{\ensuremath\smile}% 11095 \DeclareUnicodeCharacter{2323}{\ensuremath\smile}%
11104 % 11096 %
11105 \DeclareUnicodeCharacter{25A1}{\ensuremath\Box}%
11106 \DeclareUnicodeCharacter{25B3}{\ensuremath\triangle}% 11097 \DeclareUnicodeCharacter{25B3}{\ensuremath\triangle}%
11107 \DeclareUnicodeCharacter{25B7}{\ensuremath\triangleright}% 11098 \DeclareUnicodeCharacter{25B7}{\ensuremath\triangleright}%
11108 \DeclareUnicodeCharacter{25BD}{\ensuremath\bigtriangledown}% 11099 \DeclareUnicodeCharacter{25BD}{\ensuremath\bigtriangledown}%
11109 \DeclareUnicodeCharacter{25C1}{\ensuremath\triangleleft}% 11100 \DeclareUnicodeCharacter{25C1}{\ensuremath\triangleleft}%
11110 \DeclareUnicodeCharacter{25C7}{\ensuremath\Diamond}% 11101 \DeclareUnicodeCharacter{25C7}{\ensuremath\diamond}%
11111 \DeclareUnicodeCharacter{2660}{\ensuremath\spadesuit}% 11102 \DeclareUnicodeCharacter{2660}{\ensuremath\spadesuit}%
11112 \DeclareUnicodeCharacter{2661}{\ensuremath\heartsuit}% 11103 \DeclareUnicodeCharacter{2661}{\ensuremath\heartsuit}%
11113 \DeclareUnicodeCharacter{2662}{\ensuremath\diamondsuit}% 11104 \DeclareUnicodeCharacter{2662}{\ensuremath\diamondsuit}%
@@ -11129,7 +11120,6 @@ directory should work if nowhere else does.}
11129 \DeclareUnicodeCharacter{2A02}{\ensuremath\bigotimes}% 11120 \DeclareUnicodeCharacter{2A02}{\ensuremath\bigotimes}%
11130 \DeclareUnicodeCharacter{2A04}{\ensuremath\biguplus}% 11121 \DeclareUnicodeCharacter{2A04}{\ensuremath\biguplus}%
11131 \DeclareUnicodeCharacter{2A06}{\ensuremath\bigsqcup}% 11122 \DeclareUnicodeCharacter{2A06}{\ensuremath\bigsqcup}%
11132 \DeclareUnicodeCharacter{2A1D}{\ensuremath\Join}%
11133 \DeclareUnicodeCharacter{2A3F}{\ensuremath\amalg}% 11123 \DeclareUnicodeCharacter{2A3F}{\ensuremath\amalg}%
11134 \DeclareUnicodeCharacter{2AAF}{\ensuremath\preceq}% 11124 \DeclareUnicodeCharacter{2AAF}{\ensuremath\preceq}%
11135 \DeclareUnicodeCharacter{2AB0}{\ensuremath\succeq}% 11125 \DeclareUnicodeCharacter{2AB0}{\ensuremath\succeq}%
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index 6209e02ebc5..1b751a01db6 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -43,7 +43,7 @@ copy and modify this GNU manual.''
43@c Entries for @command{install-info} to use 43@c Entries for @command{install-info} to use
44@dircategory Emacs network features 44@dircategory Emacs network features
45@direntry 45@direntry
46* TRAMP: (tramp). Transparent Remote Access, Multiple Protocol 46* @value{tramp}: (tramp). Transparent Remote Access, Multiple Protocol
47 Emacs remote file access via ssh and scp. 47 Emacs remote file access via ssh and scp.
48@end direntry 48@end direntry
49 49
@@ -77,8 +77,8 @@ You can find the latest version of this document on the web at
77@ifhtml 77@ifhtml
78The latest release of @value{tramp} is available for 78The latest release of @value{tramp} is available for
79@uref{https://ftp.gnu.org/gnu/tramp/, download}, or you may see 79@uref{https://ftp.gnu.org/gnu/tramp/, download}, or you may see
80@ref{Obtaining Tramp} for more details, including the Git server 80@ref{Obtaining @value{tramp}} for more details, including the Git
81details. 81server details.
82 82
83@value{tramp} also has a @uref{https://savannah.gnu.org/projects/tramp/, 83@value{tramp} also has a @uref{https://savannah.gnu.org/projects/tramp/,
84Savannah Project Page}. 84Savannah Project Page}.
@@ -97,11 +97,12 @@ There is a mailing list for @value{tramp}, available at
97 97
98For the end user: 98For the end user:
99 99
100* Obtaining Tramp:: How to obtain @value{tramp}. 100* Obtaining @value{tramp}:: How to obtain @value{tramp}.
101* History:: History of @value{tramp}. 101* History:: History of @value{tramp}.
102@ifset installchapter 102@ifset installchapter
103* Installation:: Installing @value{tramp} with your Emacs. 103* Installation:: Installing @value{tramp} with your Emacs.
104@end ifset 104@end ifset
105* Quick Start Guide:: Short introduction how to use @value{tramp}.
105* Configuration:: Configuring @value{tramp} for use. 106* Configuration:: Configuring @value{tramp} for use.
106* Usage:: An overview of the operation of @value{tramp}. 107* Usage:: An overview of the operation of @value{tramp}.
107* Bug Reports:: Reporting Bugs and Problems. 108* Bug Reports:: Reporting Bugs and Problems.
@@ -192,7 +193,7 @@ and related programs. If these programs can successfully pass
192more secure alternative to @command{ftp} and other older access 193more secure alternative to @command{ftp} and other older access
193methods. 194methods.
194 195
195@value{tramp} on Windows operating systems is integrated with the 196@value{tramp} on MS Windows operating systems is integrated with the
196PuTTY package, and uses the @command{plink} program. 197PuTTY package, and uses the @command{plink} program.
197 198
198@value{tramp} mostly operates transparently in the background using 199@value{tramp} mostly operates transparently in the background using
@@ -207,7 +208,7 @@ benefit of direct integration of @value{tramp} in Emacs.
207 208
208@value{tramp} can transfer files using any number of available host 209@value{tramp} can transfer files using any number of available host
209programs for remote files, such as @command{rcp}, @command{scp}, 210programs for remote files, such as @command{rcp}, @command{scp},
210@command{rsync} or (under Windows) @command{pscp}. @value{tramp} 211@command{rsync} or (under MS Windows) @command{pscp}. @value{tramp}
211provides easy ways to specify these programs and customize them to 212provides easy ways to specify these programs and customize them to
212specific files, hosts, or access methods. 213specific files, hosts, or access methods.
213 214
@@ -314,9 +315,9 @@ behind the scenes when you open a file with @value{tramp}.
314 315
315 316
316@c For the end user 317@c For the end user
317@node Obtaining Tramp 318@node Obtaining @value{tramp}
318@chapter Obtaining @value{tramp} 319@chapter Obtaining @value{tramp}
319@cindex obtaining Tramp 320@cindex obtaining @value{tramp}
320 321
321@value{tramp} is included as part of Emacs (since Emacs version 22.1). 322@value{tramp} is included as part of Emacs (since Emacs version 22.1).
322 323
@@ -354,7 +355,7 @@ From behind a firewall:
354@end example 355@end example
355 356
356@noindent 357@noindent
357Tramp developers: 358@value{tramp} developers:
358 359
359@example 360@example
360] @strong{git clone login@@git.sv.gnu.org:/srv/git/tramp.git} 361] @strong{git clone login@@git.sv.gnu.org:/srv/git/tramp.git}
@@ -403,7 +404,7 @@ July 2002, @value{tramp} unified file names with Ange FTP@. In July
4032004, proxy hosts replaced multi-hop methods. Running commands on 4042004, proxy hosts replaced multi-hop methods. Running commands on
404remote hosts was introduced in December 2005. Support for gateways 405remote hosts was introduced in December 2005. Support for gateways
405since April 2007 (and removed in December 2016). GVFS integration 406since April 2007 (and removed in December 2016). GVFS integration
406started in February 2009. Remote commands on Windows hosts since 407started in February 2009. Remote commands on MS Windows hosts since
407September 2011. Ad-hoc multi-hop methods (with a changed syntax) 408September 2011. Ad-hoc multi-hop methods (with a changed syntax)
408re-enabled in November 2011. In November 2012, added Juergen 409re-enabled in November 2011. In November 2012, added Juergen
409Hoetzel's @file{tramp-adb.el}. 410Hoetzel's @file{tramp-adb.el}.
@@ -418,6 +419,147 @@ XEmacs support was stopped in January 2016. Since March 2017,
418@end ifset 419@end ifset
419 420
420 421
422@node Quick Start Guide
423@chapter Short introduction how to use @value{tramp}
424@cindex quick start guide
425
426@value{tramp} extends the Emacs file name syntax by a remote
427component. A remote file name looks always like
428@file{@trampfn{method,user@@host,/path/to/file}}.
429
430You can use remote files exactly like ordinary files, that means you
431could open a file or directory by @kbd{C-x C-f
432@trampfn{method,user@@host,/path/to/file} @key{RET}}, edit the file,
433and save it. You can also mix local files and remote files in file
434operations with two arguments, like @code{copy-file} or
435@code{rename-file}. And finally, you can run even processes on a
436remote host, when the buffer you call the process from has a remote
437@code{default-directory}.
438
439
440@anchor{Quick Start Guide: File name syntax}
441@section File name syntax
442@cindex file name syntax
443
444Remote file names are prepended by the @code{method}, @code{user} and
445@code{host} parts. All of them, and also the local file name part,
446are optional, in case of a missing part a default value is assumed.
447The default value for an empty local file name part is the remote
448user's home directory. The shortest remote file name is
449@file{@trampfn{-,,}}, therefore. The @samp{-} notation for the
450default host is used for syntactical reasons, @ref{Default Host}.
451
452The @code{method} part describes the connection method used to reach
453the remote host, see below.
454
455The @code{user} part is the user name for accessing the remote host.
456For the @option{smb} method, this could also require a domain name, in
457this case it is written as @code{user%domain}.
458
459The @code{host} part must be a host name which could be resolved on
460your local host. It could be a short host name, a fully qualified
461domain name, an IPv4 or IPv6 address, @ref{File name syntax}. Some
462connection methods support also a notation of the port to be used, in
463this case it is written as @code{host#port}.
464
465
466@anchor{Quick Start Guide: @option{ssh} and @option{plink} methods}
467@section Using @option{ssh} and @option{plink}
468@cindex method ssh
469@cindex ssh method
470@cindex method plink
471@cindex plink method
472
473If your local host runs an SSH client, and the remote host runs an SSH
474server, the most simple remote file name is
475@file{@trampfn{ssh,user@@host,/path/to/file}}. The remote file name
476@file{@trampfn{ssh,,}} opens a remote connection to yourself on the
477local host, and is taken often for testing @value{tramp}.
478
479On MS Windows, PuTTY is often used as SSH client. Its @command{plink}
480method can be used there to open a connection to a remote host running
481an @command{ssh} server:
482@file{@trampfn{plink,user@@host,/path/to/file}}.
483
484
485@anchor{Quick Start Guide: @option{su}, @option{sudo} and @option{sg} methods}
486@section Using @option{su}, @option{sudo} and @option{sg}
487@cindex method su
488@cindex su method
489@cindex method sudo
490@cindex sudo method
491@cindex method sg
492@cindex sg method
493
494Sometimes, it is necessary to work on your local host under different
495permissions. For this, you could use the @option{su} or @option{sudo}
496connection method. Both methods use @samp{root} as default user name
497and the return value of @code{(system-name)} as default host name.
498Therefore, it is convenient to open a file as
499@file{@trampfn{sudo,,/path/to/file}}.
500
501The method @option{sg} stands for ``switch group''; the changed group
502must be used here as user name. The default host name is the same.
503
504
505@anchor{Quick Start Guide: @option{smb} method}
506@section Using @command{smbclient}
507@cindex method smb
508@cindex smb method
509@cindex ms windows (with smb method)
510@cindex smbclient
511
512In order to access a remote MS Windows host or Samba server, the
513@command{smbclient} client is used. The remote file name syntax is
514@file{@trampfn{smb,user%domain@@host,/path/to/file}}. The first part
515of the local file name is the share exported by the remote host,
516@samp{path} in this example.
517
518
519@anchor{Quick Start Guide: GVFS-based methods}
520@section Using GVFS-based methods
521@cindex methods, gvfs
522@cindex gvfs based methods
523@cindex method sftp
524@cindex sftp method
525@cindex method afp
526@cindex afp method
527@cindex method dav
528@cindex method davs
529@cindex dav method
530@cindex davs method
531
532On systems, which have installed the virtual file system for the Gnome
533Desktop (GVFS), its offered methods could be used by @value{tramp}.
534Examples are @file{@trampfn{sftp,user@@host,/path/to/file}},
535@file{@trampfn{afp,user@@host,/path/to/file}} (accessing Apple's AFP
536file system), @file{@trampfn{dav,user@@host,/path/to/file}} and
537@file{@trampfn{davs,user@@host,/path/to/file}} (for WebDAV shares).
538
539
540@anchor{Quick Start Guide: Google Drive}
541@section Using Google Drive
542@cindex method gdrive
543@cindex gdrive method
544@cindex google drive
545
546Another GVFS-based method allows to access a Google Drive file system.
547The file name syntax is here always
548@file{@trampfn{gdrive,john.doe@@gmail.com,/path/to/file}}.
549@samp{john.doe@@gmail.com} stands here for your Google Drive account.
550
551
552@anchor{Quick Start Guide: Android}
553@section Using Android
554@cindex method adb
555@cindex adb method
556@cindex android
557
558An Android device, which is connected via USB to your local host, can
559be accessed via the @command{adb} command. No user or host name is
560needed. The file name syntax is @file{@trampfn{adb,,/path/to/file}}.
561
562
421@node Configuration 563@node Configuration
422@chapter Configuring @value{tramp} 564@chapter Configuring @value{tramp}
423@cindex configuration 565@cindex configuration
@@ -610,16 +752,16 @@ continue connecting?''. @value{tramp} cannot handle such questions.
610Connections will have to be setup where logins can proceed without 752Connections will have to be setup where logins can proceed without
611such questions. 753such questions.
612 754
613@option{sshx} is useful for Windows users when @command{ssh} triggers 755@option{sshx} is useful for MS Windows users when @command{ssh}
614an error about allocating a pseudo tty. This happens due to missing 756triggers an error about allocating a pseudo tty. This happens due to
615shell prompts that confuses @value{tramp}. 757missing shell prompts that confuses @value{tramp}.
616 758
617@option{sshx} supports the @samp{-p} argument. 759@option{sshx} supports the @samp{-p} argument.
618 760
619@item @option{krlogin} 761@item @option{krlogin}
620@cindex method krlogin 762@cindex method krlogin
621@cindex krlogin method 763@cindex krlogin method
622@cindex Kerberos (with krlogin method) 764@cindex kerberos (with krlogin method)
623 765
624This method is also similar to @option{ssh}. It uses the 766This method is also similar to @option{ssh}. It uses the
625@command{krlogin -x} command only for remote host login. 767@command{krlogin -x} command only for remote host login.
@@ -627,7 +769,7 @@ This method is also similar to @option{ssh}. It uses the
627@item @option{ksu} 769@item @option{ksu}
628@cindex method ksu 770@cindex method ksu
629@cindex ksu method 771@cindex ksu method
630@cindex Kerberos (with ksu method) 772@cindex kerberos (with ksu method)
631 773
632This is another method from the Kerberos suite. It behaves like @option{su}. 774This is another method from the Kerberos suite. It behaves like @option{su}.
633 775
@@ -635,7 +777,7 @@ This is another method from the Kerberos suite. It behaves like @option{su}.
635@cindex method plink 777@cindex method plink
636@cindex plink method 778@cindex plink method
637 779
638@option{plink} method is for Windows users with the PuTTY 780@option{plink} method is for MS Windows users with the PuTTY
639implementation of SSH@. It uses @samp{plink -ssh} to log in to the 781implementation of SSH@. It uses @samp{plink -ssh} to log in to the
640remote host. 782remote host.
641 783
@@ -648,9 +790,9 @@ session.
648@cindex method plinkx 790@cindex method plinkx
649@cindex plinkx method 791@cindex plinkx method
650 792
651Another method using PuTTY on Windows with session names instead of 793Another method using PuTTY on MS Windows with session names instead of
652host names. @option{plinkx} calls @samp{plink -load @var{session} -t}. 794host names. @option{plinkx} calls @samp{plink -load @var{session}
653User names and port numbers must be defined in the session. 795-t}. User names and port numbers must be defined in the session.
654 796
655Check the @samp{Share SSH connections if possible} control for that 797Check the @samp{Share SSH connections if possible} control for that
656session. 798session.
@@ -730,9 +872,9 @@ This method supports the @samp{-p} argument.
730in performance to @option{scp}. @option{scpx} uses @samp{ssh -t -t 872in performance to @option{scp}. @option{scpx} uses @samp{ssh -t -t
731@var{host} -l @var{user} /bin/sh} to open a connection. 873@var{host} -l @var{user} /bin/sh} to open a connection.
732 874
733@option{scpx} is useful for Windows users when @command{ssh} triggers 875@option{scpx} is useful for MS Windows users when @command{ssh}
734an error about allocating a pseudo tty. This happens due to missing 876triggers an error about allocating a pseudo tty. This happens due to
735shell prompts that confuses @value{tramp}. 877missing shell prompts that confuses @value{tramp}.
736 878
737This method supports the @samp{-p} argument. 879This method supports the @samp{-p} argument.
738 880
@@ -742,17 +884,17 @@ This method supports the @samp{-p} argument.
742@cindex pscp method 884@cindex pscp method
743@cindex pscp (with pscp method) 885@cindex pscp (with pscp method)
744@cindex plink (with pscp method) 886@cindex plink (with pscp method)
745@cindex PuTTY (with pscp method) 887@cindex putty (with pscp method)
746@cindex method psftp 888@cindex method psftp
747@cindex psftp method 889@cindex psftp method
748@cindex pscp (with psftp method) 890@cindex pscp (with psftp method)
749@cindex plink (with psftp method) 891@cindex plink (with psftp method)
750@cindex PuTTY (with psftp method) 892@cindex putty (with psftp method)
751 893
752These methods are similar to @option{scp} or @option{sftp}, but they 894These methods are similar to @option{scp} or @option{sftp}, but they
753use the @command{plink} command to connect to the remote host, and 895use the @command{plink} command to connect to the remote host, and
754they use @command{pscp} or @command{psftp} for transferring the files. 896they use @command{pscp} or @command{psftp} for transferring the files.
755These programs are part of PuTTY, an SSH implementation for Windows. 897These programs are part of PuTTY, an SSH implementation for MS Windows.
756 898
757Check the @samp{Share SSH connections if possible} control for that 899Check the @samp{Share SSH connections if possible} control for that
758session. 900session.
@@ -805,6 +947,8 @@ capable of servicing requests from @value{tramp}.
805@item @option{smb} 947@item @option{smb}
806@cindex method smb 948@cindex method smb
807@cindex smb method 949@cindex smb method
950@cindex ms windows (with smb method)
951@cindex smbclient
808 952
809This non-native @value{tramp} method connects via the Server Message 953This non-native @value{tramp} method connects via the Server Message
810Block (SMB) networking protocol to hosts running file servers that are 954Block (SMB) networking protocol to hosts running file servers that are
@@ -831,15 +975,16 @@ handling}.
831 975
832To accommodate user name/domain name syntax required by MS Windows 976To accommodate user name/domain name syntax required by MS Windows
833authorization, @value{tramp} provides for an extended syntax in 977authorization, @value{tramp} provides for an extended syntax in
834@code{user%domain} format (where user is user name, @code{%} is the 978@code{user%domain} format (where @code{user} is the user name,
835percent symbol, and domain is the windows domain name). An example: 979@code{%} is the percent symbol, and @code{domain} is the MS Windows
980domain name). An example:
836 981
837@example 982@example
838@trampfn{smb,daniel%BIZARRE@@melancholia,/daniel$$/.emacs} 983@trampfn{smb,daniel%BIZARRE@@melancholia,/daniel$$/.emacs}
839@end example 984@end example
840 985
841where user @code{daniel} connects as a domain user to the SMB host 986where user @code{daniel} connects as a domain user to the SMB host
842@code{melancholia} in the windows domain @code{BIZARRE} to edit 987@code{melancholia} in the MS Windows domain @code{BIZARRE} to edit
843@file{.emacs} located in the home directory (share @code{daniel$}). 988@file{.emacs} located in the home directory (share @code{daniel$}).
844 989
845Alternatively, for local WINS users (as opposed to domain users), 990Alternatively, for local WINS users (as opposed to domain users),
@@ -876,6 +1021,7 @@ can.
876@item @option{adb} 1021@item @option{adb}
877@cindex method adb 1022@cindex method adb
878@cindex adb method 1023@cindex adb method
1024@cindex android (with adb method)
879 1025
880This method uses Android Debug Bridge program for accessing Android 1026This method uses Android Debug Bridge program for accessing Android
881devices. The Android Debug Bridge must be installed locally for 1027devices. The Android Debug Bridge must be installed locally for
@@ -949,7 +1095,7 @@ but with SSL encryption. Both methods support the port numbers.
949@item @option{gdrive} 1095@item @option{gdrive}
950@cindex method gdrive 1096@cindex method gdrive
951@cindex gdrive method 1097@cindex gdrive method
952@cindex Google Drive 1098@cindex google drive
953 1099
954Via the @option{gdrive} method it is possible to access your Google 1100Via the @option{gdrive} method it is possible to access your Google
955Drive online storage. User and host name of the remote file name are 1101Drive online storage. User and host name of the remote file name are
@@ -981,8 +1127,8 @@ that for security reasons refuse @command{ssh} connections.
981@cindex method synce 1127@cindex method synce
982@cindex synce method 1128@cindex synce method
983 1129
984@option{synce} method allows connecting to Windows Mobile devices. It 1130@option{synce} method allows connecting to MS Windows Mobile devices.
985uses GVFS for mounting remote files and directories via FUSE and 1131It uses GVFS for mounting remote files and directories via FUSE and
986requires the SYNCE-GVFS plugin. 1132requires the SYNCE-GVFS plugin.
987 1133
988@end table 1134@end table
@@ -1070,7 +1216,7 @@ access and it has the most reasonable security protocols, use
1070@end example 1216@end example
1071 1217
1072If @option{ssh} is unavailable for whatever reason, look for other 1218If @option{ssh} is unavailable for whatever reason, look for other
1073obvious options. For Windows, try the @option{plink} method. For 1219obvious options. For MS Windows, try the @option{plink} method. For
1074Kerberos, try @option{krlogin}. 1220Kerberos, try @option{krlogin}.
1075 1221
1076For editing local files as @option{su} or @option{sudo} methods, try 1222For editing local files as @option{su} or @option{sudo} methods, try
@@ -1289,8 +1435,8 @@ restricted shell:
1289 1435
1290@node Firewalls 1436@node Firewalls
1291@section Passing firewalls 1437@section Passing firewalls
1292@cindex HTTP tunnel 1438@cindex http tunnel
1293@cindex proxy hosts, HTTP tunnel 1439@cindex proxy hosts, http tunnel
1294 1440
1295Sometimes, it is not possible to reach a remote host directly. A 1441Sometimes, it is not possible to reach a remote host directly. A
1296firewall might be in the way, which could be passed via a proxy 1442firewall might be in the way, which could be passed via a proxy
@@ -1746,8 +1892,8 @@ Similar localization may be necessary for handling wrong password
1746prompts, for which @value{tramp} uses @option{tramp-wrong-passwd-regexp}. 1892prompts, for which @value{tramp} uses @option{tramp-wrong-passwd-regexp}.
1747 1893
1748@item @command{tset} and other questions 1894@item @command{tset} and other questions
1749@cindex Unix command tset 1895@cindex unix command tset
1750@cindex tset Unix command 1896@cindex tset unix command
1751@vindex tramp-terminal-type 1897@vindex tramp-terminal-type
1752 1898
1753To suppress inappropriate prompts for terminal type, @value{tramp} 1899To suppress inappropriate prompts for terminal type, @value{tramp}
@@ -1847,7 +1993,7 @@ Then re-set the prompt string in @file{~/.emacs_SHELLNAME} as follows:
1847 1993
1848@example 1994@example
1849@group 1995@group
1850# Reset the prompt for remote Tramp shells. 1996# Reset the prompt for remote @value{tramp} shells.
1851if [ "$@{INSIDE_EMACS/*tramp*/tramp@}" == "tramp" ] ; then 1997if [ "$@{INSIDE_EMACS/*tramp*/tramp@}" == "tramp" ] ; then
1852 PS1="[\u@@\h \w]$ " 1998 PS1="[\u@@\h \w]$ "
1853fi 1999fi
@@ -1859,8 +2005,8 @@ fi
1859@end ifinfo 2005@end ifinfo
1860 2006
1861@item @command{busybox} / @command{nc} 2007@item @command{busybox} / @command{nc}
1862@cindex Unix command nc 2008@cindex unix command nc
1863@cindex nc Unix command 2009@cindex nc unix command
1864 2010
1865@value{tramp}'s @option{nc} method uses the @command{nc} command to 2011@value{tramp}'s @option{nc} method uses the @command{nc} command to
1866install and execute a listener as follows (see @code{tramp-methods}): 2012install and execute a listener as follows (see @code{tramp-methods}):
@@ -1891,7 +2037,7 @@ where @samp{192.168.0.1} is the remote host IP address
1891 2037
1892@node Android shell setup 2038@node Android shell setup
1893@section Android shell setup hints 2039@section Android shell setup hints
1894@cindex android shell setup 2040@cindex android shell setup for ssh
1895 2041
1896@value{tramp} uses the @option{adb} method to access Android devices. 2042@value{tramp} uses the @option{adb} method to access Android devices.
1897Android devices provide a restricted shell access through an USB 2043Android devices provide a restricted shell access through an USB
@@ -2072,12 +2218,12 @@ to direct all auto saves to that location.
2072 2218
2073@node Windows setup hints 2219@node Windows setup hints
2074@section Issues with Cygwin ssh 2220@section Issues with Cygwin ssh
2075@cindex Cygwin, issues 2221@cindex cygwin, issues
2076 2222
2077This section is incomplete. Please share your solutions. 2223This section is incomplete. Please share your solutions.
2078 2224
2079@cindex method sshx with Cygwin 2225@cindex method sshx with cygwin
2080@cindex sshx method with Cygwin 2226@cindex sshx method with cygwin
2081 2227
2082Cygwin's @command{ssh} works only with a Cygwin version of Emacs. To 2228Cygwin's @command{ssh} works only with a Cygwin version of Emacs. To
2083check for compatibility: type @kbd{M-x eshell}, and start @kbd{ssh 2229check for compatibility: type @kbd{M-x eshell}, and start @kbd{ssh
@@ -2091,34 +2237,34 @@ Some older versions of Cygwin's @command{ssh} work with the
2091@option{sshx} access method. Consult Cygwin's FAQ at 2237@option{sshx} access method. Consult Cygwin's FAQ at
2092@uref{https://cygwin.com/faq/} for details. 2238@uref{https://cygwin.com/faq/} for details.
2093 2239
2094@cindex Cygwin and fakecygpty 2240@cindex cygwin and fakecygpty
2095@cindex fakecygpty and Cygwin 2241@cindex fakecygpty and cygwin
2096 2242
2097On @uref{https://www.emacswiki.org/emacs/SshWithNTEmacs, the Emacs 2243On @uref{https://www.emacswiki.org/emacs/SshWithNTEmacs, the Emacs
2098Wiki} it is explained how to use the helper program @code{fakecygpty} 2244Wiki} it is explained how to use the helper program @code{fakecygpty}
2099to fix this problem. 2245to fix this problem.
2100 2246
2101@cindex method scpx with Cygwin 2247@cindex method scpx with cygwin
2102@cindex scpx method with Cygwin 2248@cindex scpx method with cygwin
2103 2249
2104When using the @option{scpx} access method, Emacs may call 2250When using the @option{scpx} access method, Emacs may call
2105@command{scp} with Windows file naming, such as @code{c:/foo}. But 2251@command{scp} with MS Windows file naming, such as @code{c:/foo}. But
2106the version of @command{scp} that is installed with Cygwin does not 2252the version of @command{scp} that is installed with Cygwin does not
2107know about Windows file naming, which causes it to incorrectly look 2253know about MS Windows file naming, which causes it to incorrectly look
2108for a host named @code{c}. 2254for a host named @code{c}.
2109 2255
2110A workaround: write a wrapper script for @option{scp} to convert 2256A workaround: write a wrapper script for @option{scp} to convert
2111Windows file names to Cygwin file names. 2257Windows file names to Cygwin file names.
2112 2258
2113@cindex Cygwin and ssh-agent 2259@cindex cygwin and ssh-agent
2114@cindex SSH_AUTH_SOCK and Emacs on Windows 2260@cindex SSH_AUTH_SOCK and emacs on ms windows
2115 2261
2116When using the @command{ssh-agent} on Windows for password-less 2262When using the @command{ssh-agent} on MS Windows for password-less
2117interaction, @option{ssh} methods depend on the environment variable 2263interaction, @option{ssh} methods depend on the environment variable
2118@env{SSH_AUTH_SOCK}. But this variable is not set when Emacs is 2264@env{SSH_AUTH_SOCK}. But this variable is not set when Emacs is
2119started from a Desktop shortcut and authentication fails. 2265started from a Desktop shortcut and authentication fails.
2120 2266
2121One workaround is to use a Windows based SSH Agent, such as 2267One workaround is to use an MS Windows based SSH Agent, such as
2122Pageant. It is part of the Putty Suite of tools. 2268Pageant. It is part of the Putty Suite of tools.
2123 2269
2124The fallback is to start Emacs from a shell. 2270The fallback is to start Emacs from a shell.
@@ -2716,11 +2862,11 @@ Arguments of the program to be debugged must be literal, can take
2716relative or absolute paths, but not remote paths. 2862relative or absolute paths, but not remote paths.
2717 2863
2718 2864
2719@subsection Running remote processes on Windows hosts 2865@subsection Running remote processes on MS Windows hosts
2720@cindex winexe 2866@cindex winexe
2721@cindex powershell 2867@cindex powershell
2722 2868
2723@command{winexe} runs processes on a remote Windows host, and 2869@command{winexe} runs processes on a remote MS Windows host, and
2724@value{tramp} can use it for @code{process-file} and 2870@value{tramp} can use it for @code{process-file} and
2725@code{start-file-process}. 2871@code{start-file-process}.
2726 2872
@@ -2730,7 +2876,7 @@ processes triggered from @value{tramp}.
2730 2876
2731@option{explicit-shell-file-name} and @option{explicit-*-args} have to 2877@option{explicit-shell-file-name} and @option{explicit-*-args} have to
2732be set properly so @kbd{M-x shell} can open a proper remote shell on a 2878be set properly so @kbd{M-x shell} can open a proper remote shell on a
2733Windows host. To open @command{cmd}, set it as follows: 2879MS Windows host. To open @command{cmd}, set it as follows:
2734 2880
2735@lisp 2881@lisp
2736@group 2882@group
@@ -3283,7 +3429,7 @@ Redefine another key sequence in Emacs for @kbd{C-x C-f}:
3283 (interactive) 3429 (interactive)
3284 (find-file 3430 (find-file
3285 (read-file-name 3431 (read-file-name
3286 "Find Tramp file: " 3432 "Find @value{tramp} file: "
3287 "@trampfn{ssh,news@@news.my.domain,/opt/news/etc/}")))) 3433 "@trampfn{ssh,news@@news.my.domain,/opt/news/etc/}"))))
3288@end group 3434@end group
3289@end lisp 3435@end lisp
@@ -3353,7 +3499,7 @@ The minibuffer expands for further editing.
3353 3499
3354@item Use bookmarks: 3500@item Use bookmarks:
3355 3501
3356Use bookmarks to save Tramp file names. 3502Use bookmarks to save @value{tramp} file names.
3357@ifinfo 3503@ifinfo
3358@pxref{Bookmarks, , , emacs}. 3504@pxref{Bookmarks, , , emacs}.
3359@end ifinfo 3505@end ifinfo
@@ -3736,4 +3882,3 @@ strings from being written to @file{*trace-output*}.
3736@c * Explain how tramp.el works in principle: open a shell on a remote 3882@c * Explain how tramp.el works in principle: open a shell on a remote
3737@c host and then send commands to it. 3883@c host and then send commands to it.
3738@c * Consistent small or capitalized words especially in menus. 3884@c * Consistent small or capitalized words especially in menus.
3739@c * Make a unique declaration of @trampfn.
diff --git a/doc/misc/trampver.texi b/doc/misc/trampver.texi
index 05b577da005..5d9dcc5635d 100644
--- a/doc/misc/trampver.texi
+++ b/doc/misc/trampver.texi
@@ -8,7 +8,7 @@
8@c In the Tramp GIT, the version number is auto-frobbed from 8@c In the Tramp GIT, the version number is auto-frobbed from
9@c configure.ac, so you should edit that file and run 9@c configure.ac, so you should edit that file and run
10@c "autoconf && ./configure" to change the version number. 10@c "autoconf && ./configure" to change the version number.
11@set trampver 2.3.2 11@set trampver 2.3.3-pre
12 12
13@c Other flags from configuration 13@c Other flags from configuration
14@set instprefix /usr/local 14@set instprefix /usr/local
diff --git a/etc/NEWS b/etc/NEWS
index 13805ce0da7..f43491b6306 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -97,9 +97,28 @@ Terminal is automatically initialized to use 24-bit colors if the
97required capabilities are found in terminfo. See the FAQ node 97required capabilities are found in terminfo. See the FAQ node
98"Colors on a TTY" for more information. 98"Colors on a TTY" for more information.
99 99
100+++
101** Emacs now obeys the X resource "scrollBar" at startup.
102The effect is similar to that of "toolBar" resource on the tool bar.
103
100 104
101* Changes in Emacs 26.1 105* Changes in Emacs 26.1
102 106
107+++
108** The function 'assoc' now takes an optional third argument 'testfn'.
109This argument, when non-nil, is used for comparison instead of
110'equal'.
111
112---
113** New variable 'executable-prefix-env' for inserting magic signatures.
114This variable affects the format of the interpreter magic number
115inserted by 'executable-set-magic'. If non-nil, the magic number now
116takes the form "#!/usr/bin/env interpreter", otherwise the value
117determined by 'executable-prefix', which is by default
118"#!/path/to/interpreter". By default, 'executable-prefix-env' is nil,
119so the default behavior is not changed.
120
121+++
103** The variable 'emacs-version' no longer includes the build number. 122** The variable 'emacs-version' no longer includes the build number.
104This is now stored separately in a new variable, 'emacs-build-number'. 123This is now stored separately in a new variable, 'emacs-build-number'.
105 124
@@ -353,6 +372,12 @@ variable of this kind to swap modifiers in Emacs.
353--- 372---
354** New input methods: 'cyrillic-tuvan', 'polish-prefix'. 373** New input methods: 'cyrillic-tuvan', 'polish-prefix'.
355 374
375---
376** The 'dutch' input method no longer attempts to support Turkish too.
377Also, it no longer converts 'IJ' and 'ij' to the compatibility
378characters U+0132 LATIN CAPITAL LIGATURE IJ and U+0133 LATIN SMALL
379LIGATURE IJ.
380
356+++ 381+++
357** File name quoting by adding the prefix "/:" is now possible for the 382** File name quoting by adding the prefix "/:" is now possible for the
358local part of a remote file name. Thus, if you have a directory named 383local part of a remote file name. Thus, if you have a directory named
@@ -405,10 +430,74 @@ display of raw bytes from octal to hex.
405** You can now provide explicit field numbers in format specifiers. 430** You can now provide explicit field numbers in format specifiers.
406For example, '(format "%2$s %1$s" "X" "Y")' produces "Y X". 431For example, '(format "%2$s %1$s" "X" "Y")' produces "Y X".
407 432
408+++
409** 'comment-indent-function' values may now return a cons to specify a 433** 'comment-indent-function' values may now return a cons to specify a
410range of indentation. 434range of indentation.
411 435
436+++
437** Emacs now supports optional display of line numbers in the buffer.
438This is similar to what linum-mode provides, but much faster and
439doesn't usurp the display margin for the line numbers. Customize the
440buffer-local variable 'display-line-numbers' to activate this optional
441display. Alternatively, you can use the `display-line-numbers-mode'
442minor mode or the global `global-display-line-numbers-mode'. When
443using these modes, customize `display-line-numbers-type' with the same
444value as you would use with `display-line-numbers'.
445
446If `display-line-numbers' is set to t, Emacs will display the number
447of each line before the line. If set to 'relative', Emacs will
448display the line number relative to the line showing point, with that
449line's number displayed as absolute. If set to 'visual', Emacs will
450display a relative number for every screen line, i.e. it will count
451screen lines rather than buffer lines. The default is nil, which
452doesn't display the line numbers.
453
454In 'relative' and 'visual' modes, the variable
455'display-line-numbers-current-absolute' controls what number is
456displayed for the line showing point. By default, this variable's
457value is t, which means display the absolute line number for the line
458showing point. Customizing this variable to a nil value will cause
459Emacs to show zero instead, which preserves horizontal space of the
460window in large buffers.
461
462Line numbers are not displayed at all in minibuffer windows and in
463tooltips, as they are not useful there.
464
465The new face 'line-number' is used to display the line numbers. The
466new face 'line-number-current-line' can be customized to display the
467current line's number differently from all the other line numbers; by
468default these two faces are identical.
469
470You can also customize the new buffer-local variable
471'display-line-numbers-width' to specify a fixed minimal with of the
472area allocated to line-number display. The default is nil, meaning
473that Emacs will dynamically calculate the area width, enlarging or
474shrinking it as needed. Setting it to a non-negative integer
475specifies that as the minimal width; selecting a value that is large
476enough to display all line numbers in a buffer will then keep the
477line-number display area of constant width at all times, if that is
478desired.
479
480When using `display-line-numbers-mode', you can customize the variable
481`display-line-numbers-grow-only' to a non-nil value; this means that
482Emacs may grow the above area width dynamically, but never shrink it.
483Under this mode, customizing the variable
484`display-line-numbers-width-start' to a non-nil value will cause Emacs
485to set `display-line-numbers-width' to the minimum width necessary to
486display all line numbers in the current buffer when first visiting it.
487
488Lisp programs can disable line-number display for a particular screen
489line by putting the 'display-line-numbers-disable' text property or
490overlay property on the first character of that screen line. This is
491intended for add-on packages that need a finer control of the display.
492
493Lisp programs that need to know how much screen estate is used up for
494line-number display in a window can use the new function
495'line-number-display-width'.
496
497Linum mode and all similar packages are henceforth becoming obsolete.
498Users and developers are encouraged to switch to this new feature
499instead.
500
412 501
413* Editing Changes in Emacs 26.1 502* Editing Changes in Emacs 26.1
414 503
@@ -500,11 +589,19 @@ current buffer with the contents of the accessible portion of a
500different buffer while keeping point, mark, markers, and text 589different buffer while keeping point, mark, markers, and text
501properties as intact as possible. 590properties as intact as possible.
502 591
592+++
593** More user control of reordering bidirectional text for display.
594The two new variables, 'bidi-paragraph-start-re' and
595'bidi-paragraph-separate-re', allow customization of what exactly are
596paragraphs, for the purposes of bidirectional display.
597
503 598
504* Changes in Specialized Modes and Packages in Emacs 26.1 599* Changes in Specialized Modes and Packages in Emacs 26.1
505 600
506** Dired 601** Dired
507You can now use '`?`' in 'dired-do-shell-command'; as ' ? ', it gets replaced 602
603+++
604*** You can now use '`?`' in 'dired-do-shell-command'; as ' ? ', it gets replaced
508by the current file name. 605by the current file name.
509 606
510*** html2text is now marked obsolete. 607*** html2text is now marked obsolete.
@@ -638,6 +735,18 @@ this is controlled by the 'wdired-create-parent-directories' variable.
638*** 'W' is now bound to 'browse-url-of-dired-file', and is useful for 735*** 'W' is now bound to 'browse-url-of-dired-file', and is useful for
639viewing HTML files and the like. 736viewing HTML files and the like.
640 737
738** Grep
739
740---
741*** Grep commands will now use GNU grep's '--null' option if
742available, which allows distinguishing the filename from contents if
743they contain colons. This can be controlled by the new custom option
744'grep-use-null-filename-separator'.
745
746*** The grep/rgrep/lgrep functions will now ask about saving files
747before running. This is controlled by the 'grep-save-buffers'
748variable.
749
641** Edebug 750** Edebug
642 751
643*** Edebug can be prevented from pausing 1 second after reaching a 752*** Edebug can be prevented from pausing 1 second after reaching a
@@ -702,6 +811,14 @@ Ido mode is active.
702in question). 811in question).
703 812
704+++ 813+++
814*** It's now possible to specify aspect-ratio preserving combinations
815of :width/:max-height and :height/:max-width keywords. In either
816case, the "max" keywords win. (Previously some combinations would,
817depending on the aspect ratio of the image, just be ignored and in
818other instances this would lead to the aspect ratio not being
819preserved.)
820
821+++
705*** Images inserted with 'insert-image' and related functions get a 822*** Images inserted with 'insert-image' and related functions get a
706keymap put into the text properties (or overlays) that span the 823keymap put into the text properties (or overlays) that span the
707image. This keymap binds keystrokes for manipulating size and 824image. This keymap binds keystrokes for manipulating size and
@@ -978,10 +1095,6 @@ things like forward-word in readline work.
978** hideshow mode got four key bindings that are analogous to outline 1095** hideshow mode got four key bindings that are analogous to outline
979mode bindings: 'C-c @ C-a', 'C-c @ C-t', 'C-c @ C-d', and 'C-c @ C-e.' 1096mode bindings: 'C-c @ C-a', 'C-c @ C-t', 'C-c @ C-d', and 'C-c @ C-e.'
980 1097
981** The grep/rgrep/lgrep functions will now ask about saving files
982before running. This is controlled by the 'grep-save-buffers'
983variable.
984
985--- 1098---
986** Customizable variable 'query-replace-from-to-separator' 1099** Customizable variable 'query-replace-from-to-separator'
987now doesn't propertize the string value of the separator. 1100now doesn't propertize the string value of the separator.
@@ -1041,6 +1154,10 @@ instead of its first.
1041renamed to 'lread--old-style-backquotes'. No user code should use 1154renamed to 'lread--old-style-backquotes'. No user code should use
1042this variable. 1155this variable.
1043 1156
1157** To avoid confusion caused by "smart quotes", the reader no longer
1158accepts Lisp symbols which begin with the following quotation
1159characters: ‘’‛“”‟〞"', unless they are escaped with backslash.
1160
1044+++ 1161+++
1045** Module functions are now implemented slightly differently; in 1162** Module functions are now implemented slightly differently; in
1046particular, the function 'internal--module-call' has been removed. 1163particular, the function 'internal--module-call' has been removed.
@@ -1050,9 +1167,26 @@ break.
1050 1167
1051* Lisp Changes in Emacs 26.1 1168* Lisp Changes in Emacs 26.1
1052 1169
1170+++
1171** New optional argument TESTFN in 'alist-get', 'map-elt' and 'map-put'.
1172
1053** New function 'seq-set-equal-p' to check if SEQUENCE1 and SEQUENCE2 1173** New function 'seq-set-equal-p' to check if SEQUENCE1 and SEQUENCE2
1054contain the same elements, regardless of the order. 1174contain the same elements, regardless of the order.
1055 1175
1176** Checksum/Hash
1177
1178+++
1179** New function 'secure-hash-algorithms' to list the algorithms that
1180'secure-hash' supports.
1181See the node "(elisp) Checksum/Hash" in the ELisp manual for details.
1182
1183+++
1184** Emacs now exposes the GnuTLS cryptographic API with the functions
1185'gnutls-macs' and 'gnutls-hash-mac'; 'gnutls-digests' and
1186'gnutls-hash-digest'; 'gnutls-ciphers' and 'gnutls-symmetric-encrypt'
1187and 'gnutls-symmetric-decrypt'.
1188See the node "(elisp) GnuTLS Cryptography" in the ELisp manual for details.
1189
1056+++ 1190+++
1057** Emacs now supports records for user-defined types, via the new 1191** Emacs now supports records for user-defined types, via the new
1058functions 'make-record', 'record', and 'recordp'. Records are now 1192functions 'make-record', 'record', and 'recordp'. Records are now
@@ -1418,9 +1552,12 @@ For details see the section "Mouse Window Auto-selection" in the Elisp
1418manual. 1552manual.
1419 1553
1420--- 1554---
1421** 'tcl-auto-fill-mode' is now declared obsolete. It's functionality 1555** 'tcl-auto-fill-mode' is now declared obsolete. Its functionality
1422can be replicated simply by setting 'comment-auto-fill-only-comments'. 1556can be replicated simply by setting 'comment-auto-fill-only-comments'.
1423 1557
1558** New pcase pattern 'rx' to match against a rx-style regular
1559expression.
1560
1424 1561
1425* Changes in Emacs 26.1 on Non-Free Operating Systems 1562* Changes in Emacs 26.1 on Non-Free Operating Systems
1426 1563
@@ -1466,6 +1603,9 @@ debugger has been attached to it.
1466** 'set-mouse-position' and 'set-mouse-absolute-pixel-position' work 1603** 'set-mouse-position' and 'set-mouse-absolute-pixel-position' work
1467on macOS. 1604on macOS.
1468 1605
1606** Emacs can now be run as a GUI application from the command line on
1607macOS.
1608
1469 1609
1470---------------------------------------------------------------------- 1610----------------------------------------------------------------------
1471This file is part of GNU Emacs. 1611This file is part of GNU Emacs.
diff --git a/etc/NEWS.21 b/etc/NEWS.21
index 4a214cb3d2f..9574a5d1df0 100644
--- a/etc/NEWS.21
+++ b/etc/NEWS.21
@@ -3367,7 +3367,7 @@ be strings that are compared case-insensitively.
3367 (sxhash (upcase a))) 3367 (sxhash (upcase a)))
3368 3368
3369 (define-hash-table-test 'case-fold 'case-fold-string= 3369 (define-hash-table-test 'case-fold 'case-fold-string=
3370 'case-fold-string-hash)) 3370 'case-fold-string-hash)
3371 3371
3372 (make-hash-table :test 'case-fold) 3372 (make-hash-table :test 'case-fold)
3373 3373
diff --git a/etc/themes/leuven-theme.el b/etc/themes/leuven-theme.el
index c15bd41bf81..6ec03163653 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: 20140929.1232 7;; Version: 20170715.0521
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.
@@ -600,6 +600,15 @@ Semantic, and Ansi-Color faces are included -- and much more...")
600 `(rainbow-delimiters-depth-9-face ((,class (:foreground "#887070")))) 600 `(rainbow-delimiters-depth-9-face ((,class (:foreground "#887070"))))
601 `(rainbow-delimiters-mismatched-face ((,class ,paren-unmatched))) 601 `(rainbow-delimiters-mismatched-face ((,class ,paren-unmatched)))
602 `(rainbow-delimiters-unmatched-face ((,class ,paren-unmatched))) 602 `(rainbow-delimiters-unmatched-face ((,class ,paren-unmatched)))
603 `(realgud-overlay-arrow1 ((,class (:foreground "#005522"))))
604 `(realgud-overlay-arrow2 ((,class (:foreground "#c18401"))))
605 `(realgud-overlay-arrow3 ((,class (:foreground "#909183"))))
606 `(realgud-bp-disabled-face ((,class (:foreground "#909183"))))
607 `(realgud-bp-line-enabled-face ((,class (:underline "red"))))
608 `(realgud-bp-line-disabled-face ((,class (:underline "#909183"))))
609 `(realgud-file-name ((,class :foreground "#005522")))
610 `(realgud-line-number ((,class :foreground "#A535AE")))
611 `(realgud-backtrace-number ((,class :foreground "#A535AE" :weight bold)))
603 `(recover-this-file ((,class (:weight bold :background "#FF3F3F")))) 612 `(recover-this-file ((,class (:weight bold :background "#FF3F3F"))))
604 `(rng-error ((,class (:weight bold :foreground "red" :background "#FBE3E4")))) 613 `(rng-error ((,class (:weight bold :foreground "red" :background "#FBE3E4"))))
605 `(sh-heredoc ((,class (:foreground "blue" :background "#EEF5FE")))) 614 `(sh-heredoc ((,class (:foreground "blue" :background "#EEF5FE"))))
diff --git a/etc/themes/manoj-dark-theme.el b/etc/themes/manoj-dark-theme.el
index bbfeb83d53e..9b461cc5e6e 100644
--- a/etc/themes/manoj-dark-theme.el
+++ b/etc/themes/manoj-dark-theme.el
@@ -602,18 +602,16 @@ jarring angry fruit salad look to reduce eye fatigue.")
602 '(paren-no-match-face ((t (:bold t :background "white" :foreground "red")))) 602 '(paren-no-match-face ((t (:bold t :background "white" :foreground "red"))))
603 '(query-replace ((t (:foreground "brown4" :background "palevioletred2")))) 603 '(query-replace ((t (:foreground "brown4" :background "palevioletred2"))))
604 '(region ((t (:background "blue3")))) 604 '(region ((t (:background "blue3"))))
605 605 '(realgud-overlay-arrow1 ((t (:foreground "medium sea green"))))
606 `(realgud-overlay-arrow1 ((t (:foreground "medium sea green")))) 606 '(realgud-overlay-arrow2 ((t (:foreground "white"))))
607 `(realgud-overlay-arrow2 ((t (:foreground "white")))) 607 '(realgud-overlay-arrow3 ((t (:foreground "indian red"))))
608 `(realgud-overlay-arrow3 ((t (:foreground "indian red")))) 608 '(realgud-bp-enabled-face ((t (:inherit error))))
609 `(realgud-bp-enabled-face ((t (:inherit error)))) 609 '(realgud-bp-disabled-face ((t (:underline t))))
610 `(realgud-bp-disabled-face ((t (:underline t)))) 610 '(realgud-bp-line-enabled-face ((t (:foreground "orange"))))
611 `(realgud-bp-line-enabled-face ((t (:foreground "orange")))) 611 '(realgud-bp-line-disabled-face ((t (:underline t))))
612 `(realgud-bp-line-disabled-face ((t (:underline t)))) 612 '(realgud-file-name ((t (:foreground "cyan"))))
613 `(realgud-file-name ((t (:foreground "cyan")))) 613 '(realgud-line-number ((t (:foreground "yellow"))))
614 `(realgud-line-number ((t (:foreground "yellow")))) 614 '(realgud-backtrace-number ((t (:foreground "yellow" :weight bold))))
615 `(realgud-backtrace-number ((t (:foreground "yellow" :weight bold))))))
616
617 '(scroll-bar ((t (:background "grey75" :foreground "WhiteSmoke")))) 615 '(scroll-bar ((t (:background "grey75" :foreground "WhiteSmoke"))))
618 '(secondary-selection ((t (:background "SkyBlue4")))) 616 '(secondary-selection ((t (:background "SkyBlue4"))))
619 '(semantic-dirty-token-face ((t (:background "lightyellow")))) 617 '(semantic-dirty-token-face ((t (:background "lightyellow"))))
diff --git a/etc/themes/tango-dark-theme.el b/etc/themes/tango-dark-theme.el
index ba7484c8cee..91bda442869 100644
--- a/etc/themes/tango-dark-theme.el
+++ b/etc/themes/tango-dark-theme.el
@@ -140,6 +140,16 @@ Semantic, and Ansi-Color faces are included.")
140 ;; Flyspell faces 140 ;; Flyspell faces
141 `(flyspell-duplicate ((,class (:underline ,orange-1)))) 141 `(flyspell-duplicate ((,class (:underline ,orange-1))))
142 `(flyspell-incorrect ((,class (:underline ,red-1)))) 142 `(flyspell-incorrect ((,class (:underline ,red-1))))
143 ;; Realgud
144 `(realgud-overlay-arrow1 ((,class (:foreground "green"))))
145 `(realgud-overlay-arrow2 ((,class (:foreground ,orange-1))))
146 `(realgud-overlay-arrow3 ((,class (:foreground ,plum-0))))
147 `(realgud-bp-disabled-face ((,class (:foreground ,blue-3))))
148 `(realgud-bp-line-enabled-face ((,class (:underline "red"))))
149 `(realgud-bp-line-disabled-face ((,class (:underline ,blue-3))))
150 `(realgud-file-name ((,class :foreground ,blue-1)))
151 `(realgud-line-number ((,class :foreground ,plum-0)))
152 `(realgud-backtrace-number ((,class :foreground ,plum-0 :weight bold)))
143 ;; Semantic faces 153 ;; Semantic faces
144 `(semantic-decoration-on-includes ((,class (:underline ,alum-4)))) 154 `(semantic-decoration-on-includes ((,class (:underline ,alum-4))))
145 `(semantic-decoration-on-private-members-face 155 `(semantic-decoration-on-private-members-face
diff --git a/etc/themes/tango-theme.el b/etc/themes/tango-theme.el
index 50b8a964fb2..9f7c0c29407 100644
--- a/etc/themes/tango-theme.el
+++ b/etc/themes/tango-theme.el
@@ -124,6 +124,16 @@ Semantic, and Ansi-Color faces are included.")
124 ;; Flyspell 124 ;; Flyspell
125 `(flyspell-duplicate ((,class (:underline ,orange-1)))) 125 `(flyspell-duplicate ((,class (:underline ,orange-1))))
126 `(flyspell-incorrect ((,class (:underline ,red-1)))) 126 `(flyspell-incorrect ((,class (:underline ,red-1))))
127 ;; Realgud
128 `(realgud-overlay-arrow1 ((,class (:foreground "dark green"))))
129 `(realgud-overlay-arrow2 ((,class (:foreground "#7a4c02"))))
130 `(realgud-overlay-arrow3 ((,class (:foreground ,orange-1))))
131 `(realgud-bp-disabled-face ((,class (:foreground ,plum-1))))
132 `(realgud-bp-line-enabled-face ((,class (:underline "red"))))
133 `(realgud-bp-line-disabled-face ((,class (:underline ,plum-1))))
134 `(realgud-file-name ((,class :foreground "dark green")))
135 `(realgud-line-number ((,class :foreground ,blue-3)))
136 `(realgud-backtrace-number ((,class :foreground ,blue-3 :weight bold)))
127 ;; Semantic faces 137 ;; Semantic faces
128 `(semantic-decoration-on-includes ((,class (:underline ,cham-4)))) 138 `(semantic-decoration-on-includes ((,class (:underline ,cham-4))))
129 `(semantic-decoration-on-private-members-face 139 `(semantic-decoration-on-private-members-face
diff --git a/etc/themes/tsdh-dark-theme.el b/etc/themes/tsdh-dark-theme.el
index 4f48854d449..3890fe0010c 100644
--- a/etc/themes/tsdh-dark-theme.el
+++ b/etc/themes/tsdh-dark-theme.el
@@ -118,16 +118,16 @@
118 '(outline-6 ((t (:foreground "light salmon" :weight bold)))) 118 '(outline-6 ((t (:foreground "light salmon" :weight bold))))
119 '(outline-7 ((t (:foreground "pale goldenrod" :weight bold)))) 119 '(outline-7 ((t (:foreground "pale goldenrod" :weight bold))))
120 '(outline-8 ((t (:foreground "OliveDrab1" :weight bold)))) 120 '(outline-8 ((t (:foreground "OliveDrab1" :weight bold))))
121 `(realgud-overlay-arrow1 ((t (:foreground "medium spring green")))) 121 '(realgud-overlay-arrow1 ((t (:foreground "medium spring green"))))
122 `(realgud-overlay-arrow2 ((t (:foreground "OliveDrab1")))) 122 '(realgud-overlay-arrow2 ((t (:foreground "OliveDrab1"))))
123 `(realgud-overlay-arrow3 ((t (:foreground "light salmon")))) 123 '(realgud-overlay-arrow3 ((t (:foreground "light salmon"))))
124 `(realgud-bp-enabled-face ((t (:inherit error)))) 124 '(realgud-bp-enabled-face ((t (:inherit error))))
125 `(realgud-bp-disabled-face ((t (:foreground "gray35")))) 125 '(realgud-bp-disabled-face ((t (:foreground "gray35"))))
126 `(realgud-bp-line-enabled-face ((t (:foreground "light salmon")))) 126 '(realgud-bp-line-enabled-face ((t (:foreground "light salmon"))))
127 `(realgud-bp-line-disabled-face ((t (:foreground "medium spring green")))) 127 '(realgud-bp-line-disabled-face ((t (:foreground "medium spring green"))))
128 `(realgud-file-name ((t (:foreground "dark khaki")))) 128 '(realgud-file-name ((t (:foreground "dark khaki"))))
129 `(realgud-line-number ((t (:foreground "cyan3")))) 129 '(realgud-line-number ((t (:foreground "cyan3"))))
130 `(realgud-backtrace-number ((t (:foreground "cyan3" :weight bold)))))) 130 '(realgud-backtrace-number ((t (:foreground "cyan3" :weight bold))))
131 '(rcirc-my-nick ((t (:foreground "SpringGreen1" :weight bold))) t) 131 '(rcirc-my-nick ((t (:foreground "SpringGreen1" :weight bold))) t)
132 '(rcirc-other-nick ((t (:foreground "dodger blue"))) t) 132 '(rcirc-other-nick ((t (:foreground "dodger blue"))) t)
133 '(rcirc-track-keyword ((t (:foreground "DodgerBlue" :weight bold))) t) 133 '(rcirc-track-keyword ((t (:foreground "DodgerBlue" :weight bold))) t)
diff --git a/etc/themes/tsdh-light-theme.el b/etc/themes/tsdh-light-theme.el
index e8174803e2d..8498fe2bc94 100644
--- a/etc/themes/tsdh-light-theme.el
+++ b/etc/themes/tsdh-light-theme.el
@@ -90,6 +90,15 @@ Used and created by Tassilo Horn.")
90 '(outline-7 ((t (:inherit font-lock-builtin-face :weight bold)))) 90 '(outline-7 ((t (:inherit font-lock-builtin-face :weight bold))))
91 '(outline-8 ((t (:inherit font-lock-string-face :weight bold)))) 91 '(outline-8 ((t (:inherit font-lock-string-face :weight bold))))
92 '(rcirc-my-nick ((t (:foreground "LightSkyBlue" :weight bold)))) 92 '(rcirc-my-nick ((t (:foreground "LightSkyBlue" :weight bold))))
93 '(realgud-overlay-arrow1 ((t (:foreground "dark green"))))
94 '(realgud-overlay-arrow2 ((t (:foreground "#c18401"))))
95 '(realgud-overlay-arrow3 ((t (:foreground "gray60"))))
96 '(realgud-bp-disabled-face ((t (:foreground "gray60"))))
97 '(realgud-bp-line-enabled-face ((t (:underline "red"))))
98 '(realgud-bp-line-disabled-face ((t (:underline "gray60"))))
99 '(realgud-file-name ((t :foreground "dark green")))
100 '(realgud-line-number ((t :foreground "#0184bc")))
101 '(realgud-backtrace-number ((t :foreground "#0184bc" :weight bold)))
93 '(region ((t (:background "lightgoldenrod1")))) 102 '(region ((t (:background "lightgoldenrod1"))))
94 '(show-paren-match ((t (:background "Cyan1" :weight bold)))) 103 '(show-paren-match ((t (:background "Cyan1" :weight bold))))
95 '(show-paren-mismatch ((t (:background "deep pink" :weight bold)))) 104 '(show-paren-mismatch ((t (:background "deep pink" :weight bold))))
diff --git a/etc/themes/wheatgrass-theme.el b/etc/themes/wheatgrass-theme.el
index 269c33a9650..9ec532d9baa 100644
--- a/etc/themes/wheatgrass-theme.el
+++ b/etc/themes/wheatgrass-theme.el
@@ -75,8 +75,8 @@ of green, brown, and blue.")
75 `(realgud-overlay-arrow3 ((,class (:foreground "wheat")))) 75 `(realgud-overlay-arrow3 ((,class (:foreground "wheat"))))
76 `(realgud-bp-enabled-face ((,class (:inherit error)))) 76 `(realgud-bp-enabled-face ((,class (:inherit error))))
77 `(realgud-bp-disabled-face ((,class (:foreground "dark slate gray")))) 77 `(realgud-bp-disabled-face ((,class (:foreground "dark slate gray"))))
78 `(realgud-bp-line-enabled-face ((,class (:foreground "salmon")))) 78 `(realgud-bp-line-enabled-face ((,class (:underline "SpringGreen3"))))
79 `(realgud-bp-line-disabled-face ((,class (:foreground "dark slate gray")))) 79 `(realgud-bp-line-disabled-face ((,class (:underline "salmon"))))
80 `(realgud-file-name ((,class (:foreground "dark khaki")))) 80 `(realgud-file-name ((,class (:foreground "dark khaki"))))
81 `(realgud-line-number ((,class (:foreground "dark cyan")))) 81 `(realgud-line-number ((,class (:foreground "dark cyan"))))
82 `(realgud-backtrace-number ((,class (:foreground "dark cyan" :weight bold)))))) 82 `(realgud-backtrace-number ((,class (:foreground "dark cyan" :weight bold))))))
diff --git a/etc/themes/whiteboard-theme.el b/etc/themes/whiteboard-theme.el
index 5e2f466acc4..0192289a5bc 100644
--- a/etc/themes/whiteboard-theme.el
+++ b/etc/themes/whiteboard-theme.el
@@ -83,6 +83,16 @@
83 `(outline-4 ((,class (:foreground "RoyalBlue")))) 83 `(outline-4 ((,class (:foreground "RoyalBlue"))))
84 `(outline-5 ((,class (:foreground "DeepSkyBlue")))) 84 `(outline-5 ((,class (:foreground "DeepSkyBlue"))))
85 `(primary-selection ((,class (:background "blue3")))) 85 `(primary-selection ((,class (:background "blue3"))))
86 `(realgud-overlay-arrow1 ((,class (:foreground "DarkGreen"))))
87 `(realgud-overlay-arrow2 ((,class (:foreground "DarkOliveGreen"))))
88 `(realgud-overlay-arrow3 ((,class (:foreground "gray60"))))
89 `(realgud-bp-disabled-face ((,class (:foreground "gray60"))))
90 `(realgud-bp-line-enabled-face ((,class (:underline "red"))))
91 `(realgud-bp-line-disabled-face ((,class (:underline "gray60"))))
92 `(realgud-file-name ((,class :foreground "DarkGreen")))
93 `(realgud-line-number ((,class :foreground "blue3")))
94 `(realgud-backtrace-number ((,class :foreground "blue3" :weight bold)))
95
86 `(region ((,class (:background "SkyBlue1")))) 96 `(region ((,class (:background "SkyBlue1"))))
87 `(show-paren-match-face ((,class (:background "dodgerblue1" :foreground "white")))) 97 `(show-paren-match-face ((,class (:background "dodgerblue1" :foreground "white"))))
88 `(show-paren-mismatch-face ((,class (:background "red1" :foreground "white")))) 98 `(show-paren-mismatch-face ((,class (:background "red1" :foreground "white"))))
diff --git a/lib-src/etags.c b/lib-src/etags.c
index e5ff7bd10fc..7b1a7fc1851 100644
--- a/lib-src/etags.c
+++ b/lib-src/etags.c
@@ -373,6 +373,7 @@ static void readline (linebuffer *, FILE *);
373static long readline_internal (linebuffer *, FILE *, char const *); 373static long readline_internal (linebuffer *, FILE *, char const *);
374static bool nocase_tail (const char *); 374static bool nocase_tail (const char *);
375static void get_tag (char *, char **); 375static void get_tag (char *, char **);
376static void get_lispy_tag (char *);
376 377
377static void analyze_regex (char *); 378static void analyze_regex (char *);
378static void free_regexps (void); 379static void free_regexps (void);
@@ -5347,7 +5348,7 @@ L_getit (void)
5347 /* Ok, then skip "(" before name in (defstruct (foo)) */ 5348 /* Ok, then skip "(" before name in (defstruct (foo)) */
5348 dbp = skip_spaces (dbp); 5349 dbp = skip_spaces (dbp);
5349 } 5350 }
5350 get_tag (dbp, NULL); 5351 get_lispy_tag (dbp);
5351} 5352}
5352 5353
5353static void 5354static void
@@ -5549,14 +5550,14 @@ Scheme_functions (FILE *inf)
5549 if (strneq (bp, "(def", 4) || strneq (bp, "(DEF", 4)) 5550 if (strneq (bp, "(def", 4) || strneq (bp, "(DEF", 4))
5550 { 5551 {
5551 bp = skip_non_spaces (bp+4); 5552 bp = skip_non_spaces (bp+4);
5552 /* Skip over open parens and white space. Don't continue past 5553 /* Skip over open parens and white space.
5553 '\0'. */ 5554 Don't continue past '\0' or '='. */
5554 while (*bp && notinname (*bp)) 5555 while (*bp && notinname (*bp) && *bp != '=')
5555 bp++; 5556 bp++;
5556 get_tag (bp, NULL); 5557 get_lispy_tag (bp);
5557 } 5558 }
5558 if (LOOKING_AT (bp, "(SET!") || LOOKING_AT (bp, "(set!")) 5559 if (LOOKING_AT (bp, "(SET!") || LOOKING_AT (bp, "(set!"))
5559 get_tag (bp, NULL); 5560 get_lispy_tag (bp);
5560 } 5561 }
5561} 5562}
5562 5563
@@ -6591,6 +6592,22 @@ get_tag (register char *bp, char **namepp)
6591 *namepp = savenstr (bp, cp - bp); 6592 *namepp = savenstr (bp, cp - bp);
6592} 6593}
6593 6594
6595/* Similar to get_tag, but include '=' as part of the tag. */
6596static void
6597get_lispy_tag (register char *bp)
6598{
6599 register char *cp = bp;
6600
6601 if (*bp != '\0')
6602 {
6603 /* Go till you get to white space or a syntactic break */
6604 for (cp = bp + 1; !notinname (*cp) || *cp == '='; cp++)
6605 continue;
6606 make_tag (bp, cp - bp, true,
6607 lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
6608 }
6609}
6610
6594/* 6611/*
6595 * Read a line of text from `stream' into `lbp', excluding the 6612 * Read a line of text from `stream' into `lbp', excluding the
6596 * newline or CR-NL, if any. Return the number of characters read from 6613 * newline or CR-NL, if any. Return the number of characters read from
diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c
index 6b2cc110403..ecd6447ab78 100644
--- a/lib-src/make-docfile.c
+++ b/lib-src/make-docfile.c
@@ -667,7 +667,9 @@ close_emacs_globals (ptrdiff_t num_symbols)
667 "#ifndef DEFINE_SYMBOLS\n" 667 "#ifndef DEFINE_SYMBOLS\n"
668 "extern\n" 668 "extern\n"
669 "#endif\n" 669 "#endif\n"
670 "struct Lisp_Symbol alignas (GCALIGNMENT) lispsym[%td];\n"), 670 "struct {\n"
671 " struct Lisp_Symbol alignas (GCALIGNMENT) s;\n"
672 "} lispsym[%td];\n"),
671 num_symbols); 673 num_symbols);
672} 674}
673 675
diff --git a/lib/explicit_bzero.c b/lib/explicit_bzero.c
new file mode 100644
index 00000000000..262c68f9cd6
--- /dev/null
+++ b/lib/explicit_bzero.c
@@ -0,0 +1,48 @@
1/* Erasure of sensitive data, generic implementation.
2 Copyright (C) 2016-2017 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public
7 License as published by the Free Software Foundation; either
8 version 3 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
14
15 You should have received a copy of the GNU General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
18
19/* An assembler implementation of explicit_bzero can be created as an
20 assembler alias of an optimized bzero implementation.
21 Architecture-specific implementations also need to define
22 __explicit_bzero_chk. */
23
24#if !_LIBC
25# include <config.h>
26#endif
27
28#include <string.h>
29
30/* glibc-internal users use __explicit_bzero_chk, and explicit_bzero
31 redirects to that. */
32#undef explicit_bzero
33
34/* Set LEN bytes of S to 0. The compiler will not delete a call to
35 this function, even if S is dead after the call. */
36void
37explicit_bzero (void *s, size_t len)
38{
39#ifdef HAVE_EXPLICIT_MEMSET
40 explicit_memset (s, 0, len);
41#else
42 memset (s, '\0', len);
43# ifdef __GNUC__
44 /* Compiler barrier. */
45 asm volatile ("" ::: "memory");
46# endif
47#endif
48}
diff --git a/lib/fpending.c b/lib/fpending.c
index c9b77866858..02602a1c27f 100644
--- a/lib/fpending.c
+++ b/lib/fpending.c
@@ -41,7 +41,7 @@ __fpending (FILE *fp)
41 return fp->_ptr - fp->_buffer; 41 return fp->_ptr - fp->_buffer;
42#elif defined __minix /* Minix */ 42#elif defined __minix /* Minix */
43 return fp_->_ptr - fp_->_buf; 43 return fp_->_ptr - fp_->_buf;
44#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel */ 44#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel, OpenVMS */
45 return (fp_->_ptr ? fp_->_ptr - fp_->_base : 0); 45 return (fp_->_ptr ? fp_->_ptr - fp_->_base : 0);
46#elif defined __UCLIBC__ /* uClibc */ 46#elif defined __UCLIBC__ /* uClibc */
47 return (fp->__modeflags & __FLAG_WRITING ? fp->__bufpos - fp->__bufstart : 0); 47 return (fp->__modeflags & __FLAG_WRITING ? fp->__bufpos - fp->__bufstart : 0);
@@ -51,8 +51,6 @@ __fpending (FILE *fp)
51 return fp->__bufp - fp->__buffer; 51 return fp->__bufp - fp->__buffer;
52#elif defined EPLAN9 /* Plan9 */ 52#elif defined EPLAN9 /* Plan9 */
53 return fp->wp - fp->buf; 53 return fp->wp - fp->buf;
54#elif defined __VMS /* VMS */
55 return (*fp)->_ptr - (*fp)->_base;
56#else 54#else
57# error "Please port gnulib fpending.c to your platform!" 55# error "Please port gnulib fpending.c to your platform!"
58 return 1; 56 return 1;
diff --git a/lib/getdtablesize.c b/lib/getdtablesize.c
index c356cf4aa97..a0928630fa5 100644
--- a/lib/getdtablesize.c
+++ b/lib/getdtablesize.c
@@ -1,4 +1,4 @@
1/* getdtablesize() function for platforms that don't have it. 1/* getdtablesize() function: Return maximum possible file descriptor value + 1.
2 Copyright (C) 2008-2017 Free Software Foundation, Inc. 2 Copyright (C) 2008-2017 Free Software Foundation, Inc.
3 Written by Bruno Haible <bruno@clisp.org>, 2008. 3 Written by Bruno Haible <bruno@clisp.org>, 2008.
4 4
diff --git a/lib/gnulib.mk.in b/lib/gnulib.mk.in
index fd0f9e5c780..3e57391372a 100644
--- a/lib/gnulib.mk.in
+++ b/lib/gnulib.mk.in
@@ -21,7 +21,7 @@
21# the same distribution terms as the rest of that program. 21# the same distribution terms as the rest of that program.
22# 22#
23# Generated by gnulib-tool. 23# Generated by gnulib-tool.
24# Reproduce by: gnulib-tool --import --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=close --avoid=dup --avoid=fchdir --avoid=fstat --avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=setenv --avoid=sigprocmask --avoid=stat --avoid=stdarg --avoid=stdbool --avoid=threadlib --avoid=tzset --avoid=unsetenv --avoid=utime --avoid=utime-h --gnu-make --makefile-name=gnulib.mk.in --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt binary-io byteswap c-ctype c-strcase careadlinkat close-stream count-leading-zeros count-one-bits count-trailing-zeros crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 diffseq dtoastr dtotimespec dup2 environ execinfo faccessat fcntl fcntl-h fdatasync fdopendir filemode filevercmp flexmember fstatat fsync getloadavg getopt-gnu gettime gettimeofday gitlog-to-changelog ignore-value intprops largefile lstat manywarnings memrchr minmax mkostemp mktime pipe2 pselect pthread_sigmask putenv qcopy-acl readlink readlinkat sig2str socklen stat-time std-gnu11 stdalign stddef stdio stpcpy strftime strtoimax symlink sys_stat sys_time time time_r time_rz timegm timer-time timespec-add timespec-sub unlocked-io update-copyright utimens vla warnings 24# Reproduce by: gnulib-tool --import --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=close --avoid=dup --avoid=fchdir --avoid=fstat --avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=setenv --avoid=sigprocmask --avoid=stat --avoid=stdarg --avoid=stdbool --avoid=threadlib --avoid=tzset --avoid=unsetenv --avoid=utime --avoid=utime-h --gnu-make --makefile-name=gnulib.mk.in --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt binary-io byteswap c-ctype c-strcase careadlinkat close-stream count-leading-zeros count-one-bits count-trailing-zeros crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 diffseq dtoastr dtotimespec dup2 environ execinfo explicit_bzero faccessat fcntl fcntl-h fdatasync fdopendir filemode filevercmp flexmember fstatat fsync getloadavg getopt-gnu gettime gettimeofday gitlog-to-changelog ignore-value intprops largefile lstat manywarnings memrchr minmax mkostemp mktime nstrftime pipe2 pselect pthread_sigmask putenv qcopy-acl readlink readlinkat sig2str socklen stat-time std-gnu11 stdalign stddef stdio stpcpy strtoimax symlink sys_stat sys_time time time_r time_rz timegm timer-time timespec-add timespec-sub unlocked-io update-copyright utimens vla warnings
25 25
26 26
27MOSTLYCLEANFILES += core *.stackdump 27MOSTLYCLEANFILES += core *.stackdump
@@ -125,6 +125,7 @@ GNULIB_DUP2 = @GNULIB_DUP2@
125GNULIB_DUP3 = @GNULIB_DUP3@ 125GNULIB_DUP3 = @GNULIB_DUP3@
126GNULIB_ENVIRON = @GNULIB_ENVIRON@ 126GNULIB_ENVIRON = @GNULIB_ENVIRON@
127GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ 127GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
128GNULIB_EXPLICIT_BZERO = @GNULIB_EXPLICIT_BZERO@
128GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ 129GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
129GNULIB_FCHDIR = @GNULIB_FCHDIR@ 130GNULIB_FCHDIR = @GNULIB_FCHDIR@
130GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ 131GNULIB_FCHMODAT = @GNULIB_FCHMODAT@
@@ -390,6 +391,7 @@ HAVE_DPRINTF = @HAVE_DPRINTF@
390HAVE_DUP2 = @HAVE_DUP2@ 391HAVE_DUP2 = @HAVE_DUP2@
391HAVE_DUP3 = @HAVE_DUP3@ 392HAVE_DUP3 = @HAVE_DUP3@
392HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ 393HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
394HAVE_EXPLICIT_BZERO = @HAVE_EXPLICIT_BZERO@
393HAVE_FACCESSAT = @HAVE_FACCESSAT@ 395HAVE_FACCESSAT = @HAVE_FACCESSAT@
394HAVE_FCHDIR = @HAVE_FCHDIR@ 396HAVE_FCHDIR = @HAVE_FCHDIR@
395HAVE_FCHMODAT = @HAVE_FCHMODAT@ 397HAVE_FCHMODAT = @HAVE_FCHMODAT@
@@ -1356,6 +1358,17 @@ EXTRA_libgnu_a_SOURCES += execinfo.c
1356endif 1358endif
1357## end gnulib module execinfo 1359## end gnulib module execinfo
1358 1360
1361## begin gnulib module explicit_bzero
1362ifeq (,$(OMIT_GNULIB_MODULE_explicit_bzero))
1363
1364
1365EXTRA_DIST += explicit_bzero.c
1366
1367EXTRA_libgnu_a_SOURCES += explicit_bzero.c
1368
1369endif
1370## end gnulib module explicit_bzero
1371
1359## begin gnulib module faccessat 1372## begin gnulib module faccessat
1360ifeq (,$(OMIT_GNULIB_MODULE_faccessat)) 1373ifeq (,$(OMIT_GNULIB_MODULE_faccessat))
1361 1374
@@ -1798,6 +1811,16 @@ EXTRA_libgnu_a_SOURCES += mktime.c
1798endif 1811endif
1799## end gnulib module mktime-internal 1812## end gnulib module mktime-internal
1800 1813
1814## begin gnulib module nstrftime
1815ifeq (,$(OMIT_GNULIB_MODULE_nstrftime))
1816
1817libgnu_a_SOURCES += nstrftime.c
1818
1819EXTRA_DIST += strftime.h
1820
1821endif
1822## end gnulib module nstrftime
1823
1801## begin gnulib module openat-h 1824## begin gnulib module openat-h
1802ifeq (,$(OMIT_GNULIB_MODULE_openat-h)) 1825ifeq (,$(OMIT_GNULIB_MODULE_openat-h))
1803 1826
@@ -2386,16 +2409,6 @@ EXTRA_libgnu_a_SOURCES += stpcpy.c
2386endif 2409endif
2387## end gnulib module stpcpy 2410## end gnulib module stpcpy
2388 2411
2389## begin gnulib module strftime
2390ifeq (,$(OMIT_GNULIB_MODULE_strftime))
2391
2392libgnu_a_SOURCES += strftime.c
2393
2394EXTRA_DIST += strftime.h
2395
2396endif
2397## end gnulib module strftime
2398
2399## begin gnulib module string 2412## begin gnulib module string
2400ifeq (,$(OMIT_GNULIB_MODULE_string)) 2413ifeq (,$(OMIT_GNULIB_MODULE_string))
2401 2414
@@ -2411,6 +2424,7 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
2411 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ 2424 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
2412 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ 2425 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
2413 -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \ 2426 -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \
2427 -e 's/@''GNULIB_EXPLICIT_BZERO''@/$(GNULIB_EXPLICIT_BZERO)/g' \
2414 -e 's/@''GNULIB_FFSL''@/$(GNULIB_FFSL)/g' \ 2428 -e 's/@''GNULIB_FFSL''@/$(GNULIB_FFSL)/g' \
2415 -e 's/@''GNULIB_FFSLL''@/$(GNULIB_FFSLL)/g' \ 2429 -e 's/@''GNULIB_FFSLL''@/$(GNULIB_FFSLL)/g' \
2416 -e 's/@''GNULIB_MBSLEN''@/$(GNULIB_MBSLEN)/g' \ 2430 -e 's/@''GNULIB_MBSLEN''@/$(GNULIB_MBSLEN)/g' \
@@ -2449,7 +2463,8 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
2449 -e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \ 2463 -e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \
2450 -e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \ 2464 -e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \
2451 < $(srcdir)/string.in.h | \ 2465 < $(srcdir)/string.in.h | \
2452 sed -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \ 2466 sed -e 's|@''HAVE_EXPLICIT_BZERO''@|$(HAVE_EXPLICIT_BZERO)|g' \
2467 -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \
2453 -e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \ 2468 -e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \
2454 -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \ 2469 -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \
2455 -e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \ 2470 -e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \
diff --git a/lib/strftime.c b/lib/nstrftime.c
index 99bee4ef978..99bee4ef978 100644
--- a/lib/strftime.c
+++ b/lib/nstrftime.c
diff --git a/lib/stdio-impl.h b/lib/stdio-impl.h
index 75a945eb724..d5b5943fd7c 100644
--- a/lib/stdio-impl.h
+++ b/lib/stdio-impl.h
@@ -99,6 +99,8 @@
99 int _file; \ 99 int _file; \
100 unsigned int _flag; \ 100 unsigned int _flag; \
101 } *) fp) 101 } *) fp)
102# elif defined __VMS /* OpenVMS */
103# define fp_ ((struct _iobuf *) fp)
102# else 104# else
103# define fp_ fp 105# define fp_ fp
104# endif 106# endif
diff --git a/lib/string.in.h b/lib/string.in.h
index 9a6b311d007..aaff5638d0f 100644
--- a/lib/string.in.h
+++ b/lib/string.in.h
@@ -74,6 +74,23 @@
74/* The definition of _GL_WARN_ON_USE is copied here. */ 74/* The definition of _GL_WARN_ON_USE is copied here. */
75 75
76 76
77/* Clear a block of memory. The compiler will not delete a call to
78 this function, even if the block is dead after the call. */
79#if @GNULIB_EXPLICIT_BZERO@
80# if ! @HAVE_EXPLICIT_BZERO@
81_GL_FUNCDECL_SYS (explicit_bzero, void,
82 (void *__dest, size_t __n) _GL_ARG_NONNULL ((1)));
83# endif
84_GL_CXXALIAS_SYS (explicit_bzero, void, (void *__dest, size_t __n));
85_GL_CXXALIASWARN (explicit_bzero);
86#elif defined GNULIB_POSIXCHECK
87# undef explicit_bzero
88# if HAVE_RAW_DECL_EXPLICIT_BZERO
89_GL_WARN_ON_USE (explicit_bzero, "explicit_bzero is unportable - "
90 "use gnulib module explicit_bzero for portability");
91# endif
92#endif
93
77/* Find the index of the least-significant set bit. */ 94/* Find the index of the least-significant set bit. */
78#if @GNULIB_FFSL@ 95#if @GNULIB_FFSL@
79# if !@HAVE_FFSL@ 96# if !@HAVE_FFSL@
diff --git a/lib/xalloc-oversized.h b/lib/xalloc-oversized.h
index ff0efc6ba40..2e09bab0be2 100644
--- a/lib/xalloc-oversized.h
+++ b/lib/xalloc-oversized.h
@@ -44,7 +44,7 @@ typedef size_t __xalloc_count_type;
44#if 7 <= __GNUC__ 44#if 7 <= __GNUC__
45# define xalloc_oversized(n, s) \ 45# define xalloc_oversized(n, s) \
46 __builtin_mul_overflow_p (n, s, (__xalloc_count_type) 1) 46 __builtin_mul_overflow_p (n, s, (__xalloc_count_type) 1)
47#elif 5 <= __GNUC__ && !__STRICT_ANSI__ 47#elif 5 <= __GNUC__ && !defined __ICC && !__STRICT_ANSI__
48# define xalloc_oversized(n, s) \ 48# define xalloc_oversized(n, s) \
49 (__builtin_constant_p (n) && __builtin_constant_p (s) \ 49 (__builtin_constant_p (n) && __builtin_constant_p (s) \
50 ? __xalloc_oversized (n, s) \ 50 ? __xalloc_oversized (n, s) \
diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el
index 235eb83e85b..b89c1c2bbd5 100644
--- a/lisp/calendar/todo-mode.el
+++ b/lisp/calendar/todo-mode.el
@@ -1,4 +1,4 @@
1;;; todo-mode.el --- facilities for making and maintaining todo lists 1;;; todo-mode.el --- facilities for making and maintaining todo lists -*- lexical-binding:t -*-
2 2
3;; Copyright (C) 1997, 1999, 2001-2017 Free Software Foundation, Inc. 3;; Copyright (C) 1997, 1999, 2001-2017 Free Software Foundation, Inc.
4 4
@@ -72,14 +72,14 @@ file truenames in `todo-directory' with the extension
72\".todo\". With non-nil ARCHIVES return the list of archive file 72\".todo\". With non-nil ARCHIVES return the list of archive file
73truenames (those with the extension \".toda\")." 73truenames (those with the extension \".toda\")."
74 (let ((files (if (file-exists-p todo-directory) 74 (let ((files (if (file-exists-p todo-directory)
75 (mapcar 'file-truename 75 (mapcar #'file-truename
76 (directory-files todo-directory t 76 (directory-files todo-directory t
77 (if archives "\\.toda$" "\\.todo$") t))))) 77 (if archives "\\.toda\\'" "\\.todo\\'") t)))))
78 (sort files (lambda (s1 s2) (let ((cis1 (upcase s1)) 78 (sort files (lambda (s1 s2) (let ((cis1 (upcase s1))
79 (cis2 (upcase s2))) 79 (cis2 (upcase s2)))
80 (string< cis1 cis2)))))) 80 (string< cis1 cis2))))))
81 81
82(defcustom todo-files-function 'todo-files 82(defcustom todo-files-function #'todo-files
83 "Function returning the value of the variable `todo-files'. 83 "Function returning the value of the variable `todo-files'.
84This function should take an optional argument that, if non-nil, 84This function should take an optional argument that, if non-nil,
85makes it return the value of the variable `todo-archives'." 85makes it return the value of the variable `todo-archives'."
@@ -188,6 +188,15 @@ The final element is \"*\", indicating an unspecified month.")
188 "Array of abbreviated month names, in order. 188 "Array of abbreviated month names, in order.
189The final element is \"*\", indicating an unspecified month.") 189The final element is \"*\", indicating an unspecified month.")
190 190
191(with-no-warnings
192 ;; FIXME: These vars lack a prefix, but this is out of our control, because
193 ;; they're defined by Calendar, e.g. for calendar-date-display-form.
194 (defvar dayname)
195 (defvar monthname)
196 (defvar day)
197 (defvar month)
198 (defvar year))
199
191(defconst todo-date-pattern 200(defconst todo-date-pattern
192 (let ((dayname (diary-name-pattern calendar-day-name-array nil t))) 201 (let ((dayname (diary-name-pattern calendar-day-name-array nil t)))
193 (concat "\\(?4:\\(?5:" dayname "\\)\\|" 202 (concat "\\(?4:\\(?5:" dayname "\\)\\|"
@@ -198,7 +207,7 @@ The final element is \"*\", indicating an unspecified month.")
198 (month "\\(?7:[0-9]+\\|\\*\\)") 207 (month "\\(?7:[0-9]+\\|\\*\\)")
199 (day "\\(?8:[0-9]+\\|\\*\\)") 208 (day "\\(?8:[0-9]+\\|\\*\\)")
200 (year "-?\\(?9:[0-9]+\\|\\*\\)")) 209 (year "-?\\(?9:[0-9]+\\|\\*\\)"))
201 (mapconcat 'eval calendar-date-display-form "")) 210 (mapconcat #'eval calendar-date-display-form ""))
202 "\\)")) 211 "\\)"))
203 "Regular expression matching a todo item date header.") 212 "Regular expression matching a todo item date header.")
204 213
@@ -260,7 +269,7 @@ This function is the value of the user variable
260 (let ((file (todo-short-file-name todo-current-todo-file))) 269 (let ((file (todo-short-file-name todo-current-todo-file)))
261 (format "%s category %d: %s" file todo-category-number cat))) 270 (format "%s category %d: %s" file todo-category-number cat)))
262 271
263(defcustom todo-mode-line-function 'todo-mode-line-control 272(defcustom todo-mode-line-function #'todo-mode-line-control
264 "Function that returns a mode line control for Todo mode buffers. 273 "Function that returns a mode line control for Todo mode buffers.
265The function expects one argument holding the name of the current 274The function expects one argument holding the name of the current
266todo category. The resulting control becomes the local value of 275todo category. The resulting control becomes the local value of
@@ -555,13 +564,15 @@ This lacks the extension and directory components."
555 (when (stringp file) 564 (when (stringp file)
556 (file-name-sans-extension (file-name-nondirectory file)))) 565 (file-name-sans-extension (file-name-nondirectory file))))
557 566
567(defun todo--files-type-list ()
568 (mapcar (lambda (f) (list 'const (todo-short-file-name f)))
569 (funcall todo-files-function)))
570
558(defcustom todo-default-todo-file (todo-short-file-name 571(defcustom todo-default-todo-file (todo-short-file-name
559 (car (funcall todo-files-function))) 572 (car (funcall todo-files-function)))
560 "Todo file visited by first session invocation of `todo-show'." 573 "Todo file visited by first session invocation of `todo-show'."
561 :type (when todo-files 574 :type (when todo-files
562 `(radio ,@(mapcar (lambda (f) (list 'const f)) 575 `(radio ,@(todo--files-type-list)))
563 (mapcar 'todo-short-file-name
564 (funcall todo-files-function)))))
565 :group 'todo) 576 :group 'todo)
566 577
567(defcustom todo-show-current-file t 578(defcustom todo-show-current-file t
@@ -598,9 +609,7 @@ Otherwise, `todo-show' always visits `todo-default-todo-file'."
598 609
599(defcustom todo-category-completions-files nil 610(defcustom todo-category-completions-files nil
600 "List of files for building `todo-read-category' completions." 611 "List of files for building `todo-read-category' completions."
601 :type `(set ,@(mapcar (lambda (f) (list 'const f)) 612 :type `(set ,@(todo--files-type-list))
602 (mapcar 'todo-short-file-name
603 (funcall todo-files-function))))
604 :group 'todo) 613 :group 'todo)
605 614
606(defcustom todo-completion-ignore-case nil 615(defcustom todo-completion-ignore-case nil
@@ -707,11 +716,12 @@ and done items are always shown on visiting a category."
707 (let ((rxfiles (directory-files todo-directory t 716 (let ((rxfiles (directory-files todo-directory t
708 ".*\\.todr$" t))) 717 ".*\\.todr$" t)))
709 (when (and rxfiles (> (length rxfiles) 1)) 718 (when (and rxfiles (> (length rxfiles) 1))
710 (let ((rxf (mapcar 'todo-short-file-name rxfiles))) 719 (let ((rxf (mapcar #'todo-short-file-name rxfiles)))
711 (setq fi-file (todo-absolute-file-name 720 (setq fi-file (todo-absolute-file-name
712 (completing-read 721 (completing-read
713 "Choose a regexp items file: " 722 "Choose a regexp items file: "
714 rxf) 'regexp)))))) 723 rxf)
724 'regexp))))))
715 (if (file-exists-p fi-file) 725 (if (file-exists-p fi-file)
716 (progn 726 (progn
717 (set-window-buffer 727 (set-window-buffer
@@ -823,7 +833,7 @@ buries it and restores state as needed."
823 (when (buffer-live-p buf) (kill-buffer buf))) 833 (when (buffer-live-p buf) (kill-buffer buf)))
824 ((eq major-mode 'todo-mode) 834 ((eq major-mode 'todo-mode)
825 (todo-save) 835 (todo-save)
826 (bury-buffer))))) 836 (quit-window)))))
827 837
828;; ----------------------------------------------------------------------------- 838;; -----------------------------------------------------------------------------
829;;; Navigation between and within categories 839;;; Navigation between and within categories
@@ -857,7 +867,7 @@ category is the first)."
857 (zerop (todo-get-count 'done)) 867 (zerop (todo-get-count 'done))
858 (not (zerop (todo-get-count 'archived)))) 868 (not (zerop (todo-get-count 'archived))))
859 (setq todo-category-number 869 (setq todo-category-number
860 (apply (if back '1- '1+) (list todo-category-number))))) 870 (funcall (if back #'1- #'1+) todo-category-number))))
861 (todo-category-select) 871 (todo-category-select)
862 (goto-char (point-min))) 872 (goto-char (point-min)))
863 873
@@ -1117,7 +1127,8 @@ these files, also rename them accordingly."
1117 (snname (todo-short-file-name nname)) 1127 (snname (todo-short-file-name nname))
1118 (files (directory-files todo-directory t 1128 (files (directory-files todo-directory t
1119 (concat ".*" (regexp-quote soname) 1129 (concat ".*" (regexp-quote soname)
1120 ".*\\.tod[aorty]$") t))) 1130 ".*\\.tod[aorty]$")
1131 t)))
1121 (dolist (f files) 1132 (dolist (f files)
1122 (let* ((sfname (todo-short-file-name f)) 1133 (let* ((sfname (todo-short-file-name f))
1123 (fext (file-name-extension f t)) 1134 (fext (file-name-extension f t))
@@ -1363,10 +1374,12 @@ todo or done items."
1363 (let ((buffer-read-only) 1374 (let ((buffer-read-only)
1364 (beg (re-search-backward 1375 (beg (re-search-backward
1365 (concat "^" (regexp-quote (concat todo-category-beg cat)) 1376 (concat "^" (regexp-quote (concat todo-category-beg cat))
1366 "\n") nil t)) 1377 "\n")
1378 nil t))
1367 (end (if (re-search-forward 1379 (end (if (re-search-forward
1368 (concat "\n\\(" (regexp-quote todo-category-beg) 1380 (concat "\n\\(" (regexp-quote todo-category-beg)
1369 ".*\n\\)") nil t) 1381 ".*\n\\)")
1382 nil t)
1370 (match-beginning 1) 1383 (match-beginning 1)
1371 (point-max)))) 1384 (point-max))))
1372 (remove-overlays beg end) 1385 (remove-overlays beg end)
@@ -1475,7 +1488,8 @@ the archive of the file moved to, creating it if it does not exist."
1475 (goto-char (point-max)) 1488 (goto-char (point-max))
1476 (re-search-backward 1489 (re-search-backward
1477 (concat "^" (regexp-quote todo-category-beg) 1490 (concat "^" (regexp-quote todo-category-beg)
1478 "\\(" (regexp-quote cat) "\\)$") nil t) 1491 "\\(" (regexp-quote cat) "\\)$")
1492 nil t)
1479 (replace-match new nil nil nil 1)) 1493 (replace-match new nil nil nil 1))
1480 (setq todo-categories 1494 (setq todo-categories
1481 (append todo-categories (list (cons (or new cat) counts)))) 1495 (append todo-categories (list (cons (or new cat) counts))))
@@ -1746,7 +1760,7 @@ consist of the the last todo items and the first done items."
1746 (let ((cat (todo-current-category))) 1760 (let ((cat (todo-current-category)))
1747 (unless (> n 1) (setq n 1)) 1761 (unless (> n 1) (setq n 1))
1748 (catch 'end 1762 (catch 'end
1749 (dotimes (i n) 1763 (dotimes (_ n)
1750 (let* ((marks (assoc cat todo-categories-with-marks)) 1764 (let* ((marks (assoc cat todo-categories-with-marks))
1751 (ov (progn 1765 (ov (progn
1752 (unless (looking-at todo-item-start) 1766 (unless (looking-at todo-item-start)
@@ -2134,7 +2148,8 @@ the item at point."
2134 (todo-item-start) 2148 (todo-item-start)
2135 (re-search-forward 2149 (re-search-forward
2136 (concat " \\[" (regexp-quote todo-comment-string) 2150 (concat " \\[" (regexp-quote todo-comment-string)
2137 ": \\([^]]+\\)\\]") end t))) 2151 ": \\([^]]+\\)\\]")
2152 end t)))
2138 (prompt (if comment "Edit comment: " "Enter a comment: ")) 2153 (prompt (if comment "Edit comment: " "Enter a comment: "))
2139 (buffer-read-only nil)) 2154 (buffer-read-only nil))
2140 ;; When there are marked items, user can invoke todo-edit-item 2155 ;; When there are marked items, user can invoke todo-edit-item
@@ -2150,7 +2165,8 @@ the item at point."
2150 (todo-item-start) 2165 (todo-item-start)
2151 (if (re-search-forward (concat " \\[" 2166 (if (re-search-forward (concat " \\["
2152 (regexp-quote todo-comment-string) 2167 (regexp-quote todo-comment-string)
2153 ": \\([^]]+\\)\\]") end t) 2168 ": \\([^]]+\\)\\]")
2169 end t)
2154 (if comment-delete 2170 (if comment-delete
2155 (when (todo-y-or-n-p "Delete comment? ") 2171 (when (todo-y-or-n-p "Delete comment? ")
2156 (delete-region (match-beginning 0) (match-end 0))) 2172 (delete-region (match-beginning 0) (match-end 0)))
@@ -2182,7 +2198,8 @@ the item at point."
2182 (cons item 0)))))) 2198 (cons item 0))))))
2183 (when include-header 2199 (when include-header
2184 (while (not (string-match (concat todo-date-string-start 2200 (while (not (string-match (concat todo-date-string-start
2185 todo-date-pattern) new)) 2201 todo-date-pattern)
2202 new))
2186 (setq new (read-from-minibuffer 2203 (setq new (read-from-minibuffer
2187 "Item must start with a date: " new)))) 2204 "Item must start with a date: " new))))
2188 ;; Ensure lines following hard newlines are indented. 2205 ;; Ensure lines following hard newlines are indented.
@@ -2211,7 +2228,8 @@ made in the number or names of categories."
2211 (regex "\\(\n\\)[^[:blank:]]") 2228 (regex "\\(\n\\)[^[:blank:]]")
2212 (buf (buffer-base-buffer))) 2229 (buf (buffer-base-buffer)))
2213 (while (not (string-match (concat todo-date-string-start 2230 (while (not (string-match (concat todo-date-string-start
2214 todo-date-pattern) item)) 2231 todo-date-pattern)
2232 item))
2215 (setq item (read-from-minibuffer 2233 (setq item (read-from-minibuffer
2216 "Item must start with a date: " item))) 2234 "Item must start with a date: " item)))
2217 ;; Ensure lines following hard newlines are indented. 2235 ;; Ensure lines following hard newlines are indented.
@@ -2270,8 +2288,7 @@ made in the number or names of categories."
2270 "\\)\\(?2: " diary-time-regexp "\\)?" 2288 "\\)\\(?2: " diary-time-regexp "\\)?"
2271 (regexp-quote todo-nondiary-end) "?") 2289 (regexp-quote todo-nondiary-end) "?")
2272 (line-end-position) t) 2290 (line-end-position) t)
2273 (let* ((odate (match-string-no-properties 1)) 2291 (let* ((otime (match-string-no-properties 2))
2274 (otime (match-string-no-properties 2))
2275 (odayname (match-string-no-properties 5)) 2292 (odayname (match-string-no-properties 5))
2276 (omonthname (match-string-no-properties 6)) 2293 (omonthname (match-string-no-properties 6))
2277 (omonth (match-string-no-properties 7)) 2294 (omonth (match-string-no-properties 7))
@@ -2382,7 +2399,8 @@ made in the number or names of categories."
2382 (calendar-current-date)))) 2399 (calendar-current-date))))
2383 (date (calendar-gregorian-from-absolute 2400 (date (calendar-gregorian-from-absolute
2384 (+ (calendar-absolute-from-gregorian 2401 (+ (calendar-absolute-from-gregorian
2385 (list mm dd yy)) inc))) 2402 (list mm dd yy))
2403 inc)))
2386 (adjmm (nth 0 date))) 2404 (adjmm (nth 0 date)))
2387 ;; Set year and month(name) to adjusted values. 2405 ;; Set year and month(name) to adjusted values.
2388 (unless (string= year "*") 2406 (unless (string= year "*")
@@ -2396,7 +2414,7 @@ made in the number or names of categories."
2396 ;; If year, month or day date string components were 2414 ;; If year, month or day date string components were
2397 ;; changed, rebuild the date string. 2415 ;; changed, rebuild the date string.
2398 (when (memq what '(year month day)) 2416 (when (memq what '(year month day))
2399 (setq ndate (mapconcat 'eval calendar-date-display-form "")))) 2417 (setq ndate (mapconcat #'eval calendar-date-display-form ""))))
2400 (when ndate (replace-match ndate nil nil nil 1)) 2418 (when ndate (replace-match ndate nil nil nil 1))
2401 ;; Add new time string to the header, if it was supplied. 2419 ;; Add new time string to the header, if it was supplied.
2402 (when ntime 2420 (when ntime
@@ -2423,7 +2441,7 @@ made in the number or names of categories."
2423 (when marked (goto-char (point-min))) 2441 (when marked (goto-char (point-min)))
2424 (while (not (eobp)) 2442 (while (not (eobp))
2425 (unless (and marked (not (todo-marked-item-p))) 2443 (unless (and marked (not (todo-marked-item-p)))
2426 (let* ((beg (todo-item-start)) 2444 (let* ((_beg (todo-item-start))
2427 (lim (save-excursion (todo-item-end))) 2445 (lim (save-excursion (todo-item-end)))
2428 (end (save-excursion 2446 (end (save-excursion
2429 (or (todo-time-string-matcher lim) 2447 (or (todo-time-string-matcher lim)
@@ -2470,7 +2488,7 @@ items."
2470 (while (not (eobp)) 2488 (while (not (eobp))
2471 (if (todo-done-item-p) ; We've gone too far. 2489 (if (todo-done-item-p) ; We've gone too far.
2472 (throw 'stop nil) 2490 (throw 'stop nil)
2473 (let* ((beg (todo-item-start)) 2491 (let* ((_beg (todo-item-start))
2474 (lim (save-excursion (todo-item-end))) 2492 (lim (save-excursion (todo-item-end)))
2475 (end (save-excursion 2493 (end (save-excursion
2476 (or (todo-time-string-matcher lim) 2494 (or (todo-time-string-matcher lim)
@@ -2682,9 +2700,7 @@ section in the category moved to."
2682 (not marked)) 2700 (not marked))
2683 (let* ((buffer-read-only) 2701 (let* ((buffer-read-only)
2684 (file1 todo-current-todo-file) 2702 (file1 todo-current-todo-file)
2685 (num todo-category-number)
2686 (item (todo-item-string)) 2703 (item (todo-item-string))
2687 (diary-item (todo-diary-item-p))
2688 (done-item (and (todo-done-item-p) item)) 2704 (done-item (and (todo-done-item-p) item))
2689 (omark (save-excursion (todo-item-start) (point-marker))) 2705 (omark (save-excursion (todo-item-start) (point-marker)))
2690 (todo 0) 2706 (todo 0)
@@ -2956,7 +2972,8 @@ comments without asking."
2956 ;; affirmed, omit subsequent comments without asking. 2972 ;; affirmed, omit subsequent comments without asking.
2957 (when (re-search-forward 2973 (when (re-search-forward
2958 (concat " \\[" (regexp-quote todo-comment-string) 2974 (concat " \\[" (regexp-quote todo-comment-string)
2959 ": [^]]+\\]") end t) 2975 ": [^]]+\\]")
2976 end t)
2960 (unwind-protect 2977 (unwind-protect
2961 (if (eq first 'first) 2978 (if (eq first 'first)
2962 (setq first 2979 (setq first
@@ -3216,7 +3233,8 @@ the only category in the archive, the archive file is deleted."
3216 (let* ((cat (todo-current-category)) 3233 (let* ((cat (todo-current-category))
3217 (tbuf (find-file-noselect 3234 (tbuf (find-file-noselect
3218 (concat (file-name-sans-extension todo-current-todo-file) 3235 (concat (file-name-sans-extension todo-current-todo-file)
3219 ".todo") t)) 3236 ".todo")
3237 t))
3220 (marked (assoc cat todo-categories-with-marks)) 3238 (marked (assoc cat todo-categories-with-marks))
3221 (item (concat (todo-item-string) "\n")) 3239 (item (concat (todo-item-string) "\n"))
3222 (marked-count 0) 3240 (marked-count 0)
@@ -3241,7 +3259,8 @@ the only category in the archive, the archive file is deleted."
3241 ;; one, add it. 3259 ;; one, add it.
3242 (unless (re-search-forward 3260 (unless (re-search-forward
3243 (concat "^" (regexp-quote (concat todo-category-beg cat)) 3261 (concat "^" (regexp-quote (concat todo-category-beg cat))
3244 "$") nil t) 3262 "$")
3263 nil t)
3245 (todo-add-category nil cat) 3264 (todo-add-category nil cat)
3246 (setq newcat t)) 3265 (setq newcat t))
3247 ;; Go to top of category's done section. 3266 ;; Go to top of category's done section.
@@ -3449,9 +3468,9 @@ decreasing or increasing its number."
3449 (unless prompt (setq priority candidate))) 3468 (unless prompt (setq priority candidate)))
3450 (let* ((lower (< curnum priority)) ; Priority is being lowered. 3469 (let* ((lower (< curnum priority)) ; Priority is being lowered.
3451 (head (butlast todo-categories 3470 (head (butlast todo-categories
3452 (apply (if lower 'identity '1+) 3471 (funcall (if lower #'identity #'1+)
3453 (list (- maxnum priority))))) 3472 (- maxnum priority))))
3454 (tail (nthcdr (apply (if lower 'identity '1-) (list priority)) 3473 (tail (nthcdr (funcall (if lower #'identity #'1-) priority)
3455 todo-categories)) 3474 todo-categories))
3456 ;; Category's name and items counts list. 3475 ;; Category's name and items counts list.
3457 (catcons (nth (1- curnum) todo-categories)) 3476 (catcons (nth (1- curnum) todo-categories))
@@ -3537,7 +3556,7 @@ decreasing or increasing its number."
3537 "Return adjusted length of category label button. 3556 "Return adjusted length of category label button.
3538The adjustment ensures proper tabular alignment in Todo 3557The adjustment ensures proper tabular alignment in Todo
3539Categories mode." 3558Categories mode."
3540 (let* ((categories (mapcar 'car todo-categories)) 3559 (let* ((categories (mapcar #'car todo-categories))
3541 (longest (todo-longest-category-name-length categories)) 3560 (longest (todo-longest-category-name-length categories))
3542 (catlablen (length todo-categories-category-label)) 3561 (catlablen (length todo-categories-category-label))
3543 (lc-diff (- longest catlablen))) 3562 (lc-diff (- longest catlablen)))
@@ -3623,24 +3642,24 @@ LABEL determines which type of count is sorted."
3623 ov) 3642 ov)
3624 (insert-button str 'face nil 3643 (insert-button str 'face nil
3625 'action 3644 'action
3626 `(lambda (button) 3645 (lambda (_button)
3627 (let ((key (todo-label-to-key ,label))) 3646 (let ((key (todo-label-to-key label)))
3628 (if (and (member key todo-descending-counts) 3647 (if (and (member key todo-descending-counts)
3629 (eq key 'alpha)) 3648 (eq key 'alpha))
3630 (progn 3649 (progn
3631 ;; If display is alphabetical, switch back to 3650 ;; If display is alphabetical, switch back to
3632 ;; category priority order. 3651 ;; category priority order.
3633 (todo-display-sorted nil) 3652 (todo-display-sorted nil)
3634 (setq todo-descending-counts 3653 (setq todo-descending-counts
3635 (delete key todo-descending-counts))) 3654 (delete key todo-descending-counts)))
3636 (todo-display-sorted key))))) 3655 (todo-display-sorted key)))))
3637 (setq ov (make-overlay beg end)) 3656 (setq ov (make-overlay beg end))
3638 (overlay-put ov 'face 'todo-button))) 3657 (overlay-put ov 'face 'todo-button)))
3639 3658
3640(defun todo-total-item-counts () 3659(defun todo-total-item-counts ()
3641 "Return a list of total item counts for the current file." 3660 "Return a list of total item counts for the current file."
3642 (mapcar (lambda (i) (apply '+ (mapcar (lambda (l) (aref l i)) 3661 (mapcar (lambda (i) (apply #'+ (mapcar (lambda (x) (aref (cdr x) i))
3643 (mapcar 'cdr todo-categories)))) 3662 todo-categories)))
3644 (list 0 1 2 3))) 3663 (list 0 1 2 3)))
3645 3664
3646(defvar todo-categories-category-number 0 3665(defvar todo-categories-category-number 0
@@ -3685,9 +3704,10 @@ which is the value of the user option
3685 (not (zerop (todo-get-count 'archived cat)))) 3704 (not (zerop (todo-get-count 'archived cat))))
3686 'todo-archived-only 3705 'todo-archived-only
3687 nil) 3706 nil)
3688 'action `(lambda (button) (let ((buf (current-buffer))) 3707 'action (lambda (_button)
3689 (todo-jump-to-category nil ,cat) 3708 (let ((buf (current-buffer)))
3690 (kill-buffer buf)))) 3709 (todo-jump-to-category nil cat)
3710 (kill-buffer buf))))
3691 ;; Highlight the sorted count column. 3711 ;; Highlight the sorted count column.
3692 (let* ((beg (+ opoint 7 (length str))) 3712 (let* ((beg (+ opoint 7 (length str)))
3693 end ovl) 3713 end ovl)
@@ -3766,8 +3786,8 @@ which is the value of the user option
3766 (delete-region (point) (point-max)) 3786 (delete-region (point) (point-max))
3767 ;; Fill in the table with buttonized lines, each showing a category and 3787 ;; Fill in the table with buttonized lines, each showing a category and
3768 ;; its item counts. 3788 ;; its item counts.
3769 (mapc (lambda (cat) (todo-insert-category-line cat sortkey)) 3789 (dolist (cat cats)
3770 (mapcar 'car cats)) 3790 (todo-insert-category-line (car cat) sortkey))
3771 (newline) 3791 (newline)
3772 ;; Add a line showing item count totals. 3792 ;; Add a line showing item count totals.
3773 (insert (make-string (+ 4 (length todo-categories-number-separator)) 32) 3793 (insert (make-string (+ 4 (length todo-categories-number-separator)) 32)
@@ -3823,7 +3843,8 @@ face."
3823 (when (looking-at todo-done-string-start) 3843 (when (looking-at todo-done-string-start)
3824 (setq in-done t)) 3844 (setq in-done t))
3825 (re-search-backward (concat "^" (regexp-quote todo-category-beg) 3845 (re-search-backward (concat "^" (regexp-quote todo-category-beg)
3826 "\\(.*\\)\n") nil t) 3846 "\\(.*\\)\n")
3847 nil t)
3827 (setq cat (match-string-no-properties 1)) 3848 (setq cat (match-string-no-properties 1))
3828 (todo-category-number cat) 3849 (todo-category-number cat)
3829 (todo-category-select) 3850 (todo-category-select)
@@ -3885,9 +3906,7 @@ This variable should be set interactively by
3885 3906
3886(defcustom todo-filter-files nil 3907(defcustom todo-filter-files nil
3887 "List of default files for multifile item filtering." 3908 "List of default files for multifile item filtering."
3888 :type `(set ,@(mapcar (lambda (f) (list 'const f)) 3909 :type `(set ,@(todo--files-type-list))
3889 (mapcar 'todo-short-file-name
3890 (funcall todo-files-function))))
3891 :group 'todo-filtered) 3910 :group 'todo-filtered)
3892 3911
3893(defcustom todo-filter-done-items nil 3912(defcustom todo-filter-done-items nil
@@ -4067,19 +4086,17 @@ regexp items."
4067 (widget-insert "Select files for generating the top priorities list.\n\n") 4086 (widget-insert "Select files for generating the top priorities list.\n\n")
4068 (setq todo-multiple-filter-files-widget 4087 (setq todo-multiple-filter-files-widget
4069 (widget-create 4088 (widget-create
4070 `(set ,@(mapcar (lambda (x) (list 'const x)) 4089 `(set ,@(todo--files-type-list))))
4071 (mapcar 'todo-short-file-name
4072 (funcall todo-files-function))))))
4073 (widget-insert "\n") 4090 (widget-insert "\n")
4074 (widget-create 'push-button 4091 (widget-create 'push-button
4075 :notify (lambda (widget &rest ignore) 4092 :notify (lambda (&rest _)
4076 (setq todo-multiple-filter-files 'quit) 4093 (setq todo-multiple-filter-files 'quit)
4077 (quit-window t) 4094 (quit-window t)
4078 (exit-recursive-edit)) 4095 (exit-recursive-edit))
4079 "Cancel") 4096 "Cancel")
4080 (widget-insert " ") 4097 (widget-insert " ")
4081 (widget-create 'push-button 4098 (widget-create 'push-button
4082 :notify (lambda (&rest ignore) 4099 :notify (lambda (&rest _)
4083 (setq todo-multiple-filter-files 4100 (setq todo-multiple-filter-files
4084 (mapcar (lambda (f) 4101 (mapcar (lambda (f)
4085 (file-truename 4102 (file-truename
@@ -4137,7 +4154,7 @@ multifile commands for further details."
4137 ;; Pressed `cancel' in t-m-f-f file selection dialog. 4154 ;; Pressed `cancel' in t-m-f-f file selection dialog.
4138 (keyboard-quit) 4155 (keyboard-quit)
4139 (concat todo-directory 4156 (concat todo-directory
4140 (mapconcat 'todo-short-file-name flist "-") 4157 (mapconcat #'todo-short-file-name flist "-")
4141 (cond (top ".todt") 4158 (cond (top ".todt")
4142 (diary ".tody") 4159 (diary ".tody")
4143 (regexp ".todr"))))) 4160 (regexp ".todr")))))
@@ -4150,10 +4167,11 @@ multifile commands for further details."
4150 (todo-filter-items-1 (cons 'top new) flist)) 4167 (todo-filter-items-1 (cons 'top new) flist))
4151 ((and (not new) file-exists) 4168 ((and (not new) file-exists)
4152 (when (and rxfiles (> (length rxfiles) 1)) 4169 (when (and rxfiles (> (length rxfiles) 1))
4153 (let ((rxf (mapcar 'todo-short-file-name rxfiles))) 4170 (let ((rxf (mapcar #'todo-short-file-name rxfiles)))
4154 (setq fname (todo-absolute-file-name 4171 (setq fname (todo-absolute-file-name
4155 (completing-read "Choose a regexp items file: " 4172 (completing-read "Choose a regexp items file: "
4156 rxf) 'regexp)))) 4173 rxf)
4174 'regexp))))
4157 (find-file fname) 4175 (find-file fname)
4158 (unless (derived-mode-p 'todo-filtered-items-mode) 4176 (unless (derived-mode-p 'todo-filtered-items-mode)
4159 (todo-filtered-items-mode)) 4177 (todo-filtered-items-mode))
@@ -4164,12 +4182,13 @@ multifile commands for further details."
4164 (dolist (s (split-string (todo-short-file-name fname) "-")) 4182 (dolist (s (split-string (todo-short-file-name fname) "-"))
4165 (setq bufname (if bufname 4183 (setq bufname (if bufname
4166 (concat bufname (if (member s (mapcar 4184 (concat bufname (if (member s (mapcar
4167 'todo-short-file-name 4185 #'todo-short-file-name
4168 todo-files)) 4186 todo-files))
4169 ", " "-") s) 4187 ", " "-")
4188 s)
4170 s))) 4189 s)))
4171 (rename-buffer (format (concat "%s for file" (if multi "s" "") 4190 (rename-buffer (format (concat "%s for file" (if multi "s" "") " \"%s\"")
4172 " \"%s\"") buf bufname)))) 4191 buf bufname))))
4173 4192
4174(defun todo-filter-items-1 (filter file-list) 4193(defun todo-filter-items-1 (filter file-list)
4175 "Build a list of items by applying FILTER to FILE-LIST. 4194 "Build a list of items by applying FILTER to FILE-LIST.
@@ -4235,7 +4254,8 @@ the values of FILTER and FILE-LIST."
4235 todo-top-priorities))) 4254 todo-top-priorities)))
4236 (while (re-search-forward 4255 (while (re-search-forward
4237 (concat "^" (regexp-quote todo-category-beg) 4256 (concat "^" (regexp-quote todo-category-beg)
4238 "\\(.+\\)\n") nil t) 4257 "\\(.+\\)\n")
4258 nil t)
4239 (setq cat (match-string 1)) 4259 (setq cat (match-string 1))
4240 (let (cnum) 4260 (let (cnum)
4241 ;; Unless the number of top priorities to show was 4261 ;; Unless the number of top priorities to show was
@@ -4389,7 +4409,8 @@ its priority has changed, and `same' otherwise."
4389 "\\]" 4409 "\\]"
4390 (regexp-quote todo-nondiary-end)) "?" 4410 (regexp-quote todo-nondiary-end)) "?"
4391 "\\(?4: \\[\\(?3:(archive) \\)?\\(?2:.*:\\)?" 4411 "\\(?4: \\[\\(?3:(archive) \\)?\\(?2:.*:\\)?"
4392 "\\(?1:.*\\)\\]\\).*$") str) 4412 "\\(?1:.*\\)\\]\\).*$")
4413 str)
4393 (let ((cat (match-string 1 str)) 4414 (let ((cat (match-string 1 str))
4394 (file (match-string 2 str)) 4415 (file (match-string 2 str))
4395 (archive (string= (match-string 3 str) "(archive) ")) 4416 (archive (string= (match-string 3 str) "(archive) "))
@@ -4504,8 +4525,13 @@ If the file already exists, overwrite it only on confirmation."
4504;;; Printing Todo mode buffers 4525;;; Printing Todo mode buffers
4505;; ----------------------------------------------------------------------------- 4526;; -----------------------------------------------------------------------------
4506 4527
4507(defcustom todo-print-buffer-function 'ps-print-buffer-with-faces 4528(defcustom todo-print-buffer-function #'ps-print-buffer-with-faces
4508 "Function called by the command `todo-print-buffer'." 4529 "Function called by `todo-print-buffer' to print Todo mode buffers.
4530The function should take an optional argument whose non-nil value
4531is a string naming a file to save the print image to; calling
4532`todo-print-buffer-to-file' prompts for the file name, which is
4533passed to this function. Calling this function with no or a nil
4534argument sends the image to the printer."
4509 :type 'symbol 4535 :type 'symbol
4510 :group 'todo) 4536 :group 'todo)
4511 4537
@@ -4531,8 +4557,7 @@ otherwise, send it to the default printer."
4531 'face 'todo-prefix-string)) 4557 'face 'todo-prefix-string))
4532 (num 0) 4558 (num 0)
4533 (fill-prefix (make-string todo-indent-to-here 32)) 4559 (fill-prefix (make-string todo-indent-to-here 32))
4534 (content (buffer-string)) 4560 (content (buffer-string)))
4535 file)
4536 (with-current-buffer (get-buffer-create buf) 4561 (with-current-buffer (get-buffer-create buf)
4537 (insert content) 4562 (insert content)
4538 (goto-char (point-min)) 4563 (goto-char (point-min))
@@ -4556,10 +4581,9 @@ otherwise, send it to the default printer."
4556 (goto-char (point-min)) 4581 (goto-char (point-min))
4557 (insert header) 4582 (insert header)
4558 (newline 2) 4583 (newline 2)
4559 (if to-file 4584 (funcall todo-print-buffer-function
4560 (let ((file (read-file-name "Print to file: "))) 4585 (if to-file nil
4561 (funcall todo-print-buffer-function file)) 4586 (read-file-name "Print to file: "))))
4562 (funcall todo-print-buffer-function)))
4563 (kill-buffer buf))) 4587 (kill-buffer buf)))
4564 4588
4565(defun todo-print-buffer-to-file () 4589(defun todo-print-buffer-to-file ()
@@ -4596,7 +4620,7 @@ Helper function for `todo-convert-legacy-files'."
4596 (time (match-string 4)) 4620 (time (match-string 4))
4597 dayname) 4621 dayname)
4598 (replace-match "") 4622 (replace-match "")
4599 (insert (mapconcat 'eval calendar-date-display-form "") 4623 (insert (mapconcat #'eval calendar-date-display-form "")
4600 (when time (concat " " time))))) 4624 (when time (concat " " time)))))
4601 4625
4602(defun todo-convert-legacy-files () 4626(defun todo-convert-legacy-files ()
@@ -4720,7 +4744,8 @@ name in `todo-directory'. See also the documentation string of
4720 (unless (save-excursion 4744 (unless (save-excursion
4721 (re-search-backward 4745 (re-search-backward
4722 (concat "^" (regexp-quote todo-category-beg) 4746 (concat "^" (regexp-quote todo-category-beg)
4723 "\\(.*\\)$") nil t) 4747 "\\(.*\\)$")
4748 nil t)
4724 (string= (match-string 1) cat)) 4749 (string= (match-string 1) cat))
4725 ;; Else move it to its category. 4750 ;; Else move it to its category.
4726 (setq item (buffer-substring-no-properties beg end)) 4751 (setq item (buffer-substring-no-properties beg end))
@@ -4734,7 +4759,8 @@ name in `todo-directory'. See also the documentation string of
4734 (forward-line) 4759 (forward-line)
4735 (if (re-search-forward 4760 (if (re-search-forward
4736 (concat "^" (regexp-quote todo-category-beg) 4761 (concat "^" (regexp-quote todo-category-beg)
4737 "\\(.*\\)$") nil t) 4762 "\\(.*\\)$")
4763 nil t)
4738 (progn (goto-char (match-beginning 0)) 4764 (progn (goto-char (match-beginning 0))
4739 (newline) 4765 (newline)
4740 (forward-line -1)) 4766 (forward-line -1))
@@ -4828,10 +4854,7 @@ buffer, clean up the state and return nil."
4828 (setq todo-files (funcall todo-files-function)) 4854 (setq todo-files (funcall todo-files-function))
4829 (setq todo-archives (funcall todo-files-function t)) 4855 (setq todo-archives (funcall todo-files-function t))
4830 t) 4856 t)
4831 (let* ((files (append todo-files todo-archives)) 4857 (let* ((files (append todo-files todo-archives)))
4832 (tctf todo-current-todo-file)
4833 (tgctf todo-global-current-todo-file)
4834 (tdtf (todo-absolute-file-name todo-default-todo-file)))
4835 (unless (or (not todo-current-todo-file) 4858 (unless (or (not todo-current-todo-file)
4836 (member todo-current-todo-file files)) 4859 (member todo-current-todo-file files))
4837 (setq todo-current-todo-file nil)) 4860 (setq todo-current-todo-file nil))
@@ -4850,7 +4873,7 @@ buffer, clean up the state and return nil."
4850 "Return the number of category CAT in this todo file. 4873 "Return the number of category CAT in this todo file.
4851The buffer-local variable `todo-category-number' holds this 4874The buffer-local variable `todo-category-number' holds this
4852number as its value." 4875number as its value."
4853 (let ((categories (mapcar 'car todo-categories))) 4876 (let ((categories (mapcar #'car todo-categories)))
4854 (setq todo-category-number 4877 (setq todo-category-number
4855 ;; Increment by one, so that the number of the first 4878 ;; Increment by one, so that the number of the first
4856 ;; category is one rather than zero. 4879 ;; category is one rather than zero.
@@ -4880,7 +4903,8 @@ number as its value."
4880 (todo-prefix-overlays) 4903 (todo-prefix-overlays)
4881 (goto-char (point-min)) 4904 (goto-char (point-min))
4882 (if (re-search-forward (concat "\n\\(" (regexp-quote todo-category-done) 4905 (if (re-search-forward (concat "\n\\(" (regexp-quote todo-category-done)
4883 "\\)") nil t) 4906 "\\)")
4907 nil t)
4884 (progn 4908 (progn
4885 (setq done-start (match-beginning 0)) 4909 (setq done-start (match-beginning 0))
4886 (setq done-sep-start (match-beginning 1)) 4910 (setq done-sep-start (match-beginning 1))
@@ -5264,7 +5288,8 @@ Overrides `diary-goto-entry'."
5264 (when (eq major-mode 'todo-mode) 5288 (when (eq major-mode 'todo-mode)
5265 (let ((opoint (point))) 5289 (let ((opoint (point)))
5266 (re-search-backward (concat "^" (regexp-quote todo-category-beg) 5290 (re-search-backward (concat "^" (regexp-quote todo-category-beg)
5267 "\\(.*\\)\n") nil t) 5291 "\\(.*\\)\n")
5292 nil t)
5268 (todo-category-number (match-string 1)) 5293 (todo-category-number (match-string 1))
5269 (todo-category-select) 5294 (todo-category-select)
5270 (goto-char opoint)))))) 5295 (goto-char opoint))))))
@@ -5647,8 +5672,7 @@ already entered and those still available."
5647(defvar todo-edit-item--prompt "Press a key (so far `e'): ") 5672(defvar todo-edit-item--prompt "Press a key (so far `e'): ")
5648 5673
5649(defun todo-edit-item--next-key (params &optional arg) 5674(defun todo-edit-item--next-key (params &optional arg)
5650 (let* ((map (make-sparse-keymap)) 5675 (let* ((p->k (mapconcat (lambda (elt)
5651 (p->k (mapconcat (lambda (elt)
5652 (format "%s=>%s" 5676 (format "%s=>%s"
5653 (propertize (cdr elt) 'face 5677 (propertize (cdr elt) 'face
5654 'todo-key-prompt) 5678 'todo-key-prompt)
@@ -5736,14 +5760,14 @@ have been removed."
5736 todo-global-current-todo-file) 5760 todo-global-current-todo-file)
5737 (todo-absolute-file-name todo-default-todo-file))) 5761 (todo-absolute-file-name todo-default-todo-file)))
5738 (files (or (unless archive 5762 (files (or (unless archive
5739 (mapcar 'todo-absolute-file-name 5763 (mapcar #'todo-absolute-file-name
5740 todo-category-completions-files)) 5764 todo-category-completions-files))
5741 (list curfile))) 5765 (list curfile)))
5742 listall listf) 5766 listall listf)
5743 ;; If file was just added, it has no category completions. 5767 ;; If file was just added, it has no category completions.
5744 (unless (zerop (buffer-size (find-buffer-visiting curfile))) 5768 (unless (zerop (buffer-size (find-buffer-visiting curfile)))
5745 (unless (member curfile todo-archives) 5769 (unless (member curfile todo-archives)
5746 (add-to-list 'files curfile)) 5770 (cl-pushnew curfile files :test #'equal))
5747 (dolist (f files listall) 5771 (dolist (f files listall)
5748 (with-current-buffer (find-file-noselect f 'nowarn) 5772 (with-current-buffer (find-file-noselect f 'nowarn)
5749 (if archive 5773 (if archive
@@ -5783,7 +5807,7 @@ return the absolute truename of a todo archive file. With non-nil
5783MUSTMATCH the name of an existing file must be chosen; 5807MUSTMATCH the name of an existing file must be chosen;
5784otherwise, a new file name is allowed." 5808otherwise, a new file name is allowed."
5785 (let* ((completion-ignore-case todo-completion-ignore-case) 5809 (let* ((completion-ignore-case todo-completion-ignore-case)
5786 (files (mapcar 'todo-short-file-name 5810 (files (mapcar #'todo-short-file-name
5787 ;; (funcall todo-files-function archive))) 5811 ;; (funcall todo-files-function archive)))
5788 (if archive todo-archives todo-files))) 5812 (if archive todo-archives todo-files)))
5789 (file (completing-read prompt files nil mustmatch nil nil 5813 (file (completing-read prompt files nil mustmatch nil nil
@@ -5832,7 +5856,8 @@ categories from `todo-category-completions-files'."
5832 (todo-read-file-name (concat "Choose a" (if archive 5856 (todo-read-file-name (concat "Choose a" (if archive
5833 "n archive" 5857 "n archive"
5834 " todo") 5858 " todo")
5835 " file: ") archive t))) 5859 " file: ")
5860 archive t)))
5836 (completions (unless file0 (todo-category-completions archive))) 5861 (completions (unless file0 (todo-category-completions archive)))
5837 (categories (cond (file0 5862 (categories (cond (file0
5838 (with-current-buffer 5863 (with-current-buffer
@@ -5873,7 +5898,7 @@ categories from `todo-category-completions-files'."
5873 (if (atom catfil) 5898 (if (atom catfil)
5874 catfil 5899 catfil
5875 (todo-absolute-file-name 5900 (todo-absolute-file-name
5876 (let ((files (mapcar 'todo-short-file-name catfil))) 5901 (let ((files (mapcar #'todo-short-file-name catfil)))
5877 (completing-read (format str cat) files))))))) 5902 (completing-read (format str cat) files)))))))
5878 ;; Default to the current file. 5903 ;; Default to the current file.
5879 (unless file0 (setq file0 todo-current-todo-file)) 5904 (unless file0 (setq file0 todo-current-todo-file))
@@ -5907,7 +5932,7 @@ categories from `todo-category-completions-files'."
5907 "Prompt for new NAME for TYPE until it is valid, then return it. 5932 "Prompt for new NAME for TYPE until it is valid, then return it.
5908TYPE can be either of the symbols `file' or `category'." 5933TYPE can be either of the symbols `file' or `category'."
5909 (let ((categories todo-categories) 5934 (let ((categories todo-categories)
5910 (files (mapcar 'todo-short-file-name todo-files)) 5935 (files (mapcar #'todo-short-file-name todo-files))
5911 prompt) 5936 prompt)
5912 (while 5937 (while
5913 (and 5938 (and
@@ -5981,8 +6006,8 @@ number of the last the day of the month."
5981 (setq monthname (completing-read 6006 (setq monthname (completing-read
5982 "Month name (RET for current month, * for any month): " 6007 "Month name (RET for current month, * for any month): "
5983 mlist nil t nil nil 6008 mlist nil t nil nil
5984 (calendar-month-name (calendar-extract-month 6009 (calendar-month-name
5985 (calendar-current-date)) t)) 6010 (calendar-extract-month (calendar-current-date)) t))
5986 month (1+ (- (length mlist) 6011 month (1+ (- (length mlist)
5987 (length (or (member monthname mlist) 6012 (length (or (member monthname mlist)
5988 (member monthname mablist)))))) 6013 (member monthname mablist))))))
@@ -6023,7 +6048,7 @@ number of the last the day of the month."
6023 (if (memq 'month calendar-date-display-form) 6048 (if (memq 'month calendar-date-display-form)
6024 month 6049 month
6025 monthname))) 6050 monthname)))
6026 (mapconcat 'eval calendar-date-display-form "")))) 6051 (mapconcat #'eval calendar-date-display-form ""))))
6027 6052
6028(defun todo-read-dayname () 6053(defun todo-read-dayname ()
6029 "Choose name of a day of the week with completion and return it." 6054 "Choose name of a day of the week with completion and return it."
@@ -6088,8 +6113,8 @@ the empty string (i.e., no time string)."
6088 "The :set function for user option `todo-show-current-file'." 6113 "The :set function for user option `todo-show-current-file'."
6089 (custom-set-default symbol value) 6114 (custom-set-default symbol value)
6090 (if value 6115 (if value
6091 (add-hook 'pre-command-hook 'todo-show-current-file nil t) 6116 (add-hook 'pre-command-hook #'todo-show-current-file nil t)
6092 (remove-hook 'pre-command-hook 'todo-show-current-file t))) 6117 (remove-hook 'pre-command-hook #'todo-show-current-file t)))
6093 6118
6094(defun todo-reset-prefix (symbol value) 6119(defun todo-reset-prefix (symbol value)
6095 "The :set function for `todo-prefix' and `todo-number-prefix'." 6120 "The :set function for `todo-prefix' and `todo-number-prefix'."
@@ -6228,6 +6253,8 @@ the empty string (i.e., no time string)."
6228 6253
6229(defun todo-reevaluate-filelist-defcustoms () 6254(defun todo-reevaluate-filelist-defcustoms ()
6230 "Reevaluate defcustoms that provide choice list of todo files." 6255 "Reevaluate defcustoms that provide choice list of todo files."
6256 ;; FIXME: This is hideous! I don't know enough about Custom to
6257 ;; offer something better, but please ask on emacs-devel!
6231 (custom-set-default 'todo-default-todo-file 6258 (custom-set-default 'todo-default-todo-file
6232 (symbol-value 'todo-default-todo-file)) 6259 (symbol-value 'todo-default-todo-file))
6233 (todo-reevaluate-default-file-defcustom) 6260 (todo-reevaluate-default-file-defcustom)
@@ -6242,15 +6269,15 @@ the empty string (i.e., no time string)."
6242Called after adding or deleting a todo file. If the value of 6269Called after adding or deleting a todo file. If the value of
6243`todo-default-todo-file' before calling this function was 6270`todo-default-todo-file' before calling this function was
6244associated with an existing file, keep that value." 6271associated with an existing file, keep that value."
6272 ;; FIXME: This is hideous! I don't know enough about Custom to
6273 ;; offer something better, but please ask on emacs-devel!
6245 ;; (let ((curval todo-default-todo-file)) 6274 ;; (let ((curval todo-default-todo-file))
6246 (eval 6275 (eval
6247 (defcustom todo-default-todo-file (todo-short-file-name 6276 (defcustom todo-default-todo-file (todo-short-file-name
6248 (car (funcall todo-files-function))) 6277 (car (funcall todo-files-function)))
6249 "Todo file visited by first session invocation of `todo-show'." 6278 "Todo file visited by first session invocation of `todo-show'."
6250 :type (when todo-files 6279 :type (when todo-files
6251 `(radio ,@(mapcar (lambda (f) (list 'const f)) 6280 `(radio ,@(todo--files-type-list)))
6252 (mapcar 'todo-short-file-name
6253 (funcall todo-files-function)))))
6254 :group 'todo)) 6281 :group 'todo))
6255 ;; (when (and curval (file-exists-p (todo-absolute-file-name curval))) 6282 ;; (when (and curval (file-exists-p (todo-absolute-file-name curval)))
6256 ;; (custom-set-default 'todo-default-todo-file curval) 6283 ;; (custom-set-default 'todo-default-todo-file curval)
@@ -6261,21 +6288,21 @@ associated with an existing file, keep that value."
6261(defun todo-reevaluate-category-completions-files-defcustom () 6288(defun todo-reevaluate-category-completions-files-defcustom ()
6262 "Reevaluate defcustom of `todo-category-completions-files'. 6289 "Reevaluate defcustom of `todo-category-completions-files'.
6263Called after adding or deleting a todo file." 6290Called after adding or deleting a todo file."
6291 ;; FIXME: This is hideous! I don't know enough about Custom to
6292 ;; offer something better, but please ask on emacs-devel!
6264 (eval (defcustom todo-category-completions-files nil 6293 (eval (defcustom todo-category-completions-files nil
6265 "List of files for building `todo-read-category' completions." 6294 "List of files for building `todo-read-category' completions."
6266 :type `(set ,@(mapcar (lambda (f) (list 'const f)) 6295 :type `(set ,@(todo--files-type-list))
6267 (mapcar 'todo-short-file-name
6268 (funcall todo-files-function))))
6269 :group 'todo))) 6296 :group 'todo)))
6270 6297
6271(defun todo-reevaluate-filter-files-defcustom () 6298(defun todo-reevaluate-filter-files-defcustom ()
6272 "Reevaluate defcustom of `todo-filter-files'. 6299 "Reevaluate defcustom of `todo-filter-files'.
6273Called after adding or deleting a todo file." 6300Called after adding or deleting a todo file."
6301 ;; FIXME: This is hideous! I don't know enough about Custom to
6302 ;; offer something better, but please ask on emacs-devel!
6274 (eval (defcustom todo-filter-files nil 6303 (eval (defcustom todo-filter-files nil
6275 "List of files for multifile item filtering." 6304 "List of files for multifile item filtering."
6276 :type `(set ,@(mapcar (lambda (f) (list 'const f)) 6305 :type `(set ,@(todo--files-type-list))
6277 (mapcar 'todo-short-file-name
6278 (funcall todo-files-function))))
6279 :group 'todo))) 6306 :group 'todo)))
6280 6307
6281;; ----------------------------------------------------------------------------- 6308;; -----------------------------------------------------------------------------
@@ -6292,7 +6319,8 @@ Called after adding or deleting a todo file."
6292(defun todo-diary-nonmarking-matcher (lim) 6319(defun todo-diary-nonmarking-matcher (lim)
6293 "Search for diary nonmarking symbol within LIM for font-locking." 6320 "Search for diary nonmarking symbol within LIM for font-locking."
6294 (re-search-forward (concat "^\\(?1:" (regexp-quote diary-nonmarking-symbol) 6321 (re-search-forward (concat "^\\(?1:" (regexp-quote diary-nonmarking-symbol)
6295 "\\)" todo-date-pattern) lim t)) 6322 "\\)" todo-date-pattern)
6323 lim t))
6296 6324
6297(defun todo-date-string-matcher (lim) 6325(defun todo-date-string-matcher (lim)
6298 "Search for todo item date string within LIM for font-locking." 6326 "Search for todo item date string within LIM for font-locking."
@@ -6302,14 +6330,16 @@ Called after adding or deleting a todo file."
6302(defun todo-time-string-matcher (lim) 6330(defun todo-time-string-matcher (lim)
6303 "Search for todo item time string within LIM for font-locking." 6331 "Search for todo item time string within LIM for font-locking."
6304 (re-search-forward (concat todo-date-string-start todo-date-pattern 6332 (re-search-forward (concat todo-date-string-start todo-date-pattern
6305 " \\(?1:" diary-time-regexp "\\)") lim t)) 6333 " \\(?1:" diary-time-regexp "\\)")
6334 lim t))
6306 6335
6307(defun todo-diary-expired-matcher (lim) 6336(defun todo-diary-expired-matcher (lim)
6308 "Search for expired diary item date within LIM for font-locking." 6337 "Search for expired diary item date within LIM for font-locking."
6309 (when (re-search-forward (concat "^\\(?:" 6338 (when (re-search-forward (concat "^\\(?:"
6310 (regexp-quote diary-nonmarking-symbol) 6339 (regexp-quote diary-nonmarking-symbol)
6311 "\\)?\\(?1:" todo-date-pattern "\\) \\(?2:" 6340 "\\)?\\(?1:" todo-date-pattern "\\) \\(?2:"
6312 diary-time-regexp "\\)?") lim t) 6341 diary-time-regexp "\\)?")
6342 lim t)
6313 (let* ((date (match-string-no-properties 1)) 6343 (let* ((date (match-string-no-properties 1))
6314 (time (match-string-no-properties 2)) 6344 (time (match-string-no-properties 2))
6315 ;; Function days-between requires a non-empty time string. 6345 ;; Function days-between requires a non-empty time string.
@@ -6464,8 +6494,6 @@ Filtered Items mode following todo (not done) items."
6464 6494
6465(defvar todo-mode-map 6495(defvar todo-mode-map
6466 (let ((map (make-keymap))) 6496 (let ((map (make-keymap)))
6467 ;; Don't suppress digit keys, so they can supply prefix arguments.
6468 (suppress-keymap map)
6469 (dolist (kb todo-key-bindings-t) 6497 (dolist (kb todo-key-bindings-t)
6470 (define-key map (nth 0 kb) (nth 1 kb))) 6498 (define-key map (nth 0 kb) (nth 1 kb)))
6471 (dolist (kb todo-key-bindings-t+a+f) 6499 (dolist (kb todo-key-bindings-t+a+f)
@@ -6479,7 +6507,6 @@ Filtered Items mode following todo (not done) items."
6479 6507
6480(defvar todo-archive-mode-map 6508(defvar todo-archive-mode-map
6481 (let ((map (make-sparse-keymap))) 6509 (let ((map (make-sparse-keymap)))
6482 (suppress-keymap map)
6483 (dolist (kb todo-key-bindings-t+a+f) 6510 (dolist (kb todo-key-bindings-t+a+f)
6484 (define-key map (nth 0 kb) (nth 1 kb))) 6511 (define-key map (nth 0 kb) (nth 1 kb)))
6485 (dolist (kb todo-key-bindings-t+a) 6512 (dolist (kb todo-key-bindings-t+a)
@@ -6498,7 +6525,6 @@ Filtered Items mode following todo (not done) items."
6498 6525
6499(defvar todo-categories-mode-map 6526(defvar todo-categories-mode-map
6500 (let ((map (make-sparse-keymap))) 6527 (let ((map (make-sparse-keymap)))
6501 (suppress-keymap map)
6502 (define-key map "c" 'todo-sort-categories-alphabetically-or-numerically) 6528 (define-key map "c" 'todo-sort-categories-alphabetically-or-numerically)
6503 (define-key map "t" 'todo-sort-categories-by-todo) 6529 (define-key map "t" 'todo-sort-categories-by-todo)
6504 (define-key map "y" 'todo-sort-categories-by-diary) 6530 (define-key map "y" 'todo-sort-categories-by-diary)
@@ -6517,7 +6543,6 @@ Filtered Items mode following todo (not done) items."
6517 6543
6518(defvar todo-filtered-items-mode-map 6544(defvar todo-filtered-items-mode-map
6519 (let ((map (make-sparse-keymap))) 6545 (let ((map (make-sparse-keymap)))
6520 (suppress-keymap map)
6521 (dolist (kb todo-key-bindings-t+a+f) 6546 (dolist (kb todo-key-bindings-t+a+f)
6522 (define-key map (nth 0 kb) (nth 1 kb))) 6547 (define-key map (nth 0 kb) (nth 1 kb)))
6523 (dolist (kb todo-key-bindings-t+f) 6548 (dolist (kb todo-key-bindings-t+f)
@@ -6651,9 +6676,9 @@ Added to `window-configuration-change-hook' in Todo mode."
6651(defun todo-modes-set-1 () 6676(defun todo-modes-set-1 ()
6652 "Make some settings that apply to multiple Todo modes." 6677 "Make some settings that apply to multiple Todo modes."
6653 (setq-local font-lock-defaults '(todo-font-lock-keywords t)) 6678 (setq-local font-lock-defaults '(todo-font-lock-keywords t))
6654 (setq-local revert-buffer-function 'todo-revert-buffer) 6679 (setq-local revert-buffer-function #'todo-revert-buffer)
6655 (setq-local tab-width todo-indent-to-here) 6680 (setq-local tab-width todo-indent-to-here)
6656 (setq-local indent-line-function 'todo-indent) 6681 (setq-local indent-line-function #'todo-indent)
6657 (when todo-wrap-lines 6682 (when todo-wrap-lines
6658 (visual-line-mode) 6683 (visual-line-mode)
6659 (setq wrap-prefix (make-string todo-indent-to-here 32)))) 6684 (setq wrap-prefix (make-string todo-indent-to-here 32))))
@@ -6671,13 +6696,13 @@ Added to `window-configuration-change-hook' in Todo mode."
6671 (setq buffer-read-only t) 6696 (setq buffer-read-only t)
6672 (setq-local todo--item-headers-hidden nil) 6697 (setq-local todo--item-headers-hidden nil)
6673 (setq-local desktop-save-buffer 'todo-desktop-save-buffer) 6698 (setq-local desktop-save-buffer 'todo-desktop-save-buffer)
6674 (setq-local hl-line-range-function 'todo-hl-line-range)) 6699 (setq-local hl-line-range-function #'todo-hl-line-range))
6675 6700
6676(defun todo-modes-set-3 () 6701(defun todo-modes-set-3 ()
6677 "Make some settings that apply to multiple Todo modes." 6702 "Make some settings that apply to multiple Todo modes."
6678 (setq-local todo-categories (todo-set-categories)) 6703 (setq-local todo-categories (todo-set-categories))
6679 (setq-local todo-category-number 1) 6704 (setq-local todo-category-number 1)
6680 ;; (add-hook 'find-file-hook 'todo-display-as-todo-file nil t) 6705 ;; (add-hook 'find-file-hook #'todo-display-as-todo-file nil t)
6681 ) 6706 )
6682 6707
6683(put 'todo-mode 'mode-class 'special) 6708(put 'todo-mode 'mode-class 'special)
@@ -6700,13 +6725,13 @@ Added to `window-configuration-change-hook' in Todo mode."
6700 (setq-local todo-current-todo-file (file-truename (buffer-file-name)))) 6725 (setq-local todo-current-todo-file (file-truename (buffer-file-name))))
6701 (setq-local todo-show-done-only nil) 6726 (setq-local todo-show-done-only nil)
6702 (setq-local todo-categories-with-marks nil) 6727 (setq-local todo-categories-with-marks nil)
6703 ;; (add-hook 'find-file-hook 'todo-add-to-buffer-list nil t) 6728 ;; (add-hook 'find-file-hook #'todo-add-to-buffer-list nil t)
6704 (add-hook 'post-command-hook 'todo-update-buffer-list nil t) 6729 (add-hook 'post-command-hook #'todo-update-buffer-list nil t)
6705 (when todo-show-current-file 6730 (when todo-show-current-file
6706 (add-hook 'pre-command-hook 'todo-show-current-file nil t)) 6731 (add-hook 'pre-command-hook #'todo-show-current-file nil t))
6707 (add-hook 'window-configuration-change-hook 6732 (add-hook 'window-configuration-change-hook
6708 'todo-reset-and-enable-done-separator nil t) 6733 #'todo-reset-and-enable-done-separator nil t)
6709 (add-hook 'kill-buffer-hook 'todo-reset-global-current-todo-file nil t))) 6734 (add-hook 'kill-buffer-hook #'todo-reset-global-current-todo-file nil t)))
6710 6735
6711(put 'todo-archive-mode 'mode-class 'special) 6736(put 'todo-archive-mode 'mode-class 'special)
6712 6737
diff --git a/lisp/cus-start.el b/lisp/cus-start.el
index 744fe7f69ee..c28b8a147fc 100644
--- a/lisp/cus-start.el
+++ b/lisp/cus-start.el
@@ -584,6 +584,38 @@ since it could result in memory overflow and make Emacs crash."
584 (const :tag "Grow only" :value grow-only)) 584 (const :tag "Grow only" :value grow-only))
585 "25.1") 585 "25.1")
586 (display-raw-bytes-as-hex display boolean "26.1") 586 (display-raw-bytes-as-hex display boolean "26.1")
587 (display-line-numbers display-line-numbers
588 (choice
589 (const :tag "Off (nil)" :value nil)
590 (const :tag "Absolute line numbers"
591 :value t)
592 (const :tag "Relative line numbers"
593 :value relative)
594 (const :tag "Visually relative line numbers"
595 :value visual))
596 "26.1")
597 (display-line-numbers-width display-line-numbers
598 (choice
599 (const :tag "Dynamically computed"
600 :value nil)
601 (integer :menu-tag "Fixed number of columns"
602 :value 2
603 :format "%v"))
604 "26.1")
605 (display-line-numbers-current-absolute display-line-numbers
606 (choice
607 (const :tag "Display actual number of current line"
608 :value t)
609 (const :tag "Display zero as number of current line"
610 :value nil))
611 "26.1")
612 (display-line-numbers-widen display-line-numbers
613 (choice
614 (const :tag "Disregard narrowing when calculating line numbers"
615 :value t)
616 (const :tag "Count lines from beginning of narrowed region"
617 :value nil))
618 "26.1")
587 ;; xfaces.c 619 ;; xfaces.c
588 (scalable-fonts-allowed display boolean "22.1") 620 (scalable-fonts-allowed display boolean "22.1")
589 ;; xfns.c 621 ;; xfns.c
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 095ce8ba89c..17dae6085df 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -1623,10 +1623,14 @@ Special value `always' suppresses confirmation."
1623 (setq default-directory to 1623 (setq default-directory to
1624 dired-directory (expand-file-name;; this is correct 1624 dired-directory (expand-file-name;; this is correct
1625 ;; with and without wildcards 1625 ;; with and without wildcards
1626 (file-name-nondirectory dired-directory) 1626 (file-name-nondirectory (if (stringp dired-directory)
1627 dired-directory
1628 (car dired-directory)))
1627 to)) 1629 to))
1628 (let ((new-name (file-name-nondirectory 1630 (let ((new-name (file-name-nondirectory
1629 (directory-file-name dired-directory)))) 1631 (directory-file-name (if (stringp dired-directory)
1632 dired-directory
1633 (car dired-directory))))))
1630 ;; try to rename buffer, but just leave old name if new 1634 ;; try to rename buffer, but just leave old name if new
1631 ;; name would already exist (don't try appending "<%d>") 1635 ;; name would already exist (don't try appending "<%d>")
1632 (or (get-buffer new-name) 1636 (or (get-buffer new-name)
diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index 7ceb672bf2f..915550991d0 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -546,7 +546,9 @@ Should never be used as marker by the user or other packages.")
546 (interactive) 546 (interactive)
547 (let ((dired-omit-mode nil)) (revert-buffer)) ;; Show omitted files 547 (let ((dired-omit-mode nil)) (revert-buffer)) ;; Show omitted files
548 (dired-mark-unmarked-files (dired-omit-regexp) nil nil dired-omit-localp 548 (dired-mark-unmarked-files (dired-omit-regexp) nil nil dired-omit-localp
549 (dired-omit-case-fold-p dired-directory))) 549 (dired-omit-case-fold-p (if (stringp dired-directory)
550 dired-directory
551 (car dired-directory)))))
550 552
551(defcustom dired-omit-extensions 553(defcustom dired-omit-extensions
552 (append completion-ignored-extensions 554 (append completion-ignored-extensions
@@ -591,7 +593,9 @@ This functions works by temporarily binding `dired-marker-char' to
591 (let ((dired-marker-char dired-omit-marker-char)) 593 (let ((dired-marker-char dired-omit-marker-char))
592 (when dired-omit-verbose (message "Omitting...")) 594 (when dired-omit-verbose (message "Omitting..."))
593 (if (dired-mark-unmarked-files omit-re nil nil dired-omit-localp 595 (if (dired-mark-unmarked-files omit-re nil nil dired-omit-localp
594 (dired-omit-case-fold-p dired-directory)) 596 (dired-omit-case-fold-p (if (stringp dired-directory)
597 dired-directory
598 (car dired-directory))))
595 (progn 599 (progn
596 (setq count (dired-do-kill-lines 600 (setq count (dired-do-kill-lines
597 nil 601 nil
diff --git a/lisp/dired.el b/lisp/dired.el
index 0c1f3e4af64..9d500a9f52d 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -785,7 +785,7 @@ Type \\[describe-mode] after entering Dired for more info.
785If DIRNAME is already in a Dired buffer, that buffer is used without refresh." 785If DIRNAME is already in a Dired buffer, that buffer is used without refresh."
786 ;; Cannot use (interactive "D") because of wildcards. 786 ;; Cannot use (interactive "D") because of wildcards.
787 (interactive (dired-read-dir-and-switches "")) 787 (interactive (dired-read-dir-and-switches ""))
788 (switch-to-buffer (dired-noselect dirname switches))) 788 (pop-to-buffer-same-window (dired-noselect dirname switches)))
789 789
790;;;###autoload (define-key ctl-x-4-map "d" 'dired-other-window) 790;;;###autoload (define-key ctl-x-4-map "d" 'dired-other-window)
791;;;###autoload 791;;;###autoload
@@ -872,13 +872,15 @@ periodically reverts at specified time intervals."
872 :version "23.2") 872 :version "23.2")
873 873
874(defun dired-internal-noselect (dir-or-list &optional switches mode) 874(defun dired-internal-noselect (dir-or-list &optional switches mode)
875 ;; If there is an existing dired buffer for DIRNAME, just leave 875 ;; If DIR-OR-LIST is a string and there is an existing dired buffer
876 ;; buffer as it is (don't even call dired-revert). 876 ;; for it, just leave buffer as it is (don't even call dired-revert).
877 ;; This saves time especially for deep trees or with ange-ftp. 877 ;; This saves time especially for deep trees or with ange-ftp.
878 ;; The user can type `g' easily, and it is more consistent with find-file. 878 ;; The user can type `g' easily, and it is more consistent with find-file.
879 ;; But if SWITCHES are given they are probably different from the 879 ;; But if SWITCHES are given they are probably different from the
880 ;; buffer's old value, so call dired-sort-other, which does 880 ;; buffer's old value, so call dired-sort-other, which does
881 ;; revert the buffer. 881 ;; revert the buffer.
882 ;; Revert the buffer if DIR-OR-LIST is a cons or `dired-directory'
883 ;; is a cons and DIR-OR-LIST is a string.
882 ;; A pity we can't possibly do "Directory has changed - refresh? " 884 ;; A pity we can't possibly do "Directory has changed - refresh? "
883 ;; like find-file does. 885 ;; like find-file does.
884 ;; Optional argument MODE is passed to dired-find-buffer-nocreate, 886 ;; Optional argument MODE is passed to dired-find-buffer-nocreate,
@@ -898,6 +900,11 @@ periodically reverts at specified time intervals."
898 (setq dired-directory dir-or-list) 900 (setq dired-directory dir-or-list)
899 ;; this calls dired-revert 901 ;; this calls dired-revert
900 (dired-sort-other switches)) 902 (dired-sort-other switches))
903 ;; Always revert when `dir-or-list' is a cons. Also revert
904 ;; if `dired-directory' is a cons but `dir-or-list' is not.
905 ((or (consp dir-or-list) (consp dired-directory))
906 (setq dired-directory dir-or-list)
907 (revert-buffer))
901 ;; Always revert regardless of whether it has changed or not. 908 ;; Always revert regardless of whether it has changed or not.
902 ((eq dired-auto-revert-buffer t) 909 ((eq dired-auto-revert-buffer t)
903 (revert-buffer)) 910 (revert-buffer))
diff --git a/lisp/display-line-numbers.el b/lisp/display-line-numbers.el
new file mode 100644
index 00000000000..a99474547bf
--- /dev/null
+++ b/lisp/display-line-numbers.el
@@ -0,0 +1,106 @@
1;;; display-line-numbers.el --- interface for display-line-numbers -*- lexical-binding: t -*-
2
3;; Copyright (C) 2017 Free Software Foundation, Inc.
4
5;; Maintainer: emacs-devel@gnu.org
6;; Keywords: convenience
7
8;; This file is part of GNU Emacs.
9
10;; GNU Emacs is free software: you can redistribute it and/or modify
11;; it under the terms of the GNU General Public License as published by
12;; the Free Software Foundation, either version 3 of the License, or
13;; (at your option) any later version.
14
15;; GNU Emacs is distributed in the hope that it will be useful,
16;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18;; GNU General Public License for more details.
19
20;; You should have received a copy of the GNU General Public License
21;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
22
23;;; Commentary:
24
25;; Provides a minor mode interface for `display-line-numbers'.
26;;
27;; Toggle display of line numbers with M-x display-line-numbers-mode.
28;; To enable line numbering in all buffers, use M-x
29;; global-display-line-numbers-mode. To change the default type of
30;; line numbers displayed, customize display-line-numbers-type.
31
32;; NOTE: Customization variables for `display-line-numbers' itself are
33;; defined in cus-start.el.
34
35;;; Code:
36
37(defgroup display-line-numbers nil
38 "Display line numbers in the buffer."
39 :group 'display)
40
41;;;###autoload
42(defcustom display-line-numbers-type t
43 "The default type of line numbers to use in `display-line-numbers-mode'.
44See `display-line-numbers' for value options."
45 :group 'display-line-numbers
46 :type '(choice (const :tag "Relative line numbers" relative)
47 (const :tag "Relative visual line numbers" visual)
48 (other :tag "Absolute line numbers" t))
49 :version "26.1")
50
51(defcustom display-line-numbers-grow-only nil
52 "If non-nil, do not shrink line number width."
53 :group 'display-line-numbers
54 :type 'boolean
55 :version "26.1")
56
57(defcustom display-line-numbers-width-start nil
58 "If non-nil, count number of lines to use for line number width.
59When `display-line-numbers-mode' is turned on,
60`display-line-numbers-width' is set to the minimum width necessary
61to display all line numbers in the buffer."
62 :group 'display-line-numbers
63 :type 'boolean
64 :version "26.1")
65
66(defun display-line-numbers-update-width ()
67 "Prevent the line number width from shrinking."
68 (let ((width (line-number-display-width)))
69 (when (> width (or display-line-numbers-width 1))
70 (setq display-line-numbers-width width))))
71
72;;;###autoload
73(define-minor-mode display-line-numbers-mode
74 "Toggle display of line numbers in the buffer.
75This uses `display-line-numbers' internally.
76
77To change the type of line numbers displayed by default,
78customize `display-line-numbers-type'. To change the type while
79the mode is on, set `display-line-numbers' directly."
80 :lighter nil
81 (if display-line-numbers-mode
82 (progn
83 (when display-line-numbers-width-start
84 (setq display-line-numbers-width
85 (length (number-to-string
86 (count-lines (point-min) (point-max))))))
87 (when display-line-numbers-grow-only
88 (add-hook 'pre-command-hook #'display-line-numbers-update-width nil t))
89 (setq display-line-numbers display-line-numbers-type))
90 (remove-hook 'pre-command-hook #'display-line-numbers-update-width t)
91 (setq display-line-numbers nil)))
92
93(defun display-line-numbers--turn-on ()
94 "Turn on `display-line-numbers-mode'."
95 (unless (or (minibufferp)
96 ;; taken from linum.el
97 (and (daemonp) (null (frame-parameter nil 'client))))
98 (display-line-numbers-mode)))
99
100;;;###autoload
101(define-globalized-minor-mode global-display-line-numbers-mode
102 display-line-numbers-mode display-line-numbers--turn-on)
103
104(provide 'display-line-numbers)
105
106;;; display-line-numbers.el ends here
diff --git a/lisp/electric.el b/lisp/electric.el
index 4c1d9039d9a..a71e79ff78a 100644
--- a/lisp/electric.el
+++ b/lisp/electric.el
@@ -469,56 +469,50 @@ This requotes when a quoting key is typed."
469 (and (not electric-quote-context-sensitive) 469 (and (not electric-quote-context-sensitive)
470 (eq last-command-event ?\`))) 470 (eq last-command-event ?\`)))
471 (not (run-hook-with-args-until-success 471 (not (run-hook-with-args-until-success
472 'electric-quote-inhibit-functions))) 472 'electric-quote-inhibit-functions))
473 (let ((start 473 (if (derived-mode-p 'text-mode)
474 (if (and comment-start comment-use-syntax) 474 electric-quote-paragraph
475 (when (or electric-quote-comment electric-quote-string) 475 (and comment-start comment-use-syntax
476 (let* ((syntax (syntax-ppss)) 476 (or electric-quote-comment electric-quote-string)
477 (beg (nth 8 syntax))) 477 (let* ((syntax (syntax-ppss))
478 (and beg 478 (beg (nth 8 syntax)))
479 (or (and electric-quote-comment (nth 4 syntax)) 479 (and beg
480 (and electric-quote-string (nth 3 syntax))) 480 (or (and electric-quote-comment (nth 4 syntax))
481 ;; Do not requote a quote that starts or ends 481 (and electric-quote-string (nth 3 syntax)))
482 ;; a comment or string. 482 ;; Do not requote a quote that starts or ends
483 (eq beg (nth 8 (save-excursion 483 ;; a comment or string.
484 (syntax-ppss (1- (point))))))))) 484 (eq beg (nth 8 (save-excursion
485 (and electric-quote-paragraph 485 (syntax-ppss (1- (point)))))))))))
486 (derived-mode-p 'text-mode) 486 (pcase electric-quote-chars
487 ;; FIXME: Why is the next form there? It’s never 487 (`(,q< ,q> ,q<< ,q>>)
488 ;; nil. 488 (save-excursion
489 (or (eq last-command-event ?\`) 489 (let ((backtick ?\`))
490 (save-excursion (backward-paragraph) (point))))))) 490 (if (or (eq last-command-event ?\`)
491 (pcase electric-quote-chars 491 (and electric-quote-context-sensitive
492 (`(,q< ,q> ,q<< ,q>>) 492 (save-excursion
493 (when start 493 (backward-char)
494 (save-excursion 494 (or (bobp) (bolp)
495 (let ((backtick ?\`)) 495 (memq (char-before) (list q< q<<))
496 (if (or (eq last-command-event ?\`) 496 (memq (char-syntax (char-before))
497 (and electric-quote-context-sensitive 497 '(?\s ?\())))
498 (save-excursion 498 (setq backtick ?\')))
499 (backward-char) 499 (cond ((search-backward (string q< backtick) (- (point) 2) t)
500 (or (bobp) (bolp) 500 (replace-match (string q<<))
501 (memq (char-before) (list q< q<<)) 501 (when (and electric-pair-mode
502 (memq (char-syntax (char-before)) 502 (eq (cdr-safe
503 '(?\s ?\()))) 503 (assq q< electric-pair-text-pairs))
504 (setq backtick ?\'))) 504 (char-after)))
505 (cond ((search-backward (string q< backtick) (- (point) 2) t) 505 (delete-char 1))
506 (replace-match (string q<<)) 506 (setq last-command-event q<<))
507 (when (and electric-pair-mode 507 ((search-backward (string backtick) (1- (point)) t)
508 (eq (cdr-safe 508 (replace-match (string q<))
509 (assq q< electric-pair-text-pairs)) 509 (setq last-command-event q<)))
510 (char-after))) 510 (cond ((search-backward (string q> ?') (- (point) 2) t)
511 (delete-char 1)) 511 (replace-match (string q>>))
512 (setq last-command-event q<<)) 512 (setq last-command-event q>>))
513 ((search-backward (string backtick) (1- (point)) t) 513 ((search-backward "'" (1- (point)) t)
514 (replace-match (string q<)) 514 (replace-match (string q>))
515 (setq last-command-event q<))) 515 (setq last-command-event q>))))))))))
516 (cond ((search-backward (string q> ?') (- (point) 2) t)
517 (replace-match (string q>>))
518 (setq last-command-event q>>))
519 ((search-backward "'" (1- (point)) t)
520 (replace-match (string q>))
521 (setq last-command-event q>))))))))))))
522 516
523(put 'electric-quote-post-self-insert-function 'priority 10) 517(put 'electric-quote-post-self-insert-function 'priority 10)
524 518
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index e5b9b47b1d0..fdd4276e4e7 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -1263,12 +1263,6 @@ when printing the error message."
1263 1263
1264(defun byte-compile-arglist-signature (arglist) 1264(defun byte-compile-arglist-signature (arglist)
1265 (cond 1265 (cond
1266 ;; New style byte-code arglist.
1267 ((integerp arglist)
1268 (cons (logand arglist 127) ;Mandatory.
1269 (if (zerop (logand arglist 128)) ;No &rest.
1270 (lsh arglist -8)))) ;Nonrest.
1271 ;; Old style byte-code, or interpreted function.
1272 ((listp arglist) 1266 ((listp arglist)
1273 (let ((args 0) 1267 (let ((args 0)
1274 opts 1268 opts
@@ -1289,6 +1283,19 @@ when printing the error message."
1289 ;; Unknown arglist. 1283 ;; Unknown arglist.
1290 (t '(0)))) 1284 (t '(0))))
1291 1285
1286(defun byte-compile--function-signature (f)
1287 ;; Similar to help-function-arglist, except that it returns the info
1288 ;; in a different format.
1289 (and (eq 'macro (car-safe f)) (setq f (cdr f)))
1290 ;; Advice wrappers have "catch all" args, so fetch the actual underlying
1291 ;; function to find the real arguments.
1292 (while (advice--p f) (setq f (advice--cdr f)))
1293 (if (eq (car-safe f) 'declared)
1294 (byte-compile-arglist-signature (nth 1 f))
1295 (condition-case nil
1296 (let ((sig (func-arity f)))
1297 (if (numberp (cdr sig)) sig (list (car sig))))
1298 (error '(0)))))
1292 1299
1293(defun byte-compile-arglist-signatures-congruent-p (old new) 1300(defun byte-compile-arglist-signatures-congruent-p (old new)
1294 (not (or 1301 (not (or
@@ -1330,19 +1337,7 @@ when printing the error message."
1330(defun byte-compile-callargs-warn (form) 1337(defun byte-compile-callargs-warn (form)
1331 (let* ((def (or (byte-compile-fdefinition (car form) nil) 1338 (let* ((def (or (byte-compile-fdefinition (car form) nil)
1332 (byte-compile-fdefinition (car form) t))) 1339 (byte-compile-fdefinition (car form) t)))
1333 (sig (if (and def (not (eq def t))) 1340 (sig (byte-compile--function-signature def))
1334 (progn
1335 (and (eq (car-safe def) 'macro)
1336 (eq (car-safe (cdr-safe def)) 'lambda)
1337 (setq def (cdr def)))
1338 (byte-compile-arglist-signature
1339 (if (memq (car-safe def) '(declared lambda))
1340 (nth 1 def)
1341 (if (byte-code-function-p def)
1342 (aref def 0)
1343 '(&rest def)))))
1344 (if (subrp (symbol-function (car form)))
1345 (subr-arity (symbol-function (car form))))))
1346 (ncall (length (cdr form)))) 1341 (ncall (length (cdr form))))
1347 ;; Check many or unevalled from subr-arity. 1342 ;; Check many or unevalled from subr-arity.
1348 (if (and (cdr-safe sig) 1343 (if (and (cdr-safe sig)
@@ -1461,15 +1456,7 @@ extra args."
1461 (and initial (symbolp initial) 1456 (and initial (symbolp initial)
1462 (setq old (byte-compile-fdefinition initial nil))) 1457 (setq old (byte-compile-fdefinition initial nil)))
1463 (when (and old (not (eq old t))) 1458 (when (and old (not (eq old t)))
1464 (and (eq 'macro (car-safe old)) 1459 (let ((sig1 (byte-compile--function-signature old))
1465 (eq 'lambda (car-safe (cdr-safe old)))
1466 (setq old (cdr old)))
1467 (let ((sig1 (byte-compile-arglist-signature
1468 (pcase old
1469 (`(lambda ,args . ,_) args)
1470 (`(closure ,_ ,args . ,_) args)
1471 ((pred byte-code-function-p) (aref old 0))
1472 (_ '(&rest def)))))
1473 (sig2 (byte-compile-arglist-signature arglist))) 1460 (sig2 (byte-compile-arglist-signature arglist)))
1474 (unless (byte-compile-arglist-signatures-congruent-p sig1 sig2) 1461 (unless (byte-compile-arglist-signatures-congruent-p sig1 sig2)
1475 (byte-compile-set-symbol-position name) 1462 (byte-compile-set-symbol-position name)
diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el
index c64376b940f..6a4ee47ac24 100644
--- a/lisp/emacs-lisp/cl-generic.el
+++ b/lisp/emacs-lisp/cl-generic.el
@@ -182,8 +182,7 @@ SPECIALIZERS-FUNCTION takes as first argument a tag value TAG
182 origname)) 182 origname))
183 (if generic 183 (if generic
184 (cl-assert (eq name (cl--generic-name generic))) 184 (cl-assert (eq name (cl--generic-name generic)))
185 (setf (cl--generic name) (setq generic (cl--generic-make name))) 185 (setf (cl--generic name) (setq generic (cl--generic-make name))))
186 (defalias name (cl--generic-make-function generic)))
187 generic)) 186 generic))
188 187
189;;;###autoload 188;;;###autoload
@@ -1210,5 +1209,18 @@ Used internally for the (major-mode MODE) context specializers."
1210 (progn (cl-assert (null modes)) mode) 1209 (progn (cl-assert (null modes)) mode)
1211 `(derived-mode ,mode . ,modes)))) 1210 `(derived-mode ,mode . ,modes))))
1212 1211
1212;;; Support for unloading.
1213
1214(cl-defmethod loadhist-unload-element ((x (head cl-defmethod)))
1215 (pcase-let*
1216 ((`(,name ,qualifiers . ,specializers) (cdr x))
1217 (generic (cl-generic-ensure-function name 'noerror)))
1218 (when generic
1219 (let* ((mt (cl--generic-method-table generic))
1220 (me (cl--generic-member-method specializers qualifiers mt)))
1221 (when me
1222 (setf (cl--generic-method-table generic) (delq (car me) mt)))))))
1223
1224
1213(provide 'cl-generic) 1225(provide 'cl-generic)
1214;;; cl-generic.el ends here 1226;;; cl-generic.el ends here
diff --git a/lisp/emacs-lisp/cl-lib.el b/lisp/emacs-lisp/cl-lib.el
index 936c852526c..6ac08d839b1 100644
--- a/lisp/emacs-lisp/cl-lib.el
+++ b/lisp/emacs-lisp/cl-lib.el
@@ -288,14 +288,6 @@ If true return the decimal value of digit CHAR in RADIX."
288 (let ((n (aref cl-digit-char-table char))) 288 (let ((n (aref cl-digit-char-table char)))
289 (and n (< n (or radix 10)) n))) 289 (and n (< n (or radix 10)) n)))
290 290
291(defun cl--random-time ()
292 (let* ((time (copy-sequence (current-time-string))) (i (length time)) (v 0))
293 (while (>= (cl-decf i) 0) (setq v (+ (* v 3) (aref time i))))
294 v))
295
296(defvar cl--random-state
297 (vector 'cl--random-state-tag -1 30 (cl--random-time)))
298
299(defconst cl-most-positive-float nil 291(defconst cl-most-positive-float nil
300 "The largest value that a Lisp float can hold. 292 "The largest value that a Lisp float can hold.
301If your system supports infinities, this is the largest finite value. 293If your system supports infinities, this is the largest finite value.
@@ -639,7 +631,7 @@ If ALIST is non-nil, the new pairs are prepended to it."
639 (require 'cl-seq)) 631 (require 'cl-seq))
640 632
641(defun cl--old-struct-type-of (orig-fun object) 633(defun cl--old-struct-type-of (orig-fun object)
642 (or (and (vectorp object) 634 (or (and (vectorp object) (> (length object) 0)
643 (let ((tag (aref object 0))) 635 (let ((tag (aref object 0)))
644 (when (and (symbolp tag) 636 (when (and (symbolp tag)
645 (string-prefix-p "cl-struct-" (symbol-name tag))) 637 (string-prefix-p "cl-struct-" (symbol-name tag)))
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index 65e30f86778..1494ed1d9c3 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -906,7 +906,7 @@ circular objects. Let `read' read everything else."
906 ;; with the object itself, wherever it occurs. 906 ;; with the object itself, wherever it occurs.
907 (forward-char 1) 907 (forward-char 1)
908 (let ((obj (edebug-read-storing-offsets stream))) 908 (let ((obj (edebug-read-storing-offsets stream)))
909 (substitute-object-in-subtree obj placeholder) 909 (lread--substitute-object-in-subtree obj placeholder t)
910 (throw 'return (setf (cdr elem) obj))))) 910 (throw 'return (setf (cdr elem) obj)))))
911 ((eq ?# (following-char)) 911 ((eq ?# (following-char))
912 ;; #n# returns a previously read object. 912 ;; #n# returns a previously read object.
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el
index a05bd7cc4d4..bca40ab87da 100644
--- a/lisp/emacs-lisp/eldoc.el
+++ b/lisp/emacs-lisp/eldoc.el
@@ -160,6 +160,10 @@ This is used to determine if `eldoc-idle-delay' is changed by the user.")
160It should receive the same arguments as `message'.") 160It should receive the same arguments as `message'.")
161 161
162(defun eldoc-edit-message-commands () 162(defun eldoc-edit-message-commands ()
163 "Return an obarray containing common editing commands.
164
165When `eldoc-print-after-edit' is non-nil, ElDoc messages are only
166printed after commands contained in this obarray."
163 (let ((cmds (make-vector 31 0)) 167 (let ((cmds (make-vector 31 0))
164 (re (regexp-opt '("delete" "insert" "edit" "electric" "newline")))) 168 (re (regexp-opt '("delete" "insert" "edit" "electric" "newline"))))
165 (mapatoms (lambda (s) 169 (mapatoms (lambda (s)
@@ -211,16 +215,21 @@ expression point is on."
211 215
212;;;###autoload 216;;;###autoload
213(defun turn-on-eldoc-mode () 217(defun turn-on-eldoc-mode ()
214 "Turn on `eldoc-mode' if the buffer has eldoc support enabled. 218 "Turn on `eldoc-mode' if the buffer has ElDoc support enabled.
215See `eldoc-documentation-function' for more detail." 219See `eldoc-documentation-function' for more detail."
216 (when (eldoc--supported-p) 220 (when (eldoc--supported-p)
217 (eldoc-mode 1))) 221 (eldoc-mode 1)))
218 222
219(defun eldoc--supported-p () 223(defun eldoc--supported-p ()
224 "Non-nil if an ElDoc function is set for this buffer."
220 (not (memq eldoc-documentation-function '(nil ignore)))) 225 (not (memq eldoc-documentation-function '(nil ignore))))
221 226
222 227
223(defun eldoc-schedule-timer () 228(defun eldoc-schedule-timer ()
229 "Ensure `eldoc-timer' is running.
230
231If the user has changed `eldoc-idle-delay', update the timer to
232reflect the change."
224 (or (and eldoc-timer 233 (or (and eldoc-timer
225 (memq eldoc-timer timer-idle-list)) ;FIXME: Why? 234 (memq eldoc-timer timer-idle-list)) ;FIXME: Why?
226 (setq eldoc-timer 235 (setq eldoc-timer
@@ -229,8 +238,7 @@ See `eldoc-documentation-function' for more detail."
229 (lambda () 238 (lambda ()
230 (when (or eldoc-mode 239 (when (or eldoc-mode
231 (and global-eldoc-mode 240 (and global-eldoc-mode
232 (not (memq eldoc-documentation-function 241 (eldoc--supported-p)))
233 '(nil ignore)))))
234 (eldoc-print-current-symbol-info)))))) 242 (eldoc-print-current-symbol-info))))))
235 243
236 ;; If user has changed the idle delay, update the timer. 244 ;; If user has changed the idle delay, update the timer.
@@ -268,16 +276,19 @@ Otherwise work like `message'."
268 (force-mode-line-update))) 276 (force-mode-line-update)))
269 (apply 'message format-string args))) 277 (apply 'message format-string args)))
270 278
271(defun eldoc-message (&rest args) 279(defun eldoc-message (&optional format-string &rest args)
280 "Display FORMAT-STRING formatted with ARGS as an ElDoc message.
281
282Store the message (if any) in `eldoc-last-message', and return it."
272 (let ((omessage eldoc-last-message)) 283 (let ((omessage eldoc-last-message))
273 (setq eldoc-last-message 284 (setq eldoc-last-message
274 (cond ((eq (car args) eldoc-last-message) eldoc-last-message) 285 (cond ((eq format-string eldoc-last-message) eldoc-last-message)
275 ((null (car args)) nil) 286 ((null format-string) nil)
276 ;; If only one arg, no formatting to do, so put it in 287 ;; If only one arg, no formatting to do, so put it in
277 ;; eldoc-last-message so eq test above might succeed on 288 ;; eldoc-last-message so eq test above might succeed on
278 ;; subsequent calls. 289 ;; subsequent calls.
279 ((null (cdr args)) (car args)) 290 ((null args) format-string)
280 (t (apply #'format-message args)))) 291 (t (apply #'format-message format-string args))))
281 ;; In emacs 19.29 and later, and XEmacs 19.13 and later, all messages 292 ;; In emacs 19.29 and later, and XEmacs 19.13 and later, all messages
282 ;; are recorded in a log. Do not put eldoc messages in that log since 293 ;; are recorded in a log. Do not put eldoc messages in that log since
283 ;; they are Legion. 294 ;; they are Legion.
@@ -289,6 +300,7 @@ Otherwise work like `message'."
289 eldoc-last-message) 300 eldoc-last-message)
290 301
291(defun eldoc--message-command-p (command) 302(defun eldoc--message-command-p (command)
303 "Return non-nil if COMMAND is in `eldoc-message-commands'."
292 (and (symbolp command) 304 (and (symbolp command)
293 (intern-soft (symbol-name command) eldoc-message-commands))) 305 (intern-soft (symbol-name command) eldoc-message-commands)))
294 306
@@ -299,6 +311,7 @@ Otherwise work like `message'."
299;; before the next command executes, which does away with the flicker. 311;; before the next command executes, which does away with the flicker.
300;; This doesn't seem to be required for Emacs 19.28 and earlier. 312;; This doesn't seem to be required for Emacs 19.28 and earlier.
301(defun eldoc-pre-command-refresh-echo-area () 313(defun eldoc-pre-command-refresh-echo-area ()
314 "Reprint `eldoc-last-message' in the echo area."
302 (and eldoc-last-message 315 (and eldoc-last-message
303 (not (minibufferp)) ;We don't use the echo area when in minibuffer. 316 (not (minibufferp)) ;We don't use the echo area when in minibuffer.
304 (if (and (eldoc-display-message-no-interference-p) 317 (if (and (eldoc-display-message-no-interference-p)
@@ -310,6 +323,7 @@ Otherwise work like `message'."
310 323
311;; Decide whether now is a good time to display a message. 324;; Decide whether now is a good time to display a message.
312(defun eldoc-display-message-p () 325(defun eldoc-display-message-p ()
326 "Return non-nil when it is appropriate to display an ElDoc message."
313 (and (eldoc-display-message-no-interference-p) 327 (and (eldoc-display-message-no-interference-p)
314 ;; If this-command is non-nil while running via an idle 328 ;; If this-command is non-nil while running via an idle
315 ;; timer, we're still in the middle of executing a command, 329 ;; timer, we're still in the middle of executing a command,
@@ -322,6 +336,7 @@ Otherwise work like `message'."
322;; Check various conditions about the current environment that might make 336;; Check various conditions about the current environment that might make
323;; it undesirable to print eldoc messages right this instant. 337;; it undesirable to print eldoc messages right this instant.
324(defun eldoc-display-message-no-interference-p () 338(defun eldoc-display-message-no-interference-p ()
339 "Return nil if displaying a message would cause interference."
325 (not (or executing-kbd-macro (bound-and-true-p edebug-active)))) 340 (not (or executing-kbd-macro (bound-and-true-p edebug-active))))
326 341
327 342
@@ -347,6 +362,7 @@ variable) is taken into account if the major mode specific function does not
347return any documentation.") 362return any documentation.")
348 363
349(defun eldoc-print-current-symbol-info () 364(defun eldoc-print-current-symbol-info ()
365 "Print the text produced by `eldoc-documentation-function'."
350 ;; This is run from post-command-hook or some idle timer thing, 366 ;; This is run from post-command-hook or some idle timer thing,
351 ;; so we need to be careful that errors aren't ignored. 367 ;; so we need to be careful that errors aren't ignored.
352 (with-demoted-errors "eldoc error: %s" 368 (with-demoted-errors "eldoc error: %s"
@@ -361,6 +377,13 @@ return any documentation.")
361;; truncated or eliminated entirely from the output to make room for the 377;; truncated or eliminated entirely from the output to make room for the
362;; description. 378;; description.
363(defun eldoc-docstring-format-sym-doc (prefix doc &optional face) 379(defun eldoc-docstring-format-sym-doc (prefix doc &optional face)
380 "Combine PREFIX and DOC, and shorten the result to fit in the echo area.
381
382When PREFIX is a symbol, propertize its symbol name with FACE
383before combining it with DOC. If FACE is not provided, just
384apply the nil face.
385
386See also: `eldoc-echo-area-use-multiline-p'."
364 (when (symbolp prefix) 387 (when (symbolp prefix)
365 (setq prefix (concat (propertize (symbol-name prefix) 'face face) ": "))) 388 (setq prefix (concat (propertize (symbol-name prefix) 'face face) ": ")))
366 (let* ((ea-multi eldoc-echo-area-use-multiline-p) 389 (let* ((ea-multi eldoc-echo-area-use-multiline-p)
@@ -390,22 +413,26 @@ return any documentation.")
390;; These functions do display-command table management. 413;; These functions do display-command table management.
391 414
392(defun eldoc-add-command (&rest cmds) 415(defun eldoc-add-command (&rest cmds)
416 "Add each of CMDS to the obarray `eldoc-message-commands'."
393 (dolist (name cmds) 417 (dolist (name cmds)
394 (and (symbolp name) 418 (and (symbolp name)
395 (setq name (symbol-name name))) 419 (setq name (symbol-name name)))
396 (set (intern name eldoc-message-commands) t))) 420 (set (intern name eldoc-message-commands) t)))
397 421
398(defun eldoc-add-command-completions (&rest names) 422(defun eldoc-add-command-completions (&rest names)
423 "Pass every prefix completion of NAMES to `eldoc-add-command'."
399 (dolist (name names) 424 (dolist (name names)
400 (apply #'eldoc-add-command (all-completions name obarray 'commandp)))) 425 (apply #'eldoc-add-command (all-completions name obarray 'commandp))))
401 426
402(defun eldoc-remove-command (&rest cmds) 427(defun eldoc-remove-command (&rest cmds)
428 "Remove each of CMDS from the obarray `eldoc-message-commands'."
403 (dolist (name cmds) 429 (dolist (name cmds)
404 (and (symbolp name) 430 (and (symbolp name)
405 (setq name (symbol-name name))) 431 (setq name (symbol-name name)))
406 (unintern name eldoc-message-commands))) 432 (unintern name eldoc-message-commands)))
407 433
408(defun eldoc-remove-command-completions (&rest names) 434(defun eldoc-remove-command-completions (&rest names)
435 "Pass every prefix completion of NAMES to `eldoc-remove-command'."
409 (dolist (name names) 436 (dolist (name names)
410 (apply #'eldoc-remove-command 437 (apply #'eldoc-remove-command
411 (all-completions name eldoc-message-commands)))) 438 (all-completions name eldoc-message-commands))))
@@ -418,9 +445,9 @@ return any documentation.")
418 "down-list" "end-of-" "exchange-point-and-mark" "forward-" "goto-" 445 "down-list" "end-of-" "exchange-point-and-mark" "forward-" "goto-"
419 "handle-select-window" "indent-for-tab-command" "left-" "mark-page" 446 "handle-select-window" "indent-for-tab-command" "left-" "mark-page"
420 "mark-paragraph" "mouse-set-point" "move-" "move-beginning-of-" 447 "mark-paragraph" "mouse-set-point" "move-" "move-beginning-of-"
421 "move-end-of-" "newline" "next-" "other-window" "pop-global-mark" "previous-" 448 "move-end-of-" "newline" "next-" "other-window" "pop-global-mark"
422 "recenter" "right-" "scroll-" "self-insert-command" "split-window-" 449 "previous-" "recenter" "right-" "scroll-" "self-insert-command"
423 "up-list") 450 "split-window-" "up-list")
424 451
425(provide 'eldoc) 452(provide 'eldoc)
426 453
diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el
index eb2b2e3e11b..5c88b070f65 100644
--- a/lisp/emacs-lisp/ert.el
+++ b/lisp/emacs-lisp/ert.el
@@ -136,8 +136,15 @@ Emacs bug 6581 at URL `http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6581'."
136 ;; ert-test objects. It designates an anonymous test. 136 ;; ert-test objects. It designates an anonymous test.
137 (error "Attempt to define a test named nil")) 137 (error "Attempt to define a test named nil"))
138 (put symbol 'ert--test definition) 138 (put symbol 'ert--test definition)
139 ;; Register in load-history, so `symbol-file' can find us, and so
140 ;; unload-feature can unload our tests.
141 (cl-pushnew `(ert-deftest . ,symbol) current-load-list :test #'equal)
139 definition) 142 definition)
140 143
144(cl-defmethod loadhist-unload-element ((x (head ert-deftest)))
145 (let ((name (cdr x)))
146 (put name 'ert--test nil)))
147
141(defun ert-make-test-unbound (symbol) 148(defun ert-make-test-unbound (symbol)
142 "Make SYMBOL name no test. Return SYMBOL." 149 "Make SYMBOL name no test. Return SYMBOL."
143 (cl-remprop symbol 'ert--test) 150 (cl-remprop symbol 'ert--test)
@@ -214,12 +221,6 @@ description of valid values for RESULT-TYPE.
214 ,@(when tags-supplied-p 221 ,@(when tags-supplied-p
215 `(:tags ,tags)) 222 `(:tags ,tags))
216 :body (lambda () ,@body))) 223 :body (lambda () ,@body)))
217 ;; This hack allows `symbol-file' to associate `ert-deftest'
218 ;; forms with files, and therefore enables `find-function' to
219 ;; work with tests. However, it leads to warnings in
220 ;; `unload-feature', which doesn't know how to undefine tests
221 ;; and has no mechanism for extension.
222 (push '(ert-deftest . ,name) current-load-list)
223 ',name)))) 224 ',name))))
224 225
225;; We use these `put' forms in addition to the (declare (indent)) in 226;; We use these `put' forms in addition to the (declare (indent)) in
@@ -1512,7 +1513,7 @@ Ran \\([0-9]+\\) tests, \\([0-9]+\\) results as expected\
1512 (message "%d files contained unexpected results:" (length unexpected)) 1513 (message "%d files contained unexpected results:" (length unexpected))
1513 (mapc (lambda (l) (message " %s" l)) unexpected)) 1514 (mapc (lambda (l) (message " %s" l)) unexpected))
1514 ;; More details on hydra, where the logs are harder to get to. 1515 ;; More details on hydra, where the logs are harder to get to.
1515 (when (and (getenv "NIX_STORE") 1516 (when (and (getenv "EMACS_HYDRA_CI")
1516 (not (zerop (+ nunexpected nskipped)))) 1517 (not (zerop (+ nunexpected nskipped))))
1517 (message "\nDETAILS") 1518 (message "\nDETAILS")
1518 (message "-------") 1519 (message "-------")
diff --git a/lisp/emacs-lisp/gv.el b/lisp/emacs-lisp/gv.el
index c5c12a6414c..27376fc7f95 100644
--- a/lisp/emacs-lisp/gv.el
+++ b/lisp/emacs-lisp/gv.el
@@ -377,10 +377,12 @@ The return value is the last VAL in the list.
377 `(with-current-buffer ,buf (set (make-local-variable ,var) ,v)))) 377 `(with-current-buffer ,buf (set (make-local-variable ,var) ,v))))
378 378
379(gv-define-expander alist-get 379(gv-define-expander alist-get
380 (lambda (do key alist &optional default remove) 380 (lambda (do key alist &optional default remove testfn)
381 (macroexp-let2 macroexp-copyable-p k key 381 (macroexp-let2 macroexp-copyable-p k key
382 (gv-letplace (getter setter) alist 382 (gv-letplace (getter setter) alist
383 (macroexp-let2 nil p `(assq ,k ,getter) 383 (macroexp-let2 nil p `(if (and ,testfn (not (eq ,testfn 'eq)))
384 (assoc ,k ,getter ,testfn)
385 (assq ,k ,getter))
384 (funcall do (if (null default) `(cdr ,p) 386 (funcall do (if (null default) `(cdr ,p)
385 `(if ,p (cdr ,p) ,default)) 387 `(if ,p (cdr ,p) ,default))
386 (lambda (v) 388 (lambda (v)
diff --git a/lisp/emacs-lisp/map.el b/lisp/emacs-lisp/map.el
index a89457e877d..e098eef8294 100644
--- a/lisp/emacs-lisp/map.el
+++ b/lisp/emacs-lisp/map.el
@@ -4,7 +4,7 @@
4 4
5;; Author: Nicolas Petton <nicolas@petton.fr> 5;; Author: Nicolas Petton <nicolas@petton.fr>
6;; Keywords: convenience, map, hash-table, alist, array 6;; Keywords: convenience, map, hash-table, alist, array
7;; Version: 1.1 7;; Version: 1.2
8;; Package: map 8;; Package: map
9 9
10;; Maintainer: emacs-devel@gnu.org 10;; Maintainer: emacs-devel@gnu.org
@@ -93,11 +93,13 @@ Returns the result of evaluating the form associated with MAP-VAR's type."
93 ((arrayp ,map-var) ,(plist-get args :array)) 93 ((arrayp ,map-var) ,(plist-get args :array))
94 (t (error "Unsupported map: %s" ,map-var))))) 94 (t (error "Unsupported map: %s" ,map-var)))))
95 95
96(defun map-elt (map key &optional default) 96(defun map-elt (map key &optional default testfn)
97 "Lookup KEY in MAP and return its associated value. 97 "Lookup KEY in MAP and return its associated value.
98If KEY is not found, return DEFAULT which defaults to nil. 98If KEY is not found, return DEFAULT which defaults to nil.
99 99
100If MAP is a list, `eql' is used to lookup KEY. 100If MAP is a list, `eql' is used to lookup KEY. Optional argument
101TESTFN, if non-nil, means use its function definition instead of
102`eql'.
101 103
102MAP can be a list, hash-table or array." 104MAP can be a list, hash-table or array."
103 (declare 105 (declare
@@ -106,30 +108,31 @@ MAP can be a list, hash-table or array."
106 (gv-letplace (mgetter msetter) `(gv-delay-error ,map) 108 (gv-letplace (mgetter msetter) `(gv-delay-error ,map)
107 (macroexp-let2* nil 109 (macroexp-let2* nil
108 ;; Eval them once and for all in the right order. 110 ;; Eval them once and for all in the right order.
109 ((key key) (default default)) 111 ((key key) (default default) (testfn testfn))
110 `(if (listp ,mgetter) 112 `(if (listp ,mgetter)
111 ;; Special case the alist case, since it can't be handled by the 113 ;; Special case the alist case, since it can't be handled by the
112 ;; map--put function. 114 ;; map--put function.
113 ,(gv-get `(alist-get ,key (gv-synthetic-place 115 ,(gv-get `(alist-get ,key (gv-synthetic-place
114 ,mgetter ,msetter) 116 ,mgetter ,msetter)
115 ,default) 117 ,default nil ,testfn)
116 do) 118 do)
117 ,(funcall do `(map-elt ,mgetter ,key ,default) 119 ,(funcall do `(map-elt ,mgetter ,key ,default)
118 (lambda (v) `(map--put ,mgetter ,key ,v))))))))) 120 (lambda (v) `(map--put ,mgetter ,key ,v)))))))))
119 (map--dispatch map 121 (map--dispatch map
120 :list (alist-get key map default) 122 :list (alist-get key map default nil testfn)
121 :hash-table (gethash key map default) 123 :hash-table (gethash key map default)
122 :array (if (and (>= key 0) (< key (seq-length map))) 124 :array (if (and (>= key 0) (< key (seq-length map)))
123 (seq-elt map key) 125 (seq-elt map key)
124 default))) 126 default)))
125 127
126(defmacro map-put (map key value) 128(defmacro map-put (map key value &optional testfn)
127 "Associate KEY with VALUE in MAP and return VALUE. 129 "Associate KEY with VALUE in MAP and return VALUE.
128If KEY is already present in MAP, replace the associated value 130If KEY is already present in MAP, replace the associated value
129with VALUE. 131with VALUE.
132When MAP is a list, test equality with TESTFN if non-nil, otherwise use `eql'.
130 133
131MAP can be a list, hash-table or array." 134MAP can be a list, hash-table or array."
132 `(setf (map-elt ,map ,key) ,value)) 135 `(setf (map-elt ,map ,key nil ,testfn) ,value))
133 136
134(defun map-delete (map key) 137(defun map-delete (map key)
135 "Delete KEY from MAP and return MAP. 138 "Delete KEY from MAP and return MAP.
diff --git a/lisp/emacs-lisp/nadvice.el b/lisp/emacs-lisp/nadvice.el
index fd1cd2c7aaf..c68ecbc59ee 100644
--- a/lisp/emacs-lisp/nadvice.el
+++ b/lisp/emacs-lisp/nadvice.el
@@ -385,6 +385,18 @@ of the piece of advice."
385 385
386(defun advice--defalias-fset (fsetfun symbol newdef) 386(defun advice--defalias-fset (fsetfun symbol newdef)
387 (unless fsetfun (setq fsetfun #'fset)) 387 (unless fsetfun (setq fsetfun #'fset))
388 ;; `newdef' shouldn't include advice wrappers, since that's what *we* manage!
389 ;; So if `newdef' includes advice wrappers, it's usually because someone
390 ;; naively took (symbol-function F) and then passed that back to `defalias':
391 ;; let's strip them away.
392 (cond
393 ((advice--p newdef) (setq newdef (advice--cd*r newdef)))
394 ((and (eq 'macro (car-safe newdef))
395 (advice--p (cdr newdef)))
396 (setq newdef `(macro . ,(advice--cd*r (cdr newdef))))))
397 ;; The saved-rewrite is specific to the current value, so since we are about
398 ;; to overwrite that current value with new value, the old saved-rewrite is
399 ;; not relevant any more.
388 (when (get symbol 'advice--saved-rewrite) 400 (when (get symbol 'advice--saved-rewrite)
389 (put symbol 'advice--saved-rewrite nil)) 401 (put symbol 'advice--saved-rewrite nil))
390 (setq newdef (advice--normalize symbol newdef)) 402 (setq newdef (advice--normalize symbol newdef))
diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el
index 4a06ab25d3e..b40161104d2 100644
--- a/lisp/emacs-lisp/pcase.el
+++ b/lisp/emacs-lisp/pcase.el
@@ -930,6 +930,5 @@ QPAT can take the following forms:
930 ((or (stringp qpat) (integerp qpat) (symbolp qpat)) `',qpat) 930 ((or (stringp qpat) (integerp qpat) (symbolp qpat)) `',qpat)
931 (t (error "Unknown QPAT: %S" qpat)))) 931 (t (error "Unknown QPAT: %S" qpat))))
932 932
933
934(provide 'pcase) 933(provide 'pcase)
935;;; pcase.el ends here 934;;; pcase.el ends here
diff --git a/lisp/emacs-lisp/rx.el b/lisp/emacs-lisp/rx.el
index 386232c6eef..b66f2c6d512 100644
--- a/lisp/emacs-lisp/rx.el
+++ b/lisp/emacs-lisp/rx.el
@@ -1169,6 +1169,62 @@ enclosed in `(and ...)'.
1169 (rx-to-string `(and ,@regexps) t)) 1169 (rx-to-string `(and ,@regexps) t))
1170 (t 1170 (t
1171 (rx-to-string (car regexps) t)))) 1171 (rx-to-string (car regexps) t))))
1172
1173
1174(pcase-defmacro rx (&rest regexps)
1175 "Build a `pcase' pattern matching `rx' regexps.
1176The REGEXPS are interpreted as by `rx'. The pattern matches if
1177the regular expression so constructed matches the object, as if
1178by `string-match'.
1179
1180In addition to the usual `rx' constructs, REGEXPS can contain the
1181following constructs:
1182
1183 (let VAR FORM...) creates a new explicitly numbered submatch
1184 that matches FORM and binds the match to
1185 VAR.
1186 (backref VAR) creates a backreference to the submatch
1187 introduced by a previous (let VAR ...)
1188 construct.
1189
1190The VARs are associated with explicitly numbered submatches
1191starting from 1. Multiple occurrences of the same VAR refer to
1192the same submatch.
1193
1194If a case matches, the match data is modified as usual so you can
1195use it in the case body, but you still have to pass the correct
1196string as argument to `match-string'."
1197 (let* ((vars ())
1198 (rx-constituents
1199 `((let
1200 ,(lambda (form)
1201 (rx-check form)
1202 (let ((var (cadr form)))
1203 (cl-check-type var symbol)
1204 (let ((i (or (cl-position var vars :test #'eq)
1205 (prog1 (length vars)
1206 (setq vars `(,@vars ,var))))))
1207 (rx-form `(submatch-n ,(1+ i) ,@(cddr form))))))
1208 1 nil)
1209 (backref
1210 ,(lambda (form)
1211 (rx-check form)
1212 (rx-backref
1213 `(backref ,(let ((var (cadr form)))
1214 (if (integerp var) var
1215 (1+ (cl-position var vars :test #'eq)))))))
1216 1 1
1217 ,(lambda (var)
1218 (cond ((integerp var) (rx-check-backref var))
1219 ((memq var vars) t)
1220 (t (error "rx `backref' variable must be one of %s: %s"
1221 vars var)))))
1222 ,@rx-constituents))
1223 (regexp (rx-to-string `(seq ,@regexps) :no-group)))
1224 `(and (pred (string-match ,regexp))
1225 ,@(cl-loop for i from 1
1226 for var in vars
1227 collect `(app (match-string ,i) ,var)))))
1172 1228
1173;; ;; sregex.el replacement 1229;; ;; sregex.el replacement
1174 1230
diff --git a/lisp/eshell/em-prompt.el b/lisp/eshell/em-prompt.el
index 8c81b43b1fa..2fd1db2113d 100644
--- a/lisp/eshell/em-prompt.el
+++ b/lisp/eshell/em-prompt.el
@@ -161,14 +161,25 @@ If N is negative, find the previous or Nth previous match."
161 "Move to end of Nth next prompt in the buffer. 161 "Move to end of Nth next prompt in the buffer.
162See `eshell-prompt-regexp'." 162See `eshell-prompt-regexp'."
163 (interactive "p") 163 (interactive "p")
164 (forward-paragraph n) 164 (if eshell-highlight-prompt
165 (progn
166 (while (< n 0)
167 (while (and (re-search-backward eshell-prompt-regexp nil t)
168 (not (get-text-property (match-beginning 0) 'read-only))))
169 (setq n (1+ n)))
170 (while (> n 0)
171 (while (and (re-search-forward eshell-prompt-regexp nil t)
172 (not (get-text-property (match-beginning 0) 'read-only))))
173 (setq n (1- n))))
174 (re-search-forward eshell-prompt-regexp nil t n))
165 (eshell-skip-prompt)) 175 (eshell-skip-prompt))
166 176
167(defun eshell-previous-prompt (n) 177(defun eshell-previous-prompt (n)
168 "Move to end of Nth previous prompt in the buffer. 178 "Move to end of Nth previous prompt in the buffer.
169See `eshell-prompt-regexp'." 179See `eshell-prompt-regexp'."
170 (interactive "p") 180 (interactive "p")
171 (eshell-next-prompt (- (1+ n)))) 181 (beginning-of-line) ; Don't count prompt on current line.
182 (eshell-next-prompt (- n)))
172 183
173(defun eshell-skip-prompt () 184(defun eshell-skip-prompt ()
174 "Skip past the text matching regexp `eshell-prompt-regexp'. 185 "Skip past the text matching regexp `eshell-prompt-regexp'.
diff --git a/lisp/faces.el b/lisp/faces.el
index 9a8a1344caf..97c32165b9c 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -102,11 +102,16 @@ a font height that isn't optimal."
102 ;; Monospace Serif is an Emacs invention, intended to work around 102 ;; Monospace Serif is an Emacs invention, intended to work around
103 ;; portability problems when using Courier. It should work well 103 ;; portability problems when using Courier. It should work well
104 ;; when combined with Monospaced and with other standard fonts. 104 ;; when combined with Monospaced and with other standard fonts.
105 ;; One of its uses is for 'tex-verbatim' and 'Info-quoted' faces,
106 ;; so the result must be different from the default face's font,
107 ;; and must be monospaced.
105 ("Monospace Serif" 108 ("Monospace Serif"
106 109
107 ;; This looks good on GNU/Linux. 110 ;; This looks good on GNU/Linux.
108 "Courier 10 Pitch" 111 "Courier 10 Pitch"
109 ;; This looks good on MS-Windows and OS X. 112 ;; This looks good on MS-Windows and OS X. Note that this is
113 ;; actually a sans-serif font, but it's here for lack of a better
114 ;; alternative.
110 "Consolas" 115 "Consolas"
111 ;; This looks good on macOS. "Courier" looks good too, but is 116 ;; This looks good on macOS. "Courier" looks good too, but is
112 ;; jagged on GNU/Linux and so is listed later as "courier". 117 ;; jagged on GNU/Linux and so is listed later as "courier".
@@ -2465,6 +2470,33 @@ If you set `term-file-prefix' to nil, this function does nothing."
2465 :version "21.1" 2470 :version "21.1"
2466 :group 'basic-faces) 2471 :group 'basic-faces)
2467 2472
2473;; Definition stolen from linum.el.
2474(defface line-number
2475 '((t :inherit (shadow default)))
2476 "Face for displaying line numbers.
2477This face is used when `display-line-numbers' is non-nil.
2478
2479If you customize the font of this face, make sure it is a
2480monospaced font, otherwise line numbers will not line up,
2481and text lines might move horizontally as you move through
2482the buffer."
2483 :version "26.1"
2484 :group 'basic-faces)
2485
2486(defface line-number-current-line
2487 '((t :inherit line-number))
2488 "Face for displaying the current line number.
2489This face is used when `display-line-numbers' is non-nil.
2490
2491If you customize the font of this face, make sure it is a
2492monospaced font, otherwise line numbers will not line up,
2493and text lines might move horizontally as you move through
2494the buffer. Similarly, making this face's font different
2495from that of the `line-number' face could produce such
2496unwanted effects."
2497 :version "26.1"
2498 :group 'basic-faces)
2499
2468(defface escape-glyph 2500(defface escape-glyph
2469 '((((background dark)) :foreground "cyan") 2501 '((((background dark)) :foreground "cyan")
2470 ;; See the comment in minibuffer-prompt for 2502 ;; See the comment in minibuffer-prompt for
diff --git a/lisp/files.el b/lisp/files.el
index 06f49bba23c..321a35b530d 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -434,8 +434,11 @@ and toggle it if ARG is `toggle'."
434 (not (and buffer-auto-save-file-name 434 (not (and buffer-auto-save-file-name
435 auto-save-visited-file-name))))))) 435 auto-save-visited-file-name)))))))
436 436
437;; The 'set' part is so we don't get a warning for using this variable
438;; above, while still catching code that _sets_ the variable to get
439;; the same effect as the new auto-save-visited-mode.
437(make-obsolete-variable 'auto-save-visited-file-name 'auto-save-visited-mode 440(make-obsolete-variable 'auto-save-visited-file-name 'auto-save-visited-mode
438 "Emacs 26.1") 441 "Emacs 26.1" 'set)
439 442
440(defcustom save-abbrevs t 443(defcustom save-abbrevs t
441 "Non-nil means save word abbrevs too when files are saved. 444 "Non-nil means save word abbrevs too when files are saved.
@@ -2540,7 +2543,7 @@ since only a single case-insensitive search through the alist is made."
2540 ("\\.[ckz]?sh\\'\\|\\.shar\\'\\|/\\.z?profile\\'" . sh-mode) 2543 ("\\.[ckz]?sh\\'\\|\\.shar\\'\\|/\\.z?profile\\'" . sh-mode)
2541 ("\\.bash\\'" . sh-mode) 2544 ("\\.bash\\'" . sh-mode)
2542 ("\\(/\\|\\`\\)\\.\\(bash_\\(profile\\|history\\|log\\(in\\|out\\)\\)\\|z?log\\(in\\|out\\)\\)\\'" . sh-mode) 2545 ("\\(/\\|\\`\\)\\.\\(bash_\\(profile\\|history\\|log\\(in\\|out\\)\\)\\|z?log\\(in\\|out\\)\\)\\'" . sh-mode)
2543 ("\\(/\\|\\`\\)\\.\\(shrc\\|[kz]shrc\\|bashrc\\|t?cshrc\\|esrc\\)\\'" . sh-mode) 2546 ("\\(/\\|\\`\\)\\.\\(shrc\\|zshrc\\|m?kshrc\\|bashrc\\|t?cshrc\\|esrc\\)\\'" . sh-mode)
2544 ("\\(/\\|\\`\\)\\.\\([kz]shenv\\|xinitrc\\|startxrc\\|xsession\\)\\'" . sh-mode) 2547 ("\\(/\\|\\`\\)\\.\\([kz]shenv\\|xinitrc\\|startxrc\\|xsession\\)\\'" . sh-mode)
2545 ("\\.m?spec\\'" . sh-mode) 2548 ("\\.m?spec\\'" . sh-mode)
2546 ("\\.m[mes]\\'" . nroff-mode) 2549 ("\\.m[mes]\\'" . nroff-mode)
diff --git a/lisp/frame.el b/lisp/frame.el
index b54df6fa160..634367edf45 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -1482,6 +1482,7 @@ FRAME."
1482 1482
1483(declare-function w32-mouse-absolute-pixel-position "w32fns.c") 1483(declare-function w32-mouse-absolute-pixel-position "w32fns.c")
1484(declare-function x-mouse-absolute-pixel-position "xfns.c") 1484(declare-function x-mouse-absolute-pixel-position "xfns.c")
1485(declare-function ns-mouse-absolute-pixel-position "nsfns.c")
1485 1486
1486(defun mouse-absolute-pixel-position () 1487(defun mouse-absolute-pixel-position ()
1487 "Return absolute position of mouse cursor in pixels. 1488 "Return absolute position of mouse cursor in pixels.
@@ -1494,6 +1495,8 @@ position (0, 0) of the selected frame's terminal."
1494 (x-mouse-absolute-pixel-position)) 1495 (x-mouse-absolute-pixel-position))
1495 ((eq frame-type 'w32) 1496 ((eq frame-type 'w32)
1496 (w32-mouse-absolute-pixel-position)) 1497 (w32-mouse-absolute-pixel-position))
1498 ((eq frame-type 'ns)
1499 (ns-mouse-absolute-pixel-position))
1497 (t 1500 (t
1498 (cons 0 0))))) 1501 (cons 0 0)))))
1499 1502
@@ -2458,7 +2461,13 @@ See also `toggle-frame-maximized'."
2458(make-obsolete-variable 2461(make-obsolete-variable
2459 'window-system-version "it does not give useful information." "24.3") 2462 'window-system-version "it does not give useful information." "24.3")
2460 2463
2461;; Variables which should trigger redisplay of the current buffer. 2464;; Variables whose change of value should trigger redisplay of the
2465;; current buffer.
2466;; To test whether a given variable needs to be added to this list,
2467;; write a simple interactive function that changes the variable's
2468;; value and bind that function to a simple key, like F5. If typing
2469;; F5 then produces the correct effect, the variable doesn't need
2470;; to be in this list; otherwise, it does.
2462(mapc (lambda (var) 2471(mapc (lambda (var)
2463 (add-variable-watcher var (symbol-function 'set-buffer-redisplay))) 2472 (add-variable-watcher var (symbol-function 'set-buffer-redisplay)))
2464 '(line-spacing 2473 '(line-spacing
@@ -2466,6 +2475,10 @@ See also `toggle-frame-maximized'."
2466 line-prefix 2475 line-prefix
2467 wrap-prefix 2476 wrap-prefix
2468 truncate-lines 2477 truncate-lines
2478 display-line-numbers
2479 display-line-numbers-width
2480 display-line-numbers-current-absolute
2481 display-line-numbers-widen
2469 bidi-paragraph-direction 2482 bidi-paragraph-direction
2470 bidi-display-reordering)) 2483 bidi-display-reordering))
2471 2484
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index 9bdd0c66f56..f2e51fb225f 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -9780,8 +9780,11 @@ If ARG is a negative number, hide the unwanted header lines."
9780 (inhibit-point-motion-hooks t) 9780 (inhibit-point-motion-hooks t)
9781 (hidden (if (numberp arg) 9781 (hidden (if (numberp arg)
9782 (>= arg 0) 9782 (>= arg 0)
9783 (or (not (looking-at "[^ \t\n]+:")) 9783 (or
9784 (gnus-article-hidden-text-p 'headers)))) 9784 ;; The case where there's no visible header
9785 ;; that matches `gnus-visible-headers'.
9786 (looking-at "\n?\\'")
9787 (gnus-article-hidden-text-p 'headers))))
9785 s e) 9788 s e)
9786 (delete-region (point-min) (point-max)) 9789 (delete-region (point-min) (point-max))
9787 (with-current-buffer gnus-original-article-buffer 9790 (with-current-buffer gnus-original-article-buffer
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index f5d94d8419f..cb0b2d71d33 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -564,7 +564,6 @@ FILE is the file where FUNCTION was probably defined."
564 "Return information about FUNCTION. 564 "Return information about FUNCTION.
565Returns a list of the form (REAL-FUNCTION DEF ALIASED REAL-DEF)." 565Returns a list of the form (REAL-FUNCTION DEF ALIASED REAL-DEF)."
566 (let* ((advised (and (symbolp function) 566 (let* ((advised (and (symbolp function)
567 (featurep 'nadvice)
568 (advice--p (advice--symbol-function function)))) 567 (advice--p (advice--symbol-function function))))
569 ;; If the function is advised, use the symbol that has the 568 ;; If the function is advised, use the symbol that has the
570 ;; real definition, if that symbol is already set up. 569 ;; real definition, if that symbol is already set up.
diff --git a/lisp/help.el b/lisp/help.el
index 0fb1c2dab77..bc7ee2c9b1b 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -1384,6 +1384,9 @@ If PRESERVE-NAMES is non-nil, return a formal arglist that uses
1384the same names as used in the original source code, when possible." 1384the same names as used in the original source code, when possible."
1385 ;; Handle symbols aliased to other symbols. 1385 ;; Handle symbols aliased to other symbols.
1386 (if (and (symbolp def) (fboundp def)) (setq def (indirect-function def))) 1386 (if (and (symbolp def) (fboundp def)) (setq def (indirect-function def)))
1387 ;; Advice wrappers have "catch all" args, so fetch the actual underlying
1388 ;; function to find the real arguments.
1389 (while (advice--p def) (setq def (advice--cdr def)))
1387 ;; If definition is a macro, find the function inside it. 1390 ;; If definition is a macro, find the function inside it.
1388 (if (eq (car-safe def) 'macro) (setq def (cdr def))) 1391 (if (eq (car-safe def) 'macro) (setq def (cdr def)))
1389 (cond 1392 (cond
diff --git a/lisp/international/characters.el b/lisp/international/characters.el
index 33cb3d85223..e48fc83c3df 100644
--- a/lisp/international/characters.el
+++ b/lisp/international/characters.el
@@ -148,6 +148,7 @@ with L, LRE, or LRO Unicode bidi character type.")
148(modify-category-entry '(#xF900 . #xFAFF) ?C) 148(modify-category-entry '(#xF900 . #xFAFF) ?C)
149(modify-category-entry '(#xF900 . #xFAFF) ?c) 149(modify-category-entry '(#xF900 . #xFAFF) ?c)
150(modify-category-entry '(#xF900 . #xFAFF) ?|) 150(modify-category-entry '(#xF900 . #xFAFF) ?|)
151(modify-category-entry '(#x1B170 . #x1B2FF) ?c)
151(modify-category-entry '(#x20000 . #x2FFFF) ?|) 152(modify-category-entry '(#x20000 . #x2FFFF) ?|)
152(modify-category-entry '(#x20000 . #x2FFFF) ?C) 153(modify-category-entry '(#x20000 . #x2FFFF) ?C)
153(modify-category-entry '(#x20000 . #x2FFFF) ?c) 154(modify-category-entry '(#x20000 . #x2FFFF) ?c)
@@ -221,6 +222,8 @@ with L, LRE, or LRO Unicode bidi character type.")
221(modify-category-entry #x30A0 ?H) 222(modify-category-entry #x30A0 ?H)
222(modify-category-entry #x30FC ?H) 223(modify-category-entry #x30FC ?H)
223 224
225(modify-category-entry '(#x1B000 . #x1B1FF) ?j)
226
224 227
225;; JISX0208 228;; JISX0208
226(map-charset-chars #'modify-syntax-entry 'japanese-jisx0208 "_" #x2121 #x227E) 229(map-charset-chars #'modify-syntax-entry 'japanese-jisx0208 "_" #x2121 #x227E)
@@ -1196,10 +1199,11 @@ with L, LRE, or LRO Unicode bidi character type.")
1196 (#xFE30 . #xFE6F) 1199 (#xFE30 . #xFE6F)
1197 (#xFF01 . #xFF60) 1200 (#xFF01 . #xFF60)
1198 (#xFFE0 . #xFFE6) 1201 (#xFFE0 . #xFFE6)
1199 (#x16FE0 . #x16FE0) 1202 (#x16FE0 . #x16FE1)
1200 (#x17000 . #x187EC) 1203 (#x17000 . #x187EC)
1201 (#x18800 . #x18AF2) 1204 (#x18800 . #x18AF2)
1202 (#x1B000 . #x1B001) 1205 (#x1B000 . #x1B11E)
1206 (#x1B170 . #x1B2FB)
1203 (#x1F004 . #x1F004) 1207 (#x1F004 . #x1F004)
1204 (#x1F0CF . #x1F0CF) 1208 (#x1F0CF . #x1F0CF)
1205 (#x1F18E . #x1F18E) 1209 (#x1F18E . #x1F18E)
@@ -1229,15 +1233,13 @@ with L, LRE, or LRO Unicode bidi character type.")
1229 (#x1F6CC . #x1F6CC) 1233 (#x1F6CC . #x1F6CC)
1230 (#x1F6D0 . #x1F6D2) 1234 (#x1F6D0 . #x1F6D2)
1231 (#x1F6EB . #x1F6EC) 1235 (#x1F6EB . #x1F6EC)
1232 (#x1F6F4 . #x1F6F6) 1236 (#x1F6F4 . #x1F6F8)
1233 (#x1F910 . #x1F91E) 1237 (#x1F910 . #x1F93E)
1234 (#x1F920 . #x1F927) 1238 (#x1F940 . #x1F94C)
1235 (#x1F930 . #x1F930) 1239 (#x1F950 . #x1F96B)
1236 (#x1F933 . #x1F93E) 1240 (#x1F980 . #x1F997)
1237 (#x1F940 . #x1F94B)
1238 (#x1F950 . #x1F95E)
1239 (#x1F980 . #x1F991)
1240 (#x1F9C0 . #x1F9C0) 1241 (#x1F9C0 . #x1F9C0)
1242 (#x1F9D0 . #x1F9E6)
1241 (#x20000 . #x2FFFF) 1243 (#x20000 . #x2FFFF)
1242 (#x30000 . #x3FFFF)))) 1244 (#x30000 . #x3FFFF))))
1243 (dolist (elt l) 1245 (dolist (elt l)
diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el
index e023d253693..8a1a9cfc58b 100644
--- a/lisp/international/fontset.el
+++ b/lisp/international/fontset.el
@@ -227,9 +227,12 @@
227 (modi #x11600) 227 (modi #x11600)
228 (takri #x11680) 228 (takri #x11680)
229 (warang-citi #x118A1) 229 (warang-citi #x118A1)
230 (zanabazar-square #x11A00)
231 (soyombo #x11A50)
230 (pau-cin-hau #x11AC0) 232 (pau-cin-hau #x11AC0)
231 (bhaiksuki #x11C00) 233 (bhaiksuki #x11C00)
232 (marchen #x11C72) 234 (marchen #x11C72)
235 (masaram-gondi #x11D00)
233 (cuneiform #x12000) 236 (cuneiform #x12000)
234 (cuneiform-numbers-and-punctuation #x12400) 237 (cuneiform-numbers-and-punctuation #x12400)
235 (mro #x16A40) 238 (mro #x16A40)
@@ -237,6 +240,7 @@
237 (pahawh-hmong #x16B11) 240 (pahawh-hmong #x16B11)
238 (tangut #x17000) 241 (tangut #x17000)
239 (tangut-components #x18800) 242 (tangut-components #x18800)
243 (nushu #x1B170)
240 (duployan-shorthand #x1BC20) 244 (duployan-shorthand #x1BC20)
241 (byzantine-musical-symbol #x1D000) 245 (byzantine-musical-symbol #x1D000)
242 (musical-symbol #x1D100) 246 (musical-symbol #x1D100)
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index bdba8eeb112..bcbc92844d6 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -2945,8 +2945,10 @@ on encoding."
2945 ;; (#x17000 . #x187FF) Tangut Ideographs 2945 ;; (#x17000 . #x187FF) Tangut Ideographs
2946 ;; (#x18800 . #x18AFF) Tangut Components 2946 ;; (#x18800 . #x18AFF) Tangut Components
2947 ;; (#x18B00 . #x1AFFF) unused 2947 ;; (#x18B00 . #x1AFFF) unused
2948 (#x1B000 . #x1B0FF) 2948 (#x1B000 . #x1B12F)
2949 ;; (#x1B100 . #x1BBFF) unused 2949 ;; (#x1B130 . #x1B16F) unused
2950 (#x1B170 . #x1B2FF)
2951 ;; (#x1B300 . #x1BBFF) unused
2950 (#x1BC00 . #x1BCAF) 2952 (#x1BC00 . #x1BCAF)
2951 ;; (#x1BCB0 . #x1CFFF) unused 2953 ;; (#x1BCB0 . #x1CFFF) unused
2952 (#x1D000 . #x1FFFF) 2954 (#x1D000 . #x1FFFF)
diff --git a/lisp/kmacro.el b/lisp/kmacro.el
index 838a492b6cb..472972e3edb 100644
--- a/lisp/kmacro.el
+++ b/lisp/kmacro.el
@@ -565,7 +565,8 @@ Use \\[kmacro-insert-counter] to insert (and increment) the macro counter.
565The counter value can be set or modified via \\[kmacro-set-counter] and \\[kmacro-add-counter]. 565The counter value can be set or modified via \\[kmacro-set-counter] and \\[kmacro-add-counter].
566The format of the counter can be modified via \\[kmacro-set-format]. 566The format of the counter can be modified via \\[kmacro-set-format].
567 567
568Use \\[kmacro-name-last-macro] to give it a permanent name. 568Use \\[kmacro-name-last-macro] to give it a name that will remain valid even
569after another macro is defined.
569Use \\[kmacro-bind-to-key] to bind it to a key sequence." 570Use \\[kmacro-bind-to-key] to bind it to a key sequence."
570 (interactive "P") 571 (interactive "P")
571 (if (or defining-kbd-macro executing-kbd-macro) 572 (if (or defining-kbd-macro executing-kbd-macro)
@@ -628,8 +629,8 @@ just the last key in the key sequence that you used to call this
628command. See `kmacro-call-repeat-key' and `kmacro-call-repeat-with-arg' 629command. See `kmacro-call-repeat-key' and `kmacro-call-repeat-with-arg'
629for details on how to adjust or disable this behavior. 630for details on how to adjust or disable this behavior.
630 631
631To make a macro permanent so you can call it even after defining 632To give a macro a name so you can call it even after defining others,
632others, use \\[kmacro-name-last-macro]." 633use \\[kmacro-name-last-macro]."
633 (interactive "p") 634 (interactive "p")
634 (let ((repeat-key (and (or (and (null no-repeat) 635 (let ((repeat-key (and (or (and (null no-repeat)
635 (> (length (this-single-command-keys)) 1)) 636 (> (length (this-single-command-keys)) 1))
@@ -730,8 +731,8 @@ With \\[universal-argument], call second macro in macro ring."
730With numeric prefix ARG, repeat macro that many times. 731With numeric prefix ARG, repeat macro that many times.
731Zero argument means repeat until there is an error. 732Zero argument means repeat until there is an error.
732 733
733To give a macro a permanent name, so you can call it 734To give a macro a name, so you can call it even after defining other
734even after defining other macros, use \\[kmacro-name-last-macro]." 735macros, use \\[kmacro-name-last-macro]."
735 (interactive "P") 736 (interactive "P")
736 (if defining-kbd-macro 737 (if defining-kbd-macro
737 (kmacro-end-macro nil)) 738 (kmacro-end-macro nil))
diff --git a/lisp/leim/quail/latin-alt.el b/lisp/leim/quail/latin-alt.el
index 6c0dab28b41..cc721343c55 100644
--- a/lisp/leim/quail/latin-alt.el
+++ b/lisp/leim/quail/latin-alt.el
@@ -1152,7 +1152,7 @@ Doubling the postfix separates the letter and postfix: e.g. a^^ -> a^
1152(quail-define-package 1152(quail-define-package
1153 "dutch" "Dutch" "NL" t 1153 "dutch" "Dutch" "NL" t
1154 "Dutch character mixfix input method. 1154 "Dutch character mixfix input method.
1155Caters for French and Turkish as well as Dutch. 1155Caters for French and Dutch.
1156 1156
1157 | | examples 1157 | | examples
1158 ------------+---------+---------- 1158 ------------+---------+----------
@@ -1163,8 +1163,6 @@ Caters for French and Turkish as well as Dutch.
1163 acute | \\=' | a\\=' -> á 1163 acute | \\=' | a\\=' -> á
1164 grave | \\=` | a\\=` -> à 1164 grave | \\=` | a\\=` -> à
1165 circumflex | ^ | a^ -> â 1165 circumflex | ^ | a^ -> â
1166 Turkish | various | i/ -> ı s, -> ş g^ -> ğ I/ -> İ
1167 | | S, -> Ş G^ -> Ğ
1168 ------------+---------+---------- 1166 ------------+---------+----------
1169 | prefix | 1167 | prefix |
1170 ------------+---------+---------- 1168 ------------+---------+----------
@@ -1176,9 +1174,6 @@ Doubling the postfix separates the letter and postfix: e.g. a\\='\\=' -> a\\='
1176(quail-define-rules 1174(quail-define-rules
1177 ("fl." ?ƒ) ;; LATIN SMALL LETTER F WITH HOOK (florin currency symbol) 1175 ("fl." ?ƒ) ;; LATIN SMALL LETTER F WITH HOOK (florin currency symbol)
1178 ("eur." ?€) ;; EURO SIGN 1176 ("eur." ?€) ;; EURO SIGN
1179 ;; “The 25th letter of the Dutch alphabet.”
1180 ("ij" ?ij) ;; LATIN SMALL LIGATURE IJ
1181 ("IJ" ?IJ) ;; LATIN CAPITAL LIGATURE IJ
1182 ;; “Trema on the second letter of vowel pair.” Yudit uses `:', not `"'. 1177 ;; “Trema on the second letter of vowel pair.” Yudit uses `:', not `"'.
1183 ("\"a" ?ä) ;; LATIN SMALL LETTER A WITH DIAERESIS 1178 ("\"a" ?ä) ;; LATIN SMALL LETTER A WITH DIAERESIS
1184 ("\"e" ?ë) ;; LATIN SMALL LETTER E WITH DIAERESIS 1179 ("\"e" ?ë) ;; LATIN SMALL LETTER E WITH DIAERESIS
@@ -1226,15 +1221,6 @@ Doubling the postfix separates the letter and postfix: e.g. a\\='\\=' -> a\\='
1226 ("I^" ?Î) ;; LATIN CAPITAL LETTER I WITH CIRCUMFLEX 1221 ("I^" ?Î) ;; LATIN CAPITAL LETTER I WITH CIRCUMFLEX
1227 ("O^" ?Ô) ;; LATIN CAPITAL LETTER O WITH CIRCUMFLEX 1222 ("O^" ?Ô) ;; LATIN CAPITAL LETTER O WITH CIRCUMFLEX
1228 ("U^" ?Û) ;; LATIN CAPITAL LETTER U WITH CIRCUMFLEX 1223 ("U^" ?Û) ;; LATIN CAPITAL LETTER U WITH CIRCUMFLEX
1229 ;; “Follow the example of the Dutch POSIX locale, using ISO-8859-9 to
1230 ;; cater to the many Turks in Dutch society.” Perhaps German methods
1231 ;; should do so too. Follow turkish-alt-postfix here.
1232 ("i/" ?ı) ;; LATIN SMALL LETTER I WITH NO DOT
1233 ("s," ?ş) ;; LATIN SMALL LETTER S WITH CEDILLA
1234 ("g^" ?ğ) ;; LATIN SMALL LETTER G WITH BREVE
1235 ("I/" ?İ) ;; LATIN CAPITAL LETTER I WITH DOT ABOVE
1236 ("S," ?Ş) ;; LATIN CAPITAL LETTER S WITH CEDILLA
1237 ("G^" ?Ğ) ;; LATIN CAPITAL LETTER G WITH BREVE
1238 ) 1224 )
1239 1225
1240;; Originally from Yudit, discussed with Albertas Agejevas 1226;; Originally from Yudit, discussed with Albertas Agejevas
diff --git a/lisp/loadhist.el b/lisp/loadhist.el
index 28d0b18c812..24c3acd1b99 100644
--- a/lisp/loadhist.el
+++ b/lisp/loadhist.el
@@ -162,6 +162,65 @@ documentation of `unload-feature' for details.")
162 ;; mode, or proposed is not nil and not major-mode, and so we use it. 162 ;; mode, or proposed is not nil and not major-mode, and so we use it.
163 (funcall (or proposed 'fundamental-mode))))))) 163 (funcall (or proposed 'fundamental-mode)))))))
164 164
165(cl-defgeneric loadhist-unload-element (x)
166 "Unload an element from the `load-history'."
167 (message "Unexpected element %S in load-history" x))
168
169;; In `load-history', the definition of a previously autoloaded
170;; function is represented by 2 entries: (t . SYMBOL) comes before
171;; (defun . SYMBOL) and says we should restore SYMBOL's autoload when
172;; we undefine it.
173;; So we use this auxiliary variable to keep track of the last (t . SYMBOL)
174;; that occurred.
175(defvar loadhist--restore-autoload
176 "If non-nil, this is a symbol for which we should
177restore a previous autoload if possible.")
178
179(cl-defmethod loadhist-unload-element ((x (head t)))
180 (setq loadhist--restore-autoload (cdr x)))
181
182(defun loadhist--unload-function (x)
183 (let ((fun (cdr x)))
184 (when (fboundp fun)
185 (when (fboundp 'ad-unadvise)
186 (ad-unadvise fun))
187 (let ((aload (get fun 'autoload)))
188 (defalias fun
189 (if (and aload (eq fun loadhist--restore-autoload))
190 (cons 'autoload aload)
191 nil)))))
192 (setq loadhist--restore-autoload nil))
193
194(cl-defmethod loadhist-unload-element ((x (head defun)))
195 (loadhist--unload-function x))
196(cl-defmethod loadhist-unload-element ((x (head autoload)))
197 (loadhist--unload-function x))
198
199(cl-defmethod loadhist-unload-element ((_ (head require))) nil)
200(cl-defmethod loadhist-unload-element ((_ (head defface))) nil)
201
202(cl-defmethod loadhist-unload-element ((x (head provide)))
203 ;; Remove any feature names that this file provided.
204 (setq features (delq (cdr x) features)))
205
206(cl-defmethod loadhist-unload-element ((x symbol))
207 ;; Kill local values as much as possible.
208 (dolist (buf (buffer-list))
209 (with-current-buffer buf
210 (if (and (boundp x) (timerp (symbol-value x)))
211 (cancel-timer (symbol-value x)))
212 (kill-local-variable x)))
213 (if (and (boundp x) (timerp (symbol-value x)))
214 (cancel-timer (symbol-value x)))
215 ;; Get rid of the default binding if we can.
216 (unless (local-variable-if-set-p x)
217 (makunbound x)))
218
219(cl-defmethod loadhist-unload-element ((x (head define-type)))
220 (let* ((name (cdr x)))
221 ;; Remove the struct.
222 (setf (cl--find-class name) nil)))
223
165;;;###autoload 224;;;###autoload
166(defun unload-feature (feature &optional force) 225(defun unload-feature (feature &optional force)
167 "Unload the library that provided FEATURE. 226 "Unload the library that provided FEATURE.
@@ -200,9 +259,6 @@ something strange, such as redefining an Emacs function."
200 (prin1-to-string dependents) file)))) 259 (prin1-to-string dependents) file))))
201 (let* ((unload-function-defs-list (feature-symbols feature)) 260 (let* ((unload-function-defs-list (feature-symbols feature))
202 (file (pop unload-function-defs-list)) 261 (file (pop unload-function-defs-list))
203 ;; If non-nil, this is a symbol for which we should
204 ;; restore a previous autoload if possible.
205 restore-autoload
206 (name (symbol-name feature)) 262 (name (symbol-name feature))
207 (unload-hook (intern-soft (concat name "-unload-hook"))) 263 (unload-hook (intern-soft (concat name "-unload-hook")))
208 (unload-func (intern-soft (concat name "-unload-function")))) 264 (unload-func (intern-soft (concat name "-unload-function"))))
@@ -250,38 +306,7 @@ something strange, such as redefining an Emacs function."
250 (when (symbolp elt) 306 (when (symbolp elt)
251 (elp-restore-function elt)))) 307 (elp-restore-function elt))))
252 308
253 (dolist (x unload-function-defs-list) 309 (mapc #'loadhist-unload-element unload-function-defs-list)
254 (if (consp x)
255 (pcase (car x)
256 ;; Remove any feature names that this file provided.
257 (`provide
258 (setq features (delq (cdr x) features)))
259 ((or `defun `autoload)
260 (let ((fun (cdr x)))
261 (when (fboundp fun)
262 (when (fboundp 'ad-unadvise)
263 (ad-unadvise fun))
264 (let ((aload (get fun 'autoload)))
265 (if (and aload (eq fun restore-autoload))
266 (fset fun (cons 'autoload aload))
267 (fmakunbound fun))))))
268 ;; (t . SYMBOL) comes before (defun . SYMBOL)
269 ;; and says we should restore SYMBOL's autoload
270 ;; when we undefine it.
271 (`t (setq restore-autoload (cdr x)))
272 ((or `require `defface) nil)
273 (_ (message "Unexpected element %s in load-history" x)))
274 ;; Kill local values as much as possible.
275 (dolist (buf (buffer-list))
276 (with-current-buffer buf
277 (if (and (boundp x) (timerp (symbol-value x)))
278 (cancel-timer (symbol-value x)))
279 (kill-local-variable x)))
280 (if (and (boundp x) (timerp (symbol-value x)))
281 (cancel-timer (symbol-value x)))
282 ;; Get rid of the default binding if we can.
283 (unless (local-variable-if-set-p x)
284 (makunbound x))))
285 ;; Delete the load-history element for this file. 310 ;; Delete the load-history element for this file.
286 (setq load-history (delq (assoc file load-history) load-history)))) 311 (setq load-history (delq (assoc file load-history) load-history))))
287 ;; Don't return load-history, it is not useful. 312 ;; Don't return load-history, it is not useful.
diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el
index 7ae23434415..b368efbbc95 100644
--- a/lisp/ls-lisp.el
+++ b/lisp/ls-lisp.el
@@ -245,11 +245,11 @@ to fail to line up, e.g. if month names are not all of the same length."
245 "Format to display integer GIDs.") 245 "Format to display integer GIDs.")
246(defvar ls-lisp-gid-s-fmt " %s" 246(defvar ls-lisp-gid-s-fmt " %s"
247 "Format to display user group names.") 247 "Format to display user group names.")
248(defvar ls-lisp-filesize-d-fmt "%d" 248(defvar ls-lisp-filesize-d-fmt " %d"
249 "Format to display integer file sizes.") 249 "Format to display integer file sizes.")
250(defvar ls-lisp-filesize-f-fmt "%.0f" 250(defvar ls-lisp-filesize-f-fmt " %.0f"
251 "Format to display float file sizes.") 251 "Format to display float file sizes.")
252(defvar ls-lisp-filesize-b-fmt "%.0f" 252(defvar ls-lisp-filesize-b-fmt " %.0f"
253 "Format to display file sizes in blocks (for the -s switch).") 253 "Format to display file sizes in blocks (for the -s switch).")
254 254
255;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 255;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index df07140d87b..b2405882896 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -2828,8 +2828,6 @@ The current mail message becomes the message displayed."
2828 (re-search-forward "mime-version: 1.0" nil t)) 2828 (re-search-forward "mime-version: 1.0" nil t))
2829 (let ((rmail-buffer mbox-buf) 2829 (let ((rmail-buffer mbox-buf)
2830 (rmail-view-buffer view-buf)) 2830 (rmail-view-buffer view-buf))
2831 (setq showing-message t)
2832 (message "Showing message %d..." msg)
2833 (set (make-local-variable 'rmail-mime-decoded) t) 2831 (set (make-local-variable 'rmail-mime-decoded) t)
2834 (funcall rmail-show-mime-function)) 2832 (funcall rmail-show-mime-function))
2835 (setq body-start (search-forward "\n\n" nil t)) 2833 (setq body-start (search-forward "\n\n" nil t))
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index 9c7bcffbaab..05a336bfe28 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -1101,17 +1101,77 @@ The selected font will be the default on both the existing and future frames."
1101 :button (:radio . (eq tool-bar-mode nil)))) 1101 :button (:radio . (eq tool-bar-mode nil))))
1102 menu))) 1102 menu)))
1103 1103
1104(defun menu-bar-display-line-numbers-mode (type)
1105 (setq display-line-numbers-type type)
1106 (if global-display-line-numbers-mode
1107 (global-display-line-numbers-mode)
1108 (display-line-numbers-mode)))
1109
1110(defvar menu-bar-showhide-line-numbers-menu
1111 (let ((menu (make-sparse-keymap "Line Numbers")))
1112
1113 (bindings--define-key menu [visual]
1114 `(menu-item "Visual Line Numbers"
1115 ,(lambda ()
1116 (interactive)
1117 (menu-bar-display-line-numbers-mode 'visual)
1118 (message "Visual line numbers enabled"))
1119 :help "Enable visual line numbers"
1120 :button (:radio . (eq display-line-numbers 'visual))
1121 :visible (menu-bar-menu-frame-live-and-visible-p)))
1122
1123 (bindings--define-key menu [relative]
1124 `(menu-item "Relative Line Numbers"
1125 ,(lambda ()
1126 (interactive)
1127 (menu-bar-display-line-numbers-mode 'relative)
1128 (message "Relative line numbers enabled"))
1129 :help "Enable relative line numbers"
1130 :button (:radio . (eq display-line-numbers 'relative))
1131 :visible (menu-bar-menu-frame-live-and-visible-p)))
1132
1133 (bindings--define-key menu [absolute]
1134 `(menu-item "Absolute Line Numbers"
1135 ,(lambda ()
1136 (interactive)
1137 (menu-bar-display-line-numbers-mode t)
1138 (setq display-line-numbers t)
1139 (message "Absolute line numbers enabled"))
1140 :help "Enable absolute line numbers"
1141 :button (:radio . (eq display-line-numbers t))
1142 :visible (menu-bar-menu-frame-live-and-visible-p)))
1143
1144 (bindings--define-key menu [none]
1145 `(menu-item "No Line Numbers"
1146 ,(lambda ()
1147 (interactive)
1148 (menu-bar-display-line-numbers-mode nil)
1149 (message "Line numbers disabled"))
1150 :help "Disable line numbers"
1151 :button (:radio . (null display-line-numbers))
1152 :visible (menu-bar-menu-frame-live-and-visible-p)))
1153
1154 (bindings--define-key menu [global]
1155 (menu-bar-make-mm-toggle global-display-line-numbers-mode
1156 "Global Line Numbers Mode"
1157 "Set line numbers globally"))
1158 menu))
1159
1104(defvar menu-bar-showhide-menu 1160(defvar menu-bar-showhide-menu
1105 (let ((menu (make-sparse-keymap "Show/Hide"))) 1161 (let ((menu (make-sparse-keymap "Show/Hide")))
1106 1162
1163 (bindings--define-key menu [display-line-numbers]
1164 `(menu-item "Line Numbers for All Lines"
1165 ,menu-bar-showhide-line-numbers-menu))
1166
1107 (bindings--define-key menu [column-number-mode] 1167 (bindings--define-key menu [column-number-mode]
1108 (menu-bar-make-mm-toggle column-number-mode 1168 (menu-bar-make-mm-toggle column-number-mode
1109 "Column Numbers" 1169 "Column Numbers in Mode Line"
1110 "Show the current column number in the mode line")) 1170 "Show the current column number in the mode line"))
1111 1171
1112 (bindings--define-key menu [line-number-mode] 1172 (bindings--define-key menu [line-number-mode]
1113 (menu-bar-make-mm-toggle line-number-mode 1173 (menu-bar-make-mm-toggle line-number-mode
1114 "Line Numbers" 1174 "Line Numbers in Mode Line"
1115 "Show the current line number in the mode line")) 1175 "Show the current line number in the mode line"))
1116 1176
1117 (bindings--define-key menu [size-indication-mode] 1177 (bindings--define-key menu [size-indication-mode]
diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index 4d4e8a809e1..fe93fc32ad3 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -945,6 +945,7 @@ If EXTERNAL, browse the URL using `shr-external-browser'."
945 (when (and (buffer-name buffer) 945 (when (and (buffer-name buffer)
946 (not (plist-get status :error))) 946 (not (plist-get status :error)))
947 (url-store-in-cache image-buffer) 947 (url-store-in-cache image-buffer)
948 (goto-char (point-min))
948 (when (or (search-forward "\n\n" nil t) 949 (when (or (search-forward "\n\n" nil t)
949 (search-forward "\r\n\r\n" nil t)) 950 (search-forward "\r\n\r\n" nil t))
950 (let ((data (shr-parse-image-data))) 951 (let ((data (shr-parse-image-data)))
@@ -998,7 +999,7 @@ element is the data blob and the second element is the content-type."
998 (create-image data nil t :ascent 100 999 (create-image data nil t :ascent 100
999 :format content-type)) 1000 :format content-type))
1000 ((eq content-type 'image/svg+xml) 1001 ((eq content-type 'image/svg+xml)
1001 (create-image data 'imagemagick t :ascent 100)) 1002 (create-image data 'svg t :ascent 100))
1002 ((eq size 'full) 1003 ((eq size 'full)
1003 (ignore-errors 1004 (ignore-errors
1004 (shr-rescale-image data content-type 1005 (shr-rescale-image data content-type
diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el
index ac5a9c45bbd..a162ab00a56 100644
--- a/lisp/net/tramp-cache.el
+++ b/lisp/net/tramp-cache.el
@@ -136,7 +136,11 @@ Returns DEFAULT if not set."
136 (tramp-message key 8 "%s %s %s" file property value) 136 (tramp-message key 8 "%s %s %s" file property value)
137 (when (>= tramp-verbose 10) 137 (when (>= tramp-verbose 10)
138 (let* ((var (intern (concat "tramp-cache-get-count-" property))) 138 (let* ((var (intern (concat "tramp-cache-get-count-" property)))
139 (val (or (and (boundp var) (symbol-value var)) 0))) 139 (val (or (bound-and-true-p var)
140 (progn
141 (add-hook 'tramp-cache-unload-hook
142 (lambda () (makunbound var)))
143 0))))
140 (set var (1+ val)))) 144 (set var (1+ val))))
141 value)) 145 value))
142 146
@@ -156,7 +160,11 @@ Returns VALUE."
156 (tramp-message key 8 "%s %s %s" file property value) 160 (tramp-message key 8 "%s %s %s" file property value)
157 (when (>= tramp-verbose 10) 161 (when (>= tramp-verbose 10)
158 (let* ((var (intern (concat "tramp-cache-set-count-" property))) 162 (let* ((var (intern (concat "tramp-cache-set-count-" property)))
159 (val (or (and (boundp var) (symbol-value var)) 0))) 163 (val (or (bound-and-true-p var)
164 (progn
165 (add-hook 'tramp-cache-unload-hook
166 (lambda () (makunbound var)))
167 0))))
160 (set var (1+ val)))) 168 (set var (1+ val))))
161 value)) 169 value))
162 170
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 94518d0d359..4beb6fe5216 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -3432,7 +3432,9 @@ the result will be a local, non-Tramp, file name."
3432 `((,(tramp-file-name-regexp) . tramp-vc-file-name-handler)))) 3432 `((,(tramp-file-name-regexp) . tramp-vc-file-name-handler))))
3433 3433
3434 ;; Here we collect only file names, which need an operation. 3434 ;; Here we collect only file names, which need an operation.
3435 (ignore-errors (tramp-run-real-handler 'vc-registered (list file))) 3435 (tramp-with-demoted-errors
3436 v "Error in 1st pass of `vc-registered': %s"
3437 (tramp-run-real-handler 'vc-registered (list file)))
3436 (tramp-message v 10 "\n%s" tramp-vc-registered-file-names) 3438 (tramp-message v 10 "\n%s" tramp-vc-registered-file-names)
3437 3439
3438 ;; Send just one command, in order to fill the cache. 3440 ;; Send just one command, in order to fill the cache.
@@ -3493,7 +3495,8 @@ the result will be a local, non-Tramp, file name."
3493 v vc-hg-program (tramp-get-remote-path v))))) 3495 v vc-hg-program (tramp-get-remote-path v)))))
3494 (setq vc-handled-backends (remq 'Hg vc-handled-backends))) 3496 (setq vc-handled-backends (remq 'Hg vc-handled-backends)))
3495 ;; Run. 3497 ;; Run.
3496 (ignore-errors 3498 (tramp-with-demoted-errors
3499 v "Error in 2nd pass of `vc-registered': %s"
3497 (tramp-run-real-handler 'vc-registered (list file)))))))) 3500 (tramp-run-real-handler 'vc-registered (list file))))))))
3498 3501
3499;;;###tramp-autoload 3502;;;###tramp-autoload
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 945f81188c8..8d7fbc068b8 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1641,6 +1641,18 @@ an input event arrives. The other arguments are passed to `tramp-error'."
1641 (when (tramp-file-name-equal-p vec (car tramp-current-connection)) 1641 (when (tramp-file-name-equal-p vec (car tramp-current-connection))
1642 (setcdr tramp-current-connection (current-time))))))) 1642 (setcdr tramp-current-connection (current-time)))))))
1643 1643
1644(defmacro tramp-with-demoted-errors (vec-or-proc format &rest body)
1645 "Execute BODY while redirecting the error message to `tramp-message'.
1646BODY is executed like wrapped by `with-demoted-errors'. FORMAT
1647is a format-string containing a %-sequence meaning to substitute
1648the resulting error message."
1649 (declare (debug (symbolp body))
1650 (indent 2))
1651 (let ((err (make-symbol "err")))
1652 `(condition-case-unless-debug ,err
1653 (progn ,@body)
1654 (error (tramp-message ,vec-or-proc 3 ,format ,err) nil))))
1655
1644(defmacro with-parsed-tramp-file-name (filename var &rest body) 1656(defmacro with-parsed-tramp-file-name (filename var &rest body)
1645 "Parse a Tramp filename and make components available in the body. 1657 "Parse a Tramp filename and make components available in the body.
1646 1658
diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el
index 4be487e1f4f..527630d747c 100644
--- a/lisp/net/trampver.el
+++ b/lisp/net/trampver.el
@@ -7,7 +7,7 @@
7;; Maintainer: Michael Albinus <michael.albinus@gmx.de> 7;; Maintainer: Michael Albinus <michael.albinus@gmx.de>
8;; Keywords: comm, processes 8;; Keywords: comm, processes
9;; Package: tramp 9;; Package: tramp
10;; Version: 2.3.2 10;; Version: 2.3.3-pre
11 11
12;; This file is part of GNU Emacs. 12;; This file is part of GNU Emacs.
13 13
@@ -33,7 +33,7 @@
33;; should be changed only there. 33;; should be changed only there.
34 34
35;;;###tramp-autoload 35;;;###tramp-autoload
36(defconst tramp-version "2.3.2" 36(defconst tramp-version "2.3.3-pre"
37 "This version of Tramp.") 37 "This version of Tramp.")
38 38
39;;;###tramp-autoload 39;;;###tramp-autoload
@@ -55,7 +55,7 @@
55;; Check for Emacs version. 55;; Check for Emacs version.
56(let ((x (if (>= emacs-major-version 24) 56(let ((x (if (>= emacs-major-version 24)
57 "ok" 57 "ok"
58 (format "Tramp 2.3.2 is not fit for %s" 58 (format "Tramp 2.3.3-pre is not fit for %s"
59 (when (string-match "^.*$" (emacs-version)) 59 (when (string-match "^.*$" (emacs-version))
60 (match-string 0 (emacs-version))))))) 60 (match-string 0 (emacs-version)))))))
61 (unless (string-match "\\`ok\\'" x) (error "%s" x))) 61 (unless (string-match "\\`ok\\'" x) (error "%s" x)))
diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el
index 121ba24f090..dec59c58090 100644
--- a/lisp/progmodes/cc-cmds.el
+++ b/lisp/progmodes/cc-cmds.el
@@ -1843,19 +1843,25 @@ with a brace block."
1843 (unless (eq where 'at-header) 1843 (unless (eq where 'at-header)
1844 (c-backward-to-nth-BOF-{ 1 where) 1844 (c-backward-to-nth-BOF-{ 1 where)
1845 (c-beginning-of-decl-1)) 1845 (c-beginning-of-decl-1))
1846 (when (looking-at c-typedef-key)
1847 (goto-char (match-end 0))
1848 (c-forward-syntactic-ws))
1846 1849
1847 ;; Pick out the defun name, according to the type of defun. 1850 ;; Pick out the defun name, according to the type of defun.
1848 (cond 1851 (cond
1849 ;; struct, union, enum, or similar: 1852 ;; struct, union, enum, or similar:
1850 ((and (looking-at c-type-prefix-key) 1853 ((looking-at c-type-prefix-key)
1851 (progn (c-forward-token-2 2) ; over "struct foo " 1854 (let ((key-pos (point)))
1852 (or (eq (char-after) ?\{) 1855 (c-forward-token-2 1) ; over "struct ".
1853 (looking-at c-symbol-key)))) ; "struct foo bar ..." 1856 (cond
1854 (save-match-data (c-forward-token-2)) 1857 ((looking-at c-symbol-key) ; "struct foo { ..."
1855 (when (eq (char-after) ?\{) 1858 (buffer-substring-no-properties key-pos (match-end 0)))
1856 (c-backward-token-2) 1859 ((eq (char-after) ?{) ; "struct { ... } foo"
1857 (looking-at c-symbol-key)) 1860 (when (c-go-list-forward)
1858 (match-string-no-properties 0)) 1861 (c-forward-syntactic-ws)
1862 (when (looking-at c-symbol-key) ; a bit bogus - there might
1863 ; be several identifiers.
1864 (match-string-no-properties 0)))))))
1859 1865
1860 ((looking-at "DEFUN\\s-*(") ;"DEFUN\\_>") think of XEmacs! 1866 ((looking-at "DEFUN\\s-*(") ;"DEFUN\\_>") think of XEmacs!
1861 ;; DEFUN ("file-name-directory", Ffile_name_directory, Sfile_name_directory, ...) ==> Ffile_name_directory 1867 ;; DEFUN ("file-name-directory", Ffile_name_directory, Sfile_name_directory, ...) ==> Ffile_name_directory
@@ -1900,7 +1906,8 @@ with a brace block."
1900 (c-backward-syntactic-ws)) 1906 (c-backward-syntactic-ws))
1901 (setq name-end (point)) 1907 (setq name-end (point))
1902 (c-back-over-compound-identifier) 1908 (c-back-over-compound-identifier)
1903 (buffer-substring-no-properties (point) name-end))))))))) 1909 (and (looking-at c-symbol-start)
1910 (buffer-substring-no-properties (point) name-end))))))))))
1904 1911
1905(defun c-declaration-limits (near) 1912(defun c-declaration-limits (near)
1906 ;; Return a cons of the beginning and end positions of the current 1913 ;; Return a cons of the beginning and end positions of the current
diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el
index eb7bde0f767..ab910ab7dec 100644
--- a/lisp/progmodes/cc-defs.el
+++ b/lisp/progmodes/cc-defs.el
@@ -417,6 +417,17 @@ to it is returned. This function does not modify the point or the mark."
417 ;; Emacs. 417 ;; Emacs.
418 `(setq mark-active ,activate))) 418 `(setq mark-active ,activate)))
419 419
420(defmacro c-set-keymap-parent (map parent)
421 (cond
422 ;; XEmacs
423 ((cc-bytecomp-fboundp 'set-keymap-parents)
424 `(set-keymap-parents ,map ,parent))
425 ;; Emacs
426 ((cc-bytecomp-fboundp 'set-keymap-parent)
427 `(set-keymap-parent ,map ,parent))
428 ;; incompatible
429 (t (error "CC Mode is incompatible with this version of Emacs"))))
430
420(defmacro c-delete-and-extract-region (start end) 431(defmacro c-delete-and-extract-region (start end)
421 "Delete the text between START and END and return it." 432 "Delete the text between START and END and return it."
422 (if (cc-bytecomp-fboundp 'delete-and-extract-region) 433 (if (cc-bytecomp-fboundp 'delete-and-extract-region)
@@ -1266,6 +1277,7 @@ with value CHAR in the region [FROM to)."
1266(def-edebug-spec cc-eval-when-compile (&rest def-form)) 1277(def-edebug-spec cc-eval-when-compile (&rest def-form))
1267(def-edebug-spec c-point t) 1278(def-edebug-spec c-point t)
1268(def-edebug-spec c-set-region-active t) 1279(def-edebug-spec c-set-region-active t)
1280(def-edebug-spec c-set-keymap-parent t)
1269(def-edebug-spec c-safe t) 1281(def-edebug-spec c-safe t)
1270(def-edebug-spec c-save-buffer-state let*) 1282(def-edebug-spec c-save-buffer-state let*)
1271(def-edebug-spec c-tentative-buffer-changes t) 1283(def-edebug-spec c-tentative-buffer-changes t)
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index e880bd39321..59dc96af030 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -6089,7 +6089,8 @@ comment at the start of cc-engine.el for more info."
6089 6089
6090(defsubst c-clear-found-types () 6090(defsubst c-clear-found-types ()
6091 ;; Clears `c-found-types'. 6091 ;; Clears `c-found-types'.
6092 (setq c-found-types (make-vector 53 0))) 6092 (setq c-found-types
6093 (make-hash-table :test #'equal :weakness nil)))
6093 6094
6094(defun c-add-type (from to) 6095(defun c-add-type (from to)
6095 ;; Add the given region as a type in `c-found-types'. If the region 6096 ;; Add the given region as a type in `c-found-types'. If the region
@@ -6103,29 +6104,27 @@ comment at the start of cc-engine.el for more info."
6103 ;; 6104 ;;
6104 ;; This function might do hidden buffer changes. 6105 ;; This function might do hidden buffer changes.
6105 (let ((type (c-syntactic-content from to c-recognize-<>-arglists))) 6106 (let ((type (c-syntactic-content from to c-recognize-<>-arglists)))
6106 (unless (intern-soft type c-found-types) 6107 (unless (gethash type c-found-types)
6107 (unintern (substring type 0 -1) c-found-types) 6108 (remhash (substring type 0 -1) c-found-types)
6108 (intern type c-found-types)))) 6109 (puthash type t c-found-types))))
6109 6110
6110(defun c-unfind-type (name) 6111(defun c-unfind-type (name)
6111 ;; Remove the "NAME" from c-found-types, if present. 6112 ;; Remove the "NAME" from c-found-types, if present.
6112 (unintern name c-found-types)) 6113 (remhash name c-found-types))
6113 6114
6114(defsubst c-check-type (from to) 6115(defsubst c-check-type (from to)
6115 ;; Return non-nil if the given region contains a type in 6116 ;; Return non-nil if the given region contains a type in
6116 ;; `c-found-types'. 6117 ;; `c-found-types'.
6117 ;; 6118 ;;
6118 ;; This function might do hidden buffer changes. 6119 ;; This function might do hidden buffer changes.
6119 (intern-soft (c-syntactic-content from to c-recognize-<>-arglists) 6120 (gethash (c-syntactic-content from to c-recognize-<>-arglists) c-found-types))
6120 c-found-types))
6121 6121
6122(defun c-list-found-types () 6122(defun c-list-found-types ()
6123 ;; Return all the types in `c-found-types' as a sorted list of 6123 ;; Return all the types in `c-found-types' as a sorted list of
6124 ;; strings. 6124 ;; strings.
6125 (let (type-list) 6125 (let (type-list)
6126 (mapatoms (lambda (type) 6126 (maphash (lambda (type _)
6127 (setq type-list (cons (symbol-name type) 6127 (setq type-list (cons type type-list)))
6128 type-list)))
6129 c-found-types) 6128 c-found-types)
6130 (sort type-list 'string-lessp))) 6129 (sort type-list 'string-lessp)))
6131 6130
@@ -7059,6 +7058,7 @@ comment at the start of cc-engine.el for more info."
7059 ;; This function might do hidden buffer changes. 7058 ;; This function might do hidden buffer changes.
7060 7059
7061 (let ((start (point)) 7060 (let ((start (point))
7061 (old-found-types (copy-hash-table c-found-types))
7062 ;; If `c-record-type-identifiers' is set then activate 7062 ;; If `c-record-type-identifiers' is set then activate
7063 ;; recording of any found types that constitute an argument in 7063 ;; recording of any found types that constitute an argument in
7064 ;; the arglist. 7064 ;; the arglist.
@@ -7074,6 +7074,7 @@ comment at the start of cc-engine.el for more info."
7074 (nconc c-record-found-types c-record-type-identifiers))) 7074 (nconc c-record-found-types c-record-type-identifiers)))
7075 t) 7075 t)
7076 7076
7077 (setq c-found-types old-found-types)
7077 (goto-char start) 7078 (goto-char start)
7078 nil))) 7079 nil)))
7079 7080
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index 9b89681c3bf..bf0439ffe8a 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -225,18 +225,7 @@ control). See \"cc-mode.el\" for more info."
225 225
226(defun c-make-inherited-keymap () 226(defun c-make-inherited-keymap ()
227 (let ((map (make-sparse-keymap))) 227 (let ((map (make-sparse-keymap)))
228 ;; Necessary to use `cc-bytecomp-fboundp' below since this 228 (c-set-keymap-parent map c-mode-base-map)
229 ;; function is called from top-level forms that are evaluated
230 ;; while cc-bytecomp is active when one does M-x eval-buffer.
231 (cond
232 ;; Emacs
233 ((cc-bytecomp-fboundp 'set-keymap-parent)
234 (set-keymap-parent map c-mode-base-map))
235 ;; XEmacs
236 ((fboundp 'set-keymap-parents)
237 (set-keymap-parents map c-mode-base-map))
238 ;; incompatible
239 (t (error "CC Mode is incompatible with this version of Emacs")))
240 map)) 229 map))
241 230
242(defun c-define-abbrev-table (name defs &optional doc) 231(defun c-define-abbrev-table (name defs &optional doc)
@@ -276,6 +265,8 @@ control). See \"cc-mode.el\" for more info."
276 nil 265 nil
277 266
278 (setq c-mode-base-map (make-sparse-keymap)) 267 (setq c-mode-base-map (make-sparse-keymap))
268 (when (boundp 'prog-mode-map)
269 (c-set-keymap-parent c-mode-base-map prog-mode-map))
279 270
280 ;; Separate M-BS from C-M-h. The former should remain 271 ;; Separate M-BS from C-M-h. The former should remain
281 ;; backward-kill-word. 272 ;; backward-kill-word.
@@ -446,27 +437,36 @@ preferably use the `c-mode-menu' language constant directly."
446 t)))) 437 t))))
447 438
448(defun c-unfind-coalesced-tokens (beg end) 439(defun c-unfind-coalesced-tokens (beg end)
449 ;; unless the non-empty region (beg end) is entirely WS and there's at 440 ;; If removing the region (beg end) would coalesce an identifier ending at
450 ;; least one character of WS just before or after this region, remove 441 ;; beg with an identifier (fragment) beginning at end, or an identifier
451 ;; the tokens which touch the region from `c-found-types' should they 442 ;; fragment ending at beg with an identifier beginning at end, remove the
452 ;; be present. 443 ;; pertinent identifier(s) from `c-found-types'.
453 (or (c-partial-ws-p beg end) 444 (save-excursion
454 (save-excursion 445 (when (< beg end)
455 (progn 446 (goto-char beg)
456 (goto-char beg) 447 (when
457 (or (eq beg (point-min)) 448 (and (not (bobp))
458 (c-skip-ws-backward (1- beg)) 449 (progn (c-backward-syntactic-ws) (eq (point) beg))
459 (/= (point) beg) 450 (/= (skip-chars-backward c-symbol-chars (1- (point))) 0)
460 (= (c-backward-token-2) 1) 451 (progn (goto-char beg) (c-forward-syntactic-ws) (<= (point) end))
461 (c-unfind-type (buffer-substring-no-properties 452 (> (point) beg)
462 (point) beg))) 453 (goto-char end)
463 (goto-char end) 454 (looking-at c-symbol-char-key))
464 (or (eq end (point-max)) 455 (goto-char beg)
465 (c-skip-ws-forward (1+ end)) 456 (c-simple-skip-symbol-backward)
466 (/= (point) end) 457 (c-unfind-type (buffer-substring-no-properties (point) beg)))
467 (progn (forward-char) (c-end-of-current-token) nil) 458
468 (c-unfind-type (buffer-substring-no-properties 459 (goto-char end)
469 end (point)))))))) 460 (when
461 (and (not (eobp))
462 (progn (c-forward-syntactic-ws) (eq (point) end))
463 (looking-at c-symbol-char-key)
464 (progn (c-backward-syntactic-ws) (>= (point) beg))
465 (< (point) end)
466 (/= (skip-chars-backward c-symbol-chars (1- (point))) 0))
467 (goto-char (1+ end))
468 (c-end-of-current-token)
469 (c-unfind-type (buffer-substring-no-properties end (point)))))))
470 470
471;; c-maybe-stale-found-type records a place near the region being 471;; c-maybe-stale-found-type records a place near the region being
472;; changed where an element of `found-types' might become stale. It 472;; changed where an element of `found-types' might become stale. It
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index c0f1aaf39d4..c69eca22413 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -3734,7 +3734,7 @@ the sections using `cperl-pod-head-face', `cperl-pod-face',
3734 "\\(\\`\n?\\|^\n\\)=" ; POD 3734 "\\(\\`\n?\\|^\n\\)=" ; POD
3735 "\\|" 3735 "\\|"
3736 ;; One extra () before this: 3736 ;; One extra () before this:
3737 "<<" ; HERE-DOC 3737 "<<~?" ; HERE-DOC
3738 "\\(" ; 1 + 1 3738 "\\(" ; 1 + 1
3739 ;; First variant "BLAH" or just ``. 3739 ;; First variant "BLAH" or just ``.
3740 "[ \t]*" ; Yes, whitespace is allowed! 3740 "[ \t]*" ; Yes, whitespace is allowed!
@@ -4000,7 +4000,7 @@ the sections using `cperl-pod-head-face', `cperl-pod-face',
4000 (setq b (point)) 4000 (setq b (point))
4001 ;; We do not search to max, since we may be called from 4001 ;; We do not search to max, since we may be called from
4002 ;; some hook of fontification, and max is random 4002 ;; some hook of fontification, and max is random
4003 (or (and (re-search-forward (concat "^" qtag "$") 4003 (or (and (re-search-forward (concat "^[ \t]*" qtag "$")
4004 stop-point 'toend) 4004 stop-point 'toend)
4005 ;;;(eq (following-char) ?\n) ; XXXX WHY??? 4005 ;;;(eq (following-char) ?\n) ; XXXX WHY???
4006 ) 4006 )
diff --git a/lisp/progmodes/executable.el b/lisp/progmodes/executable.el
index da148bd39aa..7c040e74955 100644
--- a/lisp/progmodes/executable.el
+++ b/lisp/progmodes/executable.el
@@ -83,13 +83,21 @@ When this is `function', only ask when called non-interactively."
83 :type 'regexp 83 :type 'regexp
84 :group 'executable) 84 :group 'executable)
85 85
86
87(defcustom executable-prefix "#!" 86(defcustom executable-prefix "#!"
88 "Interpreter magic number prefix inserted when there was no magic number." 87 "Interpreter magic number prefix inserted when there was no magic number.
89 :version "24.3" ; "#! " -> "#!" 88Use of `executable-prefix-env' is preferable to this option."
89 :version "26.1" ; deprecated
90 :type 'string 90 :type 'string
91 :group 'executable) 91 :group 'executable)
92 92
93(defcustom executable-prefix-env nil
94 "If non-nil, use \"/usr/bin/env\" in interpreter magic number.
95If this variable is non-nil, the interpreter magic number inserted
96by `executable-set-magic' will be \"#!/usr/bin/env INTERPRETER\",
97otherwise it will be \"#!/path/to/INTERPRETER\"."
98 :version "26.1"
99 :type 'boolean
100 :group 'executable)
93 101
94(defcustom executable-chmod 73 102(defcustom executable-chmod 73
95 "After saving, if the file is not executable, set this mode. 103 "After saving, if the file is not executable, set this mode.
@@ -199,7 +207,7 @@ command to find the next error. The buffer is also in `comint-mode' and
199(defun executable-set-magic (interpreter &optional argument 207(defun executable-set-magic (interpreter &optional argument
200 no-query-flag insert-flag) 208 no-query-flag insert-flag)
201 "Set this buffer's interpreter to INTERPRETER with optional ARGUMENT. 209 "Set this buffer's interpreter to INTERPRETER with optional ARGUMENT.
202The variables `executable-magicless-file-regexp', `executable-prefix', 210The variables `executable-magicless-file-regexp', `executable-prefix-env',
203`executable-insert', `executable-query' and `executable-chmod' control 211`executable-insert', `executable-query' and `executable-chmod' control
204when and how magic numbers are inserted or replaced and scripts made 212when and how magic numbers are inserted or replaced and scripts made
205executable." 213executable."
@@ -220,6 +228,14 @@ executable."
220 (and argument (string< "" argument) " ") 228 (and argument (string< "" argument) " ")
221 argument)) 229 argument))
222 230
231 ;; For backward compatibilty, allow `executable-prefix-env' to be
232 ;; overriden by custom `executable-prefix'.
233 (if (string-match "#!\\([ \t]*/usr/bin/env[ \t]*\\)?$" executable-prefix)
234 (if executable-prefix-env
235 (setq argument (concat "/usr/bin/env "
236 (file-name-nondirectory argument))))
237 (setq argument (concat (substring executable-prefix 2) argument)))
238
223 (or buffer-read-only 239 (or buffer-read-only
224 (if buffer-file-name 240 (if buffer-file-name
225 (string-match executable-magicless-file-regexp 241 (string-match executable-magicless-file-regexp
@@ -241,15 +257,13 @@ executable."
241 ;; Make buffer visible before question. 257 ;; Make buffer visible before question.
242 (switch-to-buffer (current-buffer)) 258 (switch-to-buffer (current-buffer))
243 (y-or-n-p (format-message 259 (y-or-n-p (format-message
244 "Replace magic number by `%s%s'? " 260 "Replace magic number by `#!%s'? "
245 executable-prefix argument)))) 261 argument))))
246 (progn 262 (progn
247 (replace-match argument t t nil 1) 263 (replace-match argument t t nil 1)
248 (message "Magic number changed to `%s'" 264 (message "Magic number changed to `#!%s'" argument))))
249 (concat executable-prefix argument))))) 265 (insert "#!" argument ?\n)
250 (insert executable-prefix argument ?\n) 266 (message "Magic number changed to `#!%s'" argument))))
251 (message "Magic number changed to `%s'"
252 (concat executable-prefix argument)))))
253 interpreter) 267 interpreter)
254 268
255 269
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index b3d8a51ceeb..2ddaf884bce 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -47,8 +47,8 @@ to avoid computing them again.")
47(defun grep-apply-setting (symbol value) 47(defun grep-apply-setting (symbol value)
48 "Set SYMBOL to VALUE, and update `grep-host-defaults-alist'. 48 "Set SYMBOL to VALUE, and update `grep-host-defaults-alist'.
49SYMBOL should be one of `grep-command', `grep-template', 49SYMBOL should be one of `grep-command', `grep-template',
50`grep-use-null-device', `grep-find-command', 50`grep-use-null-device', `grep-find-command' `grep-find-template',
51`grep-find-template', `grep-find-use-xargs', or 51`grep-find-use-xargs', `grep-use-null-filename-separator', or
52`grep-highlight-matches'." 52`grep-highlight-matches'."
53 (when grep-host-defaults-alist 53 (when grep-host-defaults-alist
54 (let* ((host-id 54 (let* ((host-id
@@ -160,6 +160,15 @@ Customize or call the function `grep-apply-setting'."
160 :set 'grep-apply-setting 160 :set 'grep-apply-setting
161 :group 'grep) 161 :group 'grep)
162 162
163(defcustom grep-use-null-filename-separator 'auto-detect
164 "If non-nil, use `grep's `--null' option.
165This is done to disambiguate file names in `grep's output."
166 :type '(choice (const :tag "Do Not Use `--null'" nil)
167 (const :tag "Use `--null'" t)
168 (other :tag "Not Set" auto-detect))
169 :set 'grep-apply-setting
170 :group 'grep)
171
163;;;###autoload 172;;;###autoload
164(defcustom grep-find-command nil 173(defcustom grep-find-command nil
165 "The default find command for \\[grep-find]. 174 "The default find command for \\[grep-find].
@@ -357,33 +366,53 @@ A grep buffer becomes most recent when you select Grep mode in it.
357Notice that using \\[next-error] or \\[compile-goto-error] modifies 366Notice that using \\[next-error] or \\[compile-goto-error] modifies
358`compilation-last-buffer' rather than `grep-last-buffer'.") 367`compilation-last-buffer' rather than `grep-last-buffer'.")
359 368
360;;;###autoload 369(defconst grep--regexp-alist-column
361(defconst grep-regexp-alist 370 ;; Calculate column positions (col . end-col) of first grep match on a line
362 '( 371 (cons
363 ;; Use a tight regexp to handle weird file names (with colons 372 (lambda ()
373 (when grep-highlight-matches
374 (let* ((beg (match-end 0))
375 (end (save-excursion (goto-char beg) (line-end-position)))
376 (mbeg (text-property-any beg end 'font-lock-face 'grep-match-face)))
377 (when mbeg
378 (- mbeg beg)))))
379 (lambda ()
380 (when grep-highlight-matches
381 (let* ((beg (match-end 0))
382 (end (save-excursion (goto-char beg) (line-end-position)))
383 (mbeg (text-property-any beg end 'font-lock-face 'grep-match-face))
384 (mend (and mbeg (next-single-property-change mbeg 'font-lock-face nil end))))
385 (when mend
386 (- mend beg)))))))
387(defconst grep--regexp-alist-bin-matcher
388 '("^Binary file \\(.+\\) matches$" 1 nil nil 0 1))
389(defconst grep-with-null-regexp-alist
390 `(("^\\([^\0]+\\)\\(\0\\)\\([0-9]+\\):" 1 3 ,grep--regexp-alist-column nil nil
391 (2 '(face unspecified display ":")))
392 ,grep--regexp-alist-bin-matcher)
393 "Regexp used to match grep hits.
394See `compilation-error-regexp-alist'.")
395(defconst grep-fallback-regexp-alist
396 `(;; Use a tight regexp to handle weird file names (with colons
364 ;; in them) as well as possible. E.g., use [1-9][0-9]* rather 397 ;; in them) as well as possible. E.g., use [1-9][0-9]* rather
365 ;; than [0-9]+ so as to accept ":034:" in file names. 398 ;; than [0-9]+ so as to accept ":034:" in file names.
366 ("^\\(.*?[^/\n]\\):[ \t]*\\([1-9][0-9]*\\)[ \t]*:" 399 ("^\\(.*?[^/\n]\\):[ \t]*\\([1-9][0-9]*\\)[ \t]*:"
367 1 2 400 1 2 ,grep--regexp-alist-column)
368 ;; Calculate column positions (col . end-col) of first grep match on a line 401 ,grep--regexp-alist-bin-matcher)
369 ((lambda () 402 "Regexp used to match grep hits when `--null' is not supported.
370 (when grep-highlight-matches 403See `compilation-error-regexp-alist'.")
371 (let* ((beg (match-end 0)) 404
372 (end (save-excursion (goto-char beg) (line-end-position))) 405(defvaralias 'grep-regex-alist 'grep-with-null-regexp-alist)
373 (mbeg (text-property-any beg end 'font-lock-face grep-match-face))) 406(make-obsolete-variable
374 (when mbeg 407 'grep-regex-alist "Call `grep-regexp-alist' instead." "26.1")
375 (- mbeg beg))))) 408
376 . 409;;;###autoload
377 (lambda () 410(defun grep-regexp-alist ()
378 (when grep-highlight-matches 411 "Return a regexp alist to match grep hits.
379 (let* ((beg (match-end 0)) 412The regexp used depends on `grep-use-null-filename-separator'.
380 (end (save-excursion (goto-char beg) (line-end-position))) 413See `compilation-error-regexp-alist' for format details."
381 (mbeg (text-property-any beg end 'font-lock-face grep-match-face)) 414 (if grep-use-null-filename-separator
382 (mend (and mbeg (next-single-property-change mbeg 'font-lock-face nil end)))) 415 grep-with-null-regexp-alist grep-fallback-regexp-alist))
383 (when mend
384 (- mend beg)))))))
385 ("^Binary file \\(.+\\) matches$" 1 nil nil 0 1))
386 "Regexp used to match grep hits. See `compilation-error-regexp-alist'.")
387 416
388(defvar grep-first-column 0 ; bug#10594 417(defvar grep-first-column 0 ; bug#10594
389 "Value to use for `compilation-first-column' in grep buffers.") 418 "Value to use for `compilation-first-column' in grep buffers.")
@@ -538,6 +567,8 @@ This function is called from `compilation-filter-hook'."
538 (grep-use-null-device ,grep-use-null-device) 567 (grep-use-null-device ,grep-use-null-device)
539 (grep-find-command ,grep-find-command) 568 (grep-find-command ,grep-find-command)
540 (grep-find-template ,grep-find-template) 569 (grep-find-template ,grep-find-template)
570 (grep-use-null-filename-separator
571 ,grep-use-null-filename-separator)
541 (grep-find-use-xargs ,grep-find-use-xargs) 572 (grep-find-use-xargs ,grep-find-use-xargs)
542 (grep-highlight-matches ,grep-highlight-matches))))) 573 (grep-highlight-matches ,grep-highlight-matches)))))
543 (let* ((host-id 574 (let* ((host-id
@@ -550,7 +581,8 @@ This function is called from `compilation-filter-hook'."
550 ;; computed for every host once. 581 ;; computed for every host once.
551 (dolist (setting '(grep-command grep-template 582 (dolist (setting '(grep-command grep-template
552 grep-use-null-device grep-find-command 583 grep-use-null-device grep-find-command
553 grep-find-template grep-find-use-xargs 584 grep-use-null-filename-separator
585 grep-find-template grep-find-use-xargs
554 grep-highlight-matches)) 586 grep-highlight-matches))
555 (set setting 587 (set setting
556 (cadr (or (assq setting host-defaults) 588 (cadr (or (assq setting host-defaults)
@@ -576,6 +608,21 @@ This function is called from `compilation-filter-hook'."
576 (concat (regexp-quote hello-file) 608 (concat (regexp-quote hello-file)
577 ":[0-9]+:English"))))))))) 609 ":[0-9]+:English")))))))))
578 610
611 (when (eq grep-use-null-filename-separator 'auto-detect)
612 (setq grep-use-null-filename-separator
613 (with-temp-buffer
614 (let* ((hello-file (expand-file-name "HELLO" data-directory))
615 (args `("--null" "-ne" "^English" ,hello-file)))
616 (if grep-use-null-device
617 (setq args (append args (list null-device)))
618 (push "-H" args))
619 (and (grep-probe grep-program `(nil t nil ,@args))
620 (progn
621 (goto-char (point-min))
622 (looking-at
623 (concat (regexp-quote hello-file)
624 "\0[0-9]+:English"))))))))
625
579 (when (eq grep-highlight-matches 'auto-detect) 626 (when (eq grep-highlight-matches 'auto-detect)
580 (setq grep-highlight-matches 627 (setq grep-highlight-matches
581 (with-temp-buffer 628 (with-temp-buffer
@@ -591,6 +638,7 @@ This function is called from `compilation-filter-hook'."
591 grep-template grep-find-template) 638 grep-template grep-find-template)
592 (let ((grep-options 639 (let ((grep-options
593 (concat (if grep-use-null-device "-n" "-nH") 640 (concat (if grep-use-null-device "-n" "-nH")
641 (if grep-use-null-filename-separator " --null")
594 (if (grep-probe grep-program 642 (if (grep-probe grep-program
595 `(nil nil nil "-e" "foo" ,null-device) 643 `(nil nil nil "-e" "foo" ,null-device)
596 nil 1) 644 nil 1)
@@ -733,7 +781,7 @@ This function is called from `compilation-filter-hook'."
733 (set (make-local-variable 'compilation-error-face) 781 (set (make-local-variable 'compilation-error-face)
734 grep-hit-face) 782 grep-hit-face)
735 (set (make-local-variable 'compilation-error-regexp-alist) 783 (set (make-local-variable 'compilation-error-regexp-alist)
736 grep-regexp-alist) 784 (grep-regexp-alist))
737 ;; compilation-directory-matcher can't be nil, so we set it to a regexp that 785 ;; compilation-directory-matcher can't be nil, so we set it to a regexp that
738 ;; can never match. 786 ;; can never match.
739 (set (make-local-variable 'compilation-directory-matcher) '("\\`a\\`")) 787 (set (make-local-variable 'compilation-directory-matcher) '("\\`a\\`"))
diff --git a/lisp/progmodes/ld-script.el b/lisp/progmodes/ld-script.el
index 389ddfca6b1..7a666e95297 100644
--- a/lisp/progmodes/ld-script.el
+++ b/lisp/progmodes/ld-script.el
@@ -85,10 +85,12 @@
85 ;; 3.4.5 Other Linker Script Commands 85 ;; 3.4.5 Other Linker Script Commands
86 "ASSERT" "EXTERN" "FORCE_COMMON_ALLOCATION" 86 "ASSERT" "EXTERN" "FORCE_COMMON_ALLOCATION"
87 "INHIBIT_COMMON_ALLOCATION" "INSERT" "AFTER" "BEFORE" 87 "INHIBIT_COMMON_ALLOCATION" "INSERT" "AFTER" "BEFORE"
88 "NOCROSSREFS" "OUTPUT_ARCH" "LD_FEATURE" 88 "NOCROSSREFS" "NOCROSSREFS_TO" "OUTPUT_ARCH" "LD_FEATURE"
89 ;; 3.5.2 PROVIDE 89 ;; 3.5.2 HIDDEN
90 "HIDDEN"
91 ;; 3.5.3 PROVIDE
90 "PROVIDE" 92 "PROVIDE"
91 ;; 3.5.3 PROVIDE_HIDDEN 93 ;; 3.5.4 PROVIDE_HIDDEN
92 "PROVIDE_HIDDEN" 94 "PROVIDE_HIDDEN"
93 ;; 3.6 SECTIONS Command 95 ;; 3.6 SECTIONS Command
94 "SECTIONS" 96 "SECTIONS"
@@ -142,6 +144,7 @@
142 "DEFINED" 144 "DEFINED"
143 "LENGTH" "len" "l" 145 "LENGTH" "len" "l"
144 "LOADADDR" 146 "LOADADDR"
147 "LOG2CEIL"
145 "MAX" 148 "MAX"
146 "MIN" 149 "MIN"
147 "NEXT" 150 "NEXT"
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el
index 3def37a2ea8..6197a53ee66 100644
--- a/lisp/progmodes/perl-mode.el
+++ b/lisp/progmodes/perl-mode.el
@@ -213,25 +213,6 @@
213 (regexp-opt perl--syntax-exp-intro-keywords) 213 (regexp-opt perl--syntax-exp-intro-keywords)
214 "\\|[-?:.,;|&+*=!~({[]\\|\\(^\\)\\)[ \t\n]*"))) 214 "\\|[-?:.,;|&+*=!~({[]\\|\\(^\\)\\)[ \t\n]*")))
215 215
216;; FIXME: handle here-docs and regexps.
217;; <<EOF <<"EOF" <<'EOF' (no space)
218;; see `man perlop'
219;; ?...?
220;; /.../
221;; m [...]
222;; m /.../
223;; q /.../ = '...'
224;; qq /.../ = "..."
225;; qx /.../ = `...`
226;; qr /.../ = precompiled regexp =~=~ m/.../
227;; qw /.../
228;; s /.../.../
229;; s <...> /.../
230;; s '...'...'
231;; tr /.../.../
232;; y /.../.../
233;;
234;; <file*glob>
235(defun perl-syntax-propertize-function (start end) 216(defun perl-syntax-propertize-function (start end)
236 (let ((case-fold-search nil)) 217 (let ((case-fold-search nil))
237 (goto-char start) 218 (goto-char start)
@@ -324,23 +305,25 @@
324 ((concat 305 ((concat
325 "\\(?:" 306 "\\(?:"
326 ;; << "EOF", << 'EOF', or << \EOF 307 ;; << "EOF", << 'EOF', or << \EOF
327 "<<[ \t]*\\('[^'\n]*'\\|\"[^\"\n]*\"\\|\\\\[[:alpha:]][[:alnum:]]*\\)" 308 "<<\\(~\\)?[ \t]*\\('[^'\n]*'\\|\"[^\"\n]*\"\\|\\\\[[:alpha:]][[:alnum:]]*\\)"
328 ;; The <<EOF case which needs perl--syntax-exp-intro-regexp, to 309 ;; The <<EOF case which needs perl--syntax-exp-intro-regexp, to
329 ;; disambiguate with the left-bitshift operator. 310 ;; disambiguate with the left-bitshift operator.
330 "\\|" perl--syntax-exp-intro-regexp "<<\\(?1:\\sw+\\)\\)" 311 "\\|" perl--syntax-exp-intro-regexp "<<\\(?2:\\sw+\\)\\)"
331 ".*\\(\n\\)") 312 ".*\\(\n\\)")
332 (3 (let* ((st (get-text-property (match-beginning 3) 'syntax-table)) 313 (4 (let* ((st (get-text-property (match-beginning 4) 'syntax-table))
333 (name (match-string 1))) 314 (name (match-string 2))
334 (goto-char (match-end 1)) 315 (indented (match-beginning 1)))
316 (goto-char (match-end 2))
335 (if (save-excursion (nth 8 (syntax-ppss (match-beginning 0)))) 317 (if (save-excursion (nth 8 (syntax-ppss (match-beginning 0))))
336 ;; Leave the property of the newline unchanged. 318 ;; Leave the property of the newline unchanged.
337 st 319 st
338 (cons (car (string-to-syntax "< c")) 320 (cons (car (string-to-syntax "< c"))
339 ;; Remember the names of heredocs found on this line. 321 ;; Remember the names of heredocs found on this line.
340 (cons (pcase (aref name 0) 322 (cons (cons (pcase (aref name 0)
341 (`?\\ (substring name 1)) 323 (`?\\ (substring name 1))
342 ((or `?\" `?\' `?\`) (substring name 1 -1)) 324 ((or `?\" `?\' `?\`) (substring name 1 -1))
343 (_ name)) 325 (_ name))
326 indented)
344 (cdr st))))))) 327 (cdr st)))))))
345 ;; We don't call perl-syntax-propertize-special-constructs directly 328 ;; We don't call perl-syntax-propertize-special-constructs directly
346 ;; from the << rule, because there might be other elements (between 329 ;; from the << rule, because there might be other elements (between
@@ -383,7 +366,9 @@
383 (goto-char (nth 8 state))) 366 (goto-char (nth 8 state)))
384 (while (and names 367 (while (and names
385 (re-search-forward 368 (re-search-forward
386 (concat "^" (regexp-quote (pop names)) "\n") 369 (pcase-let ((`(,name . ,indented) (pop names)))
370 (concat "^" (if indented "[ \t]*")
371 (regexp-quote name) "\n"))
387 limit 'move)) 372 limit 'move))
388 (unless names 373 (unless names
389 (put-text-property (1- (point)) (point) 'syntax-table 374 (put-text-property (1- (point)) (point) 'syntax-table
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index b8ec50f14ae..cc9b794c5a0 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -917,20 +917,21 @@ IGNORES is a list of glob patterns."
917 (grep-compute-defaults) 917 (grep-compute-defaults)
918 (defvar grep-find-template) 918 (defvar grep-find-template)
919 (defvar grep-highlight-matches) 919 (defvar grep-highlight-matches)
920 (let* ((grep-find-template (replace-regexp-in-string "<C>" "<C> -E" 920 (pcase-let*
921 grep-find-template t t)) 921 ((grep-find-template (replace-regexp-in-string "<C>" "<C> -E"
922 (grep-highlight-matches nil) 922 grep-find-template t t))
923 ;; TODO: Sanitize the regexp to remove Emacs-specific terms, 923 (grep-highlight-matches nil)
924 ;; so that Grep can search for the "relaxed" version. Can we 924 ;; TODO: Sanitize the regexp to remove Emacs-specific terms,
925 ;; do that reliably enough, without creating false negatives? 925 ;; so that Grep can search for the "relaxed" version. Can we
926 (command (xref--rgrep-command (xref--regexp-to-extended regexp) 926 ;; do that reliably enough, without creating false negatives?
927 files 927 (command (xref--rgrep-command (xref--regexp-to-extended regexp)
928 (expand-file-name dir) 928 files
929 ignores)) 929 (expand-file-name dir)
930 (buf (get-buffer-create " *xref-grep*")) 930 ignores))
931 (grep-re (caar grep-regexp-alist)) 931 (buf (get-buffer-create " *xref-grep*"))
932 status 932 (`(,grep-re ,file-group ,line-group . ,_) (car (grep-regexp-alist)))
933 hits) 933 (status nil)
934 (hits nil))
934 (with-current-buffer buf 935 (with-current-buffer buf
935 (erase-buffer) 936 (erase-buffer)
936 (setq status 937 (setq status
@@ -944,8 +945,8 @@ IGNORES is a list of glob patterns."
944 (not (looking-at grep-re))) 945 (not (looking-at grep-re)))
945 (user-error "Search failed with status %d: %s" status (buffer-string))) 946 (user-error "Search failed with status %d: %s" status (buffer-string)))
946 (while (re-search-forward grep-re nil t) 947 (while (re-search-forward grep-re nil t)
947 (push (list (string-to-number (match-string 2)) 948 (push (list (string-to-number (match-string line-group))
948 (match-string 1) 949 (match-string file-group)
949 (buffer-substring-no-properties (point) (line-end-position))) 950 (buffer-substring-no-properties (point) (line-end-position)))
950 hits))) 951 hits)))
951 (xref--convert-hits (nreverse hits) regexp))) 952 (xref--convert-hits (nreverse hits) regexp)))
diff --git a/lisp/ses.el b/lisp/ses.el
index 741d588e4be..8c5ff2136f9 100644
--- a/lisp/ses.el
+++ b/lisp/ses.el
@@ -167,12 +167,32 @@ Each function is called with ARG=1."
167 ["Export values" ses-export-tsv t] 167 ["Export values" ses-export-tsv t]
168 ["Export formulas" ses-export-tsf t])) 168 ["Export formulas" ses-export-tsf t]))
169 169
170(defconst ses-completion-keys '("\M-\C-i" "\C-i")
171 "List for keys that can be used for completion while editing.")
172
173(defvar ses--completion-table nil
174 "Set globally to what completion table to use depending on type
175 of completion (local printers, cells, etc.). We need to go
176 through a local variable to pass the SES buffer local variable
177 to completing function while the current buffer is the
178 minibuffer.")
179
180(defvar ses--list-orig-buffer nil
181 "Calling buffer for SES listing help. Used for listing local
182 printers or renamed cells.")
183
184
170(defconst ses-mode-edit-map 185(defconst ses-mode-edit-map
171 (let ((keys '("\C-c\C-r" ses-insert-range 186 (let ((keys '("\C-c\C-r" ses-insert-range
172 "\C-c\C-s" ses-insert-ses-range 187 "\C-c\C-s" ses-insert-ses-range
173 [S-mouse-3] ses-insert-range-click 188 [S-mouse-3] ses-insert-range-click
174 [C-S-mouse-3] ses-insert-ses-range-click 189 [C-S-mouse-3] ses-insert-ses-range-click
175 "\M-\C-i" lisp-complete-symbol)) ; FIXME obsolete 190 "\C-h\C-p" ses-list-local-printers
191 "\C-h\C-n" ses-list-named-cells
192 "\M-\C-i" lisp-complete-symbol)) ; redefined
193 ; dynamically in
194 ; editing
195 ; functions
176 (newmap (make-sparse-keymap))) 196 (newmap (make-sparse-keymap)))
177 (set-keymap-parent newmap minibuffer-local-map) 197 (set-keymap-parent newmap minibuffer-local-map)
178 (while keys 198 (while keys
@@ -1715,7 +1735,7 @@ to each symbol."
1715 (set (make-local-variable sym) nil) 1735 (set (make-local-variable sym) nil)
1716 (put sym 'ses-cell (cons row col)))))) ))) 1736 (put sym 'ses-cell (cons row col)))))) )))
1717 ;; Relocate the cell values. 1737 ;; Relocate the cell values.
1718 (let (oldval myrow mycol xrow xcol) 1738 (let (oldval myrow mycol xrow xcol sym)
1719 (cond 1739 (cond
1720 ((and (<= rowincr 0) (<= colincr 0)) 1740 ((and (<= rowincr 0) (<= colincr 0))
1721 ;; Deletion of rows and/or columns. 1741 ;; Deletion of rows and/or columns.
@@ -1725,16 +1745,16 @@ to each symbol."
1725 (dotimes (col (- ses--numcols mincol)) 1745 (dotimes (col (- ses--numcols mincol))
1726 (setq mycol (+ col mincol) 1746 (setq mycol (+ col mincol)
1727 xrow (- myrow rowincr) 1747 xrow (- myrow rowincr)
1728 xcol (- mycol colincr)) 1748 xcol (- mycol colincr)
1729 (let ((sym (ses-cell-symbol myrow mycol))) 1749 sym (ses-cell-symbol myrow mycol))
1730 ;; We don't need to relocate value for renamed cells, as they keep the same 1750 ;; We don't need to relocate value for renamed cells, as they keep the same
1731 ;; symbol. 1751 ;; symbol.
1732 (unless (eq (get sym 'ses-cell) :ses-named) 1752 (unless (eq (get sym 'ses-cell) :ses-named)
1733 (ses-set-cell myrow mycol 'value 1753 (ses-set-cell myrow mycol 'value
1734 (if (and (< xrow ses--numrows) (< xcol ses--numcols)) 1754 (if (and (< xrow ses--numrows) (< xcol ses--numcols))
1735 (ses-cell-value xrow xcol) 1755 (ses-cell-value xrow xcol)
1736 ;; Cell is off the end of the array. 1756 ;; Cell is off the end of the array.
1737 (symbol-value (ses-create-cell-symbol xrow xcol)))))))) 1757 (symbol-value (ses-create-cell-symbol xrow xcol)))))))
1738 (when ses--in-killing-named-cell-list 1758 (when ses--in-killing-named-cell-list
1739 (message "Unbinding killed named cell symbols...") 1759 (message "Unbinding killed named cell symbols...")
1740 (setq ses-start-time (float-time)) 1760 (setq ses-start-time (float-time))
@@ -1754,13 +1774,17 @@ to each symbol."
1754 (dotimes (col (- ses--numcols mincol)) 1774 (dotimes (col (- ses--numcols mincol))
1755 (setq mycol (- distx col) 1775 (setq mycol (- distx col)
1756 xrow (- myrow rowincr) 1776 xrow (- myrow rowincr)
1757 xcol (- mycol colincr)) 1777 xcol (- mycol colincr)
1758 (if (or (< xrow minrow) (< xcol mincol)) 1778 sym (ses-cell-symbol myrow mycol))
1759 ;; Newly-inserted value. 1779 ;; We don't need to relocate value for renamed cells, as they keep the same
1760 (setq oldval nil) 1780 ;; symbol.
1761 ;; Transfer old value. 1781 (unless (eq (get sym 'ses-cell) :ses-named)
1762 (setq oldval (ses-cell-value xrow xcol))) 1782 (if (or (< xrow minrow) (< xcol mincol))
1763 (ses-set-cell myrow mycol 'value oldval))) 1783 ;; Newly-inserted value.
1784 (setq oldval nil)
1785 ;; Transfer old value.
1786 (setq oldval (ses-cell-value xrow xcol)))
1787 (ses-set-cell myrow mycol 'value oldval))))
1764 t)) ; Make testcover happy by returning non-nil here. 1788 t)) ; Make testcover happy by returning non-nil here.
1765 (t 1789 (t
1766 (error "ROWINCR and COLINCR must have the same sign")))) 1790 (error "ROWINCR and COLINCR must have the same sign"))))
@@ -2443,6 +2467,42 @@ to are recalculated first."
2443;;---------------------------------------------------------------------------- 2467;;----------------------------------------------------------------------------
2444;; Input of cell formulas 2468;; Input of cell formulas
2445;;---------------------------------------------------------------------------- 2469;;----------------------------------------------------------------------------
2470(defun ses-edit-cell-complete-symbol ()
2471 (interactive)
2472 (let ((completion-at-point-functions (cons 'ses--edit-cell-completion-at-point-function
2473 completion-at-point-functions)))
2474 (completion-at-point)))
2475
2476(defun ses--edit-cell-completion-at-point-function ()
2477 (and
2478 ses--completion-table
2479 (let* ((bol (save-excursion (move-beginning-of-line nil) (point)))
2480 start end collection
2481 (prefix
2482 (save-excursion
2483 (setq end (point))
2484 (backward-sexp)
2485 (if (< (point) bol)
2486 (progn
2487 (setq start bol)
2488 (buffer-substring start end))
2489 (setq start (point))
2490 (forward-sexp)
2491 (if (>= (point) end)
2492 (progn
2493 (setq end (point))
2494 (buffer-substring start end))
2495 nil))))
2496 prefix-length)
2497 (when (and prefix (null (string= prefix "")))
2498 (setq prefix-length (length prefix))
2499 (maphash (lambda (key val)
2500 (let ((key-name (symbol-name key)))
2501 (when (and (>= (length key-name) prefix-length)
2502 (string= prefix (substring key-name 0 prefix-length)))
2503 (push key-name collection))))
2504 ses--completion-table)
2505 (and collection (list start end collection))))))
2446 2506
2447(defun ses-edit-cell (row col newval) 2507(defun ses-edit-cell (row col newval)
2448 "Display current cell contents in minibuffer, for editing. Returns nil if 2508 "Display current cell contents in minibuffer, for editing. Returns nil if
@@ -2464,6 +2524,10 @@ cell formula was unsafe and user declined confirmation."
2464 (if (stringp formula) 2524 (if (stringp formula)
2465 ;; Position cursor inside close-quote. 2525 ;; Position cursor inside close-quote.
2466 (setq initial (cons initial (length initial)))) 2526 (setq initial (cons initial (length initial))))
2527 (dolist (key ses-completion-keys)
2528 (define-key ses-mode-edit-map key 'ses-edit-cell-complete-symbol))
2529 ;; make it globally visible, so that it can be visible from the minibuffer.
2530 (setq ses--completion-table ses--named-cell-hashmap)
2467 (list row col 2531 (list row col
2468 (read-from-minibuffer (format "Cell %s: " ses--curcell) 2532 (read-from-minibuffer (format "Cell %s: " ses--curcell)
2469 initial 2533 initial
@@ -2558,6 +2622,40 @@ cells."
2558;;---------------------------------------------------------------------------- 2622;;----------------------------------------------------------------------------
2559;; Input of cell-printer functions 2623;; Input of cell-printer functions
2560;;---------------------------------------------------------------------------- 2624;;----------------------------------------------------------------------------
2625(defun ses-read-printer-complete-symbol ()
2626 (interactive)
2627 (let ((completion-at-point-functions (cons 'ses--read-printer-completion-at-point-function
2628 completion-at-point-functions)))
2629 (completion-at-point)))
2630
2631(defun ses--read-printer-completion-at-point-function ()
2632 (let* ((bol (save-excursion (move-beginning-of-line nil) (point)))
2633 start end collection
2634 (prefix
2635 (save-excursion
2636 (setq end (point))
2637 (backward-sexp)
2638 (if (< (point) bol)
2639 (progn
2640 (setq start bol)
2641 (buffer-substring start end))
2642 (setq start (point))
2643 (forward-sexp)
2644 (if (>= (point) end)
2645 (progn
2646 (setq end (point))
2647 (buffer-substring start end))
2648 nil))))
2649 prefix-length)
2650 (when prefix
2651 (setq prefix-length (length prefix))
2652 (maphash (lambda (key val)
2653 (let ((key-name (symbol-name key)))
2654 (when (and (>= (length key-name) prefix-length)
2655 (string= prefix (substring key-name 0 prefix-length)))
2656 (push key-name collection))))
2657 ses--completion-table)
2658 (and collection (list start end collection)))))
2561 2659
2562(defun ses-read-printer (prompt default) 2660(defun ses-read-printer (prompt default)
2563 "Common code for functions `ses-read-cell-printer', `ses-read-column-printer', 2661 "Common code for functions `ses-read-cell-printer', `ses-read-column-printer',
@@ -2570,6 +2668,10 @@ canceled."
2570 (setq prompt (format "%s (default %S): " 2668 (setq prompt (format "%s (default %S): "
2571 (substring prompt 0 -2) 2669 (substring prompt 0 -2)
2572 default))) 2670 default)))
2671 (dolist (key ses-completion-keys)
2672 (define-key ses-mode-edit-map key 'ses-read-printer-complete-symbol))
2673 ;; make it globally visible, so that it can be visible from the minibuffer.
2674 (setq ses--completion-table ses--local-printer-hashmap)
2573 (let ((new (read-from-minibuffer prompt 2675 (let ((new (read-from-minibuffer prompt
2574 nil ; Initial contents. 2676 nil ; Initial contents.
2575 ses-mode-edit-map 2677 ses-mode-edit-map
@@ -3278,6 +3380,78 @@ is non-nil. Newlines and tabs in the export text are escaped."
3278 (setq result (apply #'concat (nreverse result))) 3380 (setq result (apply #'concat (nreverse result)))
3279 (kill-new result))) 3381 (kill-new result)))
3280 3382
3383;;----------------------------------------------------------------------------
3384;; Interactive help on symbols
3385;;----------------------------------------------------------------------------
3386
3387(defun ses-list-local-printers (&optional local-printer-hashmap)
3388 "List local printers in a help buffer. Can be called either
3389during editing a printer or a formula, or while in the SES
3390buffer."
3391 (interactive
3392 (list (cond
3393 ((derived-mode-p 'ses-mode) ses--local-printer-hashmap)
3394 ((minibufferp) ses--completion-table)
3395 ((derived-mode-p 'help-mode) nil)
3396 (t (error "Not in a SES buffer")))))
3397 (when local-printer-hashmap
3398 (let ((ses--list-orig-buffer (or ses--list-orig-buffer (current-buffer))))
3399 (help-setup-xref
3400 (list (lambda (local-printer-hashmap buffer)
3401 (let ((ses--list-orig-buffer
3402 (if (buffer-live-p buffer) buffer)))
3403 (ses-list-local-printers local-printer-hashmap)))
3404 local-printer-hashmap ses--list-orig-buffer)
3405 (called-interactively-p 'interactive))
3406
3407 (save-excursion
3408 (with-help-window (help-buffer)
3409 (if (= 0 (hash-table-count local-printer-hashmap))
3410 (princ "No local printers defined.")
3411 (princ "List of local printers definitions:\n")
3412 (maphash (lambda (key val)
3413 (princ key)
3414 (princ " as ")
3415 (prin1 (ses--locprn-def val))
3416 (princ "\n"))
3417 local-printer-hashmap))
3418 (with-current-buffer standard-output
3419 (buffer-string)))))))
3420
3421(defun ses-list-named-cells (&optional named-cell-hashmap)
3422 "List named cells in a help buffer. Can be called either
3423during editing a printer or a formula, or while in the SES
3424buffer."
3425 (interactive
3426 (list (cond
3427 ((derived-mode-p 'ses-mode) ses--named-cell-hashmap)
3428 ((minibufferp) ses--completion-table)
3429 ((derived-mode-p 'help-mode) nil)
3430 (t (error "Not in a SES buffer")))))
3431 (when named-cell-hashmap
3432 (let ((ses--list-orig-buffer (or ses--list-orig-buffer (current-buffer))))
3433 (help-setup-xref
3434 (list (lambda (named-cell-hashmap buffer)
3435 (let ((ses--list-orig-buffer
3436 (if (buffer-live-p buffer) buffer)))
3437 (ses-list-named-cells named-cell-hashmap)))
3438 named-cell-hashmap ses--list-orig-buffer)
3439 (called-interactively-p 'interactive))
3440
3441 (save-excursion
3442 (with-help-window (help-buffer)
3443 (if (= 0 (hash-table-count named-cell-hashmap))
3444 (princ "No cell was renamed.")
3445 (princ "List of named cells definitions:\n")
3446 (maphash (lambda (key val)
3447 (princ key)
3448 (princ " for ")
3449 (prin1 (ses-create-cell-symbol (car val) (cdr val)))
3450 (princ "\n"))
3451 named-cell-hashmap))
3452 (with-current-buffer standard-output
3453 (buffer-string)))))))
3454
3281 3455
3282;;---------------------------------------------------------------------------- 3456;;----------------------------------------------------------------------------
3283;; Other user commands 3457;; Other user commands
@@ -3460,8 +3634,12 @@ highlighted range in the spreadsheet."
3460 3634
3461(defun ses-replace-name-in-formula (formula old-name new-name) 3635(defun ses-replace-name-in-formula (formula old-name new-name)
3462 (let ((new-formula formula)) 3636 (let ((new-formula formula))
3463 (unless (and (consp formula) 3637 (cond
3464 (eq (car-safe formula) 'quote)) 3638 ((eq (car-safe formula) 'quote))
3639 ((symbolp formula)
3640 (if (eq formula old-name)
3641 (setq new-formula new-name)))
3642 ((consp formula)
3465 (while formula 3643 (while formula
3466 (let ((elt (car-safe formula))) 3644 (let ((elt (car-safe formula)))
3467 (cond 3645 (cond
@@ -3470,8 +3648,8 @@ highlighted range in the spreadsheet."
3470 ((and (symbolp elt) 3648 ((and (symbolp elt)
3471 (eq (car-safe formula) old-name)) 3649 (eq (car-safe formula) old-name))
3472 (setcar formula new-name)))) 3650 (setcar formula new-name))))
3473 (setq formula (cdr formula)))) 3651 (setq formula (cdr formula)))))
3474 new-formula)) 3652 new-formula))
3475 3653
3476(defun ses-rename-cell (new-name &optional cell) 3654(defun ses-rename-cell (new-name &optional cell)
3477 "Rename current cell." 3655 "Rename current cell."
@@ -3496,9 +3674,10 @@ highlighted range in the spreadsheet."
3496 (rowcol (ses-sym-rowcol sym)) 3674 (rowcol (ses-sym-rowcol sym))
3497 (row (car rowcol)) 3675 (row (car rowcol))
3498 (col (cdr rowcol)) 3676 (col (cdr rowcol))
3499 new-rowcol old-name) 3677 new-rowcol old-name old-value)
3500 (setq cell (or cell (ses-get-cell row col)) 3678 (setq cell (or cell (ses-get-cell row col))
3501 old-name (ses-cell-symbol cell) 3679 old-name (ses-cell-symbol cell)
3680 old-value (symbol-value old-name)
3502 new-rowcol (ses-decode-cell-symbol (symbol-name new-name))) 3681 new-rowcol (ses-decode-cell-symbol (symbol-name new-name)))
3503 ;; when ses-rename-cell is called interactively, then 'sym' is the 3682 ;; when ses-rename-cell is called interactively, then 'sym' is the
3504 ;; 'cursor-intangible' property of text at cursor position, while 3683 ;; 'cursor-intangible' property of text at cursor position, while
@@ -3518,10 +3697,12 @@ highlighted range in the spreadsheet."
3518 (put new-name 'ses-cell :ses-named) 3697 (put new-name 'ses-cell :ses-named)
3519 (puthash new-name rowcol ses--named-cell-hashmap)) 3698 (puthash new-name rowcol ses--named-cell-hashmap))
3520 (push `(ses-rename-cell ,old-name ,cell) buffer-undo-list) 3699 (push `(ses-rename-cell ,old-name ,cell) buffer-undo-list)
3700 (cl-pushnew rowcol ses--deferred-write :test #'equal)
3521 ;; Replace name by new name in formula of cells refering to renamed cell. 3701 ;; Replace name by new name in formula of cells refering to renamed cell.
3522 (dolist (ref (ses-cell-references cell)) 3702 (dolist (ref (ses-cell-references cell))
3523 (let* ((x (ses-sym-rowcol ref)) 3703 (let* ((x (ses-sym-rowcol ref))
3524 (xcell (ses-get-cell (car x) (cdr x)))) 3704 (xcell (ses-get-cell (car x) (cdr x))))
3705 (cl-pushnew x ses--deferred-write :test #'equal)
3525 (setf (ses-cell-formula xcell) 3706 (setf (ses-cell-formula xcell)
3526 (ses-replace-name-in-formula 3707 (ses-replace-name-in-formula
3527 (ses-cell-formula xcell) 3708 (ses-cell-formula xcell)
@@ -3532,11 +3713,14 @@ highlighted range in the spreadsheet."
3532 (dolist (ref (ses-formula-references (ses-cell-formula cell))) 3713 (dolist (ref (ses-formula-references (ses-cell-formula cell)))
3533 (let* ((x (ses-sym-rowcol ref)) 3714 (let* ((x (ses-sym-rowcol ref))
3534 (xcell (ses-get-cell (car x) (cdr x)))) 3715 (xcell (ses-get-cell (car x) (cdr x))))
3716 (cl-pushnew x ses--deferred-write :test #'equal)
3535 (setf (ses-cell-references xcell) 3717 (setf (ses-cell-references xcell)
3536 (cons new-name (delq old-name 3718 (cons new-name (delq old-name
3537 (ses-cell-references xcell)))))) 3719 (ses-cell-references xcell))))))
3538 (set (make-local-variable new-name) (symbol-value sym)) 3720 (set (make-local-variable new-name) (symbol-value sym))
3539 (setf (ses-cell--symbol cell) new-name) 3721 (setf (ses-cell--symbol cell) new-name)
3722 ;; set new name to value
3723 (set new-name old-value)
3540 ;; Unbind old name 3724 ;; Unbind old name
3541 (if (eq (get old-name 'ses-cell) :ses-named) 3725 (if (eq (get old-name 'ses-cell) :ses-named)
3542 (ses--unbind-cell-name old-name) 3726 (ses--unbind-cell-name old-name)
diff --git a/lisp/simple.el b/lisp/simple.el
index 1db14a859d6..3d23fc35596 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -5942,6 +5942,10 @@ columns by which window is scrolled from left margin.
5942When the `track-eol' feature is doing its job, the value is 5942When the `track-eol' feature is doing its job, the value is
5943`most-positive-fixnum'.") 5943`most-positive-fixnum'.")
5944 5944
5945(defvar last--line-number-width 0
5946 "Last value of width used for displaying line numbers.
5947Used internally by `line-move-visual'.")
5948
5945(defcustom line-move-ignore-invisible t 5949(defcustom line-move-ignore-invisible t
5946 "Non-nil means commands that move by lines ignore invisible newlines. 5950 "Non-nil means commands that move by lines ignore invisible newlines.
5947When this option is non-nil, \\[next-line], \\[previous-line], \\[move-end-of-line], and \\[move-beginning-of-line] behave 5951When this option is non-nil, \\[next-line], \\[previous-line], \\[move-end-of-line], and \\[move-beginning-of-line] behave
@@ -6212,6 +6216,7 @@ not vscroll."
6212If NOERROR, don't signal an error if we can't move that many lines." 6216If NOERROR, don't signal an error if we can't move that many lines."
6213 (let ((opoint (point)) 6217 (let ((opoint (point))
6214 (hscroll (window-hscroll)) 6218 (hscroll (window-hscroll))
6219 (lnum-width (line-number-display-width t))
6215 target-hscroll) 6220 target-hscroll)
6216 ;; Check if the previous command was a line-motion command, or if 6221 ;; Check if the previous command was a line-motion command, or if
6217 ;; we were called from some other command. 6222 ;; we were called from some other command.
@@ -6219,9 +6224,19 @@ If NOERROR, don't signal an error if we can't move that many lines."
6219 (memq last-command `(next-line previous-line ,this-command))) 6224 (memq last-command `(next-line previous-line ,this-command)))
6220 ;; If so, there's no need to reset `temporary-goal-column', 6225 ;; If so, there's no need to reset `temporary-goal-column',
6221 ;; but we may need to hscroll. 6226 ;; but we may need to hscroll.
6222 (if (or (/= (cdr temporary-goal-column) hscroll) 6227 (progn
6223 (> (cdr temporary-goal-column) 0)) 6228 (if (or (/= (cdr temporary-goal-column) hscroll)
6224 (setq target-hscroll (cdr temporary-goal-column))) 6229 (> (cdr temporary-goal-column) 0))
6230 (setq target-hscroll (cdr temporary-goal-column)))
6231 ;; Update the COLUMN part of temporary-goal-column if the
6232 ;; line-number display changed its width since the last
6233 ;; time.
6234 (setq temporary-goal-column
6235 (cons (+ (car temporary-goal-column)
6236 (/ (float (- lnum-width last--line-number-width))
6237 (frame-char-width)))
6238 (cdr temporary-goal-column)))
6239 (setq last--line-number-width lnum-width))
6225 ;; Otherwise, we should reset `temporary-goal-column'. 6240 ;; Otherwise, we should reset `temporary-goal-column'.
6226 (let ((posn (posn-at-point)) 6241 (let ((posn (posn-at-point))
6227 x-pos) 6242 x-pos)
diff --git a/lisp/startup.el b/lisp/startup.el
index bc60bbd08b8..0fbba1bea23 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -1432,6 +1432,7 @@ settings will be marked as \"CHANGED outside of Customize\"."
1432 (let ((no-vals '("no" "off" "false" "0")) 1432 (let ((no-vals '("no" "off" "false" "0"))
1433 (settings '(("menuBar" "MenuBar" menu-bar-mode nil) 1433 (settings '(("menuBar" "MenuBar" menu-bar-mode nil)
1434 ("toolBar" "ToolBar" tool-bar-mode nil) 1434 ("toolBar" "ToolBar" tool-bar-mode nil)
1435 ("scrollBar" "ScrollBar" scroll-bar-mode nil)
1435 ("cursorBlink" "CursorBlink" no-blinking-cursor t)))) 1436 ("cursorBlink" "CursorBlink" no-blinking-cursor t))))
1436 (dolist (x settings) 1437 (dolist (x settings)
1437 (if (member (x-get-resource (nth 0 x) (nth 1 x)) no-vals) 1438 (if (member (x-get-resource (nth 0 x) (nth 1 x)) no-vals)
diff --git a/lisp/subr.el b/lisp/subr.el
index a9edff6166f..79a28d301e7 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -725,15 +725,18 @@ Elements of ALIST that are not conses are ignored."
725 (setq tail tail-cdr)))) 725 (setq tail tail-cdr))))
726 alist) 726 alist)
727 727
728(defun alist-get (key alist &optional default remove) 728(defun alist-get (key alist &optional default remove testfn)
729 "Return the value associated with KEY in ALIST, using `assq'. 729 "Return the value associated with KEY in ALIST.
730If KEY is not found in ALIST, return DEFAULT. 730If KEY is not found in ALIST, return DEFAULT.
731Use TESTFN to lookup in the alist if non-nil. Otherwise, use `assq'.
731 732
732This is a generalized variable suitable for use with `setf'. 733This is a generalized variable suitable for use with `setf'.
733When using it to set a value, optional argument REMOVE non-nil 734When using it to set a value, optional argument REMOVE non-nil
734means to remove KEY from ALIST if the new value is `eql' to DEFAULT." 735means to remove KEY from ALIST if the new value is `eql' to DEFAULT."
735 (ignore remove) ;;Silence byte-compiler. 736 (ignore remove) ;;Silence byte-compiler.
736 (let ((x (assq key alist))) 737 (let ((x (if (not testfn)
738 (assq key alist)
739 (assoc key alist testfn))))
737 (if x (cdr x) default))) 740 (if x (cdr x) default)))
738 741
739(defun remove (elt seq) 742(defun remove (elt seq)
@@ -1786,7 +1789,8 @@ Return the new history list.
1786If MAXELT is non-nil, it specifies the maximum length of the history. 1789If MAXELT is non-nil, it specifies the maximum length of the history.
1787Otherwise, the maximum history length is the value of the `history-length' 1790Otherwise, the maximum history length is the value of the `history-length'
1788property on symbol HISTORY-VAR, if set, or the value of the `history-length' 1791property on symbol HISTORY-VAR, if set, or the value of the `history-length'
1789variable. 1792variable. The possible values of maximum length have the same meaning as
1793the values of `history-length'.
1790Remove duplicates of NEWELT if `history-delete-duplicates' is non-nil. 1794Remove duplicates of NEWELT if `history-delete-duplicates' is non-nil.
1791If optional fourth arg KEEP-ALL is non-nil, add NEWELT to history even 1795If optional fourth arg KEEP-ALL is non-nil, add NEWELT to history even
1792if it is empty or a duplicate." 1796if it is empty or a duplicate."
diff --git a/lisp/vc/vc-src.el b/lisp/vc/vc-src.el
index 5c8b3da6f1a..0e47cc1512f 100644
--- a/lisp/vc/vc-src.el
+++ b/lisp/vc/vc-src.el
@@ -180,7 +180,7 @@ For a description of possible values, see `vc-check-master-templates'."
180 180
181(defun vc-src-dir-status-files (dir files update-function) 181(defun vc-src-dir-status-files (dir files update-function)
182 ;; FIXME: Use one src status -a call for this 182 ;; FIXME: Use one src status -a call for this
183 (if (not files) (setq files (vc-expand-dirs (list dir) 'RCS))) 183 (if (not files) (setq files (vc-expand-dirs (list dir) 'SRC)))
184 (let ((result nil)) 184 (let ((result nil))
185 (dolist (file files) 185 (dolist (file files)
186 (let ((state (vc-state file)) 186 (let ((state (vc-state file))
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
index ca402c18e53..6687bec31f6 100644
--- a/lisp/wid-edit.el
+++ b/lisp/wid-edit.el
@@ -3694,15 +3694,17 @@ example:
3694(defun widget-color--choose-action (widget &optional _event) 3694(defun widget-color--choose-action (widget &optional _event)
3695 (list-colors-display 3695 (list-colors-display
3696 nil nil 3696 nil nil
3697 `(lambda (color) 3697 (let ((cbuf (current-buffer))
3698 (when (buffer-live-p ,(current-buffer)) 3698 (wp (widget-get widget :parent)))
3699 (widget-value-set ',(widget-get widget :parent) color) 3699 (lambda (color)
3700 (let* ((buf (get-buffer "*Colors*")) 3700 (when (buffer-live-p cbuf)
3701 (win (get-buffer-window buf 0))) 3701 (widget-value-set wp color)
3702 (if win 3702 (let* ((buf (get-buffer "*Colors*"))
3703 (quit-window nil win) 3703 (win (get-buffer-window buf 0)))
3704 (bury-buffer buf))) 3704 (if win
3705 (pop-to-buffer ,(current-buffer)))))) 3705 (quit-window nil win)
3706 (bury-buffer buf)))
3707 (pop-to-buffer cbuf))))))
3706 3708
3707(defun widget-color-sample-face-get (widget) 3709(defun widget-color-sample-face-get (widget)
3708 (let* ((value (condition-case nil 3710 (let* ((value (condition-case nil
diff --git a/lisp/window.el b/lisp/window.el
index 43e9e995953..2b979f46636 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -7192,9 +7192,9 @@ See `display-buffer' for the format of display actions."
7192 (let ((pars (special-display-p (buffer-name buffer)))) 7192 (let ((pars (special-display-p (buffer-name buffer))))
7193 (when pars 7193 (when pars
7194 (list (list #'display-buffer-reuse-window 7194 (list (list #'display-buffer-reuse-window
7195 `(lambda (buffer _alist) 7195 (lambda (buffer _alist)
7196 (funcall special-display-function 7196 (funcall special-display-function
7197 buffer ',(if (listp pars) pars))))))))) 7197 buffer (if (listp pars) pars)))))))))
7198 7198
7199(defun display-buffer-pop-up-frame (buffer alist) 7199(defun display-buffer-pop-up-frame (buffer alist)
7200 "Display BUFFER in a new frame. 7200 "Display BUFFER in a new frame.
diff --git a/m4/dirfd.m4 b/m4/dirfd.m4
index b4ec3d1910b..d472c38549d 100644
--- a/m4/dirfd.m4
+++ b/m4/dirfd.m4
@@ -1,4 +1,4 @@
1# serial 24 -*- Autoconf -*- 1# serial 26 -*- Autoconf -*-
2 2
3dnl Find out how to get the file descriptor associated with an open DIR*. 3dnl Find out how to get the file descriptor associated with an open DIR*.
4 4
@@ -12,6 +12,7 @@ dnl From Jim Meyering
12AC_DEFUN([gl_FUNC_DIRFD], 12AC_DEFUN([gl_FUNC_DIRFD],
13[ 13[
14 AC_REQUIRE([gl_DIRENT_H_DEFAULTS]) 14 AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
15 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
15 16
16 dnl Persuade glibc <dirent.h> to declare dirfd(). 17 dnl Persuade glibc <dirent.h> to declare dirfd().
17 AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) 18 AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
@@ -25,15 +26,15 @@ AC_DEFUN([gl_FUNC_DIRFD],
25 fi 26 fi
26 27
27 AC_CACHE_CHECK([whether dirfd is a macro], 28 AC_CACHE_CHECK([whether dirfd is a macro],
28 gl_cv_func_dirfd_macro, 29 [gl_cv_func_dirfd_macro],
29 [AC_EGREP_CPP([dirent_header_defines_dirfd], [ 30 [AC_EGREP_CPP([dirent_header_defines_dirfd], [
30#include <sys/types.h> 31#include <sys/types.h>
31#include <dirent.h> 32#include <dirent.h>
32#ifdef dirfd 33#ifdef dirfd
33 dirent_header_defines_dirfd 34 dirent_header_defines_dirfd
34#endif], 35#endif],
35 gl_cv_func_dirfd_macro=yes, 36 [gl_cv_func_dirfd_macro=yes],
36 gl_cv_func_dirfd_macro=no)]) 37 [gl_cv_func_dirfd_macro=no])])
37 38
38 # Use the replacement if we have no function or macro with that name, 39 # Use the replacement if we have no function or macro with that name,
39 # or if OS/2 kLIBC whose dirfd() does not work. 40 # or if OS/2 kLIBC whose dirfd() does not work.
diff --git a/m4/explicit_bzero.m4 b/m4/explicit_bzero.m4
new file mode 100644
index 00000000000..f9dc678207a
--- /dev/null
+++ b/m4/explicit_bzero.m4
@@ -0,0 +1,22 @@
1dnl Copyright 2017 Free Software Foundation, Inc.
2dnl This file is free software; the Free Software Foundation
3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.
5
6AC_DEFUN([gl_FUNC_EXPLICIT_BZERO],
7[
8 AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
9
10 dnl Persuade glibc <string.h> to declare explicit_bzero.
11 AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
12
13 AC_CHECK_FUNCS_ONCE([explicit_bzero])
14 if test $ac_cv_func_explicit_bzero = no; then
15 HAVE_EXPLICIT_BZERO=0
16 fi
17])
18
19AC_DEFUN([gl_PREREQ_EXPLICIT_BZERO],
20[
21 AC_CHECK_FUNCS([explicit_memset])
22])
diff --git a/m4/getdtablesize.m4 b/m4/getdtablesize.m4
index 1af2a2478fa..f1e4f5f699e 100644
--- a/m4/getdtablesize.m4
+++ b/m4/getdtablesize.m4
@@ -1,4 +1,4 @@
1# getdtablesize.m4 serial 6 1# getdtablesize.m4 serial 7
2dnl Copyright (C) 2008-2017 Free Software Foundation, Inc. 2dnl Copyright (C) 2008-2017 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -12,29 +12,43 @@ AC_DEFUN([gl_FUNC_GETDTABLESIZE],
12 AC_CHECK_DECLS_ONCE([getdtablesize]) 12 AC_CHECK_DECLS_ONCE([getdtablesize])
13 if test $ac_cv_func_getdtablesize = yes && 13 if test $ac_cv_func_getdtablesize = yes &&
14 test $ac_cv_have_decl_getdtablesize = yes; then 14 test $ac_cv_have_decl_getdtablesize = yes; then
15 # Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft limit
16 # up to an unchangeable hard limit; all other platforms correctly
17 # require setrlimit before getdtablesize() can report a larger value.
18 AC_CACHE_CHECK([whether getdtablesize works], 15 AC_CACHE_CHECK([whether getdtablesize works],
19 [gl_cv_func_getdtablesize_works], 16 [gl_cv_func_getdtablesize_works],
20 [AC_RUN_IFELSE([ 17 [dnl There are two concepts: the "maximum possible file descriptor value + 1"
21 AC_LANG_PROGRAM([[#include <unistd.h>]], 18 dnl and the "maximum number of open file descriptors in a process".
22 [int size = getdtablesize(); 19 dnl Per SUSv2 and POSIX, getdtablesize() should return the first one.
23 if (dup2 (0, getdtablesize()) != -1) 20 dnl On most platforms, the first and the second concept are the same.
24 return 1; 21 dnl On OpenVMS, however, they are different and getdtablesize() returns
25 if (size != getdtablesize()) 22 dnl the second one; thus the test below fails. But we don't care
26 return 2; 23 dnl because there's no good way to write a replacement getdtablesize().
27 ])], 24 case "$host_os" in
28 [gl_cv_func_getdtablesize_works=yes], 25 vms*) gl_cv_func_getdtablesize_works="no (limitation)" ;;
29 [gl_cv_func_getdtablesize_works=no], 26 *)
30 [case "$host_os" in 27 dnl Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft
31 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows 28 dnl limit up to an unchangeable hard limit; all other platforms
32 gl_cv_func_getdtablesize_works="guessing no" ;; 29 dnl correctly require setrlimit before getdtablesize() can report
33 *) gl_cv_func_getdtablesize_works="guessing yes" ;; 30 dnl a larger value.
34 esac]) 31 AC_RUN_IFELSE([
32 AC_LANG_PROGRAM([[#include <unistd.h>]],
33 [int size = getdtablesize();
34 if (dup2 (0, getdtablesize()) != -1)
35 return 1;
36 if (size != getdtablesize())
37 return 2;
38 ])],
39 [gl_cv_func_getdtablesize_works=yes],
40 [gl_cv_func_getdtablesize_works=no],
41 [case "$host_os" in
42 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
43 gl_cv_func_getdtablesize_works="guessing no" ;;
44 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
45 esac
46 ])
47 ;;
48 esac
35 ]) 49 ])
36 case "$gl_cv_func_getdtablesize_works" in 50 case "$gl_cv_func_getdtablesize_works" in
37 *yes) ;; 51 *yes | "no (limitation)") ;;
38 *) REPLACE_GETDTABLESIZE=1 ;; 52 *) REPLACE_GETDTABLESIZE=1 ;;
39 esac 53 esac
40 else 54 else
diff --git a/m4/gettimeofday.m4 b/m4/gettimeofday.m4
index 8ee206eea24..efa114dfaff 100644
--- a/m4/gettimeofday.m4
+++ b/m4/gettimeofday.m4
@@ -1,4 +1,4 @@
1# serial 23 1# serial 24
2 2
3# Copyright (C) 2001-2003, 2005, 2007, 2009-2017 Free Software Foundation, Inc. 3# Copyright (C) 2001-2003, 2005, 2007, 2009-2017 Free Software Foundation, Inc.
4# This file is free software; the Free Software Foundation 4# This file is free software; the Free Software Foundation
@@ -105,6 +105,8 @@ AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER],
105 case "$host_os" in 105 case "$host_os" in
106 # Guess all is fine on glibc systems. 106 # Guess all is fine on glibc systems.
107 *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;; 107 *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
108 # Guess no on native Windows.
109 mingw*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
108 # If we don't know, assume the worst. 110 # If we don't know, assume the worst.
109 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;; 111 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
110 esac 112 esac
diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4
index 107645df4fd..2f135773930 100644
--- a/m4/gnulib-comp.m4
+++ b/m4/gnulib-comp.m4
@@ -72,6 +72,7 @@ AC_DEFUN([gl_EARLY],
72 # Code from module errno: 72 # Code from module errno:
73 # Code from module euidaccess: 73 # Code from module euidaccess:
74 # Code from module execinfo: 74 # Code from module execinfo:
75 # Code from module explicit_bzero:
75 # Code from module extensions: 76 # Code from module extensions:
76 # Code from module extern-inline: 77 # Code from module extern-inline:
77 # Code from module faccessat: 78 # Code from module faccessat:
@@ -112,6 +113,7 @@ AC_DEFUN([gl_EARLY],
112 # Code from module mktime-internal: 113 # Code from module mktime-internal:
113 # Code from module multiarch: 114 # Code from module multiarch:
114 # Code from module nocrash: 115 # Code from module nocrash:
116 # Code from module nstrftime:
115 # Code from module openat-h: 117 # Code from module openat-h:
116 # Code from module pipe2: 118 # Code from module pipe2:
117 # Code from module pselect: 119 # Code from module pselect:
@@ -138,7 +140,6 @@ AC_DEFUN([gl_EARLY],
138 # Code from module stdio: 140 # Code from module stdio:
139 # Code from module stdlib: 141 # Code from module stdlib:
140 # Code from module stpcpy: 142 # Code from module stpcpy:
141 # Code from module strftime:
142 # Code from module string: 143 # Code from module string:
143 # Code from module strtoimax: 144 # Code from module strtoimax:
144 # Code from module strtoll: 145 # Code from module strtoll:
@@ -210,6 +211,12 @@ AC_DEFUN([gl_INIT],
210 gl_UNISTD_MODULE_INDICATOR([environ]) 211 gl_UNISTD_MODULE_INDICATOR([environ])
211 gl_HEADER_ERRNO_H 212 gl_HEADER_ERRNO_H
212 gl_EXECINFO_H 213 gl_EXECINFO_H
214 gl_FUNC_EXPLICIT_BZERO
215 if test $HAVE_EXPLICIT_BZERO = 0; then
216 AC_LIBOBJ([explicit_bzero])
217 gl_PREREQ_EXPLICIT_BZERO
218 fi
219 gl_STRING_MODULE_INDICATOR([explicit_bzero])
213 AC_REQUIRE([gl_EXTERN_INLINE]) 220 AC_REQUIRE([gl_EXTERN_INLINE])
214 gl_FUNC_FACCESSAT 221 gl_FUNC_FACCESSAT
215 if test $HAVE_FACCESSAT = 0; then 222 if test $HAVE_FACCESSAT = 0; then
@@ -307,6 +314,7 @@ AC_DEFUN([gl_INIT],
307 fi 314 fi
308 gl_TIME_MODULE_INDICATOR([mktime]) 315 gl_TIME_MODULE_INDICATOR([mktime])
309 gl_MULTIARCH 316 gl_MULTIARCH
317 gl_FUNC_GNU_STRFTIME
310 gl_FUNC_PIPE2 318 gl_FUNC_PIPE2
311 gl_UNISTD_MODULE_INDICATOR([pipe2]) 319 gl_UNISTD_MODULE_INDICATOR([pipe2])
312 gl_FUNC_PSELECT 320 gl_FUNC_PSELECT
@@ -358,7 +366,6 @@ AC_DEFUN([gl_INIT],
358 gl_PREREQ_STPCPY 366 gl_PREREQ_STPCPY
359 fi 367 fi
360 gl_STRING_MODULE_INDICATOR([stpcpy]) 368 gl_STRING_MODULE_INDICATOR([stpcpy])
361 gl_FUNC_GNU_STRFTIME
362 gl_HEADER_STRING_H 369 gl_HEADER_STRING_H
363 gl_FUNC_STRTOIMAX 370 gl_FUNC_STRTOIMAX
364 if test $HAVE_DECL_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then 371 if test $HAVE_DECL_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
@@ -837,6 +844,7 @@ AC_DEFUN([gl_FILE_LIST], [
837 lib/euidaccess.c 844 lib/euidaccess.c
838 lib/execinfo.c 845 lib/execinfo.c
839 lib/execinfo.in.h 846 lib/execinfo.in.h
847 lib/explicit_bzero.c
840 lib/faccessat.c 848 lib/faccessat.c
841 lib/fcntl.c 849 lib/fcntl.c
842 lib/fcntl.in.h 850 lib/fcntl.in.h
@@ -885,6 +893,7 @@ AC_DEFUN([gl_FILE_LIST], [
885 lib/mkostemp.c 893 lib/mkostemp.c
886 lib/mktime-internal.h 894 lib/mktime-internal.h
887 lib/mktime.c 895 lib/mktime.c
896 lib/nstrftime.c
888 lib/openat-priv.h 897 lib/openat-priv.h
889 lib/openat-proc.c 898 lib/openat-proc.c
890 lib/openat.h 899 lib/openat.h
@@ -916,7 +925,6 @@ AC_DEFUN([gl_FILE_LIST], [
916 lib/stdio.in.h 925 lib/stdio.in.h
917 lib/stdlib.in.h 926 lib/stdlib.in.h
918 lib/stpcpy.c 927 lib/stpcpy.c
919 lib/strftime.c
920 lib/strftime.h 928 lib/strftime.h
921 lib/string.in.h 929 lib/string.in.h
922 lib/strtoimax.c 930 lib/strtoimax.c
@@ -967,6 +975,7 @@ AC_DEFUN([gl_FILE_LIST], [
967 m4/errno_h.m4 975 m4/errno_h.m4
968 m4/euidaccess.m4 976 m4/euidaccess.m4
969 m4/execinfo.m4 977 m4/execinfo.m4
978 m4/explicit_bzero.m4
970 m4/extensions.m4 979 m4/extensions.m4
971 m4/extern-inline.m4 980 m4/extern-inline.m4
972 m4/faccessat.m4 981 m4/faccessat.m4
@@ -1004,6 +1013,7 @@ AC_DEFUN([gl_FILE_LIST], [
1004 m4/mktime.m4 1013 m4/mktime.m4
1005 m4/multiarch.m4 1014 m4/multiarch.m4
1006 m4/nocrash.m4 1015 m4/nocrash.m4
1016 m4/nstrftime.m4
1007 m4/off_t.m4 1017 m4/off_t.m4
1008 m4/pipe2.m4 1018 m4/pipe2.m4
1009 m4/pselect.m4 1019 m4/pselect.m4
@@ -1028,7 +1038,6 @@ AC_DEFUN([gl_FILE_LIST], [
1028 m4/stdio_h.m4 1038 m4/stdio_h.m4
1029 m4/stdlib_h.m4 1039 m4/stdlib_h.m4
1030 m4/stpcpy.m4 1040 m4/stpcpy.m4
1031 m4/strftime.m4
1032 m4/string_h.m4 1041 m4/string_h.m4
1033 m4/strtoimax.m4 1042 m4/strtoimax.m4
1034 m4/strtoll.m4 1043 m4/strtoll.m4
diff --git a/m4/lstat.m4 b/m4/lstat.m4
index 953c117d801..0b6e5d70cba 100644
--- a/m4/lstat.m4
+++ b/m4/lstat.m4
@@ -1,4 +1,4 @@
1# serial 27 1# serial 29
2 2
3# Copyright (C) 1997-2001, 2003-2017 Free Software Foundation, Inc. 3# Copyright (C) 1997-2001, 2003-2017 Free Software Foundation, Inc.
4# 4#
@@ -33,6 +33,7 @@ AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
33[ 33[
34 dnl We don't use AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK any more, because it 34 dnl We don't use AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK any more, because it
35 dnl is no longer maintained in Autoconf and because it invokes AC_LIBOBJ. 35 dnl is no longer maintained in Autoconf and because it invokes AC_LIBOBJ.
36 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
36 AC_CACHE_CHECK([whether lstat correctly handles trailing slash], 37 AC_CACHE_CHECK([whether lstat correctly handles trailing slash],
37 [gl_cv_func_lstat_dereferences_slashed_symlink], 38 [gl_cv_func_lstat_dereferences_slashed_symlink],
38 [rm -f conftest.sym conftest.file 39 [rm -f conftest.sym conftest.file
@@ -54,6 +55,9 @@ AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
54 *-gnu*) 55 *-gnu*)
55 # Guess yes on glibc systems. 56 # Guess yes on glibc systems.
56 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;; 57 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
58 mingw*)
59 # Guess no on native Windows.
60 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
57 *) 61 *)
58 # If we don't know, assume the worst. 62 # If we don't know, assume the worst.
59 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;; 63 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
diff --git a/m4/mktime.m4 b/m4/mktime.m4
index 31da65e8b2d..85666844e2e 100644
--- a/m4/mktime.m4
+++ b/m4/mktime.m4
@@ -1,4 +1,4 @@
1# serial 28 1# serial 29
2dnl Copyright (C) 2002-2003, 2005-2007, 2009-2017 Free Software Foundation, 2dnl Copyright (C) 2002-2003, 2005-2007, 2009-2017 Free Software Foundation,
3dnl Inc. 3dnl Inc.
4dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
@@ -25,6 +25,7 @@ dnl Test whether mktime works. Set gl_cv_func_working_mktime.
25AC_DEFUN([gl_FUNC_MKTIME_WORKS], 25AC_DEFUN([gl_FUNC_MKTIME_WORKS],
26[ 26[
27 AC_REQUIRE([gl_TIME_T_IS_SIGNED]) 27 AC_REQUIRE([gl_TIME_T_IS_SIGNED])
28 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
28 29
29 dnl We don't use AC_FUNC_MKTIME any more, because it is no longer maintained 30 dnl We don't use AC_FUNC_MKTIME any more, because it is no longer maintained
30 dnl in Autoconf and because it invokes AC_LIBOBJ. 31 dnl in Autoconf and because it invokes AC_LIBOBJ.
@@ -239,7 +240,12 @@ main ()
239}]])], 240}]])],
240 [gl_cv_func_working_mktime=yes], 241 [gl_cv_func_working_mktime=yes],
241 [gl_cv_func_working_mktime=no], 242 [gl_cv_func_working_mktime=no],
242 [gl_cv_func_working_mktime="guessing no"]) 243 [case "$host_os" in
244 # Guess no on native Windows.
245 mingw*) gl_cv_func_working_mktime="guessing no" ;;
246 *) gl_cv_func_working_mktime="guessing no" ;;
247 esac
248 ])
243 ]) 249 ])
244]) 250])
245 251
diff --git a/m4/strftime.m4 b/m4/nstrftime.m4
index d2dac9e2328..d2dac9e2328 100644
--- a/m4/strftime.m4
+++ b/m4/nstrftime.m4
diff --git a/m4/pselect.m4 b/m4/pselect.m4
index 3f1c43f650d..eb1ad115cc2 100644
--- a/m4/pselect.m4
+++ b/m4/pselect.m4
@@ -1,4 +1,4 @@
1# pselect.m4 serial 2 1# pselect.m4 serial 4
2dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. 2dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -8,11 +8,12 @@ AC_DEFUN([gl_FUNC_PSELECT],
8[ 8[
9 AC_REQUIRE([gl_HEADER_SYS_SELECT]) 9 AC_REQUIRE([gl_HEADER_SYS_SELECT])
10 AC_REQUIRE([AC_C_RESTRICT]) 10 AC_REQUIRE([AC_C_RESTRICT])
11 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
11 AC_CHECK_FUNCS_ONCE([pselect]) 12 AC_CHECK_FUNCS_ONCE([pselect])
12 13
13 if test $ac_cv_func_pselect = yes; then 14 if test $ac_cv_func_pselect = yes; then
14 AC_CACHE_CHECK([whether signature of pselect conforms to POSIX], 15 AC_CACHE_CHECK([whether signature of pselect conforms to POSIX],
15 gl_cv_sig_pselect, 16 [gl_cv_sig_pselect],
16 [AC_LINK_IFELSE( 17 [AC_LINK_IFELSE(
17 [AC_LANG_PROGRAM( 18 [AC_LANG_PROGRAM(
18 [[#include <sys/select.h> 19 [[#include <sys/select.h>
diff --git a/m4/putenv.m4 b/m4/putenv.m4
index a8e3ab33dc4..08ae41697a5 100644
--- a/m4/putenv.m4
+++ b/m4/putenv.m4
@@ -1,4 +1,4 @@
1# putenv.m4 serial 20 1# putenv.m4 serial 21
2dnl Copyright (C) 2002-2017 Free Software Foundation, Inc. 2dnl Copyright (C) 2002-2017 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -36,6 +36,8 @@ AC_DEFUN([gl_FUNC_PUTENV],
36 [case "$host_os" in 36 [case "$host_os" in
37 # Guess yes on glibc systems. 37 # Guess yes on glibc systems.
38 *-gnu*) gl_cv_func_svid_putenv="guessing yes" ;; 38 *-gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
39 # Guess no on native Windows.
40 mingw*) gl_cv_func_svid_putenv="guessing no" ;;
39 # If we don't know, assume the worst. 41 # If we don't know, assume the worst.
40 *) gl_cv_func_svid_putenv="guessing no" ;; 42 *) gl_cv_func_svid_putenv="guessing no" ;;
41 esac 43 esac
diff --git a/m4/stdint.m4 b/m4/stdint.m4
index 4ac854d5198..4bf3e474515 100644
--- a/m4/stdint.m4
+++ b/m4/stdint.m4
@@ -1,4 +1,4 @@
1# stdint.m4 serial 50 1# stdint.m4 serial 51
2dnl Copyright (C) 2001-2017 Free Software Foundation, Inc. 2dnl Copyright (C) 2001-2017 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -10,6 +10,7 @@ dnl Test whether <stdint.h> is supported or must be substituted.
10AC_DEFUN_ONCE([gl_STDINT_H], 10AC_DEFUN_ONCE([gl_STDINT_H],
11[ 11[
12 AC_PREREQ([2.59])dnl 12 AC_PREREQ([2.59])dnl
13 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
13 14
14 AC_REQUIRE([gl_LIMITS_H]) 15 AC_REQUIRE([gl_LIMITS_H])
15 AC_REQUIRE([gt_TYPE_WINT_T]) 16 AC_REQUIRE([gt_TYPE_WINT_T])
@@ -288,8 +289,12 @@ static const char *macro_values[] =
288]])], 289]])],
289 [gl_cv_header_working_stdint_h=yes], 290 [gl_cv_header_working_stdint_h=yes],
290 [], 291 [],
291 [dnl When cross-compiling, assume it works. 292 [case "$host_os" in
292 gl_cv_header_working_stdint_h=yes 293 # Guess yes on native Windows.
294 mingw*) gl_cv_header_working_stdint_h="guessing yes" ;;
295 # In general, assume it works.
296 *) gl_cv_header_working_stdint_h="guessing yes" ;;
297 esac
293 ]) 298 ])
294 ]) 299 ])
295 ]) 300 ])
@@ -299,15 +304,16 @@ static const char *macro_values[] =
299 HAVE_SYS_BITYPES_H=0 304 HAVE_SYS_BITYPES_H=0
300 HAVE_SYS_INTTYPES_H=0 305 HAVE_SYS_INTTYPES_H=0
301 STDINT_H=stdint.h 306 STDINT_H=stdint.h
302 if test "$gl_cv_header_working_stdint_h" = yes; then 307 case "$gl_cv_header_working_stdint_h" in
303 HAVE_C99_STDINT_H=1 308 *yes)
304 dnl Now see whether the system <stdint.h> works without 309 HAVE_C99_STDINT_H=1
305 dnl __STDC_CONSTANT_MACROS/__STDC_LIMIT_MACROS defined. 310 dnl Now see whether the system <stdint.h> works without
306 AC_CACHE_CHECK([whether stdint.h predates C++11], 311 dnl __STDC_CONSTANT_MACROS/__STDC_LIMIT_MACROS defined.
307 [gl_cv_header_stdint_predates_cxx11_h], 312 AC_CACHE_CHECK([whether stdint.h predates C++11],
308 [gl_cv_header_stdint_predates_cxx11_h=yes 313 [gl_cv_header_stdint_predates_cxx11_h],
309 AC_COMPILE_IFELSE([ 314 [gl_cv_header_stdint_predates_cxx11_h=yes
310 AC_LANG_PROGRAM([[ 315 AC_COMPILE_IFELSE([
316 AC_LANG_PROGRAM([[
311#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ 317#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
312#include <stdint.h> 318#include <stdint.h>
313] 319]
@@ -315,45 +321,47 @@ gl_STDINT_INCLUDES
315[ 321[
316intmax_t im = INTMAX_MAX; 322intmax_t im = INTMAX_MAX;
317int32_t i32 = INT32_C (0x7fffffff); 323int32_t i32 = INT32_C (0x7fffffff);
318 ]])], 324 ]])],
319 [gl_cv_header_stdint_predates_cxx11_h=no])]) 325 [gl_cv_header_stdint_predates_cxx11_h=no])])
320 326
321 if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then 327 if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
322 AC_DEFINE([__STDC_CONSTANT_MACROS], [1], 328 AC_DEFINE([__STDC_CONSTANT_MACROS], [1],
323 [Define to 1 if the system <stdint.h> predates C++11.]) 329 [Define to 1 if the system <stdint.h> predates C++11.])
324 AC_DEFINE([__STDC_LIMIT_MACROS], [1], 330 AC_DEFINE([__STDC_LIMIT_MACROS], [1],
325 [Define to 1 if the system <stdint.h> predates C++11.]) 331 [Define to 1 if the system <stdint.h> predates C++11.])
326 fi 332 fi
327 AC_CACHE_CHECK([whether stdint.h has UINTMAX_WIDTH etc.], 333 AC_CACHE_CHECK([whether stdint.h has UINTMAX_WIDTH etc.],
328 [gl_cv_header_stdint_width], 334 [gl_cv_header_stdint_width],
329 [gl_cv_header_stdint_width=no 335 [gl_cv_header_stdint_width=no
330 AC_COMPILE_IFELSE( 336 AC_COMPILE_IFELSE(
331 [AC_LANG_PROGRAM([[ 337 [AC_LANG_PROGRAM([[
332 /* Work if build is not clean. */ 338 /* Work if build is not clean. */
333 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 339 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
334 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__ 340 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
335 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 341 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
336 #endif 342 #endif
337 #include <stdint.h> 343 #include <stdint.h>
338 ]gl_STDINT_INCLUDES[ 344 ]gl_STDINT_INCLUDES[
339 int iw = UINTMAX_WIDTH; 345 int iw = UINTMAX_WIDTH;
340 ]])], 346 ]])],
341 [gl_cv_header_stdint_width=yes])]) 347 [gl_cv_header_stdint_width=yes])])
342 if test "$gl_cv_header_stdint_width" = yes; then 348 if test "$gl_cv_header_stdint_width" = yes; then
343 STDINT_H= 349 STDINT_H=
344 fi 350 fi
345 else 351 ;;
346 dnl Check for <sys/inttypes.h>, and for 352 *)
347 dnl <sys/bitypes.h> (used in Linux libc4 >= 4.6.7 and libc5). 353 dnl Check for <sys/inttypes.h>, and for
348 AC_CHECK_HEADERS([sys/inttypes.h sys/bitypes.h]) 354 dnl <sys/bitypes.h> (used in Linux libc4 >= 4.6.7 and libc5).
349 if test $ac_cv_header_sys_inttypes_h = yes; then 355 AC_CHECK_HEADERS([sys/inttypes.h sys/bitypes.h])
350 HAVE_SYS_INTTYPES_H=1 356 if test $ac_cv_header_sys_inttypes_h = yes; then
351 fi 357 HAVE_SYS_INTTYPES_H=1
352 if test $ac_cv_header_sys_bitypes_h = yes; then 358 fi
353 HAVE_SYS_BITYPES_H=1 359 if test $ac_cv_header_sys_bitypes_h = yes; then
354 fi 360 HAVE_SYS_BITYPES_H=1
355 gl_STDINT_TYPE_PROPERTIES 361 fi
356 fi 362 gl_STDINT_TYPE_PROPERTIES
363 ;;
364 esac
357 365
358 dnl The substitute stdint.h needs the substitute limit.h's _GL_INTEGER_WIDTH. 366 dnl The substitute stdint.h needs the substitute limit.h's _GL_INTEGER_WIDTH.
359 LIMITS_H=limits.h 367 LIMITS_H=limits.h
diff --git a/m4/string_h.m4 b/m4/string_h.m4
index 3d2ad2219a5..ac6311fba07 100644
--- a/m4/string_h.m4
+++ b/m4/string_h.m4
@@ -43,6 +43,7 @@ AC_DEFUN([gl_STRING_MODULE_INDICATOR],
43 43
44AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS], 44AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
45[ 45[
46 GNULIB_EXPLICIT_BZERO=0; AC_SUBST([GNULIB_EXPLICIT_BZERO])
46 GNULIB_FFSL=0; AC_SUBST([GNULIB_FFSL]) 47 GNULIB_FFSL=0; AC_SUBST([GNULIB_FFSL])
47 GNULIB_FFSLL=0; AC_SUBST([GNULIB_FFSLL]) 48 GNULIB_FFSLL=0; AC_SUBST([GNULIB_FFSLL])
48 GNULIB_MEMCHR=0; AC_SUBST([GNULIB_MEMCHR]) 49 GNULIB_MEMCHR=0; AC_SUBST([GNULIB_MEMCHR])
@@ -82,6 +83,7 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
82 GNULIB_STRVERSCMP=0; AC_SUBST([GNULIB_STRVERSCMP]) 83 GNULIB_STRVERSCMP=0; AC_SUBST([GNULIB_STRVERSCMP])
83 HAVE_MBSLEN=0; AC_SUBST([HAVE_MBSLEN]) 84 HAVE_MBSLEN=0; AC_SUBST([HAVE_MBSLEN])
84 dnl Assume proper GNU behavior unless another module says otherwise. 85 dnl Assume proper GNU behavior unless another module says otherwise.
86 HAVE_EXPLICIT_BZERO=1; AC_SUBST([HAVE_EXPLICIT_BZERO])
85 HAVE_FFSL=1; AC_SUBST([HAVE_FFSL]) 87 HAVE_FFSL=1; AC_SUBST([HAVE_FFSL])
86 HAVE_FFSLL=1; AC_SUBST([HAVE_FFSLL]) 88 HAVE_FFSLL=1; AC_SUBST([HAVE_FFSLL])
87 HAVE_MEMCHR=1; AC_SUBST([HAVE_MEMCHR]) 89 HAVE_MEMCHR=1; AC_SUBST([HAVE_MEMCHR])
diff --git a/m4/strtoimax.m4 b/m4/strtoimax.m4
index f0586f1a802..61809c8b5db 100644
--- a/m4/strtoimax.m4
+++ b/m4/strtoimax.m4
@@ -1,4 +1,4 @@
1# strtoimax.m4 serial 14 1# strtoimax.m4 serial 15
2dnl Copyright (C) 2002-2004, 2006, 2009-2017 Free Software Foundation, Inc. 2dnl Copyright (C) 2002-2004, 2006, 2009-2017 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -61,10 +61,12 @@ int main ()
61 [gl_cv_func_strtoimax=yes], 61 [gl_cv_func_strtoimax=yes],
62 [gl_cv_func_strtoimax=no], 62 [gl_cv_func_strtoimax=no],
63 [case "$host_os" in 63 [case "$host_os" in
64 # Guess no on AIX 5. 64 # Guess no on AIX 5.
65 aix5*) gl_cv_func_strtoimax="guessing no" ;; 65 aix5*) gl_cv_func_strtoimax="guessing no" ;;
66 # Guess yes otherwise. 66 # Guess yes on native Windows.
67 *) gl_cv_func_strtoimax="guessing yes" ;; 67 mingw*) gl_cv_func_strtoimax="guessing yes" ;;
68 # Guess yes otherwise.
69 *) gl_cv_func_strtoimax="guessing yes" ;;
68 esac 70 esac
69 ]) 71 ])
70 ]) 72 ])
diff --git a/m4/utimes.m4 b/m4/utimes.m4
index 518824f218f..847b2eba78f 100644
--- a/m4/utimes.m4
+++ b/m4/utimes.m4
@@ -1,5 +1,5 @@
1# Detect some bugs in glibc's implementation of utimes. 1# Detect some bugs in glibc's implementation of utimes.
2# serial 4 2# serial 5
3 3
4dnl Copyright (C) 2003-2005, 2009-2017 Free Software Foundation, Inc. 4dnl Copyright (C) 2003-2005, 2009-2017 Free Software Foundation, Inc.
5dnl This file is free software; the Free Software Foundation 5dnl This file is free software; the Free Software Foundation
@@ -20,10 +20,10 @@ dnl with or without modifications, as long as this notice is preserved.
20 20
21AC_DEFUN([gl_FUNC_UTIMES], 21AC_DEFUN([gl_FUNC_UTIMES],
22[ 22[
23 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
23 AC_CACHE_CHECK([whether the utimes function works], 24 AC_CACHE_CHECK([whether the utimes function works],
24 [gl_cv_func_working_utimes], 25 [gl_cv_func_working_utimes],
25 [ 26 [AC_RUN_IFELSE([AC_LANG_SOURCE([[
26 AC_RUN_IFELSE([AC_LANG_SOURCE([[
27#include <sys/types.h> 27#include <sys/types.h>
28#include <sys/stat.h> 28#include <sys/stat.h>
29#include <fcntl.h> 29#include <fcntl.h>
@@ -142,9 +142,17 @@ main ()
142 ]])], 142 ]])],
143 [gl_cv_func_working_utimes=yes], 143 [gl_cv_func_working_utimes=yes],
144 [gl_cv_func_working_utimes=no], 144 [gl_cv_func_working_utimes=no],
145 [gl_cv_func_working_utimes=no])]) 145 [case "$host_os" in
146 # Guess no on native Windows.
147 mingw*) gl_cv_func_working_utimes="guessing no" ;;
148 *) gl_cv_func_working_utimes="guessing no" ;;
149 esac
150 ])
151 ])
146 152
147 if test $gl_cv_func_working_utimes = yes; then 153 case "$gl_cv_func_working_utimes" in
148 AC_DEFINE([HAVE_WORKING_UTIMES], [1], [Define if utimes works properly.]) 154 *yes)
149 fi 155 AC_DEFINE([HAVE_WORKING_UTIMES], [1], [Define if utimes works properly.])
156 ;;
157 esac
150]) 158])
diff --git a/nextstep/INSTALL b/nextstep/INSTALL
index 799cd4d866a..b7e84e018ee 100644
--- a/nextstep/INSTALL
+++ b/nextstep/INSTALL
@@ -21,15 +21,23 @@ In the top-level directory, use:
21 21
22(On macOS, --with-ns is enabled by default.) 22(On macOS, --with-ns is enabled by default.)
23 23
24This will compile all the files, but emacs will not be able to be run except 24Then run:
25in -nw (terminal) mode.
26 25
27In order to run Emacs.app, you must run: 26 make
27
28This will compile all the files.
29
30In order to run Emacs, you must run:
31
32 src/emacs
33
34In order to install Emacs, you must run:
28 35
29 make install 36 make install
30 37
31This will assemble the app in nextstep/Emacs.app (i.e., the --prefix 38This will assemble the app in nextstep/Emacs.app (i.e., the --prefix
32argument has no effect in this case). 39argument has no effect in this case). You can then move the Emacs.app
40bundle to a location of your choice.
33 41
34If you pass the --disable-ns-self-contained option to configure, the lisp 42If you pass the --disable-ns-self-contained option to configure, the lisp
35files will be installed under whatever 'prefix' is set to (defaults to 43files will be installed under whatever 'prefix' is set to (defaults to
diff --git a/src/alloc.c b/src/alloc.c
index ac3de83b2b6..2cee6462564 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -1553,7 +1553,7 @@ make_interval (void)
1553/* Mark Lisp objects in interval I. */ 1553/* Mark Lisp objects in interval I. */
1554 1554
1555static void 1555static void
1556mark_interval (register INTERVAL i, Lisp_Object dummy) 1556mark_interval (INTERVAL i, void *dummy)
1557{ 1557{
1558 /* Intervals should never be shared. So, if extra internal checking is 1558 /* Intervals should never be shared. So, if extra internal checking is
1559 enabled, GC aborts if it seems to have visited an interval twice. */ 1559 enabled, GC aborts if it seems to have visited an interval twice. */
@@ -1567,7 +1567,7 @@ mark_interval (register INTERVAL i, Lisp_Object dummy)
1567#define MARK_INTERVAL_TREE(i) \ 1567#define MARK_INTERVAL_TREE(i) \
1568 do { \ 1568 do { \
1569 if (i && !i->gcmarkbit) \ 1569 if (i && !i->gcmarkbit) \
1570 traverse_intervals_noorder (i, mark_interval, Qnil); \ 1570 traverse_intervals_noorder (i, mark_interval, NULL); \
1571 } while (0) 1571 } while (0)
1572 1572
1573/*********************************************************************** 1573/***********************************************************************
@@ -6943,7 +6943,7 @@ sweep_symbols (void)
6943 symbol_free_list = NULL; 6943 symbol_free_list = NULL;
6944 6944
6945 for (int i = 0; i < ARRAYELTS (lispsym); i++) 6945 for (int i = 0; i < ARRAYELTS (lispsym); i++)
6946 lispsym[i].gcmarkbit = 0; 6946 lispsym[i].s.gcmarkbit = 0;
6947 6947
6948 for (sblk = symbol_block; sblk; sblk = *sprev) 6948 for (sblk = symbol_block; sblk; sblk = *sprev)
6949 { 6949 {
diff --git a/src/bidi.c b/src/bidi.c
index e34da778ba0..763797488b0 100644
--- a/src/bidi.c
+++ b/src/bidi.c
@@ -1448,8 +1448,14 @@ bidi_at_paragraph_end (ptrdiff_t charpos, ptrdiff_t bytepos)
1448 Lisp_Object start_re; 1448 Lisp_Object start_re;
1449 ptrdiff_t val; 1449 ptrdiff_t val;
1450 1450
1451 sep_re = paragraph_separate_re; 1451 if (STRINGP (BVAR (current_buffer, bidi_paragraph_separate_re)))
1452 start_re = paragraph_start_re; 1452 sep_re = BVAR (current_buffer, bidi_paragraph_separate_re);
1453 else
1454 sep_re = paragraph_separate_re;
1455 if (STRINGP (BVAR (current_buffer, bidi_paragraph_start_re)))
1456 start_re = BVAR (current_buffer, bidi_paragraph_start_re);
1457 else
1458 start_re = paragraph_start_re;
1453 1459
1454 val = fast_looking_at (sep_re, charpos, bytepos, ZV, ZV_BYTE, Qnil); 1460 val = fast_looking_at (sep_re, charpos, bytepos, ZV, ZV_BYTE, Qnil);
1455 if (val < 0) 1461 if (val < 0)
@@ -1523,7 +1529,10 @@ bidi_paragraph_cache_on_off (void)
1523static ptrdiff_t 1529static ptrdiff_t
1524bidi_find_paragraph_start (ptrdiff_t pos, ptrdiff_t pos_byte) 1530bidi_find_paragraph_start (ptrdiff_t pos, ptrdiff_t pos_byte)
1525{ 1531{
1526 Lisp_Object re = paragraph_start_re; 1532 Lisp_Object re =
1533 STRINGP (BVAR (current_buffer, bidi_paragraph_start_re))
1534 ? BVAR (current_buffer, bidi_paragraph_start_re)
1535 : paragraph_start_re;
1527 ptrdiff_t limit = ZV, limit_byte = ZV_BYTE; 1536 ptrdiff_t limit = ZV, limit_byte = ZV_BYTE;
1528 struct region_cache *bpc = bidi_paragraph_cache_on_off (); 1537 struct region_cache *bpc = bidi_paragraph_cache_on_off ();
1529 ptrdiff_t n = 0, oldpos = pos, next; 1538 ptrdiff_t n = 0, oldpos = pos, next;
@@ -3498,10 +3507,16 @@ bidi_move_to_visually_next (struct bidi_it *bidi_it)
3498 if (sep_len >= 0) 3507 if (sep_len >= 0)
3499 { 3508 {
3500 bidi_it->new_paragraph = 1; 3509 bidi_it->new_paragraph = 1;
3501 /* Record the buffer position of the last character of the 3510 /* Record the buffer position of the last character of
3502 paragraph separator. */ 3511 the paragraph separator. If the paragraph separator
3503 bidi_it->separator_limit 3512 is an empty string (e.g., the regex is "^"), the
3504 = bidi_it->charpos + bidi_it->nchars + sep_len; 3513 newline that precedes the end of the paragraph is
3514 that last character. */
3515 if (sep_len > 0)
3516 bidi_it->separator_limit
3517 = bidi_it->charpos + bidi_it->nchars + sep_len;
3518 else
3519 bidi_it->separator_limit = bidi_it->charpos;
3505 } 3520 }
3506 } 3521 }
3507 } 3522 }
diff --git a/src/buffer.c b/src/buffer.c
index 80dbd3318dc..649ddbe1839 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -173,6 +173,16 @@ bset_bidi_display_reordering (struct buffer *b, Lisp_Object val)
173 b->bidi_display_reordering_ = val; 173 b->bidi_display_reordering_ = val;
174} 174}
175static void 175static void
176bset_bidi_paragraph_start_re (struct buffer *b, Lisp_Object val)
177{
178 b->bidi_paragraph_start_re_ = val;
179}
180static void
181bset_bidi_paragraph_separate_re (struct buffer *b, Lisp_Object val)
182{
183 b->bidi_paragraph_separate_re_ = val;
184}
185static void
176bset_buffer_file_coding_system (struct buffer *b, Lisp_Object val) 186bset_buffer_file_coding_system (struct buffer *b, Lisp_Object val)
177{ 187{
178 b->buffer_file_coding_system_ = val; 188 b->buffer_file_coding_system_ = val;
@@ -1164,7 +1174,7 @@ buffer_local_value (Lisp_Object variable, Lisp_Object buffer)
1164 { /* Look in local_var_alist. */ 1174 { /* Look in local_var_alist. */
1165 struct Lisp_Buffer_Local_Value *blv = SYMBOL_BLV (sym); 1175 struct Lisp_Buffer_Local_Value *blv = SYMBOL_BLV (sym);
1166 XSETSYMBOL (variable, sym); /* Update In case of aliasing. */ 1176 XSETSYMBOL (variable, sym); /* Update In case of aliasing. */
1167 result = Fassoc (variable, BVAR (buf, local_var_alist)); 1177 result = Fassoc (variable, BVAR (buf, local_var_alist), Qnil);
1168 if (!NILP (result)) 1178 if (!NILP (result))
1169 { 1179 {
1170 if (blv->fwd) 1180 if (blv->fwd)
@@ -2322,6 +2332,8 @@ results, see Info node `(elisp)Swapping Text'. */)
2322 swapfield_ (enable_multibyte_characters, Lisp_Object); 2332 swapfield_ (enable_multibyte_characters, Lisp_Object);
2323 swapfield_ (bidi_display_reordering, Lisp_Object); 2333 swapfield_ (bidi_display_reordering, Lisp_Object);
2324 swapfield_ (bidi_paragraph_direction, Lisp_Object); 2334 swapfield_ (bidi_paragraph_direction, Lisp_Object);
2335 swapfield_ (bidi_paragraph_separate_re, Lisp_Object);
2336 swapfield_ (bidi_paragraph_start_re, Lisp_Object);
2325 /* FIXME: Not sure what we should do with these *_marker fields. 2337 /* FIXME: Not sure what we should do with these *_marker fields.
2326 Hopefully they're just nil anyway. */ 2338 Hopefully they're just nil anyway. */
2327 swapfield_ (pt_marker, Lisp_Object); 2339 swapfield_ (pt_marker, Lisp_Object);
@@ -3054,6 +3066,33 @@ mouse_face_overlay_overlaps (Lisp_Object overlay)
3054 return i < n; 3066 return i < n;
3055} 3067}
3056 3068
3069/* Return the value of the 'display-line-numbers-disable' property at
3070 EOB, if there's an overlay at ZV with a non-nil value of that property. */
3071Lisp_Object
3072disable_line_numbers_overlay_at_eob (void)
3073{
3074 ptrdiff_t n, i, size;
3075 Lisp_Object *v, tem = Qnil;
3076 Lisp_Object vbuf[10];
3077 USE_SAFE_ALLOCA;
3078
3079 size = ARRAYELTS (vbuf);
3080 v = vbuf;
3081 n = overlays_in (ZV, ZV, 0, &v, &size, NULL, NULL);
3082 if (n > size)
3083 {
3084 SAFE_NALLOCA (v, 1, n);
3085 overlays_in (ZV, ZV, 0, &v, &n, NULL, NULL);
3086 }
3087
3088 for (i = 0; i < n; ++i)
3089 if ((tem = Foverlay_get (v[i], Qdisplay_line_numbers_disable),
3090 !NILP (tem)))
3091 break;
3092
3093 SAFE_FREE ();
3094 return tem;
3095}
3057 3096
3058 3097
3059/* Fast function to just test if we're at an overlay boundary. */ 3098/* Fast function to just test if we're at an overlay boundary. */
@@ -5094,6 +5133,8 @@ init_buffer_once (void)
5094 XSETFASTINT (BVAR (&buffer_local_flags, category_table), idx); ++idx; 5133 XSETFASTINT (BVAR (&buffer_local_flags, category_table), idx); ++idx;
5095 XSETFASTINT (BVAR (&buffer_local_flags, bidi_display_reordering), idx); ++idx; 5134 XSETFASTINT (BVAR (&buffer_local_flags, bidi_display_reordering), idx); ++idx;
5096 XSETFASTINT (BVAR (&buffer_local_flags, bidi_paragraph_direction), idx); ++idx; 5135 XSETFASTINT (BVAR (&buffer_local_flags, bidi_paragraph_direction), idx); ++idx;
5136 XSETFASTINT (BVAR (&buffer_local_flags, bidi_paragraph_separate_re), idx); ++idx;
5137 XSETFASTINT (BVAR (&buffer_local_flags, bidi_paragraph_start_re), idx); ++idx;
5097 XSETFASTINT (BVAR (&buffer_local_flags, buffer_file_coding_system), idx); 5138 XSETFASTINT (BVAR (&buffer_local_flags, buffer_file_coding_system), idx);
5098 /* Make this one a permanent local. */ 5139 /* Make this one a permanent local. */
5099 buffer_permanent_local_flags[idx++] = 1; 5140 buffer_permanent_local_flags[idx++] = 1;
@@ -5175,6 +5216,8 @@ init_buffer_once (void)
5175 bset_ctl_arrow (&buffer_defaults, Qt); 5216 bset_ctl_arrow (&buffer_defaults, Qt);
5176 bset_bidi_display_reordering (&buffer_defaults, Qt); 5217 bset_bidi_display_reordering (&buffer_defaults, Qt);
5177 bset_bidi_paragraph_direction (&buffer_defaults, Qnil); 5218 bset_bidi_paragraph_direction (&buffer_defaults, Qnil);
5219 bset_bidi_paragraph_start_re (&buffer_defaults, Qnil);
5220 bset_bidi_paragraph_separate_re (&buffer_defaults, Qnil);
5178 bset_cursor_type (&buffer_defaults, Qt); 5221 bset_cursor_type (&buffer_defaults, Qt);
5179 bset_extra_line_spacing (&buffer_defaults, Qnil); 5222 bset_extra_line_spacing (&buffer_defaults, Qnil);
5180 bset_cursor_in_non_selected_windows (&buffer_defaults, Qt); 5223 bset_cursor_in_non_selected_windows (&buffer_defaults, Qt);
@@ -5589,6 +5632,49 @@ This variable is never applied to a way of decoding a file while reading it. */
5589 &BVAR (current_buffer, bidi_display_reordering), Qnil, 5632 &BVAR (current_buffer, bidi_display_reordering), Qnil,
5590 doc: /* Non-nil means reorder bidirectional text for display in the visual order. */); 5633 doc: /* Non-nil means reorder bidirectional text for display in the visual order. */);
5591 5634
5635 DEFVAR_PER_BUFFER ("bidi-paragraph-start-re",
5636 &BVAR (current_buffer, bidi_paragraph_start_re), Qnil,
5637 doc: /* If non-nil, a regexp matching a line that starts OR separates paragraphs.
5638
5639The value of nil means to use empty lines as lines that start and
5640separate paragraphs.
5641
5642When Emacs displays bidirectional text, it by default computes
5643the base paragraph direction separately for each paragraph.
5644Setting this variable changes the places where paragraph base
5645direction is recomputed.
5646
5647The regexp is always matched after a newline, so it is best to
5648anchor it by beginning it with a "^".
5649
5650If you change the value of this variable, be sure to change
5651the value of `bidi-paragraph-separate-re' accordingly. For
5652example, to have a single newline behave as a paragraph separator,
5653set both these variables to "^".
5654
5655See also `bidi-paragraph-direction'. */);
5656
5657 DEFVAR_PER_BUFFER ("bidi-paragraph-separate-re",
5658 &BVAR (current_buffer, bidi_paragraph_separate_re), Qnil,
5659 doc: /* If non-nil, a regexp matching a line that separates paragraphs.
5660
5661The value of nil means to use empty lines as paragraph separators.
5662
5663When Emacs displays bidirectional text, it by default computes
5664the base paragraph direction separately for each paragraph.
5665Setting this variable changes the places where paragraph base
5666direction is recomputed.
5667
5668The regexp is always matched after a newline, so it is best to
5669anchor it by beginning it with a "^".
5670
5671If you change the value of this variable, be sure to change
5672the value of `bidi-paragraph-start-re' accordingly. For
5673example, to have a single newline behave as a paragraph separator,
5674set both these variables to "^".
5675
5676See also `bidi-paragraph-direction'. */);
5677
5592 DEFVAR_PER_BUFFER ("bidi-paragraph-direction", 5678 DEFVAR_PER_BUFFER ("bidi-paragraph-direction",
5593 &BVAR (current_buffer, bidi_paragraph_direction), Qnil, 5679 &BVAR (current_buffer, bidi_paragraph_direction), Qnil,
5594 doc: /* If non-nil, forces directionality of text paragraphs in the buffer. 5680 doc: /* If non-nil, forces directionality of text paragraphs in the buffer.
diff --git a/src/buffer.h b/src/buffer.h
index be270fe4823..46ca6aa7384 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -611,6 +611,12 @@ struct buffer
611 direction dynamically for each paragraph. */ 611 direction dynamically for each paragraph. */
612 Lisp_Object bidi_paragraph_direction_; 612 Lisp_Object bidi_paragraph_direction_;
613 613
614 /* If non-nil, a regular expression for bidi paragraph separator. */
615 Lisp_Object bidi_paragraph_separate_re_;
616
617 /* If non-nil, a regular expression for bidi paragraph start. */
618 Lisp_Object bidi_paragraph_start_re_;
619
614 /* Non-nil means do selective display; 620 /* Non-nil means do selective display;
615 see doc string in syms_of_buffer (buffer.c) for details. */ 621 see doc string in syms_of_buffer (buffer.c) for details. */
616 Lisp_Object selective_display_; 622 Lisp_Object selective_display_;
diff --git a/src/charset.c b/src/charset.c
index 9c3b8db2a53..6ce2f902c81 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -407,44 +407,49 @@ load_charset_map (struct charset *charset, struct charset_map_entries *entries,
407 407
408 408
409/* Read a hexadecimal number (preceded by "0x") from the file FP while 409/* Read a hexadecimal number (preceded by "0x") from the file FP while
410 paying attention to comment character '#'. */ 410 paying attention to comment character '#'. LOOKAHEAD is the
411 lookahead byte if it is nonnegative. Store into *TERMINATOR the
412 input byte after the number, or EOF if an end-of-file or input
413 error occurred. Set *OVERFLOW if the number overflows. */
411 414
412static unsigned 415static unsigned
413read_hex (FILE *fp, bool *eof, bool *overflow) 416read_hex (FILE *fp, int lookahead, int *terminator, bool *overflow)
414{ 417{
415 int c; 418 int c = lookahead < 0 ? getc_unlocked (fp) : lookahead;
416 unsigned n;
417 419
418 while ((c = getc_unlocked (fp)) != EOF) 420 while (true)
419 { 421 {
420 if (c == '#') 422 if (c == '#')
421 { 423 do
422 while ((c = getc_unlocked (fp)) != EOF && c != '\n'); 424 c = getc_unlocked (fp);
423 } 425 while (0 <= c && c != '\n');
424 else if (c == '0') 426 else if (c == '0')
425 { 427 {
426 if ((c = getc_unlocked (fp)) == EOF || c == 'x') 428 c = getc_unlocked (fp);
429 if (c < 0 || c == 'x')
427 break; 430 break;
428 } 431 }
429 } 432 if (c < 0)
430 if (c == EOF)
431 {
432 *eof = 1;
433 return 0;
434 }
435 n = 0;
436 while (true)
437 {
438 c = getc_unlocked (fp);
439 int digit = char_hexdigit (c);
440 if (digit < 0)
441 break; 433 break;
442 if (INT_LEFT_SHIFT_OVERFLOW (n, 4)) 434 c = getc_unlocked (fp);
443 *overflow = 1;
444 n = (n << 4) + digit;
445 } 435 }
446 if (c != EOF) 436
447 ungetc (c, fp); 437 unsigned n = 0;
438 bool v = false;
439
440 if (0 <= c)
441 while (true)
442 {
443 c = getc_unlocked (fp);
444 int digit = char_hexdigit (c);
445 if (digit < 0)
446 break;
447 v |= INT_LEFT_SHIFT_OVERFLOW (n, 4);
448 n = (n << 4) + digit;
449 }
450
451 *terminator = c;
452 *overflow |= v;
448 return n; 453 return n;
449} 454}
450 455
@@ -499,23 +504,26 @@ load_charset_map_from_file (struct charset *charset, Lisp_Object mapfile,
499 memset (entries, 0, sizeof (struct charset_map_entries)); 504 memset (entries, 0, sizeof (struct charset_map_entries));
500 505
501 n_entries = 0; 506 n_entries = 0;
502 while (1) 507 int ch = -1;
508 while (true)
503 { 509 {
504 unsigned from, to, c; 510 bool overflow = false;
505 int idx; 511 unsigned from = read_hex (fp, ch, &ch, &overflow), to;
506 bool eof = 0, overflow = 0; 512 if (ch < 0)
507
508 from = read_hex (fp, &eof, &overflow);
509 if (eof)
510 break; 513 break;
511 if (getc_unlocked (fp) == '-') 514 if (ch == '-')
512 to = read_hex (fp, &eof, &overflow); 515 {
516 to = read_hex (fp, -1, &ch, &overflow);
517 if (ch < 0)
518 break;
519 }
513 else 520 else
514 to = from; 521 {
515 if (eof) 522 to = from;
516 break; 523 ch = -1;
517 c = read_hex (fp, &eof, &overflow); 524 }
518 if (eof) 525 unsigned c = read_hex (fp, ch, &ch, &overflow);
526 if (ch < 0)
519 break; 527 break;
520 528
521 if (overflow) 529 if (overflow)
@@ -530,7 +538,7 @@ load_charset_map_from_file (struct charset *charset, Lisp_Object mapfile,
530 memset (entries, 0, sizeof (struct charset_map_entries)); 538 memset (entries, 0, sizeof (struct charset_map_entries));
531 n_entries = 0; 539 n_entries = 0;
532 } 540 }
533 idx = n_entries; 541 int idx = n_entries;
534 entries->entry[idx].from = from; 542 entries->entry[idx].from = from;
535 entries->entry[idx].to = to; 543 entries->entry[idx].to = to;
536 entries->entry[idx].c = c; 544 entries->entry[idx].c = c;
diff --git a/src/coding.c b/src/coding.c
index 5682fc015ad..50ad206be69 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -10539,7 +10539,7 @@ usage: (define-coding-system-internal ...) */)
10539 ASET (this_spec, 2, this_eol_type); 10539 ASET (this_spec, 2, this_eol_type);
10540 Fputhash (this_name, this_spec, Vcoding_system_hash_table); 10540 Fputhash (this_name, this_spec, Vcoding_system_hash_table);
10541 Vcoding_system_list = Fcons (this_name, Vcoding_system_list); 10541 Vcoding_system_list = Fcons (this_name, Vcoding_system_list);
10542 val = Fassoc (Fsymbol_name (this_name), Vcoding_system_alist); 10542 val = Fassoc (Fsymbol_name (this_name), Vcoding_system_alist, Qnil);
10543 if (NILP (val)) 10543 if (NILP (val))
10544 Vcoding_system_alist 10544 Vcoding_system_alist
10545 = Fcons (Fcons (Fsymbol_name (this_name), Qnil), 10545 = Fcons (Fcons (Fsymbol_name (this_name), Qnil),
@@ -10554,7 +10554,7 @@ usage: (define-coding-system-internal ...) */)
10554 10554
10555 Fputhash (name, spec_vec, Vcoding_system_hash_table); 10555 Fputhash (name, spec_vec, Vcoding_system_hash_table);
10556 Vcoding_system_list = Fcons (name, Vcoding_system_list); 10556 Vcoding_system_list = Fcons (name, Vcoding_system_list);
10557 val = Fassoc (Fsymbol_name (name), Vcoding_system_alist); 10557 val = Fassoc (Fsymbol_name (name), Vcoding_system_alist, Qnil);
10558 if (NILP (val)) 10558 if (NILP (val))
10559 Vcoding_system_alist = Fcons (Fcons (Fsymbol_name (name), Qnil), 10559 Vcoding_system_alist = Fcons (Fcons (Fsymbol_name (name), Qnil),
10560 Vcoding_system_alist); 10560 Vcoding_system_alist);
@@ -10662,7 +10662,7 @@ DEFUN ("define-coding-system-alias", Fdefine_coding_system_alias,
10662 10662
10663 Fputhash (alias, spec, Vcoding_system_hash_table); 10663 Fputhash (alias, spec, Vcoding_system_hash_table);
10664 Vcoding_system_list = Fcons (alias, Vcoding_system_list); 10664 Vcoding_system_list = Fcons (alias, Vcoding_system_list);
10665 val = Fassoc (Fsymbol_name (alias), Vcoding_system_alist); 10665 val = Fassoc (Fsymbol_name (alias), Vcoding_system_alist, Qnil);
10666 if (NILP (val)) 10666 if (NILP (val))
10667 Vcoding_system_alist = Fcons (Fcons (Fsymbol_name (alias), Qnil), 10667 Vcoding_system_alist = Fcons (Fcons (Fsymbol_name (alias), Qnil),
10668 Vcoding_system_alist); 10668 Vcoding_system_alist);
diff --git a/src/dbusbind.c b/src/dbusbind.c
index d2460fd886e..0d9d3e514fd 100644
--- a/src/dbusbind.c
+++ b/src/dbusbind.c
@@ -955,7 +955,7 @@ xd_get_connection_address (Lisp_Object bus)
955 DBusConnection *connection; 955 DBusConnection *connection;
956 Lisp_Object val; 956 Lisp_Object val;
957 957
958 val = CDR_SAFE (Fassoc (bus, xd_registered_buses)); 958 val = CDR_SAFE (Fassoc (bus, xd_registered_buses, Qnil));
959 if (NILP (val)) 959 if (NILP (val))
960 XD_SIGNAL2 (build_string ("No connection to bus"), bus); 960 XD_SIGNAL2 (build_string ("No connection to bus"), bus);
961 else 961 else
@@ -1057,7 +1057,7 @@ xd_close_bus (Lisp_Object bus)
1057 Lisp_Object busobj; 1057 Lisp_Object busobj;
1058 1058
1059 /* Check whether we are connected. */ 1059 /* Check whether we are connected. */
1060 val = Fassoc (bus, xd_registered_buses); 1060 val = Fassoc (bus, xd_registered_buses, Qnil);
1061 if (NILP (val)) 1061 if (NILP (val))
1062 return; 1062 return;
1063 1063
@@ -1127,7 +1127,7 @@ this connection to those buses. */)
1127 xd_close_bus (bus); 1127 xd_close_bus (bus);
1128 1128
1129 /* Check, whether we are still connected. */ 1129 /* Check, whether we are still connected. */
1130 val = Fassoc (bus, xd_registered_buses); 1130 val = Fassoc (bus, xd_registered_buses, Qnil);
1131 if (!NILP (val)) 1131 if (!NILP (val))
1132 { 1132 {
1133 connection = xd_get_connection_address (bus); 1133 connection = xd_get_connection_address (bus);
diff --git a/src/dispextern.h b/src/dispextern.h
index 8644ce26d13..1df769a8f99 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -384,6 +384,7 @@ struct glyph
384 glyph standing for newline at end of line 0 384 glyph standing for newline at end of line 0
385 empty space after the end of the line -1 385 empty space after the end of the line -1
386 overlay arrow on a TTY -1 386 overlay arrow on a TTY -1
387 glyph displaying line number -1
387 glyph at EOB that ends in a newline -1 388 glyph at EOB that ends in a newline -1
388 left truncation glyphs: -1 389 left truncation glyphs: -1
389 right truncation/continuation glyphs next buffer position 390 right truncation/continuation glyphs next buffer position
@@ -2537,7 +2538,12 @@ struct it
2537 Do NOT use !BUFFERP (it.object) as a test whether we are 2538 Do NOT use !BUFFERP (it.object) as a test whether we are
2538 iterating over a string; use STRINGP (it.string) instead. 2539 iterating over a string; use STRINGP (it.string) instead.
2539 2540
2540 Position is the current iterator position in object. */ 2541 Position is the current iterator position in object.
2542
2543 The 'position's CHARPOS is copied to glyph->charpos of the glyph
2544 produced by PRODUCE_GLYPHS, so any artificial value documented
2545 under 'struct glyph's 'charpos' member can also be found in the
2546 'position' member here. */
2541 Lisp_Object object; 2547 Lisp_Object object;
2542 struct text_pos position; 2548 struct text_pos position;
2543 2549
@@ -2621,6 +2627,20 @@ struct it
2621 coordinate is past first_visible_x. */ 2627 coordinate is past first_visible_x. */
2622 int hpos; 2628 int hpos;
2623 2629
2630 /* Current line number, zero-based. */
2631 ptrdiff_t lnum;
2632
2633 /* The byte position corresponding to lnum. */
2634 ptrdiff_t lnum_bytepos;
2635
2636 /* The width, in columns and in pixels, needed for display of the
2637 line numbers, or zero if not computed. */
2638 int lnum_width;
2639 int lnum_pixel_width;
2640
2641 /* The line number of point's line, or zero if not computed yet. */
2642 ptrdiff_t pt_lnum;
2643
2624 /* Left fringe bitmap number (enum fringe_bitmap_type). */ 2644 /* Left fringe bitmap number (enum fringe_bitmap_type). */
2625 unsigned left_user_fringe_bitmap : FRINGE_ID_BITS; 2645 unsigned left_user_fringe_bitmap : FRINGE_ID_BITS;
2626 2646
diff --git a/src/emacs-module.c b/src/emacs-module.c
index 7b1a402eeff..ad6c8fb0104 100644
--- a/src/emacs-module.c
+++ b/src/emacs-module.c
@@ -315,20 +315,18 @@ module_free_global_ref (emacs_env *env, emacs_value ref)
315 MODULE_FUNCTION_BEGIN (); 315 MODULE_FUNCTION_BEGIN ();
316 struct Lisp_Hash_Table *h = XHASH_TABLE (Vmodule_refs_hash); 316 struct Lisp_Hash_Table *h = XHASH_TABLE (Vmodule_refs_hash);
317 Lisp_Object obj = value_to_lisp (ref); 317 Lisp_Object obj = value_to_lisp (ref);
318 EMACS_UINT hashcode; 318 ptrdiff_t i = hash_lookup (h, obj, NULL);
319 ptrdiff_t i = hash_lookup (h, obj, &hashcode);
320 319
321 if (i >= 0) 320 if (i >= 0)
322 { 321 {
323 Lisp_Object value = HASH_VALUE (h, i); 322 EMACS_INT refcount = XFASTINT (HASH_VALUE (h, i)) - 1;
324 EMACS_INT refcount = XFASTINT (value) - 1;
325 if (refcount > 0) 323 if (refcount > 0)
324 set_hash_value_slot (h, i, make_natnum (refcount));
325 else
326 { 326 {
327 value = make_natnum (refcount); 327 eassert (refcount == 0);
328 set_hash_value_slot (h, i, value); 328 hash_remove_from_table (h, obj);
329 } 329 }
330 else
331 hash_remove_from_table (h, value);
332 } 330 }
333 331
334 if (module_assertions) 332 if (module_assertions)
@@ -817,9 +815,13 @@ in_current_thread (void)
817static void 815static void
818module_assert_thread (void) 816module_assert_thread (void)
819{ 817{
820 if (! module_assertions || in_current_thread ()) 818 if (!module_assertions)
821 return; 819 return;
822 module_abort ("Module function called from outside the current Lisp thread"); 820 if (!in_current_thread ())
821 module_abort ("Module function called from outside "
822 "the current Lisp thread");
823 if (gc_in_progress)
824 module_abort ("Module function called during garbage collection");
823} 825}
824 826
825static void 827static void
diff --git a/src/eval.c b/src/eval.c
index 8f293c9d300..e5900382dee 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -213,13 +213,6 @@ backtrace_next (union specbinding *pdl)
213 return pdl; 213 return pdl;
214} 214}
215 215
216/* Return a pointer to somewhere near the top of the C stack. */
217void *
218near_C_stack_top (void)
219{
220 return backtrace_args (backtrace_top ());
221}
222
223void 216void
224init_eval_once (void) 217init_eval_once (void)
225{ 218{
@@ -2090,7 +2083,7 @@ record_in_backtrace (Lisp_Object function, Lisp_Object *args, ptrdiff_t nargs)
2090 specpdl_ptr->bt.kind = SPECPDL_BACKTRACE; 2083 specpdl_ptr->bt.kind = SPECPDL_BACKTRACE;
2091 specpdl_ptr->bt.debug_on_exit = false; 2084 specpdl_ptr->bt.debug_on_exit = false;
2092 specpdl_ptr->bt.function = function; 2085 specpdl_ptr->bt.function = function;
2093 specpdl_ptr->bt.args = args; 2086 current_thread->stack_top = specpdl_ptr->bt.args = args;
2094 specpdl_ptr->bt.nargs = nargs; 2087 specpdl_ptr->bt.nargs = nargs;
2095 grow_specpdl (); 2088 grow_specpdl ();
2096 2089
diff --git a/src/fns.c b/src/fns.c
index 6610d2a6d0e..d849618f2b7 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -35,6 +35,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
35#include "intervals.h" 35#include "intervals.h"
36#include "window.h" 36#include "window.h"
37#include "puresize.h" 37#include "puresize.h"
38#include "gnutls.h"
39
40#ifdef WINDOWSNT
41# define gnutls_rnd w32_gnutls_rnd
42#endif
38 43
39static void sort_vector_copy (Lisp_Object, ptrdiff_t, 44static void sort_vector_copy (Lisp_Object, ptrdiff_t,
40 Lisp_Object *restrict, Lisp_Object *restrict); 45 Lisp_Object *restrict, Lisp_Object *restrict);
@@ -1417,17 +1422,22 @@ assq_no_quit (Lisp_Object key, Lisp_Object list)
1417 return Qnil; 1422 return Qnil;
1418} 1423}
1419 1424
1420DEFUN ("assoc", Fassoc, Sassoc, 2, 2, 0, 1425DEFUN ("assoc", Fassoc, Sassoc, 2, 3, 0,
1421 doc: /* Return non-nil if KEY is `equal' to the car of an element of LIST. 1426 doc: /* Return non-nil if KEY is equal to the car of an element of LIST.
1422The value is actually the first element of LIST whose car equals KEY. */) 1427The value is actually the first element of LIST whose car equals KEY.
1423 (Lisp_Object key, Lisp_Object list) 1428
1429Equality is defined by TESTFN if non-nil or by `equal' if nil. */)
1430 (Lisp_Object key, Lisp_Object list, Lisp_Object testfn)
1424{ 1431{
1425 Lisp_Object tail = list; 1432 Lisp_Object tail = list;
1426 FOR_EACH_TAIL (tail) 1433 FOR_EACH_TAIL (tail)
1427 { 1434 {
1428 Lisp_Object car = XCAR (tail); 1435 Lisp_Object car = XCAR (tail);
1429 if (CONSP (car) 1436 if (CONSP (car)
1430 && (EQ (XCAR (car), key) || !NILP (Fequal (XCAR (car), key)))) 1437 && (NILP (testfn)
1438 ? (EQ (XCAR (car), key) || !NILP (Fequal
1439 (XCAR (car), key)))
1440 : !NILP (call2 (testfn, XCAR (car), key))))
1431 return car; 1441 return car;
1432 } 1442 }
1433 CHECK_LIST_END (tail, list); 1443 CHECK_LIST_END (tail, list);
@@ -4735,22 +4745,42 @@ make_digest_string (Lisp_Object digest, int digest_size)
4735 return digest; 4745 return digest;
4736} 4746}
4737 4747
4738/* ALGORITHM is a symbol: md5, sha1, sha224 and so on. */ 4748DEFUN ("secure-hash-algorithms", Fsecure_hash_algorithms,
4749 Ssecure_hash_algorithms, 0, 0, 0,
4750 doc: /* Return a list of all the supported `secure_hash' algorithms. */)
4751 (void)
4752{
4753 return listn (CONSTYPE_HEAP, 6,
4754 Qmd5,
4755 Qsha1,
4756 Qsha224,
4757 Qsha256,
4758 Qsha384,
4759 Qsha512);
4760}
4739 4761
4740static Lisp_Object 4762/* Extract data from a string or a buffer. SPEC is a list of
4741secure_hash (Lisp_Object algorithm, Lisp_Object object, Lisp_Object start, 4763(BUFFER-OR-STRING-OR-SYMBOL START END CODING-SYSTEM NOERROR) which behave as
4742 Lisp_Object end, Lisp_Object coding_system, Lisp_Object noerror, 4764specified with `secure-hash' and in Info node
4743 Lisp_Object binary) 4765`(elisp)Format of GnuTLS Cryptography Inputs'. */
4766char *
4767extract_data_from_object (Lisp_Object spec,
4768 ptrdiff_t *start_byte,
4769 ptrdiff_t *end_byte)
4744{ 4770{
4745 ptrdiff_t size, start_char = 0, start_byte, end_char = 0, end_byte; 4771 Lisp_Object object = XCAR (spec);
4746 register EMACS_INT b, e;
4747 register struct buffer *bp;
4748 EMACS_INT temp;
4749 int digest_size;
4750 void *(*hash_func) (const char *, size_t, void *);
4751 Lisp_Object digest;
4752 4772
4753 CHECK_SYMBOL (algorithm); 4773 if (CONSP (spec)) spec = XCDR (spec);
4774 Lisp_Object start = CAR_SAFE (spec);
4775
4776 if (CONSP (spec)) spec = XCDR (spec);
4777 Lisp_Object end = CAR_SAFE (spec);
4778
4779 if (CONSP (spec)) spec = XCDR (spec);
4780 Lisp_Object coding_system = CAR_SAFE (spec);
4781
4782 if (CONSP (spec)) spec = XCDR (spec);
4783 Lisp_Object noerror = CAR_SAFE (spec);
4754 4784
4755 if (STRINGP (object)) 4785 if (STRINGP (object))
4756 { 4786 {
@@ -4778,23 +4808,24 @@ secure_hash (Lisp_Object algorithm, Lisp_Object object, Lisp_Object start,
4778 if (STRING_MULTIBYTE (object)) 4808 if (STRING_MULTIBYTE (object))
4779 object = code_convert_string (object, coding_system, Qnil, 1, 0, 1); 4809 object = code_convert_string (object, coding_system, Qnil, 1, 0, 1);
4780 4810
4781 size = SCHARS (object); 4811 ptrdiff_t size = SCHARS (object), start_char, end_char;
4782 validate_subarray (object, start, end, size, &start_char, &end_char); 4812 validate_subarray (object, start, end, size, &start_char, &end_char);
4783 4813
4784 start_byte = !start_char ? 0 : string_char_to_byte (object, start_char); 4814 *start_byte = !start_char ? 0 : string_char_to_byte (object, start_char);
4785 end_byte = (end_char == size 4815 *end_byte = (end_char == size
4786 ? SBYTES (object) 4816 ? SBYTES (object)
4787 : string_char_to_byte (object, end_char)); 4817 : string_char_to_byte (object, end_char));
4788 } 4818 }
4789 else 4819 else if (BUFFERP (object))
4790 { 4820 {
4791 struct buffer *prev = current_buffer; 4821 struct buffer *prev = current_buffer;
4822 EMACS_INT b, e;
4792 4823
4793 record_unwind_current_buffer (); 4824 record_unwind_current_buffer ();
4794 4825
4795 CHECK_BUFFER (object); 4826 CHECK_BUFFER (object);
4796 4827
4797 bp = XBUFFER (object); 4828 struct buffer *bp = XBUFFER (object);
4798 set_buffer_internal (bp); 4829 set_buffer_internal (bp);
4799 4830
4800 if (NILP (start)) 4831 if (NILP (start))
@@ -4814,7 +4845,11 @@ secure_hash (Lisp_Object algorithm, Lisp_Object object, Lisp_Object start,
4814 } 4845 }
4815 4846
4816 if (b > e) 4847 if (b > e)
4817 temp = b, b = e, e = temp; 4848 {
4849 EMACS_INT temp = b;
4850 b = e;
4851 e = temp;
4852 }
4818 4853
4819 if (!(BEGV <= b && e <= ZV)) 4854 if (!(BEGV <= b && e <= ZV))
4820 args_out_of_range (start, end); 4855 args_out_of_range (start, end);
@@ -4887,10 +4922,55 @@ secure_hash (Lisp_Object algorithm, Lisp_Object object, Lisp_Object start,
4887 4922
4888 if (STRING_MULTIBYTE (object)) 4923 if (STRING_MULTIBYTE (object))
4889 object = code_convert_string (object, coding_system, Qnil, 1, 0, 0); 4924 object = code_convert_string (object, coding_system, Qnil, 1, 0, 0);
4890 start_byte = 0; 4925 *start_byte = 0;
4891 end_byte = SBYTES (object); 4926 *end_byte = SBYTES (object);
4927 }
4928 else if (EQ (object, Qiv_auto))
4929 {
4930#ifdef HAVE_GNUTLS3
4931 /* Format: (iv-auto REQUIRED-LENGTH). */
4932
4933 if (! NATNUMP (start))
4934 error ("Without a length, `iv-auto' can't be used; see ELisp manual");
4935 else
4936 {
4937 EMACS_INT start_hold = XFASTINT (start);
4938 object = make_uninit_string (start_hold);
4939 gnutls_rnd (GNUTLS_RND_NONCE, SSDATA (object), start_hold);
4940
4941 *start_byte = 0;
4942 *end_byte = start_hold;
4943 }
4944#else
4945 error ("GnuTLS is not available, so `iv-auto' can't be used");
4946#endif
4892 } 4947 }
4893 4948
4949 return SSDATA (object);
4950}
4951
4952
4953/* ALGORITHM is a symbol: md5, sha1, sha224 and so on. */
4954
4955static Lisp_Object
4956secure_hash (Lisp_Object algorithm, Lisp_Object object, Lisp_Object start,
4957 Lisp_Object end, Lisp_Object coding_system, Lisp_Object noerror,
4958 Lisp_Object binary)
4959{
4960 ptrdiff_t start_byte, end_byte;
4961 int digest_size;
4962 void *(*hash_func) (const char *, size_t, void *);
4963 Lisp_Object digest;
4964
4965 CHECK_SYMBOL (algorithm);
4966
4967 Lisp_Object spec = list5 (object, start, end, coding_system, noerror);
4968
4969 const char *input = extract_data_from_object (spec, &start_byte, &end_byte);
4970
4971 if (input == NULL)
4972 error ("secure_hash: failed to extract data from object, aborting!");
4973
4894 if (EQ (algorithm, Qmd5)) 4974 if (EQ (algorithm, Qmd5))
4895 { 4975 {
4896 digest_size = MD5_DIGEST_SIZE; 4976 digest_size = MD5_DIGEST_SIZE;
@@ -4928,7 +5008,7 @@ secure_hash (Lisp_Object algorithm, Lisp_Object object, Lisp_Object start,
4928 hexified value */ 5008 hexified value */
4929 digest = make_uninit_string (digest_size * 2); 5009 digest = make_uninit_string (digest_size * 2);
4930 5010
4931 hash_func (SSDATA (object) + start_byte, 5011 hash_func (input + start_byte,
4932 end_byte - start_byte, 5012 end_byte - start_byte,
4933 SSDATA (digest)); 5013 SSDATA (digest));
4934 5014
@@ -4979,6 +5059,8 @@ The two optional arguments START and END are positions specifying for
4979which part of OBJECT to compute the hash. If nil or omitted, uses the 5059which part of OBJECT to compute the hash. If nil or omitted, uses the
4980whole OBJECT. 5060whole OBJECT.
4981 5061
5062The full list of algorithms can be obtained with `secure-hash-algorithms'.
5063
4982If BINARY is non-nil, returns a string in binary form. */) 5064If BINARY is non-nil, returns a string in binary form. */)
4983 (Lisp_Object algorithm, Lisp_Object object, Lisp_Object start, Lisp_Object end, Lisp_Object binary) 5065 (Lisp_Object algorithm, Lisp_Object object, Lisp_Object start, Lisp_Object end, Lisp_Object binary)
4984{ 5066{
@@ -5026,13 +5108,6 @@ disregarding any coding systems. If nil, use the current buffer. */ )
5026void 5108void
5027syms_of_fns (void) 5109syms_of_fns (void)
5028{ 5110{
5029 DEFSYM (Qmd5, "md5");
5030 DEFSYM (Qsha1, "sha1");
5031 DEFSYM (Qsha224, "sha224");
5032 DEFSYM (Qsha256, "sha256");
5033 DEFSYM (Qsha384, "sha384");
5034 DEFSYM (Qsha512, "sha512");
5035
5036 /* Hash table stuff. */ 5111 /* Hash table stuff. */
5037 DEFSYM (Qhash_table_p, "hash-table-p"); 5112 DEFSYM (Qhash_table_p, "hash-table-p");
5038 DEFSYM (Qeq, "eq"); 5113 DEFSYM (Qeq, "eq");
@@ -5069,6 +5144,18 @@ syms_of_fns (void)
5069 defsubr (&Smaphash); 5144 defsubr (&Smaphash);
5070 defsubr (&Sdefine_hash_table_test); 5145 defsubr (&Sdefine_hash_table_test);
5071 5146
5147 /* Crypto and hashing stuff. */
5148 DEFSYM (Qiv_auto, "iv-auto");
5149
5150 DEFSYM (Qmd5, "md5");
5151 DEFSYM (Qsha1, "sha1");
5152 DEFSYM (Qsha224, "sha224");
5153 DEFSYM (Qsha256, "sha256");
5154 DEFSYM (Qsha384, "sha384");
5155 DEFSYM (Qsha512, "sha512");
5156
5157 /* Miscellaneous stuff. */
5158
5072 DEFSYM (Qstring_lessp, "string-lessp"); 5159 DEFSYM (Qstring_lessp, "string-lessp");
5073 DEFSYM (Qprovide, "provide"); 5160 DEFSYM (Qprovide, "provide");
5074 DEFSYM (Qrequire, "require"); 5161 DEFSYM (Qrequire, "require");
@@ -5187,6 +5274,7 @@ this variable. */);
5187 defsubr (&Sbase64_encode_string); 5274 defsubr (&Sbase64_encode_string);
5188 defsubr (&Sbase64_decode_string); 5275 defsubr (&Sbase64_decode_string);
5189 defsubr (&Smd5); 5276 defsubr (&Smd5);
5277 defsubr (&Ssecure_hash_algorithms);
5190 defsubr (&Ssecure_hash); 5278 defsubr (&Ssecure_hash);
5191 defsubr (&Sbuffer_hash); 5279 defsubr (&Sbuffer_hash);
5192 defsubr (&Slocale_info); 5280 defsubr (&Slocale_info);
diff --git a/src/font.c b/src/font.c
index 5a3f271ef85..a5e5b6a5b9d 100644
--- a/src/font.c
+++ b/src/font.c
@@ -1893,7 +1893,7 @@ otf_tag_symbol (OTF_Tag tag)
1893static OTF * 1893static OTF *
1894otf_open (Lisp_Object file) 1894otf_open (Lisp_Object file)
1895{ 1895{
1896 Lisp_Object val = Fassoc (file, otf_list); 1896 Lisp_Object val = Fassoc (file, otf_list, Qnil);
1897 OTF *otf; 1897 OTF *otf;
1898 1898
1899 if (! NILP (val)) 1899 if (! NILP (val))
diff --git a/src/fontset.c b/src/fontset.c
index 850558b08a0..74018060b85 100644
--- a/src/fontset.c
+++ b/src/fontset.c
@@ -1186,7 +1186,7 @@ fs_query_fontset (Lisp_Object name, int name_pattern)
1186 { 1186 {
1187 tem = Frassoc (name, Vfontset_alias_alist); 1187 tem = Frassoc (name, Vfontset_alias_alist);
1188 if (NILP (tem)) 1188 if (NILP (tem))
1189 tem = Fassoc (name, Vfontset_alias_alist); 1189 tem = Fassoc (name, Vfontset_alias_alist, Qnil);
1190 if (CONSP (tem) && STRINGP (XCAR (tem))) 1190 if (CONSP (tem) && STRINGP (XCAR (tem)))
1191 name = XCAR (tem); 1191 name = XCAR (tem);
1192 else if (name_pattern == 0) 1192 else if (name_pattern == 0)
diff --git a/src/ftcrfont.c b/src/ftcrfont.c
index d72005771ec..9b592e6a740 100644
--- a/src/ftcrfont.c
+++ b/src/ftcrfont.c
@@ -81,9 +81,9 @@ ftcrfont_glyph_extents (struct font *font,
81 ftcrfont_info->metrics = 81 ftcrfont_info->metrics =
82 xrealloc (ftcrfont_info->metrics, 82 xrealloc (ftcrfont_info->metrics,
83 sizeof (struct font_metrics *) * (row + 1)); 83 sizeof (struct font_metrics *) * (row + 1));
84 bzero (ftcrfont_info->metrics + ftcrfont_info->metrics_nrows, 84 memset (ftcrfont_info->metrics + ftcrfont_info->metrics_nrows, 0,
85 (sizeof (struct font_metrics *) 85 (sizeof (struct font_metrics *)
86 * (row + 1 - ftcrfont_info->metrics_nrows))); 86 * (row + 1 - ftcrfont_info->metrics_nrows)));
87 ftcrfont_info->metrics_nrows = row + 1; 87 ftcrfont_info->metrics_nrows = row + 1;
88 } 88 }
89 if (ftcrfont_info->metrics[row] == NULL) 89 if (ftcrfont_info->metrics[row] == NULL)
diff --git a/src/gfilenotify.c b/src/gfilenotify.c
index 285a253733d..fa4854c664d 100644
--- a/src/gfilenotify.c
+++ b/src/gfilenotify.c
@@ -266,7 +266,7 @@ reason. Removing the watch by calling `gfile-rm-watch' also makes it
266invalid. */) 266invalid. */)
267 (Lisp_Object watch_descriptor) 267 (Lisp_Object watch_descriptor)
268{ 268{
269 Lisp_Object watch_object = Fassoc (watch_descriptor, watch_list); 269 Lisp_Object watch_object = Fassoc (watch_descriptor, watch_list, Qnil);
270 if (NILP (watch_object)) 270 if (NILP (watch_object))
271 return Qnil; 271 return Qnil;
272 else 272 else
diff --git a/src/gnutls.c b/src/gnutls.c
index 2078ad88f28..59694074e16 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -24,6 +24,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
24#include "process.h" 24#include "process.h"
25#include "gnutls.h" 25#include "gnutls.h"
26#include "coding.h" 26#include "coding.h"
27#include "buffer.h"
27 28
28#ifdef HAVE_GNUTLS 29#ifdef HAVE_GNUTLS
29 30
@@ -171,6 +172,59 @@ DEF_DLL_FN (const char *, gnutls_cipher_get_name,
171DEF_DLL_FN (gnutls_mac_algorithm_t, gnutls_mac_get, (gnutls_session_t)); 172DEF_DLL_FN (gnutls_mac_algorithm_t, gnutls_mac_get, (gnutls_session_t));
172DEF_DLL_FN (const char *, gnutls_mac_get_name, (gnutls_mac_algorithm_t)); 173DEF_DLL_FN (const char *, gnutls_mac_get_name, (gnutls_mac_algorithm_t));
173 174
175# ifdef HAVE_GNUTLS3
176DEF_DLL_FN (int, gnutls_rnd, (gnutls_rnd_level_t, void *, size_t));
177DEF_DLL_FN (const gnutls_mac_algorithm_t *, gnutls_mac_list, (void));
178DEF_DLL_FN (size_t, gnutls_mac_get_nonce_size, (gnutls_mac_algorithm_t));
179DEF_DLL_FN (size_t, gnutls_mac_get_key_size, (gnutls_mac_algorithm_t));
180DEF_DLL_FN (const gnutls_digest_algorithm_t *, gnutls_digest_list, (void));
181DEF_DLL_FN (const char *, gnutls_digest_get_name, (gnutls_digest_algorithm_t));
182# ifdef HAVE_GNUTLS3_CIPHER
183DEF_DLL_FN (gnutls_cipher_algorithm_t *, gnutls_cipher_list, (void));
184DEF_DLL_FN (int, gnutls_cipher_get_iv_size, (gnutls_cipher_algorithm_t));
185DEF_DLL_FN (size_t, gnutls_cipher_get_key_size, (gnutls_cipher_algorithm_t));
186DEF_DLL_FN (int, gnutls_cipher_get_block_size, (gnutls_cipher_algorithm_t));
187DEF_DLL_FN (int, gnutls_cipher_get_tag_size, (gnutls_cipher_algorithm_t));
188DEF_DLL_FN (int, gnutls_cipher_init,
189 (gnutls_cipher_hd_t *, gnutls_cipher_algorithm_t,
190 const gnutls_datum_t *, const gnutls_datum_t *));
191DEF_DLL_FN (void, gnutls_cipher_set_iv, (gnutls_cipher_hd_t, void *, size_t));
192DEF_DLL_FN (int, gnutls_cipher_encrypt2,
193 (gnutls_cipher_hd_t, const void *, size_t, void *, size_t));
194DEF_DLL_FN (void, gnutls_cipher_deinit, (gnutls_cipher_hd_t));
195DEF_DLL_FN (int, gnutls_cipher_decrypt2,
196 (gnutls_cipher_hd_t, const void *, size_t, void *, size_t));
197# ifdef HAVE_GNUTLS3_AEAD
198DEF_DLL_FN (int, gnutls_aead_cipher_init,
199 (gnutls_aead_cipher_hd_t *, gnutls_cipher_algorithm_t,
200 const gnutls_datum_t *));
201DEF_DLL_FN (void, gnutls_aead_cipher_deinit, (gnutls_aead_cipher_hd_t));
202DEF_DLL_FN (int, gnutls_aead_cipher_encrypt,
203 (gnutls_aead_cipher_hd_t, const void *, size_t, const void *,
204 size_t, size_t, const void *, size_t, void *, size_t *));
205DEF_DLL_FN (int, gnutls_aead_cipher_decrypt,
206 (gnutls_aead_cipher_hd_t, const void *, size_t, const void *,
207 size_t, size_t, const void *, size_t, void *, size_t *));
208# endif /* HAVE_GNUTLS3_AEAD */
209# ifdef HAVE_GNUTLS3_HMAC
210DEF_DLL_FN (int, gnutls_hmac_init,
211 (gnutls_hmac_hd_t *, gnutls_mac_algorithm_t, const void *, size_t));
212DEF_DLL_FN (int, gnutls_hmac_get_len, (gnutls_mac_algorithm_t));
213DEF_DLL_FN (int, gnutls_hmac, (gnutls_hmac_hd_t, const void *, size_t));
214DEF_DLL_FN (void, gnutls_hmac_deinit, (gnutls_hmac_hd_t, void *));
215DEF_DLL_FN (void, gnutls_hmac_output, (gnutls_hmac_hd_t, void *));
216# endif /* HAVE_GNUTLS3_HMAC */
217# endif /* HAVE_GNUTLS3_CIPHER */
218# ifdef HAVE_GNUTLS3_DIGEST
219 DEF_DLL_FN (int, gnutls_hash_init,
220 (gnutls_hash_hd_t *, gnutls_digest_algorithm_t));
221DEF_DLL_FN (int, gnutls_hash_get_len, (gnutls_digest_algorithm_t));
222DEF_DLL_FN (int, gnutls_hash, (gnutls_hash_hd_t, const void *, size_t));
223DEF_DLL_FN (void, gnutls_hash_deinit, (gnutls_hash_hd_t, void *));
224DEF_DLL_FN (void, gnutls_hash_output, (gnutls_hash_hd_t, void *));
225# endif /* HAVE_GNUTLS3_DIGEST */
226# endif /* HAVE_GNUTLS3 */
227
174 228
175static bool 229static bool
176init_gnutls_functions (void) 230init_gnutls_functions (void)
@@ -255,6 +309,46 @@ init_gnutls_functions (void)
255 LOAD_DLL_FN (library, gnutls_cipher_get_name); 309 LOAD_DLL_FN (library, gnutls_cipher_get_name);
256 LOAD_DLL_FN (library, gnutls_mac_get); 310 LOAD_DLL_FN (library, gnutls_mac_get);
257 LOAD_DLL_FN (library, gnutls_mac_get_name); 311 LOAD_DLL_FN (library, gnutls_mac_get_name);
312# ifdef HAVE_GNUTLS3
313 LOAD_DLL_FN (library, gnutls_rnd);
314 LOAD_DLL_FN (library, gnutls_mac_list);
315 LOAD_DLL_FN (library, gnutls_mac_get_nonce_size);
316 LOAD_DLL_FN (library, gnutls_mac_get_key_size);
317 LOAD_DLL_FN (library, gnutls_digest_list);
318 LOAD_DLL_FN (library, gnutls_digest_get_name);
319# ifdef HAVE_GNUTLS3_CIPHER
320 LOAD_DLL_FN (library, gnutls_cipher_list);
321 LOAD_DLL_FN (library, gnutls_cipher_get_iv_size);
322 LOAD_DLL_FN (library, gnutls_cipher_get_key_size);
323 LOAD_DLL_FN (library, gnutls_cipher_get_block_size);
324 LOAD_DLL_FN (library, gnutls_cipher_get_tag_size);
325 LOAD_DLL_FN (library, gnutls_cipher_init);
326 LOAD_DLL_FN (library, gnutls_cipher_set_iv);
327 LOAD_DLL_FN (library, gnutls_cipher_encrypt2);
328 LOAD_DLL_FN (library, gnutls_cipher_deinit);
329 LOAD_DLL_FN (library, gnutls_cipher_decrypt2);
330# ifdef HAVE_GNUTLS3_AEAD
331 LOAD_DLL_FN (library, gnutls_aead_cipher_init);
332 LOAD_DLL_FN (library, gnutls_aead_cipher_deinit);
333 LOAD_DLL_FN (library, gnutls_aead_cipher_encrypt);
334 LOAD_DLL_FN (library, gnutls_aead_cipher_decrypt);
335# endif
336# ifdef HAVE_GNUTLS3_HMAC
337 LOAD_DLL_FN (library, gnutls_hmac_init);
338 LOAD_DLL_FN (library, gnutls_hmac_get_len);
339 LOAD_DLL_FN (library, gnutls_hmac);
340 LOAD_DLL_FN (library, gnutls_hmac_deinit);
341 LOAD_DLL_FN (library, gnutls_hmac_output);
342# endif /* HAVE_GNUTLS3_HMAC */
343# endif /* HAVE_GNUTLS3_CIPHER */
344# ifdef HAVE_GNUTLS3_DIGEST
345 LOAD_DLL_FN (library, gnutls_hash_init);
346 LOAD_DLL_FN (library, gnutls_hash_get_len);
347 LOAD_DLL_FN (library, gnutls_hash);
348 LOAD_DLL_FN (library, gnutls_hash_deinit);
349 LOAD_DLL_FN (library, gnutls_hash_output);
350# endif
351# endif /* HAVE_GNUTLS3 */
258 352
259 max_log_level = global_gnutls_log_level; 353 max_log_level = global_gnutls_log_level;
260 354
@@ -332,8 +426,56 @@ init_gnutls_functions (void)
332# define gnutls_x509_crt_get_version fn_gnutls_x509_crt_get_version 426# define gnutls_x509_crt_get_version fn_gnutls_x509_crt_get_version
333# define gnutls_x509_crt_import fn_gnutls_x509_crt_import 427# define gnutls_x509_crt_import fn_gnutls_x509_crt_import
334# define gnutls_x509_crt_init fn_gnutls_x509_crt_init 428# define gnutls_x509_crt_init fn_gnutls_x509_crt_init
429# ifdef HAVE_GNUTLS3
430# define gnutls_rnd fn_gnutls_rnd
431# define gnutls_mac_list fn_gnutls_mac_list
432# define gnutls_mac_get_nonce_size fn_gnutls_mac_get_nonce_size
433# define gnutls_mac_get_key_size fn_gnutls_mac_get_key_size
434# define gnutls_digest_list fn_gnutls_digest_list
435# define gnutls_digest_get_name fn_gnutls_digest_get_name
436# ifdef HAVE_GNUTLS3_CIPHER
437# define gnutls_cipher_list fn_gnutls_cipher_list
438# define gnutls_cipher_get_iv_size fn_gnutls_cipher_get_iv_size
439# define gnutls_cipher_get_key_size fn_gnutls_cipher_get_key_size
440# define gnutls_cipher_get_block_size fn_gnutls_cipher_get_block_size
441# define gnutls_cipher_get_tag_size fn_gnutls_cipher_get_tag_size
442# define gnutls_cipher_init fn_gnutls_cipher_init
443# define gnutls_cipher_set_iv fn_gnutls_cipher_set_iv
444# define gnutls_cipher_encrypt2 fn_gnutls_cipher_encrypt2
445# define gnutls_cipher_decrypt2 fn_gnutls_cipher_decrypt2
446# define gnutls_cipher_deinit fn_gnutls_cipher_deinit
447# ifdef HAVE_GNUTLS3_AEAD
448# define gnutls_aead_cipher_encrypt fn_gnutls_aead_cipher_encrypt
449# define gnutls_aead_cipher_decrypt fn_gnutls_aead_cipher_decrypt
450# define gnutls_aead_cipher_init fn_gnutls_aead_cipher_init
451# define gnutls_aead_cipher_deinit fn_gnutls_aead_cipher_deinit
452# endif /* HAVE_GNUTLS3_AEAD */
453# ifdef HAVE_GNUTLS3_HMAC
454# define gnutls_hmac_init fn_gnutls_hmac_init
455# define gnutls_hmac_get_len fn_gnutls_hmac_get_len
456# define gnutls_hmac fn_gnutls_hmac
457# define gnutls_hmac_deinit fn_gnutls_hmac_deinit
458# define gnutls_hmac_output fn_gnutls_hmac_output
459# endif /* HAVE_GNUTLS3_HMAC */
460# endif /* HAVE_GNUTLS3_CIPHER */
461# ifdef HAVE_GNUTLS3_DIGEST
462# define gnutls_hash_init fn_gnutls_hash_init
463# define gnutls_hash_get_len fn_gnutls_hash_get_len
464# define gnutls_hash fn_gnutls_hash
465# define gnutls_hash_deinit fn_gnutls_hash_deinit
466# define gnutls_hash_output fn_gnutls_hash_output
467# endif
468# endif /* HAVE_GNUTLS3 */
469
470/* This wrapper is called from fns.c, which doesn't know about the
471 LOAD_DLL_FN stuff above. */
472int
473w32_gnutls_rnd (gnutls_rnd_level_t level, void *data, size_t len)
474{
475 return gnutls_rnd (level, data, len);
476}
335 477
336#endif 478#endif /* WINDOWSNT */
337 479
338 480
339/* Report memory exhaustion if ERR is an out-of-memory indication. */ 481/* Report memory exhaustion if ERR is an out-of-memory indication. */
@@ -433,7 +575,7 @@ emacs_gnutls_nonblock_errno (gnutls_transport_ptr_t ptr)
433 return err; 575 return err;
434 } 576 }
435} 577}
436#endif 578#endif /* !WINDOWSNT */
437 579
438static int 580static int
439emacs_gnutls_handshake (struct Lisp_Process *proc) 581emacs_gnutls_handshake (struct Lisp_Process *proc)
@@ -556,6 +698,13 @@ emacs_gnutls_read (struct Lisp_Process *proc, char *buf, ptrdiff_t nbyte)
556 } 698 }
557} 699}
558 700
701static char const *
702emacs_gnutls_strerror (int err)
703{
704 char const *str = gnutls_strerror (err);
705 return str ? str : "unknown";
706}
707
559/* Report a GnuTLS error to the user. 708/* Report a GnuTLS error to the user.
560 Return true if the error code was successfully handled. */ 709 Return true if the error code was successfully handled. */
561static bool 710static bool
@@ -564,7 +713,6 @@ emacs_gnutls_handle_error (gnutls_session_t session, int err)
564 int max_log_level = 0; 713 int max_log_level = 0;
565 714
566 bool ret; 715 bool ret;
567 const char *str;
568 716
569 /* TODO: use a Lisp_Object generated by gnutls_make_error? */ 717 /* TODO: use a Lisp_Object generated by gnutls_make_error? */
570 if (err >= 0) 718 if (err >= 0)
@@ -576,9 +724,7 @@ emacs_gnutls_handle_error (gnutls_session_t session, int err)
576 724
577 /* TODO: use gnutls-error-fatalp and gnutls-error-string. */ 725 /* TODO: use gnutls-error-fatalp and gnutls-error-string. */
578 726
579 str = gnutls_strerror (err); 727 char const *str = emacs_gnutls_strerror (err);
580 if (!str)
581 str = "unknown";
582 728
583 if (gnutls_error_is_fatal (err)) 729 if (gnutls_error_is_fatal (err))
584 { 730 {
@@ -592,11 +738,11 @@ emacs_gnutls_handle_error (gnutls_session_t session, int err)
592#endif 738#endif
593 739
594 GNUTLS_LOG2 (level, max_log_level, "fatal error:", str); 740 GNUTLS_LOG2 (level, max_log_level, "fatal error:", str);
595 ret = 0; 741 ret = false;
596 } 742 }
597 else 743 else
598 { 744 {
599 ret = 1; 745 ret = true;
600 746
601 switch (err) 747 switch (err)
602 { 748 {
@@ -784,7 +930,7 @@ usage: (gnutls-error-string ERROR) */)
784 if (! TYPE_RANGED_INTEGERP (int, err)) 930 if (! TYPE_RANGED_INTEGERP (int, err))
785 return build_string ("Not an error symbol or code"); 931 return build_string ("Not an error symbol or code");
786 932
787 return build_string (gnutls_strerror (XINT (err))); 933 return build_string (emacs_gnutls_strerror (XINT (err)));
788} 934}
789 935
790DEFUN ("gnutls-deinit", Fgnutls_deinit, Sgnutls_deinit, 1, 1, 0, 936DEFUN ("gnutls-deinit", Fgnutls_deinit, Sgnutls_deinit, 1, 1, 0,
@@ -1476,9 +1622,9 @@ one trustfile (usually a CA bundle). */)
1476 XPROCESS (proc)->gnutls_x509_cred = x509_cred; 1622 XPROCESS (proc)->gnutls_x509_cred = x509_cred;
1477 1623
1478 verify_flags = Fplist_get (proplist, QCverify_flags); 1624 verify_flags = Fplist_get (proplist, QCverify_flags);
1479 if (NUMBERP (verify_flags)) 1625 if (TYPE_RANGED_INTEGERP (unsigned int, verify_flags))
1480 { 1626 {
1481 gnutls_verify_flags = XINT (verify_flags); 1627 gnutls_verify_flags = XFASTINT (verify_flags);
1482 GNUTLS_LOG (2, max_log_level, "setting verification flags"); 1628 GNUTLS_LOG (2, max_log_level, "setting verification flags");
1483 } 1629 }
1484 else if (NILP (verify_flags)) 1630 else if (NILP (verify_flags))
@@ -1697,28 +1843,624 @@ This function may also return `gnutls-e-again', or
1697 1843
1698#endif /* HAVE_GNUTLS */ 1844#endif /* HAVE_GNUTLS */
1699 1845
1846#ifdef HAVE_GNUTLS3
1847
1848DEFUN ("gnutls-ciphers", Fgnutls_ciphers, Sgnutls_ciphers, 0, 0, 0,
1849 doc: /* Return alist of GnuTLS symmetric cipher descriptions as plists.
1850The alist key is the cipher name. */)
1851 (void)
1852{
1853 Lisp_Object ciphers = Qnil;
1854
1855#ifdef HAVE_GNUTLS3_CIPHER
1856 const gnutls_cipher_algorithm_t *gciphers = gnutls_cipher_list ();
1857 for (ptrdiff_t pos = 0; gciphers[pos] != 0; pos++)
1858 {
1859 gnutls_cipher_algorithm_t gca = gciphers[pos];
1860 if (gca == GNUTLS_CIPHER_NULL)
1861 continue;
1862 char const *cipher_name = gnutls_cipher_get_name (gca);
1863 if (!cipher_name)
1864 continue;
1865
1866 /* A symbol representing the GnuTLS cipher. */
1867 Lisp_Object cipher_symbol = intern (cipher_name);
1868
1869 ptrdiff_t cipher_tag_size = gnutls_cipher_get_tag_size (gca);
1870
1871 Lisp_Object cp
1872 = listn (CONSTYPE_HEAP, 15, cipher_symbol,
1873 QCcipher_id, make_number (gca),
1874 QCtype, Qgnutls_type_cipher,
1875 QCcipher_aead_capable, cipher_tag_size == 0 ? Qnil : Qt,
1876 QCcipher_tagsize, make_number (cipher_tag_size),
1877
1878 QCcipher_blocksize,
1879 make_number (gnutls_cipher_get_block_size (gca)),
1880
1881 QCcipher_keysize,
1882 make_number (gnutls_cipher_get_key_size (gca)),
1883
1884 QCcipher_ivsize,
1885 make_number (gnutls_cipher_get_iv_size (gca)));
1886
1887 ciphers = Fcons (cp, ciphers);
1888 }
1889#endif
1890
1891 return ciphers;
1892}
1893
1894static Lisp_Object
1895gnutls_symmetric_aead (bool encrypting, gnutls_cipher_algorithm_t gca,
1896 Lisp_Object cipher,
1897 const char *kdata, ptrdiff_t ksize,
1898 const char *vdata, ptrdiff_t vsize,
1899 const char *idata, ptrdiff_t isize,
1900 Lisp_Object aead_auth)
1901{
1902#ifdef HAVE_GNUTLS3_AEAD
1903
1904 const char *desc = encrypting ? "encrypt" : "decrypt";
1905 Lisp_Object actual_iv = make_unibyte_string (vdata, vsize);
1906
1907 gnutls_aead_cipher_hd_t acipher;
1908 gnutls_datum_t key_datum = { (unsigned char *) kdata, ksize };
1909 int ret = gnutls_aead_cipher_init (&acipher, gca, &key_datum);
1910
1911 if (ret < GNUTLS_E_SUCCESS)
1912 error ("GnuTLS AEAD cipher %s/%s initialization failed: %s",
1913 gnutls_cipher_get_name (gca), desc, emacs_gnutls_strerror (ret));
1914
1915 ptrdiff_t cipher_tag_size = gnutls_cipher_get_tag_size (gca);
1916 ptrdiff_t tagged_size;
1917 if (INT_ADD_WRAPV (isize, cipher_tag_size, &tagged_size)
1918 || SIZE_MAX < tagged_size)
1919 memory_full (SIZE_MAX);
1920 size_t storage_length = tagged_size;
1921 USE_SAFE_ALLOCA;
1922 char *storage = SAFE_ALLOCA (storage_length);
1923
1924 const char *aead_auth_data = NULL;
1925 ptrdiff_t aead_auth_size = 0;
1926
1927 if (!NILP (aead_auth))
1928 {
1929 if (BUFFERP (aead_auth) || STRINGP (aead_auth))
1930 aead_auth = list1 (aead_auth);
1931
1932 CHECK_CONS (aead_auth);
1933
1934 ptrdiff_t astart_byte, aend_byte;
1935 const char *adata
1936 = extract_data_from_object (aead_auth, &astart_byte, &aend_byte);
1937 if (adata == NULL)
1938 error ("GnuTLS AEAD cipher auth extraction failed");
1939
1940 aead_auth_data = adata;
1941 aead_auth_size = aend_byte - astart_byte;
1942 }
1943
1944 ptrdiff_t expected_remainder = encrypting ? 0 : cipher_tag_size;
1945 ptrdiff_t cipher_block_size = gnutls_cipher_get_block_size (gca);
1946
1947 if (isize < expected_remainder
1948 || (isize - expected_remainder) % cipher_block_size != 0)
1949 error (("GnuTLS AEAD cipher %s/%s input block length %"pD"d "
1950 "is not %"pD"d greater than a multiple of the required %"pD"d"),
1951 gnutls_cipher_get_name (gca), desc,
1952 isize, expected_remainder, cipher_block_size);
1953
1954 ret = ((encrypting ? gnutls_aead_cipher_encrypt : gnutls_aead_cipher_decrypt)
1955 (acipher, vdata, vsize, aead_auth_data, aead_auth_size,
1956 cipher_tag_size, idata, isize, storage, &storage_length));
1957
1958 Lisp_Object output;
1959 if (GNUTLS_E_SUCCESS <= ret)
1960 output = make_unibyte_string (storage, storage_length);
1961 explicit_bzero (storage, storage_length);
1962 gnutls_aead_cipher_deinit (acipher);
1963
1964 if (ret < GNUTLS_E_SUCCESS)
1965 error ((encrypting
1966 ? "GnuTLS AEAD cipher %s encryption failed: %s"
1967 : "GnuTLS AEAD cipher %s decryption failed: %s"),
1968 gnutls_cipher_get_name (gca), emacs_gnutls_strerror (ret));
1969
1970 SAFE_FREE ();
1971 return list2 (output, actual_iv);
1972#else
1973 printmax_t print_gca = gca;
1974 error ("GnuTLS AEAD cipher %"pMd" is invalid or not found", print_gca);
1975#endif
1976}
1977
1978static Lisp_Object
1979gnutls_symmetric (bool encrypting, Lisp_Object cipher,
1980 Lisp_Object key, Lisp_Object iv,
1981 Lisp_Object input, Lisp_Object aead_auth)
1982{
1983 if (BUFFERP (key) || STRINGP (key))
1984 key = list1 (key);
1985
1986 CHECK_CONS (key);
1987
1988 if (BUFFERP (input) || STRINGP (input))
1989 input = list1 (input);
1990
1991 CHECK_CONS (input);
1992
1993 if (BUFFERP (iv) || STRINGP (iv))
1994 iv = list1 (iv);
1995
1996 CHECK_CONS (iv);
1997
1998
1999 const char *desc = encrypting ? "encrypt" : "decrypt";
2000
2001 gnutls_cipher_algorithm_t gca = GNUTLS_CIPHER_UNKNOWN;
2002
2003 Lisp_Object info = Qnil;
2004 if (STRINGP (cipher))
2005 cipher = intern (SSDATA (cipher));
2006
2007 if (SYMBOLP (cipher))
2008 info = XCDR (Fassq (cipher, Fgnutls_ciphers ()));
2009 else if (TYPE_RANGED_INTEGERP (gnutls_cipher_algorithm_t, cipher))
2010 gca = XINT (cipher);
2011 else
2012 info = cipher;
2013
2014 if (!NILP (info) && CONSP (info))
2015 {
2016 Lisp_Object v = Fplist_get (info, QCcipher_id);
2017 if (TYPE_RANGED_INTEGERP (gnutls_cipher_algorithm_t, v))
2018 gca = XINT (v);
2019 }
2020
2021 ptrdiff_t key_size = gnutls_cipher_get_key_size (gca);
2022 if (key_size == 0)
2023 error ("GnuTLS cipher is invalid or not found");
2024
2025 ptrdiff_t kstart_byte, kend_byte;
2026 const char *kdata = extract_data_from_object (key, &kstart_byte, &kend_byte);
2027
2028 if (kdata == NULL)
2029 error ("GnuTLS cipher key extraction failed");
2030
2031 if (kend_byte - kstart_byte != key_size)
2032 error (("GnuTLS cipher %s/%s key length %"pD"d is not equal to "
2033 "the required %"pD"d"),
2034 gnutls_cipher_get_name (gca), desc,
2035 kend_byte - kstart_byte, key_size);
2036
2037 ptrdiff_t vstart_byte, vend_byte;
2038 char *vdata = extract_data_from_object (iv, &vstart_byte, &vend_byte);
2039
2040 if (vdata == NULL)
2041 error ("GnuTLS cipher IV extraction failed");
2042
2043 ptrdiff_t iv_size = gnutls_cipher_get_iv_size (gca);
2044 if (vend_byte - vstart_byte != iv_size)
2045 error (("GnuTLS cipher %s/%s IV length %"pD"d is not equal to "
2046 "the required %"pD"d"),
2047 gnutls_cipher_get_name (gca), desc,
2048 vend_byte - vstart_byte, iv_size);
2049
2050 Lisp_Object actual_iv = make_unibyte_string (vdata, vend_byte - vstart_byte);
2051
2052 ptrdiff_t istart_byte, iend_byte;
2053 const char *idata
2054 = extract_data_from_object (input, &istart_byte, &iend_byte);
2055
2056 if (idata == NULL)
2057 error ("GnuTLS cipher input extraction failed");
2058
2059 /* Is this an AEAD cipher? */
2060 if (gnutls_cipher_get_tag_size (gca) > 0)
2061 {
2062 Lisp_Object aead_output =
2063 gnutls_symmetric_aead (encrypting, gca, cipher,
2064 kdata, kend_byte - kstart_byte,
2065 vdata, vend_byte - vstart_byte,
2066 idata, iend_byte - istart_byte,
2067 aead_auth);
2068 if (STRINGP (XCAR (key)))
2069 Fclear_string (XCAR (key));
2070 return aead_output;
2071 }
2072
2073 ptrdiff_t cipher_block_size = gnutls_cipher_get_block_size (gca);
2074 if ((iend_byte - istart_byte) % cipher_block_size != 0)
2075 error (("GnuTLS cipher %s/%s input block length %"pD"d is not a multiple "
2076 "of the required %"pD"d"),
2077 gnutls_cipher_get_name (gca), desc,
2078 iend_byte - istart_byte, cipher_block_size);
2079
2080 gnutls_cipher_hd_t hcipher;
2081 gnutls_datum_t key_datum
2082 = { (unsigned char *) kdata, kend_byte - kstart_byte };
2083
2084 int ret = gnutls_cipher_init (&hcipher, gca, &key_datum, NULL);
2085
2086 if (ret < GNUTLS_E_SUCCESS)
2087 error ("GnuTLS cipher %s/%s initialization failed: %s",
2088 gnutls_cipher_get_name (gca), desc, emacs_gnutls_strerror (ret));
2089
2090 /* Note that this will not support streaming block mode. */
2091 gnutls_cipher_set_iv (hcipher, vdata, vend_byte - vstart_byte);
2092
2093 /* GnuTLS docs: "For the supported ciphers the encrypted data length
2094 will equal the plaintext size." */
2095 ptrdiff_t storage_length = iend_byte - istart_byte;
2096 Lisp_Object storage = make_uninit_string (storage_length);
2097
2098 ret = ((encrypting ? gnutls_cipher_encrypt2 : gnutls_cipher_decrypt2)
2099 (hcipher, idata, iend_byte - istart_byte,
2100 SSDATA (storage), storage_length));
2101
2102 if (STRINGP (XCAR (key)))
2103 Fclear_string (XCAR (key));
2104
2105 if (ret < GNUTLS_E_SUCCESS)
2106 {
2107 gnutls_cipher_deinit (hcipher);
2108 if (encrypting)
2109 error ("GnuTLS cipher %s encryption failed: %s",
2110 gnutls_cipher_get_name (gca), emacs_gnutls_strerror (ret));
2111 else
2112 error ("GnuTLS cipher %s decryption failed: %s",
2113 gnutls_cipher_get_name (gca), emacs_gnutls_strerror (ret));
2114 }
2115
2116 gnutls_cipher_deinit (hcipher);
2117
2118 return list2 (storage, actual_iv);
2119}
2120
2121DEFUN ("gnutls-symmetric-encrypt", Fgnutls_symmetric_encrypt,
2122 Sgnutls_symmetric_encrypt, 4, 5, 0,
2123 doc: /* Encrypt INPUT with symmetric CIPHER, KEY+AEAD_AUTH, and IV to a unibyte string.
2124
2125Return nil on error.
2126
2127The KEY can be specified as a buffer or string or in other ways (see
2128Info node `(elisp)Format of GnuTLS Cryptography Inputs'). The KEY
2129will be wiped after use if it's a string.
2130
2131The IV and INPUT and the optional AEAD_AUTH can be specified as a
2132buffer or string or in other ways (see Info node `(elisp)Format of
2133GnuTLS Cryptography Inputs').
2134
2135The alist of symmetric ciphers can be obtained with `gnutls-ciphers`.
2136The CIPHER may be a string or symbol matching a key in that alist, or
2137a plist with the :cipher-id numeric property, or the number itself.
2138
2139AEAD ciphers: these ciphers will have a `gnutls-ciphers' entry with
2140:cipher-aead-capable set to t. AEAD_AUTH can be supplied for
2141these AEAD ciphers, but it may still be omitted (nil) as well. */)
2142 (Lisp_Object cipher, Lisp_Object key, Lisp_Object iv,
2143 Lisp_Object input, Lisp_Object aead_auth)
2144{
2145 return gnutls_symmetric (true, cipher, key, iv, input, aead_auth);
2146}
2147
2148DEFUN ("gnutls-symmetric-decrypt", Fgnutls_symmetric_decrypt,
2149 Sgnutls_symmetric_decrypt, 4, 5, 0,
2150 doc: /* Decrypt INPUT with symmetric CIPHER, KEY+AEAD_AUTH, and IV to a unibyte string.
2151
2152Return nil on error.
2153
2154The KEY can be specified as a buffer or string or in other ways (see
2155Info node `(elisp)Format of GnuTLS Cryptography Inputs'). The KEY
2156will be wiped after use if it's a string.
2157
2158The IV and INPUT and the optional AEAD_AUTH can be specified as a
2159buffer or string or in other ways (see Info node `(elisp)Format of
2160GnuTLS Cryptography Inputs').
2161
2162The alist of symmetric ciphers can be obtained with `gnutls-ciphers`.
2163The CIPHER may be a string or symbol matching a key in that alist, or
2164a plist with the `:cipher-id' numeric property, or the number itself.
2165
2166AEAD ciphers: these ciphers will have a `gnutls-ciphers' entry with
2167:cipher-aead-capable set to t. AEAD_AUTH can be supplied for
2168these AEAD ciphers, but it may still be omitted (nil) as well. */)
2169 (Lisp_Object cipher, Lisp_Object key, Lisp_Object iv,
2170 Lisp_Object input, Lisp_Object aead_auth)
2171{
2172 return gnutls_symmetric (false, cipher, key, iv, input, aead_auth);
2173}
2174
2175DEFUN ("gnutls-macs", Fgnutls_macs, Sgnutls_macs, 0, 0, 0,
2176 doc: /* Return alist of GnuTLS mac-algorithm method descriptions as plists.
2177
2178Use the value of the alist (extract it with `alist-get' for instance)
2179with `gnutls-hash-mac'. The alist key is the mac-algorithm method
2180name. */)
2181 (void)
2182{
2183 Lisp_Object mac_algorithms = Qnil;
2184#ifdef HAVE_GNUTLS3_HMAC
2185 const gnutls_mac_algorithm_t *macs = gnutls_mac_list ();
2186 for (ptrdiff_t pos = 0; macs[pos] != 0; pos++)
2187 {
2188 const gnutls_mac_algorithm_t gma = macs[pos];
2189
2190 /* A symbol representing the GnuTLS MAC algorithm. */
2191 Lisp_Object gma_symbol = intern (gnutls_mac_get_name (gma));
2192
2193 Lisp_Object mp = listn (CONSTYPE_HEAP, 11, gma_symbol,
2194 QCmac_algorithm_id, make_number (gma),
2195 QCtype, Qgnutls_type_mac_algorithm,
2196
2197 QCmac_algorithm_length,
2198 make_number (gnutls_hmac_get_len (gma)),
2199
2200 QCmac_algorithm_keysize,
2201 make_number (gnutls_mac_get_key_size (gma)),
2202
2203 QCmac_algorithm_noncesize,
2204 make_number (gnutls_mac_get_nonce_size (gma)));
2205 mac_algorithms = Fcons (mp, mac_algorithms);
2206 }
2207#endif
2208
2209 return mac_algorithms;
2210}
2211
2212DEFUN ("gnutls-digests", Fgnutls_digests, Sgnutls_digests, 0, 0, 0,
2213 doc: /* Return alist of GnuTLS digest-algorithm method descriptions as plists.
2214
2215Use the value of the alist (extract it with `alist-get' for instance)
2216with `gnutls-hash-digest'. The alist key is the digest-algorithm
2217method name. */)
2218 (void)
2219{
2220 Lisp_Object digest_algorithms = Qnil;
2221#ifdef HAVE_GNUTLS3_DIGEST
2222 const gnutls_digest_algorithm_t *digests = gnutls_digest_list ();
2223 for (ptrdiff_t pos = 0; digests[pos] != 0; pos++)
2224 {
2225 const gnutls_digest_algorithm_t gda = digests[pos];
2226
2227 /* A symbol representing the GnuTLS digest algorithm. */
2228 Lisp_Object gda_symbol = intern (gnutls_digest_get_name (gda));
2229
2230 Lisp_Object mp = listn (CONSTYPE_HEAP, 7, gda_symbol,
2231 QCdigest_algorithm_id, make_number (gda),
2232 QCtype, Qgnutls_type_digest_algorithm,
2233
2234 QCdigest_algorithm_length,
2235 make_number (gnutls_hash_get_len (gda)));
2236
2237 digest_algorithms = Fcons (mp, digest_algorithms);
2238 }
2239#endif
2240
2241 return digest_algorithms;
2242}
2243
2244DEFUN ("gnutls-hash-mac", Fgnutls_hash_mac, Sgnutls_hash_mac, 3, 3, 0,
2245 doc: /* Hash INPUT with HASH-METHOD and KEY into a unibyte string.
2246
2247Return nil on error.
2248
2249The KEY can be specified as a buffer or string or in other ways (see
2250Info node `(elisp)Format of GnuTLS Cryptography Inputs'). The KEY
2251will be wiped after use if it's a string.
2252
2253The INPUT can be specified as a buffer or string or in other
2254ways (see Info node `(elisp)Format of GnuTLS Cryptography Inputs').
2255
2256The alist of MAC algorithms can be obtained with `gnutls-macs`. The
2257HASH-METHOD may be a string or symbol matching a key in that alist, or
2258a plist with the `:mac-algorithm-id' numeric property, or the number
2259itself. */)
2260 (Lisp_Object hash_method, Lisp_Object key, Lisp_Object input)
2261{
2262 if (BUFFERP (input) || STRINGP (input))
2263 input = list1 (input);
2264
2265 CHECK_CONS (input);
2266
2267 if (BUFFERP (key) || STRINGP (key))
2268 key = list1 (key);
2269
2270 CHECK_CONS (key);
2271
2272 gnutls_mac_algorithm_t gma = GNUTLS_MAC_UNKNOWN;
2273
2274 Lisp_Object info = Qnil;
2275 if (STRINGP (hash_method))
2276 hash_method = intern (SSDATA (hash_method));
2277
2278 if (SYMBOLP (hash_method))
2279 info = XCDR (Fassq (hash_method, Fgnutls_macs ()));
2280 else if (TYPE_RANGED_INTEGERP (gnutls_mac_algorithm_t, hash_method))
2281 gma = XINT (hash_method);
2282 else
2283 info = hash_method;
2284
2285 if (!NILP (info) && CONSP (info))
2286 {
2287 Lisp_Object v = Fplist_get (info, QCmac_algorithm_id);
2288 if (TYPE_RANGED_INTEGERP (gnutls_mac_algorithm_t, v))
2289 gma = XINT (v);
2290 }
2291
2292 ptrdiff_t digest_length = gnutls_hmac_get_len (gma);
2293 if (digest_length == 0)
2294 error ("GnuTLS MAC-method is invalid or not found");
2295
2296 ptrdiff_t kstart_byte, kend_byte;
2297 const char *kdata = extract_data_from_object (key, &kstart_byte, &kend_byte);
2298 if (kdata == NULL)
2299 error ("GnuTLS MAC key extraction failed");
2300
2301 gnutls_hmac_hd_t hmac;
2302 int ret = gnutls_hmac_init (&hmac, gma,
2303 kdata + kstart_byte, kend_byte - kstart_byte);
2304 if (ret < GNUTLS_E_SUCCESS)
2305 error ("GnuTLS MAC %s initialization failed: %s",
2306 gnutls_mac_get_name (gma), emacs_gnutls_strerror (ret));
2307
2308 ptrdiff_t istart_byte, iend_byte;
2309 const char *idata
2310 = extract_data_from_object (input, &istart_byte, &iend_byte);
2311 if (idata == NULL)
2312 error ("GnuTLS MAC input extraction failed");
2313
2314 Lisp_Object digest = make_uninit_string (digest_length);
2315
2316 ret = gnutls_hmac (hmac, idata + istart_byte, iend_byte - istart_byte);
2317
2318 if (STRINGP (XCAR (key)))
2319 Fclear_string (XCAR (key));
2320
2321 if (ret < GNUTLS_E_SUCCESS)
2322 {
2323 gnutls_hmac_deinit (hmac, NULL);
2324 error ("GnuTLS MAC %s application failed: %s",
2325 gnutls_mac_get_name (gma), emacs_gnutls_strerror (ret));
2326 }
2327
2328 gnutls_hmac_output (hmac, SSDATA (digest));
2329 gnutls_hmac_deinit (hmac, NULL);
2330
2331 return digest;
2332}
2333
2334DEFUN ("gnutls-hash-digest", Fgnutls_hash_digest, Sgnutls_hash_digest, 2, 2, 0,
2335 doc: /* Digest INPUT with DIGEST-METHOD into a unibyte string.
2336
2337Return nil on error.
2338
2339The INPUT can be specified as a buffer or string or in other
2340ways (see Info node `(elisp)Format of GnuTLS Cryptography Inputs').
2341
2342The alist of digest algorithms can be obtained with `gnutls-digests`.
2343The DIGEST-METHOD may be a string or symbol matching a key in that
2344alist, or a plist with the `:digest-algorithm-id' numeric property, or
2345the number itself. */)
2346 (Lisp_Object digest_method, Lisp_Object input)
2347{
2348 if (BUFFERP (input) || STRINGP (input))
2349 input = list1 (input);
2350
2351 CHECK_CONS (input);
2352
2353 gnutls_digest_algorithm_t gda = GNUTLS_DIG_UNKNOWN;
2354
2355 Lisp_Object info = Qnil;
2356 if (STRINGP (digest_method))
2357 digest_method = intern (SSDATA (digest_method));
2358
2359 if (SYMBOLP (digest_method))
2360 info = XCDR (Fassq (digest_method, Fgnutls_digests ()));
2361 else if (TYPE_RANGED_INTEGERP (gnutls_digest_algorithm_t, digest_method))
2362 gda = XINT (digest_method);
2363 else
2364 info = digest_method;
2365
2366 if (!NILP (info) && CONSP (info))
2367 {
2368 Lisp_Object v = Fplist_get (info, QCdigest_algorithm_id);
2369 if (TYPE_RANGED_INTEGERP (gnutls_digest_algorithm_t, v))
2370 gda = XINT (v);
2371 }
2372
2373 ptrdiff_t digest_length = gnutls_hash_get_len (gda);
2374 if (digest_length == 0)
2375 error ("GnuTLS digest-method is invalid or not found");
2376
2377 gnutls_hash_hd_t hash;
2378 int ret = gnutls_hash_init (&hash, gda);
2379
2380 if (ret < GNUTLS_E_SUCCESS)
2381 error ("GnuTLS digest initialization failed: %s",
2382 emacs_gnutls_strerror (ret));
2383
2384 Lisp_Object digest = make_uninit_string (digest_length);
2385
2386 ptrdiff_t istart_byte, iend_byte;
2387 const char *idata
2388 = extract_data_from_object (input, &istart_byte, &iend_byte);
2389 if (idata == NULL)
2390 error ("GnuTLS digest input extraction failed");
2391
2392 ret = gnutls_hash (hash, idata + istart_byte, iend_byte - istart_byte);
2393
2394 if (ret < GNUTLS_E_SUCCESS)
2395 {
2396 gnutls_hash_deinit (hash, NULL);
2397 error ("GnuTLS digest application failed: %s",
2398 emacs_gnutls_strerror (ret));
2399 }
2400
2401 gnutls_hash_output (hash, SSDATA (digest));
2402 gnutls_hash_deinit (hash, NULL);
2403
2404 return digest;
2405}
2406
2407#endif /* HAVE_GNUTLS3 */
2408
1700DEFUN ("gnutls-available-p", Fgnutls_available_p, Sgnutls_available_p, 0, 0, 0, 2409DEFUN ("gnutls-available-p", Fgnutls_available_p, Sgnutls_available_p, 0, 0, 0,
1701 doc: /* Return t if GnuTLS is available in this instance of Emacs. */) 2410 doc: /* Return list of capabilities if GnuTLS is available in this instance of Emacs.
1702 (void) 2411
2412...if supported : then...
2413GnuTLS 3 or higher : the list will contain `gnutls3'.
2414GnuTLS MACs : the list will contain `macs'.
2415GnuTLS digests : the list will contain `digests'.
2416GnuTLS symmetric ciphers: the list will contain `ciphers'.
2417GnuTLS AEAD ciphers : the list will contain `AEAD-ciphers'. */)
2418 (void)
1703{ 2419{
2420 Lisp_Object capabilities = Qnil;
2421
1704#ifdef HAVE_GNUTLS 2422#ifdef HAVE_GNUTLS
1705# ifdef WINDOWSNT 2423
2424# ifdef HAVE_GNUTLS3
2425 capabilities = Fcons (intern("gnutls3"), capabilities);
2426
2427# ifdef HAVE_GNUTLS3_DIGEST
2428 capabilities = Fcons (intern("digests"), capabilities);
2429# endif
2430
2431# ifdef HAVE_GNUTLS3_CIPHER
2432 capabilities = Fcons (intern("ciphers"), capabilities);
2433
2434# ifdef HAVE_GNUTLS3_AEAD
2435 capabilities = Fcons (intern("AEAD-ciphers"), capabilities);
2436# endif
2437
2438# ifdef HAVE_GNUTLS3_HMAC
2439 capabilities = Fcons (intern("macs"), capabilities);
2440# endif
2441# endif /* HAVE_GNUTLS3_CIPHER */
2442# endif /* HAVE_GNUTLS3 */
2443
2444#ifdef WINDOWSNT
1706 Lisp_Object found = Fassq (Qgnutls, Vlibrary_cache); 2445 Lisp_Object found = Fassq (Qgnutls, Vlibrary_cache);
1707 if (CONSP (found)) 2446 if (CONSP (found))
1708 return XCDR (found); 2447 return XCDR (found);
1709 else 2448 else
1710 { 2449 {
1711 Lisp_Object status; 2450 Lisp_Object status;
1712 status = init_gnutls_functions () ? Qt : Qnil; 2451 status = init_gnutls_functions () ? capabilities : Qnil;
1713 Vlibrary_cache = Fcons (Fcons (Qgnutls, status), Vlibrary_cache); 2452 Vlibrary_cache = Fcons (Fcons (Qgnutls, status), Vlibrary_cache);
1714 return status; 2453 return status;
1715 } 2454 }
1716# else /* !WINDOWSNT */ 2455#else /* !WINDOWSNT */
1717 return Qt; 2456
1718# endif /* !WINDOWSNT */ 2457 return capabilities;
2458
2459#endif /* WINDOWSNT */
2460
1719#else /* !HAVE_GNUTLS */ 2461#else /* !HAVE_GNUTLS */
1720 return Qnil; 2462 return Qnil;
1721#endif /* !HAVE_GNUTLS */ 2463#endif /* HAVE_GNUTLS */
1722} 2464}
1723 2465
1724void 2466void
@@ -1753,6 +2495,27 @@ syms_of_gnutls (void)
1753 DEFSYM (QCverify_flags, ":verify-flags"); 2495 DEFSYM (QCverify_flags, ":verify-flags");
1754 DEFSYM (QCverify_error, ":verify-error"); 2496 DEFSYM (QCverify_error, ":verify-error");
1755 2497
2498 DEFSYM (QCcipher_id, ":cipher-id");
2499 DEFSYM (QCcipher_aead_capable, ":cipher-aead-capable");
2500 DEFSYM (QCcipher_blocksize, ":cipher-blocksize");
2501 DEFSYM (QCcipher_keysize, ":cipher-keysize");
2502 DEFSYM (QCcipher_tagsize, ":cipher-tagsize");
2503 DEFSYM (QCcipher_keysize, ":cipher-keysize");
2504 DEFSYM (QCcipher_ivsize, ":cipher-ivsize");
2505
2506 DEFSYM (QCmac_algorithm_id, ":mac-algorithm-id");
2507 DEFSYM (QCmac_algorithm_noncesize, ":mac-algorithm-noncesize");
2508 DEFSYM (QCmac_algorithm_keysize, ":mac-algorithm-keysize");
2509 DEFSYM (QCmac_algorithm_length, ":mac-algorithm-length");
2510
2511 DEFSYM (QCdigest_algorithm_id, ":digest-algorithm-id");
2512 DEFSYM (QCdigest_algorithm_length, ":digest-algorithm-length");
2513
2514 DEFSYM (QCtype, ":type");
2515 DEFSYM (Qgnutls_type_cipher, "gnutls-symmetric-cipher");
2516 DEFSYM (Qgnutls_type_mac_algorithm, "gnutls-mac-algorithm");
2517 DEFSYM (Qgnutls_type_digest_algorithm, "gnutls-digest-algorithm");
2518
1756 DEFSYM (Qgnutls_e_interrupted, "gnutls-e-interrupted"); 2519 DEFSYM (Qgnutls_e_interrupted, "gnutls-e-interrupted");
1757 Fput (Qgnutls_e_interrupted, Qgnutls_code, 2520 Fput (Qgnutls_e_interrupted, Qgnutls_code,
1758 make_number (GNUTLS_E_INTERRUPTED)); 2521 make_number (GNUTLS_E_INTERRUPTED));
@@ -1780,6 +2543,16 @@ syms_of_gnutls (void)
1780 defsubr (&Sgnutls_peer_status); 2543 defsubr (&Sgnutls_peer_status);
1781 defsubr (&Sgnutls_peer_status_warning_describe); 2544 defsubr (&Sgnutls_peer_status_warning_describe);
1782 2545
2546#ifdef HAVE_GNUTLS3
2547 defsubr (&Sgnutls_ciphers);
2548 defsubr (&Sgnutls_macs);
2549 defsubr (&Sgnutls_digests);
2550 defsubr (&Sgnutls_hash_mac);
2551 defsubr (&Sgnutls_hash_digest);
2552 defsubr (&Sgnutls_symmetric_encrypt);
2553 defsubr (&Sgnutls_symmetric_decrypt);
2554#endif
2555
1783 DEFVAR_INT ("gnutls-log-level", global_gnutls_log_level, 2556 DEFVAR_INT ("gnutls-log-level", global_gnutls_log_level,
1784 doc: /* Logging level used by the GnuTLS functions. 2557 doc: /* Logging level used by the GnuTLS functions.
1785Set this larger than 0 to get debug output in the *Messages* buffer. 2558Set this larger than 0 to get debug output in the *Messages* buffer.
diff --git a/src/gnutls.h b/src/gnutls.h
index 3c84023cd4e..3ec86a8892d 100644
--- a/src/gnutls.h
+++ b/src/gnutls.h
@@ -23,6 +23,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
23#include <gnutls/gnutls.h> 23#include <gnutls/gnutls.h>
24#include <gnutls/x509.h> 24#include <gnutls/x509.h>
25 25
26#ifdef HAVE_GNUTLS3
27#include <gnutls/crypto.h>
28#endif
29
26#include "lisp.h" 30#include "lisp.h"
27 31
28/* This limits the attempts to handshake per process (connection). It 32/* This limits the attempts to handshake per process (connection). It
@@ -82,6 +86,7 @@ emacs_gnutls_read (struct Lisp_Process *proc, char *buf, ptrdiff_t nbyte);
82extern ptrdiff_t emacs_gnutls_record_check_pending (gnutls_session_t state); 86extern ptrdiff_t emacs_gnutls_record_check_pending (gnutls_session_t state);
83#ifdef WINDOWSNT 87#ifdef WINDOWSNT
84extern void emacs_gnutls_transport_set_errno (gnutls_session_t state, int err); 88extern void emacs_gnutls_transport_set_errno (gnutls_session_t state, int err);
89extern int w32_gnutls_rnd (gnutls_rnd_level_t, void *, size_t);
85#endif 90#endif
86extern Lisp_Object emacs_gnutls_deinit (Lisp_Object); 91extern Lisp_Object emacs_gnutls_deinit (Lisp_Object);
87extern Lisp_Object emacs_gnutls_global_init (void); 92extern Lisp_Object emacs_gnutls_global_init (void);
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 2d4abefa969..0c8395efe9b 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -204,6 +204,31 @@ xg_display_open (char *display_name, Display **dpy)
204 *dpy = gdpy ? GDK_DISPLAY_XDISPLAY (gdpy) : NULL; 204 *dpy = gdpy ? GDK_DISPLAY_XDISPLAY (gdpy) : NULL;
205} 205}
206 206
207/* Scaling/HiDPI functions. */
208static int
209xg_get_gdk_scale (void)
210{
211 const char *sscale = getenv ("GDK_SCALE");
212
213 if (sscale)
214 {
215 long scale = atol (sscale);
216 if (0 < scale)
217 return min (scale, INT_MAX);
218 }
219
220 return 1;
221}
222
223int
224xg_get_scale (struct frame *f)
225{
226#if GTK_CHECK_VERSION (3, 10, 0)
227 if (FRAME_GTK_WIDGET (f))
228 return gtk_widget_get_scale_factor (FRAME_GTK_WIDGET (f));
229#endif
230 return xg_get_gdk_scale ();
231}
207 232
208/* Close display DPY. */ 233/* Close display DPY. */
209 234
@@ -724,7 +749,8 @@ xg_show_tooltip (struct frame *f, int root_x, int root_y)
724 if (x->ttip_window) 749 if (x->ttip_window)
725 { 750 {
726 block_input (); 751 block_input ();
727 gtk_window_move (x->ttip_window, root_x, root_y); 752 gtk_window_move (x->ttip_window, root_x / xg_get_scale (f),
753 root_y / xg_get_scale (f));
728 gtk_widget_show_all (GTK_WIDGET (x->ttip_window)); 754 gtk_widget_show_all (GTK_WIDGET (x->ttip_window));
729 unblock_input (); 755 unblock_input ();
730 } 756 }
@@ -836,21 +862,6 @@ xg_set_geometry (struct frame *f)
836 } 862 }
837} 863}
838 864
839static int
840xg_get_gdk_scale (void)
841{
842 const char *sscale = getenv ("GDK_SCALE");
843
844 if (sscale)
845 {
846 long scale = atol (sscale);
847 if (0 < scale)
848 return min (scale, INT_MAX);
849 }
850
851 return 1;
852}
853
854/* Function to handle resize of our frame. As we have a Gtk+ tool bar 865/* Function to handle resize of our frame. As we have a Gtk+ tool bar
855 and a Gtk+ menu bar, we get resize events for the edit part of the 866 and a Gtk+ menu bar, we get resize events for the edit part of the
856 frame only. We let Gtk+ deal with the Gtk+ parts. 867 frame only. We let Gtk+ deal with the Gtk+ parts.
@@ -912,12 +923,8 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
912 /* Do this before resize, as we don't know yet if we will be resized. */ 923 /* Do this before resize, as we don't know yet if we will be resized. */
913 x_clear_under_internal_border (f); 924 x_clear_under_internal_border (f);
914 925
915 if (FRAME_VISIBLE_P (f)) 926 totalheight /= xg_get_scale (f);
916 { 927 totalwidth /= xg_get_scale (f);
917 int scale = xg_get_gdk_scale ();
918 totalheight /= scale;
919 totalwidth /= scale;
920 }
921 928
922 x_wm_set_size_hint (f, 0, 0); 929 x_wm_set_size_hint (f, 0, 0);
923 930
@@ -1343,7 +1350,7 @@ x_wm_set_size_hint (struct frame *f, long int flags, bool user_position)
1343 int min_rows = 0, min_cols = 0; 1350 int min_rows = 0, min_cols = 0;
1344 int win_gravity = f->win_gravity; 1351 int win_gravity = f->win_gravity;
1345 Lisp_Object fs_state, frame; 1352 Lisp_Object fs_state, frame;
1346 int scale = xg_get_gdk_scale (); 1353 int scale = xg_get_scale (f);
1347 1354
1348 /* Don't set size hints during initialization; that apparently leads 1355 /* Don't set size hints during initialization; that apparently leads
1349 to a race condition. See the thread at 1356 to a race condition. See the thread at
@@ -3659,16 +3666,16 @@ update_theme_scrollbar_height (void)
3659} 3666}
3660 3667
3661int 3668int
3662xg_get_default_scrollbar_width (void) 3669xg_get_default_scrollbar_width (struct frame *f)
3663{ 3670{
3664 return scroll_bar_width_for_theme * xg_get_gdk_scale (); 3671 return scroll_bar_width_for_theme * xg_get_scale (f);
3665} 3672}
3666 3673
3667int 3674int
3668xg_get_default_scrollbar_height (void) 3675xg_get_default_scrollbar_height (struct frame *f)
3669{ 3676{
3670 /* Apparently there's no default height for themes. */ 3677 /* Apparently there's no default height for themes. */
3671 return scroll_bar_width_for_theme * xg_get_gdk_scale (); 3678 return scroll_bar_width_for_theme * xg_get_scale (f);
3672} 3679}
3673 3680
3674/* Return the scrollbar id for X Window WID on display DPY. 3681/* Return the scrollbar id for X Window WID on display DPY.
@@ -3858,7 +3865,7 @@ xg_update_scrollbar_pos (struct frame *f,
3858 GtkWidget *wfixed = f->output_data.x->edit_widget; 3865 GtkWidget *wfixed = f->output_data.x->edit_widget;
3859 GtkWidget *wparent = gtk_widget_get_parent (wscroll); 3866 GtkWidget *wparent = gtk_widget_get_parent (wscroll);
3860 gint msl; 3867 gint msl;
3861 int scale = xg_get_gdk_scale (); 3868 int scale = xg_get_scale (f);
3862 3869
3863 top /= scale; 3870 top /= scale;
3864 left /= scale; 3871 left /= scale;
diff --git a/src/gtkutil.h b/src/gtkutil.h
index 0abcb06bc71..f0f2981418c 100644
--- a/src/gtkutil.h
+++ b/src/gtkutil.h
@@ -143,8 +143,8 @@ extern void xg_set_toolkit_horizontal_scroll_bar_thumb (struct scroll_bar *bar,
143 int position, 143 int position,
144 int whole); 144 int whole);
145extern bool xg_event_is_for_scrollbar (struct frame *, const XEvent *); 145extern bool xg_event_is_for_scrollbar (struct frame *, const XEvent *);
146extern int xg_get_default_scrollbar_width (void); 146extern int xg_get_default_scrollbar_width (struct frame *f);
147extern int xg_get_default_scrollbar_height (void); 147extern int xg_get_default_scrollbar_height (struct frame *f);
148 148
149extern void update_frame_tool_bar (struct frame *f); 149extern void update_frame_tool_bar (struct frame *f);
150extern void free_frame_tool_bar (struct frame *f); 150extern void free_frame_tool_bar (struct frame *f);
@@ -156,6 +156,7 @@ extern void xg_frame_resized (struct frame *f,
156extern void xg_frame_set_char_size (struct frame *f, int width, int height); 156extern void xg_frame_set_char_size (struct frame *f, int width, int height);
157extern GtkWidget * xg_win_to_widget (Display *dpy, Window wdesc); 157extern GtkWidget * xg_win_to_widget (Display *dpy, Window wdesc);
158 158
159extern int xg_get_scale (struct frame *f);
159extern void xg_display_open (char *display_name, Display **dpy); 160extern void xg_display_open (char *display_name, Display **dpy);
160extern void xg_display_close (Display *dpy); 161extern void xg_display_close (Display *dpy);
161extern GdkCursor * xg_create_default_cursor (Display *dpy); 162extern GdkCursor * xg_create_default_cursor (Display *dpy);
diff --git a/src/image.c b/src/image.c
index 91749fb8733..76a19a68b0d 100644
--- a/src/image.c
+++ b/src/image.c
@@ -4231,7 +4231,7 @@ xpm_load_image (struct frame *f,
4231 color_val = Qnil; 4231 color_val = Qnil;
4232 if (!NILP (color_symbols) && !NILP (symbol_color)) 4232 if (!NILP (color_symbols) && !NILP (symbol_color))
4233 { 4233 {
4234 Lisp_Object specified_color = Fassoc (symbol_color, color_symbols); 4234 Lisp_Object specified_color = Fassoc (symbol_color, color_symbols, Qnil);
4235 4235
4236 if (CONSP (specified_color) && STRINGP (XCDR (specified_color))) 4236 if (CONSP (specified_color) && STRINGP (XCDR (specified_color)))
4237 { 4237 {
@@ -8086,83 +8086,76 @@ compute_image_size (size_t width, size_t height,
8086 int *d_width, int *d_height) 8086 int *d_width, int *d_height)
8087{ 8087{
8088 Lisp_Object value; 8088 Lisp_Object value;
8089 int desired_width, desired_height; 8089 int desired_width = -1, desired_height = -1, max_width = -1, max_height = -1;
8090 double scale = 1; 8090 double scale = 1;
8091 8091
8092 value = image_spec_value (spec, QCscale, NULL); 8092 value = image_spec_value (spec, QCscale, NULL);
8093 if (NUMBERP (value)) 8093 if (NUMBERP (value))
8094 scale = XFLOATINT (value); 8094 scale = XFLOATINT (value);
8095 8095
8096 value = image_spec_value (spec, QCmax_width, NULL);
8097 if (NATNUMP (value))
8098 max_width = min (XFASTINT (value), INT_MAX);
8099
8100 value = image_spec_value (spec, QCmax_height, NULL);
8101 if (NATNUMP (value))
8102 max_height = min (XFASTINT (value), INT_MAX);
8103
8096 /* If width and/or height is set in the display spec assume we want 8104 /* If width and/or height is set in the display spec assume we want
8097 to scale to those values. If either h or w is unspecified, the 8105 to scale to those values. If either h or w is unspecified, the
8098 unspecified should be calculated from the specified to preserve 8106 unspecified should be calculated from the specified to preserve
8099 aspect ratio. */ 8107 aspect ratio. */
8100 value = image_spec_value (spec, QCwidth, NULL); 8108 value = image_spec_value (spec, QCwidth, NULL);
8101 desired_width = NATNUMP (value) ? 8109 if (NATNUMP (value))
8102 min (XFASTINT (value) * scale, INT_MAX) : -1; 8110 {
8111 desired_width = min (XFASTINT (value) * scale, INT_MAX);
8112 /* :width overrides :max-width. */
8113 max_width = -1;
8114 }
8115
8103 value = image_spec_value (spec, QCheight, NULL); 8116 value = image_spec_value (spec, QCheight, NULL);
8104 desired_height = NATNUMP (value) ? 8117 if (NATNUMP (value))
8105 min (XFASTINT (value) * scale, INT_MAX) : -1; 8118 {
8119 desired_height = min (XFASTINT (value) * scale, INT_MAX);
8120 /* :height overrides :max-height. */
8121 max_height = -1;
8122 }
8123
8124 /* If we have both width/height set explicitly, we skip past all the
8125 aspect ratio-preserving computations below. */
8126 if (desired_width != -1 && desired_height != -1)
8127 goto out;
8106 8128
8107 width = width * scale; 8129 width = width * scale;
8108 height = height * scale; 8130 height = height * scale;
8109 8131
8110 if (desired_width == -1) 8132 if (desired_width != -1)
8133 /* Width known, calculate height. */
8134 desired_height = scale_image_size (desired_width, width, height);
8135 else if (desired_height != -1)
8136 /* Height known, calculate width. */
8137 desired_width = scale_image_size (desired_height, height, width);
8138 else
8111 { 8139 {
8112 value = image_spec_value (spec, QCmax_width, NULL); 8140 desired_width = width;
8113 if (NATNUMP (value)) 8141 desired_height = height;
8114 {
8115 int max_width = min (XFASTINT (value), INT_MAX);
8116 if (max_width < width)
8117 {
8118 /* The image is wider than :max-width. */
8119 desired_width = max_width;
8120 if (desired_height == -1)
8121 {
8122 desired_height = scale_image_size (desired_width,
8123 width, height);
8124 value = image_spec_value (spec, QCmax_height, NULL);
8125 if (NATNUMP (value))
8126 {
8127 int max_height = min (XFASTINT (value), INT_MAX);
8128 if (max_height < desired_height)
8129 {
8130 desired_height = max_height;
8131 desired_width = scale_image_size (desired_height,
8132 height, width);
8133 }
8134 }
8135 }
8136 }
8137 }
8138 } 8142 }
8139 8143
8140 if (desired_height == -1) 8144 if (max_width != -1 && desired_width > max_width)
8141 { 8145 {
8142 value = image_spec_value (spec, QCmax_height, NULL); 8146 /* The image is wider than :max-width. */
8143 if (NATNUMP (value)) 8147 desired_width = max_width;
8144 { 8148 desired_height = scale_image_size (desired_width, width, height);
8145 int max_height = min (XFASTINT (value), INT_MAX);
8146 if (max_height < height)
8147 desired_height = max_height;
8148 }
8149 } 8149 }
8150 8150
8151 if (desired_width != -1 && desired_height == -1) 8151 if (max_height != -1 && desired_height > max_height)
8152 /* w known, calculate h. */
8153 desired_height = scale_image_size (desired_width, width, height);
8154
8155 if (desired_width == -1 && desired_height != -1)
8156 /* h known, calculate w. */
8157 desired_width = scale_image_size (desired_height, height, width);
8158
8159 /* We have no width/height settings, so just apply the scale. */
8160 if (desired_width == -1 && desired_height == -1)
8161 { 8152 {
8162 desired_width = width; 8153 /* The image is higher than :max-height. */
8163 desired_height = height; 8154 desired_height = max_height;
8155 desired_width = scale_image_size (desired_height, height, width);
8164 } 8156 }
8165 8157
8158 out:
8166 *d_width = desired_width; 8159 *d_width = desired_width;
8167 *d_height = desired_height; 8160 *d_height = desired_height;
8168} 8161}
diff --git a/src/indent.c b/src/indent.c
index adecc3622a8..4c6dacd2042 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -1947,6 +1947,57 @@ vmotion (register ptrdiff_t from, register ptrdiff_t from_byte,
1947 -1, hscroll, 0, w); 1947 -1, hscroll, 0, w);
1948} 1948}
1949 1949
1950/* Return the width taken by line-number display in window W. */
1951static void
1952line_number_display_width (struct window *w, int *width, int *pixel_width)
1953{
1954 if (NILP (Vdisplay_line_numbers))
1955 {
1956 *width = 0;
1957 *pixel_width = 0;
1958 }
1959 else
1960 {
1961 struct it it;
1962 struct text_pos wstart;
1963 bool saved_restriction = false;
1964 ptrdiff_t count = SPECPDL_INDEX ();
1965 SET_TEXT_POS_FROM_MARKER (wstart, w->start);
1966 void *itdata = bidi_shelve_cache ();
1967 /* We must start from window's start point, but it could be
1968 outside the accessible region. */
1969 if (wstart.charpos < BEGV || wstart.charpos > ZV)
1970 {
1971 record_unwind_protect (save_restriction_restore,
1972 save_restriction_save ());
1973 Fwiden ();
1974 saved_restriction = true;
1975 }
1976 start_display (&it, w, wstart);
1977 move_it_by_lines (&it, 1);
1978 *width = it.lnum_width;
1979 *pixel_width = it.lnum_pixel_width;
1980 if (saved_restriction)
1981 unbind_to (count, Qnil);
1982 bidi_unshelve_cache (itdata, 0);
1983 }
1984}
1985
1986DEFUN ("line-number-display-width", Fline_number_display_width,
1987 Sline_number_display_width, 0, 1, 0,
1988 doc: /* Return the width used for displaying line numbers in the selected window.
1989If optional argument PIXELWISE is non-nil, return the width in pixels,
1990otherwise return the width in columns of the face used to display
1991line numbers, `line-number'. */)
1992 (Lisp_Object pixelwise)
1993{
1994 int width, pixel_width;
1995 line_number_display_width (XWINDOW (selected_window), &width, &pixel_width);
1996 if (!NILP (pixelwise))
1997 return make_number (pixel_width);
1998 return make_number (width);
1999}
2000
1950/* In window W (derived from WINDOW), return x coordinate for column 2001/* In window W (derived from WINDOW), return x coordinate for column
1951 COL (derived from COLUMN). */ 2002 COL (derived from COLUMN). */
1952static int 2003static int
@@ -2068,9 +2119,19 @@ whether or not it is currently displayed in some window. */)
2068 start_x = window_column_x (w, window, start_col, cur_col); 2119 start_x = window_column_x (w, window, start_col, cur_col);
2069 } 2120 }
2070 2121
2071 itdata = bidi_shelve_cache (); 2122 /* When displaying line numbers, we need to prime IT's
2123 lnum_width with the value calculated at window's start, since
2124 that's what normal window redisplay does. Otherwise C-n/C-p
2125 will sometimes err by one column. */
2126 int lnum_width = 0;
2127 int lnum_pixel_width = 0;
2128 if (!NILP (Vdisplay_line_numbers)
2129 && !EQ (Vdisplay_line_numbers, Qvisual))
2130 line_number_display_width (w, &lnum_width, &lnum_pixel_width);
2072 SET_TEXT_POS (pt, PT, PT_BYTE); 2131 SET_TEXT_POS (pt, PT, PT_BYTE);
2132 itdata = bidi_shelve_cache ();
2073 start_display (&it, w, pt); 2133 start_display (&it, w, pt);
2134 it.lnum_width = lnum_width;
2074 first_x = it.first_visible_x; 2135 first_x = it.first_visible_x;
2075 it_start = IT_CHARPOS (it); 2136 it_start = IT_CHARPOS (it);
2076 2137
@@ -2247,6 +2308,12 @@ whether or not it is currently displayed in some window. */)
2247 an addition to the hscroll amount. */ 2308 an addition to the hscroll amount. */
2248 if (lcols_given) 2309 if (lcols_given)
2249 { 2310 {
2311 /* If we are displaying line numbers, we could cross the
2312 line where the width of the line-number display changes,
2313 in which case we need to fix up the pixel coordinate
2314 accordingly. */
2315 if (lnum_pixel_width > 0)
2316 to_x += it.lnum_pixel_width - lnum_pixel_width;
2250 move_it_in_display_line (&it, ZV, first_x + to_x, MOVE_TO_X); 2317 move_it_in_display_line (&it, ZV, first_x + to_x, MOVE_TO_X);
2251 /* If we find ourselves in the middle of an overlay string 2318 /* If we find ourselves in the middle of an overlay string
2252 which includes a newline after current string position, 2319 which includes a newline after current string position,
@@ -2292,6 +2359,7 @@ syms_of_indent (void)
2292 defsubr (&Sindent_to); 2359 defsubr (&Sindent_to);
2293 defsubr (&Scurrent_column); 2360 defsubr (&Scurrent_column);
2294 defsubr (&Smove_to_column); 2361 defsubr (&Smove_to_column);
2362 defsubr (&Sline_number_display_width);
2295 defsubr (&Svertical_motion); 2363 defsubr (&Svertical_motion);
2296 defsubr (&Scompute_motion); 2364 defsubr (&Scompute_motion);
2297} 2365}
diff --git a/src/intervals.c b/src/intervals.c
index d17d80ac865..0089ecb8dde 100644
--- a/src/intervals.c
+++ b/src/intervals.c
@@ -224,7 +224,8 @@ intervals_equal (INTERVAL i0, INTERVAL i1)
224 Pass FUNCTION two args: an interval, and ARG. */ 224 Pass FUNCTION two args: an interval, and ARG. */
225 225
226void 226void
227traverse_intervals_noorder (INTERVAL tree, void (*function) (INTERVAL, Lisp_Object), Lisp_Object arg) 227traverse_intervals_noorder (INTERVAL tree, void (*function) (INTERVAL, void *),
228 void *arg)
228{ 229{
229 /* Minimize stack usage. */ 230 /* Minimize stack usage. */
230 while (tree) 231 while (tree)
@@ -257,69 +258,6 @@ traverse_intervals (INTERVAL tree, ptrdiff_t position,
257 } 258 }
258} 259}
259 260
260#if 0
261
262static int icount;
263static int idepth;
264static int zero_length;
265
266/* These functions are temporary, for debugging purposes only. */
267
268INTERVAL search_interval, found_interval;
269
270void
271check_for_interval (INTERVAL i)
272{
273 if (i == search_interval)
274 {
275 found_interval = i;
276 icount++;
277 }
278}
279
280INTERVAL
281search_for_interval (INTERVAL i, INTERVAL tree)
282{
283 icount = 0;
284 search_interval = i;
285 found_interval = NULL;
286 traverse_intervals_noorder (tree, &check_for_interval, Qnil);
287 return found_interval;
288}
289
290static void
291inc_interval_count (INTERVAL i)
292{
293 icount++;
294 if (LENGTH (i) == 0)
295 zero_length++;
296 if (depth > idepth)
297 idepth = depth;
298}
299
300int
301count_intervals (INTERVAL i)
302{
303 icount = 0;
304 idepth = 0;
305 zero_length = 0;
306 traverse_intervals_noorder (i, &inc_interval_count, Qnil);
307
308 return icount;
309}
310
311static INTERVAL
312root_interval (INTERVAL interval)
313{
314 register INTERVAL i = interval;
315
316 while (! ROOT_INTERVAL_P (i))
317 i = INTERVAL_PARENT (i);
318
319 return i;
320}
321#endif
322
323/* Assuming that a left child exists, perform the following operation: 261/* Assuming that a left child exists, perform the following operation:
324 262
325 A B 263 A B
diff --git a/src/intervals.h b/src/intervals.h
index a0da6f37801..9140e0c17ab 100644
--- a/src/intervals.h
+++ b/src/intervals.h
@@ -242,8 +242,7 @@ extern void traverse_intervals (INTERVAL, ptrdiff_t,
242 void (*) (INTERVAL, Lisp_Object), 242 void (*) (INTERVAL, Lisp_Object),
243 Lisp_Object); 243 Lisp_Object);
244extern void traverse_intervals_noorder (INTERVAL, 244extern void traverse_intervals_noorder (INTERVAL,
245 void (*) (INTERVAL, Lisp_Object), 245 void (*) (INTERVAL, void *), void *);
246 Lisp_Object);
247extern INTERVAL split_interval_right (INTERVAL, ptrdiff_t); 246extern INTERVAL split_interval_right (INTERVAL, ptrdiff_t);
248extern INTERVAL split_interval_left (INTERVAL, ptrdiff_t); 247extern INTERVAL split_interval_left (INTERVAL, ptrdiff_t);
249extern INTERVAL find_interval (INTERVAL, ptrdiff_t); 248extern INTERVAL find_interval (INTERVAL, ptrdiff_t);
diff --git a/src/keyboard.c b/src/keyboard.c
index 9e90899c569..804af85dad9 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -5127,6 +5127,7 @@ static short const scroll_bar_parts[] = {
5127 SYMBOL_INDEX (Qrightmost), SYMBOL_INDEX (Qend_scroll), SYMBOL_INDEX (Qratio) 5127 SYMBOL_INDEX (Qrightmost), SYMBOL_INDEX (Qend_scroll), SYMBOL_INDEX (Qratio)
5128}; 5128};
5129 5129
5130#ifdef HAVE_WINDOW_SYSTEM
5130/* An array of symbol indexes of internal border parts, indexed by an enum 5131/* An array of symbol indexes of internal border parts, indexed by an enum
5131 internal_border_part value. Note that Qnil corresponds to 5132 internal_border_part value. Note that Qnil corresponds to
5132 internal_border_part_none and should not appear in Lisp events. */ 5133 internal_border_part_none and should not appear in Lisp events. */
@@ -5137,6 +5138,7 @@ static short const internal_border_parts[] = {
5137 SYMBOL_INDEX (Qbottom_right_corner), SYMBOL_INDEX (Qbottom_edge), 5138 SYMBOL_INDEX (Qbottom_right_corner), SYMBOL_INDEX (Qbottom_edge),
5138 SYMBOL_INDEX (Qbottom_left_corner) 5139 SYMBOL_INDEX (Qbottom_left_corner)
5139}; 5140};
5141#endif
5140 5142
5141/* A vector, indexed by button number, giving the down-going location 5143/* A vector, indexed by button number, giving the down-going location
5142 of currently depressed buttons, both scroll bar and non-scroll bar. 5144 of currently depressed buttons, both scroll bar and non-scroll bar.
diff --git a/src/keymap.c b/src/keymap.c
index b568f47cba7..db9aa7cbf38 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -1292,7 +1292,7 @@ silly_event_symbol_error (Lisp_Object c)
1292 base = XCAR (parsed); 1292 base = XCAR (parsed);
1293 name = Fsymbol_name (base); 1293 name = Fsymbol_name (base);
1294 /* This alist includes elements such as ("RET" . "\\r"). */ 1294 /* This alist includes elements such as ("RET" . "\\r"). */
1295 assoc = Fassoc (name, exclude_keys); 1295 assoc = Fassoc (name, exclude_keys, Qnil);
1296 1296
1297 if (! NILP (assoc)) 1297 if (! NILP (assoc))
1298 { 1298 {
diff --git a/src/lisp.h b/src/lisp.h
index ff8dde2b825..cffaf954b3b 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -838,13 +838,13 @@ make_lisp_symbol (struct Lisp_Symbol *sym)
838INLINE Lisp_Object 838INLINE Lisp_Object
839builtin_lisp_symbol (int index) 839builtin_lisp_symbol (int index)
840{ 840{
841 return make_lisp_symbol (lispsym + index); 841 return make_lisp_symbol (&lispsym[index].s);
842} 842}
843 843
844INLINE void 844INLINE void
845(CHECK_SYMBOL) (Lisp_Object x) 845(CHECK_SYMBOL) (Lisp_Object x)
846{ 846{
847 lisp_h_CHECK_SYMBOL (x); 847 lisp_h_CHECK_SYMBOL (x);
848} 848}
849 849
850/* In the size word of a vector, this bit means the vector has been marked. */ 850/* In the size word of a vector, this bit means the vector has been marked. */
@@ -3386,6 +3386,7 @@ enum { NEXT_ALMOST_PRIME_LIMIT = 11 };
3386extern EMACS_INT next_almost_prime (EMACS_INT) ATTRIBUTE_CONST; 3386extern EMACS_INT next_almost_prime (EMACS_INT) ATTRIBUTE_CONST;
3387extern Lisp_Object larger_vector (Lisp_Object, ptrdiff_t, ptrdiff_t); 3387extern Lisp_Object larger_vector (Lisp_Object, ptrdiff_t, ptrdiff_t);
3388extern void sweep_weak_hash_tables (void); 3388extern void sweep_weak_hash_tables (void);
3389extern char *extract_data_from_object (Lisp_Object, ptrdiff_t *, ptrdiff_t *);
3389EMACS_UINT hash_string (char const *, ptrdiff_t); 3390EMACS_UINT hash_string (char const *, ptrdiff_t);
3390EMACS_UINT sxhash (Lisp_Object, int); 3391EMACS_UINT sxhash (Lisp_Object, int);
3391Lisp_Object make_hash_table (struct hash_table_test, EMACS_INT, float, float, 3392Lisp_Object make_hash_table (struct hash_table_test, EMACS_INT, float, float,
@@ -3874,7 +3875,6 @@ extern Lisp_Object vformat_string (const char *, va_list)
3874 ATTRIBUTE_FORMAT_PRINTF (1, 0); 3875 ATTRIBUTE_FORMAT_PRINTF (1, 0);
3875extern void un_autoload (Lisp_Object); 3876extern void un_autoload (Lisp_Object);
3876extern Lisp_Object call_debugger (Lisp_Object arg); 3877extern Lisp_Object call_debugger (Lisp_Object arg);
3877extern void *near_C_stack_top (void);
3878extern void init_eval_once (void); 3878extern void init_eval_once (void);
3879extern Lisp_Object safe_call (ptrdiff_t, Lisp_Object, ...); 3879extern Lisp_Object safe_call (ptrdiff_t, Lisp_Object, ...);
3880extern Lisp_Object safe_call1 (Lisp_Object, Lisp_Object); 3880extern Lisp_Object safe_call1 (Lisp_Object, Lisp_Object);
@@ -3965,6 +3965,7 @@ extern void syms_of_editfns (void);
3965 3965
3966/* Defined in buffer.c. */ 3966/* Defined in buffer.c. */
3967extern bool mouse_face_overlay_overlaps (Lisp_Object); 3967extern bool mouse_face_overlay_overlaps (Lisp_Object);
3968extern Lisp_Object disable_line_numbers_overlay_at_eob (void);
3968extern _Noreturn void nsberror (Lisp_Object); 3969extern _Noreturn void nsberror (Lisp_Object);
3969extern void adjust_overlays_for_insert (ptrdiff_t, ptrdiff_t); 3970extern void adjust_overlays_for_insert (ptrdiff_t, ptrdiff_t);
3970extern void adjust_overlays_for_delete (ptrdiff_t, ptrdiff_t); 3971extern void adjust_overlays_for_delete (ptrdiff_t, ptrdiff_t);
diff --git a/src/lread.c b/src/lread.c
index 7c554ba8536..dbaadce4b40 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -103,8 +103,20 @@ static Lisp_Object read_objects_map;
103 (to reduce allocations), or nil. */ 103 (to reduce allocations), or nil. */
104static Lisp_Object read_objects_completed; 104static Lisp_Object read_objects_completed;
105 105
106/* File for get_file_char to read from. Use by load. */ 106/* File and lookahead for get-file-char and get-emacs-mule-file-char
107static FILE *instream; 107 to read from. Used by Fload. */
108static struct infile
109{
110 /* The input stream. */
111 FILE *stream;
112
113 /* Lookahead byte count. */
114 signed char lookahead;
115
116 /* Lookahead bytes, in reverse order. Keep these here because it is
117 not portable to ungetc more than one byte at a time. */
118 unsigned char buf[MAX_MULTIBYTE_LENGTH - 1];
119} *infile;
108 120
109/* For use within read-from-string (this reader is non-reentrant!!) */ 121/* For use within read-from-string (this reader is non-reentrant!!) */
110static ptrdiff_t read_from_string_index; 122static ptrdiff_t read_from_string_index;
@@ -149,7 +161,7 @@ static Lisp_Object Vloads_in_progress;
149static int read_emacs_mule_char (int, int (*) (int, Lisp_Object), 161static int read_emacs_mule_char (int, int (*) (int, Lisp_Object),
150 Lisp_Object); 162 Lisp_Object);
151 163
152static void readevalloop (Lisp_Object, FILE *, Lisp_Object, bool, 164static void readevalloop (Lisp_Object, struct infile *, Lisp_Object, bool,
153 Lisp_Object, Lisp_Object, 165 Lisp_Object, Lisp_Object,
154 Lisp_Object, Lisp_Object); 166 Lisp_Object, Lisp_Object);
155 167
@@ -340,14 +352,13 @@ readchar (Lisp_Object readcharfun, bool *multibyte)
340 len = BYTES_BY_CHAR_HEAD (c); 352 len = BYTES_BY_CHAR_HEAD (c);
341 while (i < len) 353 while (i < len)
342 { 354 {
343 c = (*readbyte) (-1, readcharfun); 355 buf[i++] = c = (*readbyte) (-1, readcharfun);
344 if (c < 0 || ! TRAILING_CODE_P (c)) 356 if (c < 0 || ! TRAILING_CODE_P (c))
345 { 357 {
346 while (--i > 1) 358 for (i -= c < 0; 0 < --i; )
347 (*readbyte) (buf[i], readcharfun); 359 (*readbyte) (buf[i], readcharfun);
348 return BYTE8_TO_CHAR (buf[0]); 360 return BYTE8_TO_CHAR (buf[0]);
349 } 361 }
350 buf[i++] = c;
351 } 362 }
352 return STRING_CHAR (buf); 363 return STRING_CHAR (buf);
353} 364}
@@ -362,8 +373,9 @@ skip_dyn_bytes (Lisp_Object readcharfun, ptrdiff_t n)
362 if (FROM_FILE_P (readcharfun)) 373 if (FROM_FILE_P (readcharfun))
363 { 374 {
364 block_input (); /* FIXME: Not sure if it's needed. */ 375 block_input (); /* FIXME: Not sure if it's needed. */
365 fseek (instream, n, SEEK_CUR); 376 fseek (infile->stream, n - infile->lookahead, SEEK_CUR);
366 unblock_input (); 377 unblock_input ();
378 infile->lookahead = 0;
367 } 379 }
368 else 380 else
369 { /* We're not reading directly from a file. In that case, it's difficult 381 { /* We're not reading directly from a file. In that case, it's difficult
@@ -385,8 +397,9 @@ skip_dyn_eof (Lisp_Object readcharfun)
385 if (FROM_FILE_P (readcharfun)) 397 if (FROM_FILE_P (readcharfun))
386 { 398 {
387 block_input (); /* FIXME: Not sure if it's needed. */ 399 block_input (); /* FIXME: Not sure if it's needed. */
388 fseek (instream, 0, SEEK_END); 400 fseek (infile->stream, 0, SEEK_END);
389 unblock_input (); 401 unblock_input ();
402 infile->lookahead = 0;
390 } 403 }
391 else 404 else
392 while (READCHAR >= 0); 405 while (READCHAR >= 0);
@@ -459,15 +472,13 @@ readbyte_for_lambda (int c, Lisp_Object readcharfun)
459 472
460 473
461static int 474static int
462readbyte_from_file (int c, Lisp_Object readcharfun) 475readbyte_from_stdio (void)
463{ 476{
464 if (c >= 0) 477 if (infile->lookahead)
465 { 478 return infile->buf[--infile->lookahead];
466 block_input (); 479
467 ungetc (c, instream); 480 int c;
468 unblock_input (); 481 FILE *instream = infile->stream;
469 return 0;
470 }
471 482
472 block_input (); 483 block_input ();
473 484
@@ -487,6 +498,19 @@ readbyte_from_file (int c, Lisp_Object readcharfun)
487} 498}
488 499
489static int 500static int
501readbyte_from_file (int c, Lisp_Object readcharfun)
502{
503 if (c >= 0)
504 {
505 eassert (infile->lookahead < sizeof infile->buf);
506 infile->buf[infile->lookahead++] = c;
507 return 0;
508 }
509
510 return readbyte_from_stdio ();
511}
512
513static int
490readbyte_from_string (int c, Lisp_Object readcharfun) 514readbyte_from_string (int c, Lisp_Object readcharfun)
491{ 515{
492 Lisp_Object string = XCAR (readcharfun); 516 Lisp_Object string = XCAR (readcharfun);
@@ -508,7 +532,7 @@ readbyte_from_string (int c, Lisp_Object readcharfun)
508} 532}
509 533
510 534
511/* Read one non-ASCII character from INSTREAM. The character is 535/* Read one non-ASCII character from INFILE. The character is
512 encoded in `emacs-mule' and the first byte is already read in 536 encoded in `emacs-mule' and the first byte is already read in
513 C. */ 537 C. */
514 538
@@ -530,14 +554,13 @@ read_emacs_mule_char (int c, int (*readbyte) (int, Lisp_Object), Lisp_Object rea
530 buf[i++] = c; 554 buf[i++] = c;
531 while (i < len) 555 while (i < len)
532 { 556 {
533 c = (*readbyte) (-1, readcharfun); 557 buf[i++] = c = (*readbyte) (-1, readcharfun);
534 if (c < 0xA0) 558 if (c < 0xA0)
535 { 559 {
536 while (--i > 1) 560 for (i -= c < 0; 0 < --i; )
537 (*readbyte) (buf[i], readcharfun); 561 (*readbyte) (buf[i], readcharfun);
538 return BYTE8_TO_CHAR (buf[0]); 562 return BYTE8_TO_CHAR (buf[0]);
539 } 563 }
540 buf[i++] = c;
541 } 564 }
542 565
543 if (len == 2) 566 if (len == 2)
@@ -572,6 +595,20 @@ read_emacs_mule_char (int c, int (*readbyte) (int, Lisp_Object), Lisp_Object rea
572} 595}
573 596
574 597
598/* An in-progress substitution of OBJECT for PLACEHOLDER. */
599struct subst
600{
601 Lisp_Object object;
602 Lisp_Object placeholder;
603
604 /* Hash table of subobjects of OBJECT that might be circular. If
605 Qt, all such objects might be circular. */
606 Lisp_Object completed;
607
608 /* List of subobjects of OBJECT that have already been visited. */
609 Lisp_Object seen;
610};
611
575static Lisp_Object read_internal_start (Lisp_Object, Lisp_Object, 612static Lisp_Object read_internal_start (Lisp_Object, Lisp_Object,
576 Lisp_Object); 613 Lisp_Object);
577static Lisp_Object read0 (Lisp_Object); 614static Lisp_Object read0 (Lisp_Object);
@@ -580,9 +617,8 @@ static Lisp_Object read1 (Lisp_Object, int *, bool);
580static Lisp_Object read_list (bool, Lisp_Object); 617static Lisp_Object read_list (bool, Lisp_Object);
581static Lisp_Object read_vector (Lisp_Object, bool); 618static Lisp_Object read_vector (Lisp_Object, bool);
582 619
583static Lisp_Object substitute_object_recurse (Lisp_Object, Lisp_Object, 620static Lisp_Object substitute_object_recurse (struct subst *, Lisp_Object);
584 Lisp_Object); 621static void substitute_in_interval (INTERVAL, void *);
585static void substitute_in_interval (INTERVAL, Lisp_Object);
586 622
587 623
588/* Get a character from the tty. */ 624/* Get a character from the tty. */
@@ -779,11 +815,9 @@ DEFUN ("get-file-char", Fget_file_char, Sget_file_char, 0, 0, 0,
779 doc: /* Don't use this yourself. */) 815 doc: /* Don't use this yourself. */)
780 (void) 816 (void)
781{ 817{
782 register Lisp_Object val; 818 if (!infile)
783 block_input (); 819 error ("get-file-char misused");
784 XSETINT (val, getc_unlocked (instream)); 820 return make_number (readbyte_from_stdio ());
785 unblock_input ();
786 return val;
787} 821}
788 822
789 823
@@ -1028,6 +1062,15 @@ suffix_p (Lisp_Object string, const char *suffix)
1028 return string_len >= suffix_len && !strcmp (SSDATA (string) + string_len - suffix_len, suffix); 1062 return string_len >= suffix_len && !strcmp (SSDATA (string) + string_len - suffix_len, suffix);
1029} 1063}
1030 1064
1065static void
1066close_infile_unwind (void *arg)
1067{
1068 FILE *stream = arg;
1069 eassert (infile == NULL || infile->stream == stream);
1070 infile = NULL;
1071 fclose (stream);
1072}
1073
1031DEFUN ("load", Fload, Sload, 1, 5, 0, 1074DEFUN ("load", Fload, Sload, 1, 5, 0,
1032 doc: /* Execute a file of Lisp code named FILE. 1075 doc: /* Execute a file of Lisp code named FILE.
1033First try FILE with `.elc' appended, then try with `.el', then try 1076First try FILE with `.elc' appended, then try with `.el', then try
@@ -1347,7 +1390,7 @@ Return t if the file exists and loads successfully. */)
1347 } 1390 }
1348 if (! stream) 1391 if (! stream)
1349 report_file_error ("Opening stdio stream", file); 1392 report_file_error ("Opening stdio stream", file);
1350 set_unwind_protect_ptr (fd_index, fclose_unwind, stream); 1393 set_unwind_protect_ptr (fd_index, close_infile_unwind, stream);
1351 1394
1352 if (! NILP (Vpurify_flag)) 1395 if (! NILP (Vpurify_flag))
1353 Vpreloaded_file_list = Fcons (Fpurecopy (file), Vpreloaded_file_list); 1396 Vpreloaded_file_list = Fcons (Fpurecopy (file), Vpreloaded_file_list);
@@ -1370,19 +1413,23 @@ Return t if the file exists and loads successfully. */)
1370 specbind (Qinhibit_file_name_operation, Qnil); 1413 specbind (Qinhibit_file_name_operation, Qnil);
1371 specbind (Qload_in_progress, Qt); 1414 specbind (Qload_in_progress, Qt);
1372 1415
1373 instream = stream; 1416 struct infile input;
1417 input.stream = stream;
1418 input.lookahead = 0;
1419 infile = &input;
1420
1374 if (lisp_file_lexically_bound_p (Qget_file_char)) 1421 if (lisp_file_lexically_bound_p (Qget_file_char))
1375 Fset (Qlexical_binding, Qt); 1422 Fset (Qlexical_binding, Qt);
1376 1423
1377 if (! version || version >= 22) 1424 if (! version || version >= 22)
1378 readevalloop (Qget_file_char, stream, hist_file_name, 1425 readevalloop (Qget_file_char, &input, hist_file_name,
1379 0, Qnil, Qnil, Qnil, Qnil); 1426 0, Qnil, Qnil, Qnil, Qnil);
1380 else 1427 else
1381 { 1428 {
1382 /* We can't handle a file which was compiled with 1429 /* We can't handle a file which was compiled with
1383 byte-compile-dynamic by older version of Emacs. */ 1430 byte-compile-dynamic by older version of Emacs. */
1384 specbind (Qload_force_doc_strings, Qt); 1431 specbind (Qload_force_doc_strings, Qt);
1385 readevalloop (Qget_emacs_mule_file_char, stream, hist_file_name, 1432 readevalloop (Qget_emacs_mule_file_char, &input, hist_file_name,
1386 0, Qnil, Qnil, Qnil, Qnil); 1433 0, Qnil, Qnil, Qnil, Qnil);
1387 } 1434 }
1388 unbind_to (count, Qnil); 1435 unbind_to (count, Qnil);
@@ -1813,7 +1860,7 @@ readevalloop_eager_expand_eval (Lisp_Object val, Lisp_Object macroexpand)
1813 1860
1814static void 1861static void
1815readevalloop (Lisp_Object readcharfun, 1862readevalloop (Lisp_Object readcharfun,
1816 FILE *stream, 1863 struct infile *infile0,
1817 Lisp_Object sourcename, 1864 Lisp_Object sourcename,
1818 bool printflag, 1865 bool printflag,
1819 Lisp_Object unibyte, Lisp_Object readfun, 1866 Lisp_Object unibyte, Lisp_Object readfun,
@@ -1913,7 +1960,7 @@ readevalloop (Lisp_Object readcharfun,
1913 if (b && first_sexp) 1960 if (b && first_sexp)
1914 whole_buffer = (BUF_PT (b) == BUF_BEG (b) && BUF_ZV (b) == BUF_Z (b)); 1961 whole_buffer = (BUF_PT (b) == BUF_BEG (b) && BUF_ZV (b) == BUF_Z (b));
1915 1962
1916 instream = stream; 1963 infile = infile0;
1917 read_next: 1964 read_next:
1918 c = READCHAR; 1965 c = READCHAR;
1919 if (c == ';') 1966 if (c == ';')
@@ -2003,7 +2050,7 @@ readevalloop (Lisp_Object readcharfun,
2003 } 2050 }
2004 2051
2005 build_load_history (sourcename, 2052 build_load_history (sourcename,
2006 stream || whole_buffer); 2053 infile0 || whole_buffer);
2007 2054
2008 unbind_to (count, Qnil); 2055 unbind_to (count, Qnil);
2009} 2056}
@@ -2629,6 +2676,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
2629 bool uninterned_symbol = false; 2676 bool uninterned_symbol = false;
2630 bool multibyte; 2677 bool multibyte;
2631 char stackbuf[MAX_ALLOCA]; 2678 char stackbuf[MAX_ALLOCA];
2679 current_thread->stack_top = stackbuf;
2632 2680
2633 *pch = 0; 2681 *pch = 0;
2634 2682
@@ -2943,11 +2991,17 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
2943 saved_doc_string_size = nskip + extra; 2991 saved_doc_string_size = nskip + extra;
2944 } 2992 }
2945 2993
2946 saved_doc_string_position = file_tell (instream); 2994 FILE *instream = infile->stream;
2995 saved_doc_string_position = (file_tell (instream)
2996 - infile->lookahead);
2947 2997
2948 /* Copy that many characters into saved_doc_string. */ 2998 /* Copy that many bytes into saved_doc_string. */
2999 i = 0;
3000 for (int n = min (nskip, infile->lookahead); 0 < n; n--)
3001 saved_doc_string[i++]
3002 = c = infile->buf[--infile->lookahead];
2949 block_input (); 3003 block_input ();
2950 for (i = 0; i < nskip && c >= 0; i++) 3004 for (; i < nskip && 0 <= c; i++)
2951 saved_doc_string[i] = c = getc_unlocked (instream); 3005 saved_doc_string[i] = c = getc_unlocked (instream);
2952 unblock_input (); 3006 unblock_input ();
2953 3007
@@ -3067,7 +3121,8 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
3067 } 3121 }
3068 else 3122 else
3069 { 3123 {
3070 Fsubstitute_object_in_subtree (tem, placeholder); 3124 Flread__substitute_object_in_subtree
3125 (tem, placeholder, read_objects_completed);
3071 3126
3072 /* ...and #n# will use the real value from now on. */ 3127 /* ...and #n# will use the real value from now on. */
3073 i = hash_lookup (h, number, &hash); 3128 i = hash_lookup (h, number, &hash);
@@ -3424,6 +3479,24 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
3424 if (! NILP (result)) 3479 if (! NILP (result))
3425 return unbind_to (count, result); 3480 return unbind_to (count, result);
3426 } 3481 }
3482 if (!quoted && multibyte)
3483 {
3484 int ch = STRING_CHAR ((unsigned char *) read_buffer);
3485 switch (ch)
3486 {
3487 case 0x2018: /* LEFT SINGLE QUOTATION MARK */
3488 case 0x2019: /* RIGHT SINGLE QUOTATION MARK */
3489 case 0x201B: /* SINGLE HIGH-REVERSED-9 QUOTATION MARK */
3490 case 0x201C: /* LEFT DOUBLE QUOTATION MARK */
3491 case 0x201D: /* RIGHT DOUBLE QUOTATION MARK */
3492 case 0x201F: /* DOUBLE HIGH-REVERSED-9 QUOTATION MARK */
3493 case 0x301E: /* DOUBLE PRIME QUOTATION MARK */
3494 case 0xFF02: /* FULLWIDTH QUOTATION MARK */
3495 case 0xFF07: /* FULLWIDTH APOSTROPHE */
3496 xsignal2 (Qinvalid_read_syntax, build_string ("strange quote"),
3497 CALLN (Fstring, make_number (ch)));
3498 }
3499 }
3427 { 3500 {
3428 Lisp_Object result; 3501 Lisp_Object result;
3429 ptrdiff_t nbytes = p - read_buffer; 3502 ptrdiff_t nbytes = p - read_buffer;
@@ -3473,26 +3546,16 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
3473 } 3546 }
3474} 3547}
3475 3548
3476 3549DEFUN ("lread--substitute-object-in-subtree",
3477/* List of nodes we've seen during substitute_object_in_subtree. */ 3550 Flread__substitute_object_in_subtree,
3478static Lisp_Object seen_list; 3551 Slread__substitute_object_in_subtree, 3, 3, 0,
3479 3552 doc: /* In OBJECT, replace every occurrence of PLACEHOLDER with OBJECT.
3480DEFUN ("substitute-object-in-subtree", Fsubstitute_object_in_subtree, 3553COMPLETED is a hash table of objects that might be circular, or is t
3481 Ssubstitute_object_in_subtree, 2, 2, 0, 3554if any object might be circular. */)
3482 doc: /* Replace every reference to PLACEHOLDER in OBJECT with OBJECT. */) 3555 (Lisp_Object object, Lisp_Object placeholder, Lisp_Object completed)
3483 (Lisp_Object object, Lisp_Object placeholder)
3484{ 3556{
3485 Lisp_Object check_object; 3557 struct subst subst = { object, placeholder, completed, Qnil };
3486 3558 Lisp_Object check_object = substitute_object_recurse (&subst, object);
3487 /* We haven't seen any objects when we start. */
3488 seen_list = Qnil;
3489
3490 /* Make all the substitutions. */
3491 check_object
3492 = substitute_object_recurse (object, placeholder, object);
3493
3494 /* Clear seen_list because we're done with it. */
3495 seen_list = Qnil;
3496 3559
3497 /* The returned object here is expected to always eq the 3560 /* The returned object here is expected to always eq the
3498 original. */ 3561 original. */
@@ -3501,26 +3564,12 @@ DEFUN ("substitute-object-in-subtree", Fsubstitute_object_in_subtree,
3501 return Qnil; 3564 return Qnil;
3502} 3565}
3503 3566
3504/* Feval doesn't get called from here, so no gc protection is needed. */
3505#define SUBSTITUTE(get_val, set_val) \
3506 do { \
3507 Lisp_Object old_value = get_val; \
3508 Lisp_Object true_value \
3509 = substitute_object_recurse (object, placeholder, \
3510 old_value); \
3511 \
3512 if (!EQ (old_value, true_value)) \
3513 { \
3514 set_val; \
3515 } \
3516 } while (0)
3517
3518static Lisp_Object 3567static Lisp_Object
3519substitute_object_recurse (Lisp_Object object, Lisp_Object placeholder, Lisp_Object subtree) 3568substitute_object_recurse (struct subst *subst, Lisp_Object subtree)
3520{ 3569{
3521 /* If we find the placeholder, return the target object. */ 3570 /* If we find the placeholder, return the target object. */
3522 if (EQ (placeholder, subtree)) 3571 if (EQ (subst->placeholder, subtree))
3523 return object; 3572 return subst->object;
3524 3573
3525 /* For common object types that can't contain other objects, don't 3574 /* For common object types that can't contain other objects, don't
3526 bother looking them up; we're done. */ 3575 bother looking them up; we're done. */
@@ -3530,15 +3579,16 @@ substitute_object_recurse (Lisp_Object object, Lisp_Object placeholder, Lisp_Obj
3530 return subtree; 3579 return subtree;
3531 3580
3532 /* If we've been to this node before, don't explore it again. */ 3581 /* If we've been to this node before, don't explore it again. */
3533 if (!EQ (Qnil, Fmemq (subtree, seen_list))) 3582 if (!EQ (Qnil, Fmemq (subtree, subst->seen)))
3534 return subtree; 3583 return subtree;
3535 3584
3536 /* If this node can be the entry point to a cycle, remember that 3585 /* If this node can be the entry point to a cycle, remember that
3537 we've seen it. It can only be such an entry point if it was made 3586 we've seen it. It can only be such an entry point if it was made
3538 by #n=, which means that we can find it as a value in 3587 by #n=, which means that we can find it as a value in
3539 read_objects_completed. */ 3588 COMPLETED. */
3540 if (hash_lookup (XHASH_TABLE (read_objects_completed), subtree, NULL) >= 0) 3589 if (EQ (subst->completed, Qt)
3541 seen_list = Fcons (subtree, seen_list); 3590 || hash_lookup (XHASH_TABLE (subst->completed), subtree, NULL) >= 0)
3591 subst->seen = Fcons (subtree, subst->seen);
3542 3592
3543 /* Recurse according to subtree's type. 3593 /* Recurse according to subtree's type.
3544 Every branch must return a Lisp_Object. */ 3594 Every branch must return a Lisp_Object. */
@@ -3565,19 +3615,15 @@ substitute_object_recurse (Lisp_Object object, Lisp_Object placeholder, Lisp_Obj
3565 if (SUB_CHAR_TABLE_P (subtree)) 3615 if (SUB_CHAR_TABLE_P (subtree))
3566 i = 2; 3616 i = 2;
3567 for ( ; i < length; i++) 3617 for ( ; i < length; i++)
3568 SUBSTITUTE (AREF (subtree, i), 3618 ASET (subtree, i,
3569 ASET (subtree, i, true_value)); 3619 substitute_object_recurse (subst, AREF (subtree, i)));
3570 return subtree; 3620 return subtree;
3571 } 3621 }
3572 3622
3573 case Lisp_Cons: 3623 case Lisp_Cons:
3574 { 3624 XSETCAR (subtree, substitute_object_recurse (subst, XCAR (subtree)));
3575 SUBSTITUTE (XCAR (subtree), 3625 XSETCDR (subtree, substitute_object_recurse (subst, XCDR (subtree)));
3576 XSETCAR (subtree, true_value)); 3626 return subtree;
3577 SUBSTITUTE (XCDR (subtree),
3578 XSETCDR (subtree, true_value));
3579 return subtree;
3580 }
3581 3627
3582 case Lisp_String: 3628 case Lisp_String:
3583 { 3629 {
@@ -3585,11 +3631,8 @@ substitute_object_recurse (Lisp_Object object, Lisp_Object placeholder, Lisp_Obj
3585 substitute_in_interval contains part of the logic. */ 3631 substitute_in_interval contains part of the logic. */
3586 3632
3587 INTERVAL root_interval = string_intervals (subtree); 3633 INTERVAL root_interval = string_intervals (subtree);
3588 AUTO_CONS (arg, object, placeholder);
3589
3590 traverse_intervals_noorder (root_interval, 3634 traverse_intervals_noorder (root_interval,
3591 &substitute_in_interval, arg); 3635 substitute_in_interval, subst);
3592
3593 return subtree; 3636 return subtree;
3594 } 3637 }
3595 3638
@@ -3601,12 +3644,10 @@ substitute_object_recurse (Lisp_Object object, Lisp_Object placeholder, Lisp_Obj
3601 3644
3602/* Helper function for substitute_object_recurse. */ 3645/* Helper function for substitute_object_recurse. */
3603static void 3646static void
3604substitute_in_interval (INTERVAL interval, Lisp_Object arg) 3647substitute_in_interval (INTERVAL interval, void *arg)
3605{ 3648{
3606 Lisp_Object object = Fcar (arg); 3649 set_interval_plist (interval,
3607 Lisp_Object placeholder = Fcdr (arg); 3650 substitute_object_recurse (arg, interval->plist));
3608
3609 SUBSTITUTE (interval->plist, set_interval_plist (interval, true_value));
3610} 3651}
3611 3652
3612 3653
@@ -4704,7 +4745,7 @@ syms_of_lread (void)
4704{ 4745{
4705 defsubr (&Sread); 4746 defsubr (&Sread);
4706 defsubr (&Sread_from_string); 4747 defsubr (&Sread_from_string);
4707 defsubr (&Ssubstitute_object_in_subtree); 4748 defsubr (&Slread__substitute_object_in_subtree);
4708 defsubr (&Sintern); 4749 defsubr (&Sintern);
4709 defsubr (&Sintern_soft); 4750 defsubr (&Sintern_soft);
4710 defsubr (&Sunintern); 4751 defsubr (&Sunintern);
@@ -5017,8 +5058,6 @@ that are loaded before your customizations are read! */);
5017 read_objects_map = Qnil; 5058 read_objects_map = Qnil;
5018 staticpro (&read_objects_completed); 5059 staticpro (&read_objects_completed);
5019 read_objects_completed = Qnil; 5060 read_objects_completed = Qnil;
5020 staticpro (&seen_list);
5021 seen_list = Qnil;
5022 5061
5023 Vloads_in_progress = Qnil; 5062 Vloads_in_progress = Qnil;
5024 staticpro (&Vloads_in_progress); 5063 staticpro (&Vloads_in_progress);
diff --git a/src/nsfns.m b/src/nsfns.m
index 68eba8b6a2e..36748cebb8b 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -3080,6 +3080,25 @@ The coordinates X and Y are interpreted in pixels relative to a position
3080 return Qnil; 3080 return Qnil;
3081} 3081}
3082 3082
3083DEFUN ("ns-mouse-absolute-pixel-position",
3084 Fns_mouse_absolute_pixel_position,
3085 Sns_mouse_absolute_pixel_position, 0, 0, 0,
3086 doc: /* Return absolute position of mouse cursor in pixels.
3087The position is returned as a cons cell (X . Y) of the
3088coordinates of the mouse cursor position in pixels relative to a
3089position (0, 0) of the selected frame's terminal. */)
3090 (void)
3091{
3092 struct frame *f = SELECTED_FRAME ();
3093 EmacsView *view = FRAME_NS_VIEW (f);
3094 NSScreen *screen = [[view window] screen];
3095 NSPoint pt = [NSEvent mouseLocation];
3096
3097 return Fcons(make_number(pt.x - screen.frame.origin.x),
3098 make_number(screen.frame.size.height -
3099 (pt.y - screen.frame.origin.y)));
3100}
3101
3083/* ========================================================================== 3102/* ==========================================================================
3084 3103
3085 Class implementations 3104 Class implementations
@@ -3269,6 +3288,7 @@ be used as the image of the icon representing the frame. */);
3269 defsubr (&Sns_frame_list_z_order); 3288 defsubr (&Sns_frame_list_z_order);
3270 defsubr (&Sns_frame_restack); 3289 defsubr (&Sns_frame_restack);
3271 defsubr (&Sns_set_mouse_absolute_pixel_position); 3290 defsubr (&Sns_set_mouse_absolute_pixel_position);
3291 defsubr (&Sns_mouse_absolute_pixel_position);
3272 defsubr (&Sx_display_mm_width); 3292 defsubr (&Sx_display_mm_width);
3273 defsubr (&Sx_display_mm_height); 3293 defsubr (&Sx_display_mm_height);
3274 defsubr (&Sx_display_screens); 3294 defsubr (&Sx_display_screens);
diff --git a/src/nsterm.m b/src/nsterm.m
index bf83550b3d7..36d906a7cec 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -1570,6 +1570,7 @@ x_make_frame_visible (struct frame *f)
1570 if (!FRAME_VISIBLE_P (f)) 1570 if (!FRAME_VISIBLE_P (f))
1571 { 1571 {
1572 EmacsView *view = (EmacsView *)FRAME_NS_VIEW (f); 1572 EmacsView *view = (EmacsView *)FRAME_NS_VIEW (f);
1573 NSWindow *window = [view window];
1573 1574
1574 SET_FRAME_VISIBLE (f, 1); 1575 SET_FRAME_VISIBLE (f, 1);
1575 ns_raise_frame (f, ! FRAME_NO_FOCUS_ON_MAP (f)); 1576 ns_raise_frame (f, ! FRAME_NO_FOCUS_ON_MAP (f));
@@ -1586,6 +1587,23 @@ x_make_frame_visible (struct frame *f)
1586 [view handleFS]; 1587 [view handleFS];
1587 unblock_input (); 1588 unblock_input ();
1588 } 1589 }
1590
1591 /* Making a frame invisible seems to break the parent->child
1592 relationship, so reinstate it. */
1593 if ([window parentWindow] == nil && FRAME_PARENT_FRAME (f) != NULL)
1594 {
1595 NSWindow *parent = [FRAME_NS_VIEW (FRAME_PARENT_FRAME (f)) window];
1596
1597 block_input ();
1598 [parent addChildWindow: window
1599 ordered: NSWindowAbove];
1600 unblock_input ();
1601
1602 /* If the parent frame moved while the child frame was
1603 invisible, the child frame's position won't have been
1604 updated. Make sure it's in the right place now. */
1605 x_set_offset(f, f->left_pos, f->top_pos, 0);
1606 }
1589 } 1607 }
1590} 1608}
1591 1609
@@ -5479,6 +5497,19 @@ ns_term_shutdown (int sig)
5479 object:nil]; 5497 object:nil];
5480#endif 5498#endif
5481 5499
5500#ifdef NS_IMPL_COCOA
5501 if ([NSApp activationPolicy] == NSApplicationActivationPolicyProhibited) {
5502 /* Set the app's activation policy to regular when we run outside
5503 of a bundle. This is already done for us by Info.plist when we
5504 run inside a bundle. */
5505 [NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];
5506 [NSApp setApplicationIconImage:
5507 [EmacsImage
5508 allocInitFromFile:
5509 build_string("icons/hicolor/128x128/apps/emacs.png")]];
5510 }
5511#endif
5512
5482 ns_send_appdefined (-2); 5513 ns_send_appdefined (-2);
5483} 5514}
5484 5515
diff --git a/src/print.c b/src/print.c
index 50c75d7712c..12edf015892 100644
--- a/src/print.c
+++ b/src/print.c
@@ -566,7 +566,7 @@ temp_output_buffer_setup (const char *bufname)
566 566
567static void print (Lisp_Object, Lisp_Object, bool); 567static void print (Lisp_Object, Lisp_Object, bool);
568static void print_preprocess (Lisp_Object); 568static void print_preprocess (Lisp_Object);
569static void print_preprocess_string (INTERVAL, Lisp_Object); 569static void print_preprocess_string (INTERVAL, void *);
570static void print_object (Lisp_Object, Lisp_Object, bool); 570static void print_object (Lisp_Object, Lisp_Object, bool);
571 571
572DEFUN ("terpri", Fterpri, Sterpri, 0, 2, 0, 572DEFUN ("terpri", Fterpri, Sterpri, 0, 2, 0,
@@ -1214,7 +1214,7 @@ print_preprocess (Lisp_Object obj)
1214 case Lisp_String: 1214 case Lisp_String:
1215 /* A string may have text properties, which can be circular. */ 1215 /* A string may have text properties, which can be circular. */
1216 traverse_intervals_noorder (string_intervals (obj), 1216 traverse_intervals_noorder (string_intervals (obj),
1217 print_preprocess_string, Qnil); 1217 print_preprocess_string, NULL);
1218 break; 1218 break;
1219 1219
1220 case Lisp_Cons: 1220 case Lisp_Cons:
@@ -1263,7 +1263,7 @@ Fills `print-number-table'. */)
1263} 1263}
1264 1264
1265static void 1265static void
1266print_preprocess_string (INTERVAL interval, Lisp_Object arg) 1266print_preprocess_string (INTERVAL interval, void *arg)
1267{ 1267{
1268 print_preprocess (interval->plist); 1268 print_preprocess (interval->plist);
1269} 1269}
@@ -1748,7 +1748,7 @@ print_object (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag)
1748 char buf[max (sizeof "from..to..in " + 2 * INT_STRLEN_BOUND (EMACS_INT), 1748 char buf[max (sizeof "from..to..in " + 2 * INT_STRLEN_BOUND (EMACS_INT),
1749 max (sizeof " . #" + INT_STRLEN_BOUND (printmax_t), 1749 max (sizeof " . #" + INT_STRLEN_BOUND (printmax_t),
1750 40))]; 1750 40))];
1751 1751 current_thread->stack_top = buf;
1752 maybe_quit (); 1752 maybe_quit ();
1753 1753
1754 /* Detect circularities and truncate them. */ 1754 /* Detect circularities and truncate them. */
diff --git a/src/process.c b/src/process.c
index abd017bb907..19009515336 100644
--- a/src/process.c
+++ b/src/process.c
@@ -951,7 +951,7 @@ DEFUN ("get-process", Fget_process, Sget_process, 1, 1, 0,
951 if (PROCESSP (name)) 951 if (PROCESSP (name))
952 return name; 952 return name;
953 CHECK_STRING (name); 953 CHECK_STRING (name);
954 return Fcdr (Fassoc (name, Vprocess_alist)); 954 return Fcdr (Fassoc (name, Vprocess_alist, Qnil));
955} 955}
956 956
957/* This is how commands for the user decode process arguments. It 957/* This is how commands for the user decode process arguments. It
diff --git a/src/sysdep.c b/src/sysdep.c
index b52236769e0..db99f53299c 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -1772,7 +1772,7 @@ stack_overflow (siginfo_t *siginfo)
1772 /* The known top and bottom of the stack. The actual stack may 1772 /* The known top and bottom of the stack. The actual stack may
1773 extend a bit beyond these boundaries. */ 1773 extend a bit beyond these boundaries. */
1774 char *bot = stack_bottom; 1774 char *bot = stack_bottom;
1775 char *top = near_C_stack_top (); 1775 char *top = current_thread->stack_top;
1776 1776
1777 /* Log base 2 of the stack heuristic ratio. This ratio is the size 1777 /* Log base 2 of the stack heuristic ratio. This ratio is the size
1778 of the known stack divided by the size of the guard area past the 1778 of the known stack divided by the size of the guard area past the
diff --git a/src/term.c b/src/term.c
index 3d7f4ada0b9..87a412666d0 100644
--- a/src/term.c
+++ b/src/term.c
@@ -1585,10 +1585,16 @@ produce_glyphs (struct it *it)
1585 { 1585 {
1586 int absolute_x = (it->current_x 1586 int absolute_x = (it->current_x
1587 + it->continuation_lines_width); 1587 + it->continuation_lines_width);
1588 int x0 = absolute_x;
1589 /* Adjust for line numbers. */
1590 if (!NILP (Vdisplay_line_numbers))
1591 absolute_x -= it->lnum_pixel_width;
1588 int next_tab_x 1592 int next_tab_x
1589 = (((1 + absolute_x + it->tab_width - 1) 1593 = (((1 + absolute_x + it->tab_width - 1)
1590 / it->tab_width) 1594 / it->tab_width)
1591 * it->tab_width); 1595 * it->tab_width);
1596 if (!NILP (Vdisplay_line_numbers))
1597 next_tab_x += it->lnum_pixel_width;
1592 int nspaces; 1598 int nspaces;
1593 1599
1594 /* If part of the TAB has been displayed on the previous line 1600 /* If part of the TAB has been displayed on the previous line
@@ -1596,7 +1602,7 @@ produce_glyphs (struct it *it)
1596 been incremented already by the part that fitted on the 1602 been incremented already by the part that fitted on the
1597 continued line. So, we will get the right number of spaces 1603 continued line. So, we will get the right number of spaces
1598 here. */ 1604 here. */
1599 nspaces = next_tab_x - absolute_x; 1605 nspaces = next_tab_x - x0;
1600 1606
1601 if (it->glyph_row) 1607 if (it->glyph_row)
1602 { 1608 {
diff --git a/src/thread.c b/src/thread.c
index e3787971a53..1f7ced386d3 100644
--- a/src/thread.c
+++ b/src/thread.c
@@ -595,14 +595,15 @@ thread_select (select_func *func, int max_fds, fd_set *rfds,
595static void 595static void
596mark_one_thread (struct thread_state *thread) 596mark_one_thread (struct thread_state *thread)
597{ 597{
598 struct handler *handler; 598 /* Get the stack top now, in case mark_specpdl changes it. */
599 Lisp_Object tem; 599 void *stack_top = thread->stack_top;
600 600
601 mark_specpdl (thread->m_specpdl, thread->m_specpdl_ptr); 601 mark_specpdl (thread->m_specpdl, thread->m_specpdl_ptr);
602 602
603 mark_stack (thread->m_stack_bottom, thread->stack_top); 603 mark_stack (thread->m_stack_bottom, stack_top);
604 604
605 for (handler = thread->m_handlerlist; handler; handler = handler->next) 605 for (struct handler *handler = thread->m_handlerlist;
606 handler; handler = handler->next)
606 { 607 {
607 mark_object (handler->tag_or_ch); 608 mark_object (handler->tag_or_ch);
608 mark_object (handler->val); 609 mark_object (handler->val);
@@ -610,6 +611,7 @@ mark_one_thread (struct thread_state *thread)
610 611
611 if (thread->m_current_buffer) 612 if (thread->m_current_buffer)
612 { 613 {
614 Lisp_Object tem;
613 XSETBUFFER (tem, thread->m_current_buffer); 615 XSETBUFFER (tem, thread->m_current_buffer);
614 mark_object (tem); 616 mark_object (tem);
615 } 617 }
diff --git a/src/thread.h b/src/thread.h
index 9e94de5c175..52b16f1ba83 100644
--- a/src/thread.h
+++ b/src/thread.h
@@ -62,8 +62,14 @@ struct thread_state
62 char *m_stack_bottom; 62 char *m_stack_bottom;
63#define stack_bottom (current_thread->m_stack_bottom) 63#define stack_bottom (current_thread->m_stack_bottom)
64 64
65 /* An address near the top of the stack. */ 65 /* The address of an object near the C stack top, used to determine
66 char *stack_top; 66 which words need to be scanned by the garbage collector. This is
67 also used to detect heuristically whether segmentation violation
68 address indicates stack overflow, as opposed to some internal
69 error in Emacs. If the C function F calls G which calls H which
70 calls ... F, then at least one of the functions in the chain
71 should set this to the address of a local variable. */
72 void *stack_top;
67 73
68 struct catchtag *m_catchlist; 74 struct catchtag *m_catchlist;
69#define catchlist (current_thread->m_catchlist) 75#define catchlist (current_thread->m_catchlist)
diff --git a/src/w32fns.c b/src/w32fns.c
index b0842b5ee6c..457599fce0e 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -467,7 +467,7 @@ if the entry is new. */)
467 block_input (); 467 block_input ();
468 468
469 /* replace existing entry in w32-color-map or add new entry. */ 469 /* replace existing entry in w32-color-map or add new entry. */
470 entry = Fassoc (name, Vw32_color_map); 470 entry = Fassoc (name, Vw32_color_map, Qnil);
471 if (NILP (entry)) 471 if (NILP (entry))
472 { 472 {
473 entry = Fcons (name, rgb); 473 entry = Fcons (name, rgb);
diff --git a/src/w32font.c b/src/w32font.c
index 67d2f6d666d..314d7acdcc6 100644
--- a/src/w32font.c
+++ b/src/w32font.c
@@ -1627,7 +1627,7 @@ x_to_w32_charset (char * lpcs)
1627 Format of each entry is 1627 Format of each entry is
1628 (CHARSET_NAME . (WINDOWS_CHARSET . CODEPAGE)). 1628 (CHARSET_NAME . (WINDOWS_CHARSET . CODEPAGE)).
1629 */ 1629 */
1630 this_entry = Fassoc (build_string (charset), Vw32_charset_info_alist); 1630 this_entry = Fassoc (build_string (charset), Vw32_charset_info_alist, Qnil);
1631 1631
1632 if (NILP (this_entry)) 1632 if (NILP (this_entry))
1633 { 1633 {
diff --git a/src/w32notify.c b/src/w32notify.c
index 25205816bae..e8bdef8bdd3 100644
--- a/src/w32notify.c
+++ b/src/w32notify.c
@@ -642,7 +642,7 @@ WATCH-DESCRIPTOR should be an object returned by `w32notify-add-watch'. */)
642 /* Remove the watch object from watch list. Do this before freeing 642 /* Remove the watch object from watch list. Do this before freeing
643 the object, do that even if we fail to free it, watch_list is 643 the object, do that even if we fail to free it, watch_list is
644 kept free of junk. */ 644 kept free of junk. */
645 watch_object = Fassoc (watch_descriptor, watch_list); 645 watch_object = Fassoc (watch_descriptor, watch_list, Qnil);
646 if (!NILP (watch_object)) 646 if (!NILP (watch_object))
647 { 647 {
648 watch_list = Fdelete (watch_object, watch_list); 648 watch_list = Fdelete (watch_object, watch_list);
@@ -679,7 +679,7 @@ the watcher thread exits abnormally for any other reason. Removing the
679watch by calling `w32notify-rm-watch' also makes it invalid. */) 679watch by calling `w32notify-rm-watch' also makes it invalid. */)
680 (Lisp_Object watch_descriptor) 680 (Lisp_Object watch_descriptor)
681{ 681{
682 Lisp_Object watch_object = Fassoc (watch_descriptor, watch_list); 682 Lisp_Object watch_object = Fassoc (watch_descriptor, watch_list, Qnil);
683 683
684 if (!NILP (watch_object)) 684 if (!NILP (watch_object))
685 { 685 {
diff --git a/src/w32proc.c b/src/w32proc.c
index 0aa248a6f7b..76af55f9985 100644
--- a/src/w32proc.c
+++ b/src/w32proc.c
@@ -1622,38 +1622,43 @@ w32_executable_type (char * filename,
1622 /* Look for Cygwin DLL in the DLL import list. */ 1622 /* Look for Cygwin DLL in the DLL import list. */
1623 IMAGE_DATA_DIRECTORY import_dir = 1623 IMAGE_DATA_DIRECTORY import_dir =
1624 data_dir[IMAGE_DIRECTORY_ENTRY_IMPORT]; 1624 data_dir[IMAGE_DIRECTORY_ENTRY_IMPORT];
1625 IMAGE_IMPORT_DESCRIPTOR * imports =
1626 RVA_TO_PTR (import_dir.VirtualAddress,
1627 rva_to_section (import_dir.VirtualAddress,
1628 nt_header),
1629 executable);
1630 1625
1631 for ( ; imports->Name; imports++) 1626 /* Import directory can be missing in .NET DLLs. */
1632 { 1627 if (import_dir.VirtualAddress != 0)
1633 IMAGE_SECTION_HEADER * section = 1628 {
1634 rva_to_section (imports->Name, nt_header); 1629 IMAGE_IMPORT_DESCRIPTOR * imports =
1635 char * dllname = RVA_TO_PTR (imports->Name, section, 1630 RVA_TO_PTR (import_dir.VirtualAddress,
1636 executable); 1631 rva_to_section (import_dir.VirtualAddress,
1637 1632 nt_header),
1638 /* The exact name of the Cygwin DLL has changed with 1633 executable);
1639 various releases, but hopefully this will be 1634
1640 reasonably future-proof. */ 1635 for ( ; imports->Name; imports++)
1641 if (strncmp (dllname, "cygwin", 6) == 0)
1642 {
1643 *is_cygnus_app = TRUE;
1644 break;
1645 }
1646 else if (strncmp (dllname, "msys-", 5) == 0)
1647 { 1636 {
1648 /* This catches both MSYS 1.x and MSYS2 1637 IMAGE_SECTION_HEADER * section =
1649 executables (the DLL name is msys-1.0.dll and 1638 rva_to_section (imports->Name, nt_header);
1650 msys-2.0.dll, respectively). There doesn't 1639 char * dllname = RVA_TO_PTR (imports->Name, section,
1651 seem to be a reason to distinguish between 1640 executable);
1652 the two, for now. */ 1641
1653 *is_msys_app = TRUE; 1642 /* The exact name of the Cygwin DLL has changed with
1654 break; 1643 various releases, but hopefully this will be
1644 reasonably future-proof. */
1645 if (strncmp (dllname, "cygwin", 6) == 0)
1646 {
1647 *is_cygnus_app = TRUE;
1648 break;
1649 }
1650 else if (strncmp (dllname, "msys-", 5) == 0)
1651 {
1652 /* This catches both MSYS 1.x and MSYS2
1653 executables (the DLL name is msys-1.0.dll and
1654 msys-2.0.dll, respectively). There doesn't
1655 seem to be a reason to distinguish between
1656 the two, for now. */
1657 *is_msys_app = TRUE;
1658 break;
1659 }
1655 } 1660 }
1656 } 1661 }
1657 } 1662 }
1658 } 1663 }
1659 } 1664 }
diff --git a/src/w32term.c b/src/w32term.c
index c37805cb6ca..0f7bb9337f6 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -6110,7 +6110,7 @@ x_calc_absolute_position (struct frame *f)
6110 6110
6111 list = CDR(list); 6111 list = CDR(list);
6112 6112
6113 geometry = Fassoc (Qgeometry, attributes); 6113 geometry = Fassoc (Qgeometry, attributes, Qnil);
6114 if (!NILP (geometry)) 6114 if (!NILP (geometry))
6115 { 6115 {
6116 monitor_left = Fnth (make_number (1), geometry); 6116 monitor_left = Fnth (make_number (1), geometry);
diff --git a/src/xdisp.c b/src/xdisp.c
index 1c316fa4932..422912e57a6 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -290,6 +290,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
290#include <stdio.h> 290#include <stdio.h>
291#include <stdlib.h> 291#include <stdlib.h>
292#include <limits.h> 292#include <limits.h>
293#include <math.h>
293 294
294#include "lisp.h" 295#include "lisp.h"
295#include "atimer.h" 296#include "atimer.h"
@@ -324,7 +325,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
324#define FRAME_X_OUTPUT(f) ((f)->output_data.x) 325#define FRAME_X_OUTPUT(f) ((f)->output_data.x)
325#endif 326#endif
326 327
327#define INFINITY 10000000 328#define DISP_INFINITY 10000000
328 329
329/* Holds the list (error). */ 330/* Holds the list (error). */
330static Lisp_Object list_of_error; 331static Lisp_Object list_of_error;
@@ -832,6 +833,8 @@ static bool cursor_row_fully_visible_p (struct window *, bool, bool);
832static bool update_menu_bar (struct frame *, bool, bool); 833static bool update_menu_bar (struct frame *, bool, bool);
833static bool try_window_reusing_current_matrix (struct window *); 834static bool try_window_reusing_current_matrix (struct window *);
834static int try_window_id (struct window *); 835static int try_window_id (struct window *);
836static void maybe_produce_line_number (struct it *);
837static bool should_produce_line_number (struct it *);
835static bool display_line (struct it *, int); 838static bool display_line (struct it *, int);
836static int display_mode_lines (struct window *); 839static int display_mode_lines (struct window *);
837static int display_mode_line (struct window *, enum face_id, Lisp_Object); 840static int display_mode_line (struct window *, enum face_id, Lisp_Object);
@@ -843,6 +846,8 @@ static const char *decode_mode_spec (struct window *, int, int, Lisp_Object *);
843static void display_menu_bar (struct window *); 846static void display_menu_bar (struct window *);
844static ptrdiff_t display_count_lines (ptrdiff_t, ptrdiff_t, ptrdiff_t, 847static ptrdiff_t display_count_lines (ptrdiff_t, ptrdiff_t, ptrdiff_t,
845 ptrdiff_t *); 848 ptrdiff_t *);
849static void pint2str (register char *, register int, register ptrdiff_t);
850
846static int display_string (const char *, Lisp_Object, Lisp_Object, 851static int display_string (const char *, Lisp_Object, Lisp_Object,
847 ptrdiff_t, ptrdiff_t, struct it *, int, int, int, int); 852 ptrdiff_t, ptrdiff_t, struct it *, int, int, int, int);
848static void compute_line_metrics (struct it *); 853static void compute_line_metrics (struct it *);
@@ -1321,6 +1326,15 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y,
1321 if (charpos >= 0 && CHARPOS (top) > charpos) 1326 if (charpos >= 0 && CHARPOS (top) > charpos)
1322 return visible_p; 1327 return visible_p;
1323 1328
1329 /* Some Lisp hook could call us in the middle of redisplaying this
1330 very window. If, by some bad luck, we are retrying redisplay
1331 because we found that the mode-line height and/or header-line
1332 height needs to be updated, the assignment of mode_line_height
1333 and header_line_height below could disrupt that, due to the
1334 selected/nonselected window dance during mode-line display, and
1335 we could infloop. Avoid that. */
1336 int prev_mode_line_height = w->mode_line_height;
1337 int prev_header_line_height = w->header_line_height;
1324 /* Compute exact mode line heights. */ 1338 /* Compute exact mode line heights. */
1325 if (window_wants_mode_line (w)) 1339 if (window_wants_mode_line (w))
1326 { 1340 {
@@ -1667,6 +1681,10 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y,
1667 fprintf (stderr, "-pv pt=%d vs=%d\n", charpos, w->vscroll); 1681 fprintf (stderr, "-pv pt=%d vs=%d\n", charpos, w->vscroll);
1668#endif 1682#endif
1669 1683
1684 /* Restore potentially overwritten values. */
1685 w->mode_line_height = prev_mode_line_height;
1686 w->header_line_height = prev_header_line_height;
1687
1670 return visible_p; 1688 return visible_p;
1671} 1689}
1672 1690
@@ -6764,7 +6782,7 @@ reseat_to_string (struct it *it, const char *s, Lisp_Object string,
6764 FIELD_WIDTH < 0 means infinite field width. This is useful for 6782 FIELD_WIDTH < 0 means infinite field width. This is useful for
6765 padding with `-' at the end of a mode line. */ 6783 padding with `-' at the end of a mode line. */
6766 if (field_width < 0) 6784 if (field_width < 0)
6767 field_width = INFINITY; 6785 field_width = DISP_INFINITY;
6768 /* Implementation note: We deliberately don't enlarge 6786 /* Implementation note: We deliberately don't enlarge
6769 it->bidi_it.string.schars here to fit it->end_charpos, because 6787 it->bidi_it.string.schars here to fit it->end_charpos, because
6770 the bidi iterator cannot produce characters out of thin air. */ 6788 the bidi iterator cannot produce characters out of thin air. */
@@ -8613,6 +8631,7 @@ move_it_in_display_line_to (struct it *it,
8613 ptrdiff_t closest_pos UNINIT; 8631 ptrdiff_t closest_pos UNINIT;
8614 ptrdiff_t prev_pos = IT_CHARPOS (*it); 8632 ptrdiff_t prev_pos = IT_CHARPOS (*it);
8615 bool saw_smaller_pos = prev_pos < to_charpos; 8633 bool saw_smaller_pos = prev_pos < to_charpos;
8634 bool line_number_pending = false;
8616 8635
8617 /* Don't produce glyphs in produce_glyphs. */ 8636 /* Don't produce glyphs in produce_glyphs. */
8618 saved_glyph_row = it->glyph_row; 8637 saved_glyph_row = it->glyph_row;
@@ -8661,9 +8680,20 @@ move_it_in_display_line_to (struct it *it,
8661 || (it->method == GET_FROM_DISPLAY_VECTOR \ 8680 || (it->method == GET_FROM_DISPLAY_VECTOR \
8662 && it->dpvec + it->current.dpvec_index + 1 >= it->dpend))) 8681 && it->dpvec + it->current.dpvec_index + 1 >= it->dpend)))
8663 8682
8664 /* If there's a line-/wrap-prefix, handle it. */ 8683 if (it->hpos == 0)
8665 if (it->hpos == 0 && it->method == GET_FROM_BUFFER) 8684 {
8666 handle_line_prefix (it); 8685 /* If line numbers are being displayed, produce a line number. */
8686 if (should_produce_line_number (it))
8687 {
8688 if (it->current_x == it->first_visible_x)
8689 maybe_produce_line_number (it);
8690 else
8691 line_number_pending = true;
8692 }
8693 /* If there's a line-/wrap-prefix, handle it. */
8694 if (it->method == GET_FROM_BUFFER)
8695 handle_line_prefix (it);
8696 }
8667 8697
8668 if (IT_CHARPOS (*it) < CHARPOS (this_line_min_pos)) 8698 if (IT_CHARPOS (*it) < CHARPOS (this_line_min_pos))
8669 SET_TEXT_POS (this_line_min_pos, IT_CHARPOS (*it), IT_BYTEPOS (*it)); 8699 SET_TEXT_POS (this_line_min_pos, IT_CHARPOS (*it), IT_BYTEPOS (*it));
@@ -9030,6 +9060,15 @@ move_it_in_display_line_to (struct it *it,
9030 9060
9031 if (new_x > it->first_visible_x) 9061 if (new_x > it->first_visible_x)
9032 { 9062 {
9063 /* If we have reached the visible portion of the
9064 screen line, produce the line number if needed. */
9065 if (line_number_pending)
9066 {
9067 line_number_pending = false;
9068 it->current_x = it->first_visible_x;
9069 maybe_produce_line_number (it);
9070 it->current_x += new_x - it->first_visible_x;
9071 }
9033 /* Glyph is visible. Increment number of glyphs that 9072 /* Glyph is visible. Increment number of glyphs that
9034 would be displayed. */ 9073 would be displayed. */
9035 ++it->hpos; 9074 ++it->hpos;
@@ -13069,6 +13108,43 @@ hscroll_window_tree (Lisp_Object window)
13069 } 13108 }
13070 bool row_r2l_p = cursor_row->reversed_p; 13109 bool row_r2l_p = cursor_row->reversed_p;
13071 bool hscl = hscrolling_current_line_p (w); 13110 bool hscl = hscrolling_current_line_p (w);
13111 int x_offset = 0;
13112 /* When line numbers are displayed, we need to account for
13113 the horizontal space they consume. */
13114 if (!NILP (Vdisplay_line_numbers))
13115 {
13116 struct glyph *g;
13117 if (!row_r2l_p)
13118 {
13119 for (g = cursor_row->glyphs[TEXT_AREA];
13120 g < cursor_row->glyphs[TEXT_AREA]
13121 + cursor_row->used[TEXT_AREA];
13122 g++)
13123 {
13124 if (!(NILP (g->object) && g->charpos < 0))
13125 break;
13126 x_offset += g->pixel_width;
13127 }
13128 }
13129 else
13130 {
13131 for (g = cursor_row->glyphs[TEXT_AREA]
13132 + cursor_row->used[TEXT_AREA];
13133 g > cursor_row->glyphs[TEXT_AREA];
13134 g--)
13135 {
13136 if (!(NILP ((g - 1)->object) && (g - 1)->charpos < 0))
13137 break;
13138 x_offset += (g - 1)->pixel_width;
13139 }
13140 }
13141 }
13142 if (cursor_row->truncated_on_left_p)
13143 {
13144 /* On TTY frames, don't count the left truncation glyph. */
13145 struct frame *f = XFRAME (WINDOW_FRAME (w));
13146 x_offset -= (FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f));
13147 }
13072 13148
13073 text_area_width = window_box_width (w, TEXT_AREA); 13149 text_area_width = window_box_width (w, TEXT_AREA);
13074 13150
@@ -13101,7 +13177,7 @@ hscroll_window_tree (Lisp_Object window)
13101 inside the left margin and the window is already 13177 inside the left margin and the window is already
13102 hscrolled. */ 13178 hscrolled. */
13103 && ((!row_r2l_p 13179 && ((!row_r2l_p
13104 && ((w->hscroll && w->cursor.x <= h_margin) 13180 && ((w->hscroll && w->cursor.x <= h_margin + x_offset)
13105 || (cursor_row->enabled_p 13181 || (cursor_row->enabled_p
13106 && cursor_row->truncated_on_right_p 13182 && cursor_row->truncated_on_right_p
13107 && (w->cursor.x >= text_area_width - h_margin)))) 13183 && (w->cursor.x >= text_area_width - h_margin))))
@@ -13119,7 +13195,8 @@ hscroll_window_tree (Lisp_Object window)
13119 && cursor_row->truncated_on_right_p 13195 && cursor_row->truncated_on_right_p
13120 && w->cursor.x <= h_margin) 13196 && w->cursor.x <= h_margin)
13121 || (w->hscroll 13197 || (w->hscroll
13122 && (w->cursor.x >= text_area_width - h_margin)))) 13198 && (w->cursor.x >= (text_area_width - h_margin
13199 - x_offset)))))
13123 /* This last condition is needed when moving 13200 /* This last condition is needed when moving
13124 vertically from an hscrolled line to a short line 13201 vertically from an hscrolled line to a short line
13125 that doesn't need to be hscrolled. If we omit 13202 that doesn't need to be hscrolled. If we omit
@@ -13150,7 +13227,7 @@ hscroll_window_tree (Lisp_Object window)
13150 if (hscl) 13227 if (hscl)
13151 it.first_visible_x = window_hscroll_limited (w, it.f) 13228 it.first_visible_x = window_hscroll_limited (w, it.f)
13152 * FRAME_COLUMN_WIDTH (it.f); 13229 * FRAME_COLUMN_WIDTH (it.f);
13153 it.last_visible_x = INFINITY; 13230 it.last_visible_x = DISP_INFINITY;
13154 move_it_in_display_line_to (&it, pt, -1, MOVE_TO_POS); 13231 move_it_in_display_line_to (&it, pt, -1, MOVE_TO_POS);
13155 /* If the line ends in an overlay string with a newline, 13232 /* If the line ends in an overlay string with a newline,
13156 we might infloop, because displaying the window will 13233 we might infloop, because displaying the window will
@@ -14796,15 +14873,12 @@ set_cursor_from_row (struct window *w, struct glyph_row *row,
14796 while (glyph > end + 1 14873 while (glyph > end + 1
14797 && NILP (glyph->object) 14874 && NILP (glyph->object)
14798 && glyph->charpos < 0) 14875 && glyph->charpos < 0)
14799 { 14876 --glyph;
14800 --glyph;
14801 x -= glyph->pixel_width;
14802 }
14803 if (NILP (glyph->object) && glyph->charpos < 0) 14877 if (NILP (glyph->object) && glyph->charpos < 0)
14804 --glyph; 14878 --glyph;
14805 /* By default, in reversed rows we put the cursor on the 14879 /* By default, in reversed rows we put the cursor on the
14806 rightmost (first in the reading order) glyph. */ 14880 rightmost (first in the reading order) glyph. */
14807 for (g = end + 1; g < glyph; g++) 14881 for (x = 0, g = end + 1; g < glyph; g++)
14808 x += g->pixel_width; 14882 x += g->pixel_width;
14809 while (end < glyph 14883 while (end < glyph
14810 && NILP ((end + 1)->object) 14884 && NILP ((end + 1)->object)
@@ -15835,7 +15909,7 @@ compute_window_start_on_continuation_line (struct window *w)
15835 So, we're looking for the display line start with the 15909 So, we're looking for the display line start with the
15836 minimum distance from the old window start. */ 15910 minimum distance from the old window start. */
15837 pos_before_pt = pos = it.current.pos; 15911 pos_before_pt = pos = it.current.pos;
15838 min_distance = INFINITY; 15912 min_distance = DISP_INFINITY;
15839 while ((distance = eabs (CHARPOS (start_pos) - IT_CHARPOS (it))), 15913 while ((distance = eabs (CHARPOS (start_pos) - IT_CHARPOS (it))),
15840 distance < min_distance) 15914 distance < min_distance)
15841 { 15915 {
@@ -15941,6 +16015,17 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp,
15941 && !windows_or_buffers_changed 16015 && !windows_or_buffers_changed
15942 && !f->cursor_type_changed 16016 && !f->cursor_type_changed
15943 && NILP (Vshow_trailing_whitespace) 16017 && NILP (Vshow_trailing_whitespace)
16018 /* When display-line-numbers is in relative mode, moving point
16019 requires to redraw the entire window. */
16020 && !EQ (Vdisplay_line_numbers, Qrelative)
16021 && !EQ (Vdisplay_line_numbers, Qvisual)
16022 /* When the current line number should be displayed in a
16023 distinct face, moving point cannot be handled in optimized
16024 way as below. */
16025 && !(!NILP (Vdisplay_line_numbers)
16026 && NILP (Finternal_lisp_face_equal_p (Qline_number,
16027 Qline_number_current_line,
16028 w->frame)))
15944 /* This code is not used for mini-buffer for the sake of the case 16029 /* This code is not used for mini-buffer for the sake of the case
15945 of redisplaying to replace an echo area message; since in 16030 of redisplaying to replace an echo area message; since in
15946 that case the mini-buffer contents per se are usually 16031 that case the mini-buffer contents per se are usually
@@ -16788,10 +16873,15 @@ redisplay_window (Lisp_Object window, bool just_this_one_p)
16788 XBUFFER (w->contents)->text->redisplay = false; 16873 XBUFFER (w->contents)->text->redisplay = false;
16789 safe__call1 (true, Vpre_redisplay_function, Fcons (window, Qnil)); 16874 safe__call1 (true, Vpre_redisplay_function, Fcons (window, Qnil));
16790 16875
16791 if (w->redisplay || XBUFFER (w->contents)->text->redisplay) 16876 if (w->redisplay || XBUFFER (w->contents)->text->redisplay
16877 || ((EQ (Vdisplay_line_numbers, Qrelative)
16878 || EQ (Vdisplay_line_numbers, Qvisual))
16879 && row != MATRIX_FIRST_TEXT_ROW (w->desired_matrix)))
16792 { 16880 {
16793 /* pre-redisplay-function made changes (e.g. move the region) 16881 /* Either pre-redisplay-function made changes (e.g. move
16794 that require another round of redisplay. */ 16882 the region), or we moved point in a window that is
16883 under display-line-numbers = relative mode. We need
16884 another round of redisplay. */
16795 clear_glyph_matrix (w->desired_matrix); 16885 clear_glyph_matrix (w->desired_matrix);
16796 if (!try_window (window, startp, 0)) 16886 if (!try_window (window, startp, 0))
16797 goto need_larger_matrices; 16887 goto need_larger_matrices;
@@ -17592,15 +17682,21 @@ try_window_reusing_current_matrix (struct window *w)
17592 if (w->vscroll || MATRIX_ROW_PARTIALLY_VISIBLE_P (w, start_row)) 17682 if (w->vscroll || MATRIX_ROW_PARTIALLY_VISIBLE_P (w, start_row))
17593 return false; 17683 return false;
17594 17684
17685 /* Clear the desired matrix for the display below. */
17686 clear_glyph_matrix (w->desired_matrix);
17687
17688 /* Give up if line numbers are being displayed, because reusing the
17689 current matrix might use the wrong width for line-number
17690 display. */
17691 if (!NILP (Vdisplay_line_numbers))
17692 return false;
17693
17595 /* The variable new_start now holds the new window start. The old 17694 /* The variable new_start now holds the new window start. The old
17596 start `start' can be determined from the current matrix. */ 17695 start `start' can be determined from the current matrix. */
17597 SET_TEXT_POS_FROM_MARKER (new_start, w->start); 17696 SET_TEXT_POS_FROM_MARKER (new_start, w->start);
17598 start = start_row->minpos; 17697 start = start_row->minpos;
17599 start_vpos = MATRIX_ROW_VPOS (start_row, w->current_matrix); 17698 start_vpos = MATRIX_ROW_VPOS (start_row, w->current_matrix);
17600 17699
17601 /* Clear the desired matrix for the display below. */
17602 clear_glyph_matrix (w->desired_matrix);
17603
17604 if (CHARPOS (new_start) <= CHARPOS (start)) 17700 if (CHARPOS (new_start) <= CHARPOS (start))
17605 { 17701 {
17606 /* Don't use this method if the display starts with an ellipsis 17702 /* Don't use this method if the display starts with an ellipsis
@@ -18423,6 +18519,16 @@ try_window_id (struct window *w)
18423 if (!NILP (BVAR (XBUFFER (w->contents), extra_line_spacing))) 18519 if (!NILP (BVAR (XBUFFER (w->contents), extra_line_spacing)))
18424 GIVE_UP (23); 18520 GIVE_UP (23);
18425 18521
18522 /* Give up if display-line-numbers is in relative mode, or when the
18523 current line's number needs to be displayed in a distinct face. */
18524 if (EQ (Vdisplay_line_numbers, Qrelative)
18525 || EQ (Vdisplay_line_numbers, Qvisual)
18526 || (!NILP (Vdisplay_line_numbers)
18527 && NILP (Finternal_lisp_face_equal_p (Qline_number,
18528 Qline_number_current_line,
18529 w->frame))))
18530 GIVE_UP (24);
18531
18426 /* Make sure beg_unchanged and end_unchanged are up to date. Do it 18532 /* Make sure beg_unchanged and end_unchanged are up to date. Do it
18427 only if buffer has really changed. The reason is that the gap is 18533 only if buffer has really changed. The reason is that the gap is
18428 initially at Z for freshly visited files. The code below would 18534 initially at Z for freshly visited files. The code below would
@@ -19070,7 +19176,7 @@ dump_glyph (struct glyph_row *row, struct glyph *glyph, int area)
19070 || glyph->type == GLYPHLESS_GLYPH) 19176 || glyph->type == GLYPHLESS_GLYPH)
19071 { 19177 {
19072 fprintf (stderr, 19178 fprintf (stderr,
19073 " %5"pD"d %c %9"pI"d %c %3d 0x%06x %c %4d %1.1d%1.1d\n", 19179 " %5"pD"d %c %9"pD"d %c %3d 0x%06x %c %4d %1.1d%1.1d\n",
19074 glyph - row->glyphs[TEXT_AREA], 19180 glyph - row->glyphs[TEXT_AREA],
19075 (glyph->type == CHAR_GLYPH 19181 (glyph->type == CHAR_GLYPH
19076 ? 'C' 19182 ? 'C'
@@ -19095,7 +19201,7 @@ dump_glyph (struct glyph_row *row, struct glyph *glyph, int area)
19095 else if (glyph->type == STRETCH_GLYPH) 19201 else if (glyph->type == STRETCH_GLYPH)
19096 { 19202 {
19097 fprintf (stderr, 19203 fprintf (stderr,
19098 " %5"pD"d %c %9"pI"d %c %3d 0x%06x %c %4d %1.1d%1.1d\n", 19204 " %5"pD"d %c %9"pD"d %c %3d 0x%06x %c %4d %1.1d%1.1d\n",
19099 glyph - row->glyphs[TEXT_AREA], 19205 glyph - row->glyphs[TEXT_AREA],
19100 'S', 19206 'S',
19101 glyph->charpos, 19207 glyph->charpos,
@@ -19116,7 +19222,7 @@ dump_glyph (struct glyph_row *row, struct glyph *glyph, int area)
19116 else if (glyph->type == IMAGE_GLYPH) 19222 else if (glyph->type == IMAGE_GLYPH)
19117 { 19223 {
19118 fprintf (stderr, 19224 fprintf (stderr,
19119 " %5"pD"d %c %9"pI"d %c %3d 0x%06x %c %4d %1.1d%1.1d\n", 19225 " %5"pD"d %c %9"pD"d %c %3d 0x%06x %c %4d %1.1d%1.1d\n",
19120 glyph - row->glyphs[TEXT_AREA], 19226 glyph - row->glyphs[TEXT_AREA],
19121 'I', 19227 'I',
19122 glyph->charpos, 19228 glyph->charpos,
@@ -19137,7 +19243,7 @@ dump_glyph (struct glyph_row *row, struct glyph *glyph, int area)
19137 else if (glyph->type == COMPOSITE_GLYPH) 19243 else if (glyph->type == COMPOSITE_GLYPH)
19138 { 19244 {
19139 fprintf (stderr, 19245 fprintf (stderr,
19140 " %5"pD"d %c %9"pI"d %c %3d 0x%06x", 19246 " %5"pD"d %c %9"pD"d %c %3d 0x%06x",
19141 glyph - row->glyphs[TEXT_AREA], 19247 glyph - row->glyphs[TEXT_AREA],
19142 '+', 19248 '+',
19143 glyph->charpos, 19249 glyph->charpos,
@@ -19198,7 +19304,7 @@ dump_glyph_row (struct glyph_row *row, int vpos, int glyphs)
19198 fprintf (stderr, "Row Start End Used oE><\\CTZFesm X Y W H V A P\n"); 19304 fprintf (stderr, "Row Start End Used oE><\\CTZFesm X Y W H V A P\n");
19199 fprintf (stderr, "==============================================================================\n"); 19305 fprintf (stderr, "==============================================================================\n");
19200 19306
19201 fprintf (stderr, "%3d %9"pI"d %9"pI"d %4d %1.1d%1.1d%1.1d%1.1d\ 19307 fprintf (stderr, "%3d %9"pD"d %9"pD"d %4d %1.1d%1.1d%1.1d%1.1d\
19202%1.1d%1.1d%1.1d%1.1d%1.1d%1.1d%1.1d%1.1d %4d %4d %4d %4d %4d %4d %4d\n", 19308%1.1d%1.1d%1.1d%1.1d%1.1d%1.1d%1.1d%1.1d %4d %4d %4d %4d %4d %4d %4d\n",
19203 vpos, 19309 vpos,
19204 MATRIX_ROW_START_CHARPOS (row), 19310 MATRIX_ROW_START_CHARPOS (row),
@@ -19227,7 +19333,7 @@ dump_glyph_row (struct glyph_row *row, int vpos, int glyphs)
19227 fprintf (stderr, " %9"pD"d %9"pD"d\t%5d\n", row->start.overlay_string_index, 19333 fprintf (stderr, " %9"pD"d %9"pD"d\t%5d\n", row->start.overlay_string_index,
19228 row->end.overlay_string_index, 19334 row->end.overlay_string_index,
19229 row->continuation_lines_width); 19335 row->continuation_lines_width);
19230 fprintf (stderr, " %9"pI"d %9"pI"d\n", 19336 fprintf (stderr, " %9"pD"d %9"pD"d\n",
19231 CHARPOS (row->start.string_pos), 19337 CHARPOS (row->start.string_pos),
19232 CHARPOS (row->end.string_pos)); 19338 CHARPOS (row->end.string_pos));
19233 fprintf (stderr, " %9d %9d\n", row->start.dpvec_index, 19339 fprintf (stderr, " %9d %9d\n", row->start.dpvec_index,
@@ -19304,7 +19410,7 @@ with numeric argument, its value is passed as the GLYPHS flag. */)
19304 struct window *w = XWINDOW (selected_window); 19410 struct window *w = XWINDOW (selected_window);
19305 struct buffer *buffer = XBUFFER (w->contents); 19411 struct buffer *buffer = XBUFFER (w->contents);
19306 19412
19307 fprintf (stderr, "PT = %"pI"d, BEGV = %"pI"d. ZV = %"pI"d\n", 19413 fprintf (stderr, "PT = %"pD"d, BEGV = %"pD"d. ZV = %"pD"d\n",
19308 BUF_PT (buffer), BUF_BEGV (buffer), BUF_ZV (buffer)); 19414 BUF_PT (buffer), BUF_BEGV (buffer), BUF_ZV (buffer));
19309 fprintf (stderr, "Cursor x = %d, y = %d, hpos = %d, vpos = %d\n", 19415 fprintf (stderr, "Cursor x = %d, y = %d, hpos = %d, vpos = %d\n",
19310 w->cursor.x, w->cursor.y, w->cursor.hpos, w->cursor.vpos); 19416 w->cursor.x, w->cursor.y, w->cursor.hpos, w->cursor.vpos);
@@ -20669,6 +20775,366 @@ find_row_edges (struct it *it, struct glyph_row *row,
20669 row->maxpos = it->current.pos; 20775 row->maxpos = it->current.pos;
20670} 20776}
20671 20777
20778/* Like display_count_lines, but capable of counting outside of the
20779 current narrowed region. */
20780static ptrdiff_t
20781display_count_lines_logically (ptrdiff_t start_byte, ptrdiff_t limit_byte,
20782 ptrdiff_t count, ptrdiff_t *byte_pos_ptr)
20783{
20784 if (!display_line_numbers_widen || (BEGV == BEG && ZV == Z))
20785 return display_count_lines (start_byte, limit_byte, count, byte_pos_ptr);
20786
20787 ptrdiff_t val;
20788 ptrdiff_t pdl_count = SPECPDL_INDEX ();
20789 record_unwind_protect (save_restriction_restore, save_restriction_save ());
20790 Fwiden ();
20791 val = display_count_lines (start_byte, limit_byte, count, byte_pos_ptr);
20792 unbind_to (pdl_count, Qnil);
20793 return val;
20794}
20795
20796/* Count the number of screen lines in window IT->w between character
20797 position IT_CHARPOS(*IT) and the line showing that window's point. */
20798static ptrdiff_t
20799display_count_lines_visually (struct it *it)
20800{
20801 struct it tem_it;
20802 ptrdiff_t to;
20803 struct text_pos from;
20804
20805 /* If we already calculated a relative line number, use that. This
20806 trick relies on the fact that visual lines (a.k.a. "glyph rows")
20807 are laid out sequentially, one by one, for each sequence of calls
20808 to display_line or other similar function that follows a call to
20809 init_iterator. */
20810 if (it->lnum_bytepos > 0)
20811 return it->lnum + 1;
20812 else
20813 {
20814 ptrdiff_t count = SPECPDL_INDEX ();
20815
20816 if (IT_CHARPOS (*it) <= PT)
20817 {
20818 from = it->current.pos;
20819 to = PT;
20820 }
20821 else
20822 {
20823 SET_TEXT_POS (from, PT, PT_BYTE);
20824 to = IT_CHARPOS (*it);
20825 }
20826 start_display (&tem_it, it->w, from);
20827 /* Need to disable visual mode temporarily, since otherwise the
20828 call to move_it_to will cause infinite recursion. */
20829 specbind (Qdisplay_line_numbers, Qrelative);
20830 /* Some redisplay optimizations could invoke us very far from
20831 PT, which will make the caller painfully slow. There should
20832 be no need to go too far beyond the window's bottom, as any
20833 such optimization will fail to show point anyway. */
20834 move_it_to (&tem_it, to, -1,
20835 tem_it.last_visible_y
20836 + (SCROLL_LIMIT + 10) * FRAME_LINE_HEIGHT (tem_it.f),
20837 -1, MOVE_TO_POS | MOVE_TO_Y);
20838 unbind_to (count, Qnil);
20839 return IT_CHARPOS (*it) <= PT ? -tem_it.vpos : tem_it.vpos;
20840 }
20841}
20842
20843/* Produce the line-number glyphs for the current glyph_row. If
20844 IT->glyph_row is non-NULL, populate the row with the produced
20845 glyphs. */
20846static void
20847maybe_produce_line_number (struct it *it)
20848{
20849 ptrdiff_t last_line = it->lnum;
20850 ptrdiff_t start_from, bytepos;
20851 ptrdiff_t this_line;
20852 bool first_time = false;
20853 ptrdiff_t beg_byte = display_line_numbers_widen ? BEG_BYTE : BEGV_BYTE;
20854 ptrdiff_t z_byte = display_line_numbers_widen ? Z_BYTE : ZV_BYTE;
20855 void *itdata = bidi_shelve_cache ();
20856
20857 if (EQ (Vdisplay_line_numbers, Qvisual))
20858 this_line = display_count_lines_visually (it);
20859 else
20860 {
20861 if (!last_line)
20862 {
20863 /* If possible, reuse data cached by line-number-mode. */
20864 if (it->w->base_line_number > 0
20865 && it->w->base_line_pos > 0
20866 && it->w->base_line_pos <= IT_CHARPOS (*it)
20867 /* line-number-mode always displays narrowed line
20868 numbers, so we cannot use its data if the user wants
20869 line numbers that disregard narrowing. */
20870 && !(display_line_numbers_widen
20871 && (BEG_BYTE != BEGV_BYTE || Z_BYTE != ZV_BYTE)))
20872 {
20873 start_from = CHAR_TO_BYTE (it->w->base_line_pos);
20874 last_line = it->w->base_line_number - 1;
20875 }
20876 else
20877 start_from = beg_byte;
20878 if (!it->lnum_bytepos)
20879 first_time = true;
20880 }
20881 else
20882 start_from = it->lnum_bytepos;
20883
20884 /* Paranoia: what if someone changes the narrowing since the
20885 last time display_line was called? Shouldn't really happen,
20886 but who knows what some crazy Lisp invoked by :eval could do? */
20887 if (!(beg_byte <= start_from && start_from <= z_byte))
20888 {
20889 last_line = 0;
20890 start_from = beg_byte;
20891 }
20892
20893 this_line =
20894 last_line + display_count_lines_logically (start_from,
20895 IT_BYTEPOS (*it),
20896 IT_CHARPOS (*it), &bytepos);
20897 eassert (this_line > 0 || (this_line == 0 && start_from == beg_byte));
20898 eassert (bytepos == IT_BYTEPOS (*it));
20899 }
20900
20901 /* Record the line number information. */
20902 if (this_line != last_line || !it->lnum_bytepos)
20903 {
20904 it->lnum = this_line;
20905 it->lnum_bytepos = IT_BYTEPOS (*it);
20906 }
20907
20908 /* Produce the glyphs for the line number. */
20909 struct it tem_it;
20910 char lnum_buf[INT_STRLEN_BOUND (ptrdiff_t) + 1];
20911 bool beyond_zv = IT_BYTEPOS (*it) >= ZV_BYTE ? true : false;
20912 ptrdiff_t lnum_offset = -1; /* to produce 1-based line numbers */
20913 int lnum_face_id = merge_faces (it->f, Qline_number, 0, DEFAULT_FACE_ID);
20914 int current_lnum_face_id
20915 = merge_faces (it->f, Qline_number_current_line, 0, DEFAULT_FACE_ID);
20916 /* Compute point's line number if needed. */
20917 if ((EQ (Vdisplay_line_numbers, Qrelative)
20918 || EQ (Vdisplay_line_numbers, Qvisual)
20919 || lnum_face_id != current_lnum_face_id)
20920 && !it->pt_lnum)
20921 {
20922 ptrdiff_t ignored;
20923 if (PT_BYTE > it->lnum_bytepos && !EQ (Vdisplay_line_numbers, Qvisual))
20924 it->pt_lnum =
20925 this_line + display_count_lines_logically (it->lnum_bytepos, PT_BYTE,
20926 PT, &ignored);
20927 else
20928 it->pt_lnum = display_count_lines_logically (beg_byte, PT_BYTE, PT,
20929 &ignored);
20930 }
20931 /* Compute the required width if needed. */
20932 if (!it->lnum_width)
20933 {
20934 if (NATNUMP (Vdisplay_line_numbers_width))
20935 it->lnum_width = XFASTINT (Vdisplay_line_numbers_width);
20936
20937 /* Max line number to be displayed cannot be more than the one
20938 corresponding to the last row of the desired matrix. */
20939 ptrdiff_t max_lnum;
20940
20941 if (NILP (Vdisplay_line_numbers_current_absolute)
20942 && (EQ (Vdisplay_line_numbers, Qrelative)
20943 || EQ (Vdisplay_line_numbers, Qvisual)))
20944 /* We subtract one more because the current line is always
20945 zero in this mode. */
20946 max_lnum = it->w->desired_matrix->nrows - 2;
20947 else if (EQ (Vdisplay_line_numbers, Qvisual))
20948 max_lnum = it->pt_lnum + it->w->desired_matrix->nrows - 1;
20949 else
20950 max_lnum = this_line + it->w->desired_matrix->nrows - 1 - it->vpos;
20951 max_lnum = max (1, max_lnum);
20952 it->lnum_width = max (it->lnum_width, log10 (max_lnum) + 1);
20953 eassert (it->lnum_width > 0);
20954 }
20955 if (EQ (Vdisplay_line_numbers, Qrelative))
20956 lnum_offset = it->pt_lnum;
20957 else if (EQ (Vdisplay_line_numbers, Qvisual))
20958 lnum_offset = 0;
20959
20960 /* Under 'relative', display the absolute line number for the
20961 current line, unless the user requests otherwise. */
20962 ptrdiff_t lnum_to_display = eabs (this_line - lnum_offset);
20963 if ((EQ (Vdisplay_line_numbers, Qrelative)
20964 || EQ (Vdisplay_line_numbers, Qvisual))
20965 && lnum_to_display == 0
20966 && !NILP (Vdisplay_line_numbers_current_absolute))
20967 lnum_to_display = it->pt_lnum + 1;
20968 /* In L2R rows we need to append the blank separator, in R2L
20969 rows we need to prepend it. But this function is usually
20970 called when no display elements were produced from the
20971 following line, so the paragraph direction might be unknown.
20972 Therefore we cheat and add 2 blanks, one on either side. */
20973 pint2str (lnum_buf, it->lnum_width + 1, lnum_to_display);
20974 strcat (lnum_buf, " ");
20975
20976 /* Setup for producing the glyphs. */
20977 init_iterator (&tem_it, it->w, -1, -1, &scratch_glyph_row,
20978 /* FIXME: Use specialized face. */
20979 DEFAULT_FACE_ID);
20980 scratch_glyph_row.reversed_p = false;
20981 scratch_glyph_row.used[TEXT_AREA] = 0;
20982 SET_TEXT_POS (tem_it.position, 0, 0);
20983 tem_it.avoid_cursor_p = true;
20984 tem_it.bidi_p = true;
20985 tem_it.bidi_it.type = WEAK_EN;
20986 /* According to UAX#9, EN goes up 2 levels in L2R paragraph and
20987 1 level in R2L paragraphs. Emulate that, assuming we are in
20988 an L2R paragraph. */
20989 tem_it.bidi_it.resolved_level = 2;
20990
20991 /* Produce glyphs for the line number in a scratch glyph_row. */
20992 int n_glyphs_before;
20993 for (const char *p = lnum_buf; *p; p++)
20994 {
20995 /* For continuation lines and lines after ZV, instead of a line
20996 number, produce a blank prefix of the same width. Use the
20997 default face for the blank field beyond ZV. */
20998 if (beyond_zv)
20999 tem_it.face_id = it->base_face_id;
21000 else if (lnum_face_id != current_lnum_face_id
21001 && (EQ (Vdisplay_line_numbers, Qvisual)
21002 ? this_line == 0
21003 : this_line == it->pt_lnum))
21004 tem_it.face_id = current_lnum_face_id;
21005 else
21006 tem_it.face_id = lnum_face_id;
21007 if (beyond_zv
21008 /* Don't display the same line number more than once. */
21009 || (!EQ (Vdisplay_line_numbers, Qvisual)
21010 && (it->continuation_lines_width > 0
21011 || (this_line == last_line && !first_time))))
21012 tem_it.c = tem_it.char_to_display = ' ';
21013 else
21014 tem_it.c = tem_it.char_to_display = *p;
21015 tem_it.len = 1;
21016 n_glyphs_before = scratch_glyph_row.used[TEXT_AREA];
21017 /* Make sure these glyphs will have a "position" of -1. */
21018 SET_TEXT_POS (tem_it.position, -1, -1);
21019 PRODUCE_GLYPHS (&tem_it);
21020
21021 /* Stop producing glyphs if we don't have enough space on
21022 this line. FIXME: should we refrain from producing the
21023 line number at all in that case? */
21024 if (tem_it.current_x > tem_it.last_visible_x)
21025 {
21026 scratch_glyph_row.used[TEXT_AREA] = n_glyphs_before;
21027 break;
21028 }
21029 }
21030
21031 /* Record the width in pixels we need for the line number display. */
21032 it->lnum_pixel_width = tem_it.current_x;
21033 /* Copy the produced glyphs into IT's glyph_row. */
21034 struct glyph *g = scratch_glyph_row.glyphs[TEXT_AREA];
21035 struct glyph *e = g + scratch_glyph_row.used[TEXT_AREA];
21036 struct glyph *p = it->glyph_row ? it->glyph_row->glyphs[TEXT_AREA] : NULL;
21037 short *u = it->glyph_row ? &it->glyph_row->used[TEXT_AREA] : NULL;
21038
21039 eassert (it->glyph_row == NULL || it->glyph_row->used[TEXT_AREA] == 0);
21040
21041 for ( ; g < e; g++)
21042 {
21043 it->current_x += g->pixel_width;
21044 /* The following is important when this function is called
21045 from move_it_in_display_line_to: HPOS is incremented only
21046 when we are in the visible portion of the glyph row. */
21047 if (it->current_x > it->first_visible_x)
21048 it->hpos++;
21049 if (p)
21050 {
21051 *p++ = *g;
21052 (*u)++;
21053 }
21054 }
21055
21056 /* Update IT's metrics due to glyphs produced for line numbers. */
21057 if (it->glyph_row)
21058 {
21059 struct glyph_row *row = it->glyph_row;
21060
21061 it->max_ascent = max (row->ascent, tem_it.max_ascent);
21062 it->max_descent = max (row->height - row->ascent, tem_it.max_descent);
21063 it->max_phys_ascent = max (row->phys_ascent, tem_it.max_phys_ascent);
21064 it->max_phys_descent = max (row->phys_height - row->phys_ascent,
21065 tem_it.max_phys_descent);
21066 }
21067 else
21068 {
21069 it->max_ascent = max (it->max_ascent, tem_it.max_ascent);
21070 it->max_descent = max (it->max_descent, tem_it.max_descent);
21071 it->max_phys_ascent = max (it->max_phys_ascent, tem_it.max_phys_ascent);
21072 it->max_phys_descent = max (it->max_phys_descent, tem_it.max_phys_descent);
21073 }
21074
21075 bidi_unshelve_cache (itdata, false);
21076}
21077
21078/* Return true if this glyph row needs a line number to be produced
21079 for it. */
21080static bool
21081should_produce_line_number (struct it *it)
21082{
21083 if (NILP (Vdisplay_line_numbers))
21084 return false;
21085
21086 /* Don't display line numbers in minibuffer windows. */
21087 if (MINI_WINDOW_P (it->w))
21088 return false;
21089
21090#ifdef HAVE_WINDOW_SYSTEM
21091 /* Don't display line number in tooltip frames. */
21092 if (FRAMEP (tip_frame) && EQ (WINDOW_FRAME (it->w), tip_frame))
21093 return false;
21094#endif
21095
21096 /* If the character at current position has a non-nil special
21097 property, disable line numbers for this row. This is for
21098 packages such as company-mode, which need this for their tricky
21099 layout, where line numbers get in the way. */
21100 Lisp_Object val = Fget_char_property (make_number (IT_CHARPOS (*it)),
21101 Qdisplay_line_numbers_disable,
21102 it->window);
21103 /* For ZV, we need to also look in empty overlays at that point,
21104 because get-char-property always returns nil for ZV, except if
21105 the property is in 'default-text-properties'. */
21106 if (NILP (val) && IT_CHARPOS (*it) >= ZV)
21107 val = disable_line_numbers_overlay_at_eob ();
21108 return NILP (val) ? true : false;
21109}
21110
21111/* Return true if ROW has no glyphs except those inserted by the
21112 display engine. This is needed for indicate-empty-lines and
21113 similar features when the glyph row starts with glyphs which didn't
21114 come from buffer or string. */
21115static bool
21116row_text_area_empty (struct glyph_row *row)
21117{
21118 if (!row->reversed_p)
21119 {
21120 for (struct glyph *g = row->glyphs[TEXT_AREA];
21121 g < row->glyphs[TEXT_AREA] + row->used[TEXT_AREA];
21122 g++)
21123 if (!NILP (g->object) || g->charpos > 0)
21124 return false;
21125 }
21126 else
21127 {
21128 for (struct glyph *g = row->glyphs[TEXT_AREA] + row->used[TEXT_AREA] - 1;
21129 g > row->glyphs[TEXT_AREA];
21130 g--)
21131 if (!NILP ((g - 1)->object) || (g - 1)->charpos > 0)
21132 return false;
21133 }
21134
21135 return true;
21136}
21137
20672/* Construct the glyph row IT->glyph_row in the desired matrix of 21138/* Construct the glyph row IT->glyph_row in the desired matrix of
20673 IT->w from text at the current position of IT. See dispextern.h 21139 IT->w from text at the current position of IT. See dispextern.h
20674 for an overview of struct it. Value is true if 21140 for an overview of struct it. Value is true if
@@ -20739,6 +21205,8 @@ display_line (struct it *it, int cursor_vpos)
20739 (window_hscroll_limited (it->w, it->f) - it->w->min_hscroll) 21205 (window_hscroll_limited (it->w, it->f) - it->w->min_hscroll)
20740 * FRAME_COLUMN_WIDTH (it->f); 21206 * FRAME_COLUMN_WIDTH (it->f);
20741 21207
21208 bool line_number_needed = should_produce_line_number (it);
21209
20742 /* Move over display elements that are not visible because we are 21210 /* Move over display elements that are not visible because we are
20743 hscrolled. This may stop at an x-position < first_visible_x 21211 hscrolled. This may stop at an x-position < first_visible_x
20744 if the first glyph is partially visible or if we hit a line end. */ 21212 if the first glyph is partially visible or if we hit a line end. */
@@ -20774,9 +21242,17 @@ display_line (struct it *it, int cursor_vpos)
20774 are hscrolled to the left of the left edge of the window. */ 21242 are hscrolled to the left of the left edge of the window. */
20775 min_pos = CHARPOS (this_line_min_pos); 21243 min_pos = CHARPOS (this_line_min_pos);
20776 min_bpos = BYTEPOS (this_line_min_pos); 21244 min_bpos = BYTEPOS (this_line_min_pos);
21245
21246 /* Produce line number, if needed. */
21247 if (line_number_needed)
21248 maybe_produce_line_number (it);
20777 } 21249 }
20778 else if (it->area == TEXT_AREA) 21250 else if (it->area == TEXT_AREA)
20779 { 21251 {
21252 /* Line numbers should precede the line-prefix or wrap-prefix. */
21253 if (line_number_needed)
21254 maybe_produce_line_number (it);
21255
20780 /* We only do this when not calling move_it_in_display_line_to 21256 /* We only do this when not calling move_it_in_display_line_to
20781 above, because that function calls itself handle_line_prefix. */ 21257 above, because that function calls itself handle_line_prefix. */
20782 handle_line_prefix (it); 21258 handle_line_prefix (it);
@@ -20838,6 +21314,7 @@ display_line (struct it *it, int cursor_vpos)
20838 buffer reached. */ 21314 buffer reached. */
20839 if (!get_next_display_element (it)) 21315 if (!get_next_display_element (it))
20840 { 21316 {
21317 bool row_has_glyphs = false;
20841 /* Maybe add a space at the end of this line that is used to 21318 /* Maybe add a space at the end of this line that is used to
20842 display the cursor there under X. Set the charpos of the 21319 display the cursor there under X. Set the charpos of the
20843 first glyph of blank lines not corresponding to any text 21320 first glyph of blank lines not corresponding to any text
@@ -20846,14 +21323,17 @@ display_line (struct it *it, int cursor_vpos)
20846 row->exact_window_width_line_p = true; 21323 row->exact_window_width_line_p = true;
20847 else if ((append_space_for_newline (it, true) 21324 else if ((append_space_for_newline (it, true)
20848 && row->used[TEXT_AREA] == 1) 21325 && row->used[TEXT_AREA] == 1)
20849 || row->used[TEXT_AREA] == 0) 21326 || row->used[TEXT_AREA] == 0
21327 || (row_has_glyphs = row_text_area_empty (row)))
20850 { 21328 {
20851 row->glyphs[TEXT_AREA]->charpos = -1; 21329 row->glyphs[TEXT_AREA]->charpos = -1;
20852 row->displays_text_p = false; 21330 /* Don't reset the displays_text_p flag if we are
21331 displaying line numbers or line-prefix. */
21332 if (!row_has_glyphs)
21333 row->displays_text_p = false;
20853 21334
20854 if (!NILP (BVAR (XBUFFER (it->w->contents), indicate_empty_lines)) 21335 if (!NILP (BVAR (XBUFFER (it->w->contents), indicate_empty_lines))
20855 && (!MINI_WINDOW_P (it->w) 21336 && (!MINI_WINDOW_P (it->w)))
20856 || (minibuf_level && EQ (it->window, minibuf_window))))
20857 row->indicate_empty_line_p = true; 21337 row->indicate_empty_line_p = true;
20858 } 21338 }
20859 21339
@@ -20935,6 +21415,10 @@ display_line (struct it *it, int cursor_vpos)
20935 process the prefix now. */ 21415 process the prefix now. */
20936 if (it->area == TEXT_AREA && pending_handle_line_prefix) 21416 if (it->area == TEXT_AREA && pending_handle_line_prefix)
20937 { 21417 {
21418 /* Line numbers should precede the line-prefix or wrap-prefix. */
21419 if (line_number_needed)
21420 maybe_produce_line_number (it);
21421
20938 pending_handle_line_prefix = false; 21422 pending_handle_line_prefix = false;
20939 handle_line_prefix (it); 21423 handle_line_prefix (it);
20940 } 21424 }
@@ -22006,7 +22490,7 @@ Value is the new character position of point. */)
22006 reach point, in order to start from its X coordinate. So we 22490 reach point, in order to start from its X coordinate. So we
22007 need to disregard the window's horizontal extent in that case. */ 22491 need to disregard the window's horizontal extent in that case. */
22008 if (it.line_wrap == TRUNCATE) 22492 if (it.line_wrap == TRUNCATE)
22009 it.last_visible_x = INFINITY; 22493 it.last_visible_x = DISP_INFINITY;
22010 22494
22011 if (it.cmp_it.id < 0 22495 if (it.cmp_it.id < 0
22012 && it.method == GET_FROM_STRING 22496 && it.method == GET_FROM_STRING
@@ -22099,7 +22583,7 @@ Value is the new character position of point. */)
22099 { 22583 {
22100 start_display (&it, w, pt); 22584 start_display (&it, w, pt);
22101 if (it.line_wrap == TRUNCATE) 22585 if (it.line_wrap == TRUNCATE)
22102 it.last_visible_x = INFINITY; 22586 it.last_visible_x = DISP_INFINITY;
22103 reseat_at_previous_visible_line_start (&it); 22587 reseat_at_previous_visible_line_start (&it);
22104 it.current_x = it.current_y = it.hpos = 0; 22588 it.current_x = it.current_y = it.hpos = 0;
22105 if (pt_vpos != 0) 22589 if (pt_vpos != 0)
@@ -22859,7 +23343,7 @@ display_mode_element (struct it *it, int depth, int field_width, int precision,
22859 props = oprops; 23343 props = oprops;
22860 } 23344 }
22861 23345
22862 aelt = Fassoc (elt, mode_line_proptrans_alist); 23346 aelt = Fassoc (elt, mode_line_proptrans_alist, Qnil);
22863 if (! NILP (aelt) && !NILP (Fequal (props, XCDR (aelt)))) 23347 if (! NILP (aelt) && !NILP (Fequal (props, XCDR (aelt))))
22864 { 23348 {
22865 /* AELT is what we want. Move it to the front 23349 /* AELT is what we want. Move it to the front
@@ -27616,6 +28100,10 @@ x_produce_glyphs (struct it *it)
27616 { 28100 {
27617 int tab_width = it->tab_width * font->space_width; 28101 int tab_width = it->tab_width * font->space_width;
27618 int x = it->current_x + it->continuation_lines_width; 28102 int x = it->current_x + it->continuation_lines_width;
28103 int x0 = x;
28104 /* Adjust for line numbers, if needed. */
28105 if (!NILP (Vdisplay_line_numbers) && x0 >= it->lnum_pixel_width)
28106 x -= it->lnum_pixel_width;
27619 int next_tab_x = ((1 + x + tab_width - 1) / tab_width) * tab_width; 28107 int next_tab_x = ((1 + x + tab_width - 1) / tab_width) * tab_width;
27620 28108
27621 /* If the distance from the current position to the next tab 28109 /* If the distance from the current position to the next tab
@@ -27623,8 +28111,12 @@ x_produce_glyphs (struct it *it)
27623 tab stop after that. */ 28111 tab stop after that. */
27624 if (next_tab_x - x < font->space_width) 28112 if (next_tab_x - x < font->space_width)
27625 next_tab_x += tab_width; 28113 next_tab_x += tab_width;
28114 if (!NILP (Vdisplay_line_numbers) && x0 >= it->lnum_pixel_width)
28115 next_tab_x += (it->lnum_pixel_width
28116 - ((it->w->hscroll * font->space_width)
28117 % tab_width));
27626 28118
27627 it->pixel_width = next_tab_x - x; 28119 it->pixel_width = next_tab_x - x0;
27628 it->nglyphs = 1; 28120 it->nglyphs = 1;
27629 if (FONT_TOO_HIGH (font)) 28121 if (FONT_TOO_HIGH (font))
27630 { 28122 {
@@ -28325,7 +28817,7 @@ set_frame_cursor_types (struct frame *f, Lisp_Object arg)
28325 28817
28326 /* By default, set up the blink-off state depending on the on-state. */ 28818 /* By default, set up the blink-off state depending on the on-state. */
28327 28819
28328 tem = Fassoc (arg, Vblink_cursor_alist); 28820 tem = Fassoc (arg, Vblink_cursor_alist, Qnil);
28329 if (!NILP (tem)) 28821 if (!NILP (tem))
28330 { 28822 {
28331 FRAME_BLINK_OFF_CURSOR (f) 28823 FRAME_BLINK_OFF_CURSOR (f)
@@ -28463,7 +28955,7 @@ get_window_cursor_type (struct window *w, struct glyph *glyph, int *width,
28463 /* Cursor is blinked off, so determine how to "toggle" it. */ 28955 /* Cursor is blinked off, so determine how to "toggle" it. */
28464 28956
28465 /* First look for an entry matching the buffer's cursor-type in blink-cursor-alist. */ 28957 /* First look for an entry matching the buffer's cursor-type in blink-cursor-alist. */
28466 if ((alt_cursor = Fassoc (BVAR (b, cursor_type), Vblink_cursor_alist), !NILP (alt_cursor))) 28958 if ((alt_cursor = Fassoc (BVAR (b, cursor_type), Vblink_cursor_alist, Qnil), !NILP (alt_cursor)))
28467 return get_specified_cursor_type (XCDR (alt_cursor), width); 28959 return get_specified_cursor_type (XCDR (alt_cursor), width);
28468 28960
28469 /* Then see if frame has specified a specific blink off cursor type. */ 28961 /* Then see if frame has specified a specific blink off cursor type. */
@@ -31708,6 +32200,12 @@ They are still logged to the *Messages* buffer. */);
31708 /* Name of the face used to highlight trailing whitespace. */ 32200 /* Name of the face used to highlight trailing whitespace. */
31709 DEFSYM (Qtrailing_whitespace, "trailing-whitespace"); 32201 DEFSYM (Qtrailing_whitespace, "trailing-whitespace");
31710 32202
32203 /* Names of the faces used to display line numbers. */
32204 DEFSYM (Qline_number, "line-number");
32205 DEFSYM (Qline_number_current_line, "line-number-current-line");
32206 /* Name of a text property which disables line-number display. */
32207 DEFSYM (Qdisplay_line_numbers_disable, "display-line-numbers-disable");
32208
31711 /* Name and number of the face used to highlight escape glyphs. */ 32209 /* Name and number of the face used to highlight escape glyphs. */
31712 DEFSYM (Qescape_glyph, "escape-glyph"); 32210 DEFSYM (Qescape_glyph, "escape-glyph");
31713 32211
@@ -32215,6 +32713,54 @@ To add a prefix to continuation lines, use `wrap-prefix'. */);
32215 DEFSYM (Qline_prefix, "line-prefix"); 32713 DEFSYM (Qline_prefix, "line-prefix");
32216 Fmake_variable_buffer_local (Qline_prefix); 32714 Fmake_variable_buffer_local (Qline_prefix);
32217 32715
32716 DEFVAR_LISP ("display-line-numbers", Vdisplay_line_numbers,
32717 doc: /* Non-nil means display line numbers.
32718If the value is t, display the absolute number of each line of a buffer
32719shown in a window. Absolute line numbers count from the beginning of
32720the current narrowing, or from buffer beginning. If the value is
32721`relative', display for each line not containing the window's point its
32722relative number instead, i.e. the number of the line relative to the
32723line showing the window's point.
32724
32725In either case, line numbers are displayed at the beginning of each
32726non-continuation line that displays buffer text, i.e. after each newline
32727character that comes from the buffer. The value `visual' is like
32728`relative' but counts screen lines instead of buffer lines. In practice
32729this means that continuation lines count as well when calculating the
32730relative number of a line.
32731
32732Lisp programs can disable display of a line number of a particular
32733buffer line by putting the `display-line-numbers-disable' text property
32734or overlay property on the first visible character of that line. */);
32735 Vdisplay_line_numbers = Qnil;
32736 DEFSYM (Qdisplay_line_numbers, "display-line-numbers");
32737 Fmake_variable_buffer_local (Qdisplay_line_numbers);
32738 DEFSYM (Qrelative, "relative");
32739 DEFSYM (Qvisual, "visual");
32740
32741 DEFVAR_LISP ("display-line-numbers-width", Vdisplay_line_numbers_width,
32742 doc: /* Minimum width of space reserved for line number display.
32743A positive number means reserve that many columns for line numbers,
32744even if the actual number needs less space.
32745The default value of nil means compute the space dynamically.
32746Any other value is treated as nil. */);
32747 Vdisplay_line_numbers_width = Qnil;
32748 DEFSYM (Qdisplay_line_numbers_width, "display-line-numbers-width");
32749 Fmake_variable_buffer_local (Qdisplay_line_numbers_width);
32750
32751 DEFVAR_LISP ("display-line-numbers-current-absolute",
32752 Vdisplay_line_numbers_current_absolute,
32753 doc: /* Non-nil means display absolute number of current line.
32754This variable has effect only when `display-line-numbers' is
32755either `relative' or `visual'. */);
32756 Vdisplay_line_numbers_current_absolute = Qt;
32757
32758 DEFVAR_BOOL ("display-line-numbers-widen", display_line_numbers_widen,
32759 doc: /* Non-nil means display line numbers disregarding any narrowing. */);
32760 display_line_numbers_widen = false;
32761 DEFSYM (Qdisplay_line_numbers_widen, "display-line-numbers-widen");
32762 Fmake_variable_buffer_local (Qdisplay_line_numbers_widen);
32763
32218 DEFVAR_BOOL ("inhibit-eval-during-redisplay", inhibit_eval_during_redisplay, 32764 DEFVAR_BOOL ("inhibit-eval-during-redisplay", inhibit_eval_during_redisplay,
32219 doc: /* Non-nil means don't eval Lisp during redisplay. */); 32765 doc: /* Non-nil means don't eval Lisp during redisplay. */);
32220 inhibit_eval_during_redisplay = false; 32766 inhibit_eval_during_redisplay = false;
diff --git a/src/xfns.c b/src/xfns.c
index d8bf9747191..2f8c9c25416 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -2062,7 +2062,7 @@ x_set_scroll_bar_default_width (struct frame *f)
2062 int unit = FRAME_COLUMN_WIDTH (f); 2062 int unit = FRAME_COLUMN_WIDTH (f);
2063#ifdef USE_TOOLKIT_SCROLL_BARS 2063#ifdef USE_TOOLKIT_SCROLL_BARS
2064#ifdef USE_GTK 2064#ifdef USE_GTK
2065 int minw = xg_get_default_scrollbar_width (); 2065 int minw = xg_get_default_scrollbar_width (f);
2066#else 2066#else
2067 int minw = 16; 2067 int minw = 16;
2068#endif 2068#endif
@@ -2083,7 +2083,7 @@ x_set_scroll_bar_default_height (struct frame *f)
2083 int height = FRAME_LINE_HEIGHT (f); 2083 int height = FRAME_LINE_HEIGHT (f);
2084#ifdef USE_TOOLKIT_SCROLL_BARS 2084#ifdef USE_TOOLKIT_SCROLL_BARS
2085#ifdef USE_GTK 2085#ifdef USE_GTK
2086 int min_height = xg_get_default_scrollbar_height (); 2086 int min_height = xg_get_default_scrollbar_height (f);
2087#else 2087#else
2088 int min_height = 16; 2088 int min_height = 16;
2089#endif 2089#endif
diff --git a/src/xfont.c b/src/xfont.c
index b73596ce7ce..85fccf0dafd 100644
--- a/src/xfont.c
+++ b/src/xfont.c
@@ -505,7 +505,8 @@ xfont_list (struct frame *f, Lisp_Object spec)
505 Lisp_Object alter; 505 Lisp_Object alter;
506 506
507 if ((alter = Fassoc (SYMBOL_NAME (registry), 507 if ((alter = Fassoc (SYMBOL_NAME (registry),
508 Vface_alternative_font_registry_alist), 508 Vface_alternative_font_registry_alist,
509 Qnil),
509 CONSP (alter))) 510 CONSP (alter)))
510 { 511 {
511 /* Pointer to REGISTRY-ENCODING field. */ 512 /* Pointer to REGISTRY-ENCODING field. */
diff --git a/src/xmenu.c b/src/xmenu.c
index 6c8a0c506cc..64df151b289 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -1271,6 +1271,11 @@ create_and_show_popup_menu (struct frame *f, widget_value *first_wv,
1271 1271
1272 /* Child of win. */ 1272 /* Child of win. */
1273 &dummy_window); 1273 &dummy_window);
1274#ifdef HAVE_GTK3
1275 /* Use window scaling factor to adjust position for hidpi screens. */
1276 x /= xg_get_scale (f);
1277 y /= xg_get_scale (f);
1278#endif
1274 unblock_input (); 1279 unblock_input ();
1275 popup_x_y.x = x; 1280 popup_x_y.x = x;
1276 popup_x_y.y = y; 1281 popup_x_y.y = y;
diff --git a/test/Makefile.in b/test/Makefile.in
index 414eca90564..ba823ec7e32 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -136,7 +136,8 @@ endif
136 $(AM_V_ELC)$(emacs) -f batch-byte-compile $< 136 $(AM_V_ELC)$(emacs) -f batch-byte-compile $<
137 137
138## Save logs, and show logs for failed tests. 138## Save logs, and show logs for failed tests.
139WRITE_LOG = > $@ 2>&1 || { STAT=$$?; cat $@; exit $$STAT; } 139WRITE_LOG = $(if $(and ${EMACS_HYDRA_CI}, $(findstring tramp, $@)), |& tee $@, > $@ 2>&1) \
140 || { STAT=$$?; cat $@; exit $$STAT; }
140 141
141ifeq ($(TEST_LOAD_EL), yes) 142ifeq ($(TEST_LOAD_EL), yes)
142testloadfile = $*.el 143testloadfile = $*.el
diff --git a/test/data/emacs-module/mod-test.c b/test/data/emacs-module/mod-test.c
index eee9466c5d6..42e1c2bd4ae 100644
--- a/test/data/emacs-module/mod-test.c
+++ b/test/data/emacs-module/mod-test.c
@@ -235,6 +235,27 @@ Fmod_test_invalid_load (emacs_env *env, ptrdiff_t nargs, emacs_value *args,
235 return invalid_stored_value; 235 return invalid_stored_value;
236} 236}
237 237
238/* An invalid finalizer: Finalizers are run during garbage collection,
239 where Lisp code can’t be executed. -module-assertions tests for
240 this case. */
241
242static emacs_env *current_env;
243
244static void
245invalid_finalizer (void *ptr)
246{
247 current_env->intern (current_env, "nil");
248}
249
250static emacs_value
251Fmod_test_invalid_finalizer (emacs_env *env, ptrdiff_t nargs, emacs_value *args,
252 void *data)
253{
254 current_env = env;
255 env->make_user_ptr (env, invalid_finalizer, NULL);
256 return env->funcall (env, env->intern (env, "garbage-collect"), 0, NULL);
257}
258
238 259
239/* Lisp utilities for easier readability (simple wrappers). */ 260/* Lisp utilities for easier readability (simple wrappers). */
240 261
@@ -300,6 +321,8 @@ emacs_module_init (struct emacs_runtime *ert)
300 DEFUN ("mod-test-vector-eq", Fmod_test_vector_eq, 2, 2, NULL, NULL); 321 DEFUN ("mod-test-vector-eq", Fmod_test_vector_eq, 2, 2, NULL, NULL);
301 DEFUN ("mod-test-invalid-store", Fmod_test_invalid_store, 0, 0, NULL, NULL); 322 DEFUN ("mod-test-invalid-store", Fmod_test_invalid_store, 0, 0, NULL, NULL);
302 DEFUN ("mod-test-invalid-load", Fmod_test_invalid_load, 0, 0, NULL, NULL); 323 DEFUN ("mod-test-invalid-load", Fmod_test_invalid_load, 0, 0, NULL, NULL);
324 DEFUN ("mod-test-invalid-finalizer", Fmod_test_invalid_finalizer, 0, 0,
325 NULL, NULL);
303 326
304#undef DEFUN 327#undef DEFUN
305 328
diff --git a/test/lisp/dired-tests.el b/test/lisp/dired-tests.el
index 1b814baac58..69331457c0e 100644
--- a/test/lisp/dired-tests.el
+++ b/test/lisp/dired-tests.el
@@ -21,7 +21,7 @@
21(require 'ert) 21(require 'ert)
22(require 'dired) 22(require 'dired)
23(require 'nadvice) 23(require 'nadvice)
24 24(require 'ls-lisp)
25 25
26(ert-deftest dired-autoload () 26(ert-deftest dired-autoload ()
27 "Tests to see whether dired-x has been autoloaded" 27 "Tests to see whether dired-x has been autoloaded"
@@ -38,19 +38,21 @@
38 (file "test") 38 (file "test")
39 (full-name (expand-file-name file dir)) 39 (full-name (expand-file-name file dir))
40 (regexp "bar") 40 (regexp "bar")
41 (dired-always-read-filesystem t)) 41 (dired-always-read-filesystem t) buffers)
42 (if (file-exists-p dir) 42 (if (file-exists-p dir)
43 (delete-directory dir 'recursive)) 43 (delete-directory dir 'recursive))
44 (make-directory dir) 44 (make-directory dir)
45 (with-temp-file full-name (insert "foo")) 45 (with-temp-file full-name (insert "foo"))
46 (find-file-noselect full-name) 46 (push (find-file-noselect full-name) buffers)
47 (dired dir) 47 (push (dired dir) buffers)
48 (with-temp-file full-name (insert "bar")) 48 (with-temp-file full-name (insert "bar"))
49 (dired-mark-files-containing-regexp regexp) 49 (dired-mark-files-containing-regexp regexp)
50 (unwind-protect 50 (unwind-protect
51 (should (equal (dired-get-marked-files nil nil nil 'distinguish-1-mark) 51 (should (equal (dired-get-marked-files nil nil nil 'distinguish-1-mark)
52 `(t ,full-name))) 52 `(t ,full-name)))
53 ;; Clean up 53 ;; Clean up
54 (dolist (buf buffers)
55 (when (buffer-live-p buf) (kill-buffer buf)))
54 (delete-directory dir 'recursive)))) 56 (delete-directory dir 'recursive))))
55 57
56(ert-deftest dired-test-bug25609 () 58(ert-deftest dired-test-bug25609 ()
@@ -60,7 +62,8 @@
60 (target (expand-file-name (file-name-nondirectory from) to)) 62 (target (expand-file-name (file-name-nondirectory from) to))
61 (nested (expand-file-name (file-name-nondirectory from) target)) 63 (nested (expand-file-name (file-name-nondirectory from) target))
62 (dired-dwim-target t) 64 (dired-dwim-target t)
63 (dired-recursive-copies 'always)) ; Don't prompt me. 65 (dired-recursive-copies 'always) ; Don't prompt me.
66 buffers)
64 (advice-add 'dired-query ; Don't ask confirmation to overwrite a file. 67 (advice-add 'dired-query ; Don't ask confirmation to overwrite a file.
65 :override 68 :override
66 (lambda (_sym _prompt &rest _args) (setq dired-query t)) 69 (lambda (_sym _prompt &rest _args) (setq dired-query t))
@@ -70,8 +73,8 @@
70 (lambda (_prompt _coll &optional _pred _match init _hist _def _inherit _keymap) 73 (lambda (_prompt _coll &optional _pred _match init _hist _def _inherit _keymap)
71 init) 74 init)
72 '((name . "advice-completing-read"))) 75 '((name . "advice-completing-read")))
73 (dired to) 76 (push (dired to) buffers)
74 (dired-other-window temporary-file-directory) 77 (push (dired-other-window temporary-file-directory) buffers)
75 (dired-goto-file from) 78 (dired-goto-file from)
76 (dired-do-copy) 79 (dired-do-copy)
77 (dired-do-copy); Again. 80 (dired-do-copy); Again.
@@ -79,10 +82,98 @@
79 (progn 82 (progn
80 (should (file-exists-p target)) 83 (should (file-exists-p target))
81 (should-not (file-exists-p nested))) 84 (should-not (file-exists-p nested)))
85 (dolist (buf buffers)
86 (when (buffer-live-p buf) (kill-buffer buf)))
82 (delete-directory from 'recursive) 87 (delete-directory from 'recursive)
83 (delete-directory to 'recursive) 88 (delete-directory to 'recursive)
84 (advice-remove 'dired-query "advice-dired-query") 89 (advice-remove 'dired-query "advice-dired-query")
85 (advice-remove 'completing-read "advice-completing-read")))) 90 (advice-remove 'completing-read "advice-completing-read"))))
86 91
92(ert-deftest dired-test-bug27243 ()
93 "Test for http://debbugs.gnu.org/27243 ."
94 (let ((test-dir (make-temp-file "test-dir-" t))
95 (dired-auto-revert-buffer t) buffers)
96 (with-current-buffer (find-file-noselect test-dir)
97 (make-directory "test-subdir"))
98 (push (dired test-dir) buffers)
99 (unwind-protect
100 (let ((buf (current-buffer))
101 (pt1 (point))
102 (test-file (concat (file-name-as-directory "test-subdir")
103 "test-file")))
104 (write-region "Test" nil test-file nil 'silent nil 'excl)
105 ;; Sanity check: point should now be on the subdirectory.
106 (should (equal (dired-file-name-at-point)
107 (concat (file-name-as-directory test-dir)
108 (file-name-as-directory "test-subdir"))))
109 (push (dired-find-file) buffers)
110 (let ((pt2 (point))) ; Point is on test-file.
111 (switch-to-buffer buf)
112 ;; Sanity check: point should now be back on the subdirectory.
113 (should (eq (point) pt1))
114 ;; Case 1: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27243#5
115 (push (dired-find-file) buffers)
116 (should (eq (point) pt2))
117 ;; Case 2: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27243#28
118 (push (dired test-dir) buffers)
119 (should (eq (point) pt1))))
120 (dolist (buf buffers)
121 (when (buffer-live-p buf) (kill-buffer buf)))
122 (delete-directory test-dir t))))
123
124(ert-deftest dired-test-bug27693 ()
125 "Test for http://debbugs.gnu.org/27693 ."
126 (let ((dir (expand-file-name "lisp" source-directory))
127 (size "")
128 ls-lisp-use-insert-directory-program buf)
129 (unwind-protect
130 (progn
131 (setq buf (dired (list dir "simple.el" "subr.el"))
132 size (number-to-string
133 (file-attribute-size
134 (file-attributes (dired-get-filename)))))
135 (search-backward-regexp size nil t)
136 (should (looking-back "[[:space:]]" (1- (point)))))
137 (when (buffer-live-p buf) (kill-buffer buf)))))
138
139(ert-deftest dired-test-bug7131 ()
140 "Test for http://debbugs.gnu.org/7131 ."
141 (let* ((dir (expand-file-name "lisp" source-directory))
142 (buf (dired dir)))
143 (unwind-protect
144 (progn
145 (setq buf (dired (list dir "simple.el")))
146 (dired-toggle-marks)
147 (should-not (cdr (dired-get-marked-files)))
148 (kill-buffer buf)
149 (setq buf (dired (list dir "simple.el"))
150 buf (dired dir))
151 (dired-toggle-marks)
152 (should (cdr (dired-get-marked-files))))
153 (when (buffer-live-p buf) (kill-buffer buf)))))
154
155(ert-deftest dired-test-bug27762 ()
156 "Test for http://debbugs.gnu.org/27762 ."
157 :expected-result :failed
158 (let* ((dir source-directory)
159 (default-directory dir)
160 (files (mapcar (lambda (f) (concat "src/" f))
161 (directory-files
162 (expand-file-name "src") nil "\\.*\\.c\\'")))
163 ls-lisp-use-insert-directory-program buf)
164 (unwind-protect
165 (let ((file1 "src/cygw32.c")
166 (file2 "src/atimer.c"))
167 (setq buf (dired (nconc (list dir) files)))
168 (dired-goto-file (expand-file-name file2 default-directory))
169 (should-not (looking-at "^ -")) ; Must be 2 spaces not 3.
170 (setq files (cons file1 (delete file1 files)))
171 (kill-buffer buf)
172 (setq buf (dired (nconc (list dir) files)))
173 (should (looking-at "src"))
174 (next-line) ; File names must be aligned.
175 (should (looking-at "src")))
176 (when (buffer-live-p buf) (kill-buffer buf)))))
177
87(provide 'dired-tests) 178(provide 'dired-tests)
88;; dired-tests.el ends here 179;; dired-tests.el ends here
diff --git a/test/lisp/electric-tests.el b/test/lisp/electric-tests.el
index c4ccec7a0d8..c6ffccc0794 100644
--- a/test/lisp/electric-tests.el
+++ b/test/lisp/electric-tests.el
@@ -694,6 +694,8 @@ baz\"\""
694 :bindings '((electric-quote-context-sensitive . t)) 694 :bindings '((electric-quote-context-sensitive . t))
695 :test-in-comments nil :test-in-strings nil) 695 :test-in-comments nil :test-in-strings nil)
696 696
697;; Simulate ‘markdown-mode’: it sets both ‘comment-start’ and
698;; ‘comment-use-syntax’, but derives from ‘text-mode’.
697(define-electric-pair-test electric-quote-markdown-in-text 699(define-electric-pair-test electric-quote-markdown-in-text
698 "" "'" :expected-string "’" :expected-point 2 700 "" "'" :expected-string "’" :expected-point 2
699 :modes '(text-mode) 701 :modes '(text-mode)
@@ -703,6 +705,7 @@ baz\"\""
703 (lambda () 705 (lambda ()
704 (save-excursion (search-backward "`" nil t))) 706 (save-excursion (search-backward "`" nil t)))
705 nil :local)) 707 nil :local))
708 :bindings '((comment-start . "<!--") (comment-use-syntax . t))
706 :test-in-comments nil :test-in-strings nil) 709 :test-in-comments nil :test-in-strings nil)
707 710
708(define-electric-pair-test electric-quote-markdown-in-code 711(define-electric-pair-test electric-quote-markdown-in-code
@@ -714,6 +717,7 @@ baz\"\""
714 (lambda () 717 (lambda ()
715 (save-excursion (search-backward "`" nil t))) 718 (save-excursion (search-backward "`" nil t)))
716 nil :local)) 719 nil :local))
720 :bindings '((comment-start . "<!--") (comment-use-syntax . t))
717 :test-in-comments nil :test-in-strings nil) 721 :test-in-comments nil :test-in-strings nil)
718 722
719(provide 'electric-tests) 723(provide 'electric-tests)
diff --git a/test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el b/test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el
index 241ca65122d..3df2157cc83 100644
--- a/test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el
+++ b/test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el
@@ -192,7 +192,7 @@
192(ert-deftest eieio-test-method-order-list-6 () 192(ert-deftest eieio-test-method-order-list-6 ()
193 ;; FIXME repeated intermittent failures on hydra (bug#24503) 193 ;; FIXME repeated intermittent failures on hydra (bug#24503)
194 ;; ((:STATIC C) (:STATIC C-base1) (:STATIC C-base2)) != ((:STATIC C))") 194 ;; ((:STATIC C) (:STATIC C-base1) (:STATIC C-base2)) != ((:STATIC C))")
195 (skip-unless (not (getenv "NIX_STORE"))) 195 (skip-unless (not (getenv "EMACS_HYDRA_CI")))
196 (let ((eieio-test-method-order-list nil) 196 (let ((eieio-test-method-order-list nil)
197 (ans '( 197 (ans '(
198 (:STATIC C) 198 (:STATIC C)
diff --git a/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el b/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
index c34560ab585..1a6ab9da085 100644
--- a/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
+++ b/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
@@ -894,7 +894,7 @@ Subclasses to override slot attributes.")
894 894
895(ert-deftest eieio-test-37-obsolete-name-in-constructor () 895(ert-deftest eieio-test-37-obsolete-name-in-constructor ()
896 ;; FIXME repeated intermittent failures on hydra (bug#24503) 896 ;; FIXME repeated intermittent failures on hydra (bug#24503)
897 (skip-unless (not (getenv "NIX_STORE"))) 897 (skip-unless (not (getenv "EMACS_HYDRA_CI")))
898 (should (equal (eieio--testing "toto") '("toto" 2)))) 898 (should (equal (eieio--testing "toto") '("toto" 2))))
899 899
900(ert-deftest eieio-autoload () 900(ert-deftest eieio-autoload ()
diff --git a/test/lisp/emacs-lisp/map-tests.el b/test/lisp/emacs-lisp/map-tests.el
index 07e85cc5391..15b0655040c 100644
--- a/test/lisp/emacs-lisp/map-tests.el
+++ b/test/lisp/emacs-lisp/map-tests.el
@@ -63,6 +63,11 @@ Evaluate BODY for each created map.
63 (with-maps-do map 63 (with-maps-do map
64 (should (= 5 (map-elt map 7 5))))) 64 (should (= 5 (map-elt map 7 5)))))
65 65
66(ert-deftest test-map-elt-testfn ()
67 (let ((map (list (cons "a" 1) (cons "b" 2))))
68 (should-not (map-elt map "a"))
69 (should (map-elt map "a" nil 'equal))))
70
66(ert-deftest test-map-elt-with-nil-value () 71(ert-deftest test-map-elt-with-nil-value ()
67 (should (null (map-elt '((a . 1) 72 (should (null (map-elt '((a . 1)
68 (b)) 73 (b))
@@ -94,6 +99,13 @@ Evaluate BODY for each created map.
94 (should (eq (map-elt alist 2) 99 (should (eq (map-elt alist 2)
95 'b)))) 100 'b))))
96 101
102(ert-deftest test-map-put-testfn-alist ()
103 (let ((alist (list (cons "a" 1) (cons "b" 2))))
104 (map-put alist "a" 3 'equal)
105 (should-not (cddr alist))
106 (map-put alist "a" 9)
107 (should (cddr alist))))
108
97(ert-deftest test-map-put-return-value () 109(ert-deftest test-map-put-return-value ()
98 (let ((ht (make-hash-table))) 110 (let ((ht (make-hash-table)))
99 (should (eq (map-put ht 'a 'hello) 'hello)))) 111 (should (eq (map-put ht 'a 'hello) 'hello))))
diff --git a/test/lisp/emacs-lisp/rx-tests.el b/test/lisp/emacs-lisp/rx-tests.el
index 8b7945c9d27..8f353b7e863 100644
--- a/test/lisp/emacs-lisp/rx-tests.el
+++ b/test/lisp/emacs-lisp/rx-tests.el
@@ -33,5 +33,15 @@
33 (number-sequence ?< ?\]) 33 (number-sequence ?< ?\])
34 (number-sequence ?- ?:)))))) 34 (number-sequence ?- ?:))))))
35 35
36(ert-deftest rx-pcase ()
37 (should (equal (pcase "a 1 2 3 1 1 b"
38 ((rx (let u (+ digit)) space
39 (let v (+ digit)) space
40 (let v (+ digit)) space
41 (backref u) space
42 (backref 1))
43 (list u v)))
44 '("1" "3"))))
45
36(provide 'rx-tests) 46(provide 'rx-tests)
37;; rx-tests.el ends here. 47;; rx-tests.el ends here.
diff --git a/test/lisp/filenotify-tests.el b/test/lisp/filenotify-tests.el
index 8d05ceacee2..3456d31fda9 100644
--- a/test/lisp/filenotify-tests.el
+++ b/test/lisp/filenotify-tests.el
@@ -173,8 +173,8 @@ Return nil when any other file notification watch is still active."
173 tramp-verbose 0 173 tramp-verbose 0
174 tramp-message-show-message nil) 174 tramp-message-show-message nil)
175 175
176;; This shall happen on hydra only. 176;; This should happen on hydra only.
177(when (getenv "NIX_STORE") 177(when (getenv "EMACS_HYDRA_CI")
178 (add-to-list 'tramp-remote-path 'tramp-own-remote-path)) 178 (add-to-list 'tramp-remote-path 'tramp-own-remote-path))
179 179
180;; We do not want to try and fail `file-notify-add-watch'. 180;; We do not want to try and fail `file-notify-add-watch'.
diff --git a/test/lisp/ibuffer-tests.el b/test/lisp/ibuffer-tests.el
index b9f7fe7cde8..af75aa0ec7f 100644
--- a/test/lisp/ibuffer-tests.el
+++ b/test/lisp/ibuffer-tests.el
@@ -32,7 +32,7 @@
32(declare-function ibuffer-format-qualifier "ibuf-ext" (qualifier)) 32(declare-function ibuffer-format-qualifier "ibuf-ext" (qualifier))
33(declare-function ibuffer-unary-operand "ibuf-ext" (filter)) 33(declare-function ibuffer-unary-operand "ibuf-ext" (filter))
34 34
35(ert-deftest ibuffer-autoload () 35(ert-deftest ibuffer-0autoload () ; sort first
36 "Tests to see whether ibuffer has been autoloaded" 36 "Tests to see whether ibuffer has been autoloaded"
37 (skip-unless (not (featurep 'ibuf-ext))) 37 (skip-unless (not (featurep 'ibuf-ext)))
38 (should 38 (should
@@ -76,7 +76,7 @@
76 76
77(ert-deftest ibuffer-save-filters () 77(ert-deftest ibuffer-save-filters ()
78 "Tests that `ibuffer-save-filters' saves in the proper format." 78 "Tests that `ibuffer-save-filters' saves in the proper format."
79 (skip-unless (featurep 'ibuf-ext)) 79 (require 'ibuf-ext)
80 (let ((ibuffer-save-with-custom nil) 80 (let ((ibuffer-save-with-custom nil)
81 (ibuffer-saved-filters nil) 81 (ibuffer-saved-filters nil)
82 (test1 '((mode . org-mode) 82 (test1 '((mode . org-mode)
@@ -150,6 +150,7 @@
150 150
151;; Test Filter Inclusion 151;; Test Filter Inclusion
152(let* (test-buffer-list ; accumulated buffers to clean up 152(let* (test-buffer-list ; accumulated buffers to clean up
153 test-file-list
153 ;; Utility functions without polluting the environment 154 ;; Utility functions without polluting the environment
154 (set-buffer-mode 155 (set-buffer-mode
155 (lambda (buffer mode) 156 (lambda (buffer mode)
@@ -192,6 +193,7 @@
192 (file (make-temp-file prefix nil suffix)) 193 (file (make-temp-file prefix nil suffix))
193 (buf (find-file-noselect file t))) 194 (buf (find-file-noselect file t)))
194 (push buf test-buffer-list) ; record for cleanup 195 (push buf test-buffer-list) ; record for cleanup
196 (push file test-file-list)
195 (funcall set-buffer-mode buf mode) 197 (funcall set-buffer-mode buf mode)
196 (funcall set-buffer-contents buf size include) 198 (funcall set-buffer-contents buf size include)
197 buf))) 199 buf)))
@@ -213,6 +215,8 @@
213 (clean-up 215 (clean-up
214 (lambda () 216 (lambda ()
215 "Restore all emacs state modified during the tests" 217 "Restore all emacs state modified during the tests"
218 (dolist (f test-file-list)
219 (and f (file-exists-p f) (delete-file f)))
216 (while test-buffer-list ; created temporary buffers 220 (while test-buffer-list ; created temporary buffers
217 (let ((buf (pop test-buffer-list))) 221 (let ((buf (pop test-buffer-list)))
218 (with-current-buffer buf (bury-buffer)) ; ensure not selected 222 (with-current-buffer buf (bury-buffer)) ; ensure not selected
@@ -220,7 +224,7 @@
220 ;; Tests 224 ;; Tests
221 (ert-deftest ibuffer-filter-inclusion-1 () 225 (ert-deftest ibuffer-filter-inclusion-1 ()
222 "Tests inclusion using basic filter combinators with a single buffer." 226 "Tests inclusion using basic filter combinators with a single buffer."
223 (skip-unless (featurep 'ibuf-ext)) 227 (require 'ibuf-ext)
224 (unwind-protect 228 (unwind-protect
225 (let ((buf 229 (let ((buf
226 (funcall create-file-buffer "ibuf-test-1" :size 100 230 (funcall create-file-buffer "ibuf-test-1" :size 100
@@ -263,7 +267,7 @@
263 267
264 (ert-deftest ibuffer-filter-inclusion-2 () 268 (ert-deftest ibuffer-filter-inclusion-2 ()
265 "Tests inclusion of basic filters in combination on a single buffer." 269 "Tests inclusion of basic filters in combination on a single buffer."
266 (skip-unless (featurep 'ibuf-ext)) 270 (require 'ibuf-ext)
267 (unwind-protect 271 (unwind-protect
268 (let ((buf 272 (let ((buf
269 (funcall create-file-buffer "ibuf-test-2" :size 200 273 (funcall create-file-buffer "ibuf-test-2" :size 200
@@ -298,7 +302,7 @@
298 302
299 (ert-deftest ibuffer-filter-inclusion-3 () 303 (ert-deftest ibuffer-filter-inclusion-3 ()
300 "Tests inclusion with filename filters on specified buffers." 304 "Tests inclusion with filename filters on specified buffers."
301 (skip-unless (featurep 'ibuf-ext)) 305 (require 'ibuf-ext)
302 (unwind-protect 306 (unwind-protect
303 (let* ((bufA 307 (let* ((bufA
304 (funcall create-file-buffer "ibuf-test-3.a" :size 50 308 (funcall create-file-buffer "ibuf-test-3.a" :size 50
@@ -332,7 +336,7 @@
332 336
333 (ert-deftest ibuffer-filter-inclusion-4 () 337 (ert-deftest ibuffer-filter-inclusion-4 ()
334 "Tests inclusion with various filters on a single buffer." 338 "Tests inclusion with various filters on a single buffer."
335 (skip-unless (featurep 'ibuf-ext)) 339 (require 'ibuf-ext)
336 (unwind-protect 340 (unwind-protect
337 (let ((buf 341 (let ((buf
338 (funcall create-file-buffer "ibuf-test-4" 342 (funcall create-file-buffer "ibuf-test-4"
@@ -366,7 +370,7 @@
366 370
367 (ert-deftest ibuffer-filter-inclusion-5 () 371 (ert-deftest ibuffer-filter-inclusion-5 ()
368 "Tests inclusion with various filters on a single buffer." 372 "Tests inclusion with various filters on a single buffer."
369 (skip-unless (featurep 'ibuf-ext)) 373 (require 'ibuf-ext)
370 (unwind-protect 374 (unwind-protect
371 (let ((buf 375 (let ((buf
372 (funcall create-non-file-buffer "ibuf-test-5.el" 376 (funcall create-non-file-buffer "ibuf-test-5.el"
@@ -392,7 +396,7 @@
392 396
393 (ert-deftest ibuffer-filter-inclusion-6 () 397 (ert-deftest ibuffer-filter-inclusion-6 ()
394 "Tests inclusion using saved filters and DeMorgan's laws." 398 "Tests inclusion using saved filters and DeMorgan's laws."
395 (skip-unless (featurep 'ibuf-ext)) 399 (require 'ibuf-ext)
396 (unwind-protect 400 (unwind-protect
397 (let ((buf 401 (let ((buf
398 (funcall create-non-file-buffer "*ibuf-test-6*" :size 65 402 (funcall create-non-file-buffer "*ibuf-test-6*" :size 65
@@ -425,7 +429,7 @@
425 429
426 (ert-deftest ibuffer-filter-inclusion-7 () 430 (ert-deftest ibuffer-filter-inclusion-7 ()
427 "Tests inclusion with various filters on a single buffer." 431 "Tests inclusion with various filters on a single buffer."
428 (skip-unless (featurep 'ibuf-ext)) 432 (require 'ibuf-ext)
429 (unwind-protect 433 (unwind-protect
430 (let ((buf 434 (let ((buf
431 (funcall create-non-file-buffer "ibuf-test-7" 435 (funcall create-non-file-buffer "ibuf-test-7"
@@ -446,7 +450,7 @@
446 450
447 (ert-deftest ibuffer-filter-inclusion-8 () 451 (ert-deftest ibuffer-filter-inclusion-8 ()
448 "Tests inclusion with various filters." 452 "Tests inclusion with various filters."
449 (skip-unless (featurep 'ibuf-ext)) 453 (require 'ibuf-ext)
450 (unwind-protect 454 (unwind-protect
451 (let ((bufA 455 (let ((bufA
452 (funcall create-non-file-buffer "ibuf-test-8a" 456 (funcall create-non-file-buffer "ibuf-test-8a"
@@ -534,7 +538,7 @@
534 ;; Tests 538 ;; Tests
535 (ert-deftest ibuffer-decompose-filter () 539 (ert-deftest ibuffer-decompose-filter ()
536 "Tests `ibuffer-decompose-filter' for and, or, not, and saved." 540 "Tests `ibuffer-decompose-filter' for and, or, not, and saved."
537 (skip-unless (featurep 'ibuf-ext)) 541 (require 'ibuf-ext)
538 (unwind-protect 542 (unwind-protect
539 (let ((ibuf (funcall get-test-ibuffer))) 543 (let ((ibuf (funcall get-test-ibuffer)))
540 (with-current-buffer ibuf 544 (with-current-buffer ibuf
@@ -583,7 +587,7 @@
583 587
584 (ert-deftest ibuffer-and-filter () 588 (ert-deftest ibuffer-and-filter ()
585 "Tests `ibuffer-and-filter' in an Ibuffer buffer." 589 "Tests `ibuffer-and-filter' in an Ibuffer buffer."
586 (skip-unless (featurep 'ibuf-ext)) 590 (require 'ibuf-ext)
587 (unwind-protect 591 (unwind-protect
588 (let ((ibuf (funcall get-test-ibuffer))) 592 (let ((ibuf (funcall get-test-ibuffer)))
589 (with-current-buffer ibuf 593 (with-current-buffer ibuf
@@ -660,7 +664,7 @@
660 664
661 (ert-deftest ibuffer-or-filter () 665 (ert-deftest ibuffer-or-filter ()
662 "Tests `ibuffer-or-filter' in an Ibuffer buffer." 666 "Tests `ibuffer-or-filter' in an Ibuffer buffer."
663 (skip-unless (featurep 'ibuf-ext)) 667 (require 'ibuf-ext)
664 (unwind-protect 668 (unwind-protect
665 (let ((ibuf (funcall get-test-ibuffer))) 669 (let ((ibuf (funcall get-test-ibuffer)))
666 (with-current-buffer ibuf 670 (with-current-buffer ibuf
@@ -737,7 +741,7 @@
737 741
738(ert-deftest ibuffer-format-qualifier () 742(ert-deftest ibuffer-format-qualifier ()
739 "Tests string recommendation of filter from `ibuffer-format-qualifier'." 743 "Tests string recommendation of filter from `ibuffer-format-qualifier'."
740 (skip-unless (featurep 'ibuf-ext)) 744 (require 'ibuf-ext)
741 (let ((test1 '(mode . org-mode)) 745 (let ((test1 '(mode . org-mode))
742 (test2 '(size-lt . 100)) 746 (test2 '(size-lt . 100))
743 (test3 '(derived-mode . prog-mode)) 747 (test3 '(derived-mode . prog-mode))
@@ -802,7 +806,7 @@
802 806
803(ert-deftest ibuffer-unary-operand () 807(ert-deftest ibuffer-unary-operand ()
804 "Tests `ibuffer-unary-operand': (not cell) or (not . cell) -> cell." 808 "Tests `ibuffer-unary-operand': (not cell) or (not . cell) -> cell."
805 (skip-unless (featurep 'ibuf-ext)) 809 (require 'ibuf-ext)
806 (should (equal (ibuffer-unary-operand '(not . (mode "foo"))) 810 (should (equal (ibuffer-unary-operand '(not . (mode "foo")))
807 '(mode "foo"))) 811 '(mode "foo")))
808 (should (equal (ibuffer-unary-operand '(not (mode "foo"))) 812 (should (equal (ibuffer-unary-operand '(not (mode "foo")))
diff --git a/test/lisp/international/ucs-normalize-tests.el b/test/lisp/international/ucs-normalize-tests.el
index d85efe2d7bf..02a4bba7a5f 100644
--- a/test/lisp/international/ucs-normalize-tests.el
+++ b/test/lisp/international/ucs-normalize-tests.el
@@ -26,15 +26,13 @@
26;; If there are lines marked as failing (see 26;; If there are lines marked as failing (see
27;; `ucs-normalize-tests--failing-lines-part1' and 27;; `ucs-normalize-tests--failing-lines-part1' and
28;; `ucs-normalize-tests--failing-lines-part2'), they may need to be 28;; `ucs-normalize-tests--failing-lines-part2'), they may need to be
29;; adjusted when NormalizationTest.txt is updated. To get a list of 29;; adjusted when NormalizationTest.txt is updated. Run the function
30;; currently failing lines, set those 2 variables to nil, run the 30;; `ucs-normalize-check-failing-lines' to see what changes are needed.
31;; tests, and inspect the values of
32;; `ucs-normalize-tests--part1-rule1-failed-lines' and
33;; `ucs-normalize-tests--part1-rule2-failed-chars', respectively.
34 31
35;;; Code: 32;;; Code:
36 33
37(eval-when-compile (require 'cl-lib)) 34(eval-when-compile (require 'cl-lib))
35(require 'seq)
38(require 'ert) 36(require 'ert)
39(require 'ucs-normalize) 37(require 'ucs-normalize)
40 38
@@ -44,83 +42,98 @@
44(defun ucs-normalize-tests--parse-column () 42(defun ucs-normalize-tests--parse-column ()
45 (let ((chars nil) 43 (let ((chars nil)
46 (term nil)) 44 (term nil))
47 (while (and (not (equal term ";")) 45 (while (and (not (eq term ?\;))
48 (looking-at "\\([[:xdigit:]]\\{4,6\\}\\)\\([; ]\\)")) 46 (looking-at "\\([[:xdigit:]]\\{4,6\\}\\)\\([; ]\\)"))
49 (let ((code-point (match-string 1))) 47 (let ((code-point (match-string-no-properties 1)))
50 (setq term (match-string 2)) 48 (setq term (char-after (match-beginning 2)))
51 (goto-char (match-end 0)) 49 (goto-char (match-end 0))
52 (push (string-to-number code-point 16) chars))) 50 (push (string-to-number code-point 16) chars)))
53 (nreverse chars))) 51 (apply #'string (nreverse chars))))
54 52
55(defmacro ucs-normalize-tests--normalize (norm str) 53(defconst ucs-normalize-tests--norm-buf (generate-new-buffer " *ucs-normalizing-buffer*"))
54
55(defmacro ucs-normalize-tests--normalization-equal-p (norm str equal-to)
56 "Like `ucs-normalize-string' but reuse current buffer for efficiency. 56 "Like `ucs-normalize-string' but reuse current buffer for efficiency.
57And NORM is one of the symbols `NFC', `NFD', `NFKC', `NFKD' for brevity." 57And NORM is one of the symbols `NFC', `NFD', `NFKC', `NFKD' for brevity."
58 (let ((norm-alist '((NFC . ucs-normalize-NFC-region) 58 (let ((norm-alist '((NFC . ucs-normalize-NFC-region)
59 (NFD . ucs-normalize-NFD-region) 59 (NFD . ucs-normalize-NFD-region)
60 (NFKC . ucs-normalize-NFKC-region) 60 (NFKC . ucs-normalize-NFKC-region)
61 (NFKD . ucs-normalize-NFKD-region)))) 61 (NFKD . ucs-normalize-NFKD-region))))
62 `(save-restriction 62 `(with-current-buffer ucs-normalize-tests--norm-buf
63 (narrow-to-region (point) (point)) 63 (erase-buffer)
64 (insert ,str) 64 (insert ,str)
65 (funcall #',(cdr (assq norm norm-alist)) (point-min) (point-max)) 65 (,(cdr (assq norm norm-alist)) (point-min) (point-max))
66 (delete-and-extract-region (point-min) (point-max))))) 66 (goto-char (point-min))
67 (insert ,equal-to)
68 (eq (compare-buffer-substrings nil nil (point) nil (point) nil) 0))))
69
70(defmacro ucs-normalize-tests--normalization-chareq-p (norm char char-eq-to)
71 "Like `ucs-normalize-string' but reuse current buffer for efficiency.
72And NORM is one of the symbols `NFC', `NFD', `NFKC', `NFKD' for brevity."
73 (let ((norm-alist '((NFC . ucs-normalize-NFC-region)
74 (NFD . ucs-normalize-NFD-region)
75 (NFKC . ucs-normalize-NFKC-region)
76 (NFKD . ucs-normalize-NFKD-region))))
77 `(with-current-buffer ucs-normalize-tests--norm-buf
78 (erase-buffer)
79 (insert ,char)
80 (,(cdr (assq norm norm-alist)) (point-min) (point-max))
81 (and (eq (buffer-size) 1)
82 (eq (char-after (point-min)) ,char-eq-to)))))
67 83
68(defvar ucs-normalize-tests--chars-part1 nil) 84(defvar ucs-normalize-tests--chars-part1 nil)
69 85
70(defun ucs-normalize-tests--invariants-hold-p (&rest columns) 86(defsubst ucs-normalize-tests--rule1-holds-p (source nfc nfd nfkc nfkd)
71 "Check 1st conformance rule. 87 "Check 1st conformance rule.
72The following invariants must be true for all conformant implementations..." 88The following invariants must be true for all conformant implementations..."
73 (when ucs-normalize-tests--chars-part1 89 (when ucs-normalize-tests--chars-part1
74 ;; See `ucs-normalize-tests--invariants-rule2-hold-p'. 90 ;; See `ucs-normalize-tests--rule2-holds-p'.
75 (aset ucs-normalize-tests--chars-part1 91 (aset ucs-normalize-tests--chars-part1
76 (caar columns) 1)) 92 (aref source 0) 1))
77 (cl-destructuring-bind (source nfc nfd nfkc nfkd) 93 (and
78 (mapcar (lambda (c) (apply #'string c)) columns) 94 ;; c2 == toNFC(c1) == toNFC(c2) == toNFC(c3)
79 (and 95 (ucs-normalize-tests--normalization-equal-p NFC source nfc)
80 ;; c2 == toNFC(c1) == toNFC(c2) == toNFC(c3) 96 (ucs-normalize-tests--normalization-equal-p NFC nfc nfc)
81 (equal nfc (ucs-normalize-tests--normalize NFC source)) 97 (ucs-normalize-tests--normalization-equal-p NFC nfd nfc)
82 (equal nfc (ucs-normalize-tests--normalize NFC nfc)) 98 ;; c4 == toNFC(c4) == toNFC(c5)
83 (equal nfc (ucs-normalize-tests--normalize NFC nfd)) 99 (ucs-normalize-tests--normalization-equal-p NFC nfkc nfkc)
84 ;; c4 == toNFC(c4) == toNFC(c5) 100 (ucs-normalize-tests--normalization-equal-p NFC nfkd nfkc)
85 (equal nfkc (ucs-normalize-tests--normalize NFC nfkc)) 101
86 (equal nfkc (ucs-normalize-tests--normalize NFC nfkd)) 102 ;; c3 == toNFD(c1) == toNFD(c2) == toNFD(c3)
87 103 (ucs-normalize-tests--normalization-equal-p NFD source nfd)
88 ;; c3 == toNFD(c1) == toNFD(c2) == toNFD(c3) 104 (ucs-normalize-tests--normalization-equal-p NFD nfc nfd)
89 (equal nfd (ucs-normalize-tests--normalize NFD source)) 105 (ucs-normalize-tests--normalization-equal-p NFD nfd nfd)
90 (equal nfd (ucs-normalize-tests--normalize NFD nfc)) 106 ;; c5 == toNFD(c4) == toNFD(c5)
91 (equal nfd (ucs-normalize-tests--normalize NFD nfd)) 107 (ucs-normalize-tests--normalization-equal-p NFD nfkc nfkd)
92 ;; c5 == toNFD(c4) == toNFD(c5) 108 (ucs-normalize-tests--normalization-equal-p NFD nfkd nfkd)
93 (equal nfkd (ucs-normalize-tests--normalize NFD nfkc)) 109
94 (equal nfkd (ucs-normalize-tests--normalize NFD nfkd)) 110 ;; c4 == toNFKC(c1) == toNFKC(c2) == toNFKC(c3) == toNFKC(c4) == toNFKC(c5)
95 111 (ucs-normalize-tests--normalization-equal-p NFKC source nfkc)
96 ;; c4 == toNFKC(c1) == toNFKC(c2) == toNFKC(c3) == toNFKC(c4) == toNFKC(c5) 112 (ucs-normalize-tests--normalization-equal-p NFKC nfc nfkc)
97 (equal nfkc (ucs-normalize-tests--normalize NFKC source)) 113 (ucs-normalize-tests--normalization-equal-p NFKC nfd nfkc)
98 (equal nfkc (ucs-normalize-tests--normalize NFKC nfc)) 114 (ucs-normalize-tests--normalization-equal-p NFKC nfkc nfkc)
99 (equal nfkc (ucs-normalize-tests--normalize NFKC nfd)) 115 (ucs-normalize-tests--normalization-equal-p NFKC nfkd nfkc)
100 (equal nfkc (ucs-normalize-tests--normalize NFKC nfkc)) 116
101 (equal nfkc (ucs-normalize-tests--normalize NFKC nfkd)) 117 ;; c5 == toNFKD(c1) == toNFKD(c2) == toNFKD(c3) == toNFKD(c4) == toNFKD(c5)
102 118 (ucs-normalize-tests--normalization-equal-p NFKD source nfkd)
103 ;; c5 == toNFKD(c1) == toNFKD(c2) == toNFKD(c3) == toNFKD(c4) == toNFKD(c5) 119 (ucs-normalize-tests--normalization-equal-p NFKD nfc nfkd)
104 (equal nfkd (ucs-normalize-tests--normalize NFKD source)) 120 (ucs-normalize-tests--normalization-equal-p NFKD nfd nfkd)
105 (equal nfkd (ucs-normalize-tests--normalize NFKD nfc)) 121 (ucs-normalize-tests--normalization-equal-p NFKD nfkc nfkd)
106 (equal nfkd (ucs-normalize-tests--normalize NFKD nfd)) 122 (ucs-normalize-tests--normalization-equal-p NFKD nfkd nfkd)))
107 (equal nfkd (ucs-normalize-tests--normalize NFKD nfkc)) 123
108 (equal nfkd (ucs-normalize-tests--normalize NFKD nfkd))))) 124(defsubst ucs-normalize-tests--rule2-holds-p (X)
109
110(defun ucs-normalize-tests--invariants-rule2-hold-p (char)
111 "Check 2nd conformance rule. 125 "Check 2nd conformance rule.
112For every code point X assigned in this version of Unicode that is not specifically 126For every code point X assigned in this version of Unicode that is not specifically
113listed in Part 1, the following invariants must be true for all conformant 127listed in Part 1, the following invariants must be true for all conformant
114implementations: 128implementations:
115 129
116 X == toNFC(X) == toNFD(X) == toNFKC(X) == toNFKD(X)" 130 X == toNFC(X) == toNFD(X) == toNFKC(X) == toNFKD(X)"
117 (let ((X (string char))) 131 (and (ucs-normalize-tests--normalization-chareq-p NFC X X)
118 (and (equal X (ucs-normalize-tests--normalize NFC X)) 132 (ucs-normalize-tests--normalization-chareq-p NFD X X)
119 (equal X (ucs-normalize-tests--normalize NFD X)) 133 (ucs-normalize-tests--normalization-chareq-p NFKC X X)
120 (equal X (ucs-normalize-tests--normalize NFKC X)) 134 (ucs-normalize-tests--normalization-chareq-p NFKD X X)))
121 (equal X (ucs-normalize-tests--normalize NFKD X)))))
122 135
123(cl-defun ucs-normalize-tests--invariants-failing-for-part (part &optional skip-lines &key progress-str) 136(cl-defun ucs-normalize-tests--rule1-failing-for-partX (part &optional skip-lines &key progress-str)
124 "Returns a list of failed line numbers." 137 "Returns a list of failed line numbers."
125 (with-temp-buffer 138 (with-temp-buffer
126 (insert-file-contents ucs-normalize-test-data-file) 139 (insert-file-contents ucs-normalize-test-data-file)
@@ -136,8 +149,8 @@ implementations:
136 progress-str beg-line end-line 149 progress-str beg-line end-line
137 0 nil 0.5)) 150 0 nil 0.5))
138 for line from beg-line to (1- end-line) 151 for line from beg-line to (1- end-line)
139 unless (or (= (following-char) ?#) 152 unless (or (eq (following-char) ?#)
140 (ucs-normalize-tests--invariants-hold-p 153 (ucs-normalize-tests--rule1-holds-p
141 (ucs-normalize-tests--parse-column) 154 (ucs-normalize-tests--parse-column)
142 (ucs-normalize-tests--parse-column) 155 (ucs-normalize-tests--parse-column)
143 (ucs-normalize-tests--parse-column) 156 (ucs-normalize-tests--parse-column)
@@ -148,7 +161,7 @@ implementations:
148 do (forward-line) 161 do (forward-line)
149 if reporter do (progress-reporter-update reporter line))))) 162 if reporter do (progress-reporter-update reporter line)))))
150 163
151(defun ucs-normalize-tests--invariants-failing-for-lines (lines) 164(defun ucs-normalize-tests--rule1-failing-for-lines (lines)
152 "Returns a list of failed line numbers." 165 "Returns a list of failed line numbers."
153 (with-temp-buffer 166 (with-temp-buffer
154 (insert-file-contents ucs-normalize-test-data-file) 167 (insert-file-contents ucs-normalize-test-data-file)
@@ -156,7 +169,7 @@ implementations:
156 (cl-loop for prev-line = 1 then line 169 (cl-loop for prev-line = 1 then line
157 for line in lines 170 for line in lines
158 do (forward-line (- line prev-line)) 171 do (forward-line (- line prev-line))
159 unless (ucs-normalize-tests--invariants-hold-p 172 unless (ucs-normalize-tests--rule1-holds-p
160 (ucs-normalize-tests--parse-column) 173 (ucs-normalize-tests--parse-column)
161 (ucs-normalize-tests--parse-column) 174 (ucs-normalize-tests--parse-column)
162 (ucs-normalize-tests--parse-column) 175 (ucs-normalize-tests--parse-column)
@@ -165,7 +178,7 @@ implementations:
165 collect line))) 178 collect line)))
166 179
167(ert-deftest ucs-normalize-part0 () 180(ert-deftest ucs-normalize-part0 ()
168 (should-not (ucs-normalize-tests--invariants-failing-for-part 0))) 181 (should-not (ucs-normalize-tests--rule1-failing-for-partX 0)))
169 182
170(defconst ucs-normalize-tests--failing-lines-part1 183(defconst ucs-normalize-tests--failing-lines-part1
171 (list 15131 15132 15133 15134 15135 15136 15137 15138 184 (list 15131 15132 15133 15134 15135 15136 15137 15138
@@ -195,6 +208,8 @@ implementations:
195 "A list of line numbers.") 208 "A list of line numbers.")
196(defvar ucs-normalize-tests--part1-rule2-failed-chars nil 209(defvar ucs-normalize-tests--part1-rule2-failed-chars nil
197 "A list of code points.") 210 "A list of code points.")
211(defvar ucs-normalize-tests--part2-rule1-failed-lines nil
212 "A list of line numbers.")
198 213
199(defun ucs-normalize-tests--part1-rule2 (chars-part1) 214(defun ucs-normalize-tests--part1-rule2 (chars-part1)
200 (let ((reporter (make-progress-reporter "UCS Normalize Test Part1, rule 2" 215 (let ((reporter (make-progress-reporter "UCS Normalize Test Part1, rule 2"
@@ -204,11 +219,11 @@ implementations:
204 (lambda (char-range listed-in-part) 219 (lambda (char-range listed-in-part)
205 (unless (eq listed-in-part 1) 220 (unless (eq listed-in-part 1)
206 (if (characterp char-range) 221 (if (characterp char-range)
207 (progn (unless (ucs-normalize-tests--invariants-rule2-hold-p char-range) 222 (progn (unless (ucs-normalize-tests--rule2-holds-p char-range)
208 (push char-range failed-chars)) 223 (push char-range failed-chars))
209 (progress-reporter-update reporter char-range)) 224 (progress-reporter-update reporter char-range))
210 (cl-loop for char from (car char-range) to (cdr char-range) 225 (cl-loop for char from (car char-range) to (cdr char-range)
211 unless (ucs-normalize-tests--invariants-rule2-hold-p char) 226 unless (ucs-normalize-tests--rule2-holds-p char)
212 do (push char failed-chars) 227 do (push char failed-chars)
213 do (progress-reporter-update reporter char))))) 228 do (progress-reporter-update reporter char)))))
214 chars-part1) 229 chars-part1)
@@ -219,59 +234,103 @@ implementations:
219 :tags '(:expensive-test) 234 :tags '(:expensive-test)
220 ;; This takes a long time, so make sure we're compiled. 235 ;; This takes a long time, so make sure we're compiled.
221 (dolist (fun '(ucs-normalize-tests--part1-rule2 236 (dolist (fun '(ucs-normalize-tests--part1-rule2
222 ucs-normalize-tests--invariants-failing-for-part 237 ucs-normalize-tests--rule1-failing-for-partX
223 ucs-normalize-tests--invariants-hold-p 238 ucs-normalize-tests--rule1-holds-p
224 ucs-normalize-tests--invariants-rule2-hold-p)) 239 ucs-normalize-tests--rule2-holds-p))
225 (or (byte-code-function-p (symbol-function fun)) 240 (or (byte-code-function-p (symbol-function fun))
226 (byte-compile fun))) 241 (byte-compile fun)))
227 (let ((ucs-normalize-tests--chars-part1 (make-char-table 'ucs-normalize-tests t))) 242 (let ((ucs-normalize-tests--chars-part1 (make-char-table 'ucs-normalize-tests t)))
228 (should-not 243 (setq ucs-normalize-tests--part1-rule1-failed-lines
229 (setq ucs-normalize-tests--part1-rule1-failed-lines 244 (ucs-normalize-tests--rule1-failing-for-partX
230 (ucs-normalize-tests--invariants-failing-for-part 245 1 ucs-normalize-tests--failing-lines-part1
231 1 ucs-normalize-tests--failing-lines-part1 246 :progress-str "UCS Normalize Test Part1, rule 1"))
232 :progress-str "UCS Normalize Test Part1, rule 1"))) 247 (setq ucs-normalize-tests--part1-rule2-failed-chars
233 (should-not (setq ucs-normalize-tests--part1-rule2-failed-chars 248 (ucs-normalize-tests--part1-rule2
234 (ucs-normalize-tests--part1-rule2 249 ucs-normalize-tests--chars-part1))
235 ucs-normalize-tests--chars-part1))))) 250 (should-not ucs-normalize-tests--part1-rule1-failed-lines)
251 (should-not ucs-normalize-tests--part1-rule2-failed-chars)))
236 252
237(ert-deftest ucs-normalize-part1-failing () 253(ert-deftest ucs-normalize-part1-failing ()
238 :expected-result :failed 254 :expected-result :failed
239 (skip-unless ucs-normalize-tests--failing-lines-part1) 255 (skip-unless ucs-normalize-tests--failing-lines-part1)
240 (should-not 256 (should-not
241 (ucs-normalize-tests--invariants-failing-for-lines 257 (ucs-normalize-tests--rule1-failing-for-lines
242 ucs-normalize-tests--failing-lines-part1))) 258 ucs-normalize-tests--failing-lines-part1)))
243 259
244(defconst ucs-normalize-tests--failing-lines-part2 260(defconst ucs-normalize-tests--failing-lines-part2
245 (list 18328 18330 18332 18334 18336 18338 18340 18342 261 (list 17656 17658 18006 18007 18008 18009 18010 18011
246 18344 18346 18348 18350 18352 18354 18356 18358 262 18012 18340 18342 18344 18346 18348 18350 18352
247 18360 18362 18364 18366 18368 18370 18372 18374 263 18354 18356 18358 18360 18362 18364 18366 18368
248 18376 18378 18380 18382 18384 18386 18388 18390 264 18370 18372 18374 18376 18378 18380 18382 18384
249 18392 18394 18396 18398 18400 18402 18404 18406 265 18386 18388 18390 18392 18394 18396 18398 18400
250 18408 18410 18412 18414 18416 18418 18420 18422 266 18402 18404 18406 18408 18410 18412 18414 18416
251 18424 18426 18494 18496 18498 18500 18502 18504 267 18418 18420 18422 18424 18426 18428 18430 18432
252 18506 18508 18510 18512 18514 18516 18518 18520 268 18434 18436 18438 18440 18442 18444 18446 18448
253 18522 18524 18526 18528 18530 18532 18534 18536 269 18450 18518 18520 18522 18524 18526 18528 18530
254 18538 18540 18542 18544 18546 18548 18550 18552 270 18532 18534 18536 18538 18540 18542 18544 18546
255 18554 18556 18558 18560 18562 18564 18566 18568 271 18548 18550 18552 18554 18556 18558 18560 18562
256 18570 18572 18574 18576 18578 18580 18582 18584 272 18564 18566 18568 18570 18572 18574 18576 18578
257 18586 18588 18590 18592 18594 18596)) 273 18580 18582 18584 18586 18588 18590 18592 18594
274 18596 18598 18600 18602 18604 18606 18608 18610
275 18612 18614 18616 18618 18620))
258 276
259(ert-deftest ucs-normalize-part2 () 277(ert-deftest ucs-normalize-part2 ()
260 :tags '(:expensive-test) 278 :tags '(:expensive-test)
261 (should-not 279 (should-not
262 (ucs-normalize-tests--invariants-failing-for-part 280 (setq ucs-normalize-tests--part2-rule1-failed-lines
263 2 ucs-normalize-tests--failing-lines-part2 281 (ucs-normalize-tests--rule1-failing-for-partX
264 :progress-str "UCS Normalize Test Part2"))) 282 2 ucs-normalize-tests--failing-lines-part2
283 :progress-str "UCS Normalize Test Part2"))))
265 284
266(ert-deftest ucs-normalize-part2-failing () 285(ert-deftest ucs-normalize-part2-failing ()
267 :expected-result :failed 286 :expected-result :failed
268 (skip-unless ucs-normalize-tests--failing-lines-part2) 287 (skip-unless ucs-normalize-tests--failing-lines-part2)
269 (should-not 288 (should-not
270 (ucs-normalize-tests--invariants-failing-for-lines 289 (ucs-normalize-tests--rule1-failing-for-lines
271 ucs-normalize-tests--failing-lines-part2))) 290 ucs-normalize-tests--failing-lines-part2)))
272 291
273(ert-deftest ucs-normalize-part3 () 292(ert-deftest ucs-normalize-part3 ()
274 (should-not 293 (should-not
275 (ucs-normalize-tests--invariants-failing-for-part 3))) 294 (ucs-normalize-tests--rule1-failing-for-partX 3)))
295
296(defun ucs-normalize-tests--insert-failing-lines (var newval)
297 (insert (format "`%s' should be updated to:\n
298\(defconst %s
299 (list " var var))
300 (dolist (linos (seq-partition newval 8))
301 (insert (mapconcat #'number-to-string linos " ") "\n"))
302 (insert ")\)"))
303
304(defun ucs-normalize-check-failing-lines ()
305 (interactive)
306 (let ((ucs-normalize-tests--failing-lines-part1 nil)
307 (ucs-normalize-tests--failing-lines-part2 nil))
308 (setq ucs-normalize-tests--part1-rule1-failed-lines nil)
309 (setq ucs-normalize-tests--part1-rule2-failed-chars nil)
310 (setq ucs-normalize-tests--part2-rule1-failed-lines nil)
311 (ert "\\`ucs-normalize"))
312
313 (with-current-buffer (get-buffer-create "*ucs normalize change bad lines*")
314 (erase-buffer)
315 (unless (equal ucs-normalize-tests--part1-rule1-failed-lines
316 ucs-normalize-tests--failing-lines-part1)
317 (ucs-normalize-tests--insert-failing-lines
318 'ucs-normalize-tests--failing-lines-part1
319 ucs-normalize-tests--part1-rule1-failed-lines))
320
321 (when ucs-normalize-tests--part1-rule2-failed-chars
322 (insert (format "Some characters failed rule 2!\n\n%S"
323 `(list ,@ucs-normalize-tests--part1-rule2-failed-chars))))
324
325 (unless (equal ucs-normalize-tests--part2-rule1-failed-lines
326 ucs-normalize-tests--failing-lines-part2)
327 (ucs-normalize-tests--insert-failing-lines
328 'ucs-normalize-tests--failing-lines-part2
329 ucs-normalize-tests--part2-rule1-failed-lines))
330 (if (> (buffer-size) 0)
331 (if noninteractive
332 (princ (buffer-string) standard-output)
333 (display-buffer (current-buffer)))
334 (message "No changes to failing lines needed"))))
276 335
277;;; ucs-normalize-tests.el ends here 336;;; ucs-normalize-tests.el ends here
diff --git a/test/lisp/net/gnutls-tests.el b/test/lisp/net/gnutls-tests.el
new file mode 100644
index 00000000000..9dbb6c05b9e
--- /dev/null
+++ b/test/lisp/net/gnutls-tests.el
@@ -0,0 +1,295 @@
1;;; gnutls-tests.el --- Test suite for gnutls.el
2
3;; Copyright (C) 2017 Free Software Foundation, Inc.
4
5;; Author: Ted Zlatanov <tzz@lifelogs.com>
6
7;; This file is part of GNU Emacs.
8
9;; GNU Emacs is free software: you can redistribute it and/or modify
10;; it under the terms of the GNU General Public License as published by
11;; the Free Software Foundation, either version 3 of the License, or
12;; (at your option) any later version.
13
14;; GNU Emacs is distributed in the hope that it will be useful,
15;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17;; GNU General Public License for more details.
18
19;; You should have received a copy of the GNU General Public License
20;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
21
22;;; Commentary:
23
24;; Run this with `GNUTLS_TEST_VERBOSE=1' to get verbose debugging.
25
26;;; Code:
27
28(require 'ert)
29(require 'cl)
30(require 'gnutls)
31(require 'hex-util)
32
33(defvar gnutls-tests-message-prefix "")
34
35(defsubst gnutls-tests-message (format-string &rest args)
36 (when (getenv "GNUTLS_TEST_VERBOSE")
37 (apply #'message (concat "gnutls-tests: " gnutls-tests-message-prefix format-string) args)))
38
39;; Minor convenience to see strings more easily (without binary data).
40(defsubst gnutls-tests-hexstring-equal (a b)
41 (and (stringp a) (stringp b) (string-equal (encode-hex-string a) (encode-hex-string b))))
42
43(defvar gnutls-tests-internal-macs-upcased
44 (mapcar (lambda (sym) (cons sym (intern (upcase (symbol-name sym)))))
45 (secure-hash-algorithms)))
46
47(defvar gnutls-tests-tested-macs
48 (when (gnutls-available-p)
49 (remove-duplicates
50 (append (mapcar 'cdr gnutls-tests-internal-macs-upcased)
51 (mapcar 'car (gnutls-macs))))))
52
53(defvar gnutls-tests-tested-digests
54 (when (gnutls-available-p)
55 (remove-duplicates
56 (append (mapcar 'cdr gnutls-tests-internal-macs-upcased)
57 (mapcar 'car (gnutls-digests))))))
58
59(defvar gnutls-tests-tested-ciphers
60 (when (gnutls-available-p)
61 (remove-duplicates
62 ; these cause FPEs or SEGVs
63 (remove-if (lambda (e) (memq e '(ARCFOUR-128)))
64 (mapcar 'car (gnutls-ciphers))))))
65
66(defvar gnutls-tests-mondo-strings
67 (list
68 ""
69 "some data"
70 "lots and lots of data lots and lots of data lots and lots of data lots and lots of data lots and lots of data lots and lots of data lots and lots of data lots and lots of data lots and lots of data lots and lots of data lots and lots of data lots and lots of data lots and lots of data lots and lots of data lots and lots of data lots and lots of data lots and lots of data lots and lots of data lots and lots of data lots and lots of data lots and lots of data "
71 "data and more data to go over the block limit!"
72 "data and more data to go over the block limit"
73 (format "some random data %d%d" (random) (random))))
74
75(ert-deftest test-gnutls-000-availability ()
76 "Test the GnuTLS hashes and ciphers availability."
77 (skip-unless (memq 'gnutls3 (gnutls-available-p)))
78 (setq gnutls-tests-message-prefix "availability: ")
79 (should (> (length gnutls-tests-internal-macs-upcased) 5))
80 (let ((macs (gnutls-macs))
81 (digests (gnutls-digests))
82 (ciphers (gnutls-ciphers)))
83 (dolist (mac gnutls-tests-tested-macs)
84 (let ((plist (cdr (assq mac macs))))
85 (gnutls-tests-message "MAC %s %S" mac plist)
86 (dolist (prop '(:mac-algorithm-id :mac-algorithm-length :mac-algorithm-keysize :mac-algorithm-noncesize))
87 (should (plist-get plist prop)))
88 (should (eq 'gnutls-mac-algorithm (plist-get plist :type)))))
89 (dolist (digest gnutls-tests-tested-digests)
90 (let ((plist (cdr (assq digest digests))))
91 (gnutls-tests-message "digest %s %S" digest plist)
92 (dolist (prop '(:digest-algorithm-id :digest-algorithm-length))
93 (should (plist-get plist prop)))
94 (should (eq 'gnutls-digest-algorithm (plist-get plist :type)))))
95 (dolist (cipher gnutls-tests-tested-ciphers)
96 (let ((plist (cdr (assq cipher ciphers))))
97 (gnutls-tests-message "cipher %s %S" cipher plist)
98 (dolist (prop '(:cipher-id :cipher-blocksize :cipher-keysize :cipher-ivsize))
99 (should (plist-get plist prop)))
100 (should (eq 'gnutls-symmetric-cipher (plist-get plist :type)))))))
101
102(ert-deftest test-gnutls-000-data-extractions ()
103 "Test the GnuTLS data extractions against the built-in `secure-hash'."
104 (skip-unless (memq 'digests (gnutls-available-p)))
105 (setq gnutls-tests-message-prefix "data extraction: ")
106 (dolist (input gnutls-tests-mondo-strings)
107 ;; Test buffer extraction
108 (with-temp-buffer
109 (insert input)
110 (insert "not ASCII: не e английски")
111 (dolist (step '(0 1 2 3 4 5))
112 (let ((spec (list (current-buffer) ; a buffer spec
113 (point-min)
114 (max (point-min) (- step (point-max)))))
115 (spec2 (list (buffer-string) ; a string spec
116 (point-min)
117 (max (point-min) (- step (point-max))))))
118 (should (gnutls-tests-hexstring-equal
119 (gnutls-hash-digest 'MD5 spec)
120 (apply 'secure-hash 'md5 (append spec '(t)))))
121 (should (gnutls-tests-hexstring-equal
122 (gnutls-hash-digest 'MD5 spec2)
123 (apply 'secure-hash 'md5 (append spec2 '(t))))))))))
124
125(ert-deftest test-gnutls-001-hashes-internal-digests ()
126 "Test the GnuTLS hash digests against the built-in `secure-hash'."
127 (skip-unless (memq 'digests (gnutls-available-p)))
128 (setq gnutls-tests-message-prefix "digest internal verification: ")
129 (let ((macs (gnutls-macs)))
130 (dolist (mcell gnutls-tests-internal-macs-upcased)
131 (let ((plist (cdr (assq (cdr mcell) macs))))
132 (gnutls-tests-message "Checking digest MAC %S %S" mcell plist)
133 (dolist (input gnutls-tests-mondo-strings)
134 ;; Test buffer extraction
135 (with-temp-buffer
136 (insert input)
137 (should (gnutls-tests-hexstring-equal
138 (gnutls-hash-digest (cdr mcell) (current-buffer))
139 (secure-hash (car mcell) (current-buffer) nil nil t))))
140 (should (gnutls-tests-hexstring-equal
141 (gnutls-hash-digest (cdr mcell) input)
142 (secure-hash (car mcell) input nil nil t))))))))
143
144(ert-deftest test-gnutls-002-hashes-digests ()
145 "Test some GnuTLS hash digests against pre-defined outputs."
146 (skip-unless (memq 'digests (gnutls-available-p)))
147 (setq gnutls-tests-message-prefix "digest external verification: ")
148 (let ((macs (gnutls-macs)))
149 (dolist (test '(("57edf4a22be3c955ac49da2e2107b67a" "12345678901234567890123456789012345678901234567890123456789012345678901234567890" MD5)
150 ("d174ab98d277d9f5a5611c2c9f419d9f" "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" MD5)
151 ("c3fcd3d76192e4007dfb496cca67e13b" "abcdefghijklmnopqrstuvwxyz" MD5)
152 ("f96b697d7cb7938d525a2f31aaf161d0" "message digest" MD5)
153 ("900150983cd24fb0d6963f7d28e17f72" "abc" MD5)
154 ("0cc175b9c0f1b6a831c399e269772661" "a" MD5)
155 ("a9993e364706816aba3e25717850c26c9cd0d89d" "abc" SHA1)
156 ("a9993e364706816aba3e25717850c26c9cd0d89d" "abc" "SHA1"))) ; check string ID for digest
157 (destructuring-bind (hash input mac) test
158 (let ((plist (cdr (assq mac macs)))
159 result resultb)
160 (gnutls-tests-message "%s %S" mac plist)
161 (setq result (encode-hex-string (gnutls-hash-digest mac input)))
162 (gnutls-tests-message "%S => result %S" test result)
163 (should (string-equal result hash))
164 ;; Test buffer extraction
165 (with-temp-buffer
166 (insert input)
167 (setq resultb (encode-hex-string (gnutls-hash-digest mac (current-buffer))))
168 (gnutls-tests-message "%S => result from buffer %S" test resultb)
169 (should (string-equal resultb hash))))))))
170
171(ert-deftest test-gnutls-003-hashes-hmacs ()
172 "Test some predefined GnuTLS HMAC outputs for SHA256."
173 (skip-unless (memq 'macs (gnutls-available-p)))
174 (setq gnutls-tests-message-prefix "HMAC verification: ")
175 (let ((macs (gnutls-macs)))
176 (dolist (test '(("f5c5021e60d9686fef3bb0414275fe4163bece61d9a95fec7a273746a437b986" "hello\n" "test" SHA256)
177 ("46b75292b81002fd873e89c532a1b8545d6efc9822ee938feba6de2723161a67" "more and more data goes into a file to exceed the buffer size" "test" SHA256)
178 ("81568ba71fa2c5f33cc84bf362466988f98eba3735479100b4e8908acad87ac4" "more and more data goes into a file to exceed the buffer size" "very long key goes here to exceed the key size" SHA256)
179 ("4bc830005783a73b8112f4bd5f4aa5f92e05b51e9b55c0cd6f9a7bee48371def" "more and more data goes into a file to exceed the buffer size" "" "SHA256") ; check string ID for HMAC
180 ("4bc830005783a73b8112f4bd5f4aa5f92e05b51e9b55c0cd6f9a7bee48371def" "more and more data goes into a file to exceed the buffer size" "" SHA256)))
181 (destructuring-bind (hash input key mac) test
182 (let ((plist (cdr (assq mac macs)))
183 result)
184 (gnutls-tests-message "%s %S" mac plist)
185 (setq result (encode-hex-string (gnutls-hash-mac mac (copy-sequence key) input)))
186 (gnutls-tests-message "%S => result %S" test result)
187 (should (string-equal result hash)))))))
188
189
190(defun gnutls-tests-pad-or-trim (s exact)
191 "Pad or trim string S to EXACT numeric size."
192 (if (and (consp s) (eq 'iv-auto (nth 0 s)))
193 s
194 (let ((e (number-to-string exact)))
195 (format (concat "%" e "." e "s") s))))
196
197(defun gnutls-tests-pad-to-multiple (s blocksize)
198 "Pad string S to BLOCKSIZE numeric size."
199 (let* ((e (if (string= s "")
200 blocksize
201 (* blocksize (ceiling (length s) blocksize))))
202 (out (concat s (make-string (- e (length s)) ? ))))
203 ;; (gnutls-tests-message "padding %S to length %d for blocksize %d: => %S" s e blocksize out)
204 out))
205
206;; ;;; Testing from the command line:
207;; ;;; echo e36a9d13c15a6df23a59a6337d6132b8f7cd5283cb4784b81141b52343a18e5f5e5ee8f5553c23167409dd222478bc30 | perl -lne 'print pack "H*", $_' | openssl enc -aes-128-ctr -d -nosalt -K 6d796b657932 -iv 696e697432 | od -x
208(ert-deftest test-gnutls-004-symmetric-ciphers ()
209 "Test the GnuTLS symmetric ciphers"
210 (skip-unless (memq 'ciphers (gnutls-available-p)))
211 (setq gnutls-tests-message-prefix "symmetric cipher verification: ")
212 ;; we expect at least 10 ciphers
213 (should (> (length (gnutls-ciphers)) 10))
214 (let ((keys '("mykey" "mykey2"))
215 (inputs gnutls-tests-mondo-strings)
216 (ivs '("" "-abc123-" "init" "ini2"))
217 (ciphers (remove-if
218 (lambda (c) (plist-get (cdr (assq c (gnutls-ciphers)))
219 :cipher-aead-capable))
220 gnutls-tests-tested-ciphers)))
221
222 (dolist (cipher ciphers)
223 (dolist (iv ivs)
224 (dolist (input inputs)
225 (dolist (key keys)
226 (gnutls-tests-message "%S, starting key %S IV %S input %S" (assq cipher (gnutls-ciphers)) key iv input)
227 (let* ((cplist (cdr (assq cipher (gnutls-ciphers))))
228 (key (gnutls-tests-pad-or-trim key (plist-get cplist :cipher-keysize)))
229 (input (gnutls-tests-pad-to-multiple input (plist-get cplist :cipher-blocksize)))
230 (iv (gnutls-tests-pad-or-trim iv (plist-get cplist :cipher-ivsize)))
231 (output (gnutls-symmetric-encrypt cplist (copy-sequence key) iv input))
232 (data (nth 0 output))
233 (actual-iv (nth 1 output))
234 (reverse-output (gnutls-symmetric-decrypt cplist (copy-sequence key) actual-iv data))
235 (reverse (nth 0 reverse-output)))
236 (gnutls-tests-message "%s %S" cipher cplist)
237 (gnutls-tests-message "key %S IV %S input %S => hexdata %S and reverse %S" key iv input (encode-hex-string data) reverse)
238 (should-not (gnutls-tests-hexstring-equal input data))
239 (should-not (gnutls-tests-hexstring-equal data reverse))
240 (should (gnutls-tests-hexstring-equal input reverse)))))))))
241
242(ert-deftest test-gnutls-005-aead-ciphers ()
243 "Test the GnuTLS AEAD ciphers"
244 (skip-unless (memq 'AEAD-ciphers (gnutls-available-p)))
245 (setq gnutls-tests-message-prefix "AEAD verification: ")
246 (let ((keys '("mykey" "mykey2"))
247 (inputs gnutls-tests-mondo-strings)
248 (ivs '("" "-abc123-" "init" "ini2"))
249 (auths '(nil
250 ""
251 "auth data"
252 "auth and auth of data auth and auth of data auth and auth of data auth and auth of data auth and auth of data auth and auth of data auth and auth of data auth and auth of data auth and auth of data auth and auth of data auth and auth of data auth and auth of data auth and auth of data auth and auth of data auth and auth of data auth and auth of data auth and auth of data auth and auth of data auth and auth of data auth and auth of data auth and auth of data "
253 "AUTH data and more data to go over the block limit!"
254 "AUTH data and more data to go over the block limit"))
255 (ciphers (remove-if
256 (lambda (c) (or (null (plist-get (cdr (assq c (gnutls-ciphers)))
257 :cipher-aead-capable))))
258 gnutls-tests-tested-ciphers))
259 actual-ivlist)
260
261 (dolist (cipher ciphers)
262 (dolist (input inputs)
263 (dolist (auth auths)
264 (dolist (key keys)
265 (let* ((cplist (cdr (assq cipher (gnutls-ciphers))))
266 (key (gnutls-tests-pad-or-trim key (plist-get cplist :cipher-keysize)))
267 (input (gnutls-tests-pad-to-multiple input (plist-get cplist :cipher-blocksize)))
268 (ivsize (plist-get cplist :cipher-ivsize)))
269 (should (>= ivsize 12)) ; as per the RFC
270 (dolist (iv (append ivs (list (list 'iv-auto ivsize))))
271
272 (gnutls-tests-message "%S, starting key %S IV %S input %S auth %S" (assq cipher (gnutls-ciphers)) key iv input auth)
273 (let* ((iv (gnutls-tests-pad-or-trim iv (plist-get cplist :cipher-ivsize)))
274 (output (gnutls-symmetric-encrypt cplist (copy-sequence key) iv input (copy-sequence auth)))
275 (data (nth 0 output))
276 (actual-iv (nth 1 output))
277 (reverse-output (gnutls-symmetric-decrypt cplist (copy-sequence key) actual-iv data auth))
278 (reverse (nth 0 reverse-output)))
279 ;; GNUTLS_RND_NONCE should be good enough to ensure this.
280 (should-not (member (secure-hash 'sha384 actual-iv 0 ivsize) actual-ivlist))
281 (cond
282 ((stringp iv)
283 (should (equal iv actual-iv)))
284 ((consp iv)
285 (push (secure-hash 'sha384 actual-iv 0 ivsize) actual-ivlist)
286 (gnutls-tests-message "IV list length: %d" (length actual-ivlist))))
287
288 (gnutls-tests-message "%s %S" cipher cplist)
289 (gnutls-tests-message "key %S IV %S input %S auth %S => hexdata %S and reverse %S" key iv input auth (encode-hex-string data) reverse)
290 (should-not (gnutls-tests-hexstring-equal input data))
291 (should-not (gnutls-tests-hexstring-equal data reverse))
292 (should (gnutls-tests-hexstring-equal input reverse)))))))))))
293
294(provide 'gnutls-tests)
295;;; gnutls-tests.el ends here
diff --git a/test/lisp/net/network-stream-tests.el b/test/lisp/net/network-stream-tests.el
index e7bb3e8ccf9..9ee3a281c3d 100644
--- a/test/lisp/net/network-stream-tests.el
+++ b/test/lisp/net/network-stream-tests.el
@@ -280,8 +280,11 @@
280 (< (setq times (1+ times)) 10)) 280 (< (setq times (1+ times)) 10))
281 (sit-for 0.1)) 281 (sit-for 0.1))
282 (should proc) 282 (should proc)
283 (while (eq (process-status proc) 'connect) 283 (setq times 0)
284 (sit-for 0.1))) 284 (while (and (eq (process-status proc) 'connect)
285 (< (setq times (1+ times)) 10))
286 (sit-for 0.1))
287 (skip-unless (not (eq (process-status proc) 'connect))))
285 (if (process-live-p server) (delete-process server))) 288 (if (process-live-p server) (delete-process server)))
286 (setq status (gnutls-peer-status proc)) 289 (setq status (gnutls-peer-status proc))
287 (should (consp status)) 290 (should (consp status))
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index 6c02daa6547..bb1bafa789f 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -86,8 +86,8 @@
86 tramp-message-show-message nil 86 tramp-message-show-message nil
87 tramp-persistency-file-name nil) 87 tramp-persistency-file-name nil)
88 88
89;; This shall happen on hydra only. 89;; This should happen on hydra only.
90(when (getenv "NIX_STORE") 90(when (getenv "EMACS_HYDRA_CI")
91 (add-to-list 'tramp-remote-path 'tramp-own-remote-path)) 91 (add-to-list 'tramp-remote-path 'tramp-own-remote-path))
92 92
93(defvar tramp--test-expensive-test 93(defvar tramp--test-expensive-test
@@ -132,12 +132,12 @@ If QUOTED is non-nil, the local part of the file is quoted."
132 (make-temp-name "tramp-test") 132 (make-temp-name "tramp-test")
133 (if local temporary-file-directory tramp-test-temporary-file-directory)))) 133 (if local temporary-file-directory tramp-test-temporary-file-directory))))
134 134
135;; Don't print messages in nested `tramp--instrument-test-case' calls. 135;; Don't print messages in nested `tramp--test-instrument-test-case' calls.
136(defvar tramp--instrument-test-case-p nil 136(defvar tramp--test-instrument-test-case-p nil
137 "Whether `tramp--instrument-test-case' run. 137 "Whether `tramp--test-instrument-test-case' run.
138This shall used dynamically bound only.") 138This shall used dynamically bound only.")
139 139
140(defmacro tramp--instrument-test-case (verbose &rest body) 140(defmacro tramp--test-instrument-test-case (verbose &rest body)
141 "Run BODY with `tramp-verbose' equal VERBOSE. 141 "Run BODY with `tramp-verbose' equal VERBOSE.
142Print the the content of the Tramp debug buffer, if BODY does not 142Print the the content of the Tramp debug buffer, if BODY does not
143eval properly in `should' or `should-not'. `should-error' is not 143eval properly in `should' or `should-not'. `should-error' is not
@@ -150,9 +150,9 @@ handled properly. BODY shall not contain a timeout."
150 (cons "^make-symbolic-link not supported$" debug-ignored-errors)) 150 (cons "^make-symbolic-link not supported$" debug-ignored-errors))
151 inhibit-message) 151 inhibit-message)
152 (unwind-protect 152 (unwind-protect
153 (let ((tramp--instrument-test-case-p t)) ,@body) 153 (let ((tramp--test-instrument-test-case-p t)) ,@body)
154 ;; Unwind forms. 154 ;; Unwind forms.
155 (when (and (null tramp--instrument-test-case-p) (> tramp-verbose 3)) 155 (when (and (null tramp--test-instrument-test-case-p) (> tramp-verbose 3))
156 (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil 156 (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
157 (with-current-buffer (tramp-get-connection-buffer v) 157 (with-current-buffer (tramp-get-connection-buffer v)
158 (message "%s" (buffer-string))) 158 (message "%s" (buffer-string)))
@@ -161,7 +161,7 @@ handled properly. BODY shall not contain a timeout."
161 161
162(defsubst tramp--test-message (fmt-string &rest arguments) 162(defsubst tramp--test-message (fmt-string &rest arguments)
163 "Emit a message into ERT *Messages*." 163 "Emit a message into ERT *Messages*."
164 (tramp--instrument-test-case 0 164 (tramp--test-instrument-test-case 0
165 (apply 165 (apply
166 'tramp-message 166 'tramp-message
167 (tramp-dissect-file-name tramp-test-temporary-file-directory) 0 167 (tramp-dissect-file-name tramp-test-temporary-file-directory) 0
@@ -169,7 +169,7 @@ handled properly. BODY shall not contain a timeout."
169 169
170(defsubst tramp--test-backtrace () 170(defsubst tramp--test-backtrace ()
171 "Dump a backtrace into ERT *Messages*." 171 "Dump a backtrace into ERT *Messages*."
172 (tramp--instrument-test-case 10 172 (tramp--test-instrument-test-case 10
173 (tramp-backtrace 173 (tramp-backtrace
174 (tramp-dissect-file-name tramp-test-temporary-file-directory)))) 174 (tramp-dissect-file-name tramp-test-temporary-file-directory))))
175 175
@@ -3699,11 +3699,14 @@ process sentinels. They shall not disturb each other."
3699 (process-file-side-effects t) 3699 (process-file-side-effects t)
3700 ;; Suppress nasty messages. 3700 ;; Suppress nasty messages.
3701 (inhibit-message t) 3701 (inhibit-message t)
3702 ;; Do not run delayed timers.
3703 (timer-max-repeats 0)
3704 ;; Number of asynchronous processes for test.
3702 (number-proc 10) 3705 (number-proc 10)
3703 ;; On hydra, timings are bad. 3706 ;; On hydra, timings are bad.
3704 (timer-repeat 3707 (timer-repeat
3705 (cond 3708 (cond
3706 ((getenv "NIX_STORE") 10) 3709 ((getenv "EMACS_HYDRA_CI") 10)
3707 (t 1))) 3710 (t 1)))
3708 ;; We must distinguish due to performance reasons. 3711 ;; We must distinguish due to performance reasons.
3709 (timer-operation 3712 (timer-operation
@@ -3726,16 +3729,26 @@ process sentinels. They shall not disturb each other."
3726 0 timer-repeat 3729 0 timer-repeat
3727 (lambda () 3730 (lambda ()
3728 (when buffers 3731 (when buffers
3729 (let ((default-directory tmp-name) 3732 (let ((time (float-time))
3733 (default-directory tmp-name)
3730 (file 3734 (file
3731 (buffer-name (nth (random (length buffers)) buffers)))) 3735 (buffer-name (nth (random (length buffers)) buffers))))
3732 (funcall timer-operation file)))))) 3736 (tramp--test-message
3737 "Start timer %s %s" file (current-time-string))
3738 (funcall timer-operation file)
3739 ;; Adjust timer if it takes too much time.
3740 (when (> (- (float-time) time) timer-repeat)
3741 (setq timer-repeat (* 1.5 timer-repeat))
3742 (setf (timer--repeat-delay timer) timer-repeat)
3743 (tramp--test-message "Increase timer %s" timer-repeat))
3744 (tramp--test-message
3745 "Stop timer %s %s" file (current-time-string)))))))
3733 3746
3734 ;; Create temporary buffers. The number of buffers 3747 ;; Create temporary buffers. The number of buffers
3735 ;; corresponds to the number of processes; it could be 3748 ;; corresponds to the number of processes; it could be
3736 ;; increased in order to make pressure on Tramp. 3749 ;; increased in order to make pressure on Tramp.
3737 (dotimes (_i number-proc) 3750 (dotimes (_i number-proc)
3738 (add-to-list 'buffers (generate-new-buffer "foo"))) 3751 (setq buffers (cons (generate-new-buffer "foo") buffers)))
3739 3752
3740 ;; Open asynchronous processes. Set process filter and sentinel. 3753 ;; Open asynchronous processes. Set process filter and sentinel.
3741 (dolist (buf buffers) 3754 (dolist (buf buffers)
@@ -3776,17 +3789,30 @@ process sentinels. They shall not disturb each other."
3776 (proc (get-buffer-process buf)) 3789 (proc (get-buffer-process buf))
3777 (file (process-get proc 'foo)) 3790 (file (process-get proc 'foo))
3778 (count (process-get proc 'bar))) 3791 (count (process-get proc 'bar)))
3792 (tramp--test-message
3793 "Start action %d %s %s" count buf (current-time-string))
3779 ;; Regular operation. 3794 ;; Regular operation.
3780 (if (= count 0) 3795 (if (= count 0)
3781 (should-not (file-attributes file)) 3796 (should-not (file-attributes file))
3782 (should (file-attributes file))) 3797 (should (file-attributes file)))
3783 ;; Send string to process. 3798 ;; Send string to process.
3799 (tramp--test-message
3800 "Trace 1 action %d %s %s" count buf (current-time-string))
3784 (process-send-string proc (format "%s\n" (buffer-name buf))) 3801 (process-send-string proc (format "%s\n" (buffer-name buf)))
3802 (tramp--test-message
3803 "Trace 2 action %d %s %s" count buf (current-time-string))
3785 (accept-process-output proc 0.1 nil 0) 3804 (accept-process-output proc 0.1 nil 0)
3786 ;; Regular operation. 3805 ;; Regular operation.
3806 (tramp--test-message
3807 "Trace 3 action %d %s %s" count buf (current-time-string))
3787 (if (= count 2) 3808 (if (= count 2)
3788 (should-not (file-attributes file)) 3809 (if (= (length buffers) 1)
3810 (tramp--test-instrument-test-case 10
3811 (should-not (file-attributes file)))
3812 (should-not (file-attributes file)))
3789 (should (file-attributes file))) 3813 (should (file-attributes file)))
3814 (tramp--test-message
3815 "Stop action %d %s %s" count buf (current-time-string))
3790 (process-put proc 'bar (1+ count)) 3816 (process-put proc 'bar (1+ count))
3791 (unless (process-live-p proc) 3817 (unless (process-live-p proc)
3792 (setq buffers (delq buf buffers)))))) 3818 (setq buffers (delq buf buffers))))))
@@ -3794,6 +3820,8 @@ process sentinels. They shall not disturb each other."
3794 ;; Checks. All process output shall exists in the 3820 ;; Checks. All process output shall exists in the
3795 ;; respective buffers. All created files shall be 3821 ;; respective buffers. All created files shall be
3796 ;; deleted. 3822 ;; deleted.
3823 (tramp--test-message
3824 "Check %s" (current-time-string))
3797 (dolist (buf buffers) 3825 (dolist (buf buffers)
3798 (with-current-buffer buf 3826 (with-current-buffer buf
3799 (should (string-equal (format "%s\n" buf) (buffer-string))))) 3827 (should (string-equal (format "%s\n" buf) (buffer-string)))))
@@ -3857,8 +3885,6 @@ process sentinels. They shall not disturb each other."
3857(ert-deftest tramp-test39-unload () 3885(ert-deftest tramp-test39-unload ()
3858 "Check that Tramp and its subpackages unload completely. 3886 "Check that Tramp and its subpackages unload completely.
3859Since it unloads Tramp, it shall be the last test to run." 3887Since it unloads Tramp, it shall be the last test to run."
3860 ;; Mark as failed until all symbols are unbound.
3861 :expected-result (if (featurep 'tramp) :failed :passed)
3862 :tags '(:expensive-test) 3888 :tags '(:expensive-test)
3863 (skip-unless noninteractive) 3889 (skip-unless noninteractive)
3864 3890
@@ -3869,21 +3895,31 @@ Since it unloads Tramp, it shall be the last test to run."
3869 (should-not (all-completions "tramp" (delq 'tramp-tests features))) 3895 (should-not (all-completions "tramp" (delq 'tramp-tests features)))
3870 ;; `file-name-handler-alist' must be clean. 3896 ;; `file-name-handler-alist' must be clean.
3871 (should-not (all-completions "tramp" (mapcar 'cdr file-name-handler-alist))) 3897 (should-not (all-completions "tramp" (mapcar 'cdr file-name-handler-alist)))
3872 ;; There shouldn't be left a bound symbol. We do not regard our 3898 ;; There shouldn't be left a bound symbol, except buffer-local
3873 ;; test symbols, and the Tramp unload hooks. 3899 ;; variables, and autoload functions. We do not regard our test
3900 ;; symbols, and the Tramp unload hooks.
3874 (mapatoms 3901 (mapatoms
3875 (lambda (x) 3902 (lambda (x)
3876 (and (or (boundp x) (functionp x)) 3903 (and (or (and (boundp x) (null (local-variable-if-set-p x)))
3904 (and (functionp x) (null (autoloadp (symbol-function x)))))
3877 (string-match "^tramp" (symbol-name x)) 3905 (string-match "^tramp" (symbol-name x))
3878 (not (string-match "^tramp--?test" (symbol-name x))) 3906 (not (string-match "^tramp--?test" (symbol-name x)))
3879 (not (string-match "unload-hook$" (symbol-name x))) 3907 (not (string-match "unload-hook$" (symbol-name x)))
3880 (ert-fail (format "`%s' still bound" x))))) 3908 (ert-fail (format "`%s' still bound" x)))))
3909 ;; The defstruct `tramp-file-name' and all its internal functions
3910 ;; shall be purged.
3911 (should-not (cl--find-class 'tramp-file-name))
3912 (mapatoms
3913 (lambda (x)
3914 (and (string-match "tramp-file-name" (symbol-name x))
3915 (functionp x)
3916 (ert-fail (format "Structure function `%s' still exists" x)))))
3881 ;; There shouldn't be left a hook function containing a Tramp 3917 ;; There shouldn't be left a hook function containing a Tramp
3882 ;; function. We do not regard the Tramp unload hooks. 3918 ;; function. We do not regard the Tramp unload hooks.
3883 (mapatoms 3919 (mapatoms
3884 (lambda (x) 3920 (lambda (x)
3885 (and (boundp x) 3921 (and (boundp x)
3886 (string-match "-hooks?$" (symbol-name x)) 3922 (string-match "-\\(hook\\|function\\)s?$" (symbol-name x))
3887 (not (string-match "unload-hook$" (symbol-name x))) 3923 (not (string-match "unload-hook$" (symbol-name x)))
3888 (consp (symbol-value x)) 3924 (consp (symbol-value x))
3889 (ignore-errors (all-completions "tramp" (symbol-value x))) 3925 (ignore-errors (all-completions "tramp" (symbol-value x)))
@@ -3904,11 +3940,7 @@ Since it unloads Tramp, it shall be the last test to run."
3904;; * Fix `tramp-test05-expand-file-name-relative' in `expand-file-name'. 3940;; * Fix `tramp-test05-expand-file-name-relative' in `expand-file-name'.
3905;; * Fix `tramp-test06-directory-file-name' for `ftp'. 3941;; * Fix `tramp-test06-directory-file-name' for `ftp'.
3906;; * Fix `tramp-test27-start-file-process' on MS Windows (`process-send-eof'?). 3942;; * Fix `tramp-test27-start-file-process' on MS Windows (`process-send-eof'?).
3907;; * Fix Bug#27009. Set expected error of
3908;; `tramp-test29-environment-variables-and-port-numbers'.
3909;; * Fix Bug#16928 in `tramp-test36-asynchronous-requests'. 3943;; * Fix Bug#16928 in `tramp-test36-asynchronous-requests'.
3910;; * Fix `tramp-test39-unload' (Not all symbols are unbound). Set
3911;; expected error.
3912 3944
3913(defun tramp-test-all (&optional interactive) 3945(defun tramp-test-all (&optional interactive)
3914 "Run all tests for \\[tramp]." 3946 "Run all tests for \\[tramp]."
diff --git a/test/lisp/ses-tests.el b/test/lisp/ses-tests.el
new file mode 100644
index 00000000000..8fff6f73520
--- /dev/null
+++ b/test/lisp/ses-tests.el
@@ -0,0 +1,175 @@
1;;; ses-tests.el --- Tests for ses.el -*- lexical-binding: t; -*-
2
3;; Copyright (C) 2015-2017 Free Software Foundation, Inc.
4
5;; Author: Vincent Belaïche <vincentb1@users.sourceforge.net>
6
7;; This file is part of GNU Emacs.
8
9;; GNU Emacs is free software: you can redistribute it and/or modify
10;; it under the terms of the GNU General Public License as published by
11;; the Free Software Foundation, either version 3 of the License, or
12;; (at your option) any later version.
13
14;; GNU Emacs is distributed in the hope that it will be useful,
15;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17;; GNU General Public License for more details.
18
19;; You should have received a copy of the GNU General Public License
20;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
21
22;;; Code:
23
24(require 'ert)
25(require 'ses)
26
27
28;; PLAIN FORMULA TESTS
29;; ======================================================================
30
31(ert-deftest ses-tests-lowlevel-plain-formula ()
32 "Check that setting A1 to 1 and A2 to (1+ A1), makes A2 value
33equal to 2. This is done with low level functions calls, not like
34interactively."
35 (let ((ses-initial-size '(2 . 1)))
36 (with-temp-buffer
37 (ses-mode)
38 (dolist (c '((0 0 1) (1 0 (1+ A1))))
39 (apply 'ses-cell-set-formula c)
40 (apply 'ses-calculate-cell (list (car c) (cadr c) nil)))
41 (should (eq A2 2)))))
42
43(ert-deftest ses-tests-plain-formula ()
44 "Check that setting A1 to 1 and A2 to (1+ A1), makes A2 value
45equal to 2. This is done using interactive calls."
46 (let ((ses-initial-size '(2 . 1)))
47 (with-temp-buffer
48 (ses-mode)
49 (dolist (c '((0 0 1) (1 0 (1+ A1))))
50 (apply 'funcall-interactively 'ses-edit-cell c))
51 (ses-command-hook)
52 (should (eq A2 2)))))
53
54;; PLAIN CELL RENAMING TESTS
55;; ======================================================================
56
57(ert-deftest ses-tests-lowlevel-renamed-cell ()
58 "Check that renaming A1 to `foo' and setting `foo' to 1 and A2 to (1+ foo), makes A2 value equal to 2.
59This is done using low level functions, `ses-rename-cell' is not
60called but instead we use text replacement in the buffer
61previously passed in text mode."
62 (let ((ses-initial-size '(2 . 1)))
63 (with-temp-buffer
64 (ses-mode)
65 (dolist (c '((0 0 1) (1 0 (1+ A1))))
66 (apply 'ses-cell-set-formula c)
67 (apply 'ses-calculate-cell (list (car c) (cadr c) nil)))
68 (ses-write-cells)
69 (text-mode)
70 (goto-char (point-min))
71 (while (re-search-forward "\\<A1\\>" nil t)
72 (replace-match "foo" t t))
73 (ses-mode)
74 (should-not (local-variable-p 'A1))
75 (should (eq foo 1))
76 (should (equal (ses-cell-formula 1 0) '(ses-safe-formula (1+ foo))))
77 (should (eq A2 2)))))
78
79(ert-deftest ses-tests-renamed-cell ()
80 "Check that renaming A1 to `foo' and setting `foo' to 1 and A2
81to (1+ foo), makes A2 value equal to 2."
82 (let ((ses-initial-size '(2 . 1)))
83 (with-temp-buffer
84 (ses-mode)
85 (ses-rename-cell 'foo (ses-get-cell 0 0))
86 (dolist (c '((0 0 1) (1 0 (1+ foo))))
87 (apply 'funcall-interactively 'ses-edit-cell c))
88 (ses-command-hook)
89 (should-not (local-variable-p 'A1))
90 (should (eq foo 1))
91 (should (equal (ses-cell-formula 1 0) '(1+ foo)))
92 (should (eq A2 2)))))
93
94(ert-deftest ses-tests-renamed-cell-after-setting ()
95 "Check that setting A1 to 1 and A2 to (1+ A1), and then
96renaming A1 to `foo' makes `foo' value equal to 2."
97 (let ((ses-initial-size '(2 . 1)))
98 (with-temp-buffer
99 (ses-mode)
100 (dolist (c '((0 0 1) (1 0 (1+ A1))))
101 (apply 'funcall-interactively 'ses-edit-cell c))
102 (ses-command-hook); deferred recalc
103 (ses-rename-cell 'foo (ses-get-cell 0 0))
104 (should-not (local-variable-p 'A1))
105 (should (eq foo 1))
106 (should (equal (ses-cell-formula 1 0) '(1+ foo)))
107 (should (eq A2 2)))))
108
109(ert-deftest ses-tests-renaming-cell-with-one-symbol-formula ()
110 "Check that setting A1 to 1 and A2 to A1, and then renaming A1
111to `foo' makes `foo' value equal to 1. Then set A1 to 2 and check
112that `foo' becomes 2."
113 (let ((ses-initial-size '(3 . 1)))
114 (with-temp-buffer
115 (ses-mode)
116 (dolist (c '((0 0 1) (1 0 A1)))
117 (apply 'funcall-interactively 'ses-edit-cell c))
118 (ses-command-hook); deferred recalc
119 (ses-rename-cell 'foo (ses-get-cell 0 0))
120 (ses-command-hook); deferred recalc
121 (should-not (local-variable-p 'A1))
122 (should (eq foo 1))
123 (should (equal (ses-cell-formula 1 0) 'foo))
124 (should (eq A2 1))
125 (funcall-interactively 'ses-edit-cell 0 0 2)
126 (ses-command-hook); deferred recalc
127 (should (eq A2 2))
128 (should (eq foo 2)))))
129
130
131;; ROW INSERTION TESTS
132;; ======================================================================
133
134(ert-deftest ses-tests-plain-row-insertion ()
135 "Check that setting A1 to 1 and A2 to (1+ A1), and then jumping
136to A2 and inserting a row, makes A2 value empty, and A3 equal to
1372."
138 (let ((ses-initial-size '(2 . 1)))
139 (with-temp-buffer
140 (ses-mode)
141 (dolist (c '((0 0 1) (1 0 (1+ A1))))
142 (apply 'funcall-interactively 'ses-edit-cell c))
143 (ses-command-hook)
144 (ses-jump 'A2)
145 (ses-insert-row 1)
146 (ses-command-hook)
147 (should-not A2)
148 (should (eq A3 2)))))
149
150; (defvar ses-tests-trigger nil)
151
152(ert-deftest ses-tests-renamed-cells-row-insertion ()
153 "Check that setting A1 to 1 and A2 to (1+ A1), and then renaming A1 to `foo' and A2 to `bar' jumping
154to `bar' and inserting a row, makes A2 value empty, and `bar' equal to
1552."
156 (setq ses-tests-trigger nil)
157 (let ((ses-initial-size '(2 . 1)))
158 (with-temp-buffer
159 (ses-mode)
160 (dolist (c '((0 0 1) (1 0 (1+ A1))))
161 (apply 'funcall-interactively 'ses-edit-cell c))
162 (ses-command-hook)
163 (ses-rename-cell 'foo (ses-get-cell 0 0))
164 (ses-command-hook)
165 (ses-rename-cell 'bar (ses-get-cell 1 0))
166 (ses-command-hook)
167 (should (eq bar 2))
168 (ses-jump 'bar)
169 (ses-insert-row 1)
170 (ses-command-hook)
171 (should-not A2)
172 (should (eq bar 2)))))
173
174
175(provide 'ses-tests)
diff --git a/test/lisp/subr-tests.el b/test/lisp/subr-tests.el
index 54f4ab5d1b2..7e50429a5bf 100644
--- a/test/lisp/subr-tests.el
+++ b/test/lisp/subr-tests.el
@@ -258,9 +258,9 @@ This exercises `backtrace-frame', and indirectly `mapbacktrace'."
258 (should (equal (mapbacktrace #'error unbound) nil))) 258 (should (equal (mapbacktrace #'error unbound) nil)))
259 ;; First frame is backtrace-related function 259 ;; First frame is backtrace-related function
260 (should (equal (backtrace-frame 0) '(t backtrace-frame 0))) 260 (should (equal (backtrace-frame 0) '(t backtrace-frame 0)))
261 (should (equal (catch 'ret 261 (let ((throw-args (lambda (&rest args) (throw 'ret args))))
262 (mapbacktrace (lambda (&rest args) (throw 'ret args)))) 262 (should (equal (catch 'ret (mapbacktrace throw-args))
263 '(t mapbacktrace ((lambda (&rest args) (throw 'ret args))) nil))) 263 `(t mapbacktrace (,throw-args) nil))))
264 ;; Past-end NFRAMES is silently ignored 264 ;; Past-end NFRAMES is silently ignored
265 (should (equal (backtrace-frame most-positive-fixnum) nil))) 265 (should (equal (backtrace-frame most-positive-fixnum) nil)))
266 266
diff --git a/test/manual/BidiCharacterTest.txt b/test/manual/BidiCharacterTest.txt
index 7e04d6cb3c0..a3d2b46cc40 100644
--- a/test/manual/BidiCharacterTest.txt
+++ b/test/manual/BidiCharacterTest.txt
@@ -1,6 +1,6 @@
1# BidiCharacterTest-9.0.0.txt 1# BidiCharacterTest-10.0.0.txt
2# Date: 2016-01-15, 22:30:00 GMT [LI] 2# Date: 2017-03-09, 00:30:00 GMT [LI]
3# © 2016 Unicode®, Inc. 3# © 2017 Unicode®, Inc.
4# For terms of use, see http://www.unicode.org/terms_of_use.html 4# For terms of use, see http://www.unicode.org/terms_of_use.html
5# 5#
6# Unicode Character Database 6# Unicode Character Database
diff --git a/test/manual/etags/CTAGS.good b/test/manual/etags/CTAGS.good
index 13bb37c2e6a..519315c6fdd 100644
--- a/test/manual/etags/CTAGS.good
+++ b/test/manual/etags/CTAGS.good
@@ -202,6 +202,7 @@ ${CHECKOBJS} make-src/Makefile /^${CHECKOBJS}: CFLAGS=-g3 -DNULLFREECHECK=0$/
202=\relax tex-src/texinfo.tex /^\\let\\subsubsection=\\relax$/ 202=\relax tex-src/texinfo.tex /^\\let\\subsubsection=\\relax$/
203=\relax tex-src/texinfo.tex /^\\let\\appendix=\\relax$/ 203=\relax tex-src/texinfo.tex /^\\let\\appendix=\\relax$/
204=\smartitalic tex-src/texinfo.tex /^\\let\\cite=\\smartitalic$/ 204=\smartitalic tex-src/texinfo.tex /^\\let\\cite=\\smartitalic$/
205=starts-with-equals! scm-src/test.scm /^(define =starts-with-equals! #t)$/
205> tex-src/texinfo.tex /^\\def>{{\\tt \\gtr}}$/ 206> tex-src/texinfo.tex /^\\def>{{\\tt \\gtr}}$/
206>field1 forth-src/test-forth.fth /^ 9 field >field1$/ 207>field1 forth-src/test-forth.fth /^ 9 field >field1$/
207>field2 forth-src/test-forth.fth /^ 5 field >field2$/ 208>field2 forth-src/test-forth.fth /^ 5 field >field2$/
@@ -2750,6 +2751,7 @@ current-idle-time c-src/emacs/src/keyboard.c /^DEFUN ("current-idle-time", Fcurr
2750current-input-mode c-src/emacs/src/keyboard.c /^DEFUN ("current-input-mode", Fcurrent_input_mode, / 2751current-input-mode c-src/emacs/src/keyboard.c /^DEFUN ("current-input-mode", Fcurrent_input_mode, /
2751current_kboard c-src/emacs/src/keyboard.c 85 2752current_kboard c-src/emacs/src/keyboard.c 85
2752current_lb_is_new c-src/etags.c 2926 2753current_lb_is_new c-src/etags.c 2926
2754curry-test scm-src/test.scm /^(define (((((curry-test a) b) c) d) e)$/
2753cursor_position cp-src/screen.cpp /^void cursor_position(void)$/ 2755cursor_position cp-src/screen.cpp /^void cursor_position(void)$/
2754cursor_x cp-src/screen.cpp 15 2756cursor_x cp-src/screen.cpp 15
2755cursor_y cp-src/screen.cpp 15 2757cursor_y cp-src/screen.cpp 15
@@ -3037,6 +3039,7 @@ foo ruby-src/test1.ru /^ attr_reader :foo$/
3037foo! ruby-src/test1.ru /^ def foo!$/ 3039foo! ruby-src/test1.ru /^ def foo!$/
3038foo1 ruby-src/test1.ru /^ attr_reader(:foo1, :bar1, # comment$/ 3040foo1 ruby-src/test1.ru /^ attr_reader(:foo1, :bar1, # comment$/
3039foo2 ruby-src/test1.ru /^ alias_method ( :foo2, #cmmt$/ 3041foo2 ruby-src/test1.ru /^ alias_method ( :foo2, #cmmt$/
3042foo==bar el-src/TAGTEST.EL /^(defun foo==bar () (message "hi")) ; Bug#5624$/
3040foobar c-src/c.c /^int foobar() {;}$/ 3043foobar c-src/c.c /^int foobar() {;}$/
3041foobar c.c /^extern void foobar (void) __attribute__ ((section / 3044foobar c.c /^extern void foobar (void) __attribute__ ((section /
3042foobar2 c-src/h.h 20 3045foobar2 c-src/h.h 20
@@ -3161,6 +3164,9 @@ header c-src/emacs/src/lisp.h 1672
3161header c-src/emacs/src/lisp.h 1826 3164header c-src/emacs/src/lisp.h 1826
3162header_size c-src/emacs/src/lisp.h 1471 3165header_size c-src/emacs/src/lisp.h 1471
3163heapsize c-src/emacs/src/gmalloc.c 361 3166heapsize c-src/emacs/src/gmalloc.c 361
3167hello scm-src/test.scm /^(define hello "Hello, Emacs!")$/
3168hello scm-src/test.scm /^(set! hello "Hello, world!")$/
3169hello-world scm-src/test.scm /^(define (hello-world)$/
3164help c-src/etags.c 193 3170help c-src/etags.c 193
3165helpPanel objcpp-src/SimpleCalc.M /^- helpPanel:sender$/ 3171helpPanel objcpp-src/SimpleCalc.M /^- helpPanel:sender$/
3166help_char_p c-src/emacs/src/keyboard.c /^help_char_p (Lisp_Object c)$/ 3172help_char_p c-src/emacs/src/keyboard.c /^help_char_p (Lisp_Object c)$/
@@ -4317,10 +4323,12 @@ test erl-src/gs_dialog.erl /^test() ->$/
4317test go-src/test1.go /^func test(p plus) {$/ 4323test go-src/test1.go /^func test(p plus) {$/
4318test make-src/Makefile /^test:$/ 4324test make-src/Makefile /^test:$/
4319test php-src/ptest.php /^test $/ 4325test php-src/ptest.php /^test $/
4326test-begin scm-src/test.scm /^(define-syntax test-begin$/
4320test.me22b lua-src/test.lua /^ local function test.me22b (one)$/ 4327test.me22b lua-src/test.lua /^ local function test.me22b (one)$/
4321test.me_22a lua-src/test.lua /^ function test.me_22a(one, two)$/ 4328test.me_22a lua-src/test.lua /^ function test.me_22a(one, two)$/
4322test_undefined c-src/emacs/src/keyboard.c /^test_undefined (Lisp_Object binding)$/ 4329test_undefined c-src/emacs/src/keyboard.c /^test_undefined (Lisp_Object binding)$/
4323texttreelist prol-src/natded.prolog /^texttreelist([]).$/ 4330texttreelist prol-src/natded.prolog /^texttreelist([]).$/
4331there-is-a-=-in-the-middle! scm-src/test.scm /^(define (there-is-a-=-in-the-middle!) #t)$/
4324this c-src/a/b/b.c 1 4332this c-src/a/b/b.c 1
4325this-command-keys c-src/emacs/src/keyboard.c /^DEFUN ("this-command-keys", Fthis_command_keys, St/ 4333this-command-keys c-src/emacs/src/keyboard.c /^DEFUN ("this-command-keys", Fthis_command_keys, St/
4326this-command-keys-vector c-src/emacs/src/keyboard.c /^DEFUN ("this-command-keys-vector", Fthis_command_k/ 4334this-command-keys-vector c-src/emacs/src/keyboard.c /^DEFUN ("this-command-keys-vector", Fthis_command_k/
diff --git a/test/manual/etags/ETAGS.good_1 b/test/manual/etags/ETAGS.good_1
index 6c4a02ae1c1..cd9cd4a8450 100644
--- a/test/manual/etags/ETAGS.good_1
+++ b/test/manual/etags/ETAGS.good_1
@@ -2143,10 +2143,11 @@ main(37,571
2143 class D 41,622 2143 class D 41,622
2144 D(43,659 2144 D(43,659
2145 2145
2146el-src/TAGTEST.EL,148 2146el-src/TAGTEST.EL,179
2147(foo::defmumble bletch 1,0 2147(foo::defmumble bletch 1,0
2148(defalias 'pending-delete-mode pending-delete-mode5,102 2148(defun foo==bar foo==bar2,33
2149(defalias (quote explicitly-quoted-pending-delete-mode)8,175 2149(defalias 'pending-delete-mode pending-delete-mode6,149
2150(defalias (quote explicitly-quoted-pending-delete-mode)9,222
2150 2151
2151el-src/emacs/lisp/progmodes/etags.el,5069 2152el-src/emacs/lisp/progmodes/etags.el,5069
2152(defvar tags-file-name 34,1034 2153(defvar tags-file-name 34,1034
@@ -3135,6 +3136,15 @@ module A9,57
3135 alias_method ( :foo2,foo237,586 3136 alias_method ( :foo2,foo237,586
3136A::Constant Constant42,655 3137A::Constant Constant42,655
3137 3138
3139scm-src/test.scm,260
3140(define hello 1,0
3141(set! hello 3,32
3142(define (hello-world)5,62
3143(define (there-is-a-=-in-the-middle!)there-is-a-=-in-the-middle!10,128
3144(define =starts-with-equals! =starts-with-equals!12,171
3145(define (((((curry-test 14,205
3146(define-syntax test-begin17,265
3147
3138tex-src/testenv.tex,52 3148tex-src/testenv.tex,52
3139\newcommand{\nm}\nm4,77 3149\newcommand{\nm}\nm4,77
3140\section{blah}blah8,139 3150\section{blah}blah8,139
@@ -3145,11 +3155,11 @@ tex-src/gzip.texi,303
3145@node Overview,83,2705 3155@node Overview,83,2705
3146@node Sample,166,7272 3156@node Sample,166,7272
3147@node Invoking gzip,Invoking gzip210,8828 3157@node Invoking gzip,Invoking gzip210,8828
3148@node Advanced usage,Advanced usage357,13495 3158@node Advanced usage,Advanced usage357,13496
3149@node Environment,420,15207 3159@node Environment,420,15208
3150@node Tapes,437,15768 3160@node Tapes,437,15769
3151@node Problems,460,16767 3161@node Problems,460,16768
3152@node Concept Index,Concept Index473,17287 3162@node Concept Index,Concept Index473,17288
3153 3163
3154tex-src/texinfo.tex,30627 3164tex-src/texinfo.tex,30627
3155\def\texinfoversion{\texinfoversion26,1032 3165\def\texinfoversion{\texinfoversion26,1032
diff --git a/test/manual/etags/ETAGS.good_2 b/test/manual/etags/ETAGS.good_2
index fa784d2e7b5..54fd00e95da 100644
--- a/test/manual/etags/ETAGS.good_2
+++ b/test/manual/etags/ETAGS.good_2
@@ -2712,10 +2712,11 @@ main(37,571
2712 class D 41,622 2712 class D 41,622
2713 D(43,659 2713 D(43,659
2714 2714
2715el-src/TAGTEST.EL,148 2715el-src/TAGTEST.EL,179
2716(foo::defmumble bletch 1,0 2716(foo::defmumble bletch 1,0
2717(defalias 'pending-delete-mode pending-delete-mode5,102 2717(defun foo==bar foo==bar2,33
2718(defalias (quote explicitly-quoted-pending-delete-mode)8,175 2718(defalias 'pending-delete-mode pending-delete-mode6,149
2719(defalias (quote explicitly-quoted-pending-delete-mode)9,222
2719 2720
2720el-src/emacs/lisp/progmodes/etags.el,5188 2721el-src/emacs/lisp/progmodes/etags.el,5188
2721(defvar tags-file-name 34,1034 2722(defvar tags-file-name 34,1034
@@ -3708,6 +3709,15 @@ module A9,57
3708 alias_method ( :foo2,foo237,586 3709 alias_method ( :foo2,foo237,586
3709A::Constant Constant42,655 3710A::Constant Constant42,655
3710 3711
3712scm-src/test.scm,260
3713(define hello 1,0
3714(set! hello 3,32
3715(define (hello-world)5,62
3716(define (there-is-a-=-in-the-middle!)there-is-a-=-in-the-middle!10,128
3717(define =starts-with-equals! =starts-with-equals!12,171
3718(define (((((curry-test 14,205
3719(define-syntax test-begin17,265
3720
3711tex-src/testenv.tex,52 3721tex-src/testenv.tex,52
3712\newcommand{\nm}\nm4,77 3722\newcommand{\nm}\nm4,77
3713\section{blah}blah8,139 3723\section{blah}blah8,139
@@ -3718,11 +3728,11 @@ tex-src/gzip.texi,303
3718@node Overview,83,2705 3728@node Overview,83,2705
3719@node Sample,166,7272 3729@node Sample,166,7272
3720@node Invoking gzip,Invoking gzip210,8828 3730@node Invoking gzip,Invoking gzip210,8828
3721@node Advanced usage,Advanced usage357,13495 3731@node Advanced usage,Advanced usage357,13496
3722@node Environment,420,15207 3732@node Environment,420,15208
3723@node Tapes,437,15768 3733@node Tapes,437,15769
3724@node Problems,460,16767 3734@node Problems,460,16768
3725@node Concept Index,Concept Index473,17287 3735@node Concept Index,Concept Index473,17288
3726 3736
3727tex-src/texinfo.tex,30627 3737tex-src/texinfo.tex,30627
3728\def\texinfoversion{\texinfoversion26,1032 3738\def\texinfoversion{\texinfoversion26,1032
diff --git a/test/manual/etags/ETAGS.good_3 b/test/manual/etags/ETAGS.good_3
index 547dee2d43c..508427c501c 100644
--- a/test/manual/etags/ETAGS.good_3
+++ b/test/manual/etags/ETAGS.good_3
@@ -2520,10 +2520,11 @@ main(37,571
2520 D(43,659 2520 D(43,659
2521 int x;44,694 2521 int x;44,694
2522 2522
2523el-src/TAGTEST.EL,148 2523el-src/TAGTEST.EL,179
2524(foo::defmumble bletch 1,0 2524(foo::defmumble bletch 1,0
2525(defalias 'pending-delete-mode pending-delete-mode5,102 2525(defun foo==bar foo==bar2,33
2526(defalias (quote explicitly-quoted-pending-delete-mode)8,175 2526(defalias 'pending-delete-mode pending-delete-mode6,149
2527(defalias (quote explicitly-quoted-pending-delete-mode)9,222
2527 2528
2528el-src/emacs/lisp/progmodes/etags.el,5069 2529el-src/emacs/lisp/progmodes/etags.el,5069
2529(defvar tags-file-name 34,1034 2530(defvar tags-file-name 34,1034
@@ -3542,6 +3543,15 @@ module A9,57
3542 alias_method ( :foo2,foo237,586 3543 alias_method ( :foo2,foo237,586
3543A::Constant Constant42,655 3544A::Constant Constant42,655
3544 3545
3546scm-src/test.scm,260
3547(define hello 1,0
3548(set! hello 3,32
3549(define (hello-world)5,62
3550(define (there-is-a-=-in-the-middle!)there-is-a-=-in-the-middle!10,128
3551(define =starts-with-equals! =starts-with-equals!12,171
3552(define (((((curry-test 14,205
3553(define-syntax test-begin17,265
3554
3545tex-src/testenv.tex,52 3555tex-src/testenv.tex,52
3546\newcommand{\nm}\nm4,77 3556\newcommand{\nm}\nm4,77
3547\section{blah}blah8,139 3557\section{blah}blah8,139
@@ -3552,11 +3562,11 @@ tex-src/gzip.texi,303
3552@node Overview,83,2705 3562@node Overview,83,2705
3553@node Sample,166,7272 3563@node Sample,166,7272
3554@node Invoking gzip,Invoking gzip210,8828 3564@node Invoking gzip,Invoking gzip210,8828
3555@node Advanced usage,Advanced usage357,13495 3565@node Advanced usage,Advanced usage357,13496
3556@node Environment,420,15207 3566@node Environment,420,15208
3557@node Tapes,437,15768 3567@node Tapes,437,15769
3558@node Problems,460,16767 3568@node Problems,460,16768
3559@node Concept Index,Concept Index473,17287 3569@node Concept Index,Concept Index473,17288
3560 3570
3561tex-src/texinfo.tex,30627 3571tex-src/texinfo.tex,30627
3562\def\texinfoversion{\texinfoversion26,1032 3572\def\texinfoversion{\texinfoversion26,1032
diff --git a/test/manual/etags/ETAGS.good_4 b/test/manual/etags/ETAGS.good_4
index 2c50ec1a742..460e31b5d96 100644
--- a/test/manual/etags/ETAGS.good_4
+++ b/test/manual/etags/ETAGS.good_4
@@ -2307,10 +2307,11 @@ main(37,571
2307 class D 41,622 2307 class D 41,622
2308 D(43,659 2308 D(43,659
2309 2309
2310el-src/TAGTEST.EL,148 2310el-src/TAGTEST.EL,179
2311(foo::defmumble bletch 1,0 2311(foo::defmumble bletch 1,0
2312(defalias 'pending-delete-mode pending-delete-mode5,102 2312(defun foo==bar foo==bar2,33
2313(defalias (quote explicitly-quoted-pending-delete-mode)8,175 2313(defalias 'pending-delete-mode pending-delete-mode6,149
2314(defalias (quote explicitly-quoted-pending-delete-mode)9,222
2314 2315
2315el-src/emacs/lisp/progmodes/etags.el,5069 2316el-src/emacs/lisp/progmodes/etags.el,5069
2316(defvar tags-file-name 34,1034 2317(defvar tags-file-name 34,1034
@@ -3299,6 +3300,15 @@ module A9,57
3299 alias_method ( :foo2,foo237,586 3300 alias_method ( :foo2,foo237,586
3300A::Constant Constant42,655 3301A::Constant Constant42,655
3301 3302
3303scm-src/test.scm,260
3304(define hello 1,0
3305(set! hello 3,32
3306(define (hello-world)5,62
3307(define (there-is-a-=-in-the-middle!)there-is-a-=-in-the-middle!10,128
3308(define =starts-with-equals! =starts-with-equals!12,171
3309(define (((((curry-test 14,205
3310(define-syntax test-begin17,265
3311
3302tex-src/testenv.tex,52 3312tex-src/testenv.tex,52
3303\newcommand{\nm}\nm4,77 3313\newcommand{\nm}\nm4,77
3304\section{blah}blah8,139 3314\section{blah}blah8,139
@@ -3309,11 +3319,11 @@ tex-src/gzip.texi,303
3309@node Overview,83,2705 3319@node Overview,83,2705
3310@node Sample,166,7272 3320@node Sample,166,7272
3311@node Invoking gzip,Invoking gzip210,8828 3321@node Invoking gzip,Invoking gzip210,8828
3312@node Advanced usage,Advanced usage357,13495 3322@node Advanced usage,Advanced usage357,13496
3313@node Environment,420,15207 3323@node Environment,420,15208
3314@node Tapes,437,15768 3324@node Tapes,437,15769
3315@node Problems,460,16767 3325@node Problems,460,16768
3316@node Concept Index,Concept Index473,17287 3326@node Concept Index,Concept Index473,17288
3317 3327
3318tex-src/texinfo.tex,30627 3328tex-src/texinfo.tex,30627
3319\def\texinfoversion{\texinfoversion26,1032 3329\def\texinfoversion{\texinfoversion26,1032
diff --git a/test/manual/etags/ETAGS.good_5 b/test/manual/etags/ETAGS.good_5
index 2b431034f44..b7a31602f51 100644
--- a/test/manual/etags/ETAGS.good_5
+++ b/test/manual/etags/ETAGS.good_5
@@ -3253,10 +3253,11 @@ main(37,571
3253 D(43,659 3253 D(43,659
3254 int x;44,694 3254 int x;44,694
3255 3255
3256el-src/TAGTEST.EL,148 3256el-src/TAGTEST.EL,179
3257(foo::defmumble bletch 1,0 3257(foo::defmumble bletch 1,0
3258(defalias 'pending-delete-mode pending-delete-mode5,102 3258(defun foo==bar foo==bar2,33
3259(defalias (quote explicitly-quoted-pending-delete-mode)8,175 3259(defalias 'pending-delete-mode pending-delete-mode6,149
3260(defalias (quote explicitly-quoted-pending-delete-mode)9,222
3260 3261
3261el-src/emacs/lisp/progmodes/etags.el,5188 3262el-src/emacs/lisp/progmodes/etags.el,5188
3262(defvar tags-file-name 34,1034 3263(defvar tags-file-name 34,1034
@@ -4279,6 +4280,15 @@ module A9,57
4279 alias_method ( :foo2,foo237,586 4280 alias_method ( :foo2,foo237,586
4280A::Constant Constant42,655 4281A::Constant Constant42,655
4281 4282
4283scm-src/test.scm,260
4284(define hello 1,0
4285(set! hello 3,32
4286(define (hello-world)5,62
4287(define (there-is-a-=-in-the-middle!)there-is-a-=-in-the-middle!10,128
4288(define =starts-with-equals! =starts-with-equals!12,171
4289(define (((((curry-test 14,205
4290(define-syntax test-begin17,265
4291
4282tex-src/testenv.tex,52 4292tex-src/testenv.tex,52
4283\newcommand{\nm}\nm4,77 4293\newcommand{\nm}\nm4,77
4284\section{blah}blah8,139 4294\section{blah}blah8,139
@@ -4289,11 +4299,11 @@ tex-src/gzip.texi,303
4289@node Overview,83,2705 4299@node Overview,83,2705
4290@node Sample,166,7272 4300@node Sample,166,7272
4291@node Invoking gzip,Invoking gzip210,8828 4301@node Invoking gzip,Invoking gzip210,8828
4292@node Advanced usage,Advanced usage357,13495 4302@node Advanced usage,Advanced usage357,13496
4293@node Environment,420,15207 4303@node Environment,420,15208
4294@node Tapes,437,15768 4304@node Tapes,437,15769
4295@node Problems,460,16767 4305@node Problems,460,16768
4296@node Concept Index,Concept Index473,17287 4306@node Concept Index,Concept Index473,17288
4297 4307
4298tex-src/texinfo.tex,30627 4308tex-src/texinfo.tex,30627
4299\def\texinfoversion{\texinfoversion26,1032 4309\def\texinfoversion{\texinfoversion26,1032
diff --git a/test/manual/etags/ETAGS.good_6 b/test/manual/etags/ETAGS.good_6
index 2cb0d05e72a..a75fd806968 100644
--- a/test/manual/etags/ETAGS.good_6
+++ b/test/manual/etags/ETAGS.good_6
@@ -3253,10 +3253,11 @@ main(37,571
3253 D(D::D43,659 3253 D(D::D43,659
3254 int x;D::x44,694 3254 int x;D::x44,694
3255 3255
3256el-src/TAGTEST.EL,148 3256el-src/TAGTEST.EL,179
3257(foo::defmumble bletch 1,0 3257(foo::defmumble bletch 1,0
3258(defalias 'pending-delete-mode pending-delete-mode5,102 3258(defun foo==bar foo==bar2,33
3259(defalias (quote explicitly-quoted-pending-delete-mode)8,175 3259(defalias 'pending-delete-mode pending-delete-mode6,149
3260(defalias (quote explicitly-quoted-pending-delete-mode)9,222
3260 3261
3261el-src/emacs/lisp/progmodes/etags.el,5188 3262el-src/emacs/lisp/progmodes/etags.el,5188
3262(defvar tags-file-name 34,1034 3263(defvar tags-file-name 34,1034
@@ -4279,6 +4280,15 @@ module A9,57
4279 alias_method ( :foo2,foo237,586 4280 alias_method ( :foo2,foo237,586
4280A::Constant Constant42,655 4281A::Constant Constant42,655
4281 4282
4283scm-src/test.scm,260
4284(define hello 1,0
4285(set! hello 3,32
4286(define (hello-world)5,62
4287(define (there-is-a-=-in-the-middle!)there-is-a-=-in-the-middle!10,128
4288(define =starts-with-equals! =starts-with-equals!12,171
4289(define (((((curry-test 14,205
4290(define-syntax test-begin17,265
4291
4282tex-src/testenv.tex,52 4292tex-src/testenv.tex,52
4283\newcommand{\nm}\nm4,77 4293\newcommand{\nm}\nm4,77
4284\section{blah}blah8,139 4294\section{blah}blah8,139
@@ -4289,11 +4299,11 @@ tex-src/gzip.texi,303
4289@node Overview,83,2705 4299@node Overview,83,2705
4290@node Sample,166,7272 4300@node Sample,166,7272
4291@node Invoking gzip,Invoking gzip210,8828 4301@node Invoking gzip,Invoking gzip210,8828
4292@node Advanced usage,Advanced usage357,13495 4302@node Advanced usage,Advanced usage357,13496
4293@node Environment,420,15207 4303@node Environment,420,15208
4294@node Tapes,437,15768 4304@node Tapes,437,15769
4295@node Problems,460,16767 4305@node Problems,460,16768
4296@node Concept Index,Concept Index473,17287 4306@node Concept Index,Concept Index473,17288
4297 4307
4298tex-src/texinfo.tex,30627 4308tex-src/texinfo.tex,30627
4299\def\texinfoversion{\texinfoversion26,1032 4309\def\texinfoversion{\texinfoversion26,1032
diff --git a/test/manual/etags/Makefile b/test/manual/etags/Makefile
index 07ad0f46416..c1df703905e 100644
--- a/test/manual/etags/Makefile
+++ b/test/manual/etags/Makefile
@@ -25,12 +25,13 @@ PSSRC=$(addprefix ./ps-src/,rfc1245.ps)
25PROLSRC=$(addprefix ./prol-src/,ordsets.prolog natded.prolog) 25PROLSRC=$(addprefix ./prol-src/,ordsets.prolog natded.prolog)
26PYTSRC=$(addprefix ./pyt-src/,server.py) 26PYTSRC=$(addprefix ./pyt-src/,server.py)
27RBSRC=$(addprefix ./ruby-src/,test.rb test1.ru) 27RBSRC=$(addprefix ./ruby-src/,test.rb test1.ru)
28SCMSRC=$(addprefix ./scm-src/,test.scm)
28TEXSRC=$(addprefix ./tex-src/,testenv.tex gzip.texi texinfo.tex nonewline.tex) 29TEXSRC=$(addprefix ./tex-src/,testenv.tex gzip.texi texinfo.tex nonewline.tex)
29YSRC=$(addprefix ./y-src/,parse.y parse.c atest.y cccp.c cccp.y) 30YSRC=$(addprefix ./y-src/,parse.y parse.c atest.y cccp.c cccp.y)
30SRCS=${ADASRC} ${ASRC} ${CSRC} ${CPSRC} ${ELSRC} ${ERLSRC} ${FSRC}\ 31SRCS=${ADASRC} ${ASRC} ${CSRC} ${CPSRC} ${ELSRC} ${ERLSRC} ${FSRC}\
31 ${FORTHSRC} ${GOSRC} ${HTMLSRC} ${JAVASRC} ${LUASRC} ${MAKESRC}\ 32 ${FORTHSRC} ${GOSRC} ${HTMLSRC} ${JAVASRC} ${LUASRC} ${MAKESRC}\
32 ${OBJCSRC} ${OBJCPPSRC} ${PASSRC} ${PHPSRC} ${PERLSRC} ${PSSRC}\ 33 ${OBJCSRC} ${OBJCPPSRC} ${PASSRC} ${PHPSRC} ${PERLSRC} ${PSSRC}\
33 ${PROLSRC} ${PYTSRC} ${RBSRC} ${TEXSRC} ${YSRC} 34 ${PROLSRC} ${PYTSRC} ${RBSRC} ${SCMSRC} ${TEXSRC} ${YSRC}
34NONSRCS=./f-src/entry.strange ./erl-src/lists.erl ./cp-src/clheir.hpp.gz 35NONSRCS=./f-src/entry.strange ./erl-src/lists.erl ./cp-src/clheir.hpp.gz
35 36
36ETAGS_PROG=../../../lib-src/etags 37ETAGS_PROG=../../../lib-src/etags
diff --git a/test/manual/etags/el-src/TAGTEST.EL b/test/manual/etags/el-src/TAGTEST.EL
index acf0baf82f0..89a67913771 100644
--- a/test/manual/etags/el-src/TAGTEST.EL
+++ b/test/manual/etags/el-src/TAGTEST.EL
@@ -1,4 +1,5 @@
1(foo::defmumble bletch beuarghh) 1(foo::defmumble bletch beuarghh)
2(defun foo==bar () (message "hi")) ; Bug#5624
2;;; Ctags test file for lisp mode. 3;;; Ctags test file for lisp mode.
3 4
4;; from emacs/lisp/delsel.el:76: 5;; from emacs/lisp/delsel.el:76:
diff --git a/test/manual/etags/scm-src/test.scm b/test/manual/etags/scm-src/test.scm
new file mode 100644
index 00000000000..e3921e718fc
--- /dev/null
+++ b/test/manual/etags/scm-src/test.scm
@@ -0,0 +1,20 @@
1(define hello "Hello, Emacs!")
2
3(set! hello "Hello, world!")
4
5(define (hello-world)
6 (display hello)
7 (newline))
8
9;; Bug 5624
10(define (there-is-a-=-in-the-middle!) #t)
11
12(define =starts-with-equals! #t)
13
14(define (((((curry-test a) b) c) d) e)
15 (list a b c d e))
16
17(define-syntax test-begin
18 (syntax-rules ()
19 ((test-begin exp ...)
20 ((lambda () exp ...)))))
diff --git a/test/manual/image-size-tests.el b/test/manual/image-size-tests.el
index 577c7658791..ad43426dd20 100644
--- a/test/manual/image-size-tests.el
+++ b/test/manual/image-size-tests.el
@@ -25,8 +25,8 @@
25(defmacro im-should (image width height &rest props) 25(defmacro im-should (image width height &rest props)
26 `(let ((im (im-image ,image ,@props))) 26 `(let ((im (im-image ,image ,@props)))
27 (unless (im-compare im ,width ,height) 27 (unless (im-compare im ,width ,height)
28 (error "%s didn't succeed; size is %s" 28 (error "%s %s didn't succeed; size is %s"
29 ',props (image-size im t))))) 29 ',image ',props (image-size im t)))))
30 30
31(defun im-image (type &rest props) 31(defun im-image (type &rest props)
32 (let ((image-scaling-factor 1)) 32 (let ((image-scaling-factor 1))
@@ -67,6 +67,9 @@
67 ;; Both max-width/height. 67 ;; Both max-width/height.
68 (im-should :w 100 50 :max-width 100 :max-height 75) 68 (im-should :w 100 50 :max-width 100 :max-height 75)
69 (im-should :w 50 25 :max-width 100 :max-height 25) 69 (im-should :w 50 25 :max-width 100 :max-height 25)
70 ;; :width and :max-height (max-height wins).
71 (im-should :w 400 200 :width 400 :max-height 200)
72 (im-should :w 400 200 :width 500 :max-height 200)
70 73
71 ;; Test the image that's taller than it is wide. 74 ;; Test the image that's taller than it is wide.
72 (im-should :h 100 200) 75 (im-should :h 100 200)
@@ -87,6 +90,9 @@
87 ;; Both max-width/height. 90 ;; Both max-width/height.
88 (im-should :h 50 100 :max-width 75 :max-height 100) 91 (im-should :h 50 100 :max-width 75 :max-height 100)
89 (im-should :h 25 50 :max-width 25 :max-height 100) 92 (im-should :h 25 50 :max-width 25 :max-height 100)
93 ;; :height and :max-width (max-width wins).
94 (im-should :h 200 400 :height 400 :max-width 200)
95 (im-should :h 200 400 :height 500 :max-width 200)
90 ) 96 )
91 97
92;;; image-size-tests.el ends here 98;;; image-size-tests.el ends here
diff --git a/test/manual/indent/perl.perl b/test/manual/indent/perl.perl
index f86a09b2733..06f32e7f090 100755
--- a/test/manual/indent/perl.perl
+++ b/test/manual/indent/perl.perl
@@ -53,6 +53,14 @@ EOF1
53bar 53bar
54EOF2 54EOF2
55 55
56print <<~"EOF1" . <<\EOF2 . s/he"llo/th'ere/;
57foo
58EOF2
59 bar
60 EOF1
61bar
62EOF2
63
56print $'; # This should not start a string! 64print $'; # This should not start a string!
57 65
58print "hello" for /./; 66print "hello" for /./;
diff --git a/test/src/emacs-module-tests.el b/test/src/emacs-module-tests.el
index a4994b6223b..2aa85f0b247 100644
--- a/test/src/emacs-module-tests.el
+++ b/test/src/emacs-module-tests.el
@@ -182,37 +182,66 @@ changes."
182 (should (equal (help-function-arglist #'mod-test-sum) 182 (should (equal (help-function-arglist #'mod-test-sum)
183 '(arg1 arg2)))) 183 '(arg1 arg2))))
184 184
185(ert-deftest module--test-assertions () 185(defmacro module--with-temp-directory (name &rest body)
186 "Check that -module-assertions work." 186 "Bind NAME to the name of a temporary directory and evaluate BODY.
187NAME must be a symbol. Delete the temporary directory after BODY
188exits normally or non-locally. NAME will be bound to the
189directory name (not the directory file name) of the temporary
190directory."
191 (declare (indent 1))
192 (cl-check-type name symbol)
193 `(let ((,name (file-name-as-directory
194 (make-temp-file "emacs-module-test" :directory))))
195 (unwind-protect
196 (progn ,@body)
197 (delete-directory ,name :recursive))))
198
199(defmacro module--test-assertion (pattern &rest body)
200 "Test that PATTERN matches the assertion triggered by BODY.
201Run Emacs as a subprocess, load the test module `mod-test-file',
202and evaluate BODY. Verify that Emacs aborts and prints a module
203assertion message that matches PATTERN. PATTERN is evaluated and
204must evaluate to a regular expression string."
205 (declare (indent 1))
206 ;; To contain any core dumps.
207 `(module--with-temp-directory tempdir
208 (with-temp-buffer
209 (let* ((default-directory tempdir)
210 (status (call-process mod-test-emacs nil t nil
211 "-batch" "-Q" "-module-assertions" "-eval"
212 ,(prin1-to-string
213 `(progn
214 (require 'mod-test ,mod-test-file)
215 ,@body)))))
216 (should (stringp status))
217 ;; eg "Aborted" or "Abort trap: 6"
218 (should (string-prefix-p "Abort" status))
219 (search-backward "Emacs module assertion: ")
220 (goto-char (match-end 0))
221 (should (string-match-p ,pattern
222 (buffer-substring-no-properties
223 (point) (point-max))))))))
224
225(ert-deftest module--test-assertions--load-non-live-object ()
226 "Check that -module-assertions verify that non-live objects
227aren’t accessed."
187 (skip-unless (file-executable-p mod-test-emacs)) 228 (skip-unless (file-executable-p mod-test-emacs))
188 ;; This doesn’t yet cause undefined behavior. 229 ;; This doesn’t yet cause undefined behavior.
189 (should (eq (mod-test-invalid-store) 123)) 230 (should (eq (mod-test-invalid-store) 123))
190 ;; To contain any core dumps. 231 (module--test-assertion (rx "Emacs value not found in "
191 (let ((tempdir (make-temp-file "emacs-module-test" t))) 232 (+ digit) " values of "
192 (unwind-protect 233 (+ digit) " environments\n")
193 (with-temp-buffer 234 ;; Storing and reloading a local value causes undefined behavior,
194 (should (string-match-p 235 ;; which should be detected by the module assertions.
195 "Abort" ; eg "Aborted" or "Abort trap: 6" 236 (mod-test-invalid-store)
196 (let ((default-directory tempdir)) 237 (mod-test-invalid-load)))
197 (call-process mod-test-emacs nil t nil 238
198 "-batch" "-Q" "-module-assertions" "-eval" 239(ert-deftest module--test-assertions--call-emacs-from-gc ()
199 (prin1-to-string 240 "Check that -module-assertions prevents calling Emacs functions
200 `(progn 241during garbage collection."
201 (require 'mod-test ,mod-test-file) 242 (skip-unless (file-executable-p mod-test-emacs))
202 ;; Storing and reloading a local 243 (module--test-assertion
203 ;; value causes undefined behavior, 244 (rx "Module function called during garbage collection\n")
204 ;; which should be detected by the 245 (mod-test-invalid-finalizer)))
205 ;; module assertions.
206 (mod-test-invalid-store)
207 (mod-test-invalid-load)))))))
208 (search-backward "Emacs module assertion:")
209 (should (string-match-p (rx bos "Emacs module assertion: "
210 "Emacs value not found in "
211 (+ digit) " values of "
212 (+ digit) " environments" eos)
213 (buffer-substring-no-properties
214 (line-beginning-position)
215 (line-end-position)))))
216 (delete-directory tempdir t))))
217 246
218;;; emacs-module-tests.el ends here 247;;; emacs-module-tests.el ends here
diff --git a/test/src/fns-tests.el b/test/src/fns-tests.el
index 2e463455f0c..e294859226c 100644
--- a/test/src/fns-tests.el
+++ b/test/src/fns-tests.el
@@ -373,6 +373,12 @@
373 (should-error (assoc 3 d1) :type 'wrong-type-argument) 373 (should-error (assoc 3 d1) :type 'wrong-type-argument)
374 (should-error (assoc 3 d2) :type 'wrong-type-argument))) 374 (should-error (assoc 3 d2) :type 'wrong-type-argument)))
375 375
376(ert-deftest test-assoc-testfn ()
377 (let ((alist '(("a" . 1) ("b" . 2))))
378 (should-not (assoc "a" alist #'ignore))
379 (should (eq (assoc "b" alist #'string-equal) (cadr alist)))
380 (should-not (assoc "b" alist #'eq))))
381
376(ert-deftest test-cycle-rassq () 382(ert-deftest test-cycle-rassq ()
377 (let ((c1 (cyc1 '(0 . 1))) 383 (let ((c1 (cyc1 '(0 . 1)))
378 (c2 (cyc2 '(0 . 1) '(0 . 2))) 384 (c2 (cyc2 '(0 . 1) '(0 . 2)))
diff --git a/test/src/lread-tests.el b/test/src/lread-tests.el
index 98cbb6a301d..dd5a2003b41 100644
--- a/test/src/lread-tests.el
+++ b/test/src/lread-tests.el
@@ -142,6 +142,23 @@ literals (Bug#20852)."
142 "unescaped character literals " 142 "unescaped character literals "
143 "`?\"', `?(', `?)', `?;', `?[', `?]' detected!"))))) 143 "`?\"', `?(', `?)', `?;', `?[', `?]' detected!")))))
144 144
145(ert-deftest lread-tests--funny-quote-symbols ()
146 "Check that 'smart quotes' or similar trigger errors in symbol names."
147 (dolist (quote-char
148 '(#x2018 ;; LEFT SINGLE QUOTATION MARK
149 #x2019 ;; RIGHT SINGLE QUOTATION MARK
150 #x201B ;; SINGLE HIGH-REVERSED-9 QUOTATION MARK
151 #x201C ;; LEFT DOUBLE QUOTATION MARK
152 #x201D ;; RIGHT DOUBLE QUOTATION MARK
153 #x201F ;; DOUBLE HIGH-REVERSED-9 QUOTATION MARK
154 #x301E ;; DOUBLE PRIME QUOTATION MARK
155 #xFF02 ;; FULLWIDTH QUOTATION MARK
156 #xFF07 ;; FULLWIDTH APOSTROPHE
157 ))
158 (let ((str (format "%cfoo" quote-char)))
159 (should-error (read str) :type 'invalid-read-syntax)
160 (should (eq (read (concat "\\" str)) (intern str))))))
161
145(ert-deftest lread-test-bug26837 () 162(ert-deftest lread-test-bug26837 ()
146 "Test for http://debbugs.gnu.org/26837 ." 163 "Test for http://debbugs.gnu.org/26837 ."
147 (let ((load-path (cons 164 (let ((load-path (cons
@@ -164,4 +181,10 @@ literals (Bug#20852)."
164 (concat (format-message "Loading `%s': " file-name) 181 (concat (format-message "Loading `%s': " file-name)
165 "old-style backquotes detected!"))))) 182 "old-style backquotes detected!")))))
166 183
184(ert-deftest lread-lread--substitute-object-in-subtree ()
185 (let ((x (cons 0 1)))
186 (setcar x x)
187 (lread--substitute-object-in-subtree x 1 t)
188 (should (eq x (cdr x)))))
189
167;;; lread-tests.el ends here 190;;; lread-tests.el ends here