emacs-diffs
[Top][All Lists]
Advanced

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

feature/pgtk 7a7bc15: Merge branch 'master' of git.sv.gnu.org:/srv/git/e


From: Yuuki Harano
Subject: feature/pgtk 7a7bc15: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into feature/pgtk
Date: Sun, 14 Mar 2021 10:37:00 -0400 (EDT)

branch: feature/pgtk
commit 7a7bc15242896b20c7af49f77f0e22c3d78e4d88
Merge: 56297c0 f9b737f
Author: Yuuki Harano <masm+github@masm11.me>
Commit: Yuuki Harano <masm+github@masm11.me>

    Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into feature/pgtk
---
 Makefile.in                            |   4 +
 admin/charsets/mapfiles/README         |   4 +-
 admin/grammars/python.wy               |   1 +
 doc/emacs/Makefile.in                  |  18 ++-
 doc/emacs/custom.texi                  |  14 +-
 doc/emacs/maintaining.texi             |   4 +
 doc/emacs/mini.texi                    |   3 +-
 doc/lispintro/Makefile.in              |  16 +++
 doc/lispintro/emacs-lisp-intro.texi    |  17 ++-
 doc/lispref/Makefile.in                |  16 +++
 doc/lispref/buffers.texi               |   3 -
 doc/lispref/display.texi               |  15 ++
 doc/lispref/eval.texi                  |   1 -
 doc/lispref/files.texi                 |   5 -
 doc/lispref/keymaps.texi               |   6 -
 doc/lispref/loading.texi               |   1 -
 doc/lispref/minibuf.texi               |   4 -
 doc/lispref/positions.texi             |   1 -
 doc/lispref/variables.texi             |   2 -
 doc/misc/Makefile.in                   |  17 +++
 doc/misc/efaq-w32.texi                 |   9 +-
 doc/misc/gnus-faq.texi                 |   8 +-
 doc/misc/gnus.texi                     |   9 +-
 doc/misc/tramp.texi                    |  11 +-
 etc/NEWS                               |  33 ++++-
 etc/themes/wombat-theme.el             |   2 +
 lisp/align.el                          |   4 +-
 lisp/arc-mode.el                       |   6 +-
 lisp/button.el                         |   4 +-
 lisp/calc/calc-yank.el                 |   5 +-
 lisp/calculator.el                     |   2 +-
 lisp/calendar/todo-mode.el             |   8 +-
 lisp/cedet/cedet-cscope.el             |   6 +-
 lisp/cedet/cedet-files.el              |   2 +-
 lisp/cedet/cedet-global.el             |   6 +-
 lisp/cedet/cedet-idutils.el            |  16 +--
 lisp/cedet/cedet.el                    |  40 +++---
 lisp/cedet/data-debug.el               |  57 ++++----
 lisp/cedet/ede.el                      |  77 +++++-----
 lisp/cedet/ede/auto.el                 |   6 +-
 lisp/cedet/ede/autoconf-edit.el        |   2 +-
 lisp/cedet/ede/config.el               |  10 +-
 lisp/cedet/ede/cpp-root.el             |  12 +-
 lisp/cedet/ede/custom.el               |  18 +--
 lisp/cedet/ede/detect.el               |   2 +-
 lisp/cedet/ede/dired.el                |  10 +-
 lisp/cedet/ede/files.el                |  24 ++--
 lisp/cedet/ede/generic.el              |  18 +--
 lisp/cedet/ede/linux.el                |   6 +-
 lisp/cedet/ede/locate.el               |  48 +++----
 lisp/cedet/ede/makefile-edit.el        |   2 +-
 lisp/cedet/ede/pconf.el                |  21 +--
 lisp/cedet/ede/pmake.el                |  47 +++---
 lisp/cedet/ede/proj-comp.el            |   2 +-
 lisp/cedet/ede/proj-elisp.el           |  41 +++---
 lisp/cedet/ede/proj-info.el            |   6 +-
 lisp/cedet/ede/proj-obj.el             |   8 +-
 lisp/cedet/ede/proj-prog.el            |   6 +-
 lisp/cedet/ede/proj-shared.el          |   6 +-
 lisp/cedet/ede/proj.el                 |  22 +--
 lisp/cedet/ede/project-am.el           |   8 +-
 lisp/cedet/ede/shell.el                |   2 +-
 lisp/cedet/ede/simple.el               |   6 +-
 lisp/cedet/ede/source.el               |   4 +-
 lisp/cedet/ede/speedbar.el             |  52 +++----
 lisp/cedet/ede/util.el                 |   2 +-
 lisp/cedet/mode-local.el               |   2 +-
 lisp/cedet/pulse.el                    |   4 +-
 lisp/cedet/semantic.el                 |  70 ++++-----
 lisp/cedet/semantic/grammar.el         |   2 +-
 lisp/cedet/semantic/idle.el            |  97 +++++++------
 lisp/cedet/semantic/scope.el           |   4 +-
 lisp/cedet/semantic/wisent/comp.el     |  27 ++--
 lisp/doc-view.el                       |   2 +
 lisp/emacs-lisp/benchmark.el           |   3 +-
 lisp/emacs-lisp/byte-opt.el            |   2 +
 lisp/emacs-lisp/cconv.el               |  19 ++-
 lisp/emacs-lisp/checkdoc.el            |   6 +-
 lisp/emacs-lisp/easy-mmode.el          |  18 ++-
 lisp/emacs-lisp/edebug.el              |   2 +-
 lisp/emacs-lisp/ert.el                 |  31 ++--
 lisp/emacs-lisp/gv.el                  |   3 +-
 lisp/emacs-lisp/syntax.el              |  13 +-
 lisp/emacs-lisp/tcover-ses.el          |   4 +-
 lisp/emulation/cua-rect.el             |   2 +-
 lisp/emulation/edt.el                  |  28 ++--
 lisp/erc/erc-menu.el                   |   4 +-
 lisp/eshell/em-ls.el                   |   6 +-
 lisp/faces.el                          |  17 ++-
 lisp/files.el                          |   4 +-
 lisp/filesets.el                       |  63 ++++----
 lisp/gnus/gnus-kill.el                 |   4 +-
 lisp/gnus/gnus-search.el               |   4 +-
 lisp/gnus/gnus-start.el                |  11 +-
 lisp/gnus/gnus-sum.el                  |   8 +-
 lisp/gnus/nnbabyl.el                   |   4 +-
 lisp/gnus/nnfolder.el                  |   4 +-
 lisp/gnus/nnmh.el                      |   2 +
 lisp/gnus/nnrss.el                     |   5 +-
 lisp/help.el                           |   4 +-
 lisp/ibuffer.el                        |   2 +-
 lisp/ido.el                            |   4 +-
 lisp/image-mode.el                     |  24 +++-
 lisp/image.el                          |  51 ++++++-
 lisp/info.el                           |   4 +-
 lisp/international/quail.el            |   2 +-
 lisp/jit-lock.el                       |   2 +-
 lisp/mail/binhex.el                    |  14 +-
 lisp/mail/blessmail.el                 |   2 +-
 lisp/mail/emacsbug.el                  |  28 ++--
 lisp/mail/feedmail.el                  |  10 +-
 lisp/mail/flow-fill.el                 |   4 +-
 lisp/mail/ietf-drums.el                |   4 +-
 lisp/mail/mail-extr.el                 |  47 +++---
 lisp/mail/mail-hist.el                 |  15 +-
 lisp/mail/mail-utils.el                |   6 +-
 lisp/mail/mailabbrev.el                |  30 ++--
 lisp/mail/mailclient.el                |   2 +-
 lisp/mail/mailheader.el                |  35 ++---
 lisp/mail/mspools.el                   |  10 +-
 lisp/mail/rfc822.el                    |   2 +-
 lisp/mail/rmail-spam-filter.el         |  46 +++---
 lisp/mail/rmail.el                     |   4 +-
 lisp/mail/rmailedit.el                 |   8 +-
 lisp/mail/rmailkwd.el                  |   4 +-
 lisp/mail/rmailmm.el                   | 194 +++++++++++++------------
 lisp/mail/rmailmsc.el                  |   4 +-
 lisp/mail/rmailout.el                  |  11 +-
 lisp/mail/rmailsort.el                 |   6 +-
 lisp/mail/smtpmail.el                  |   8 +-
 lisp/mail/supercite.el                 | 102 ++++++-------
 lisp/mail/uce.el                       |  27 ++--
 lisp/mail/unrmail.el                   |   4 +-
 lisp/mouse.el                          |   4 +-
 lisp/net/ange-ftp.el                   |   4 +-
 lisp/net/browse-url.el                 |  42 +++---
 lisp/net/dictionary.el                 |  69 +++++----
 lisp/net/dig.el                        |   4 +-
 lisp/net/dns.el                        |   8 +-
 lisp/net/eudc-bob.el                   |  20 +--
 lisp/net/eudc-export.el                |  78 +++++-----
 lisp/net/eudc-hotlist.el               |  14 +-
 lisp/net/eudc.el                       |  14 +-
 lisp/net/eudcb-bbdb.el                 | 125 ++++++++--------
 lisp/net/eudcb-ldap.el                 |  18 +--
 lisp/net/eudcb-mab.el                  |   2 +-
 lisp/net/eudcb-macos-contacts.el       |   4 +-
 lisp/net/gnutls.el                     |   7 +-
 lisp/net/goto-addr.el                  |  28 ++--
 lisp/net/net-utils.el                  |  84 ++++-------
 lisp/net/network-stream.el             |   3 +-
 lisp/net/newst-backend.el              |  32 ++---
 lisp/net/newst-plainview.el            | 121 ++++++++--------
 lisp/net/newst-reader.el               |  10 +-
 lisp/net/newst-ticker.el               |  12 +-
 lisp/net/newst-treeview.el             | 129 ++++++++---------
 lisp/net/puny.el                       |   4 +-
 lisp/net/quickurl.el                   |  29 ++--
 lisp/net/rcirc.el                      |   2 +-
 lisp/net/secrets.el                    |  10 +-
 lisp/net/shr-color.el                  |  14 +-
 lisp/net/shr.el                        |  26 ++--
 lisp/net/sieve-mode.el                 |   6 +-
 lisp/net/soap-client.el                |  26 ++--
 lisp/net/soap-inspect.el               |  46 +++---
 lisp/net/telnet.el                     |  20 +--
 lisp/net/tramp-adb.el                  |   2 -
 lisp/net/tramp-cache.el                |  28 ++--
 lisp/net/tramp-cmds.el                 |   4 +-
 lisp/net/tramp-compat.el               |   2 +-
 lisp/net/tramp-crypt.el                |  17 +++
 lisp/net/tramp-gvfs.el                 |   1 -
 lisp/net/tramp-integration.el          |   2 +-
 lisp/net/tramp-rclone.el               |   1 -
 lisp/net/tramp-sh.el                   | 209 +++++++--------------------
 lisp/net/tramp-smb.el                  |   7 -
 lisp/net/tramp-sshfs.el                | 119 ++++++++++-----
 lisp/net/tramp-sudoedit.el             |  22 ++-
 lisp/net/tramp.el                      | 151 +++++++++++++++----
 lisp/net/webjump.el                    |   2 +-
 lisp/obsolete/iswitchb.el              |  35 +----
 lisp/org/ob-lilypond.el                |   6 +-
 lisp/org/ol-gnus.el                    |   4 +-
 lisp/org/ol.el                         |   6 +-
 lisp/org/org-clock.el                  |   8 +-
 lisp/org/org-crypt.el                  |   2 +
 lisp/org/org-protocol.el               |   4 +-
 lisp/org/org-tempo.el                  |   2 +-
 lisp/org/org.el                        |   2 +-
 lisp/org/ox-odt.el                     |  11 +-
 lisp/org/ox.el                         |   4 +-
 lisp/outline.el                        |  21 +--
 lisp/progmodes/cfengine.el             |   4 +-
 lisp/progmodes/cperl-mode.el           |  30 ++--
 lisp/progmodes/ebrowse.el              |   4 +-
 lisp/progmodes/project.el              |   5 +-
 lisp/progmodes/xref.el                 |   9 +-
 lisp/ses.el                            |  24 ++--
 lisp/simple.el                         |  55 +++++--
 lisp/subr.el                           |   4 +-
 lisp/tab-bar.el                        | 255 ++++++++++++++++++++++++++-------
 lisp/tab-line.el                       |  29 +++-
 lisp/tar-mode.el                       |   8 +-
 lisp/textmodes/artist.el               |   4 +-
 lisp/textmodes/enriched.el             |   6 +
 lisp/textmodes/flyspell.el             |   4 +-
 lisp/textmodes/reftex-vars.el          |   2 +-
 lisp/textmodes/rst.el                  |   2 +-
 lisp/textmodes/table.el                |   2 +-
 lisp/tooltip.el                        |   6 +-
 lisp/userlock.el                       |  75 +++++++---
 lisp/vc/pcvs-parse.el                  |  10 ++
 lisp/vc/smerge-mode.el                 |  49 +++----
 lisp/vc/vc.el                          |   7 +-
 lisp/xdg.el                            |   4 +-
 src/buffer.c                           |   1 +
 src/dispnew.c                          |  28 +++-
 src/fns.c                              |   3 +-
 src/gtkutil.c                          |  22 +--
 src/image.c                            |  23 ++-
 src/keyboard.c                         |   3 +-
 src/sysdep.c                           |  17 ++-
 test/lisp/emacs-lisp/bytecomp-tests.el |   5 +
 test/lisp/emacs-lisp/ert-tests.el      |   2 +-
 test/lisp/kmacro-tests.el              |   2 +-
 test/lisp/net/tramp-tests.el           |  68 ++++-----
 test/lisp/simple-tests.el              | 118 ++++++++++++++-
 227 files changed, 2577 insertions(+), 2043 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index fbaa665..2e0390b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -948,6 +948,10 @@ extraclean: $(extraclean_dirs:=_extraclean)
 # I removed it because it causes `make tags` to build Emacs.
 TAGS tags: lib lib-src # src
        $(MAKE) -C src tags
+       $(MAKE) -C doc/emacs tags
+       $(MAKE) -C doc/lispintro tags
+       $(MAKE) -C doc/lispref tags
+       $(MAKE) -C doc/misc tags
 
 CHECK_TARGETS = check check-maybe check-expensive check-all
 .PHONY: $(CHECK_TARGETS)
diff --git a/admin/charsets/mapfiles/README b/admin/charsets/mapfiles/README
index 60f0912..fb07826 100644
--- a/admin/charsets/mapfiles/README
+++ b/admin/charsets/mapfiles/README
@@ -63,8 +63,8 @@ to "JIS X 0213:2004".
 
 * MULE-*.map
 
-Created by using ../mule-charsets.el in Emacs 22 as this:
-    % emacs-22 -batch -l ../mule-charsets.el
+Created by using ../mule-charsets.el in Emacs as this:
+    % emacs -batch -l ../mule-charsets.el
 
 
 This file is part of GNU Emacs.
diff --git a/admin/grammars/python.wy b/admin/grammars/python.wy
index 22e8557..2539d1b 100644
--- a/admin/grammars/python.wy
+++ b/admin/grammars/python.wy
@@ -91,6 +91,7 @@
 %expectedconflicts 5
 
 %{
+(require 'semantic/tag)
 (declare-function wisent-python-reconstitute-function-tag
                  "semantic/wisent/python" (tag suite))
 (declare-function wisent-python-reconstitute-class-tag "semantic/wisent/python"
diff --git a/doc/emacs/Makefile.in b/doc/emacs/Makefile.in
index 4585b2e..69d39ef 100644
--- a/doc/emacs/Makefile.in
+++ b/doc/emacs/Makefile.in
@@ -220,7 +220,7 @@ infoclean:
          $(buildinfodir)/emacs.info-[1-9][0-9]
 
 bootstrap-clean maintainer-clean: distclean infoclean
-       rm -f ${srcdir}/emacsver.texi
+       rm -f ${srcdir}/emacsver.texi TAGS
 
 .PHONY: install-dvi install-html install-pdf install-ps install-doc
 
@@ -269,4 +269,20 @@ uninstall-pdf:
 uninstall-doc: uninstall-dvi uninstall-html uninstall-pdf uninstall-ps
 
 
+ETAGS = ../../lib-src/etags${EXEEXT}
+
+${ETAGS}: FORCE
+       $(MAKE) -C $(dir $@) $(notdir $@)
+
+texifiles = $(wildcard ${srcdir}/*.texi)
+
+TAGS: ${ETAGS} $(texifiles)
+       $(AM_V_GEN)${ETAGS} --include=../lispref/TAGS --include=../misc/TAGS 
$(texifiles)
+
+tags: TAGS
+.PHONY: tags
+
+FORCE:
+.PHONY: FORCE
+
 ### Makefile ends here
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi
index 22900c5..bd505d2 100644
--- a/doc/emacs/custom.texi
+++ b/doc/emacs/custom.texi
@@ -388,15 +388,15 @@ file.  For example:
 Emacs versions, like this:
 
 @example
-(cond ((< emacs-major-version 22)
-       ;; @r{Emacs 21 customization.}
-       (setq custom-file "~/.config/custom-21.el"))
-      ((and (= emacs-major-version 22)
+(cond ((< emacs-major-version 28)
+       ;; @r{Emacs 27 customization.}
+       (setq custom-file "~/.config/custom-27.el"))
+      ((and (= emacs-major-version 26)
             (< emacs-minor-version 3))
-       ;; @r{Emacs 22 customization, before version 22.3.}
-       (setq custom-file "~/.config/custom-22.el"))
+       ;; @r{Emacs 26 customization, before version 26.3.}
+       (setq custom-file "~/.config/custom-26.el"))
       (t
-       ;; @r{Emacs version 22.3 or later.}
+       ;; @r{Emacs version 28.1 or later.}
        (setq custom-file "~/.config/emacs-custom.el")))
 
 (load custom-file)
diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi
index bc276c4..2750418 100644
--- a/doc/emacs/maintaining.texi
+++ b/doc/emacs/maintaining.texi
@@ -1611,6 +1611,10 @@ branch ID for a branch starting at the current revision. 
 For example,
 if the current revision is 2.5, the branch ID should be 2.5.1, 2.5.2,
 and so on, depending on the number of existing branches at that point.
 
+  This procedure will not work for distributed version control systems
+like git or Mercurial.  For those systems you should use the prefix
+argument to @code{vc-create-tag} (@kbd{C-u C-x v s}) instead.
+
   To create a new branch at an older revision (one that is no longer
 the head of a branch), first select that revision (@pxref{Switching
 Branches}).  Your procedure will then differ depending on whether you
diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi
index f81e64b..9c1b975 100644
--- a/doc/emacs/mini.texi
+++ b/doc/emacs/mini.texi
@@ -800,6 +800,7 @@ can re-execute a command by calling @code{eval} with the
 
 @node Passwords
 @section Entering passwords
+@cindex entering passwords
 
 Sometimes, you may need to enter a password into Emacs.  For instance,
 when you tell Emacs to visit a file on another machine via a network
@@ -810,7 +811,7 @@ access to the machine (@pxref{Remote Files}).
 displays a prompt in the echo area (such as @samp{Password: }); after
 you type the required password, press @key{RET} to submit it.  To
 prevent others from seeing your password, every character you type is
-displayed as a dot (@samp{.}) instead of its usual form.
+displayed as an asterisk (@samp{*}) instead of its usual form.
 
   Most of the features and commands associated with the minibuffer
 @emph{cannot} be used when entering a password.  There is no history
diff --git a/doc/lispintro/Makefile.in b/doc/lispintro/Makefile.in
index 45b4fe7..294b310 100644
--- a/doc/lispintro/Makefile.in
+++ b/doc/lispintro/Makefile.in
@@ -119,6 +119,7 @@ infoclean:
          $(buildinfodir)/eintr.info-[1-9]
 
 bootstrap-clean maintainer-clean: distclean infoclean
+       rm -f TAGS
 
 .PHONY: install-dvi install-html install-pdf install-ps install-doc
 
@@ -166,5 +167,20 @@ uninstall-pdf:
 
 uninstall-doc: uninstall-dvi uninstall-html uninstall-pdf uninstall-ps
 
+ETAGS = ../../lib-src/etags${EXEEXT}
+
+${ETAGS}: FORCE
+       $(MAKE) -C $(dir $@) $(notdir $@)
+
+texifiles = $(wildcard ${srcdir}/*.texi)
+
+TAGS: ${ETAGS} $(texifiles)
+       $(AM_V_GEN)${ETAGS} $(texifiles)
+
+tags: TAGS
+.PHONY: tags
+
+FORCE:
+.PHONY: FORCE
 
 ### Makefile ends here
diff --git a/doc/lispintro/emacs-lisp-intro.texi 
b/doc/lispintro/emacs-lisp-intro.texi
index d5c280b..5b15a45 100644
--- a/doc/lispintro/emacs-lisp-intro.texi
+++ b/doc/lispintro/emacs-lisp-intro.texi
@@ -17532,10 +17532,9 @@ Here is the definition:
 @need 1250
 Now for the keybinding.
 
-Nowadays, function keys as well as mouse button events and
-non-@sc{ascii} characters are written within square brackets, without
-quotation marks.  (In Emacs version 18 and before, you had to write
-different function key bindings for each different make of terminal.)
+Function keys as well as mouse button events and non-@sc{ascii}
+characters are written within square brackets, without quotation
+marks.
 
 I bind @code{line-to-top-of-window} to my @key{F6} function key like
 this:
@@ -17550,18 +17549,18 @@ Your Init File, emacs, The GNU Emacs Manual}.
 @cindex Conditional 'twixt two versions of Emacs
 @cindex Version of Emacs, choosing
 @cindex Emacs version, choosing
-If you run two versions of GNU Emacs, such as versions 22 and 23, and
+If you run two versions of GNU Emacs, such as versions 27 and 28, and
 use one @file{.emacs} file, you can select which code to evaluate with
 the following conditional:
 
 @smallexample
 @group
 (cond
- ((= 22 emacs-major-version)
-  ;; evaluate version 22 code
+ ((= 27 emacs-major-version)
+  ;; evaluate version 27 code
   ( @dots{} ))
- ((= 23 emacs-major-version)
-  ;; evaluate version 23 code
+ ((= 28 emacs-major-version)
+  ;; evaluate version 28 code
   ( @dots{} )))
 @end group
 @end smallexample
diff --git a/doc/lispref/Makefile.in b/doc/lispref/Makefile.in
index 8763035..a7701c5 100644
--- a/doc/lispref/Makefile.in
+++ b/doc/lispref/Makefile.in
@@ -180,6 +180,7 @@ infoclean:
          $(buildinfodir)/elisp.info-[1-9][0-9]
 
 bootstrap-clean maintainer-clean: distclean infoclean
+       rm -f TAGS
 
 .PHONY: install-dvi install-html install-pdf install-ps install-doc
 
@@ -227,5 +228,20 @@ uninstall-pdf:
 
 uninstall-doc: uninstall-dvi uninstall-html uninstall-pdf uninstall-ps
 
+ETAGS = ../../lib-src/etags${EXEEXT}
+
+${ETAGS}: FORCE
+       $(MAKE) -C $(dir $@) $(notdir $@)
+
+texifiles = $(wildcard ${srcdir}/*.texi)
+
+TAGS: ${ETAGS} $(texifiles)
+       $(AM_V_GEN)${ETAGS} $(texifiles)
+
+tags: TAGS
+.PHONY: tags
+
+FORCE:
+.PHONY: FORCE
 
 ### Makefile ends here
diff --git a/doc/lispref/buffers.texi b/doc/lispref/buffers.texi
index 69733f9..0d31b0b 100644
--- a/doc/lispref/buffers.texi
+++ b/doc/lispref/buffers.texi
@@ -309,7 +309,6 @@ foo
 This function renames the current buffer to @var{newname}.  An error
 is signaled if @var{newname} is not a string.
 
-@c Emacs 19 feature
 Ordinarily, @code{rename-buffer} signals an error if @var{newname} is
 already in use.  However, if @var{unique} is non-@code{nil}, it modifies
 @var{newname} to make a name that is not in use.  Interactively, you can
@@ -344,7 +343,6 @@ a name.  For example:
 See also the function @code{get-buffer-create} in @ref{Creating Buffers}.
 @end defun
 
-@c Emacs 19 feature
 @defun generate-new-buffer-name starting-name &optional ignore
 This function returns a name that would be unique for a new buffer---but
 does not create the buffer.  It starts with @var{starting-name}, and
@@ -879,7 +877,6 @@ then @code{other-buffer} uses that predicate to decide 
which buffers to
 consider.  It calls the predicate once for each buffer, and if the value
 is @code{nil}, that buffer is ignored.  @xref{Buffer Parameters}.
 
-@c Emacs 19 feature
 If @var{visible-ok} is @code{nil}, @code{other-buffer} avoids returning
 a buffer visible in any window on any visible frame, except as a last
 resort.  If @var{visible-ok} is non-@code{nil}, then it does not matter
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 131ad2d..f003d52 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -5392,6 +5392,21 @@ are supported, unless the image type is 
@code{imagemagick}.  Positive
 values rotate clockwise, negative values counter-clockwise.  Rotation
 is performed after scaling and cropping.
 
+@item :transform-smoothing @var{smooth}
+If this is @code{t}, any image transform will have smoothing applied;
+if @code{nil}, no smoothing will be applied.  The exact algorithm used
+is platform dependent, but should be equivalent to bilinear
+filtering.  Disabling smoothing will use the nearest neighbor
+algorithm.
+
+If this property is not specified, @code{create-image} will use the
+@code{image-transform-smoothing} user option to say whether scaling
+should be done or not.  This option can be @code{nil} (no smoothing),
+@code{t} (use smoothing) or a predicate function that's called with
+the image object as the only parameter, and should return either
+@code{nil} or @code{t}.  The default is for down-scaling to apply
+smoothing, and for large up-scaling to not apply smoothing.
+
 @item :index @var{frame}
 @xref{Multi-Frame Images}.
 
diff --git a/doc/lispref/eval.texi b/doc/lispref/eval.texi
index 80e038c..448b8ae 100644
--- a/doc/lispref/eval.texi
+++ b/doc/lispref/eval.texi
@@ -332,7 +332,6 @@ or just
   The built-in function @code{indirect-function} provides an easy way to
 perform symbol function indirection explicitly.
 
-@c Emacs 19 feature
 @defun indirect-function function &optional noerror
 @anchor{Definition of indirect-function}
 This function returns the meaning of @var{function} as a function.  If
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi
index 4110c51..2828b50 100644
--- a/doc/lispref/files.texi
+++ b/doc/lispref/files.texi
@@ -455,7 +455,6 @@ Even though this is not a normal hook, you can use 
@code{add-hook} and
 @code{remove-hook} to manipulate the list.  @xref{Hooks}.
 @end defvar
 
-@c Emacs 19 feature
 @defvar write-contents-functions
 This works just like @code{write-file-functions}, but it is intended
 for hooks that pertain to the buffer's contents, not to the particular
@@ -486,7 +485,6 @@ this hook to make sure the file you are saving has the 
current year in
 its copyright notice.
 @end defopt
 
-@c Emacs 19 feature
 @defopt after-save-hook
 This normal hook runs after a buffer has been saved in its visited file.
 @end defopt
@@ -622,7 +620,6 @@ If @var{start} is @code{nil}, then the command writes the 
entire buffer
 contents (@emph{not} just the accessible portion) to the file and
 ignores @var{end}.
 
-@c Emacs 19 feature
 If @var{start} is a string, then @code{write-region} writes or appends
 that string, rather than text from the buffer.  @var{end} is ignored in
 this case.
@@ -653,7 +650,6 @@ It also sets the last file modification time for the 
current buffer to
 feature is used by @code{save-buffer}, but you probably should not use
 it yourself.
 
-@c Emacs 19 feature
 If @var{visit} is a string, it specifies the file name to visit.  This
 way, you can write the data to one file (@var{filename}) while recording
 the buffer as visiting another file (@var{visit}).  The argument
@@ -3094,7 +3090,6 @@ which generate the listing with Lisp code.
 @node Create/Delete Dirs
 @section Creating, Copying and Deleting Directories
 @cindex creating, copying and deleting directories
-@c Emacs 19 features
 
   Most Emacs Lisp file-manipulation functions get errors when used on
 files that are directories.  For example, you cannot delete a directory
diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi
index 6a227e3..dabf985 100644
--- a/doc/lispref/keymaps.texi
+++ b/doc/lispref/keymaps.texi
@@ -369,7 +369,6 @@ appear directly as bindings in @var{keymap} are also copied 
recursively,
 and so on to any number of levels.  However, recursive copying does not
 take place when the definition of a character is a symbol whose function
 definition is a keymap; the same symbol appears in the new copy.
-@c Emacs 19 feature
 
 @example
 @group
@@ -1140,7 +1139,6 @@ and have extra events at the end that do not fit into a 
single key
 sequence.  Then the value is a number, the number of events at the front
 of @var{key} that compose a complete key.
 
-@c Emacs 19 feature
 If @var{accept-defaults} is non-@code{nil}, then @code{lookup-key}
 considers default bindings as well as bindings for the specific events
 in @var{key}.  Otherwise, @code{lookup-key} reports only bindings for
@@ -1182,7 +1180,6 @@ not cause an error.
 This function returns the binding for @var{key} in the current
 local keymap, or @code{nil} if it is undefined there.
 
-@c Emacs 19 feature
 The argument @var{accept-defaults} controls checking for default bindings,
 as in @code{lookup-key} (above).
 @end defun
@@ -1191,12 +1188,10 @@ as in @code{lookup-key} (above).
 This function returns the binding for command @var{key} in the
 current global keymap, or @code{nil} if it is undefined there.
 
-@c Emacs 19 feature
 The argument @var{accept-defaults} controls checking for default bindings,
 as in @code{lookup-key} (above).
 @end defun
 
-@c Emacs 19 feature
 @defun minor-mode-key-binding key &optional accept-defaults
 This function returns a list of all the active minor mode bindings of
 @var{key}.  More precisely, it returns an alist of pairs
@@ -1414,7 +1409,6 @@ standard bindings:
 @end group
 @end smallexample
 
-@c Emacs 19 feature
 If @var{oldmap} is non-@code{nil}, that changes the behavior of
 @code{substitute-key-definition}: the bindings in @var{oldmap} determine
 which keys to rebind.  The rebindings still happen in @var{keymap}, not
diff --git a/doc/lispref/loading.texi b/doc/lispref/loading.texi
index 8c6aeb0..e68a1ef 100644
--- a/doc/lispref/loading.texi
+++ b/doc/lispref/loading.texi
@@ -1052,7 +1052,6 @@ rather than replacing that element.  @xref{Eval}.
 @section Unloading
 @cindex unloading packages
 
-@c Emacs 19 feature
   You can discard the functions and variables loaded by a library to
 reclaim memory for other Lisp objects.  To do this, use the function
 @code{unload-feature}:
diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi
index bbc8340..d16409d 100644
--- a/doc/lispref/minibuf.texi
+++ b/doc/lispref/minibuf.texi
@@ -379,8 +379,6 @@ default, it makes the following bindings:
 @end table
 @end defvar
 
-@c In version 18, initial is required
-@c Emacs 19 feature
 @defun read-no-blanks-input prompt &optional initial inherit-input-method
 This function reads a string from the minibuffer, but does not allow
 whitespace characters as part of the input: instead, those characters
@@ -2475,7 +2473,6 @@ usual minibuffer input functions because they all start 
by choosing the
 minibuffer window according to the selected frame.
 @end defun
 
-@c Emacs 19 feature
 @defun window-minibuffer-p &optional window
 This function returns @code{t} if @var{window} is a minibuffer window.
 @var{window} defaults to the selected window.
@@ -2619,7 +2616,6 @@ when the minibuffer is active, not even if you switch to 
another window
 to do it.
 @end defopt
 
-@c Emacs 19 feature
 If a command name has a property @code{enable-recursive-minibuffers}
 that is non-@code{nil}, then the command can use the minibuffer to read
 arguments even if it is invoked from the minibuffer.  A command can
diff --git a/doc/lispref/positions.texi b/doc/lispref/positions.texi
index dc0c744..769aeed 100644
--- a/doc/lispref/positions.texi
+++ b/doc/lispref/positions.texi
@@ -232,7 +232,6 @@ backward until encountering the front of a word, rather 
than forward.
 @end deffn
 
 @defopt words-include-escapes
-@c Emacs 19 feature
 This variable affects the behavior of @code{forward-word} and
 @code{backward-word}, and everything that uses them.  If it is
 non-@code{nil}, then characters in the escape and character-quote
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi
index 6343817..0ddf3e4 100644
--- a/doc/lispref/variables.texi
+++ b/doc/lispref/variables.texi
@@ -1696,7 +1696,6 @@ buffer has a buffer-local binding.  For example, you 
could use
 you are in a C or Lisp mode buffer that has a buffer-local value for
 this variable.
 
-@c Emacs 19 feature
   The special forms @code{defvar} and @code{defconst} also set the
 default value (if they set the variable at all), rather than any
 buffer-local value.
@@ -1708,7 +1707,6 @@ this variable.  If @var{symbol} is not buffer-local, this 
is equivalent
 to @code{symbol-value} (@pxref{Accessing Variables}).
 @end defun
 
-@c Emacs 19 feature
 @defun default-boundp symbol
 The function @code{default-boundp} tells you whether @var{symbol}'s
 default value is nonvoid.  If @code{(default-boundp 'foo)} returns
diff --git a/doc/misc/Makefile.in b/doc/misc/Makefile.in
index 5130650..63d4bf0 100644
--- a/doc/misc/Makefile.in
+++ b/doc/misc/Makefile.in
@@ -287,6 +287,7 @@ orgclean:
        rm -f ${TEXI_FROM_ORG}
 
 bootstrap-clean maintainer-clean: distclean infoclean orgclean
+       rm -f TAGS
 
 .PHONY: install-dvi install-html install-pdf install-ps install-doc
 
@@ -336,4 +337,20 @@ uninstall-pdf:
 uninstall-doc: uninstall-dvi uninstall-html uninstall-pdf uninstall-ps
 
 
+ETAGS = ../../lib-src/etags${EXEEXT}
+
+${ETAGS}: FORCE
+       $(MAKE) -C $(dir $@) $(notdir $@)
+
+texifiles = $(wildcard ${srcdir}/*.texi)
+
+TAGS: ${ETAGS} $(texifiles)
+       $(AM_V_GEN)${ETAGS} $(texifiles)
+
+tags: TAGS
+.PHONY: tags
+
+FORCE:
+.PHONY: FORCE
+
 ### Makefile ends here
diff --git a/doc/misc/efaq-w32.texi b/doc/misc/efaq-w32.texi
index 2abde2c..6eff88b 100644
--- a/doc/misc/efaq-w32.texi
+++ b/doc/misc/efaq-w32.texi
@@ -370,11 +370,10 @@ On Windows, the @file{.emacs} file may be called 
@file{_emacs} for
 backward compatibility with DOS and FAT filesystems where filenames
 could not start with a dot.  Some users prefer to continue using such
 a name due to historical problems various Windows tools had in the
-past with file names that begin with a dot.  In Emacs 22 and later,
-the init file may also be called @file{.emacs.d/init.el}.  Many of the
-other files that are created by lisp packages are now stored in the
-@file{.emacs.d} directory too, so this keeps all your Emacs related
-files in one place.
+past with file names that begin with a dot.  The init file may also be
+called @file{.emacs.d/init.el}.  Many of the other files that are
+created by Lisp packages are stored in the @file{.emacs.d} directory
+too, which keeps all your Emacs related files in one place.
 
 All the files mentioned above should go in your @env{HOME} directory.
 The @env{HOME} directory is determined by following the steps below:
diff --git a/doc/misc/gnus-faq.texi b/doc/misc/gnus-faq.texi
index 4c29976..35a2526 100644
--- a/doc/misc/gnus-faq.texi
+++ b/doc/misc/gnus-faq.texi
@@ -160,13 +160,7 @@ Where and how to get Gnus?
 
 @subsubheading Answer
 
-Gnus is released independent from releases of Emacs.  Therefore, the
-version bundled with Emacs might not be up to date (e.g., Gnus 5.9
-bundled with Emacs 21 is outdated).
-You can get the latest released version of Gnus from
-@uref{https://www.gnus.org/dist/gnus.tar.gz}
-or from
-@uref{https://ftp.gnus.org/pub/gnus/gnus.tar.gz}.
+Gnus is bundled with Emacs.
 
 @node FAQ 1-4
 @subsubheading Question 1.4
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
index faf5366..b6553c8 100644
--- a/doc/misc/gnus.texi
+++ b/doc/misc/gnus.texi
@@ -815,7 +815,7 @@ Various
 * Undo::                        Some actions can be undone.
 * Predicate Specifiers::        Specifying predicates.
 * Moderation::                  What to do if you're a moderator.
-* Image Enhancements::          Modern versions of Emacs can display images.
+* Image Enhancements::          Emacs can display images.
 * Fuzzy Matching::              What's the big fuzz?
 * Thwarting Email Spam::        Simple ways to avoid unsolicited commercial 
email.
 * Spam Package::                A package for filtering and processing spam.
@@ -22505,7 +22505,7 @@ to you, using @kbd{G b u} and updating the group will 
usually fix this.
 * Predicate Specifiers::        Specifying predicates.
 * Moderation::                  What to do if you're a moderator.
 * Fetching a Group::            Starting Gnus just to read a group.
-* Image Enhancements::          Modern versions of Emacs can display images.
+* Image Enhancements::          Emacs can display images.
 * Fuzzy Matching::              What's the big fuzz?
 * Thwarting Email Spam::        Simple ways to avoid unsolicited commercial 
email.
 * Spam Package::                A package for filtering and processing spam.
@@ -23668,9 +23668,8 @@ It takes the group name as a parameter.
 @node Image Enhancements
 @section Image Enhancements
 
-Emacs 21@footnote{Emacs 21 on MS Windows doesn't
-support images, Emacs 22 does.} and up are able to display pictures and
-stuff, so Gnus has taken advantage of that.
+Emacs is able to display pictures and stuff, so Gnus has taken
+advantage of that.
 
 @menu
 * X-Face::                      Display a funky, teensy black-and-white image.
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index 5958162..7ae5622 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -2648,11 +2648,14 @@ visibility of files.
 @subsection @option{sshfs} setup
 @cindex sshfs setup
 
-The method @option{sshfs} declares only the mount arguments, passed to
-the @command{sshfs} command.  This is a list of list of strings, and
-can be overwritten by the connection property @t{"mount-args"},
-@xref{Predefined connection information}.
+The method @option{sshfs} declares the mount arguments in the variable
+@code{tramp-methods}, passed to the @command{sshfs} command.  This is
+a list of list of strings, and can be overwritten by the connection
+property @t{"mount-args"}, @xref{Predefined connection information}.
 
+Additionally, it declares also the arguments for running remote
+processes, using the @command{ssh} command.  These don't need to be
+changed.
 
 @node Android shell setup
 @section Android shell setup hints
diff --git a/etc/NEWS b/etc/NEWS
index 26bed2a..01fd7af 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -24,7 +24,7 @@ applies, and please also update docstrings as needed.
 
 * Installation Changes in Emacs 28.1
 
---
+---
 ** Support for building with Motif has been removed.
 
 ** Cairo graphics library is now used by default if found.
@@ -69,8 +69,7 @@ It was declared obsolete in Emacs 27.1.
 ---
 ** The configure option '--without-makeinfo' has been removed.
 This was only ever relevant when building from a repository checkout.
-Please install makeinfo, or if all else fails run 'make lisp' instead
-of 'make [all]'.
+This now requires makeinfo, which is part of the texinfo package.
 
 ---
 ** Support for building with '-fcheck-pointer-bounds' has been removed.
@@ -520,11 +519,13 @@ It can be used to enable/disable the tab bar individually 
on each frame
 independently from the value of 'tab-bar-mode' and 'tab-bar-show'.
 
 ---
-*** New variable 'tab-bar-format' defines a list of tab bar items.
+*** New option 'tab-bar-format' defines a list of tab bar items.
 When it contains 'tab-bar-format-global' (possibly appended after
 'tab-bar-format-align-right'), then after enabling 'display-time-mode'
 (or any other mode that uses 'global-mode-string') it displays time
 aligned to the right on the tab bar instead of the mode line.
+When 'tab-bar-format-tabs' is replaced with 'tab-bar-format-tabs-groups',
+then the tab bar displays tab groups.
 
 ---
 *** 'Mod-9' bound to 'tab-last' now switches to the last tab.
@@ -542,6 +543,10 @@ It also supports a negative argument.
 It also supports a negative argument.
 
 ---
+*** 'C-x t G' assigns a group name to the tab.
+'tab-close-group' can close all tabs that belong to the selected group.
+
+---
 *** New user option 'tab-bar-tab-name-format-function'.
 
 ---
@@ -1438,9 +1443,9 @@ decaying average of delays, and if this number gets too 
high, the
 animation is stopped.
 
 +++
-*** The 'n' and 'p' commands (next/previous image) now respects dired order.
+*** The 'n' and 'p' commands (next/previous image) now respect Dired order.
 These commands would previously display the next/previous image in
-alphabetical order, but will now find the "parent" dired buffer and
+lexicographic order, but will now find the "parent" Dired buffer and
 select the next/previous image file according to how the files are
 sorted there.  The commands have also been extended to work when the
 "parent" buffer is an archive mode (i.e., zip file or the like) or tar
@@ -1470,6 +1475,22 @@ To load images with the default frame colors use the 
':foreground' and
 This change only affects image types that support foreground and
 background colors or transparency, such as xbm, pbm, svg, png and gif.
 
++++
+*** Image smoothing can now be explicitly enabled or disabled.
+Smoothing applies a bilinear filter while scaling or rotating an image
+to prevent aliasing and other unwanted effects.  The new image
+property ':transform-smoothing' can be set to t to force smoothing
+and nil to disable smoothing.
+
+The default behaviour of smoothing on down-scaling and not smoothing
+on up-scaling remains unchanged.
+
++++
+*** New user option 'image-transform-smoothing'.
+This controls whether to use smoothing or not for an image.  Values
+include nil (no smoothing), t (do smoothing) or a predicate function
+that's called with the image object and should return nil/t.
+
 ** EWW
 
 +++
diff --git a/etc/themes/wombat-theme.el b/etc/themes/wombat-theme.el
index aaa7cce..d625b7f 100644
--- a/etc/themes/wombat-theme.el
+++ b/etc/themes/wombat-theme.el
@@ -57,6 +57,8 @@ are included.")
    `(font-lock-type-face ((,class (:foreground "#92a65e" :weight bold))))
    `(font-lock-variable-name-face ((,class (:foreground "#cae682"))))
    `(font-lock-warning-face ((,class (:foreground "#ccaa8f"))))
+   ;; Help faces
+   `(help-key-binding ((,class (:background "#333333" :foreground "#f6f3e8"))))
    ;; Button and link faces
    `(link ((,class (:foreground "#8ac6f2" :underline t))))
    `(link-visited ((,class (:foreground "#e5786d" :underline t))))
diff --git a/lisp/align.el b/lisp/align.el
index 1a1d3dd..7ae067f 100644
--- a/lisp/align.el
+++ b/lisp/align.el
@@ -1310,7 +1310,7 @@ aligner would have dealt with are."
                 (thissep (if rulesep (cdr rulesep) separate))
                 same (eol 0)
                 search-start
-                groups group-c
+                groups ;; group-c
                 spacing spacing-c
                 tab-stop tab-stop-c
                 repeat repeat-c
@@ -1434,7 +1434,7 @@ aligner would have dealt with are."
 
                     ;; lookup the `group' attribute the first time
                     ;; that we need it
-                    (unless group-c
+                    (unless nil ;; group-c
                       (setq groups (or (cdr (assq 'group rule)) 1))
                       (unless (listp groups)
                         (setq groups (list groups)))
diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el
index 6c9ceb0..83c5161 100644
--- a/lisp/arc-mode.el
+++ b/lisp/arc-mode.el
@@ -660,11 +660,11 @@ Does not signal an error if optional argument NOERROR is 
non-nil."
 (defun archive-mode (&optional force)
   "Major mode for viewing an archive file in a dired-like way.
 You can move around using the usual cursor motion commands.
-Letters no longer insert themselves.
-Type `e' to pull a file out of the archive and into its own buffer;
+Letters no longer insert themselves.\\<archive-mode-map>
+Type \\[archive-extract] to pull a file out of the archive and into its own 
buffer;
 or click mouse-2 on the file's line in the archive mode buffer.
 
-If you edit a sub-file of this archive (as with the `e' command) and
+If you edit a sub-file of this archive (as with the \\[archive-extract] 
command) and
 save it, the contents of that buffer will be saved back into the
 archive.
 
diff --git a/lisp/button.el b/lisp/button.el
index 043de8e..69d7054 100644
--- a/lisp/button.el
+++ b/lisp/button.el
@@ -472,8 +472,8 @@ mouse event is used.
 If there's no button at POS, do nothing and return nil, otherwise
 return t.
 
-To get a description of what function will called when pushing a
-butting, use the `button-describe' command."
+To get a description of the function that will be invoked when
+pushing a button, use the `button-describe' command."
   (interactive
    (list (if (integerp last-command-event) (point) last-command-event)))
   (if (and (not (integerp pos)) (eventp pos))
diff --git a/lisp/calc/calc-yank.el b/lisp/calc/calc-yank.el
index e5f0523..762adbd 100644
--- a/lisp/calc/calc-yank.el
+++ b/lisp/calc/calc-yank.el
@@ -639,7 +639,7 @@ Interactively, reads the register using 
`register-read-with-preview'."
   (calc-slow-wrapper
    (when (eq n 0)
      (setq n (calc-stack-size)))
-   (let* ((flag nil)
+   (let* (;; (flag nil)
          (allow-ret (> n 1))
          (list (math-showing-full-precision
                 (mapcar (if (> n 1)
@@ -651,7 +651,8 @@ Interactively, reads the register using 
`register-read-with-preview'."
                         (if (> n 0)
                             (calc-top-list n)
                           (calc-top-list 1 (- n)))))))
-     (calc--edit-mode (lambda () (calc-finish-stack-edit (or flag n))) 
allow-ret)
+     (calc--edit-mode (lambda () (calc-finish-stack-edit n)) ;; (or flag n)
+                      allow-ret)
      (while list
        (insert (car list) "\n")
        (setq list (cdr list)))))
diff --git a/lisp/calculator.el b/lisp/calculator.el
index 0088398..6dd8d9a 100644
--- a/lisp/calculator.el
+++ b/lisp/calculator.el
@@ -291,7 +291,7 @@ user-defined operators, use `calculator-user-operators' 
instead.")
 5. The function's precedence -- should be in the range of 1 (lowest) to
    9 (highest) (optional, defaults to 1);
 
-It it possible have a unary prefix version of a binary operator if it
+It is possible have a unary prefix version of a binary operator if it
 comes later in this list.  If the list begins with the symbol `nobind',
 then no key binding will take place -- this is only used for predefined
 keys.
diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el
index 0daa153..dab468d 100644
--- a/lisp/calendar/todo-mode.el
+++ b/lisp/calendar/todo-mode.el
@@ -2279,7 +2279,7 @@ made in the number or names of categories."
        (inc (prefix-numeric-value inc))
        (buffer-read-only nil)
        ndate ntime
-        year monthname month day dayname)
+        year monthname month day) ;; dayname
     (when marked (todo--user-error-if-marked-done-item))
     (save-excursion
       (or (and marked (goto-char (point-min))) (todo-item-start))
@@ -2437,7 +2437,7 @@ made in the number or names of categories."
                            (monthname monthname)
                            (month month)
                            (day day)
-                           (dayname dayname))
+                           (dayname nil)) ;; dayname
                         (mapconcat #'eval calendar-date-display-form "")))))
            (when ndate (replace-match ndate nil nil nil 1))
            ;; Add new time string to the header, if it was supplied.
@@ -3450,8 +3450,8 @@ containing only archived items, provided user option
 are shown in `todo-archived-only' face."
   (interactive)
   (todo-display-categories)
-  (let (sortkey)
-    (todo-update-categories-display sortkey)))
+  ;; (let (sortkey)
+  (todo-update-categories-display nil)) ;; sortkey
 
 (defun todo-next-button (n)
   "Move point to the Nth next button in the table of categories."
diff --git a/lisp/cedet/cedet-cscope.el b/lisp/cedet/cedet-cscope.el
index 4d4a9f7..95f0454 100644
--- a/lisp/cedet/cedet-cscope.el
+++ b/lisp/cedet/cedet-cscope.el
@@ -1,4 +1,4 @@
-;;; cedet-cscope.el --- CScope support for CEDET
+;;; cedet-cscope.el --- CScope support for CEDET  -*- lexical-binding: t; -*-
 
 ;;; Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
@@ -34,7 +34,7 @@
   :type 'string
   :group 'cedet)
 
-(defun cedet-cscope-search (searchtext texttype type scope)
+(defun cedet-cscope-search (searchtext texttype type _scope)
   "Perform a search with CScope, return the created buffer.
 SEARCHTEXT is text to find.
 TEXTTYPE is the type of text, such as `regexp', `string', `tagname',
@@ -85,7 +85,7 @@ options -cR."
     (with-current-buffer b
       (setq default-directory cd)
       (erase-buffer))
-    (apply 'call-process cedet-cscope-command
+    (apply #'call-process cedet-cscope-command
           nil b nil
           flags)
     b))
diff --git a/lisp/cedet/cedet-files.el b/lisp/cedet/cedet-files.el
index 3160815..c9d557f597 100644
--- a/lisp/cedet/cedet-files.el
+++ b/lisp/cedet/cedet-files.el
@@ -1,4 +1,4 @@
-;;; cedet-files.el --- Common routines dealing with file names.
+;;; cedet-files.el --- Common routines dealing with file names.  -*- 
lexical-binding: t; -*-
 
 ;; Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
diff --git a/lisp/cedet/cedet-global.el b/lisp/cedet/cedet-global.el
index 77b4474..227ebd5 100644
--- a/lisp/cedet/cedet-global.el
+++ b/lisp/cedet/cedet-global.el
@@ -1,4 +1,4 @@
-;;; cedet-global.el --- GNU Global support for CEDET.
+;;; cedet-global.el --- GNU Global support for CEDET.  -*- lexical-binding: t; 
-*-
 
 ;; Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
@@ -75,7 +75,7 @@ SCOPE is the scope of the search, such as `project' or 
`subdirs'."
     (with-current-buffer b
       (setq default-directory cd)
       (erase-buffer))
-    (apply 'call-process cedet-global-command
+    (apply #'call-process cedet-global-command
           nil b nil
           flags)
     b))
@@ -88,7 +88,7 @@ SCOPE is the scope of the search, such as `project' or 
`subdirs'."
     (with-current-buffer b
       (setq default-directory cd)
       (erase-buffer))
-    (apply 'call-process cedet-global-gtags-command
+    (apply #'call-process cedet-global-gtags-command
           nil b nil
           flags)
 
diff --git a/lisp/cedet/cedet-idutils.el b/lisp/cedet/cedet-idutils.el
index 3e3d6a5..a2b8cb3 100644
--- a/lisp/cedet/cedet-idutils.el
+++ b/lisp/cedet/cedet-idutils.el
@@ -1,4 +1,4 @@
-;;; cedet-idutils.el --- ID Utils support for CEDET.
+;;; cedet-idutils.el --- ID Utils support for CEDET.  -*- lexical-binding: t; 
-*-
 
 ;; Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
@@ -47,7 +47,7 @@
   :type 'string
   :group 'cedet)
 
-(defun cedet-idutils-search (searchtext texttype type scope)
+(defun cedet-idutils-search (searchtext texttype type _scope)
   "Perform a search with ID Utils, return the created buffer.
 SEARCHTEXT is text to find.
 TEXTTYPE is the type of text, such as `regexp', `string', `tagname',
@@ -64,7 +64,7 @@ Note: Scope is not yet supported."
     (let* ((resultflg (if (eq texttype 'tagcompletions)
                          (list "--key=token")
                        (list "--result=grep")))
-          (scopeflgs nil) ; (cond ((eq scope 'project) "" ) ((eq scope 
'target) "l")))
+          ;; (scopeflgs (cond ((eq scope 'project) "" ) ((eq scope 'target) 
"l")))
           (stflag (cond ((or (eq texttype 'tagname)
                              (eq texttype 'tagregexp))
                          (list "-r" "-w"))
@@ -77,7 +77,7 @@ Note: Scope is not yet supported."
                         ;; t means 'symbol
                         (t (list "-l" "-w"))))
           )
-      (cedet-idutils-lid-call (append resultflg scopeflgs stflag
+      (cedet-idutils-lid-call (append resultflg nil stflag ;; scopeflgs
                                      (list searchtext))))))
 
 (defun cedet-idutils-fnid-call (flags)
@@ -89,7 +89,7 @@ Return the created buffer with program output."
     (with-current-buffer b
       (setq default-directory cd)
       (erase-buffer))
-    (apply 'call-process cedet-idutils-file-command
+    (apply #'call-process cedet-idutils-file-command
           nil b nil
           flags)
     b))
@@ -103,7 +103,7 @@ Return the created buffer with program output."
     (with-current-buffer b
       (setq default-directory cd)
       (erase-buffer))
-    (apply 'call-process cedet-idutils-token-command
+    (apply #'call-process cedet-idutils-token-command
           nil b nil
           flags)
     b))
@@ -117,7 +117,7 @@ Return the created buffer with program output."
     (with-current-buffer b
       (setq default-directory cd)
       (erase-buffer))
-    (apply 'call-process cedet-idutils-make-command
+    (apply #'call-process cedet-idutils-make-command
           nil b nil
           flags)
     b))
@@ -133,7 +133,7 @@ Return a filename relative to the default directory."
               (if (looking-at "[^ \n]*fnid: ")
                   (error "ID Utils not available")
                 (split-string (buffer-string) "\n" t)))))
-    (setq ans (mapcar 'expand-file-name ans))
+    (setq ans (mapcar #'expand-file-name ans))
     (when (called-interactively-p 'interactive)
       (if ans
          (if (= (length ans) 1)
diff --git a/lisp/cedet/cedet.el b/lisp/cedet/cedet.el
index 5d98a19..b6043f1 100644
--- a/lisp/cedet/cedet.el
+++ b/lisp/cedet/cedet.el
@@ -1,4 +1,4 @@
-;;; cedet.el --- Setup CEDET environment
+;;; cedet.el --- Setup CEDET environment  -*- lexical-binding: t; -*-
 
 ;; Copyright (C) 2002-2021 Free Software Foundation, Inc.
 
@@ -48,25 +48,25 @@
 
 (defvar cedet-menu-map ;(make-sparse-keymap "CEDET menu")
   (let ((map (make-sparse-keymap "CEDET menu")))
-    (define-key map [semantic-force-refresh]     'undefined)
-    (define-key map [semantic-edit-menu]         'undefined)
-    (define-key map [navigate-menu]              'undefined)
-    (define-key map [semantic-options-separator] 'undefined)
-    (define-key map [global-semantic-highlight-func-mode]   'undefined)
-    (define-key map [global-semantic-stickyfunc-mode]   'undefined)
-    (define-key map [global-semantic-decoration-mode]       'undefined)
-    (define-key map [global-semantic-idle-completions-mode] 'undefined)
-    (define-key map [global-semantic-idle-summary-mode]     'undefined)
-    (define-key map [global-semantic-idle-scheduler-mode]   'undefined)
-    (define-key map [global-semanticdb-minor-mode]          'undefined)
-    (define-key map [cedet-menu-separator] 'undefined)
-    (define-key map [ede-find-file]        'undefined)
-    (define-key map [ede-speedbar]         'undefined)
-    (define-key map [ede] 'undefined)
-    (define-key map [ede-new]              'undefined)
-    (define-key map [ede-target-options]   'undefined)
-    (define-key map [ede-project-options]  'undefined)
-    (define-key map [ede-build-forms-menu] 'undefined)
+    (define-key map [semantic-force-refresh]     #'undefined)
+    (define-key map [semantic-edit-menu]         #'undefined)
+    (define-key map [navigate-menu]              #'undefined)
+    (define-key map [semantic-options-separator] #'undefined)
+    (define-key map [global-semantic-highlight-func-mode]   #'undefined)
+    (define-key map [global-semantic-stickyfunc-mode]       #'undefined)
+    (define-key map [global-semantic-decoration-mode]       #'undefined)
+    (define-key map [global-semantic-idle-completions-mode] #'undefined)
+    (define-key map [global-semantic-idle-summary-mode]     #'undefined)
+    (define-key map [global-semantic-idle-scheduler-mode]   #'undefined)
+    (define-key map [global-semanticdb-minor-mode]          #'undefined)
+    (define-key map [cedet-menu-separator] #'undefined)
+    (define-key map [ede-find-file]        #'undefined)
+    (define-key map [ede-speedbar]         #'undefined)
+    (define-key map [ede]                  #'undefined)
+    (define-key map [ede-new]              #'undefined)
+    (define-key map [ede-target-options]   #'undefined)
+    (define-key map [ede-project-options]  #'undefined)
+    (define-key map [ede-build-forms-menu] #'undefined)
     map)
   "Menu keymap for the CEDET package.
 This is used by `semantic-mode' and `global-ede-mode'.")
diff --git a/lisp/cedet/data-debug.el b/lisp/cedet/data-debug.el
index f0fa91b..428848b 100644
--- a/lisp/cedet/data-debug.el
+++ b/lisp/cedet/data-debug.el
@@ -1,4 +1,4 @@
-;;; data-debug.el --- Data structure debugger
+;;; data-debug.el --- Data structure debugger  -*- lexical-binding: t; -*-
 
 ;; Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
@@ -48,9 +48,9 @@
 
 ;;; Compatibility
 ;;
-(define-obsolete-function-alias 'data-debug-overlay-properties 
'overlay-properties "28.1")
-(define-obsolete-function-alias 'data-debug-overlay-p 'overlayp "28.1")
-(define-obsolete-function-alias 'dd-propertize 'propertize "28.1")
+(define-obsolete-function-alias 'data-debug-overlay-properties 
#'overlay-properties "28.1")
+(define-obsolete-function-alias 'data-debug-overlay-p #'overlayp "28.1")
+(define-obsolete-function-alias 'dd-propertize #'propertize "28.1")
 
 ;;; GENERIC STUFF
 ;;
@@ -100,14 +100,14 @@ PREBUTTONTEXT is some text between prefix and the overlay 
button."
   (let ((start (point))
        (end nil)
        (str (format "%s" overlay))
-       (tip nil))
+       ) ;; (tip nil)
     (insert prefix prebuttontext str)
     (setq end (point))
     (put-text-property (- end (length str)) end 'face 'font-lock-comment-face)
     (put-text-property start end 'ddebug overlay)
     (put-text-property start end 'ddebug-indent(length prefix))
     (put-text-property start end 'ddebug-prefix prefix)
-    (put-text-property start end 'help-echo tip)
+    ;; (put-text-property start end 'help-echo tip)
     (put-text-property start end 'ddebug-function
                       'data-debug-insert-overlay-from-point)
     (insert "\n")
@@ -149,14 +149,14 @@ PREBUTTONTEXT is some text between prefix and the overlay 
list button."
   (let ((start (point))
        (end nil)
        (str (format "#<overlay list: %d entries>" (length overlaylist)))
-       (tip nil))
+       ) ;; (tip nil)
     (insert prefix prebuttontext str)
     (setq end (point))
     (put-text-property (- end (length str)) end 'face 'font-lock-comment-face)
     (put-text-property start end 'ddebug overlaylist)
     (put-text-property start end 'ddebug-indent(length prefix))
     (put-text-property start end 'ddebug-prefix prefix)
-    (put-text-property start end 'help-echo tip)
+    ;; (put-text-property start end 'help-echo tip)
     (put-text-property start end 'ddebug-function
                       'data-debug-insert-overlay-list-from-point)
     (insert "\n")
@@ -204,14 +204,14 @@ PREBUTTONTEXT is some text between prefix and the buffer 
button."
   (let ((start (point))
        (end nil)
        (str (format "%S" buffer))
-       (tip nil))
+       ) ;; (tip nil)
     (insert prefix prebuttontext str)
     (setq end (point))
     (put-text-property (- end (length str)) end 'face 'font-lock-comment-face)
     (put-text-property start end 'ddebug buffer)
     (put-text-property start end 'ddebug-indent(length prefix))
     (put-text-property start end 'ddebug-prefix prefix)
-    (put-text-property start end 'help-echo tip)
+    ;; (put-text-property start end 'help-echo tip)
     (put-text-property start end 'ddebug-function
                       'data-debug-insert-buffer-from-point)
     (insert "\n")
@@ -253,14 +253,14 @@ PREBUTTONTEXT is some text between prefix and the buffer 
list button."
   (let ((start (point))
        (end nil)
        (str (format "#<buffer list: %d entries>" (length bufferlist)))
-       (tip nil))
+       ) ;; (tip nil)
     (insert prefix prebuttontext str)
     (setq end (point))
     (put-text-property (- end (length str)) end 'face 'font-lock-comment-face)
     (put-text-property start end 'ddebug bufferlist)
     (put-text-property start end 'ddebug-indent(length prefix))
     (put-text-property start end 'ddebug-prefix prefix)
-    (put-text-property start end 'help-echo tip)
+    ;; (put-text-property start end 'help-echo tip)
     (put-text-property start end 'ddebug-function
                       'data-debug-insert-buffer-list-from-point)
     (insert "\n")
@@ -309,14 +309,14 @@ PREBUTTONTEXT is some text between prefix and the process 
button."
   (let ((start (point))
        (end nil)
        (str (format "%S : %s" process (process-status process)))
-       (tip nil))
+       ) ;; (tip nil)
     (insert prefix prebuttontext str)
     (setq end (point))
     (put-text-property (- end (length str)) end 'face 'font-lock-comment-face)
     (put-text-property start end 'ddebug process)
     (put-text-property start end 'ddebug-indent(length prefix))
     (put-text-property start end 'ddebug-prefix prefix)
-    (put-text-property start end 'help-echo tip)
+    ;; (put-text-property start end 'help-echo tip)
     (put-text-property start end 'ddebug-function
                       'data-debug-insert-process-from-point)
     (insert "\n")
@@ -363,8 +363,8 @@ PREBUTTONTEXT is some text between prefix and the stuff 
list button."
         (str (format "#<RING: %d, %d max>"
                      (ring-length ring)
                      (ring-size ring)))
-        (ringthing
-         (if (= (ring-length ring) 0) nil (ring-ref ring 0)))
+        ;; (ringthing
+        ;;  (if (= (ring-length ring) 0) nil (ring-ref ring 0)))
         (tip (format "Ring max-size %d, length %d."
                      (ring-size ring)
                      (ring-length ring)))
@@ -437,7 +437,7 @@ PREBUTTONTEXT is some text between prefix and the stuff 
list button."
 ;; Widgets have a long list of properties
 (defun data-debug-insert-widget-properties (widget prefix)
   "Insert the contents of WIDGET inserting PREFIX before each element."
-  (let ((type (car widget))
+  (let (;; (type (car widget))
        (rest (cdr widget)))
     (while rest
       (data-debug-insert-thing (car (cdr rest))
@@ -683,7 +683,7 @@ PREBUTTONTEXT is some text between prefix and the thing."
   )
 
 ;;; nil thing
-(defun data-debug-insert-nil (thing prefix prebuttontext)
+(defun data-debug-insert-nil (_thing prefix prebuttontext)
   "Insert one simple THING with a face.
 PREFIX is the text that precedes the button.
 PREBUTTONTEXT is some text between prefix and the thing.
@@ -856,19 +856,18 @@ If PARENT is non-nil, it is somehow related as a parent 
to thing."
 (defvar data-debug-mode-map
   (let ((km (make-sparse-keymap)))
     (suppress-keymap km)
-    (define-key km [mouse-2] 'data-debug-expand-or-contract-mouse)
-    (define-key km " " 'data-debug-expand-or-contract)
-    (define-key km "\C-m" 'data-debug-expand-or-contract)
-    (define-key km "n" 'data-debug-next)
-    (define-key km "p" 'data-debug-prev)
-    (define-key km "N" 'data-debug-next-expando)
-    (define-key km "P" 'data-debug-prev-expando)
+    (define-key km [mouse-2] #'data-debug-expand-or-contract-mouse)
+    (define-key km " " #'data-debug-expand-or-contract)
+    (define-key km "\C-m" #'data-debug-expand-or-contract)
+    (define-key km "n" #'data-debug-next)
+    (define-key km "p" #'data-debug-prev)
+    (define-key km "N" #'data-debug-next-expando)
+    (define-key km "P" #'data-debug-prev-expando)
     km)
   "Keymap used in data-debug.")
 
 (defcustom data-debug-mode-hook nil
   "Hook run when data-debug starts."
-  :group 'data-debug
   :type 'hook)
 
 (define-derived-mode data-debug-mode fundamental-mode "DATA-DEBUG"
@@ -1032,7 +1031,7 @@ Do nothing if already contracted."
                                 nil read-expression-map t
                                 'read-expression-history))
         ))
-  (let ((v (eval expr)))
+  (let ((v (eval expr t)))
     (if (not v)
        (message "Expression %s is nil." expr)
       (data-debug-show-stuff v "expression"))))
@@ -1049,12 +1048,12 @@ If the result is a list or vector, then use the data 
debugger to display it."
 
   (let (result)
     (if (null eval-expression-debug-on-error)
-        (setq result (values--store-value (eval expr)))
+        (setq result (values--store-value (eval expr t)))
       (let ((old-value (make-symbol "t")) new-value)
         ;; Bind debug-on-error to something unique so that we can
         ;; detect when evalled code changes it.
         (let ((debug-on-error old-value))
-         (setq result (values--store-value (eval expr)))
+         (setq result (values--store-value (eval expr t)))
          (setq new-value debug-on-error))
         ;; If evalled code has changed the value of debug-on-error,
         ;; propagate that change to the global binding.
diff --git a/lisp/cedet/ede.el b/lisp/cedet/ede.el
index 369a9f7..2ec9f5d 100644
--- a/lisp/cedet/ede.el
+++ b/lisp/cedet/ede.el
@@ -1,4 +1,4 @@
-;;; ede.el --- Emacs Development Environment gloss
+;;; ede.el --- Emacs Development Environment gloss  -*- lexical-binding: t; -*-
 
 ;; Copyright (C) 1998-2005, 2007-2021 Free Software Foundation, Inc.
 
@@ -87,7 +87,6 @@ target wants the file, the user is asked.  If only one target 
wants
 the file, then it is automatically added to that target.  If the
 value is `ask', then the user is always asked, unless there is no
 target willing to take the file.  `never' means never perform the check."
-  :group 'ede
   :type '(choice (const always)
                 (const multi-ask)
                 (const ask)
@@ -95,7 +94,6 @@ target willing to take the file.  `never' means never perform 
the check."
 
 (defcustom ede-debug-program-function 'gdb
   "Default Emacs command used to debug a target."
-  :group 'ede
   :type 'function) ; make this be a list of options some day
 
 (defcustom ede-project-directories nil
@@ -112,7 +110,6 @@ If you invoke the commands \\[ede] or \\[ede-new] on a 
directory
 that is not listed, Emacs will offer to add it to the list.
 
 Any other value disables searching for EDE project files."
-  :group 'ede
   :type '(choice (const :tag "Any directory" t)
                 (repeat :tag "List of directories"
                         (directory))
@@ -186,21 +183,23 @@ Argument LIST-O-O is the list of objects to choose from."
 
 ;;; Menu and Keymap
 
+(declare-function ede-speedbar "ede/speedbar" ())
+
 (defvar ede-minor-mode-map
   (let ((map (make-sparse-keymap))
        (pmap (make-sparse-keymap)))
-    (define-key pmap "e" 'ede-edit-file-target)
-    (define-key pmap "a" 'ede-add-file)
-    (define-key pmap "d" 'ede-remove-file)
-    (define-key pmap "t" 'ede-new-target)
-    (define-key pmap "g" 'ede-rescan-toplevel)
-    (define-key pmap "s" 'ede-speedbar)
-    (define-key pmap "f" 'ede-find-file)
-    (define-key pmap "C" 'ede-compile-project)
-    (define-key pmap "c" 'ede-compile-target)
-    (define-key pmap "\C-c" 'ede-compile-selected)
-    (define-key pmap "D" 'ede-debug-target)
-    (define-key pmap "R" 'ede-run-target)
+    (define-key pmap "e" #'ede-edit-file-target)
+    (define-key pmap "a" #'ede-add-file)
+    (define-key pmap "d" #'ede-remove-file)
+    (define-key pmap "t" #'ede-new-target)
+    (define-key pmap "g" #'ede-rescan-toplevel)
+    (define-key pmap "s" #'ede-speedbar)
+    (define-key pmap "f" #'ede-find-file)
+    (define-key pmap "C" #'ede-compile-project)
+    (define-key pmap "c" #'ede-compile-target)
+    (define-key pmap "\C-c" #'ede-compile-selected)
+    (define-key pmap "D" #'ede-debug-target)
+    (define-key pmap "R" #'ede-run-target)
     ;; bind our submap into map
     (define-key map "\C-c." pmap)
     map)
@@ -476,7 +475,7 @@ To be used in hook functions."
 If this file is contained, or could be contained in an EDE
 controlled project, then this mode is activated automatically
 provided `global-ede-mode' is enabled."
-  :group 'ede
+  :global nil
   (cond ((or (eq major-mode 'dired-mode)
             (eq major-mode 'vc-dir-mode))
         (ede-dired-minor-mode (if ede-minor-mode 1 -1)))
@@ -486,6 +485,9 @@ provided `global-ede-mode' is enabled."
           ;; If we fail to have a project here, turn it back off.
           (ede-minor-mode -1)))))
 
+(declare-function ede-directory-project-cons "ede/files" (dir &optional force))
+(declare-function ede-toplevel-project-or-nil "ede/files" (dir))
+
 (defun ede-initialize-state-current-buffer ()
   "Initialize the current buffer's state for EDE.
 Sets buffer local variables for EDE."
@@ -496,7 +498,7 @@ Sets buffer local variables for EDE."
   ;; Init the buffer.
   (let* ((ROOT nil)
         (proj (ede-directory-get-open-project default-directory
-                                              'ROOT)))
+                                              (gv-ref ROOT))))
 
     (when (not proj)
       ;; If there is no open project, look up the project
@@ -517,7 +519,8 @@ Sets buffer local variables for EDE."
                      (ede-directory-safe-p top)))
 
            ;; The project is safe, so load it in.
-           (setq proj (ede-load-project-file default-directory projdetect 
'ROOT))))))
+           (setq proj (ede-load-project-file default-directory projdetect
+                                             (gv-ref ROOT)))))))
 
     ;; If PROJ is now loaded in, we can initialize our buffer to it.
     (when proj
@@ -561,30 +564,29 @@ Sets buffer local variables for EDE."
 This global minor mode enables `ede-minor-mode' in all buffers in
 an EDE controlled project."
   :global t
-  :group 'ede
   (if global-ede-mode
       ;; Turn on global-ede-mode
       (progn
        (if semantic-mode
            (define-key cedet-menu-map [cedet-menu-separator] '("--")))
-       (add-hook 'semanticdb-project-predicate-functions 
'ede-directory-project-p)
-       (add-hook 'semanticdb-project-root-functions 
'ede-toplevel-project-or-nil)
-       (add-hook 'ecb-source-path-functions 'ede-ecb-project-paths)
+       (add-hook 'semanticdb-project-predicate-functions 
#'ede-directory-project-p)
+       (add-hook 'semanticdb-project-root-functions 
#'ede-toplevel-project-or-nil)
+       (add-hook 'ecb-source-path-functions #'ede-ecb-project-paths)
        ;; Append our hook to the end.  This allows mode-local to finish
        ;; it's stuff before we start doing misc file loads, etc.
-       (add-hook 'find-file-hook 'ede-turn-on-hook t)
-       (add-hook 'dired-mode-hook 'ede-turn-on-hook)
-       (add-hook 'kill-emacs-hook 'ede-save-cache)
+       (add-hook 'find-file-hook #'ede-turn-on-hook t)
+       (add-hook 'dired-mode-hook #'ede-turn-on-hook)
+       (add-hook 'kill-emacs-hook #'ede-save-cache)
        (ede-load-cache)
        (ede-reset-all-buffers))
     ;; Turn off global-ede-mode
     (define-key cedet-menu-map [cedet-menu-separator] nil)
-    (remove-hook 'semanticdb-project-predicate-functions 
'ede-directory-project-p)
-    (remove-hook 'semanticdb-project-root-functions 
'ede-toplevel-project-or-nil)
-    (remove-hook 'ecb-source-path-functions 'ede-ecb-project-paths)
-    (remove-hook 'find-file-hook 'ede-turn-on-hook)
-    (remove-hook 'dired-mode-hook 'ede-turn-on-hook)
-    (remove-hook 'kill-emacs-hook 'ede-save-cache)
+    (remove-hook 'semanticdb-project-predicate-functions 
#'ede-directory-project-p)
+    (remove-hook 'semanticdb-project-root-functions 
#'ede-toplevel-project-or-nil)
+    (remove-hook 'ecb-source-path-functions #'ede-ecb-project-paths)
+    (remove-hook 'find-file-hook #'ede-turn-on-hook)
+    (remove-hook 'dired-mode-hook #'ede-turn-on-hook)
+    (remove-hook 'kill-emacs-hook #'ede-save-cache)
     (ede-save-cache)
     (ede-reset-all-buffers)))
 
@@ -1080,7 +1082,7 @@ Flush the dead projects from the project cache."
   (let ((dead nil))
     (dolist (P ede-projects)
       (when (not (file-exists-p (oref P file)))
-       (add-to-list 'dead P)))
+       (cl-pushnew P dead :test #'equal)))
     (dolist (D dead)
       (ede-delete-project-from-global-list D))
     ))
@@ -1108,7 +1110,7 @@ Flush the dead projects from the project cache."
   "Project file independent way to read a project in from DIR.
 Optional DETECTIN is an autoload cons from `ede-detect-directory-for-project'
 which can be passed in to save time.
-Optional ROOTRETURN will return the root project for DIR."
+Optional ROOTRETURN reference will return the root project for DIR."
   ;; Don't do anything if we are in the process of
   ;; constructing an EDE object.
   ;;
@@ -1147,7 +1149,8 @@ Optional ROOTRETURN will return the root project for DIR."
            (setq o (ede-auto-load-project autoloader toppath))))
 
        ;; Return the found root project.
-       (when rootreturn (set rootreturn o))
+       (when rootreturn (if (symbolp rootreturn) (set rootreturn o)
+                          (setf (gv-deref rootreturn) o)))
 
        ;; The project has been found (in the global list) or loaded from
        ;; disk (via autoloader.)  We can now search for the project asked
@@ -1504,6 +1507,8 @@ It does not apply the value to buffers."
 ;;; Integration with project.el
 
 (defun project-try-ede (dir)
+  ;; FIXME: This passes the `ROOT' dynbound variable, but I don't know
+  ;; where it comes from!
   (let ((project-dir
          (locate-dominating-file
           dir
@@ -1523,7 +1528,7 @@ It does not apply the value to buffers."
 (provide 'ede)
 
 ;; Include this last because it depends on ede.
-(require 'ede/files)
+(if t (require 'ede/files)) ;; Don't bother loading it at compile-time.
 
 ;; If this does not occur after the provide, we can get a recursive
 ;; load.  Yuck!
diff --git a/lisp/cedet/ede/auto.el b/lisp/cedet/ede/auto.el
index e1417d7..ee9d011 100644
--- a/lisp/cedet/ede/auto.el
+++ b/lisp/cedet/ede/auto.el
@@ -1,4 +1,4 @@
-;;; ede/auto.el --- Autoload features for EDE
+;;; ede/auto.el --- Autoload features for EDE  -*- lexical-binding: t; -*-
 
 ;; Copyright (C) 2010-2021 Free Software Foundation, Inc.
 
@@ -325,13 +325,13 @@ NOTE: Do not call this - it should only be called from 
`ede-load-project-file'."
 ;; See if we can do without them.
 
 ;; @FIXME - delete from loaddefs to remove this.
-(cl-defmethod ede-project-root ((this ede-project-autoload))
+(cl-defmethod ede-project-root ((_this ede-project-autoload))
   "If a project knows its root, return it here.
 Allows for one-project-object-for-a-tree type systems."
   nil)
 
 ;; @FIXME - delete from loaddefs to remove this.
-(cl-defmethod ede-project-root-directory ((this ede-project-autoload) 
&optional file)
+(cl-defmethod ede-project-root-directory ((_this ede-project-autoload) 
&optional _file)
   "" nil)
 
 (provide 'ede/auto)
diff --git a/lisp/cedet/ede/autoconf-edit.el b/lisp/cedet/ede/autoconf-edit.el
index ca8535f..d6f0a86 100644
--- a/lisp/cedet/ede/autoconf-edit.el
+++ b/lisp/cedet/ede/autoconf-edit.el
@@ -1,4 +1,4 @@
-;;; ede/autoconf-edit.el --- Keymap for autoconf
+;;; ede/autoconf-edit.el --- Keymap for autoconf  -*- lexical-binding: t; -*-
 
 ;; Copyright (C) 1998-2000, 2009-2021 Free Software Foundation, Inc.
 
diff --git a/lisp/cedet/ede/config.el b/lisp/cedet/ede/config.el
index 1968621..bc1810a 100644
--- a/lisp/cedet/ede/config.el
+++ b/lisp/cedet/ede/config.el
@@ -1,4 +1,4 @@
-;;; ede/config.el --- Configuration Handler baseclass
+;;; ede/config.el --- Configuration Handler baseclass  -*- lexical-binding: t; 
-*-
 
 ;; Copyright (C) 2014-2021 Free Software Foundation, Inc.
 
@@ -171,7 +171,7 @@ the directory isn't on the `safe' list, ask to add it to 
the safe list."
        (oset config project proj)))
     config))
 
-(cl-defmethod ede-config-setup-configuration ((proj ede-project-with-config) 
config)
+(cl-defmethod ede-config-setup-configuration ((_proj ede-project-with-config) 
_config)
   "Default configuration setup method."
   nil)
 
@@ -187,7 +187,7 @@ the directory isn't on the `safe' list, ask to add it to 
the safe list."
   (let ((config (ede-config-get-configuration proj t)))
     (eieio-customize-object config)))
 
-(cl-defmethod ede-customize ((target ede-target-with-config))
+(cl-defmethod ede-customize ((_target ede-target-with-config))
   "Customize the EDE TARGET by actually configuring the config object."
   ;; Nothing unique for the targets, use the project.
   (ede-customize-project))
@@ -302,14 +302,14 @@ This class brings in method overloads for building.")
   "Class to mix into a project with configuration for builds.
 This class brings in method overloads for building.")
 
-(cl-defmethod project-compile-project ((proj ede-project-with-config-build) 
&optional command)
+(cl-defmethod project-compile-project ((proj ede-project-with-config-build) 
&optional _command)
   "Compile the entire current project PROJ.
 Argument COMMAND is the command to use when compiling."
   (let* ((config (ede-config-get-configuration proj t))
         (comp (oref config build-command)))
     (compile comp)))
 
-(cl-defmethod project-compile-target ((obj ede-target-with-config-build) 
&optional command)
+(cl-defmethod project-compile-target ((_obj ede-target-with-config-build) 
&optional command)
   "Compile the current target OBJ.
 Argument COMMAND is the command to use for compiling the target."
   (project-compile-project (ede-current-project) command))
diff --git a/lisp/cedet/ede/cpp-root.el b/lisp/cedet/ede/cpp-root.el
index 41f0c68..652d647 100644
--- a/lisp/cedet/ede/cpp-root.el
+++ b/lisp/cedet/ede/cpp-root.el
@@ -1,4 +1,4 @@
-;;; ede/cpp-root.el --- A simple way to wrap a C++ project with a single root
+;;; ede/cpp-root.el --- A simple way to wrap a C++ project with a single root  
-*- lexical-binding: t; -*-
 
 ;; Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
@@ -275,7 +275,7 @@ Each directory needs a project file to control it.")
 ;; objects is deleted.
 
 (cl-defmethod initialize-instance ((this ede-cpp-root-project)
-                               &rest fields)
+                                  &rest _fields)
   "Make sure the :file is fully expanded."
   ;; Add ourselves to the master list
   (cl-call-next-method)
@@ -310,7 +310,7 @@ Each directory needs a project file to control it.")
 ;; project, simplifying authoring new single-point projects.
 
 (cl-defmethod ede-find-subproject-for-directory ((proj ede-cpp-root-project)
-                                             dir)
+                                                _dir)
   "Return PROJ, for handling all subdirs below DIR."
   proj)
 
@@ -319,7 +319,7 @@ Each directory needs a project file to control it.")
 ;; Creating new targets on a per directory basis is a good way to keep
 ;; files organized.  See ede-emacs for an example with multiple file
 ;; types.
-(cl-defmethod ede-find-target ((proj ede-cpp-root-project) buffer)
+(cl-defmethod ede-find-target ((proj ede-cpp-root-project) _buffer)
   "Find an EDE target in PROJ for BUFFER.
 If one doesn't exist, create a new one for this directory."
   (let* ((targets (oref proj targets))
@@ -451,7 +451,7 @@ This is for project include paths and spp source files."
   "Get the pre-processor map for project THIS."
   (ede-preprocessor-map  (ede-target-parent this)))
 
-(cl-defmethod project-compile-project ((proj ede-cpp-root-project) &optional 
command)
+(cl-defmethod project-compile-project ((proj ede-cpp-root-project) &optional 
_command)
   "Compile the entire current project PROJ.
 Argument COMMAND is the command to use when compiling."
   ;; we need to be in the proj root dir for this to work
@@ -474,7 +474,7 @@ Argument COMMAND is the command to use for compiling the 
target."
     (project-compile-project (oref obj project) command)))
 
 
-(cl-defmethod project-rescan ((this ede-cpp-root-project))
+(cl-defmethod project-rescan ((_this ede-cpp-root-project))
   "Don't rescan this project from the sources."
   (message "cpp-root has nothing to rescan."))
 
diff --git a/lisp/cedet/ede/custom.el b/lisp/cedet/ede/custom.el
index a128f9e..adb1a49 100644
--- a/lisp/cedet/ede/custom.el
+++ b/lisp/cedet/ede/custom.el
@@ -1,4 +1,4 @@
-;;; ede/custom.el --- customization of EDE projects.
+;;; ede/custom.el --- customization of EDE projects.  -*- lexical-binding: t; 
-*-
 
 ;; Copyright (C) 2010-2021 Free Software Foundation, Inc.
 
@@ -97,13 +97,13 @@ OBJ is the target object to customize."
   "Create a custom-like buffer for sorting targets of current project."
   (interactive)
   (let ((proj (ede-current-project))
-        (count 1)
-        current order)
+        ;; (count 1)
+        ) ;; current order
     (switch-to-buffer (get-buffer-create "*EDE sort targets*"))
     (erase-buffer)
     (setq ede-object-project proj)
     (widget-create 'push-button
-                   :notify (lambda (&rest ignore)
+                   :notify (lambda (&rest _ignore)
                              (let ((targets (oref ede-object-project targets))
                                    cur newtargets)
                                (while (setq cur (pop 
ede-project-sort-targets-order))
@@ -115,7 +115,7 @@ OBJ is the target object to customize."
                    " Accept ")
     (widget-insert "   ")
     (widget-create 'push-button
-                   :notify (lambda (&rest ignore)
+                   :notify (lambda (&rest _ignore)
                             (kill-buffer))
                    " Cancel ")
     (widget-insert "\n\n")
@@ -170,7 +170,9 @@ OBJ is the target object to customize."
           (widget-insert "        "))
         (widget-insert (concat " " (number-to-string (1+ count)) ".:   "
                                (oref (nth (nth count 
ede-project-sort-targets-order)
-                                          targets) name) "\n"))
+                                          targets)
+                                     name)
+                               "\n"))
         (setq count (1+ count))))))
 
 ;;; Customization hooks
@@ -195,11 +197,11 @@ OBJ is the target object to customize."
 ;; These two methods should be implemented by subclasses of
 ;; project and targets in order to account for user specified
 ;; changes.
-(cl-defmethod eieio-done-customizing ((target ede-target))
+(cl-defmethod eieio-done-customizing ((_target ede-target))
   "Call this when a user finishes customizing TARGET."
   nil)
 
-(cl-defmethod ede-commit-project ((proj ede-project))
+(cl-defmethod ede-commit-project ((_proj ede-project))
   "Commit any change to PROJ to its file."
   nil
   )
diff --git a/lisp/cedet/ede/detect.el b/lisp/cedet/ede/detect.el
index 027d008..c933fc4 100644
--- a/lisp/cedet/ede/detect.el
+++ b/lisp/cedet/ede/detect.el
@@ -1,4 +1,4 @@
-;;; ede/detect.el --- EDE project detection and file associations
+;;; ede/detect.el --- EDE project detection and file associations  -*- 
lexical-binding: t; -*-
 
 ;; Copyright (C) 2014-2021 Free Software Foundation, Inc.
 
diff --git a/lisp/cedet/ede/dired.el b/lisp/cedet/ede/dired.el
index 8b9eae0..2773517 100644
--- a/lisp/cedet/ede/dired.el
+++ b/lisp/cedet/ede/dired.el
@@ -35,11 +35,11 @@
 
 (defvar ede-dired-keymap
   (let ((map (make-sparse-keymap)))
-    (define-key map ".a" 'ede-dired-add-to-target)
-    (define-key map ".t" 'ede-new-target)
-    (define-key map ".s" 'ede-speedbar)
-    (define-key map ".C" 'ede-compile-project)
-    (define-key map ".d" 'ede-make-dist)
+    (define-key map ".a" #'ede-dired-add-to-target)
+    (define-key map ".t" #'ede-new-target)
+    (define-key map ".s" #'ede-speedbar)
+    (define-key map ".C" #'ede-compile-project)
+    (define-key map ".d" #'ede-make-dist)
 
     (easy-menu-define
       ede-dired-menu map "EDE Dired Minor Mode Menu"
diff --git a/lisp/cedet/ede/files.el b/lisp/cedet/ede/files.el
index cf5396a..6b7e159 100644
--- a/lisp/cedet/ede/files.el
+++ b/lisp/cedet/ede/files.el
@@ -1,4 +1,4 @@
-;;; ede/files.el --- Associate projects with files and directories.
+;;; ede/files.el --- Associate projects with files and directories.  -*- 
lexical-binding: t; -*-
 
 ;; Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
@@ -33,6 +33,7 @@
 ;; till no ede-project-autoload structure matches.
 ;;
 
+(require 'eieio)
 (require 'ede)
 
 (declare-function ede-locate-file-in-hash "ede/locate")
@@ -75,13 +76,13 @@ Allows for one-project-object-for-a-tree type systems."
   (oref this rootproject))
 
 (cl-defmethod ede-project-root-directory ((this ede-project-placeholder)
-                                      &optional file)
+                                         &optional _file)
   "If a project knows its root, return it here.
 Allows for one-project-object-for-a-tree type systems.
 Optional FILE is the file to test.  It is ignored in preference
 of the anchor file for the project."
-  (let ((root (or (ede-project-root this) this)))
-    (file-name-directory (expand-file-name (oref this file)))))
+  ;; (let ((root (or (ede-project-root this) this)))
+  (file-name-directory (expand-file-name (oref this file)))) ;; )
 
 
 ;; Why INODEs?
@@ -141,7 +142,7 @@ Does not check subprojects."
 
 (defun ede-directory-get-open-project (dir &optional rootreturn)
   "Return an already open project that is managing DIR.
-Optional ROOTRETURN specifies a symbol to set to the root project.
+Optional ROOTRETURN specifies a `gv-ref' to set to the root project.
 If DIR is the root project, then it is the same."
   (let* ((inode (ede--inode-for-dir dir))
         (ft (file-name-as-directory (expand-file-name dir)))
@@ -153,7 +154,8 @@ If DIR is the root project, then it is the same."
     ;; Default answer is this project
     (setq ans proj)
     ;; Save.
-    (when rootreturn (set rootreturn proj))
+    (when rootreturn (if (symbolp rootreturn) (set rootreturn proj)
+                       (setf (gv-deref rootreturn) proj)))
     ;; Find subprojects.
     (when (and proj (if ede--disable-inode
                        (not (string= ft (expand-file-name
@@ -272,7 +274,7 @@ Do this whenever a new project is created, as opposed to 
loaded."
   (remhash (file-name-as-directory dir) ede-project-directory-hash)
   ;; Look for all subdirs of D, and remove them.
   (let ((match (concat "^" (regexp-quote dir))))
-    (maphash (lambda (K O)
+    (maphash (lambda (K _O)
                (when (string-match match K)
                  (remhash K ede-project-directory-hash)))
              ede-project-directory-hash)))
@@ -363,7 +365,7 @@ If DIR is not part of a project, return nil."
 
      (t nil))))
 
-(defalias 'ede-toplevel-project-or-nil 'ede-toplevel-project)
+(defalias 'ede-toplevel-project-or-nil #'ede-toplevel-project)
 
 ;;; DIRECTORY CONVERSION STUFF
 ;;
@@ -469,15 +471,15 @@ is returned."
 
     ans))
 
-(cl-defmethod ede-expand-filename-impl ((this ede-project) filename &optional 
force)
+(cl-defmethod ede-expand-filename-impl ((this ede-project) filename &optional 
_force)
   "Return a fully qualified file name based on project THIS.
 FILENAME should be just a filename which occurs in a directory controlled
 by this project.
 Optional argument FORCE forces the default filename to be provided even if it
 doesn't exist."
   (let ((loc (ede-get-locator-object this))
-       (path (ede-project-root-directory this))
-       (proj (oref this subproj))
+       ;; (path (ede-project-root-directory this))
+       ;; (proj (oref this subproj))
        (found nil))
     ;; find it Locally.
     (setq found (or (ede-expand-filename-local this filename)
diff --git a/lisp/cedet/ede/generic.el b/lisp/cedet/ede/generic.el
index 3d1e1c5..b3b59b5 100644
--- a/lisp/cedet/ede/generic.el
+++ b/lisp/cedet/ede/generic.el
@@ -1,4 +1,4 @@
-;;; ede/generic.el --- Base Support for generic build systems
+;;; ede/generic.el --- Base Support for generic build systems  -*- 
lexical-binding: t; -*-
 
 ;; Copyright (C) 2010-2021 Free Software Foundation, Inc.
 
@@ -93,7 +93,7 @@
    )
   "User Configuration object for a generic project.")
 
-(defun ede-generic-load (dir &optional rootproj)
+(defun ede-generic-load (dir &optional _rootproj)
   "Return a Generic Project object if there is a match.
 Return nil if there isn't one.
 Argument DIR is the directory it is created for.
@@ -149,7 +149,7 @@ The class allocated value is replace by different sub 
classes.")
   :abstract t)
 
 (cl-defmethod initialize-instance ((this ede-generic-project)
-                               &rest fields)
+                                  &rest _fields)
   "Make sure the targets slot is bound."
   (cl-call-next-method)
   (unless (slot-boundp this 'targets)
@@ -161,7 +161,7 @@ The class allocated value is replace by different sub 
classes.")
   this)
 
 (cl-defmethod ede-find-subproject-for-directory ((proj ede-generic-project)
-                                             dir)
+                                                _dir)
   "Return PROJ, for handling all subdirs below DIR."
   proj)
 
@@ -324,7 +324,7 @@ CLASS is the EIEIO class that is used to track this 
project.  It should subclass
    )
   "Generic Project for makefiles.")
 
-(cl-defmethod ede-generic-setup-configuration ((proj 
ede-generic-makefile-project) config)
+(cl-defmethod ede-generic-setup-configuration ((_proj 
ede-generic-makefile-project) config)
   "Setup a configuration for Make."
   (oset config build-command "make -k")
   (oset config debug-command "gdb ")
@@ -337,7 +337,7 @@ CLASS is the EIEIO class that is used to track this 
project.  It should subclass
    )
   "Generic Project for scons.")
 
-(cl-defmethod ede-generic-setup-configuration ((proj 
ede-generic-scons-project) config)
+(cl-defmethod ede-generic-setup-configuration ((_proj 
ede-generic-scons-project) config)
   "Setup a configuration for SCONS."
   (oset config build-command "scons")
   (oset config debug-command "gdb ")
@@ -350,7 +350,7 @@ CLASS is the EIEIO class that is used to track this 
project.  It should subclass
    )
   "Generic Project for cmake.")
 
-(cl-defmethod ede-generic-setup-configuration ((proj 
ede-generic-cmake-project) config)
+(cl-defmethod ede-generic-setup-configuration ((_proj 
ede-generic-cmake-project) config)
   "Setup a configuration for CMake."
   (oset config build-command "cmake")
   (oset config debug-command "gdb ")
@@ -361,9 +361,9 @@ CLASS is the EIEIO class that is used to track this 
project.  It should subclass
   ()
   "Generic project found via Version Control files.")
 
-(cl-defmethod ede-generic-setup-configuration ((proj ede-generic-vc-project) 
config)
+(cl-defmethod ede-generic-setup-configuration ((_proj ede-generic-vc-project) 
_config)
   "Setup a configuration for projects identified by revision control."
-  )
+  nil)
 
 (provide 'ede/generic)
 
diff --git a/lisp/cedet/ede/linux.el b/lisp/cedet/ede/linux.el
index 7a1c4c9..4b5530d 100644
--- a/lisp/cedet/ede/linux.el
+++ b/lisp/cedet/ede/linux.el
@@ -1,4 +1,4 @@
-;;; ede/linux.el --- Special project for Linux
+;;; ede/linux.el --- Special project for Linux  -*- lexical-binding: t; -*-
 
 ;; Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
@@ -47,26 +47,22 @@
 (defcustom project-linux-build-directory-default 'ask
   "Build directory."
   :version "24.4"
-  :group 'project-linux
   :type '(choice (const :tag "Same as source directory" same)
                  (const :tag "Ask the user" ask)))
 
 (defcustom project-linux-architecture-default 'ask
   "Target architecture to assume when not auto-detected."
   :version "24.4"
-  :group 'project-linux
   :type '(choice (string :tag "Architecture name")
                  (const :tag "Ask the user" ask)))
 
 
 (defcustom project-linux-compile-target-command (concat ede-make-command " -k 
-C %s SUBDIRS=%s")
   "Default command used to compile a target."
-  :group 'project-linux
   :type 'string)
 
 (defcustom project-linux-compile-project-command (concat ede-make-command " -k 
-C %s")
   "Default command used to compile a project."
-  :group 'project-linux
   :type 'string)
 
 (defun ede-linux-version (dir)
diff --git a/lisp/cedet/ede/locate.el b/lisp/cedet/ede/locate.el
index e6a8953..016092c 100644
--- a/lisp/cedet/ede/locate.el
+++ b/lisp/cedet/ede/locate.el
@@ -1,4 +1,4 @@
-;;; ede/locate.el --- Locate support
+;;; ede/locate.el --- Locate support  -*- lexical-binding: t; -*-
 
 ;; Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
@@ -110,7 +110,7 @@ based on `ede-locate-setup-options'."
    )
   "Baseclass for LOCATE feature in EDE.")
 
-(cl-defmethod initialize-instance ((loc ede-locate-base) &rest fields)
+(cl-defmethod initialize-instance ((loc ede-locate-base) &rest _fields)
   "Make sure we have a hash table."
   ;; Basic setup.
   (cl-call-next-method)
@@ -118,8 +118,8 @@ based on `ede-locate-setup-options'."
   (ede-locate-flush-hash loc)
   )
 
-(cl-defmethod ede-locate-ok-in-project ((loc (subclass ede-locate-base))
-                                            root)
+(cl-defmethod ede-locate-ok-in-project ((_loc (subclass ede-locate-base))
+                                       _root)
   "Is it ok to use this project type under ROOT."
   t)
 
@@ -149,17 +149,15 @@ that created this EDE locate object."
     (oset loc lastanswer ans)
     ans))
 
-(cl-defmethod ede-locate-file-in-project-impl ((loc ede-locate-base)
-                                           filesubstring
-                                           )
+(cl-defmethod ede-locate-file-in-project-impl ((_loc ede-locate-base)
+                                              _filesubstring)
   "Locate with LOC occurrences of FILESUBSTRING.
 Searches are done under the current root of the EDE project
 that created this EDE locate object."
-  nil
-  )
+  nil)
 
 (cl-defmethod ede-locate-create/update-root-database
-  ((loc (subclass ede-locate-base)) root)
+  ((loc (subclass ede-locate-base)) _root)
   "Create or update the database for the current project.
 You cannot create projects for the baseclass."
   (error "Cannot create/update a database of type %S"
@@ -177,8 +175,8 @@ You cannot create projects for the baseclass."
 Configure the Emacs `locate-program' variable to also
 configure the use of EDE locate.")
 
-(cl-defmethod ede-locate-ok-in-project ((loc (subclass ede-locate-locate))
-                                            root)
+(cl-defmethod ede-locate-ok-in-project ((_loc (subclass ede-locate-locate))
+                                       _root)
   "Is it ok to use this project type under ROOT."
   (or (featurep 'locate) (locate-library "locate"))
   )
@@ -198,7 +196,7 @@ that created this EDE locate object."
     (with-current-buffer b
       (setq default-directory cd)
       (erase-buffer))
-    (apply 'call-process locate-command
+    (apply #'call-process locate-command
           nil b nil
           searchstr nil)
     (with-current-buffer b
@@ -221,7 +219,7 @@ Configure EDE's use of GNU Global through the 
cedet-global.el
 variable `cedet-global-command'.")
 
 (cl-defmethod initialize-instance ((loc ede-locate-global)
-                               &rest slots)
+                                  &rest _slots)
   "Make sure that we can use GNU Global."
   (require 'cedet-global)
   ;; Get ourselves initialized.
@@ -235,8 +233,8 @@ variable `cedet-global-command'.")
             (oref loc root))))
   )
 
-(cl-defmethod ede-locate-ok-in-project ((loc (subclass ede-locate-global))
-                                            root)
+(cl-defmethod ede-locate-ok-in-project ((_loc (subclass ede-locate-global))
+                                       root)
   "Is it ok to use this project type under ROOT."
   (require 'cedet-global)
   (cedet-gnu-global-version-check)
@@ -252,7 +250,7 @@ variable `cedet-global-command'.")
     (cedet-gnu-global-expand-filename filesubstring)))
 
 (cl-defmethod ede-locate-create/update-root-database
-  ((loc (subclass ede-locate-global)) root)
+  ((_loc (subclass ede-locate-global)) root)
   "Create or update the GNU Global database for the current project."
   (cedet-gnu-global-create/update-database root))
 
@@ -271,7 +269,7 @@ Configure EDE's use of IDUtils through the cedet-idutils.el
 file name searching variable `cedet-idutils-file-command'.")
 
 (cl-defmethod initialize-instance ((loc ede-locate-idutils)
-                               &rest slots)
+                                  &rest _slots)
   "Make sure that we can use IDUtils."
   ;; Get ourselves initialized.
   (cl-call-next-method)
@@ -283,8 +281,8 @@ file name searching variable `cedet-idutils-file-command'.")
           (oref loc root)))
   )
 
-(cl-defmethod ede-locate-ok-in-project ((loc (subclass ede-locate-idutils))
-                                            root)
+(cl-defmethod ede-locate-ok-in-project ((_loc (subclass ede-locate-idutils))
+                                       root)
   "Is it ok to use this project type under ROOT."
   (require 'cedet-idutils)
   (cedet-idutils-version-check)
@@ -301,7 +299,7 @@ that created this EDE locate object."
     (cedet-idutils-expand-filename filesubstring)))
 
 (cl-defmethod ede-locate-create/update-root-database
-  ((loc (subclass ede-locate-idutils)) root)
+  ((_loc (subclass ede-locate-idutils)) root)
   "Create or update the GNU Global database for the current project."
   (cedet-idutils-create/update-database root))
 
@@ -320,7 +318,7 @@ Configure EDE's use of Cscope through the cedet-cscope.el
 file name searching variable `cedet-cscope-file-command'.")
 
 (cl-defmethod initialize-instance ((loc ede-locate-cscope)
-                               &rest slots)
+                                  &rest _slots)
   "Make sure that we can use Cscope."
   ;; Get ourselves initialized.
   (cl-call-next-method)
@@ -332,8 +330,8 @@ file name searching variable `cedet-cscope-file-command'.")
           (oref loc root)))
   )
 
-(cl-defmethod ede-locate-ok-in-project ((loc (subclass ede-locate-cscope))
-                                            root)
+(cl-defmethod ede-locate-ok-in-project ((_loc (subclass ede-locate-cscope))
+                                       root)
   "Is it ok to use this project type under ROOT."
   (require 'cedet-cscope)
   (cedet-cscope-version-check)
@@ -350,7 +348,7 @@ that created this EDE locate object."
     (cedet-cscope-expand-filename filesubstring)))
 
 (cl-defmethod ede-locate-create/update-root-database
-  ((loc (subclass ede-locate-cscope)) root)
+  ((_loc (subclass ede-locate-cscope)) root)
   "Create or update the Cscope database for the current project."
   (require 'cedet-cscope)
   (cedet-cscope-create/update-database root))
diff --git a/lisp/cedet/ede/makefile-edit.el b/lisp/cedet/ede/makefile-edit.el
index 43655a5..d696594 100644
--- a/lisp/cedet/ede/makefile-edit.el
+++ b/lisp/cedet/ede/makefile-edit.el
@@ -1,4 +1,4 @@
-;;; makefile-edit.el --- Makefile editing/scanning commands.
+;;; makefile-edit.el --- Makefile editing/scanning commands.  -*- 
lexical-binding: t; -*-
 
 ;; Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
diff --git a/lisp/cedet/ede/pconf.el b/lisp/cedet/ede/pconf.el
index 5bed32f..106ba2c 100644
--- a/lisp/cedet/ede/pconf.el
+++ b/lisp/cedet/ede/pconf.el
@@ -1,4 +1,4 @@
-;;; ede/pconf.el --- configure.ac maintenance for EDE
+;;; ede/pconf.el --- configure.ac maintenance for EDE  -*- lexical-binding: t; 
-*-
 
 ;;; Copyright (C) 1998-2000, 2005, 2008-2021 Free Software Foundation,
 ;;; Inc.
@@ -67,7 +67,7 @@ don't do it.  A value of nil means to just do it.")
        ;;(td (file-name-directory (ede-proj-configure-file this)))
        (targs (oref this targets))
        (postcmd "")
-       (add-missing nil))
+       ) ;; (add-missing nil)
     ;; First, make sure we have a file.
     (if (not (file-exists-p (ede-proj-configure-file this)))
        (autoconf-new-program b (oref this name) "Project.ede"))
@@ -97,7 +97,7 @@ don't do it.  A value of nil means to just do it.")
        (ede-map-targets sp #'ede-proj-flush-autoconf)))
     (ede-map-all-subprojects
      this
-     (lambda (sp)
+     (lambda (_sp)
        (ede-map-targets this #'ede-proj-tweak-autoconf)))
     ;; Now save
     (save-buffer)
@@ -109,14 +109,15 @@ don't do it.  A value of nil means to just do it.")
     (ede-proj-configure-test-required-file this "README")
     (ede-proj-configure-test-required-file this "ChangeLog")
     ;; Let specific targets get missing files.
-    (mapc 'ede-proj-configure-create-missing targs)
+    (mapc #'ede-proj-configure-create-missing targs)
     ;; Verify that we have a make system.
     (if (or (not (ede-expand-filename (ede-toplevel this) "Makefile"))
            ;; Now is this one of our old Makefiles?
            (with-current-buffer
                 (find-file-noselect
                  (ede-expand-filename (ede-toplevel this)
-                                      "Makefile" t) t)
+                                      "Makefile" t)
+                 t)
              (goto-char (point-min))
              ;; Here is the unique piece for our makefiles.
              (re-search-forward "For use with: make" nil t)))
@@ -166,11 +167,11 @@ don't do it.  A value of nil means to just do it.")
   "Tweak the configure file (current buffer) to accommodate THIS."
   ;; Check the compilers belonging to THIS, and call the autoconf
   ;; setup for those compilers.
-  (mapc 'ede-proj-tweak-autoconf (ede-proj-compilers this))
-  (mapc 'ede-proj-tweak-autoconf (ede-proj-linkers this))
+  (mapc #'ede-proj-tweak-autoconf (ede-proj-compilers this))
+  (mapc #'ede-proj-tweak-autoconf (ede-proj-linkers this))
   )
 
-(cl-defmethod ede-proj-flush-autoconf ((this ede-proj-target))
+(cl-defmethod ede-proj-flush-autoconf ((_this ede-proj-target))
   "Flush the configure file (current buffer) to accommodate THIS.
 By flushing, remove any cruft that may be in the file.  Subsequent
 calls to `ede-proj-tweak-autoconf' can restore items removed by flush."
@@ -178,13 +179,13 @@ calls to `ede-proj-tweak-autoconf' can restore items 
removed by flush."
 
 
 ;; @TODO - No-one calls this ???
-(cl-defmethod ede-proj-configure-add-missing ((this ede-proj-target))
+(cl-defmethod ede-proj-configure-add-missing ((_this ede-proj-target))
   "Query if any files needed by THIS provided by automake are missing.
 Results in --add-missing being passed to automake."
   nil)
 
 ;; @TODO - No-one implements this yet.
-(cl-defmethod ede-proj-configure-create-missing ((this ede-proj-target))
+(cl-defmethod ede-proj-configure-create-missing ((_this ede-proj-target))
   "Add any missing files for THIS by creating them."
   nil)
 
diff --git a/lisp/cedet/ede/pmake.el b/lisp/cedet/ede/pmake.el
index e1fe856..ceb4403 100644
--- a/lisp/cedet/ede/pmake.el
+++ b/lisp/cedet/ede/pmake.el
@@ -46,6 +46,7 @@
 (require 'ede/proj)
 (require 'ede/proj-obj)
 (require 'ede/proj-comp)
+(require 'seq)
 
 (declare-function ede-srecode-setup "ede/srecode")
 (declare-function ede-srecode-insert "ede/srecode")
@@ -111,13 +112,13 @@ MFILENAME is the makefile to generate."
 
        (let* ((targ (if isdist (oref this targets) mt))
               (sp (oref this subproj))
-              (df (apply 'append
+              (df (apply #'append
                          (mapcar (lambda (tg)
                                    (ede-proj-makefile-dependency-files tg))
                                  targ))))
          ;; Distribution variables
          (ede-compiler-begin-unique
-           (mapc 'ede-proj-makefile-insert-variables targ))
+           (mapc #'ede-proj-makefile-insert-variables targ))
          ;; Only add the distribution stuff in when depth != 0
          (let ((top  (ede-toplevel this))
                (tmp this)
@@ -153,7 +154,8 @@ MFILENAME is the makefile to generate."
                                     (concat ".deps/"
                                             (file-name-nondirectory
                                              (file-name-sans-extension
-                                              f)) ".P"))
+                                              f))
+                                            ".P"))
                                   df " "))))
          ;;
          ;; Insert ALL Rule
@@ -188,11 +190,11 @@ MFILENAME is the makefile to generate."
          ;;
          (ede-compiler-begin-unique
            (ede-proj-makefile-insert-rules this)
-           (mapc 'ede-proj-makefile-insert-rules targ))
+           (mapc #'ede-proj-makefile-insert-rules targ))
          ;;
          ;; phony targets for sub projects
          ;;
-         (mapc 'ede-proj-makefile-insert-subproj-rules sp)
+         (mapc #'ede-proj-makefile-insert-subproj-rules sp)
          ;;
          ;; Distribution rules such as CLEAN and DIST
          ;;
@@ -210,11 +212,11 @@ MFILENAME is the makefile to generate."
        ;; Distribution variables
        (let ((targ (if isdist (oref this targets) mt)))
          (ede-compiler-begin-unique
-           (mapc 'ede-proj-makefile-insert-automake-pre-variables targ))
+           (mapc #'ede-proj-makefile-insert-automake-pre-variables targ))
          (ede-compiler-begin-unique
-           (mapc 'ede-proj-makefile-insert-source-variables targ))
+           (mapc #'ede-proj-makefile-insert-source-variables targ))
          (ede-compiler-begin-unique
-           (mapc 'ede-proj-makefile-insert-automake-post-variables targ))
+           (mapc #'ede-proj-makefile-insert-automake-post-variables targ))
          (ede-compiler-begin-unique
            (ede-proj-makefile-insert-user-rules this))
          (insert "\n# End of Makefile.am\n")
@@ -428,11 +430,11 @@ sources variable."
   (let* ((proj (ede-target-parent this))
         (conf-table (ede-proj-makefile-configuration-variables
                      this (oref proj configuration-default)))
-        (conf-done nil)
+        ;; (conf-done nil)
         )
     ;; Add in all variables from the configuration not already covered.
     (mapc (lambda (c)
-           (if (member (car c) conf-done)
+           (if nil ;; (member (car c) conf-done)
                nil
              (insert (car c) "=" (cdr c) "\n")))
          conf-table))
@@ -464,9 +466,9 @@ sources variable."
   "Return a list of patterns that are considered garbage to THIS.
 These are removed with make clean."
   (let ((mc (ede-map-targets
-            this (lambda (c) (ede-proj-makefile-garbage-patterns c))))
+            this #'ede-proj-makefile-garbage-patterns))
        (uniq nil))
-    (setq mc (sort (apply 'append mc) 'string<))
+    (setq mc (sort (apply #'append mc) #'string<))
     ;; Filter out duplicates from the targets.
     (while mc
       (if (and (car uniq) (string= (car uniq) (car mc)))
@@ -502,13 +504,13 @@ These are removed with make clean."
 
 (cl-defmethod ede-proj-makefile-insert-rules ((this ede-proj-project))
   "Insert rules needed by THIS target."
-  (mapc 'ede-proj-makefile-insert-rules (oref this inference-rules))
+  (mapc #'ede-proj-makefile-insert-rules (oref this inference-rules))
   )
 
 (cl-defmethod ede-proj-makefile-insert-dist-dependencies ((this 
ede-proj-project))
   "Insert any symbols that the DIST rule should depend on.
 Argument THIS is the project that should insert stuff."
-  (mapc 'ede-proj-makefile-insert-dist-dependencies (oref this targets))
+  (mapc #'ede-proj-makefile-insert-dist-dependencies (oref this targets))
   )
 
 (cl-defmethod ede-proj-makefile-insert-dist-dependencies ((_this 
ede-proj-target))
@@ -608,10 +610,10 @@ Argument THIS is the target that should insert stuff."
 
 (cl-defmethod ede-proj-makefile-insert-rules ((this ede-proj-target-makefile))
   "Insert rules needed by THIS target."
-  (mapc 'ede-proj-makefile-insert-rules (oref this rules))
+  (mapc #'ede-proj-makefile-insert-rules (oref this rules))
   (let ((c (ede-proj-compilers this)))
     (when c
-      (mapc 'ede-proj-makefile-insert-rules c)
+      (mapc #'ede-proj-makefile-insert-rules c)
       (if (oref this phony)
          (insert ".PHONY: " (ede-proj-makefile-target-name this) "\n"))
       (insert (ede-proj-makefile-target-name this) ": "
@@ -622,9 +624,9 @@ Argument THIS is the target that should insert stuff."
 (cl-defmethod ede-proj-makefile-insert-commands ((this 
ede-proj-target-makefile))
   "Insert the commands needed by target THIS.
 For targets, insert the commands needed by the chosen compiler."
-  (mapc 'ede-proj-makefile-insert-commands (ede-proj-compilers this))
+  (mapc #'ede-proj-makefile-insert-commands (ede-proj-compilers this))
   (when (object-assoc t :uselinker (ede-proj-compilers this))
-    (mapc 'ede-proj-makefile-insert-commands (ede-proj-linkers this))))
+    (mapc #'ede-proj-makefile-insert-commands (ede-proj-linkers this))))
 
 
 (cl-defmethod ede-proj-makefile-insert-user-rules ((this ede-proj-project))
@@ -632,11 +634,11 @@ For targets, insert the commands needed by the chosen 
compiler."
 This is different from `ede-proj-makefile-insert-rules' in that this
 function won't create the building rules which are auto created with
 automake."
-  (mapc 'ede-proj-makefile-insert-user-rules (oref this inference-rules)))
+  (mapc #'ede-proj-makefile-insert-user-rules (oref this inference-rules)))
 
 (cl-defmethod ede-proj-makefile-insert-user-rules ((this ede-proj-target))
   "Insert user specified rules needed by THIS target."
-  (mapc 'ede-proj-makefile-insert-rules (oref this rules)))
+  (mapc #'ede-proj-makefile-insert-rules (oref this rules)))
 
 (cl-defmethod ede-proj-makefile-dependencies ((this ede-proj-target-makefile))
   "Return a string representing the dependencies for THIS.
@@ -644,7 +646,7 @@ Some compilers only use the first element in the 
dependencies, others
 have a list of intermediates (object files), and others don't care.
 This allows customization of how these elements appear."
   (let* ((c (ede-proj-compilers this))
-        (io (eval (cons 'or (mapcar 'ede-compiler-intermediate-objects-p c))))
+        (io (seq-some #'ede-compiler-intermediate-objects-p c))
         (out nil))
     (if io
        (progn
@@ -652,7 +654,8 @@ This allows customization of how these elements appear."
            (setq out
                  (concat out "$(" (ede-compiler-intermediate-object-variable
                                    (car c)
-                                   (ede-proj-makefile-target-name this)) ")")
+                                   (ede-proj-makefile-target-name this))
+                         ")")
                  c (cdr c)))
          out)
       (let ((sv (ede-proj-makefile-sourcevar this))
diff --git a/lisp/cedet/ede/proj-comp.el b/lisp/cedet/ede/proj-comp.el
index 397354a..1d6a4eb 100644
--- a/lisp/cedet/ede/proj-comp.el
+++ b/lisp/cedet/ede/proj-comp.el
@@ -309,7 +309,7 @@ Not all compilers do this."
 (cl-defmethod ede-proj-makefile-insert-rules ((this ede-compilation-program))
   "Insert rules needed for THIS compiler object."
   (ede-compiler-only-once this
-    (mapc 'ede-proj-makefile-insert-rules (oref this rules))))
+    (mapc #'ede-proj-makefile-insert-rules (oref this rules))))
 
 (cl-defmethod ede-proj-makefile-insert-rules ((this ede-makefile-rule))
   "Insert rules needed for THIS rule object."
diff --git a/lisp/cedet/ede/proj-elisp.el b/lisp/cedet/ede/proj-elisp.el
index 9ec9694..7e0f5a8 100644
--- a/lisp/cedet/ede/proj-elisp.el
+++ b/lisp/cedet/ede/proj-elisp.el
@@ -1,4 +1,4 @@
-;;; ede-proj-elisp.el --- EDE Generic Project Emacs Lisp support
+;;; ede-proj-elisp.el --- EDE Generic Project Emacs Lisp support  -*- 
lexical-binding: t; -*-
 
 ;; Copyright (C) 1998-2005, 2007-2021 Free Software Foundation, Inc.
 
@@ -64,7 +64,7 @@ This inserts the PRELOADS target-local variable."
       (when preloads
        (insert (format "%s: PRELOADS=%s\n"
                        (oref this name)
-                       (mapconcat 'identity preloads " ")))))
+                       (mapconcat #'identity preloads " ")))))
     (insert "\n"))
 
 (cl-defmethod ede-proj-makefile-dependencies ((this ede-proj-target-elisp))
@@ -152,7 +152,7 @@ Bonus: Return a cons cell: (COMPILED . UPTODATE)."
         (utd 0))
     (mapc (lambda (src)
            (let* ((fsrc (expand-file-name src dir))
-                  (elc (concat (file-name-sans-extension fsrc) ".elc")))
+                  ) ;; (elc (concat (file-name-sans-extension fsrc) ".elc"))
              (with-no-warnings
                 (if (eq (byte-recompile-file fsrc nil 0) t)
                     (setq comp (1+ comp))
@@ -169,7 +169,7 @@ is found, such as a `-version' variable, or the standard 
header."
   (if (and (slot-boundp this 'versionsource)
           (oref this versionsource))
       (let ((vs (oref this versionsource))
-           (match nil))
+           ) ;; (match nil)
        (while vs
          (with-current-buffer (find-file-noselect
                                 (ede-expand-filename this (car vs)))
@@ -177,7 +177,7 @@ is found, such as a `-version' variable, or the standard 
header."
            (let ((case-fold-search t))
              (if (re-search-forward "-version\\s-+\"\\([^\"]+\\)\"" nil t)
                  (progn
-                   (setq match t)
+                   ;; (setq match t)
                    (delete-region (match-beginning 1)
                                   (match-end 1))
                    (goto-char (match-beginning 1))
@@ -331,27 +331,27 @@ Lays claim to all .elc files that match .el files in this 
target."
 If the `compiler' slot is empty, get the car of the compilers list."
   (let ((comp (oref obj compiler)))
     (if comp
-       (if (listp comp)
-           (setq comp (mapcar 'symbol-value comp))
-         (setq comp (list (symbol-value comp))))
+       (setq comp (if (listp comp)
+                      (mapcar #'symbol-value comp)
+                    (list (symbol-value comp))))
       ;; Get the first element from our list of compilers.
-      (let ((avail (mapcar 'symbol-value (oref obj availablecompilers))))
+      (let ((avail (mapcar #'symbol-value (oref obj availablecompilers))))
        (setq comp (list (car avail)))))
     comp))
 
-(cl-defmethod ede-proj-makefile-insert-source-variables ((this 
ede-proj-target-elisp-autoloads)
-                                                     &optional
-                                                     moresource)
+(cl-defmethod ede-proj-makefile-insert-source-variables ((_this 
ede-proj-target-elisp-autoloads)
+                                                        &optional
+                                                        _moresource)
   "Insert the source variables needed by THIS.
 Optional argument MORESOURCE is a list of additional sources to add to the
 sources variable."
   nil)
 
-(cl-defmethod ede-proj-makefile-sourcevar ((this 
ede-proj-target-elisp-autoloads))
+(cl-defmethod ede-proj-makefile-sourcevar ((_this 
ede-proj-target-elisp-autoloads))
   "Return the variable name for THIS's sources."
   nil) ; "LOADDEFS")
 
-(cl-defmethod ede-proj-makefile-dependencies ((this 
ede-proj-target-elisp-autoloads))
+(cl-defmethod ede-proj-makefile-dependencies ((_this 
ede-proj-target-elisp-autoloads))
   "Return a string representing the dependencies for THIS.
 Always return an empty string for an autoloads generator."
   "")
@@ -361,21 +361,22 @@ Always return an empty string for an autoloads generator."
   (ede-pmake-insert-variable-shared "LOADDEFS"
     (insert (oref this autoload-file)))
   (ede-pmake-insert-variable-shared "LOADDIRS"
-    (insert (mapconcat 'identity
+    (insert (mapconcat #'identity
                        (or (oref this autoload-dirs) '("."))
                        " ")))
   )
 
 (cl-defmethod project-compile-target ((obj ede-proj-target-elisp-autoloads))
   "Create or update the autoload target."
-  (require 'cedet-autogen)
+  (require 'cedet-autogen)              ;FIXME: We don't have this file!
+  (declare-function cedet-update-autoloads "cedet-autogen")
   (let ((default-directory (ede-expand-filename obj ".")))
-    (apply 'cedet-update-autoloads
+    (apply #'cedet-update-autoloads
           (oref obj autoload-file)
           (oref obj autoload-dirs))
     ))
 
-(cl-defmethod ede-update-version-in-source ((this 
ede-proj-target-elisp-autoloads) version)
+(cl-defmethod ede-update-version-in-source ((_this 
ede-proj-target-elisp-autoloads) _version)
   "In a Lisp file, updated a version string for THIS to VERSION.
 There are standards in Elisp files specifying how the version string
 is found, such as a `-version' variable, or the standard header."
@@ -397,11 +398,11 @@ Argument THIS is the target which needs to insert an info 
file."
   (insert " " (oref this autoload-file))
   )
 
-(cl-defmethod ede-proj-tweak-autoconf ((this ede-proj-target-elisp-autoloads))
+(cl-defmethod ede-proj-tweak-autoconf ((_this ede-proj-target-elisp-autoloads))
   "Tweak the configure file (current buffer) to accommodate THIS."
   (error "Autoloads not supported in autoconf yet"))
 
-(cl-defmethod ede-proj-flush-autoconf ((this ede-proj-target-elisp-autoloads))
+(cl-defmethod ede-proj-flush-autoconf ((_this ede-proj-target-elisp-autoloads))
   "Flush the configure file (current buffer) to accommodate THIS."
   nil)
 
diff --git a/lisp/cedet/ede/proj-info.el b/lisp/cedet/ede/proj-info.el
index 3d43701..11e0f30 100644
--- a/lisp/cedet/ede/proj-info.el
+++ b/lisp/cedet/ede/proj-info.el
@@ -1,4 +1,4 @@
-;;; ede-proj-info.el --- EDE Generic Project texinfo support
+;;; ede-proj-info.el --- EDE Generic Project texinfo support  -*- 
lexical-binding: t; -*-
 
 ;;; Copyright (C) 1998-2001, 2004, 2007-2021 Free Software Foundation,
 ;;; Inc.
@@ -70,7 +70,7 @@ All other sources should be included independently."))
 ;;; Makefile generation
 ;;
 (cl-defmethod ede-proj-configure-add-missing
-  ((this ede-proj-target-makefile-info))
+  ((_this ede-proj-target-makefile-info))
   "Query if any files needed by THIS provided by automake are missing.
 Results in --add-missing being passed to automake."
   (not (ede-expand-filename (ede-toplevel) "texinfo.tex")))
@@ -97,7 +97,7 @@ when working in Automake mode."
        (insert menu))
       ;; Now insert the rest of the source elsewhere
       (ede-pmake-insert-variable-shared sv
-       (insert (mapconcat 'identity src " ")))
+       (insert (mapconcat #'identity src " ")))
       (if moresource
          (error "Texinfo files should not have moresource")))))
 
diff --git a/lisp/cedet/ede/proj-obj.el b/lisp/cedet/ede/proj-obj.el
index 3aa4497..72d0916 100644
--- a/lisp/cedet/ede/proj-obj.el
+++ b/lisp/cedet/ede/proj-obj.el
@@ -1,4 +1,4 @@
-;;; ede/proj-obj.el --- EDE Generic Project Object code generation support
+;;; ede/proj-obj.el --- EDE Generic Project Object code generation support  
-*- lexical-binding: t; -*-
 
 ;;; Copyright (C) 1998-2000, 2005, 2008-2021 Free Software Foundation,
 ;;; Inc.
@@ -282,15 +282,15 @@ Argument THIS is the target to get sources from."
   (append (oref this source) (oref this auxsource)))
 
 (cl-defmethod ede-proj-makefile-insert-variables ((this 
ede-proj-target-makefile-objectcode)
-                                              &optional moresource)
+                                                 &optional _moresource)
   "Insert variables needed by target THIS.
 Optional argument MORESOURCE is not used."
   (let ((ede-proj-objectcode-dodependencies
         (oref (ede-target-parent this) automatic-dependencies)))
     (cl-call-next-method)))
 
-(cl-defmethod ede-buffer-header-file((this ede-proj-target-makefile-objectcode)
-                                 buffer)
+(cl-defmethod ede-buffer-header-file ((this 
ede-proj-target-makefile-objectcode)
+                                     _buffer)
   "There are no default header files."
   (or (cl-call-next-method)
       ;; Ok, nothing obvious. Try looking in ourselves.
diff --git a/lisp/cedet/ede/proj-prog.el b/lisp/cedet/ede/proj-prog.el
index 3817cd7..87b2ff7 100644
--- a/lisp/cedet/ede/proj-prog.el
+++ b/lisp/cedet/ede/proj-prog.el
@@ -1,4 +1,4 @@
-;;; ede-proj-prog.el --- EDE Generic Project program support
+;;; ede-proj-prog.el --- EDE Generic Project program support  -*- 
lexical-binding: t; -*-
 
 ;; Copyright (C) 1998-2001, 2005, 2008-2021 Free Software Foundation,
 ;; Inc.
@@ -90,11 +90,11 @@ Note: Currently only used for Automake projects."
 (cl-defmethod ede-proj-makefile-insert-variables ((this 
ede-proj-target-makefile-program))
   "Insert variables needed by the compiler THIS."
   (cl-call-next-method)
-  (let ((lf (mapconcat 'identity (oref this ldflags) " ")))
+  (let ((lf (mapconcat #'identity (oref this ldflags) " ")))
     (with-slots (ldlibs) this
       (if ldlibs
          (setq lf
-               (concat lf " -l" (mapconcat 'identity ldlibs " -l")))))
+               (concat lf " -l" (mapconcat #'identity ldlibs " -l")))))
     ;; LDFLAGS as needed.
     (when (and lf (not (string= "" lf)))
       (ede-pmake-insert-variable-once "LDDEPS" (insert lf)))))
diff --git a/lisp/cedet/ede/proj-shared.el b/lisp/cedet/ede/proj-shared.el
index 130d7b8..8688d15 100644
--- a/lisp/cedet/ede/proj-shared.el
+++ b/lisp/cedet/ede/proj-shared.el
@@ -1,4 +1,4 @@
-;;; ede-proj-shared.el --- EDE Generic Project shared library support
+;;; ede-proj-shared.el --- EDE Generic Project shared library support  -*- 
lexical-binding: t; -*-
 
 ;;; Copyright (C) 1998-2000, 2009-2021 Free Software Foundation, Inc.
 
@@ -170,7 +170,7 @@ Use ldlibs to add addition libraries.")
   )
 
 (cl-defmethod ede-proj-configure-add-missing
-  ((this ede-proj-target-makefile-shared-object))
+  ((_this ede-proj-target-makefile-shared-object))
   "Query if any files needed by THIS provided by automake are missing.
 Results in --add-missing being passed to automake."
   (not (and (ede-expand-filename (ede-toplevel) "ltconfig")
@@ -185,7 +185,7 @@ Makefile.am generator, so use it to add this important bin 
program."
      (insert (concat "lib" (ede-name this) ".la"))))
 
 (cl-defmethod ede-proj-makefile-insert-automake-post-variables
-  ((this ede-proj-target-makefile-shared-object))
+  ((_this ede-proj-target-makefile-shared-object))
   "Insert bin_PROGRAMS variables needed by target THIS.
 We need to override -program which has an LDADD element."
   nil)
diff --git a/lisp/cedet/ede/proj.el b/lisp/cedet/ede/proj.el
index 4af8b41..6ff7630 100644
--- a/lisp/cedet/ede/proj.el
+++ b/lisp/cedet/ede/proj.el
@@ -1,4 +1,4 @@
-;;; ede/proj.el --- EDE Generic Project file driver
+;;; ede/proj.el --- EDE Generic Project file driver  -*- lexical-binding: t; 
-*-
 
 ;; Copyright (C) 1998-2003, 2007-2021 Free Software Foundation, Inc.
 
@@ -339,7 +339,7 @@ Argument PROJ is the project to save."
   (cl-call-next-method)
   (ede-proj-save proj))
 
-(cl-defmethod eieio-done-customizing ((target ede-proj-target))
+(cl-defmethod eieio-done-customizing ((_target ede-proj-target))
   "Call this when a user finishes customizing this object.
 Argument TARGET is the project we are completing customization on."
   (cl-call-next-method)
@@ -462,7 +462,7 @@ FILE must be massaged by `ede-convert-path'."
   (object-remove-from-list target 'auxsource (ede-convert-path target file))
   (ede-proj-save))
 
-(cl-defmethod project-update-version ((this ede-proj-project))
+(cl-defmethod project-update-version ((_this ede-proj-project))
   "The :version of project THIS has changed."
   (ede-proj-save))
 
@@ -486,7 +486,7 @@ FILE must be massaged by `ede-convert-path'."
    (concat (oref this name) "-" (oref this version) ".tar.gz")
    ))
 
-(cl-defmethod project-compile-project ((proj ede-proj-project) &optional 
command)
+(cl-defmethod project-compile-project ((proj ede-proj-project) &optional 
_command)
   "Compile the entire current project PROJ.
 Argument COMMAND is the command to use when compiling."
   (let ((pm (ede-proj-dist-makefile proj))
@@ -499,13 +499,13 @@ Argument COMMAND is the command to use when compiling."
 
 ;;; Target type specific compilations/debug
 ;;
-(cl-defmethod project-compile-target ((obj ede-proj-target) &optional command)
+(cl-defmethod project-compile-target ((_obj ede-proj-target) &optional command)
   "Compile the current target OBJ.
 Argument COMMAND is the command to use for compiling the target."
   (project-compile-project (ede-current-project) command))
 
 (cl-defmethod project-compile-target ((obj ede-proj-target-makefile)
-                                  &optional command)
+                                     &optional _command)
   "Compile the current target program OBJ.
 Optional argument COMMAND is the s the alternate command to use."
   (ede-proj-setup-buildenvironment (ede-current-project))
@@ -545,11 +545,11 @@ Converts all symbols into the objects to be used."
       (if comp
          ;; Now that we have a pre-set compilers to use, convert tye symbols
          ;; into objects for ease of use
-         (if (listp comp)
-             (setq comp (mapcar 'symbol-value comp))
-           (setq comp (list (symbol-value comp))))
+         (setq comp (if (listp comp)
+                        (mapcar #'symbol-value comp)
+                      (list (symbol-value comp))))
        (let* ((acomp (oref obj availablecompilers))
-              (avail (mapcar 'symbol-value acomp))
+              (avail (mapcar #'symbol-value acomp))
               (st (oref obj sourcetype))
               (sources (oref obj source)))
          ;; COMP is not specified, so generate a list from the available
@@ -585,7 +585,7 @@ Converts all symbols into the objects to be used."
              (setq link (list (symbol-value link)))
            (error ":linker is not a symbol.  Howd you do that?"))
        (let* ((alink (oref obj availablelinkers))
-              (avail (mapcar 'symbol-value alink))
+              (avail (mapcar #'symbol-value alink))
               (st (oref obj sourcetype))
               (sources (oref obj source)))
          ;; LINKER is not specified, so generate a list from the available
diff --git a/lisp/cedet/ede/project-am.el b/lisp/cedet/ede/project-am.el
index d676c57..258917f 100644
--- a/lisp/cedet/ede/project-am.el
+++ b/lisp/cedet/ede/project-am.el
@@ -596,10 +596,8 @@ Strip out duplicates, and recurse on variables."
                (project-am-expand-subdirlist
                 place (makefile-macro-file-list var))
              ;; Else, add SP in if it isn't a dup.
-             (if (member sp (symbol-value place))
-                 nil ; don't do it twice.
-               (set place (cons sp (symbol-value place))) ;; add
-               ))))
+             (cl-pushnew sp (gv-deref place) :test #'equal) ;; add
+             )))
        subdirs)
   )
 
@@ -645,7 +643,7 @@ Strip out duplicates, and recurse on variables."
       ;; We still have a list of targets.  For all buffers, make sure
       ;; their object still exists!
       ;; FIGURE THIS OUT
-      (project-am-expand-subdirlist 'csubprojexpanded csubproj)
+      (project-am-expand-subdirlist (gv-ref csubprojexpanded) csubproj)
       ;; Ok, now let's look at all our sub-projects.
       (mapc (lambda (sp)
              (let* ((subdir (file-name-as-directory
diff --git a/lisp/cedet/ede/shell.el b/lisp/cedet/ede/shell.el
index ba36fcc..371b04f 100644
--- a/lisp/cedet/ede/shell.el
+++ b/lisp/cedet/ede/shell.el
@@ -1,4 +1,4 @@
-;;; ede/shell.el --- A shell controlled by EDE.
+;;; ede/shell.el --- A shell controlled by EDE.  -*- lexical-binding: t; -*-
 ;;
 ;; Copyright (C) 2009-2021 Free Software Foundation, Inc.
 ;;
diff --git a/lisp/cedet/ede/simple.el b/lisp/cedet/ede/simple.el
index ea6162e..aaeb3f7 100644
--- a/lisp/cedet/ede/simple.el
+++ b/lisp/cedet/ede/simple.el
@@ -1,4 +1,4 @@
-;;; ede/simple.el --- Overlay an EDE structure on an existing project
+;;; ede/simple.el --- Overlay an EDE structure on an existing project  -*- 
lexical-binding: t; -*-
 
 ;; Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
@@ -78,7 +78,7 @@ The directory has three parts:
      ede-simple-save-file-name)
     ))
 
-(defun ede-simple-load (dir &optional rootproj)
+(defun ede-simple-load (dir &optional _rootproj)
   "Load a project of type `Simple' for the directory DIR.
 Return nil if there isn't one.
 ROOTPROJ is nil, since we will only create a single EDE project here."
@@ -112,7 +112,7 @@ Each directory needs a project file to control it.")
   (eieio-persistent-save proj))
 
 (cl-defmethod ede-find-subproject-for-directory ((proj ede-simple-project)
-                                             dir)
+                                                _dir)
   "Return PROJ, for handling all subdirs below DIR."
   proj)
 
diff --git a/lisp/cedet/ede/source.el b/lisp/cedet/ede/source.el
index abdb07f..5dbad4f 100644
--- a/lisp/cedet/ede/source.el
+++ b/lisp/cedet/ede/source.el
@@ -1,4 +1,4 @@
-;; ede/source.el --- EDE source code object
+;; ede/source.el --- EDE source code object  -*- lexical-binding: t; -*-
 
 ;; Copyright (C) 2000, 2008-2021 Free Software Foundation, Inc.
 
@@ -72,7 +72,7 @@ that they are willing to use.")
 
 ;;; Methods
 ;;
-(cl-defmethod initialize-instance :after ((this ede-sourcecode) &rest fields)
+(cl-defmethod initialize-instance :after ((this ede-sourcecode) &rest _fields)
   "Make sure that all ede compiler objects are cached in
 `ede-compiler-list'."
   (let ((lst ede-sourcecode-list))
diff --git a/lisp/cedet/ede/speedbar.el b/lisp/cedet/ede/speedbar.el
index 48c4a89..01d4f94 100644
--- a/lisp/cedet/ede/speedbar.el
+++ b/lisp/cedet/ede/speedbar.el
@@ -1,4 +1,4 @@
-;;; ede/speedbar.el --- Speedbar viewing of EDE projects
+;;; ede/speedbar.el --- Speedbar viewing of EDE projects  -*- lexical-binding: 
t; -*-
 
 ;; Copyright (C) 1998-2001, 2003, 2005, 2007-2021 Free Software
 ;; Foundation, Inc.
@@ -42,21 +42,21 @@
   (setq ede-speedbar-key-map (speedbar-make-specialized-keymap))
 
   ;; General viewing things
-  (define-key ede-speedbar-key-map "\C-m" 'speedbar-edit-line)
-  (define-key ede-speedbar-key-map "+" 'speedbar-expand-line)
-  (define-key ede-speedbar-key-map "=" 'speedbar-expand-line)
-  (define-key ede-speedbar-key-map "-" 'speedbar-contract-line)
-  (define-key ede-speedbar-key-map " " 'speedbar-toggle-line-expansion)
+  (define-key ede-speedbar-key-map "\C-m" #'speedbar-edit-line)
+  (define-key ede-speedbar-key-map "+" #'speedbar-expand-line)
+  (define-key ede-speedbar-key-map "=" #'speedbar-expand-line)
+  (define-key ede-speedbar-key-map "-" #'speedbar-contract-line)
+  (define-key ede-speedbar-key-map " " #'speedbar-toggle-line-expansion)
 
   ;; Some object based things
-  (define-key ede-speedbar-key-map "C" 'eieio-speedbar-customize-line)
+  (define-key ede-speedbar-key-map "C" #'eieio-speedbar-customize-line)
 
   ;; Some project based things
-  (define-key ede-speedbar-key-map "R" 'ede-speedbar-remove-file-from-target)
-  (define-key ede-speedbar-key-map "b" 'ede-speedbar-compile-line)
-  (define-key ede-speedbar-key-map "B" 'ede-speedbar-compile-project)
-  (define-key ede-speedbar-key-map "D" 'ede-speedbar-make-distribution)
-  (define-key ede-speedbar-key-map "E" 'ede-speedbar-edit-projectfile)
+  (define-key ede-speedbar-key-map "R" #'ede-speedbar-remove-file-from-target)
+  (define-key ede-speedbar-key-map "b" #'ede-speedbar-compile-line)
+  (define-key ede-speedbar-key-map "B" #'ede-speedbar-compile-project)
+  (define-key ede-speedbar-key-map "D" #'ede-speedbar-make-distribution)
+  (define-key ede-speedbar-key-map "E" #'ede-speedbar-edit-projectfile)
   )
 
 (defvar ede-speedbar-menu
@@ -98,7 +98,7 @@
   (speedbar-get-focus)
   )
 
-(defun ede-speedbar-toplevel-buttons (dir)
+(defun ede-speedbar-toplevel-buttons (_dir)
   "Return a list of objects to display in speedbar.
 Argument DIR is the directory from which to derive the list of objects."
   ede-projects
@@ -180,13 +180,13 @@ Argument DIR is the directory from which to derive the 
list of objects."
        (setq depth (1- depth)))
       (speedbar-line-token))))
 
-(cl-defmethod eieio-speedbar-derive-line-path ((obj ede-project) &optional 
depth)
+(cl-defmethod eieio-speedbar-derive-line-path ((obj ede-project) &optional 
_depth)
   "Return the path to OBJ.
 Optional DEPTH is the depth we start at."
   (file-name-directory (oref obj file))
   )
 
-(cl-defmethod eieio-speedbar-derive-line-path ((obj ede-target) &optional 
depth)
+(cl-defmethod eieio-speedbar-derive-line-path ((obj ede-target) &optional 
_depth)
   "Return the path to OBJ.
 Optional DEPTH is the depth we start at."
   (let ((proj (ede-target-parent obj)))
@@ -208,7 +208,7 @@ Optional DEPTH is the depth we start at."
   "Provide a speedbar description for OBJ."
   (ede-description obj))
 
-(cl-defmethod eieio-speedbar-child-description ((obj ede-target))
+(cl-defmethod eieio-speedbar-child-description ((_obj ede-target))
   "Provide a speedbar description for a plain-child of OBJ.
 A plain child is a child element which is not an EIEIO object."
   (or (speedbar-item-info-file-helper)
@@ -251,7 +251,7 @@ It has depth DEPTH."
 
 ;;; Generic file management for TARGETS
 ;;
-(defun ede-file-find (text token indent)
+(defun ede-file-find (_text token indent)
   "Find the file TEXT at path TOKEN.
 INDENT is the current indentation level."
   (speedbar-find-file-in-frame
@@ -290,7 +290,7 @@ level."
        (t (error "Ooops...  not sure what to do")))
   (speedbar-center-buffer-smartly))
 
-(defun ede-tag-find (text token indent)
+(defun ede-tag-find (_text token _indent)
   "For the tag TEXT in a file TOKEN, goto that position.
 INDENT is the current indentation level."
   (let ((file (ede-find-nearest-file-line)))
@@ -314,21 +314,21 @@ INDENT is the current indentation level."
 (defvar ede-speedbar-file-menu-additions
   '("----"
     ["Create EDE Target" ede-new-target (ede-current-project) ]
-    ["Add to project" ede-speedbar-file-add-to-project (ede-current-project) ]
+    ;; ["Add to project" ede-speedbar-file-add-to-project 
(ede-current-project) ]
     ["Compile project" ede-speedbar-compile-project (ede-current-project) ]
-    ["Compile file target" ede-speedbar-compile-file-target 
(ede-current-project) ]
+    ;; ["Compile file target" ede-speedbar-compile-file-target 
(ede-current-project) ]
     ["Make distribution" ede-make-dist (ede-current-project) ]
     )
   "Set of menu items to splice into the speedbar menu.")
 
 (defvar ede-speedbar-file-keymap
   (let ((km (make-sparse-keymap)))
-    (define-key km "a" 'ede-speedbar-file-add-to-project)
-    (define-key km "t" 'ede-new-target)
-    (define-key km "s" 'ede-speedbar)
-    (define-key km "C" 'ede-speedbar-compile-project)
-    (define-key km "c" 'ede-speedbar-compile-file-target)
-    (define-key km "d" 'ede-make-dist)
+    ;; (define-key km "a" #'ede-speedbar-file-add-to-project)
+    (define-key km "t" #'ede-new-target)
+    (define-key km "s" #'ede-speedbar)
+    (define-key km "C" #'ede-speedbar-compile-project)
+    ;; (define-key km "c" #'ede-speedbar-compile-file-target)
+    (define-key km "d" #'ede-make-dist)
     km)
   "Keymap spliced into the speedbar keymap.")
 
diff --git a/lisp/cedet/ede/util.el b/lisp/cedet/ede/util.el
index 80cbc21..2b2402c 100644
--- a/lisp/cedet/ede/util.el
+++ b/lisp/cedet/ede/util.el
@@ -1,4 +1,4 @@
-;;; ede/util.el --- EDE utilities
+;;; ede/util.el --- EDE utilities  -*- lexical-binding: t; -*-
 
 ;; Copyright (C) 2000, 2005, 2009-2021 Free Software Foundation, Inc.
 
diff --git a/lisp/cedet/mode-local.el b/lisp/cedet/mode-local.el
index 63e0cef..4218b23 100644
--- a/lisp/cedet/mode-local.el
+++ b/lisp/cedet/mode-local.el
@@ -576,7 +576,7 @@ OVERARGS is a list of arguments passed to the override and
 (put :override-with-args 'lisp-indent-function 1)
 
 (define-obsolete-function-alias 'define-overload
-  'define-overloadable-function "27.1")
+  #'define-overloadable-function "27.1")
 
 (define-obsolete-function-alias 'function-overload-p
   #'mode-local--function-overload-p "27.1")
diff --git a/lisp/cedet/pulse.el b/lisp/cedet/pulse.el
index 3257feb..cfd2152 100644
--- a/lisp/cedet/pulse.el
+++ b/lisp/cedet/pulse.el
@@ -194,7 +194,7 @@ Optional argument FACE specifies the face to do the 
highlighting."
        (progn
          (overlay-put o 'face (or face 'pulse-highlight-start-face))
          (add-hook 'pre-command-hook
-                   'pulse-momentary-unhighlight))
+                   #'pulse-momentary-unhighlight))
       ;; Pulse it.
       (overlay-put o 'face 'pulse-highlight-face)
       ;; The pulse function puts FACE onto 'pulse-highlight-face.
@@ -233,7 +233,7 @@ Optional argument FACE specifies the face to do the 
highlighting."
     (cancel-timer pulse-momentary-timer))
 
   ;; Remove this hook.
-  (remove-hook 'pre-command-hook 'pulse-momentary-unhighlight))
+  (remove-hook 'pre-command-hook #'pulse-momentary-unhighlight))
 
 ;;;###autoload
 (defun pulse-momentary-highlight-one-line (point &optional face)
diff --git a/lisp/cedet/semantic.el b/lisp/cedet/semantic.el
index 797ff75..15388f0 100644
--- a/lisp/cedet/semantic.el
+++ b/lisp/cedet/semantic.el
@@ -1,4 +1,4 @@
-;;; semantic.el --- Semantic buffer evaluator.
+;;; semantic.el --- Semantic buffer evaluator.  -*- lexical-binding: t; -*-
 
 ;; Copyright (C) 1999-2021 Free Software Foundation, Inc.
 
@@ -297,7 +297,7 @@ to use Semantic, and `semantic-init-hook' is run."
                    'semantic-inhibit-functions)))
     ;; Make sure that if this buffer is cloned, our tags and overlays
     ;; don't go along for the ride.
-    (add-hook 'clone-indirect-buffer-hook 'semantic-clear-toplevel-cache
+    (add-hook 'clone-indirect-buffer-hook #'semantic-clear-toplevel-cache
              nil t)
     ;; Specify that this function has done its work.  At this point
     ;; we can consider that semantic is active in this buffer.
@@ -466,12 +466,12 @@ is requested."
   ;; Nuke all semantic overlays.  This is faster than deleting based
   ;; on our data structure.
   (let ((l (overlay-lists)))
-    (mapc 'semantic-delete-overlay-maybe (car l))
-    (mapc 'semantic-delete-overlay-maybe (cdr l))
+    (mapc #'semantic-delete-overlay-maybe (car l))
+    (mapc #'semantic-delete-overlay-maybe (cdr l))
     )
   (semantic-parse-tree-set-needs-rebuild)
   ;; Remove this hook which tracks if a buffer is up to date or not.
-  (remove-hook 'after-change-functions 'semantic-change-function t)
+  (remove-hook 'after-change-functions #'semantic-change-function t)
 
   (run-hook-with-args 'semantic-after-toplevel-cache-change-hook
                      semantic--buffer-cache)
@@ -487,7 +487,7 @@ is requested."
   ;; This is specific to the bovine parser.
   (setq-local semantic-bovinate-nonterminal-check-obarray nil)
   (semantic-parse-tree-set-up-to-date)
-  (add-hook 'after-change-functions 'semantic-change-function nil t)
+  (add-hook 'after-change-functions #'semantic-change-function nil t)
   (run-hook-with-args 'semantic-after-toplevel-cache-change-hook
                      semantic--buffer-cache)
   (setq semantic--completion-cache nil)
@@ -779,25 +779,25 @@ Throw away all the old tags, and recreate the tag 
database."
 (defvar semantic-mode-map
   (let ((map (make-sparse-keymap)))
     ;; Key bindings:
-    ;; (define-key km "f"    'senator-search-set-tag-class-filter)
-    ;; (define-key km "i"    'senator-isearch-toggle-semantic-mode)
-    (define-key map "\C-c,j" 'semantic-complete-jump-local)
-    (define-key map "\C-c,J" 'semantic-complete-jump)
-    (define-key map "\C-c,m" 'semantic-complete-jump-local-members)
-    (define-key map "\C-c,g" 'semantic-symref-symbol)
-    (define-key map "\C-c,G" 'semantic-symref)
-    (define-key map "\C-c,p" 'senator-previous-tag)
-    (define-key map "\C-c,n" 'senator-next-tag)
-    (define-key map "\C-c,u" 'senator-go-to-up-reference)
-    (define-key map "\C-c, " 'semantic-complete-analyze-inline)
-    (define-key map "\C-c,\C-w" 'senator-kill-tag)
-    (define-key map "\C-c,\M-w" 'senator-copy-tag)
-    (define-key map "\C-c,\C-y" 'senator-yank-tag)
-    (define-key map "\C-c,r" 'senator-copy-tag-to-register)
-    (define-key map "\C-c,," 'semantic-force-refresh)
-    (define-key map [?\C-c ?, up] 'senator-transpose-tags-up)
-    (define-key map [?\C-c ?, down] 'senator-transpose-tags-down)
-    (define-key map "\C-c,l" 'semantic-analyze-possible-completions)
+    ;; (define-key km "f"    #'senator-search-set-tag-class-filter)
+    ;; (define-key km "i"    #'senator-isearch-toggle-semantic-mode)
+    (define-key map "\C-c,j" #'semantic-complete-jump-local)
+    (define-key map "\C-c,J" #'semantic-complete-jump)
+    (define-key map "\C-c,m" #'semantic-complete-jump-local-members)
+    (define-key map "\C-c,g" #'semantic-symref-symbol)
+    (define-key map "\C-c,G" #'semantic-symref)
+    (define-key map "\C-c,p" #'senator-previous-tag)
+    (define-key map "\C-c,n" #'senator-next-tag)
+    (define-key map "\C-c,u" #'senator-go-to-up-reference)
+    (define-key map "\C-c, " #'semantic-complete-analyze-inline)
+    (define-key map "\C-c,\C-w" #'senator-kill-tag)
+    (define-key map "\C-c,\M-w" #'senator-copy-tag)
+    (define-key map "\C-c,\C-y" #'senator-yank-tag)
+    (define-key map "\C-c,r" #'senator-copy-tag-to-register)
+    (define-key map "\C-c,," #'semantic-force-refresh)
+    (define-key map [?\C-c ?, up] #'senator-transpose-tags-up)
+    (define-key map [?\C-c ?, down] #'senator-transpose-tags-down)
+    (define-key map "\C-c,l" #'semantic-analyze-possible-completions)
     ;; This hack avoids showing the CEDET menu twice if ede-minor-mode
     ;; and Semantic are both enabled.  Is there a better way?
     (define-key map [menu-bar cedet-menu]
@@ -1029,7 +1029,7 @@ Semantic mode.
                     (file-exists-p semanticdb-default-system-save-directory))
            (require 'semantic/db-ebrowse)
            (semanticdb-load-ebrowse-caches)))
-       (add-hook 'mode-local-init-hook 'semantic-new-buffer-fcn)
+       (add-hook 'mode-local-init-hook #'semantic-new-buffer-fcn)
        ;; Add semantic-ia-complete-symbol to
        ;; completion-at-point-functions, so that it is run from
        ;; M-TAB.
@@ -1037,11 +1037,11 @@ Semantic mode.
        ;; Note: The first entry added is the last entry run, so the
        ;;       most specific entry should be last.
        (add-hook 'completion-at-point-functions
-                 'semantic-analyze-nolongprefix-completion-at-point-function)
+                 #'semantic-analyze-nolongprefix-completion-at-point-function)
        (add-hook 'completion-at-point-functions
-                 'semantic-analyze-notc-completion-at-point-function)
+                 #'semantic-analyze-notc-completion-at-point-function)
        (add-hook 'completion-at-point-functions
-                 'semantic-analyze-completion-at-point-function)
+                 #'semantic-analyze-completion-at-point-function)
 
        (if (bound-and-true-p global-ede-mode)
            (define-key cedet-menu-map [cedet-menu-separator] '("--")))
@@ -1052,21 +1052,21 @@ Semantic mode.
     ;; introduced in the buffer is pretty much futile, but we have to
     ;; clean the hooks and delete Semantic-related overlays, so that
     ;; Semantic can be re-activated cleanly.
-    (remove-hook 'mode-local-init-hook 'semantic-new-buffer-fcn)
+    (remove-hook 'mode-local-init-hook #'semantic-new-buffer-fcn)
     (remove-hook 'completion-at-point-functions
-                'semantic-analyze-completion-at-point-function)
+                #'semantic-analyze-completion-at-point-function)
     (remove-hook 'completion-at-point-functions
-                'semantic-analyze-notc-completion-at-point-function)
+                #'semantic-analyze-notc-completion-at-point-function)
     (remove-hook 'completion-at-point-functions
-                'semantic-analyze-nolongprefix-completion-at-point-function)
+                #'semantic-analyze-nolongprefix-completion-at-point-function)
 
     (remove-hook 'after-change-functions
-                'semantic-change-function)
+                #'semantic-change-function)
     (define-key cedet-menu-map [cedet-menu-separator] nil)
     (define-key cedet-menu-map [semantic-options-separator] nil)
     ;; FIXME: handle semanticdb-load-ebrowse-caches
     (dolist (mode semantic-submode-list)
-      (if (and (boundp mode) (eval mode))
+      (if (and (boundp mode) (symbol-value mode))
          (funcall mode -1)))
     ;; Unlink buffer and clear cache
     (semantic--tag-unlink-cache-from-buffer)
diff --git a/lisp/cedet/semantic/grammar.el b/lisp/cedet/semantic/grammar.el
index ca7c273..8d8faac 100644
--- a/lisp/cedet/semantic/grammar.el
+++ b/lisp/cedet/semantic/grammar.el
@@ -1740,7 +1740,7 @@ If it is a macro name, return a description of the 
associated expander
 function parameter list.
 If it is a function name, return a description of this function
 parameter list.
-It it is a variable name, return a brief (one-line) documentation
+If it is a variable name, return a brief (one-line) documentation
 string for the variable.
 If a default description of the current context can be obtained,
 return it.
diff --git a/lisp/cedet/semantic/idle.el b/lisp/cedet/semantic/idle.el
index 0f99747..9df9778 100644
--- a/lisp/cedet/semantic/idle.el
+++ b/lisp/cedet/semantic/idle.el
@@ -348,54 +348,56 @@ Returns t if all processing succeeded."
 Visits Semantic controlled buffers, and makes sure all needed
 include files have been parsed, and that the typecache is up to date.
 Uses `semantic-idle-work-for-on-buffer' to do the work."
-  (let ((errbuf nil)
-       (interrupted
-        (semantic-exit-on-input 'idle-work-timer
-          (let* ((inhibit-quit nil)
-                 (cb (current-buffer))
-                 (buffers (delq (current-buffer)
-                                (delq nil
-                                      (mapcar #'(lambda (b)
-                                                  (and (buffer-file-name b)
-                                                       b))
-                                              (buffer-list)))))
-                 safe errbuf)
-            ;; First, handle long tasks in the current buffer.
-            (when (semantic-idle-scheduler-enabled-p)
-              (save-excursion
-                (setq safe (semantic-idle-work-for-one-buffer (current-buffer))
-                      )))
-            (when (not safe) (push (current-buffer) errbuf))
-
-            ;; Now loop over other buffers with same major mode, trying to
-            ;; update them as well.  Stop on keypress.
-            (dolist (b buffers)
-              (semantic-throw-on-input 'parsing-mode-buffers)
-              (with-current-buffer b
-                (when (semantic-idle-scheduler-enabled-p)
-                  (and (semantic-idle-scheduler-enabled-p)
-                       (unless (semantic-idle-work-for-one-buffer 
(current-buffer))
-                         (push (current-buffer) errbuf)))
-                  ))
-              )
-
-            (when (and (featurep 'semantic/db) (semanticdb-minor-mode-p))
-              ;; Save everything.
-              (semanticdb-save-all-db-idle)
-
-              ;; Parse up files near our active buffer
-              (when semantic-idle-work-parse-neighboring-files-flag
-                (semantic-safe "Idle Work Parse Neighboring Files: %S"
-                  (set-buffer cb)
-                  (semantic-idle-scheduler-work-parse-neighboring-files))
-                t)
+  (let*
+      ((errbuf nil)
+       (interrupted
+       (semantic-exit-on-input 'idle-work-timer
+         (let* ((inhibit-quit nil)
+                (cb (current-buffer))
+                (buffers (delq (current-buffer)
+                               (delq nil
+                                     (mapcar #'(lambda (b)
+                                                 (and (buffer-file-name b)
+                                                      b))
+                                             (buffer-list)))))
+                safe) ;; errbuf
+           ;; First, handle long tasks in the current buffer.
+           (when (semantic-idle-scheduler-enabled-p)
+             (save-excursion
+               (setq safe (semantic-idle-work-for-one-buffer (current-buffer))
+                     )))
+           (when (not safe) (push (current-buffer) errbuf))
+
+           ;; Now loop over other buffers with same major mode, trying to
+           ;; update them as well.  Stop on keypress.
+           (dolist (b buffers)
+             (semantic-throw-on-input 'parsing-mode-buffers)
+             (with-current-buffer b
+               (when (semantic-idle-scheduler-enabled-p)
+                 (and (semantic-idle-scheduler-enabled-p)
+                      (unless (semantic-idle-work-for-one-buffer
+                               (current-buffer))
+                        (push (current-buffer) errbuf)))
+                 ))
+             )
 
-              ;; Save everything... again
-              (semanticdb-save-all-db-idle)
-              )
+           (when (and (featurep 'semantic/db) (semanticdb-minor-mode-p))
+             ;; Save everything.
+             (semanticdb-save-all-db-idle)
+
+             ;; Parse up files near our active buffer
+             (when semantic-idle-work-parse-neighboring-files-flag
+               (semantic-safe "Idle Work Parse Neighboring Files: %S"
+                 (set-buffer cb)
+                 (semantic-idle-scheduler-work-parse-neighboring-files))
+               t)
+
+             ;; Save everything... again
+             (semanticdb-save-all-db-idle)
+             )
 
-            ;; Done w/ processing
-            nil))))
+           ;; Done w/ processing
+           nil))))
 
     ;; Done
     (if interrupted
@@ -734,7 +736,8 @@ Call `semantic-idle-summary-current-symbol-info' for 
getting the
 current tag to display information."
   (or (eq major-mode 'emacs-lisp-mode)
       (not (semantic-idle-summary-useful-context-p))
-      (let* ((found (semantic-idle-summary-current-symbol-info))
+      (let* ((found (save-excursion
+                      (semantic-idle-summary-current-symbol-info)))
              (str (cond ((stringp found) found)
                         ((semantic-tag-p found)
                          (funcall semantic-idle-summary-function
diff --git a/lisp/cedet/semantic/scope.el b/lisp/cedet/semantic/scope.el
index 6bd04b2..2d806e5 100644
--- a/lisp/cedet/semantic/scope.el
+++ b/lisp/cedet/semantic/scope.el
@@ -562,7 +562,7 @@ such as `public' or `private'."
           ;; @TODO - is this line needed??  Try w/out for a while
           ;; @note - I think C++ says no.  elisp might, but methods
           ;;         look like defuns, so it makes no difference.
-          (extmeth nil) ; (semantic-tag-external-member-children type t))
+          ;;(extmeth nil) ; (semantic-tag-external-member-children type t))
 
           ;; INHERITED are tags found in classes that our TYPE tag
           ;; inherits from.  Do not do this if it was not requested.
@@ -584,7 +584,7 @@ such as `public' or `private'."
          (setq slots (nreverse copyslots))
          ))
       ;; Flatten the database output.
-      (append slots extmeth inherited)
+      (append slots nil inherited) ;; extmeth
       )))
 
 (defun semantic-analyze-scoped-inherited-tags (type scope access)
diff --git a/lisp/cedet/semantic/wisent/comp.el 
b/lisp/cedet/semantic/wisent/comp.el
index 5749220..ae0823e 100644
--- a/lisp/cedet/semantic/wisent/comp.el
+++ b/lisp/cedet/semantic/wisent/comp.el
@@ -54,15 +54,16 @@
 ;; bound locally, without all these "reference to free variable"
 ;; compiler warnings!
 
-(defmacro wisent-context-name (name)
-  "Return the context name from NAME."
-  `(if (and ,name (symbolp ,name))
-       (intern (format "wisent-context-%s" ,name))
-     (error "Invalid context name: %S" ,name)))
+(eval-when-compile
+  (defun wisent-context-name (name)
+    "Return the context name from NAME."
+    (if (and name (symbolp name))
+        (intern (format "wisent-context-%s" name))
+      (error "Invalid context name: %S" name)))
 
-(defmacro wisent-context-bindings (name)
-  "Return the variables in context NAME."
-  `(symbol-value (wisent-context-name ,name)))
+  (defun wisent-context-bindings (name)
+    "Return the variables in context NAME."
+    (symbol-value (wisent-context-name name))))
 
 (defmacro wisent-defcontext (name &rest vars)
   "Define a context NAME that will bind variables VARS."
@@ -71,18 +72,14 @@
          (declarations (mapcar #'(lambda (v) (list 'defvar v)) vars)))
     `(progn
        ,@declarations
-       (eval-and-compile
+       (eval-when-compile
          (defvar ,context ',vars)))))
 
 (defmacro wisent-with-context (name &rest body)
   "Bind variables in context NAME then eval BODY."
   (declare (indent 1))
-  (let ((bindings (wisent-context-bindings name)))
-    `(progn
-       ,@(mapcar (lambda (binding) `(defvar ,(or (car-safe binding) binding)))
-                 bindings)
-       (let* ,bindings
-         ,@body))))
+  `(dlet ,(wisent-context-bindings name)
+     ,@body))
 
 ;; Other utilities
 
diff --git a/lisp/doc-view.el b/lisp/doc-view.el
index f6fcfae..cef0900 100644
--- a/lisp/doc-view.el
+++ b/lisp/doc-view.el
@@ -1439,6 +1439,8 @@ ARGS is a list of image descriptors."
                            (apply #'create-image file doc-view--image-type nil 
args)
                          (unless (member :width args)
                            (setq args `(,@args :width ,doc-view-image-width)))
+                          (unless (member :transform-smoothing args)
+                            (setq args `(,@args :transform-smoothing t)))
                          (apply #'create-image file doc-view--image-type nil 
args))))
             (slice (doc-view-current-slice))
             (img-width (and image (car (image-size image))))
diff --git a/lisp/emacs-lisp/benchmark.el b/lisp/emacs-lisp/benchmark.el
index 14bc281..2a3efbe 100644
--- a/lisp/emacs-lisp/benchmark.el
+++ b/lisp/emacs-lisp/benchmark.el
@@ -62,7 +62,8 @@ See also `benchmark-run-compiled'."
                  ;; Take account of the loop overhead.
                  `(- (benchmark-elapse (dotimes (,i ,repetitions)
                                          ,@forms))
-                     (benchmark-elapse (dotimes (,i ,repetitions))))
+                     (benchmark-elapse (dotimes (,i ,repetitions)
+                                          nil)))
                `(benchmark-elapse ,@forms))
             (- gcs-done ,gcs)
             (- gc-elapsed ,gc)))))
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el
index b332581..db8d825 100644
--- a/lisp/emacs-lisp/byte-opt.el
+++ b/lisp/emacs-lisp/byte-opt.el
@@ -1327,6 +1327,8 @@ Same format as `byte-optimize--lexvars', with shared 
structure and contents.")
         radians-to-degrees rassq rassoc read-from-string regexp-opt
          regexp-quote region-beginning region-end reverse round
         sin sqrt string string< string= string-equal string-lessp
+         string> string-greaterp string-empty-p
+         string-prefix-p string-suffix-p string-blank-p
          string-search string-to-char
         string-to-number string-to-syntax substring
         sxhash sxhash-equal sxhash-eq sxhash-eql
diff --git a/lisp/emacs-lisp/cconv.el b/lisp/emacs-lisp/cconv.el
index bd0a3e8..afaa13a 100644
--- a/lisp/emacs-lisp/cconv.el
+++ b/lisp/emacs-lisp/cconv.el
@@ -295,8 +295,9 @@ of converted forms."
     (if wrappers
         (let ((special-forms '()))
           ;; Keep special forms at the beginning of the body.
-          (while (or (stringp (car funcbody)) ;docstring.
-                     (memq (car-safe (car funcbody)) '(interactive declare)))
+          (while (or (and (cdr funcbody) (stringp (car funcbody))) ;docstring.
+                     (memq (car-safe (car funcbody))
+                           '(interactive declare :documentation)))
             (push (pop funcbody) special-forms))
           (let ((body (macroexp-progn funcbody)))
             (dolist (wrapper wrappers) (setq body (funcall wrapper body)))
@@ -584,9 +585,6 @@ places where they originally did not directly appear."
 
     (_ (or (cdr (assq form env)) form))))
 
-(unless (fboundp 'byte-compile-not-lexical-var-p)
-  ;; Only used to test the code in non-lexbind Emacs.
-  (defalias 'byte-compile-not-lexical-var-p 'boundp))
 (defvar byte-compile-lexical-variables)
 
 (defun cconv--analyze-use (vardata form varkind)
@@ -602,7 +600,14 @@ FORM is the parent form that binds this var."
      ;; FIXME: Convert this warning to use `macroexp--warn-wrap'
      ;; so as to give better position information.
      (byte-compile-warn
-      "%s `%S' not left unused" varkind var)))
+      "%s `%S' not left unused" varkind var))
+    ((and (let (or 'let* 'let) (car form))
+          `((,var) ;; (or `(,var nil) : Too many false positives: bug#47080
+            t nil ,_ ,_))
+     ;; FIXME: Convert this warning to use `macroexp--warn-wrap'
+     ;; so as to give better position information.
+     (unless (not (intern-soft var))
+       (byte-compile-warn "Variable `%S' left uninitialized" var))))
   (pcase vardata
     (`(,binder nil ,_ ,_ nil)
      (push (cons (cons binder form) :unused) cconv-var-classification))
@@ -783,7 +788,7 @@ This function does not return anything but instead fills the
      (let ((dv (assq form env)))        ; dv = declared and visible
        (when dv
          (setf (nth 1 dv) t))))))
-(define-obsolete-function-alias 'cconv-analyse-form 'cconv-analyze-form "25.1")
+(define-obsolete-function-alias 'cconv-analyse-form #'cconv-analyze-form 
"25.1")
 
 (provide 'cconv)
 ;;; cconv.el ends here
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el
index ee2e774..6285166 100644
--- a/lisp/emacs-lisp/checkdoc.el
+++ b/lisp/emacs-lisp/checkdoc.el
@@ -2134,8 +2134,8 @@ buffer, otherwise stop after the first error."
       (user-error "No spellchecker installed: check the variable 
`ispell-program-name'"))
     (save-excursion
       (skip-chars-forward "^a-zA-Z")
-      (let (word sym case-fold-search err word-beginning word-end)
-        (while (and (not err) (< (point) end))
+      (let (word sym case-fold-search word-beginning word-end) ;; err
+        (while (and (< (point) end)) ;; (not err)
           (if (save-excursion (forward-char -1) (looking-at "[('`]"))
               ;; Skip lists describing meta-syntax, or bound variables
               (forward-sexp 1)
@@ -2167,7 +2167,7 @@ buffer, otherwise stop after the first error."
                           (sit-for 0)
                           (message "Continuing..."))))))))
           (skip-chars-forward "^a-zA-Z"))
-        err))))
+        nil)))) ;; err
 
 ;;; Rogue space checking engine
 ;;
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index 4a9e580..addb58c 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -332,12 +332,20 @@ or call the function `%s'."))))
                    t)))
            ;; Keep minor modes list up to date.
            ,@(if globalp
-                 `((setq global-minor-modes (delq ',modefun 
global-minor-modes))
+                 ;; When running this byte-compiled code in earlier
+                 ;; Emacs versions, these variables may not be defined
+                 ;; there.  So check defensively, even if they're
+                 ;; always defined in Emacs 28 and up.
+                 `((when (boundp 'global-minor-modes)
+                     (setq global-minor-modes
+                           (delq ',modefun global-minor-modes))
+                     (when ,getter
+                       (push ',modefun global-minor-modes))))
+               ;; Ditto check.
+               `((when (boundp 'local-minor-modes)
+                   (setq local-minor-modes (delq ',modefun local-minor-modes))
                    (when ,getter
-                     (push ',modefun global-minor-modes)))
-               `((setq local-minor-modes (delq ',modefun local-minor-modes))
-                 (when ,getter
-                   (push ',modefun local-minor-modes))))
+                     (push ',modefun local-minor-modes)))))
            ,@body
            ;; The on/off hooks are here for backward compatibility only.
            (run-hooks ',hook (if ,getter ',hook-on ',hook-off))
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index 6f3c7d6..f1455ff 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -3508,7 +3508,7 @@ canceled the first time the function is entered."
 
 (defun edebug-cancel-on-entry (function)
   "Cause Edebug to not stop when FUNCTION is called.
-The removes the effect of `edebug-on-entry'.  If FUNCTION is is
+The removes the effect of `edebug-on-entry'.  If FUNCTION is
 nil, remove `edebug-on-entry' on all functions."
   (interactive
    (list (let ((name (completing-read
diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el
index 155b6a9..e91ec0a 100644
--- a/lisp/emacs-lisp/ert.el
+++ b/lisp/emacs-lisp/ert.el
@@ -261,7 +261,7 @@ DATA is displayed to the user and should state the reason 
for skipping."
 It should only be stopped when ran from inside ert--run-test-internal."
   (when (and (not (symbolp debugger))   ; only run on anonymous debugger
              (memq error-symbol '(ert-test-failed ert-test-skipped)))
-    (funcall debugger 'error (list error-symbol data))))
+    (funcall debugger 'error (cons error-symbol data))))
 
 (defun ert--special-operator-p (thing)
   "Return non-nil if THING is a symbol naming a special operator."
@@ -1633,7 +1633,7 @@ default (if any)."
 
 (defun ert-find-test-other-window (test-name)
   "Find, in another window, the definition of TEST-NAME."
-  (interactive (list (ert-read-test-name-at-point "Find test definition: ")))
+  (interactive (list (ert-read-test-name-at-point "Find test definition")))
   (find-function-do-it test-name 'ert--test 'switch-to-buffer-other-window))
 
 (defun ert-delete-test (test-name)
@@ -2083,6 +2083,7 @@ and how to display message."
 
 (define-derived-mode ert-results-mode special-mode "ERT-Results"
   "Major mode for viewing results of ERT test runs."
+  :interactive nil
   (setq-local revert-buffer-function
               (lambda (&rest _) (ert-results-rerun-all-tests))))
 
@@ -2178,7 +2179,7 @@ To be used in the ERT results buffer."
   "Move point to the next test.
 
 To be used in the ERT results buffer."
-  (interactive)
+  (interactive nil ert-results-mode)
   (ert--results-move (ewoc-locate ert--results-ewoc) 'ewoc-next
                      "No tests below"))
 
@@ -2186,7 +2187,7 @@ To be used in the ERT results buffer."
   "Move point to the previous test.
 
 To be used in the ERT results buffer."
-  (interactive)
+  (interactive nil ert-results-mode)
   (ert--results-move (ewoc-locate ert--results-ewoc) 'ewoc-prev
                      "No tests above"))
 
@@ -2219,7 +2220,7 @@ user-error is signaled with the message ERROR-MESSAGE."
   "Find the definition of the test at point in another window.
 
 To be used in the ERT results buffer."
-  (interactive)
+  (interactive nil ert-results-mode)
   (let ((name (ert-test-at-point)))
     (unless name
       (user-error "No test at point"))
@@ -2253,7 +2254,7 @@ To be used in the ERT results buffer."
   ;; the summary apparently needs to be easily accessible from the
   ;; error log, and perhaps it would be better to have it in a
   ;; separate buffer to keep it visible.
-  (interactive)
+  (interactive nil ert-results-mode)
   (let ((ewoc ert--results-ewoc)
         (progress-bar-begin ert--results-progress-bar-button-begin))
     (cond ((ert--results-test-node-or-null-at-point)
@@ -2370,7 +2371,7 @@ definition."
   "Re-run all tests, using the same selector.
 
 To be used in the ERT results buffer."
-  (interactive)
+  (interactive nil ert-results-mode)
   (cl-assert (eql major-mode 'ert-results-mode))
   (let ((selector (ert--stats-selector ert--results-stats)))
     (ert-run-tests-interactively selector (buffer-name))))
@@ -2379,7 +2380,7 @@ To be used in the ERT results buffer."
   "Re-run the test at point.
 
 To be used in the ERT results buffer."
-  (interactive)
+  (interactive nil ert-results-mode)
   (cl-destructuring-bind (test redefinition-state)
       (ert--results-test-at-point-allow-redefinition)
     (when (null test)
@@ -2414,7 +2415,7 @@ To be used in the ERT results buffer."
   "Re-run the test at point with `ert-debug-on-error' bound to t.
 
 To be used in the ERT results buffer."
-  (interactive)
+  (interactive nil ert-results-mode)
   (let ((ert-debug-on-error t))
     (ert-results-rerun-test-at-point)))
 
@@ -2422,7 +2423,7 @@ To be used in the ERT results buffer."
   "Display the backtrace for the test at point.
 
 To be used in the ERT results buffer."
-  (interactive)
+  (interactive nil ert-results-mode)
   (let* ((test (ert--results-test-at-point-no-redefinition t))
          (stats ert--results-stats)
          (pos (ert--stats-test-pos stats test))
@@ -2449,7 +2450,7 @@ To be used in the ERT results buffer."
   "Display the part of the *Messages* buffer generated during the test at 
point.
 
 To be used in the ERT results buffer."
-  (interactive)
+  (interactive nil ert-results-mode)
   (let* ((test (ert--results-test-at-point-no-redefinition t))
          (stats ert--results-stats)
          (pos (ert--stats-test-pos stats test))
@@ -2470,7 +2471,7 @@ To be used in the ERT results buffer."
   "Display the list of `should' forms executed during the test at point.
 
 To be used in the ERT results buffer."
-  (interactive)
+  (interactive nil ert-results-mode)
   (let* ((test (ert--results-test-at-point-no-redefinition t))
          (stats ert--results-stats)
          (pos (ert--stats-test-pos stats test))
@@ -2506,7 +2507,7 @@ To be used in the ERT results buffer."
   "Toggle how much of the condition to print for the test at point.
 
 To be used in the ERT results buffer."
-  (interactive)
+  (interactive nil ert-results-mode)
   (let* ((ewoc ert--results-ewoc)
          (node (ert--results-test-node-at-point))
          (entry (ewoc-data node)))
@@ -2518,7 +2519,7 @@ To be used in the ERT results buffer."
   "Display test timings for the last run.
 
 To be used in the ERT results buffer."
-  (interactive)
+  (interactive nil ert-results-mode)
   (let* ((stats ert--results-stats)
          (buffer (get-buffer-create "*ERT timings*"))
          (data (cl-loop for test across (ert--stats-tests stats)
@@ -2597,7 +2598,7 @@ To be used in the ERT results buffer."
   "Display the documentation of the test at point.
 
 To be used in the ERT results buffer."
-  (interactive)
+  (interactive nil ert-results-mode)
   (ert-describe-test (ert--results-test-at-point-no-redefinition t)))
 
 
diff --git a/lisp/emacs-lisp/gv.el b/lisp/emacs-lisp/gv.el
index 3d80549..ce48e57 100644
--- a/lisp/emacs-lisp/gv.el
+++ b/lisp/emacs-lisp/gv.el
@@ -324,8 +324,7 @@ The return value is the last VAL in the list.
        (gv-letplace (getter setter) place
          (funcall do `(edebug-after ,before ,index ,getter)
                   (lambda (store)
-                    `(progn (edebug-after ,before ,index ,getter)
-                            ,(funcall setter store)))))))
+                    `(edebug-after ,before ,index ,(funcall setter store)))))))
 
 ;;; The common generalized variables.
 
diff --git a/lisp/emacs-lisp/syntax.el b/lisp/emacs-lisp/syntax.el
index bee2f96..6d5b04b 100644
--- a/lisp/emacs-lisp/syntax.el
+++ b/lisp/emacs-lisp/syntax.el
@@ -290,12 +290,13 @@ all RULES in total."
                                     ',(string-to-syntax (nth 1 action)))
                                    ,@(nthcdr 2 action))
                                `((let ((mb (match-beginning ,gn))
-                                       (me (match-end ,gn))
-                                       (syntax ,(nth 1 action)))
-                                   (if syntax
-                                       (put-text-property
-                                        mb me 'syntax-table syntax))
-                                   ,@(nthcdr 2 action)))))
+                                       (me (match-end ,gn)))
+                                   ,(macroexp-let2 nil syntax (nth 1 action)
+                                      `(progn
+                                         (if ,syntax
+                                             (put-text-property
+                                              mb me 'syntax-table ,syntax))
+                                         ,@(nthcdr 2 action)))))))
                             (t
                              `((let ((mb (match-beginning ,gn))
                                      (me (match-end ,gn))
diff --git a/lisp/emacs-lisp/tcover-ses.el b/lisp/emacs-lisp/tcover-ses.el
index 12b0dcf..d9db1d3 100644
--- a/lisp/emacs-lisp/tcover-ses.el
+++ b/lisp/emacs-lisp/tcover-ses.el
@@ -32,8 +32,8 @@
 
 ;;;Here are some macros that exercise SES.  Set `pause' to t if you want the
 ;;;macros to pause after each step.
-(let* ((pause nil)
-       (x (if pause "\^Xq" ""))
+(let* (;; (pause nil)
+       (x (if nil "\^Xq" "")) ;; pause
        (y "\^X\^Fses-test.ses\r\^[<"))
   ;;Fiddle with the existing spreadsheet
   (fset 'ses-exercise-example
diff --git a/lisp/emulation/cua-rect.el b/lisp/emulation/cua-rect.el
index e66050b..0039092 100644
--- a/lisp/emulation/cua-rect.el
+++ b/lisp/emulation/cua-rect.el
@@ -46,7 +46,7 @@ A cua-rectangle definition is a vector used for all actions in
 
 TOP is the upper-left corner point.
 
-BOTTOM is the point at the end of line after the the lower-right
+BOTTOM is the point at the end of line after the lower-right
 corner point.
 
 LEFT and RIGHT are column numbers.
diff --git a/lisp/emulation/edt.el b/lisp/emulation/edt.el
index b8dea2f..8f90ed2 100644
--- a/lisp/emulation/edt.el
+++ b/lisp/emulation/edt.el
@@ -635,8 +635,7 @@ Argument NUM is the number of lines to move."
 
 (defmacro edt-with-position (&rest body)
   "Execute BODY with some position-related variables bound."
-  `(let* ((left nil)
-          (beg (edt-current-line))
+  `(let* ((beg (edt-current-line))
           (height (window-height))
           (top-percent
            (if (zerop edt-top-scroll-margin) 10 edt-top-scroll-margin))
@@ -650,7 +649,7 @@ Argument NUM is the number of lines to move."
           (far (save-excursion
                  (goto-char bottom)
                  (point-at-bol (1- height)))))
-     (ignore top left far)
+     (ignore top far)
      ,@body))
 
 ;;;
@@ -668,9 +667,10 @@ Optional argument FIND is t is this function is called 
from `edt-find'."
      (search-backward edt-find-last-text)
      (edt-set-match)
      (if (> (point) far)
-         (if (zerop (setq left (save-excursion (forward-line height))))
-             (recenter top-margin)
-           (recenter (- left bottom-up-margin)))
+         (let ((left (save-excursion (forward-line height))))
+           (recenter (if (zerop left)
+                         top-margin
+                       (- left bottom-up-margin))))
        (and (> (point) bottom) (recenter bottom-margin))))))
 
 (defun edt-find-backward (&optional find)
@@ -707,9 +707,9 @@ Optional argument FIND is t if this function is called from 
`edt-find'."
          (search-backward edt-find-last-text)
          (edt-set-match)
          (if (> (point) far)
-             (if (zerop (setq left (save-excursion (forward-line height))))
-                 (recenter top-margin)
-               (recenter (- left bottom-up-margin)))
+             (let ((left (save-excursion (forward-line height))))
+               (recenter (if (zerop left) top-margin
+                           (- left bottom-up-margin))))
            (and (> (point) bottom) (recenter bottom-margin))))
      (backward-char 1)
      (error "Search failed: \"%s\"" edt-find-last-text))))
@@ -1241,9 +1241,8 @@ Argument NUM is the positive number of sentences to move."
      (forward-word 1)
      (backward-sentence))
    (if (> (point) far)
-       (if (zerop (setq left (save-excursion (forward-line height))))
-           (recenter top-margin)
-         (recenter (- left bottom-up-margin)))
+       (let ((left (save-excursion (forward-line height))))
+         (recenter (if (zerop left) top-margin (- left bottom-up-margin))))
      (and (> (point) bottom) (recenter bottom-margin)))))
 
 (defun edt-sentence-backward (num)
@@ -1282,9 +1281,8 @@ Argument NUM is the positive number of paragraphs to 
move."
          (forward-line 1))
      (setq num (1- num)))
    (if (> (point) far)
-       (if (zerop (setq left (save-excursion (forward-line height))))
-           (recenter top-margin)
-         (recenter (- left bottom-up-margin)))
+       (let ((left (save-excursion (forward-line height))))
+         (recenter (if (zerop left) top-margin (- left bottom-up-margin))))
      (and (> (point) bottom) (recenter bottom-margin)))))
 
 (defun edt-paragraph-backward (num)
diff --git a/lisp/erc/erc-menu.el b/lisp/erc/erc-menu.el
index 0e334e9..d76e0a3 100644
--- a/lisp/erc/erc-menu.el
+++ b/lisp/erc/erc-menu.el
@@ -110,11 +110,11 @@ ERC menu yet.")
 (define-erc-module menu nil
   "Enable a menu in ERC buffers."
   ((unless erc-menu-defined
-     ;; make sure the menu only gets defined once, since Emacs 22
+     ;; make sure the menu only gets defined once, since Emacs
      ;; activates it immediately
      (easy-menu-define erc-menu erc-mode-map "ERC menu" erc-menu-definition)
      (setq erc-menu-defined t)))
-  (;; `easy-menu-remove' is a no-op in Emacs 22
+  (;; `easy-menu-remove' is a no-op in Emacs
    (message "You might have to restart Emacs to remove the ERC menu")))
 
 (defun erc-menu-add ()
diff --git a/lisp/eshell/em-ls.el b/lisp/eshell/em-ls.el
index e942ae2..3d7c43b 100644
--- a/lisp/eshell/em-ls.el
+++ b/lisp/eshell/em-ls.el
@@ -680,12 +680,12 @@ Each member of FILES is either a string or a cons cell of 
the form
     (let ((f files)
          last-f
          display-files
-         ignore)
+         ) ;; ignore
       (while f
        (if (cdar f)
            (setq last-f f
                  f (cdr f))
-         (unless ignore
+         (unless nil ;; ignore
            (funcall error-func
                     (format "%s: No such file or directory\n" (caar f))))
          (if (eq f files)
@@ -698,7 +698,7 @@ Each member of FILES is either a string or a cons cell of 
the form
              (setcar f (cadr f))
              (setcdr f (cddr f))))))
       (if (not show-size)
-         (setq display-files (mapcar 'eshell-ls-annotate files))
+         (setq display-files (mapcar #'eshell-ls-annotate files))
        (dolist (file files)
          (let* ((str (eshell-ls-printable-size (file-attribute-size (cdr 
file)) t))
                 (len (length str)))
diff --git a/lisp/faces.el b/lisp/faces.el
index 3481c80..e0587d7 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -2817,11 +2817,18 @@ Note: Other faces cannot inherit from the cursor face."
   :group 'help)
 
 (defface help-key-binding
-  '((((class color) (min-colors 88) (background light)) :foreground 
"ForestGreen")
-    (((class color) (min-colors 88) (background dark)) :foreground "#44bc44")
-    (((class color grayscale) (background light)) :foreground "grey15")
-    (((class color grayscale) (background dark)) :foreground "grey85")
-    (t :foreground "ForestGreen"))
+  '((((class color) (min-colors 88) (background light))
+     :background "grey92" :foreground "DarkBlue"
+     ;; We use negative thickness of the horizontal box border line to
+     ;; avoid enlarging the height of the echo-area display, which
+     ;; would then move the mode line a few pixels up.
+     :box (:line-width (1 . -1) :color "grey80"))
+    (((class color) (min-colors 88) (background dark))
+     :background "grey23" :foreground "LightBlue"
+     :box (:line-width (1 . -1) :color "grey35"))
+    (((class color grayscale) (background light)) :background "grey90")
+    (((class color grayscale) (background dark)) :background "grey25")
+    (t :background "grey90"))
   "Face for keybindings in *Help* buffers.
 
 This face is added by `substitute-command-keys', which see.
diff --git a/lisp/files.el b/lisp/files.el
index e5fa1d8..2868be7 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -823,7 +823,9 @@ The path separator is colon in GNU and GNU-like systems."
          (expand-file-name dir))
     (locate-file dir cd-path nil
                  (lambda (f) (and (file-directory-p f) 'dir-ok)))
-    (error "No such directory found via CDPATH environment variable"))))
+    (if (getenv "CDPATH")
+        (error "No such directory found via CDPATH environment variable: %s" 
dir)
+      (error "No such directory: %s" dir)))))
 
 (defun directory-files-recursively (dir regexp
                                         &optional include-directories predicate
diff --git a/lisp/filesets.el b/lisp/filesets.el
index a51b6f8..8e9fae8 100644
--- a/lisp/filesets.el
+++ b/lisp/filesets.el
@@ -1183,7 +1183,7 @@ Return full path if FULL-FLAG is non-nil."
      (constraint-flag
       (message "Obsolete :constraint-flag %S, use :constraintp instead"
                (cadr constraint-flag))
-      (eval (cadr constraint-flag)))
+      (eval (cadr constraint-flag) t))
      (t
       t))))
 
@@ -1557,18 +1557,20 @@ Replace <file-name> or <<file-name>> with filename."
                    (completing-read "Select fileset: " filesets-data nil t))))
     (when (and cmd-name name)
       (let* ((event (if (equal cmd-name "Grep <<selection>>")
-                      'on-grep
+                       'on-grep
                      'on-cmd))
             (files (if (and fileset
-                            (or (equal mode ':ingroup)
-                                (equal mode ':tree)))
+                            (or (equal mode :ingroup)
+                                (equal mode :tree)))
                        (filesets-get-filelist fileset mode event)
-                    (filesets-get-filelist
-                     (filesets-get-fileset-from-name name)
-                     mode event))))
+                     (filesets-get-filelist
+                      (filesets-get-fileset-from-name name)
+                      mode event))))
        (when files
          (let ((fn   (filesets-cmd-get-fn cmd-name))
-               (args (filesets-cmd-get-args cmd-name)))
+               (args
+                (dlet ((filesets--files files))
+                  (filesets-cmd-get-args cmd-name))))
            (if (memq fn '(multi-isearch-files multi-isearch-files-regexp))
                (apply fn args)
              (dolist (this files nil)
@@ -1577,28 +1579,27 @@ Replace <file-name> or <<file-name>> with filename."
                    (let ((buffer (filesets-find-file this)))
                      (when buffer
                        (goto-char (point-min))
-                       (progn
-                         (cond
-                          ((stringp fn)
-                           (let* ((args
-                                   (mapconcat
-                                    (lambda (this)
-                                      (filesets-run-cmd--repl-fn
-                                                      this
-                                                      (lambda (this)
-                                                        (format "%s" this))))
-                                    args
-                                    " "))
-                                  (cmd (concat fn " " args)))
-                             (filesets-cmd-show-result
-                              cmd (shell-command-to-string cmd))))
-                          ((symbolp fn)
-                           (apply fn
-                                  (mapcan (lambda (this)
-                                            (filesets-run-cmd--repl-fn
-                                             this
-                                             'list))
-                                          args)))))))))))))))))
+                       (cond
+                        ((stringp fn)
+                         (let* ((args
+                                 (mapconcat
+                                  (lambda (this)
+                                    (filesets-run-cmd--repl-fn
+                                     this
+                                     (lambda (this)
+                                       (format "%s" this))))
+                                  args
+                                  " "))
+                                (cmd (concat fn " " args)))
+                           (filesets-cmd-show-result
+                            cmd (shell-command-to-string cmd))))
+                        ((symbolp fn)
+                         (apply fn
+                                (mapcan (lambda (this)
+                                          (filesets-run-cmd--repl-fn
+                                           this
+                                           'list))
+                                        args))))))))))))))))
 
 (defun filesets-get-cmd-menu ()
   "Create filesets command menu."
@@ -1624,7 +1625,7 @@ Replace <file-name> or <<file-name>> with filename."
 
 (defun filesets-cmd-isearch-getargs ()
   "Get arguments for `multi-isearch-files' and `multi-isearch-files-regexp'."
-  (and (boundp 'files) (list files)))
+  (and (boundp 'filesets--files) (list filesets--files)))
 
 (defun filesets-cmd-shell-command-getargs ()
   "Get arguments for `filesets-cmd-shell-command'."
diff --git a/lisp/gnus/gnus-kill.el b/lisp/gnus/gnus-kill.el
index b0e6cb5..f73627a 100644
--- a/lisp/gnus/gnus-kill.el
+++ b/lisp/gnus/gnus-kill.el
@@ -337,7 +337,7 @@ Returns the number of articles marked as read."
                           (gnus-newsgroup-kill-file gnus-newsgroup-name)))
         (unreads (length gnus-newsgroup-unreads))
         (gnus-summary-inhibit-highlight t)
-        beg)
+        ) ;; beg
     (setq gnus-newsgroup-kill-headers nil)
     ;; If there are any previously scored articles, we remove these
     ;; from the `gnus-newsgroup-headers' list that the score functions
@@ -381,7 +381,7 @@ Returns the number of articles marked as read."
 
       (gnus-set-mode-line 'summary)
 
-      (if beg
+      (if nil ;; beg
          (let ((nunreads (- unreads (length gnus-newsgroup-unreads))))
            (or (eq nunreads 0)
                (gnus-message 6 "Marked %d articles as read" nunreads))
diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el
index 339bff9..61a1d67 100644
--- a/lisp/gnus/gnus-search.el
+++ b/lisp/gnus/gnus-search.el
@@ -549,7 +549,7 @@ structure.
 
 In the simplest case, they are simply consed together.  String
 KEY is converted to a symbol."
-  (let (return)
+  (let () ;; return
     (cond
      ((member key gnus-search-date-keys)
       (when (string= "after" key)
@@ -559,7 +559,7 @@ KEY is converted to a symbol."
       (setq value (gnus-search-query-parse-mark value)))
      ((string= "message-id" key)
       (setq key "id")))
-    (or return
+    (or nil ;; return
        (cons (intern key) value))))
 
 (defun gnus-search-query-parse-date (value &optional rel-date)
diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el
index a6b362e..44e97d5 100644
--- a/lisp/gnus/gnus-start.el
+++ b/lisp/gnus/gnus-start.el
@@ -1172,7 +1172,7 @@ for new groups, and subscribe the new groups as zombies."
                               gnus-check-new-newsgroups)
                          gnus-secondary-select-methods))))
         (groups 0)
-        group new-newsgroups got-new method hashtb
+        new-newsgroups got-new method hashtb ;; group
         gnus-override-subscribe-method)
     (unless gnus-killed-hashtb
       (gnus-make-hashtable-from-killed))
@@ -1203,14 +1203,14 @@ for new groups, and subscribe the new groups as 
zombies."
               (cond
                ((eq do-sub 'subscribe)
                 (cl-incf groups)
-                (puthash g-name group gnus-killed-hashtb)
+                (puthash g-name nil gnus-killed-hashtb) ;; group
                 (gnus-call-subscribe-functions
                  gnus-subscribe-options-newsgroup-method g-name))
                ((eq do-sub 'ignore)
                 nil)
                (t
                 (cl-incf groups)
-                (puthash g-name group gnus-killed-hashtb)
+                (puthash g-name nil gnus-killed-hashtb) ;; group
                 (if gnus-subscribe-hierarchical-interactive
                     (push g-name new-newsgroups)
                   (gnus-call-subscribe-functions
@@ -2378,6 +2378,11 @@ If FORCE is non-nil, the .newsrc file is read."
             (unless (gnus-yes-or-no-p (concat errmsg "; continue? "))
               (error "%s" errmsg)))))))))
 
+;; IIUC these 3 vars were used in older .newsrc files.
+(defvar gnus-killed-assoc)
+(defvar gnus-marked-assoc)
+(defvar gnus-newsrc-assoc)
+
 (defun gnus-read-newsrc-el-file (file)
   (let ((ding-file (concat file "d")))
     (when (file-exists-p ding-file)
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index ee74f01..97da550 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -6354,9 +6354,9 @@ The resulting hash table is returned, or nil if no Xrefs 
were found."
       ;; First peel off all invalid article numbers.
       (when active
        (let ((ids articles)
-             id first)
+             id) ;; first
          (while (setq id (pop ids))
-           (when (and first (> id (cdr active)))
+           (when nil ;; (and first (> id (cdr active)))
              ;; We'll end up in this situation in one particular
              ;; obscure situation.  If you re-scan a group and get
              ;; a new article that is cross-posted to a different
@@ -12741,7 +12741,7 @@ If REVERSE, save parts that do not match TYPE."
        ;; so we highlight the entire line instead.
        (when (= (+ to 2) from)
          (setq from beg)
-         (setq to end))
+         (setq to (1+ end)))
        (if gnus-newsgroup-selected-overlay
            ;; Move old overlay.
            (move-overlay
@@ -12796,7 +12796,7 @@ If REVERSE, save parts that do not match TYPE."
     (let ((face (funcall (gnus-summary-highlight-line-0))))
       (unless (eq face (gnus-get-text-property-excluding-characters-with-faces 
beg 'face))
        (gnus-put-text-property-excluding-characters-with-faces
-        beg (point-at-eol) 'face
+        beg (1+ (point-at-eol)) 'face
         (setq face (if (boundp face) (symbol-value face) face)))
        (when gnus-summary-highlight-line-function
          (funcall gnus-summary-highlight-line-function article face))))))
diff --git a/lisp/gnus/nnbabyl.el b/lisp/gnus/nnbabyl.el
index 3e6f9e8..5f486f4 100644
--- a/lisp/gnus/nnbabyl.el
+++ b/lisp/gnus/nnbabyl.el
@@ -323,7 +323,7 @@
   (nnbabyl-possibly-change-newsgroup group server)
   (nnmail-check-syntax)
   (let ((buf (current-buffer))
-       result beg)
+       result) ;; beg
     (and
      (nnmail-activate 'nnbabyl)
      (save-excursion
@@ -331,7 +331,7 @@
        (search-forward "\n\n" nil t)
        (forward-line -1)
        (save-excursion
-        (while (re-search-backward "^X-Gnus-Newsgroup: " beg t)
+        (while (re-search-backward "^X-Gnus-Newsgroup: " nil t) ;; beg
           (delete-region (point) (progn (forward-line 1) (point)))))
        (when nnmail-cache-accepted-message-ids
         (nnmail-cache-insert (nnmail-fetch-field "message-id")
diff --git a/lisp/gnus/nnfolder.el b/lisp/gnus/nnfolder.el
index 1dd784d..2de5b83 100644
--- a/lisp/gnus/nnfolder.el
+++ b/lisp/gnus/nnfolder.el
@@ -706,7 +706,7 @@ deleted.  Point is left where the deleted region was."
       (if dont-check
          (setq nnfolder-current-group group
                nnfolder-current-buffer nil)
-       (let (inf file)
+       (let (file) ;; inf
          ;; If we have to change groups, see if we don't already have
          ;; the folder in memory.  If we do, verify the modtime and
          ;; destroy the folder if needed so we can rescan it.
@@ -718,7 +718,7 @@ deleted.  Point is left where the deleted region was."
          ;; touched the file since last time.
          (when (and nnfolder-current-buffer
                     (not (gnus-buffer-live-p nnfolder-current-buffer)))
-           (setq nnfolder-buffer-alist (delq inf nnfolder-buffer-alist)
+           (setq nnfolder-buffer-alist (delq nil nnfolder-buffer-alist) ;; inf
                  nnfolder-current-buffer nil))
 
          (setq nnfolder-current-group group)
diff --git a/lisp/gnus/nnmh.el b/lisp/gnus/nnmh.el
index 231583f..0923b8e 100644
--- a/lisp/gnus/nnmh.el
+++ b/lisp/gnus/nnmh.el
@@ -503,6 +503,8 @@ as unread by Gnus.")
       (setcdr active (1+ (cdr active))))
     (cdr active)))
 
+(defvar nnmh-newsgroup-articles)
+
 (defun nnmh-update-gnus-unreads (group)
   ;; Go through the .nnmh-articles file and compare with the actual
   ;; articles in this folder.  The articles that are "new" will be
diff --git a/lisp/gnus/nnrss.el b/lisp/gnus/nnrss.el
index aa7c8e5..36b7af0 100644
--- a/lisp/gnus/nnrss.el
+++ b/lisp/gnus/nnrss.el
@@ -200,7 +200,7 @@ for decoding when the cdr that the data specify is not 
available.")
   (nnrss-possibly-change-group group server)
   (let ((e (assq article nnrss-group-data))
        (nntp-server-buffer (or buffer nntp-server-buffer))
-       err) ;; post
+       ) ;; err post
     (when e
       (with-current-buffer nntp-server-buffer
        (erase-buffer)
@@ -302,8 +302,7 @@ for decoding when the cdr that the data specify is not 
available.")
        (when nnrss-content-function
          (funcall nnrss-content-function e group article))))
     (cond
-     (err
-      (nnheader-report 'nnrss err))
+     ;; (err (nnheader-report 'nnrss err))
      ((not e)
       (nnheader-report 'nnrss "no such id: %d" article))
      (t
diff --git a/lisp/help.el b/lisp/help.el
index 94073e5..d4be9aa 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -210,7 +210,7 @@ Do not call this in the scope of `with-help-window'."
 \\[describe-key] KEYS      Display the full documentation for the key sequence.
 \\[Info-goto-emacs-key-command-node] KEYS      Show the Emacs manual's section 
for the command bound to KEYS.
 \\[view-lossage]           Show last 300 input keystrokes (lossage).
-\\[describe-language-environment] LANG-ENV  Describes a specific language 
environment, or RET for current.
+\\[describe-language-environment] LANG-ENV  Describe a specific language 
environment, or RET for current.
 \\[describe-mode]           Display documentation of current minor modes and 
current major mode,
              including their special commands.
 \\[view-emacs-news]           Display news of recent Emacs changes.
@@ -1253,7 +1253,7 @@ Return nil if the key sequence is too long."
   ;; Converted from describe_translation in keymap.c.
   ;; Avoid using the `help-keymap' face.
   (let ((op (point)))
-    (indent-to 16)
+    (indent-to 16 1)
     (set-text-properties op (point) '( face nil
                                       font-lock-face nil)))
   (cond ((symbolp definition)
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el
index 78ae270..b484dd7 100644
--- a/lisp/ibuffer.el
+++ b/lisp/ibuffer.el
@@ -2297,7 +2297,7 @@ buffers which are visiting a file."
 (defun ibuffer (&optional other-window-p name qualifiers noselect
                          shrink filter-groups formats)
   "Begin using Ibuffer to edit a list of buffers.
-Type `h' after entering ibuffer for more information.
+Type \\<ibuffer-mode-map>\\[describe-mode] after entering ibuffer for more 
information.
 
 All arguments are optional.
 OTHER-WINDOW-P says to use another window.
diff --git a/lisp/ido.el b/lisp/ido.el
index 3ed0d95..9362904 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -1746,7 +1746,7 @@ is enabled then some keybindings are changed in the 
keymap."
                       ido-max-file-prompt-width))
          (literal (and (boundp 'ido-find-literal) ido-find-literal "(literal) 
"))
          (vc-off (and ido-saved-vc-hb (not vc-handled-backends) "[-VC] "))
-         (prefix nil)
+         ;; (prefix nil)
          (rule ido-rewrite-file-prompt-rules))
       (let ((case-fold-search nil))
        (while rule
@@ -1762,7 +1762,7 @@ is enabled then some keybindings are changed in the 
keymap."
              ; (if ido-process-ignore-lists "" "&")
              (or literal "")
              (or vc-off  "")
-             (or prefix "")
+             ;; (or prefix "")
              (let ((l (length dirname)))
                (if (and max-width (> max-width 0) (> l max-width))
                    (let* ((s (substring dirname (- max-width)))
diff --git a/lisp/image-mode.el b/lisp/image-mode.el
index 7384abf..2de16cb 100644
--- a/lisp/image-mode.el
+++ b/lisp/image-mode.el
@@ -95,6 +95,9 @@ Its value should be one of the following:
 (defvar-local image-transform-rotation 0.0
   "Rotation angle for the image in the current Image mode buffer.")
 
+(defvar-local image--transform-smoothing nil
+  "Whether to use transform smoothing.")
+
 (defvar image-transform-right-angle-fudge 0.0001
   "Snap distance to a multiple of a right angle.
 There's no deep theory behind the default value, it should just
@@ -457,6 +460,7 @@ call."
     (define-key map "sb" 'image-transform-fit-both)
     (define-key map "ss" 'image-transform-set-scale)
     (define-key map "sr" 'image-transform-set-rotation)
+    (define-key map "sm" 'image-transform-set-smoothing)
     (define-key map "so" 'image-transform-original)
     (define-key map "s0" 'image-transform-reset)
 
@@ -523,6 +527,8 @@ call."
         :help "Rotate the image"]
        ["Set Rotation..." image-transform-set-rotation
         :help "Set rotation angle of the image"]
+        ["Set Smoothing..." image-transform-set-smoothing
+        :help "Toggle smoothing"]
        ["Original Size" image-transform-original
         :help "Reset image to actual size"]
        ["Reset to Default Size" image-transform-reset
@@ -1138,8 +1144,8 @@ replacing the current Image mode buffer."
       (funcall next))))
 
 (defun image-mode--directory-buffers (file)
-  "Return a alist of type/buffer for all \"parent\" buffers to image FILE.
-This is normally a list of dired buffers, but can also be archive and
+  "Return an alist of type/buffer for all \"parent\" buffers to image FILE.
+This is normally a list of Dired buffers, but can also be archive and
 tar mode buffers."
   (let ((buffers nil)
         (dir (file-name-directory file)))
@@ -1474,7 +1480,10 @@ return value is suitable for appending to an image spec."
        ,@(when (cdr resized)
            (list :height (cdr resized)))
        ,@(unless (= 0.0 image-transform-rotation)
-           (list :rotation image-transform-rotation))))))
+           (list :rotation image-transform-rotation))
+        ,@(when image--transform-smoothing
+            (list :transform-smoothing
+                  (string= image--transform-smoothing "smooth")))))))
 
 (defun image-transform-set-scale (scale)
   "Prompt for a number, and resize the current image by that amount."
@@ -1507,6 +1516,12 @@ ROTATION should be in degrees."
   (setq image-transform-rotation (float (mod rotation 360)))
   (image-toggle-display-image))
 
+(defun image-transform-set-smoothing (smoothing)
+  (interactive (list (completing-read "Smoothing: "
+                                      '("none" "smooth") nil t)))
+  (setq image--transform-smoothing smoothing)
+  (image-toggle-display-image))
+
 (defun image-transform-original ()
   "Display the current image with the original (actual) size and rotation."
   (interactive)
@@ -1519,7 +1534,8 @@ ROTATION should be in degrees."
   (interactive)
   (setq image-transform-resize image-auto-resize
        image-transform-rotation 0.0
-       image-transform-scale 1)
+       image-transform-scale 1
+        image--transform-smoothing nil)
   (image-toggle-display-image))
 
 (provide 'image-mode)
diff --git a/lisp/image.el b/lisp/image.el
index 6955a90..4ede1fb 100644
--- a/lisp/image.el
+++ b/lisp/image.el
@@ -141,6 +141,18 @@ based on the font pixel size."
                  (const :tag "Automatically compute" auto))
   :version "26.1")
 
+(defcustom image-transform-smoothing #'image--default-smoothing
+  "Whether to do smoothing when applying transforms to images.
+Common transforms are rescaling and rotation.
+
+Valid values are nil (no smoothing), t (smoothing) or a predicate
+function that is called with the image specification and should return
+either nil or non-nil."
+  :type '(choice (const :tag "Do smoothing" t)
+                 (const :tag "No smoothing" nil)
+                 function)
+  :version "28.1")
+
 (defcustom image-use-external-converter nil
   "If non-nil, `create-image' will use external converters for exotic formats.
 Emacs handles most of the common image formats (SVG, JPEG, PNG, GIF
@@ -485,11 +497,40 @@ Image file names that are not absolute are searched for 
in the
             type 'png
             data-p t)))
   (when (image-type-available-p type)
-    (append (list 'image :type type (if data-p :data :file) file-or-data)
-            (and (not (plist-get props :scale))
-                 (list :scale
-                       (image-compute-scaling-factor image-scaling-factor)))
-           props)))
+    (let ((image
+           (append (list 'image :type type (if data-p :data :file)
+                         file-or-data)
+                   (and (not (plist-get props :scale))
+                        ;; Add default scaling.
+                        (list :scale
+                              (image-compute-scaling-factor
+                               image-scaling-factor)))
+                  props)))
+      ;; Add default smoothing.
+      (unless (plist-member props :transform-smoothing)
+        (setq image (nconc image
+                           (list :transform-smoothing
+                                 (pcase image-transform-smoothing
+                                   ('t t)
+                                   ('nil nil)
+                                   (func (funcall func image)))))))
+      image)))
+
+(defun image--default-smoothing (image)
+  "Say whether IMAGE should be smoothed when transformed."
+  (let* ((props (nthcdr 5 image))
+         (scaling (plist-get props :scale))
+         (rotation (plist-get props :rotation)))
+    (cond
+     ;; We always smooth when scaling down and small upwards scaling.
+     ((and scaling (< scaling 2))
+      t)
+     ;; Smooth when doing non-90-degree rotation
+     ((and rotation
+           (or (not (zerop (mod rotation 1)))
+               (not (zerop (% (truncate rotation) 90)))))
+      t)
+     (t nil))))
 
 (defun image--set-property (image property value)
   "Set PROPERTY in IMAGE to VALUE.
diff --git a/lisp/info.el b/lisp/info.el
index e7324ef..dd7e16f 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -4797,10 +4797,10 @@ first line or header line, and for breadcrumb links.")
                    (skip-syntax-backward " ("))
                   (setq other-tag
                        (cond ((save-match-data (looking-back "\\(^\\| \\)see"
-                                                              (- (point) 3)))
+                                                              (- (point) 4)))
                               "")
                              ((save-match-data (looking-back "\\(^\\| \\)in"
-                                                              (- (point) 2)))
+                                                              (- (point) 3)))
                               "")
                              ((memq (char-before) '(nil ?\. ?! ??))
                                "See ")
diff --git a/lisp/international/quail.el b/lisp/international/quail.el
index f527470..87a9050 100644
--- a/lisp/international/quail.el
+++ b/lisp/international/quail.el
@@ -1075,7 +1075,7 @@ The installed decode map can be referred by the function 
`quail-decode-map'."
 KEY is a string meaning a sequence of keystrokes to be translated.
 TRANSLATION is a character, a string, a vector, a Quail map,
  a function, or a cons.
-It it is a character, it is the sole translation of KEY.
+If it is a character, it is the sole translation of KEY.
 If it is a string, each character is a candidate for the translation.
 If it is a vector, each element (string or character) is a candidate
  for the translation.
diff --git a/lisp/jit-lock.el b/lisp/jit-lock.el
index d169e40..a128792 100644
--- a/lisp/jit-lock.el
+++ b/lisp/jit-lock.el
@@ -105,7 +105,7 @@ This means those subsequent lines are refontified to 
reflect their new
 syntactic context, after `jit-lock-context-time' seconds.
 If any other value, e.g., `syntax-driven', it means refontification of
 subsequent lines to reflect their new syntactic context may or may not
-occur after `jit-lock-context-time', depending on the the font-lock
+occur after `jit-lock-context-time', depending on the font-lock
 definitions of the buffer.  Specifically, if `font-lock-keywords-only'
 is nil in a buffer, which generally means the syntactic fontification
 is done using the buffer mode's syntax table, the syntactic
diff --git a/lisp/mail/binhex.el b/lisp/mail/binhex.el
index edb52b6..af32744 100644
--- a/lisp/mail/binhex.el
+++ b/lisp/mail/binhex.el
@@ -38,19 +38,16 @@
   "Non-nil value should be a string that names a binhex decoder.
 The program should expect to read binhex data on its standard
 input and write the converted data to its standard output."
-  :type 'string
-  :group 'binhex)
+  :type 'string)
 
 (defcustom binhex-decoder-switches '("-d")
   "List of command line flags passed to the command `binhex-decoder-program'."
-  :group 'binhex
   :type '(repeat string))
 
 (defcustom binhex-use-external
   (executable-find binhex-decoder-program)
   "Use external binhex program."
   :version "22.1"
-  :group 'binhex
   :type 'boolean)
 
 (defconst binhex-alphabet-decoding-alist
@@ -80,7 +77,7 @@ input and write the converted data to its standard output."
 (make-obsolete-variable 'binhex-temporary-file-directory
                         'temporary-file-directory "28.1")
 
-(defun binhex-insert-char (char &optional count ignored buffer)
+(defun binhex-insert-char (char &optional count _ignored buffer)
   "Insert COUNT copies of CHARACTER into BUFFER."
   (if (or (null buffer) (eq buffer (current-buffer)))
       (insert-char char count)
@@ -273,7 +270,8 @@ If HEADER-ONLY is non-nil only decode header and return 
filename."
 (defun binhex-decode-region-external (start end)
   "Binhex decode region between START and END using external decoder."
   (interactive "r")
-  (let ((cbuf (current-buffer)) firstline work-buffer
+  (let ((cbuf (current-buffer))
+       work-buffer ;; firstline
        (file-name (expand-file-name
                    (concat (binhex-decode-region-internal start end t)
                            ".data")
@@ -287,9 +285,9 @@ If HEADER-ONLY is non-nil only decode header and return 
filename."
                (set-buffer (setq work-buffer
                                  (generate-new-buffer " *binhex-work*")))
                (buffer-disable-undo work-buffer)
-               (insert-buffer-substring cbuf firstline end)
+               (insert-buffer-substring cbuf nil end) ;; firstline
                (cd temporary-file-directory)
-               (apply 'call-process-region
+               (apply #'call-process-region
                       (point-min)
                       (point-max)
                       binhex-decoder-program
diff --git a/lisp/mail/blessmail.el b/lisp/mail/blessmail.el
index 505ce5d..f380f0d 100644
--- a/lisp/mail/blessmail.el
+++ b/lisp/mail/blessmail.el
@@ -1,4 +1,4 @@
-;;; blessmail.el --- decide whether movemail needs special privileges -*- 
no-byte-compile: t -*-
+;;; blessmail.el --- decide whether movemail needs special privileges -*- 
no-byte-compile: t; lexical-binding: t; -*-
 
 ;; Copyright (C) 1994, 2001-2021 Free Software Foundation, Inc.
 
diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el
index 815ff43..5f3d75e 100644
--- a/lisp/mail/emacsbug.el
+++ b/lisp/mail/emacsbug.el
@@ -1,4 +1,4 @@
-;;; emacsbug.el --- command to report Emacs bugs to appropriate mailing list
+;;; emacsbug.el --- command to report Emacs bugs to appropriate mailing list  
-*- lexical-binding: t; -*-
 
 ;; Copyright (C) 1985, 1994, 1997-1998, 2000-2021 Free Software
 ;; Foundation, Inc.
@@ -45,12 +45,10 @@
 
 (defcustom report-emacs-bug-no-confirmation nil
   "If non-nil, suppress the confirmations asked for the sake of novice users."
-  :group 'emacsbug
   :type 'boolean)
 
 (defcustom report-emacs-bug-no-explanations nil
   "If non-nil, suppress the explanations given for the sake of novice users."
-  :group 'emacsbug
   :type 'boolean)
 
 ;; User options end here.
@@ -204,7 +202,7 @@ This requires either the macOS \"open\" command, or the 
freedesktop
 (defvar message-sendmail-envelope-from)
 
 ;;;###autoload
-(defun report-emacs-bug (topic &optional unused)
+(defun report-emacs-bug (topic &optional _unused)
   "Report a bug in GNU Emacs.
 Prompts for bug subject.  Leaves you in a mail buffer.
 
@@ -219,10 +217,10 @@ Already submitted bugs can be found in the Emacs bug 
tracker:
   (let ((from-buffer (current-buffer))
        (can-insert-mail (or (report-emacs-bug-can-use-xdg-email)
                             (report-emacs-bug-can-use-osx-open)))
-        user-point message-end-point)
-    (setq message-end-point
-         (with-current-buffer (messages-buffer)
-           (point-max-marker)))
+        user-point) ;; message-end-point
+    ;; (setq message-end-point
+    ;;       (with-current-buffer (messages-buffer)
+    ;;         (point-max-marker)))
     (condition-case nil
         ;; For the novice user make sure there's always enough space for
         ;; the mail and the warnings buffer on this frame (Bug#10873).
@@ -263,7 +261,7 @@ Already submitted bugs can be found in the Emacs bug 
tracker:
         "Bug-GNU-Emacs"
         'face 'link
         'help-echo (concat "mouse-2, RET: Follow this link")
-        'action (lambda (button)
+        'action (lambda (_button)
                   (browse-url "https://lists.gnu.org/r/bug-gnu-emacs/";))
         'follow-link t)
        (insert " mailing list\nand the GNU bug tracker at ")
@@ -271,7 +269,7 @@ Already submitted bugs can be found in the Emacs bug 
tracker:
         "debbugs.gnu.org"
         'face 'link
         'help-echo (concat "mouse-2, RET: Follow this link")
-        'action (lambda (button)
+        'action (lambda (_button)
                   (browse-url 
"https://debbugs.gnu.org/cgi/pkgreport.cgi?package=emacs;max-bugs=100;base-order=1;bug-rev=1";))
         'follow-link t)
 
@@ -347,10 +345,10 @@ usually do not have translators for other 
languages.\n\n")))
 
     ;; This is so the user has to type something in order to send easily.
     (use-local-map (nconc (make-sparse-keymap) (current-local-map)))
-    (define-key (current-local-map) "\C-c\C-i" 'info-emacs-bug)
+    (define-key (current-local-map) "\C-c\C-i" #'info-emacs-bug)
     (if can-insert-mail
        (define-key (current-local-map) "\C-c\M-i"
-         'report-emacs-bug-insert-to-mailer))
+         #'report-emacs-bug-insert-to-mailer))
     (setq report-emacs-bug-send-command (get mail-user-agent 'sendfunc)
          report-emacs-bug-send-hook (get mail-user-agent 'hookvar))
     (if report-emacs-bug-send-command
@@ -376,7 +374,7 @@ usually do not have translators for other languages.\n\n")))
       (shrink-window-if-larger-than-buffer (get-buffer-window "*Bug Help*")))
     ;; Make it less likely people will send empty messages.
     (if report-emacs-bug-send-hook
-        (add-hook report-emacs-bug-send-hook 'report-emacs-bug-hook nil t))
+        (add-hook report-emacs-bug-send-hook #'report-emacs-bug-hook nil t))
     (goto-char (point-max))
     (skip-chars-backward " \t\n")
     (setq-local report-emacs-bug-orig-text
@@ -398,7 +396,7 @@ usually do not have translators for other languages.\n\n")))
           ;; This is used not only for X11 but also W32 and others.
          (insert "Windowing system distributor '" (x-server-vendor)
                   "', version "
-                 (mapconcat 'number-to-string (x-server-version) ".") "\n")
+                 (mapconcat #'number-to-string (x-server-version) ".") "\n")
        (error t)))
   (let ((os (ignore-errors (report-emacs-bug--os-description))))
     (if (stringp os)
@@ -409,7 +407,7 @@ usually do not have translators for other languages.\n\n")))
            system-configuration-options "'\n\n")
     (fill-region (line-beginning-position -1) (point))))
 
-(define-obsolete-function-alias 'report-emacs-bug-info 'info-emacs-bug "24.3")
+(define-obsolete-function-alias 'report-emacs-bug-info #'info-emacs-bug "24.3")
 
 (defun report-emacs-bug-hook ()
   "Do some checking before sending a bug report."
diff --git a/lisp/mail/feedmail.el b/lisp/mail/feedmail.el
index 2bcbdf4..d76017b 100644
--- a/lisp/mail/feedmail.el
+++ b/lisp/mail/feedmail.el
@@ -1381,7 +1381,7 @@ It shows the simple addresses and gets a confirmation.  
Use as:
   (save-window-excursion
     (display-buffer (set-buffer (get-buffer-create " F-C-A-H-E")))
     (erase-buffer)
-    (insert (mapconcat 'identity feedmail-address-list " "))
+    (insert (mapconcat #'identity feedmail-address-list " "))
     (if (not (y-or-n-p "How do you like them apples? "))
        (error "FQM: Sending...gave up in last chance hook"))))
 
@@ -1592,10 +1592,10 @@ Feeds the buffer to it."
   (feedmail-say-debug ">in-> feedmail-buffer-to-binmail %s" addr-listoid)
   (set-buffer prepped)
   (apply
-   'call-process-region
+   #'call-process-region
    (append (list (point-min) (point-max) "/bin/sh" nil errors-to nil "-c"
                 (format feedmail-binmail-template
-                        (mapconcat 'identity addr-listoid " "))))))
+                        (mapconcat #'identity addr-listoid " "))))))
 
 
 (defvar sendmail-program)
@@ -1609,7 +1609,7 @@ local gurus."
   (require 'sendmail)
   (feedmail-say-debug ">in-> feedmail-buffer-to-sendmail %s" addr-listoid)
   (set-buffer prepped)
-  (apply 'call-process-region
+  (apply #'call-process-region
         (append (list (point-min) (point-max) sendmail-program
                       nil errors-to nil "-oi" "-t")
                 ;; provide envelope "from" to sendmail; results will vary
@@ -2042,7 +2042,7 @@ backup file names and the like)."
                       (message "FQM: Trapped `%s', message left in queue." 
(car signal-stuff))
                       (sit-for 3)
                       (message "FQM: Trap details: \"%s\""
-                               (mapconcat 'identity (cdr signal-stuff) "\" 
\""))
+                               (mapconcat #'identity (cdr signal-stuff) "\" 
\""))
                       (sit-for 3)))
              (kill-buffer blobby-buffer)
              (feedmail-say-chatter
diff --git a/lisp/mail/flow-fill.el b/lisp/mail/flow-fill.el
index 0fab1b2..5319ab9 100644
--- a/lisp/mail/flow-fill.el
+++ b/lisp/mail/flow-fill.el
@@ -81,7 +81,7 @@ RFC 2646 suggests 66 characters for readability."
        (while (setq end (text-property-any start (point-max) 'hard 't))
          (save-restriction
            (narrow-to-region start end)
-           (let ((fill-column (eval fill-flowed-encode-column)))
+           (let ((fill-column (eval fill-flowed-encode-column t)))
              (fill-flowed-fill-buffer))
            (goto-char (point-min))
            (while (re-search-forward "\n" nil t)
@@ -119,7 +119,7 @@ If BUFFER is nil, default to the current buffer.
 If DELETE-SPACE, delete RFC2646 spaces padding at the end of
 lines."
   (with-current-buffer (or buffer (current-buffer))
-    (let ((fill-column  (eval fill-flowed-display-column)))
+    (let ((fill-column  (eval fill-flowed-display-column t)))
       (goto-char (point-min))
       (while (not (eobp))
         (cond
diff --git a/lisp/mail/ietf-drums.el b/lisp/mail/ietf-drums.el
index 795e37d..2d68357 100644
--- a/lisp/mail/ietf-drums.el
+++ b/lisp/mail/ietf-drums.el
@@ -232,13 +232,13 @@ If DECODE, the DISPLAY-NAME will have RFC2047 decoding 
performed
       ;; If we found no display-name, then we look for comments.
       (if display-name
          (setq display-string
-               (mapconcat 'identity (reverse display-name) " "))
+               (mapconcat #'identity (reverse display-name) " "))
        (setq display-string (ietf-drums-get-comment string)))
       (if (not mailbox)
          (when (and display-string
                     (string-match "@" display-string))
            (cons
-            (mapconcat 'identity (nreverse display-name) "")
+            (mapconcat #'identity (nreverse display-name) "")
             (ietf-drums-get-comment string)))
        (cons mailbox (if decode
                           (rfc2047-decode-string display-string)
diff --git a/lisp/mail/mail-extr.el b/lisp/mail/mail-extr.el
index 4e3bf78..7fbdfef 100644
--- a/lisp/mail/mail-extr.el
+++ b/lisp/mail/mail-extr.el
@@ -1,4 +1,4 @@
-;;; mail-extr.el --- extract full name and address from email header
+;;; mail-extr.el --- extract full name and address from email header  -*- 
lexical-binding: t; -*-
 
 ;; Copyright (C) 1991-1994, 1997, 2001-2021 Free Software Foundation,
 ;; Inc.
@@ -222,23 +222,20 @@
   "Whether to try to guess middle initial from mail address.
 If true, then when we see an address like \"John Smith <jqs@host.com>\"
 we will assume that \"John Q. Smith\" is the fellow's name."
-  :type 'boolean
-  :group 'mail-extr)
+  :type 'boolean)
 
 (defcustom mail-extr-ignore-single-names nil
   "Whether to ignore a name that is just a single word.
 If true, then when we see an address like \"Idiot <dumb@stupid.com>\"
 we will act as though we couldn't find a full name in the address."
   :type 'boolean
-  :version "22.1"
-  :group 'mail-extr)
+  :version "22.1")
 
 (defcustom mail-extr-ignore-realname-equals-mailbox-name t
 "Whether to ignore a name that is equal to the mailbox name.
 If true, then when the address is like \"Single <single@address.com>\"
 we will act as though we couldn't find a full name in the address."
-  :type 'boolean
-  :group 'mail-extr)
+  :type 'boolean)
 
 ;; Matches a leading title that is not part of the name (does not
 ;; contribute to uniquely identifying the person).
@@ -248,19 +245,16 @@ we will act as though we couldn't find a full name in the 
address."
   "Matches prefixes to the full name that identify a person's position.
 These are stripped from the full name because they do not contribute to
 uniquely identifying the person."
-  :type 'regexp
-  :group 'mail-extr)
+  :type 'regexp)
 
 (defcustom mail-extr-@-binds-tighter-than-! nil
   "Whether the local mail transport agent looks at ! before @."
-  :type 'boolean
-  :group 'mail-extr)
+  :type 'boolean)
 
 (defcustom mail-extr-mangle-uucp nil
   "Whether to throw away information in UUCP addresses
 by translating things like \"foo!bar!baz@host\" into \"baz@bar.UUCP\"."
-  :type 'boolean
-  :group 'mail-extr)
+  :type 'boolean)
 
 ;;----------------------------------------------------------------------
 ;; what orderings are meaningful?????
@@ -760,7 +754,6 @@ non-display use, you should probably use
              end-of-address
              <-pos >-pos @-pos colon-pos comma-pos !-pos %-pos \;-pos
              group-:-pos group-\;-pos route-addr-:-pos
-             record-pos-symbol
              first-real-pos last-real-pos
              phrase-beg phrase-end
              ;; Dynamically set in mail-extr-voodoo.
@@ -852,13 +845,16 @@ non-display use, you should probably use
              )
             ;; record the position of various interesting chars, determine
             ;; validity later.
-            ((setq record-pos-symbol
-                   (cdr (assq char
-                              '((?< . <-pos) (?> . >-pos) (?@ . @-pos)
-                                (?: . colon-pos) (?, . comma-pos) (?! . !-pos)
-                                (?% . %-pos) (?\; . \;-pos)))))
-             (set record-pos-symbol
-                  (cons (point) (symbol-value record-pos-symbol)))
+            ((memq char '(?< ?> ?@ ?: ?, ?!  ?% ?\;))
+             (push (point) (pcase-exhaustive char
+                             (?<  <-pos)
+                             (?>  >-pos)
+                             (?@  @-pos)
+                             (?:  colon-pos)
+                             (?,  comma-pos)
+                             (?!  !-pos)
+                             (?%  %-pos)
+                             (?\; \;-pos)))
              (forward-char 1))
             ((eq char ?.)
              (forward-char 1))
@@ -1065,7 +1061,7 @@ non-display use, you should probably use
            (mail-extr-demarkerize route-addr-:-pos)
            (setq route-addr-:-pos nil
                  >-pos (mail-extr-demarkerize >-pos)
-                 %-pos (mapcar 'mail-extr-demarkerize %-pos)))
+                 %-pos (mapcar #'mail-extr-demarkerize %-pos)))
 
          ;; de-listify @-pos
          (setq @-pos (car @-pos))
@@ -1122,7 +1118,7 @@ non-display use, you should probably use
                       (setq insert-point (point-max)))
                      (%-pos
                       (setq insert-point (car (last %-pos))
-                            saved-%-pos (mapcar 'mail-extr-markerize %-pos)
+                            saved-%-pos (mapcar #'mail-extr-markerize %-pos)
                             %-pos nil
                             @-pos (mail-extr-markerize @-pos)))
                      (@-pos
@@ -1162,7 +1158,7 @@ non-display use, you should probably use
                       "uucp"))
                  (setq !-pos (cdr !-pos))))
              (and saved-%-pos
-                  (setq %-pos (append (mapcar 'mail-extr-demarkerize
+                  (setq %-pos (append (mapcar #'mail-extr-demarkerize
                                               saved-%-pos)
                                       %-pos)))
              (setq @-pos (mail-extr-demarkerize @-pos))
@@ -1461,8 +1457,7 @@ If it is neither nil nor a string, modifying of names 
will never take
 place.  It affects how `mail-extract-address-components' works."
   :type '(choice (regexp :size 0)
                 (const :tag "Always enabled" nil)
-                (const :tag "Always disabled" t))
-  :group 'mail-extr)
+                (const :tag "Always disabled" t)))
 
 (defun mail-extr-voodoo (mbox-beg mbox-end canonicalization-buffer)
   (unless (and mail-extr-disable-voodoo
diff --git a/lisp/mail/mail-hist.el b/lisp/mail/mail-hist.el
index 37c8ad6..239b386 100644
--- a/lisp/mail/mail-hist.el
+++ b/lisp/mail/mail-hist.el
@@ -1,4 +1,4 @@
-;;; mail-hist.el --- headers and message body history for outgoing mail
+;;; mail-hist.el --- headers and message body history for outgoing mail  -*- 
lexical-binding: t; -*-
 
 ;; Copyright (C) 1994, 2001-2021 Free Software Foundation, Inc.
 
@@ -69,8 +69,8 @@
 
 ;;;###autoload
 (defun mail-hist-enable ()
-  (add-hook 'mail-mode-hook 'mail-hist-define-keys)
-  (add-hook 'mail-send-hook 'mail-hist-put-headers-into-history))
+  (add-hook 'mail-mode-hook #'mail-hist-define-keys)
+  (add-hook 'mail-send-hook #'mail-hist-put-headers-into-history))
 
 (defvar mail-hist-header-ring-alist nil
   "Alist of form (header-name . history-ring).
@@ -80,14 +80,12 @@ previous/next input.")
 (defcustom mail-hist-history-size (or kill-ring-max 1729)
   "The maximum number of elements in a mail field's history.
 Oldest elements are dumped first."
-  :type 'integer
-  :group 'mail-hist)
+  :type 'integer)
 
 ;;;###autoload
 (defcustom mail-hist-keep-history t
   "Non-nil means keep a history for headers and text of outgoing mail."
-  :type 'boolean
-  :group 'mail-hist)
+  :type 'boolean)
 
 ;; For handling repeated history requests
 (defvar mail-hist-access-count 0)
@@ -184,8 +182,7 @@ HEADER is a string without the colon."
 (defcustom mail-hist-text-size-limit nil
   "Don't store any header or body with more than this many characters.
 If the value is nil, that means no limit on text size."
-  :type '(choice (const nil) integer)
-  :group 'mail-hist)
+  :type '(choice (const nil) integer))
 
 (defun mail-hist-text-too-long-p (text)
   "Return non-nil if TEXT's length exceeds `mail-hist-text-size-limit'."
diff --git a/lisp/mail/mail-utils.el b/lisp/mail/mail-utils.el
index 83125a0..bb1f8f1 100644
--- a/lisp/mail/mail-utils.el
+++ b/lisp/mail/mail-utils.el
@@ -134,7 +134,7 @@ we expect to find and remove the wrapper characters 
=?ISO-8859-1?Q?....?=."
                                       (aref string (1+ (match-beginning 1))))))
                      strings)))
        (setq i (match-end 0)))
-      (apply 'concat (nreverse (cons (substring string i) strings))))))
+      (apply #'concat (nreverse (cons (substring string i) strings))))))
 
 ;; FIXME Gnus for some reason has `quoted-printable-decode-region' in qp.el.
 ;;;###autoload
@@ -194,7 +194,7 @@ Also delete leading/trailing whitespace and replace FOO 
<BAR> with just BAR.
 Return a modified address list."
   (when address
     (if mail-use-rfc822
-       (mapconcat 'identity (rfc822-addresses address) ", ")
+       (mapconcat #'identity (rfc822-addresses address) ", ")
       (let (pos)
 
         ;; Strip comments.
@@ -282,7 +282,7 @@ comma-separated list, and return the pruned list."
     destinations))
 
 ;; Legacy name
-(define-obsolete-function-alias 'rmail-dont-reply-to 'mail-dont-reply-to 
"24.1")
+(define-obsolete-function-alias 'rmail-dont-reply-to #'mail-dont-reply-to 
"24.1")
 
 
 ;;;###autoload
diff --git a/lisp/mail/mailabbrev.el b/lisp/mail/mailabbrev.el
index 2147049..5cb4a74 100644
--- a/lisp/mail/mailabbrev.el
+++ b/lisp/mail/mailabbrev.el
@@ -1,4 +1,4 @@
-;;; mailabbrev.el --- abbrev-expansion of mail aliases
+;;; mailabbrev.el --- abbrev-expansion of mail aliases  -*- lexical-binding: 
t; -*-
 
 ;; Copyright (C) 1985-1987, 1992-1993, 1996-1997, 2000-2021 Free
 ;; Software Foundation, Inc.
@@ -140,15 +140,13 @@ abbrev-like expansion is performed when editing certain 
mail
 headers (those specified by `mail-abbrev-mode-regexp'), based on
 the entries in your `mail-personal-alias-file'."
   :global t
-  :group 'mail-abbrev
   :version "20.3"
   (if mail-abbrevs-mode (mail-abbrevs-enable) (mail-abbrevs-disable)))
 
 (defcustom mail-abbrevs-only nil
   "Non-nil means only mail abbrevs should expand automatically.
 Other abbrevs expand only when you explicitly use `expand-abbrev'."
-  :type 'boolean
-  :group 'mail-abbrev)
+  :type 'boolean)
 
 ;; originally defined in sendmail.el - used to be an alist, now is a table.
 (defvar mail-abbrevs nil
@@ -186,11 +184,11 @@ no aliases, which is represented by this being a table 
with no entries.)")
   (abbrev-mode 1))
 
 (defun mail-abbrevs-enable ()
-  (add-hook 'mail-mode-hook 'mail-abbrevs-setup))
+  (add-hook 'mail-mode-hook #'mail-abbrevs-setup))
 
 (defun mail-abbrevs-disable ()
   "Turn off use of the `mailabbrev' package."
-  (remove-hook 'mail-mode-hook 'mail-abbrevs-setup)
+  (remove-hook 'mail-mode-hook #'mail-abbrevs-setup)
   (abbrev-mode (if (default-value 'abbrev-mode) 1 -1)))
 
 ;;;###autoload
@@ -258,8 +256,7 @@ By default this is the file specified by 
`mail-personal-alias-file'."
   "String inserted between addresses in multi-address mail aliases.
 This has to contain a comma, so \", \" is a reasonable value.  You might
 also want something like \",\\n    \" to get each address on its own line."
-  :type 'string
-  :group 'mail-abbrev)
+  :type 'string)
 
 ;; define-mail-abbrev sets this flag, which causes mail-resolve-all-aliases
 ;; to be called before expanding abbrevs if it's necessary.
@@ -367,7 +364,7 @@ double-quotes."
 (defun mail-resolve-all-aliases-1 (sym &optional so-far)
   (if (memq sym so-far)
       (error "mail alias loop detected: %s"
-            (mapconcat 'symbol-name (cons sym so-far) " <- ")))
+            (mapconcat #'symbol-name (cons sym so-far) " <- ")))
   (let ((definition (and (boundp sym) (symbol-value sym))))
     (if definition
        (let ((result '())
@@ -420,8 +417,7 @@ of the current line; if it matches, abbrev mode will be 
turned on, otherwise
 it will be turned off.  (You don't need to worry about continuation lines.)
 This should be set to match those mail fields in which you want abbreviations
 turned on."
-  :type 'regexp
-  :group 'mail-abbrev)
+  :type 'regexp)
 
 (defvar mail-abbrev-syntax-table nil
   "The syntax-table used for abbrev-expansion purposes.
@@ -433,14 +429,14 @@ of a mail alias.  The value is set up, buffer-local, when 
first needed.")
   (make-local-variable 'mail-abbrev-syntax-table)
   (unless mail-abbrev-syntax-table
     (let ((tab (copy-syntax-table (syntax-table)))
-         (_ (aref (standard-syntax-table) ?_))
+         (syntax-_ (aref (standard-syntax-table) ?_))
          (w (aref (standard-syntax-table) ?w)))
       (map-char-table
        (lambda (key value)
          (if (null value)
              ;; Fetch the inherited value
              (setq value (aref tab key)))
-         (if (equal value _)
+         (if (equal value syntax-_)
              (set-char-table-range tab key w)))
        tab)
       (modify-syntax-entry ?@ "w" tab)
@@ -600,12 +596,12 @@ In other respects, this behaves like `end-of-buffer', 
which see."
 
 (eval-after-load "sendmail"
   '(progn
-     (define-key mail-mode-map "\C-c\C-a" 'mail-abbrev-insert-alias)
+     (define-key mail-mode-map "\C-c\C-a" #'mail-abbrev-insert-alias)
      (define-key mail-mode-map "\e\t"  ; like completion-at-point
-       'mail-abbrev-complete-alias)))
+       #'mail-abbrev-complete-alias))) ;; FIXME: Use `completion-at-point'.
 
-;;(define-key mail-mode-map "\C-n" 'mail-abbrev-next-line)
-;;(define-key mail-mode-map "\M->" 'mail-abbrev-end-of-buffer)
+;;(define-key mail-mode-map "\C-n" #'mail-abbrev-next-line)
+;;(define-key mail-mode-map "\M->" #'mail-abbrev-end-of-buffer)
 
 (provide 'mailabbrev)
 
diff --git a/lisp/mail/mailclient.el b/lisp/mail/mailclient.el
index 3cba6a6..5c153ce 100644
--- a/lisp/mail/mailclient.el
+++ b/lisp/mail/mailclient.el
@@ -1,4 +1,4 @@
-;;; mailclient.el --- mail sending via system's mail client.
+;;; mailclient.el --- mail sending via system's mail client.  -*- 
lexical-binding: t; -*-
 
 ;; Copyright (C) 2005-2021 Free Software Foundation, Inc.
 
diff --git a/lisp/mail/mailheader.el b/lisp/mail/mailheader.el
index cbc01e4..0443279 100644
--- a/lisp/mail/mailheader.el
+++ b/lisp/mail/mailheader.el
@@ -1,4 +1,4 @@
-;;; mailheader.el --- mail header parsing, merging, formatting
+;;; mailheader.el --- mail header parsing, merging, formatting  -*- 
lexical-binding: t; -*-
 
 ;; Copyright (C) 1996, 2001-2021 Free Software Foundation, Inc.
 
@@ -99,23 +99,23 @@ value."
   headers)
 
 ;; Advertised part of the interface; see mail-header, mail-header-set.
-(with-suppressed-warnings ((lexical headers))
-  (defvar headers))
 
-(defsubst mail-header (header &optional header-alist)
+(defun mail-header (header &optional header-alist)
   "Return the value associated with header HEADER in HEADER-ALIST.
 If the value is a string, it is the original value of the header.  If the
 value is a list, its first element is the original value of the header,
-with any subsequent elements being the result of parsing the value.
-If HEADER-ALIST is nil, the dynamically bound variable `headers' is used."
+with any subsequent elements being the result of parsing the value."
   (declare (gv-setter (lambda (value)
                         `(mail-header-set ,header ,value ,header-alist))))
+  (with-suppressed-warnings ((lexical headers)) (defvar headers))
   (cdr (assq header (or header-alist headers))))
 
 (defun mail-header-set (header value &optional header-alist)
   "Set the value associated with header HEADER to VALUE in HEADER-ALIST.
 HEADER-ALIST defaults to the dynamically bound variable `headers' if nil.
 See `mail-header' for the semantics of VALUE."
+  (declare (obsolete alist-get "28.1"))
+  (with-suppressed-warnings ((lexical headers)) (defvar headers))
   (let* ((alist (or header-alist headers))
        (entry (assq header alist)))
     (if entry
@@ -131,10 +131,13 @@ should be a string or a list of string.  The first 
element may be nil to
 denote that the formatting functions must use the remaining elements, or
 skip the header altogether if there are no other elements.
   The macro `mail-header' can be used to access headers in HEADERS."
-  (mapcar
-   (lambda (rule)
-     (cons (car rule) (eval (cdr rule))))
-   merge-rules))
+  (declare (obsolete alist-get "28.1"))
+  (with-suppressed-warnings ((lexical headers)) (defvar headers))
+  (let ((headers headers))
+    (mapcar
+     (lambda (rule)
+       (cons (car rule) (eval (cdr rule) t)))
+     merge-rules)))
 
 (defvar mail-header-format-function
   (lambda (header value)
@@ -167,7 +170,7 @@ A key of nil has as its value a list of defaulted headers 
to ignore."
                        (mapcar #'car format-rules))))
     (dolist (rule format-rules)
       (let* ((header (car rule))
-           (value (mail-header header)))
+           (value (alist-get header headers)))
        (if (stringp header)
            (setq header (intern header)))
        (cond ((null header) 'ignore)
@@ -176,13 +179,11 @@ A key of nil has as its value a list of defaulted headers 
to ignore."
                 (unless (memq (car defaulted) ignore)
                   (let* ((header (car defaulted))
                          (value (cdr defaulted)))
-                    (if (cdr rule)
-                        (funcall (cdr rule) header value)
-                      (funcall mail-header-format-function header value))))))
+                    (funcall (or (cdr rule) mail-header-format-function)
+                             header value)))))
              (value
-              (if (cdr rule)
-                  (funcall (cdr rule) header value)
-                (funcall mail-header-format-function header value))))))
+              (funcall (or (cdr rule) mail-header-format-function)
+                       header value)))))
     (insert "\n")))
 
 (provide 'mailheader)
diff --git a/lisp/mail/mspools.el b/lisp/mail/mspools.el
index 970f52c..6d83414 100644
--- a/lisp/mail/mspools.el
+++ b/lisp/mail/mspools.el
@@ -167,11 +167,11 @@ your primary spool is.  If this fails, set it to 
something like
 
 (defvar mspools-mode-map
   (let ((map (make-sparse-keymap)))
-    (define-key map "\C-c\C-c" 'mspools-visit-spool)
-    (define-key map "\C-m" 'mspools-visit-spool)
-    (define-key map " " 'mspools-visit-spool)
-    (define-key map "n" 'next-line)
-    (define-key map "p" 'previous-line)
+    (define-key map "\C-c\C-c" #'mspools-visit-spool)
+    (define-key map "\C-m" #'mspools-visit-spool)
+    (define-key map " " #'mspools-visit-spool)
+    (define-key map "n" #'next-line)
+    (define-key map "p" #'previous-line)
     map)
   "Keymap for the *spools* buffer.")
 
diff --git a/lisp/mail/rfc822.el b/lisp/mail/rfc822.el
index f07fcdf..2e97226 100644
--- a/lisp/mail/rfc822.el
+++ b/lisp/mail/rfc822.el
@@ -1,4 +1,4 @@
-;;; rfc822.el --- hairy RFC 822 (or later) parser for mail, news, etc.
+;;; rfc822.el --- hairy RFC 822 (or later) parser for mail, news, etc.  -*- 
lexical-binding: t; -*-
 
 ;; Copyright (C) 1986-1987, 1990, 2001-2021 Free Software Foundation,
 ;; Inc.
diff --git a/lisp/mail/rmail-spam-filter.el b/lisp/mail/rmail-spam-filter.el
index dda472e..d833685 100644
--- a/lisp/mail/rmail-spam-filter.el
+++ b/lisp/mail/rmail-spam-filter.el
@@ -1,4 +1,4 @@
-;;; rmail-spam-filter.el --- spam filter for Rmail, the Emacs mail reader
+;;; rmail-spam-filter.el --- spam filter for Rmail, the Emacs mail reader  -*- 
lexical-binding: t; -*-
 
 ;; Copyright (C) 2002-2021 Free Software Foundation, Inc.
 ;; Keywords: email, spam, filter, rmail
@@ -82,50 +82,42 @@
 (defcustom rmail-use-spam-filter nil
   "Non-nil to activate the Rmail spam filter.
 Set `rsf-definitions-alist' to define what you consider spam emails."
-  :type 'boolean
-  :group 'rmail-spam-filter)
+  :type 'boolean)
 
 (defcustom rsf-file "~/XRMAIL-SPAM"
   "Name of Rmail file for optionally saving some of the spam.
 You can either just delete spam, or save it in this file for
 later review.  Which action to take for each spam definition is
 specified by the \"action\" element of the definition."
-  :type 'string
-  :group 'rmail-spam-filter)
+  :type 'string)
 
 (defcustom rsf-no-blind-cc nil
   "Non-nil means mail with no explicit To: or Cc: is spam."
-  :type 'boolean
-  :group 'rmail-spam-filter)
+  :type 'boolean)
 
 (defcustom rsf-ignore-case nil
   "Non-nil means to ignore case in `rsf-definitions-alist'."
-  :type 'boolean
-  :group 'rmail-spam-filter)
+  :type 'boolean)
 
 (defcustom rsf-beep nil
   "Non-nil means to beep if spam is found."
-  :type 'boolean
-  :group 'rmail-spam-filter)
+  :type 'boolean)
 
 (defcustom rsf-sleep-after-message 2.0
   "Seconds to wait after displaying a message that spam was found."
-  :type 'number
-  :group 'rmail-spam-filter)
+  :type 'number)
 
 (defcustom rsf-min-region-to-spam-list 7
   "Minimum size of region that you can add to the spam list.
 The aim is to avoid adding too short a region, which could result
 in false positive identification of a valid message as spam."
-  :type 'integer
-  :group 'rmail-spam-filter)
+  :type 'integer)
 
 (defcustom rsf-autosave-newly-added-definitions nil
   "Non-nil to auto-save new spam entries.
 Any time you add an entry via the \"Spam\" menu, immediately saves
 the custom file."
-  :type 'boolean
-  :group 'rmail-spam-filter)
+  :type 'boolean)
 
 (defcustom rsf-white-list nil
   "List of regexps to identify valid senders.
@@ -133,8 +125,7 @@ If any element matches the \"From\" header, the message is
 flagged as a valid, non-spam message.  E.g., if your domain is
 \"emacs.com\" then including \"emacs\\\\.com\" in this list would
 flag all mail (purporting to be) from your colleagues as valid."
-  :type '(repeat regexp)
-  :group 'rmail-spam-filter)
+  :type '(repeat regexp))
 
 (defcustom rsf-definitions-alist nil
   "A list of rules (definitions) matching spam messages.
@@ -178,8 +169,7 @@ A rule matches only if all the specified elements match."
                 (choice :tag "Action selection"
                  (const :tag "Output and delete" output-and-delete)
                  (const :tag "Delete" delete-spam)
-                 ))))
-  :group 'rmail-spam-filter)
+                 )))))
 
 ;; FIXME nothing uses this, and it could just be let-bound.
 (defvar rsf-scanning-messages-now nil
@@ -224,6 +214,8 @@ the cdr is set to t.  Else, the car is set to nil."
        ;; empty buffer.
        (1- (or (rmail-first-unseen-message) 1))))
 
+(defvar bbdb/mail_auto_create_p)
+
 (defun rmail-spam-filter (msg)
   "Return nil if message number MSG is spam based on `rsf-definitions-alist'.
 If spam, optionally output message to a file `rsf-file' and delete
@@ -522,12 +514,12 @@ to the spam list (remember to save it)" 
region-to-spam-list))))))
       ["Customize spam definitions" rsf-customize-spam-definitions]
       ["Browse spam customizations" rsf-customize-group]
       ))
-  (define-key map "\C-cSt" 'rsf-add-subject-to-spam-list)
-  (define-key map "\C-cSr" 'rsf-add-sender-to-spam-list)
-  (define-key map "\C-cSn" 'rsf-add-region-to-spam-list)
-  (define-key map "\C-cSa" 'rsf-custom-save-all)
-  (define-key map "\C-cSd" 'rsf-customize-spam-definitions)
-  (define-key map "\C-cSg" 'rsf-customize-group))
+  (define-key map "\C-cSt" #'rsf-add-subject-to-spam-list)
+  (define-key map "\C-cSr" #'rsf-add-sender-to-spam-list)
+  (define-key map "\C-cSn" #'rsf-add-region-to-spam-list)
+  (define-key map "\C-cSa" #'rsf-custom-save-all)
+  (define-key map "\C-cSd" #'rsf-customize-spam-definitions)
+  (define-key map "\C-cSg" #'rsf-customize-group))
 
 (defun rsf-add-content-type-field ()
   "Maintain backward compatibility for `rmail-spam-filter'.
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 8ccf1bf..2bd3ffa 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -1721,7 +1721,7 @@ not be a new one).  It returns non-nil if it got any new 
messages."
                  (buffer-read-only nil)
                  ;; Don't make undo records while getting mail.
                  (buffer-undo-list t)
-                 delete-files files file-last-names)
+                 files file-last-names) ;; delete-files
              ;; Pull files off all-files onto files as long as there is
              ;; no name conflict.  A conflict happens when two inbox
              ;; file names have the same last component.
@@ -1743,7 +1743,7 @@ not be a new one).  It returns non-nil if it got any new 
messages."
                (while (not (looking-back "\n\n" (- (point) 2)))
                  (insert "\n")))
              (setq found (or
-                          (rmail-get-new-mail-1 file-name files delete-files)
+                          (rmail-get-new-mail-1 file-name files nil) ;; 
delete-files
                           found))))
          ;; Move to the first new message unless we have other unseen
          ;; messages before it.
diff --git a/lisp/mail/rmailedit.el b/lisp/mail/rmailedit.el
index c3b351d..fd24bdc 100644
--- a/lisp/mail/rmailedit.el
+++ b/lisp/mail/rmailedit.el
@@ -1,4 +1,4 @@
-;;; rmailedit.el --- "RMAIL edit mode"  Edit the current message
+;;; rmailedit.el --- "RMAIL edit mode"  Edit the current message  -*- 
lexical-binding: t; -*-
 
 ;; Copyright (C) 1985, 1994, 2001-2021 Free Software Foundation, Inc.
 
@@ -38,8 +38,8 @@
   (let ((map (make-sparse-keymap)))
     ;; Make a keymap that inherits text-mode-map.
     (set-keymap-parent map text-mode-map)
-    (define-key map "\C-c\C-c" 'rmail-cease-edit)
-    (define-key map "\C-c\C-]" 'rmail-abort-edit)
+    (define-key map "\C-c\C-c" #'rmail-cease-edit)
+    (define-key map "\C-c\C-]" #'rmail-abort-edit)
     map))
 
 (declare-function rmail-summary-disable "rmailsum" ())
@@ -69,7 +69,7 @@ This function runs the hooks `text-mode-hook' and 
`rmail-edit-mode-hook'.
     (setq-local auto-save-include-big-deletions t)
     ;; If someone uses C-x C-s, don't clobber the rmail file (bug#2625).
     (add-hook 'write-region-annotate-functions
-             'rmail-write-region-annotate nil t)
+             #'rmail-write-region-annotate nil t)
     (run-mode-hooks 'rmail-edit-mode-hook)))
 
 ;; Rmail Edit mode is suitable only for specially formatted data.
diff --git a/lisp/mail/rmailkwd.el b/lisp/mail/rmailkwd.el
index 657b362..acbb588 100644
--- a/lisp/mail/rmailkwd.el
+++ b/lisp/mail/rmailkwd.el
@@ -1,4 +1,4 @@
-;;; rmailkwd.el --- part of the "RMAIL" mail reader for Emacs
+;;; rmailkwd.el --- part of the "RMAIL" mail reader for Emacs  -*- 
lexical-binding: t; -*-
 
 ;; Copyright (C) 1985, 1988, 1994, 2001-2021 Free Software Foundation,
 ;; Inc.
@@ -73,7 +73,7 @@ according to the choice made, and returns a symbol."
            (or (eq major-mode 'rmail-summary-mode)
                (rmail-summary-exists)
                (and (setq old (rmail-get-keywords))
-                    (mapc 'rmail-make-label (split-string old ", "))))
+                    (mapc #'rmail-make-label (split-string old ", "))))
            (completing-read (concat prompt
                                     (if rmail-last-label
                                         (concat " (default "
diff --git a/lisp/mail/rmailmm.el b/lisp/mail/rmailmm.el
index ab5b49a..cdb994a 100644
--- a/lisp/mail/rmailmm.el
+++ b/lisp/mail/rmailmm.el
@@ -1,4 +1,4 @@
-;;; rmailmm.el --- MIME decoding and display stuff for RMAIL
+;;; rmailmm.el --- MIME decoding and display stuff for RMAIL  -*- 
lexical-binding: t; -*-
 
 ;; Copyright (C) 2006-2021 Free Software Foundation, Inc.
 
@@ -78,6 +78,7 @@
 (require 'rmail)
 (require 'mail-parse)
 (require 'message)
+(require 'cl-lib)
 
 ;;; User options.
 
@@ -101,8 +102,7 @@ all others are handled by `rmail-mime-bulk-handler'.
 Note also that this alist is ignored when the variable
 `rmail-enable-mime' is non-nil."
   :type '(alist :key-type regexp :value-type (repeat function))
-  :version "23.1"
-  :group 'rmail-mime)
+  :version "23.1")
 
 (defcustom rmail-mime-attachment-dirs-alist
   `(("text/.*" "~/Documents")
@@ -114,8 +114,7 @@ The first item is a regular expression matching a 
content-type.
 The remaining elements are directories, in order of decreasing preference.
 The first directory that exists is used."
   :type '(alist :key-type regexp :value-type (repeat directory))
-  :version "23.1"
-  :group 'rmail-mime)
+  :version "23.1")
 
 (defcustom rmail-mime-show-images 'button
   "What to do with image attachments that Emacs is capable of displaying.
@@ -128,12 +127,11 @@ automatically display the image in the buffer."
                 (const :tag "No special treatment" nil)
                 (number :tag "Show if smaller than certain size")
                 (other :tag "Always show" show))
-  :version "23.2"
-  :group 'rmail-mime)
+  :version "23.2")
 
 (defcustom rmail-mime-render-html-function
-  (cond ((fboundp 'libxml-parse-html-region) 'rmail-mime-render-html-shr)
-       ((executable-find "lynx") 'rmail-mime-render-html-lynx)
+  (cond ((fboundp 'libxml-parse-html-region) #'rmail-mime-render-html-shr)
+       ((executable-find "lynx") #'rmail-mime-render-html-lynx)
        (t nil))
   "Function to convert HTML to text.
 Called with buffer containing HTML extracted from message in a
@@ -177,9 +175,12 @@ operations such as HTML decoding")
 
 ;;; MIME-entity object
 
-(defun rmail-mime-entity (type disposition transfer-encoding
-                              display header tagline body children handler
-                              &optional truncated)
+(cl-defstruct (rmail-mime-entity
+               (:copier nil) (:constructor nil)
+               (:constructor rmail-mime-entity
+               ( type disposition transfer-encoding
+                 display header tagline body children handler
+                 &optional truncated)
   "Return a newly created MIME-entity object from arguments.
 
 A MIME-entity is a vector of 10 elements:
@@ -210,12 +211,7 @@ Content-Transfer-Encoding, and is a lower-case string.
 DISPLAY is a vector [CURRENT NEW], where CURRENT indicates how
 the header, tag line, and body of the entity are displayed now,
 and NEW indicates how their display should be updated.
-Both elements are vectors [HEADER-DISPLAY TAGLINE-DISPLAY BODY-DISPLAY],
-where each constituent element is a symbol for the corresponding
-item with these values:
-  nil: not displayed
-  t:   displayed by the decoded presentation form
-  raw: displayed by the raw MIME data (for the header and body only)
+Both elements are `rmail-mime-display' objects.
 
 HEADER and BODY are vectors [BEG END DISPLAY-FLAG], where BEG and
 END are markers that specify the region of the header or body lines
@@ -236,24 +232,13 @@ has just one child.  Any other entity has no child.
 HANDLER is a function to insert the entity according to DISPLAY.
 It is called with one argument ENTITY.
 
-TRUNCATED is non-nil if the text of this entity was truncated."
-
-  (vector type disposition transfer-encoding
-         display header tagline body children handler truncated))
-
-;; Accessors for a MIME-entity object.
-(defsubst rmail-mime-entity-type (entity) (aref entity 0))
-(defsubst rmail-mime-entity-disposition (entity) (aref entity 1))
-(defsubst rmail-mime-entity-transfer-encoding (entity) (aref entity 2))
-(defsubst rmail-mime-entity-display (entity) (aref entity 3))
-(defsubst rmail-mime-entity-header (entity) (aref entity 4))
-(defsubst rmail-mime-entity-tagline (entity) (aref entity 5))
-(defsubst rmail-mime-entity-body (entity) (aref entity 6))
-(defsubst rmail-mime-entity-children (entity) (aref entity 7))
-(defsubst rmail-mime-entity-handler (entity) (aref entity 8))
-(defsubst rmail-mime-entity-truncated (entity) (aref entity 9))
+TRUNCATED is non-nil if the text of this entity was truncated."))
+  type disposition transfer-encoding
+  display header tagline body children handler truncated)
+
 (defsubst rmail-mime-entity-set-truncated (entity truncated)
-  (aset entity 9 truncated))
+  (declare (obsolete (setf rmail-mime-entity-truncated) "28.1"))
+  (setf (rmail-mime-entity-truncated entity) truncated))
 
 ;;; Buttons
 
@@ -303,9 +288,16 @@ TRUNCATED is non-nil if the text of this entity was 
truncated."
 
 ;; Display options returned by rmail-mime-entity-display.
 ;; Value is on of nil, t, raw.
-(defsubst rmail-mime-display-header (disp)  (aref disp 0))
-(defsubst rmail-mime-display-tagline (disp) (aref disp 1))
-(defsubst rmail-mime-display-body (disp)    (aref disp 2))
+(cl-defstruct (rmail-mime-display
+               (:copier rmail-mime--copy-display) (:constructor nil)
+               (:constructor rmail-mime--make-display (header tagline body)
+                "Make an object describing how to display.
+Each field's value is a symbol for the corresponding
+item with these values:
+  nil: not displayed
+  t:   displayed by the decoded presentation form
+  raw: displayed by the raw MIME data (for the header and body only)."))
+  header tagline body)
 
 (defun rmail-mime-entity-segment (pos &optional entity)
   "Return a vector describing the displayed region of a MIME-entity at POS.
@@ -371,27 +363,30 @@ The value is a vector [INDEX HEADER TAGLINE BODY END], 
where
 (defun rmail-mime-shown-mode (entity)
   "Make MIME-entity ENTITY display in the default way."
   (let ((new (aref (rmail-mime-entity-display entity) 1)))
-    (aset new 0 (aref (rmail-mime-entity-header entity) 2))
-    (aset new 1 (aref (rmail-mime-entity-tagline entity) 2))
-    (aset new 2 (aref (rmail-mime-entity-body entity) 2)))
+    (setf (rmail-mime-display-header new)
+          (aref (rmail-mime-entity-header entity) 2))
+    (setf (rmail-mime-display-tagline new)
+          (aref (rmail-mime-entity-tagline entity) 2))
+    (setf (rmail-mime-display-body new)
+          (aref (rmail-mime-entity-body entity) 2)))
   (dolist (child (rmail-mime-entity-children entity))
     (rmail-mime-shown-mode child)))
 
 (defun rmail-mime-hidden-mode (entity)
   "Make MIME-entity ENTITY display in hidden mode."
   (let ((new (aref (rmail-mime-entity-display entity) 1)))
-    (aset new 0 nil)
-    (aset new 1 t)
-    (aset new 2 nil))
+    (setf (rmail-mime-display-header  new) nil)
+    (setf (rmail-mime-display-tagline new) t)
+    (setf (rmail-mime-display-body    new) nil))
   (dolist (child (rmail-mime-entity-children entity))
     (rmail-mime-hidden-mode child)))
 
 (defun rmail-mime-raw-mode (entity)
   "Make MIME-entity ENTITY display in raw mode."
   (let ((new (aref (rmail-mime-entity-display entity) 1)))
-    (aset new 0 'raw)
-    (aset new 1 nil)
-    (aset new 2 'raw))
+    (setf (rmail-mime-display-header  new) 'raw)
+    (setf (rmail-mime-display-tagline new) nil)
+    (setf (rmail-mime-display-body    new) 'raw))
   (dolist (child (rmail-mime-entity-children entity))
     (rmail-mime-raw-mode child)))
 
@@ -404,8 +399,8 @@ Use `raw' for raw mode, and any other non-nil value for 
decoded mode."
         (current (aref (rmail-mime-entity-display entity) 0))
         (segment (rmail-mime-entity-segment pos entity)))
     (if (or (eq state 'raw)
-           (and (not state)
-                (not (eq (rmail-mime-display-header current) 'raw))))
+           (not (or state
+                    (eq (rmail-mime-display-header current) 'raw))))
        ;; Enter the raw mode.
        (rmail-mime-raw-mode entity)
       ;; Enter the shown mode.
@@ -439,7 +434,7 @@ Use `raw' for raw mode, and any other non-nil value for 
decoded mode."
            ;; header.
            (if (and rmail-mime-mbox-buffer (= (aref segment 1) (point-min)))
                (let ((new (aref (rmail-mime-entity-display entity) 1)))
-                 (aset new 0 t))))
+                 (setf (rmail-mime-display-header new) t))))
        ;; Query as a warning before showing if truncated.
        (if (and (not (stringp entity))
                 (rmail-mime-entity-truncated entity))
@@ -448,7 +443,8 @@ Use `raw' for raw mode, and any other non-nil value for 
decoded mode."
        ;; Enter the shown mode.
        (rmail-mime-shown-mode entity)
        ;; Force this body shown.
-       (aset (aref (rmail-mime-entity-display entity) 1) 2 t))
+       (let ((new (aref (rmail-mime-entity-display entity) 1)))
+         (setf (rmail-mime-display-body new) t)))
       (let ((inhibit-read-only t)
            (modified (buffer-modified-p))
            (rmail-mime-mbox-buffer rmail-view-buffer)
@@ -458,9 +454,9 @@ Use `raw' for raw mode, and any other non-nil value for 
decoded mode."
          (rmail-mime-insert entity)
          (restore-buffer-modified-p modified))))))
 
-(define-key rmail-mode-map "\t" 'forward-button)
-(define-key rmail-mode-map [backtab] 'backward-button)
-(define-key rmail-mode-map "\r" 'rmail-mime-toggle-hidden)
+(define-key rmail-mode-map "\t" #'forward-button)
+(define-key rmail-mode-map [backtab] #'backward-button)
+(define-key rmail-mode-map "\r" #'rmail-mime-toggle-hidden)
 
 ;;; Handlers
 
@@ -483,7 +479,7 @@ to the tag line."
     (when item
       (if (stringp item)
          (insert item)
-       (apply 'insert-button item))))
+       (apply #'insert-button item))))
   ;; Follow the tagline by an empty line to make it a separate
   ;; paragraph, so that the paragraph direction of the following text
   ;; is determined based on that text.
@@ -495,8 +491,10 @@ to the tag line."
        (modified (buffer-modified-p))
        ;; If we are going to show the body, the new button label is
        ;; "Hide".  Otherwise, it's "Show".
-       (label (if (aref (aref (rmail-mime-entity-display entity) 1) 2) "Hide"
-                "Show"))
+       (label
+        (if (rmail-mime-display-body
+             (aref (rmail-mime-entity-display entity) 1))
+            "Hide" "Show"))
        (button (next-button (point))))
     ;; Go to the second character of the button "Show" or "Hide".
     (goto-char (1+ (button-start button)))
@@ -556,9 +554,10 @@ HEADER is a header component of a MIME-entity object (see
   (rmail-mime-insert-text
    (rmail-mime-entity content-type content-disposition
                      content-transfer-encoding
-                     (vector (vector nil nil nil) (vector nil nil t))
+                     (vector (rmail-mime--make-display nil nil nil)
+                             (rmail-mime--make-display nil nil t))
                      (vector nil nil nil) (vector "" (cons nil nil) t)
-                     (vector nil nil nil) nil 'rmail-mime-insert-text))
+                     (vector nil nil nil) nil #'rmail-mime-insert-text))
   t)
 
 (defun rmail-mime-insert-decoded-text (entity)
@@ -592,7 +591,7 @@ HEADER is a header component of a MIME-entity object (see
   (let ((current (aref (rmail-mime-entity-display entity) 0))
        (new (aref (rmail-mime-entity-display entity) 1))
        (header (rmail-mime-entity-header entity))
-       (tagline (rmail-mime-entity-tagline entity))
+       ;; (tagline (rmail-mime-entity-tagline entity))
        (body (rmail-mime-entity-body entity))
        (beg (point))
        (segment (rmail-mime-entity-segment (point) entity)))
@@ -634,7 +633,7 @@ HEADER is a header component of a MIME-entity object (see
 
 (defun rmail-mime-insert-image (entity)
   "Decode and insert the image body of MIME-entity ENTITY."
-  (let* ((content-type (car (rmail-mime-entity-type entity)))
+  (let* (;; (content-type (car (rmail-mime-entity-type entity)))
         (bulk-data (aref (rmail-mime-entity-tagline entity) 1))
         (body (rmail-mime-entity-body entity))
         data)
@@ -709,6 +708,9 @@ HEADER is a header component of a MIME-entity object (see
 (declare-function libxml-parse-html-region "xml.c"
                  (start end &optional base-url discard-comments))
 
+(defvar shr-inhibit-images)
+(defvar shr-width)
+
 (defun rmail-mime-render-html-shr (source-buffer)
   (let ((dom (with-current-buffer source-buffer
               (libxml-parse-html-region (point-min) (point-max))))
@@ -759,7 +761,8 @@ For images that Emacs is capable of displaying, the behavior
 depends upon the value of `rmail-mime-show-images'."
   (rmail-mime-insert-bulk
    (rmail-mime-entity content-type content-disposition 
content-transfer-encoding
-                     (vector (vector nil nil nil) (vector nil t nil))
+                     (vector (rmail-mime--make-display nil nil nil)
+                             (rmail-mime--make-display nil t nil))
                      (vector nil nil nil) (vector "" (cons nil nil) t)
                      (vector nil nil nil) nil 'rmail-mime-insert-bulk)))
 
@@ -1024,9 +1027,10 @@ The other arguments are the same as 
`rmail-mime-multipart-handler'."
                            nil (format "%s/%d" parse-tag index)
                            content-type content-disposition)))
                ;; Display a tagline.
-               (aset (aref (rmail-mime-entity-display child) 1) 1
+               (setf (rmail-mime-display-tagline
+                      (aref (rmail-mime-entity-display child) 1))
                      (aset (rmail-mime-entity-tagline child) 2 t))
-               (rmail-mime-entity-set-truncated child truncated)
+               (setf (rmail-mime-entity-truncated child) truncated)
                (push child entities)))
 
          (delete-region end next)
@@ -1072,8 +1076,8 @@ The other arguments are the same as 
`rmail-mime-multipart-handler'."
   (let ((current (aref (rmail-mime-entity-display entity) 0))
        (new (aref (rmail-mime-entity-display entity) 1))
        (header (rmail-mime-entity-header entity))
-       (tagline (rmail-mime-entity-tagline entity))
-       (body (rmail-mime-entity-body entity))
+       ;; (tagline (rmail-mime-entity-tagline entity))
+       ;; (body (rmail-mime-entity-body entity))
        (beg (point))
        (segment (rmail-mime-entity-segment (point) entity)))
     ;; header
@@ -1169,13 +1173,11 @@ The parsed header value:
                       content-transfer-encoding))
   (save-restriction
     (widen)
-    (let ((entity (get-text-property (1- (point)) 'rmail-mime-entity))
-         current new)
+    (let ((entity (get-text-property (1- (point)) 'rmail-mime-entity)))
       (when entity
-       (setq current (aref (rmail-mime-entity-display entity) 0)
-             new (aref (rmail-mime-entity-display entity) 1))
-       (dotimes (i 3)
-         (aset current i (aref new i)))))))
+       (let ((new (aref (rmail-mime-entity-display entity) 1)))
+         (setf (aref (rmail-mime-entity-display entity) 0)
+               (rmail-mime--copy-display new)))))))
 
 (defun rmail-mime-show (&optional show-headers)
   "Handle the current buffer as a MIME message.
@@ -1240,13 +1242,15 @@ modified."
               (header (vector (point-min-marker) hdr-end nil))
               (tagline (vector parse-tag (cons nil nil) t))
               (body (vector hdr-end (point-max-marker) is-inline))
-              (new (vector (aref header 2) (aref tagline 2) (aref body 2)))
+              (new (rmail-mime--make-display
+                    (aref header 2) (aref tagline 2) (aref body 2)))
               children handler entity)
          (cond ((string-match "multipart/.*" (car content-type))
                 (save-restriction
                   (narrow-to-region (1- end) (point-max))
                   (if (zerop (length parse-tag)) ; top level of message
-                      (aset new 1 (aset tagline 2 nil))) ; don't show tagline
+                      (setf (rmail-mime-display-tagline new)
+                            (aset tagline 2 nil))) ; don't show tagline
                   (setq children (rmail-mime-process-multipart
                                   content-type
                                   content-disposition
@@ -1260,37 +1264,38 @@ modified."
                                                   '("text/plain") '("inline")))
                          (msg-new (aref (rmail-mime-entity-display msg) 1)))
                     ;; Show header of the child.
-                    (aset msg-new 0 t)
+                    (setf (rmail-mime-display-header msg-new) t)
                     (aset (rmail-mime-entity-header msg) 2 t)
                     ;; Hide tagline of the child.
-                    (aset msg-new 1 nil)
+                    (setf (rmail-mime-display-tagline msg-new) nil)
                     (aset (rmail-mime-entity-tagline msg) 2 nil)
                     (setq children (list msg)
                           handler 'rmail-mime-insert-multipart))))
                ((and is-inline (string-match "text/html" (car content-type)))
                 ;; Display tagline, so part can be detached
-                (aset new 1 (aset tagline 2 t))
-                (aset new 2 (aset body 2 t)) ; display body also.
+                (setf (rmail-mime-display-tagline new) (aset tagline 2 t))
+                (setf (rmail-mime-display-body new) (aset body 2 t)) ; display 
body also.
                 (setq handler 'rmail-mime-insert-bulk))
                ;; Inline non-HTML text
                ((and is-inline (string-match "text/" (car content-type)))
                 ;; Don't need a tagline.
-                (aset new 1 (aset tagline 2 nil))
+                (setf (rmail-mime-display-tagline new) (aset tagline 2 nil))
                 (setq handler 'rmail-mime-insert-text))
                (t
                 ;; Force hidden mode.
-                (aset new 1 (aset tagline 2 t))
-                (aset new 2 (aset body 2 nil))
+                (setf (rmail-mime-display-tagline new) (aset tagline 2 t))
+                (setf (rmail-mime-display-body new) (aset body 2 nil))
                 (setq handler 'rmail-mime-insert-bulk)))
-         (setq entity (rmail-mime-entity content-type
-                                         content-disposition
-                                         content-transfer-encoding
-                                         (vector (vector nil nil nil) new)
-                                         header tagline body children handler))
+         (setq entity (rmail-mime-entity
+                       content-type
+                       content-disposition
+                       content-transfer-encoding
+                       (vector (rmail-mime--make-display nil nil nil) new)
+                       header tagline body children handler))
          (if (and (eq handler 'rmail-mime-insert-bulk)
                   (rmail-mime-set-bulk-data entity))
              ;; Show the body.
-             (aset new 2 (aset body 2 t)))
+             (setf (rmail-mime-display-body new) (aset body 2 t)))
          entity)
 
       ;; Hide headers and handle the part.
@@ -1324,7 +1329,8 @@ If an error occurs, return an error message string."
                                               '("text/plain") '("inline")))
                   (new (aref (rmail-mime-entity-display entity) 1)))
              ;; Show header.
-             (aset new 0 (aset (rmail-mime-entity-header entity) 2 t))
+             (setf (rmail-mime-display-header new)
+                   (aset (rmail-mime-entity-header entity) 2 t))
              entity)))
       (error (format "%s" err)))))
 
@@ -1339,7 +1345,7 @@ available."
        ;; Not a raw-mode.  Each handler should handle it.
        (funcall (rmail-mime-entity-handler entity) entity)
       (let ((header (rmail-mime-entity-header entity))
-           (tagline (rmail-mime-entity-tagline entity))
+           ;; (tagline (rmail-mime-entity-tagline entity))
            (body (rmail-mime-entity-body entity))
            (beg (point))
            (segment (rmail-mime-entity-segment (point) entity)))
@@ -1370,15 +1376,15 @@ available."
                                       (aref body 0) (aref body 1))
              (or (bolp) (insert "\n")))
            (put-text-property beg (point) 'rmail-mime-entity entity)))))
-    (dotimes (i 3)
-      (aset current i (aref new i)))))
+    (setf (aref (rmail-mime-entity-display entity) 0)
+          (rmail-mime--copy-display new))))
 
 (define-derived-mode rmail-mime-mode fundamental-mode "RMIME"
   "Major mode used in `rmail-mime' buffers."
   (setq font-lock-defaults '(rmail-font-lock-keywords t t nil nil)))
 
 ;;;###autoload
-(defun rmail-mime (&optional arg state)
+(defun rmail-mime (&optional _arg state)
   "Toggle the display of a MIME message.
 
 The actual behavior depends on the value of `rmail-enable-mime'.
@@ -1442,7 +1448,7 @@ The arguments ARG and STATE have no effect in this case."
        (rmail-mime-view-buffer rmail-view-buffer)
        (rmail-mime-coding-system nil))
     ;; If ENTITY is not a vector, it is a string describing an error.
-    (if (vectorp entity)
+    (if (rmail-mime-entity-p entity)
        (with-current-buffer rmail-mime-view-buffer
          (erase-buffer)
          ;; This condition-case is for catching an error in the
@@ -1530,7 +1536,7 @@ This is the usual value of 
`rmail-insert-mime-forwarded-message-function'."
           (rmail-mime-view-buffer rmail-view-buffer)
           (header-end (save-excursion
                         (re-search-forward "^$" nil 'move) (point)))
-          (body-end (point-max))
+          ;; (body-end (point-max))
           (entity (rmail-mime-parse)))
       (or
        ;; At first, just search the headers.
diff --git a/lisp/mail/rmailmsc.el b/lisp/mail/rmailmsc.el
index ef5f3c3..673b2c5 100644
--- a/lisp/mail/rmailmsc.el
+++ b/lisp/mail/rmailmsc.el
@@ -1,4 +1,4 @@
-;;; rmailmsc.el --- miscellaneous support functions for the RMAIL mail reader
+;;; rmailmsc.el --- miscellaneous support functions for the RMAIL mail reader  
-*- lexical-binding: t; -*-
 
 ;; Copyright (C) 1985, 2001-2021 Free Software Foundation, Inc.
 
@@ -45,7 +45,7 @@ This applies only to the current session."
           (nreverse (mail-parse-comma-list)))))
     (when (or (not rmail-inbox-list)
              (y-or-n-p (concat "Replace "
-                               (mapconcat 'identity
+                               (mapconcat #'identity
                                           rmail-inbox-list
                                           ", ")
                                "? ")))
diff --git a/lisp/mail/rmailout.el b/lisp/mail/rmailout.el
index 9305a48..eb8590f 100644
--- a/lisp/mail/rmailout.el
+++ b/lisp/mail/rmailout.el
@@ -1,4 +1,4 @@
-;;; rmailout.el --- "RMAIL" mail reader for Emacs: output message to a file
+;;; rmailout.el --- "RMAIL" mail reader for Emacs: output message to a file  
-*- lexical-binding: t; -*-
 
 ;; Copyright (C) 1985, 1987, 1993-1994, 2001-2021 Free Software
 ;; Foundation, Inc.
@@ -81,14 +81,14 @@ This uses `rmail-output-file-alist'."
                      (widen)
                      (narrow-to-region beg end)
                      (let ((tail rmail-output-file-alist)
-                           answer err)
+                           answer) ;; err
                        ;; Suggest a file based on a pattern match.
                        (while (and tail (not answer))
                          (goto-char (point-min))
                          (if (re-search-forward (caar tail) nil t)
                              (setq answer
                                    (condition-case err
-                                       (eval (cdar tail))
+                                       (eval (cdar tail) t)
                                      (error
                                       (display-warning
                                        'rmail-output
@@ -197,7 +197,8 @@ display message number MSG."
 
 (defun rmail-convert-to-babyl-format ()
   "Convert the mbox message in the current buffer to Babyl format."
-  (let ((count 0) (start (point-min))
+  (let (;; (count 0)
+       (start (point-min))
        (case-fold-search nil)
        (buffer-undo-list t))
     (goto-char (point-min))
@@ -357,7 +358,7 @@ unless NOMSG is a symbol (neither nil nor t).
 AS-SEEN is non-nil if we are copying the message \"as seen\"."
   (let ((case-fold-search t)
         encrypted-file-name
-       from date)
+       ) ;; from date
     (goto-char (point-min))
     ;; Preserve the Mail-From and MIME-Version fields
     ;; even if they have been pruned.
diff --git a/lisp/mail/rmailsort.el b/lisp/mail/rmailsort.el
index 2c42e6c..1669c8c 100644
--- a/lisp/mail/rmailsort.el
+++ b/lisp/mail/rmailsort.el
@@ -1,4 +1,4 @@
-;;; rmailsort.el --- Rmail: sort messages
+;;; rmailsort.el --- Rmail: sort messages  -*- lexical-binding: t; -*-
 
 ;; Copyright (C) 1990, 1993-1994, 2001-2021 Free Software Foundation,
 ;; Inc.
@@ -142,7 +142,7 @@ If prefix argument REVERSE is non-nil, sorts in reverse 
order."
                              "\\(,\\|\\'\\)")
                      labelvec))
       (setq labels (substring labels (match-end 0))))
-    (setq labelvec (apply 'vector (nreverse labelvec))
+    (setq labelvec (apply #'vector (nreverse labelvec))
          nmax (length labelvec))
     (rmail-sort-messages reverse
                         ;; If no labels match, returns nmax; if they
@@ -205,7 +205,7 @@ Numeric keys are sorted numerically, all others as strings."
            (inhibit-read-only t)
            (current-message nil)
            (msgnum 1)
-           (msginfo nil)
+           ;; (msginfo nil)
            (undo (not (eq buffer-undo-list t))))
        ;; There's little hope that we can easily undo after that.
        (buffer-disable-undo (current-buffer))
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el
index 5526f2f..ac5e8c3 100644
--- a/lisp/mail/smtpmail.el
+++ b/lisp/mail/smtpmail.el
@@ -186,7 +186,7 @@ mean \"try again\"."
 (defvar smtpmail-auth-supported '(cram-md5 plain login)
   "List of supported SMTP AUTH mechanisms.
 The list is in preference order.
-Every element should have a matching `cl-defmethod' for
+Every element should have a matching `cl-defmethod'
 for `smtpmail-try-auth-method'.")
 
 (defvar smtpmail-mail-address nil
@@ -326,7 +326,7 @@ for `smtpmail-try-auth-method'.")
            ;; Insert an extra newline if we need it to work around
            ;; Sun's bug that swallows newlines.
            (goto-char (1+ delimline))
-           (if (eval mail-mailer-swallows-blank-line)
+           (if (eval mail-mailer-swallows-blank-line t)
                (newline))
            ;; Find and handle any Fcc fields.
            (goto-char (point-min))
@@ -627,7 +627,7 @@ USER and PASSWORD should be non-nil."
           (= code (car response)))))
 
 (defun smtpmail-response-text (response)
-  (mapconcat 'identity (cdr response) "\n"))
+  (mapconcat #'identity (cdr response) "\n"))
 
 (defun smtpmail-query-smtp-server ()
   "Query for an SMTP server and try to contact it.
@@ -741,7 +741,7 @@ Returns an error if the server cannot be contacted."
                           "Unable to contact server")))
 
          ;; set the send-filter
-         (set-process-filter process 'smtpmail-process-filter)
+         (set-process-filter process #'smtpmail-process-filter)
 
          (let* ((greeting (plist-get (cdr result) :greeting))
                 (code (smtpmail-response-code greeting)))
diff --git a/lisp/mail/supercite.el b/lisp/mail/supercite.el
index 99ac41d..dc1c641 100644
--- a/lisp/mail/supercite.el
+++ b/lisp/mail/supercite.el
@@ -1,4 +1,4 @@
-;;; supercite.el --- minor mode for citing mail and news replies
+;;; supercite.el --- minor mode for citing mail and news replies  -*- 
lexical-binding: t; -*-
 
 ;; Copyright (C) 1993, 1997, 2001-2021 Free Software Foundation, Inc.
 
@@ -527,71 +527,71 @@ string."
 
 (defvar sc-T-keymap
   (let ((map (make-sparse-keymap)))
-    (define-key map "a" 'sc-S-preferred-attribution-list)
-    (define-key map "b" 'sc-T-mail-nuke-blank-lines)
-    (define-key map "c" 'sc-T-confirm-always)
-    (define-key map "d" 'sc-T-downcase)
-    (define-key map "e" 'sc-T-electric-references)
-    (define-key map "f" 'sc-T-auto-fill-region)
-    (define-key map "h" 'sc-T-describe)
-    (define-key map "l" 'sc-S-cite-region-limit)
-    (define-key map "n" 'sc-S-mail-nuke-mail-headers)
-    (define-key map "N" 'sc-S-mail-header-nuke-list)
-    (define-key map "o" 'sc-T-electric-circular)
-    (define-key map "p" 'sc-S-preferred-header-style)
-    (define-key map "s" 'sc-T-nested-citation)
-    (define-key map "u" 'sc-T-use-only-preferences)
-    (define-key map "w" 'sc-T-fixup-whitespace)
-    (define-key map "?" 'sc-T-describe)
+    (define-key map "a" #'sc-S-preferred-attribution-list)
+    (define-key map "b" #'sc-T-mail-nuke-blank-lines)
+    (define-key map "c" #'sc-T-confirm-always)
+    (define-key map "d" #'sc-T-downcase)
+    (define-key map "e" #'sc-T-electric-references)
+    (define-key map "f" #'sc-T-auto-fill-region)
+    (define-key map "h" #'sc-T-describe)
+    (define-key map "l" #'sc-S-cite-region-limit)
+    (define-key map "n" #'sc-S-mail-nuke-mail-headers)
+    (define-key map "N" #'sc-S-mail-header-nuke-list)
+    (define-key map "o" #'sc-T-electric-circular)
+    (define-key map "p" #'sc-S-preferred-header-style)
+    (define-key map "s" #'sc-T-nested-citation)
+    (define-key map "u" #'sc-T-use-only-preferences)
+    (define-key map "w" #'sc-T-fixup-whitespace)
+    (define-key map "?" #'sc-T-describe)
     map)
   "Keymap for sub-keymap of setting and toggling functions.")
 
 (defvar sc-mode-map
   (let ((map (make-sparse-keymap)))
-    (define-key map "c"    'sc-cite-region)
-    (define-key map "f"    'sc-mail-field-query)
-    (define-key map "g"    'sc-mail-process-headers)
-    (define-key map "h"    'sc-describe)
-    (define-key map "i"    'sc-insert-citation)
-    (define-key map "o"    'sc-open-line)
-    (define-key map "r"    'sc-recite-region)
-    (define-key map "\C-p" 'sc-raw-mode-toggle)
-    (define-key map "u"    'sc-uncite-region)
-    (define-key map "w"    'sc-insert-reference)
-    (define-key map "\C-t"  sc-T-keymap)
-    (define-key map "?"    'sc-describe)
+    (define-key map "c"    #'sc-cite-region)
+    (define-key map "f"    #'sc-mail-field-query)
+    (define-key map "g"    #'sc-mail-process-headers)
+    (define-key map "h"    #'sc-describe)
+    (define-key map "i"    #'sc-insert-citation)
+    (define-key map "o"    #'sc-open-line)
+    (define-key map "r"    #'sc-recite-region)
+    (define-key map "\C-p" #'sc-raw-mode-toggle)
+    (define-key map "u"    #'sc-uncite-region)
+    (define-key map "w"    #'sc-insert-reference)
+    (define-key map "\C-t"   sc-T-keymap)
+    (define-key map "?"    #'sc-describe)
     map)
   "Keymap for Supercite quasi-mode.")
 
 (defvar sc-electric-mode-map
   (let ((map (make-sparse-keymap)))
-    (define-key map "p"    'sc-eref-prev)
-    (define-key map "n"    'sc-eref-next)
-    (define-key map "s"    'sc-eref-setn)
-    (define-key map "j"    'sc-eref-jump)
-    (define-key map "x"    'sc-eref-abort)
-    (define-key map "q"    'sc-eref-abort)
-    (define-key map "\r"   'sc-eref-exit)
-    (define-key map "\n"   'sc-eref-exit)
-    (define-key map "g"    'sc-eref-goto)
-    (define-key map "?"    'describe-mode)
-    (define-key map "\C-h" 'describe-mode)
-    (define-key map [f1]   'describe-mode)
-    (define-key map [help] 'describe-mode)
+    (define-key map "p"    #'sc-eref-prev)
+    (define-key map "n"    #'sc-eref-next)
+    (define-key map "s"    #'sc-eref-setn)
+    (define-key map "j"    #'sc-eref-jump)
+    (define-key map "x"    #'sc-eref-abort)
+    (define-key map "q"    #'sc-eref-abort)
+    (define-key map "\r"   #'sc-eref-exit)
+    (define-key map "\n"   #'sc-eref-exit)
+    (define-key map "g"    #'sc-eref-goto)
+    (define-key map "?"    #'describe-mode)
+    (define-key map "\C-h" #'describe-mode)
+    (define-key map [f1]   #'describe-mode)
+    (define-key map [help] #'describe-mode)
     map)
   "Keymap for `sc-electric-mode' electric references mode.")
 
 
 (defvar sc-minibuffer-local-completion-map
   (let ((map (copy-keymap minibuffer-local-completion-map)))
-    (define-key map "\C-t" 'sc-toggle-fn)
-    (define-key map " "    'self-insert-command)
+    (define-key map "\C-t" #'sc-toggle-fn)
+    (define-key map " "    #'self-insert-command)
     map)
   "Keymap for minibuffer confirmation of attribution strings.")
 
 (defvar sc-minibuffer-local-map
   (let ((map (copy-keymap minibuffer-local-map)))
-    (define-key map "\C-t" 'sc-toggle-fn)
+    (define-key map "\C-t" #'sc-toggle-fn)
     map)
   "Keymap for minibuffer confirmation of attribution strings.")
 
@@ -1109,6 +1109,8 @@ Only used during confirmation."
   (setq sc-attrib-or-cite (not sc-attrib-or-cite))
   (throw 'sc-reconfirm t))
 
+(defvar completer-disable) ;; From some `completer.el' package.
+
 (defun sc-select-attribution ()
   "Select an attribution from `sc-attributions'.
 
@@ -1150,7 +1152,7 @@ to the auto-selected attribution string."
              (setq attribution attrib
                    attriblist nil))
             ((listp attrib)
-             (setq attribution (eval attrib))
+             (setq attribution (eval attrib t))
               (if (stringp attribution)
                   (setq attriblist nil)
                 (setq attribution nil
@@ -1593,7 +1595,7 @@ error occurs."
   (let ((ref (nth sc-eref-style sc-rewrite-header-list)))
     (condition-case err
        (progn
-         (eval ref)
+         (eval ref t)
          (let ((lines (count-lines (point-min) (point-max))))
            (or nomsg (message "Ref header %d [%d line%s]: %s"
                               sc-eref-style lines
@@ -1767,8 +1769,7 @@ querying you by typing `C-h'.  Note that the format is 
changed
 slightly from that used by `set-variable' -- the current value is
 printed just after the variable's name instead of at the bottom of the
 help window."
-  (let* ((minibuffer-help-form '(funcall myhelp))
-        (myhelp
+  (let* ((myhelp
          (lambda ()
            (with-output-to-temp-buffer "*Help*"
              (prin1 var)
@@ -1784,7 +1785,8 @@ help window."
                                1))
              (with-current-buffer standard-output
                (help-mode))
-             nil))))
+             nil)))
+        (minibuffer-help-form `(funcall #',myhelp)))
     (set var (eval-minibuffer (format "Set %s to value: " var)))))
 
 (defmacro sc-toggle-symbol (rootname)
diff --git a/lisp/mail/uce.el b/lisp/mail/uce.el
index a573c8a..9ebffef 100644
--- a/lisp/mail/uce.el
+++ b/lisp/mail/uce.el
@@ -1,4 +1,4 @@
-;;; uce.el --- facilitate reply to unsolicited commercial email
+;;; uce.el --- facilitate reply to unsolicited commercial email  -*- 
lexical-binding: t; -*-
 
 ;; Copyright (C) 1996, 1998, 2000-2021 Free Software Foundation, Inc.
 
@@ -127,14 +127,12 @@
   "A symbol indicating which mail reader you are using.
 Choose from: `gnus', `rmail'."
   :type '(choice (const gnus) (const rmail))
-  :version "20.3"
-  :group 'uce)
+  :version "20.3")
 
 (defcustom uce-setup-hook nil
   "Hook to run after UCE rant message is composed.
 This hook is run after `mail-setup-hook', which is run as well."
-  :type 'hook
-  :group 'uce)
+  :type 'hook)
 
 (defcustom uce-message-text
   "Recently, I have received an Unsolicited Commercial E-mail from you.
@@ -180,36 +178,31 @@ on beginning of some line from the spamming list.  So, 
when you set it
 up, it might be a good idea to actually use this feature.
 
 Value nil means insert no text by default, lets you type it in."
-  :type '(choice (const nil) string)
-  :group 'uce)
+  :type '(choice (const nil) string))
 
 (defcustom uce-uce-separator
   "----- original unsolicited commercial email follows -----"
   "Line that will begin quoting of the UCE.
 Value nil means use no separator."
-  :type '(choice (const nil) string)
-  :group 'uce)
+  :type '(choice (const nil) string))
 
 (defcustom uce-signature mail-signature
 "Text to put as your signature after the note to UCE sender.
 Value nil means none, t means insert `~/.signature' file (if it happens
 to exist), if this variable is a string this string will be inserted
 as your signature."
-  :type '(choice (const nil) (const t) string)
-  :group 'uce)
+  :type '(choice (const nil) (const t) string))
 
 (defcustom uce-default-headers
   "Errors-To: nobody@localhost\nPrecedence: bulk\n"
   "Additional headers to use when responding to a UCE with 
\\[uce-reply-to-uce].
 These are mostly meant for headers that prevent delivery errors reporting."
-  :type '(choice (const nil) string)
-  :group 'uce)
+  :type '(choice (const nil) string))
 
 (defcustom uce-subject-line
   "Spam alert: unsolicited commercial e-mail"
   "Subject of the message that will be sent in response to a UCE."
-  :type 'string
-  :group 'uce)
+  :type 'string)
 
 ;; End of user options.
 
@@ -221,7 +214,7 @@ These are mostly meant for headers that prevent delivery 
errors reporting."
 (declare-function rmail-toggle-header "rmail" (&optional arg))
 
 ;;;###autoload
-(defun uce-reply-to-uce (&optional ignored)
+(defun uce-reply-to-uce (&optional _ignored)
   "Compose a reply to unsolicited commercial email (UCE).
 Sets up a reply buffer addressed to: the sender, his postmaster,
 his abuse@ address, and the postmaster of the mail relay used.
@@ -367,7 +360,7 @@ You might need to set `uce-mail-reader' before using this."
       ;; functions in mail-mode, etc.
       (run-hooks 'mail-setup-hook 'uce-setup-hook))))
 
-(defun uce-insert-ranting (&optional ignored)
+(defun uce-insert-ranting (&optional _ignored)
   "Insert text of the usual reply to UCE into current buffer."
   (interactive "P")
   (insert uce-message-text))
diff --git a/lisp/mail/unrmail.el b/lisp/mail/unrmail.el
index 34de416..5b1abd5 100644
--- a/lisp/mail/unrmail.el
+++ b/lisp/mail/unrmail.el
@@ -1,4 +1,4 @@
-;;; unrmail.el --- convert Rmail Babyl files to mbox files
+;;; unrmail.el --- convert Rmail Babyl files to mbox files  -*- 
lexical-binding: t; -*-
 
 ;; Copyright (C) 1992, 2001-2021 Free Software Foundation, Inc.
 
@@ -235,7 +235,7 @@ The variable `unrmail-mbox-format' controls which mbox 
format to use."
            ;; Insert the `From ' line.
            (insert mail-from)
            ;; Record the keywords and attributes in our special way.
-           (insert "X-RMAIL-ATTRIBUTES: " (apply 'string attrs) "\n")
+           (insert "X-RMAIL-ATTRIBUTES: " (apply #'string attrs) "\n")
            (when keywords
              (insert "X-RMAIL-KEYWORDS: " keywords "\n"))
            ;; Convert From to >From, etc.
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 8732fb8..f4979e3 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -119,7 +119,9 @@ Expects to be bound to `(double-)mouse-1' in 
`key-translation-map'."
                              (time-since (cdr mouse--last-down))
                               (/ (abs mouse-1-click-follows-link) 1000.0))))))
        (eq (car mouse--last-down)
-           (event-convert-list (list 'down (car-safe last-input-event))))
+           (event-convert-list
+            `(down ,@(event-modifiers last-input-event)
+                   ,(event-basic-type last-input-event))))
        (let* ((action (mouse-on-link-p (event-start last-input-event))))
          (when (and action
                     (or mouse-1-click-in-non-selected-windows
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el
index d27eeab..86b5d44 100644
--- a/lisp/net/ange-ftp.el
+++ b/lisp/net/ange-ftp.el
@@ -3716,7 +3716,7 @@ so return the size on the remote host exactly. See RFC 
3659."
             (binary (or (ange-ftp-binary-file filename)
                         (ange-ftp-binary-file newname)))
             temp1
-            temp2)
+            ) ;; temp2
 
        ;; check to see if we can overwrite
        (if (or (not ok-if-already-exists)
@@ -3750,7 +3750,7 @@ so return the size on the remote host exactly. See RFC 
3659."
                     filename newname binary msg
                     f-parsed f-host f-user f-name f-abbr
                     t-parsed t-host t-user t-name t-abbr
-                    temp1 temp2 cont nowait)
+                    temp1 nil cont nowait) ;; temp2
               nowait))
 
          ;; filename wasn't remote.  newname must be remote.  call the
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index 4963332..27b1ea9 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -826,7 +826,7 @@ If optional arg TEMP-FILE-NAME is non-nil, delete it 
instead."
     (if (and file-name (file-exists-p file-name))
        (delete-file file-name))))
 
-(add-hook 'kill-buffer-hook 'browse-url-delete-temp-file)
+(add-hook 'kill-buffer-hook #'browse-url-delete-temp-file)
 
 (declare-function dired-get-filename "dired"
                  (&optional localp no-error-if-not-filep))
@@ -1073,7 +1073,7 @@ xdg-open is a desktop utility that calls your preferred 
web browser."
        (executable-find "xdg-open")))
 
 ;;;###autoload
-(defun browse-url-xdg-open (url &optional ignored)
+(defun browse-url-xdg-open (url &optional _ignored)
   "Pass the specified URL to the \"xdg-open\" command.
 xdg-open is a desktop utility that calls your preferred web browser.
 The optional argument IGNORED is not used."
@@ -1104,7 +1104,7 @@ used instead of `browse-url-new-window-flag'."
   (setq url (browse-url-encode-url url))
   (let* ((process-environment (browse-url-process-environment))
         (process
-         (apply 'start-process
+         (apply #'start-process
                 (concat "netscape " url) nil
                 browse-url-netscape-program
                 (append
@@ -1134,7 +1134,7 @@ used instead of `browse-url-new-window-flag'."
       (let* ((process-environment (browse-url-process-environment)))
        ;; Netscape not running - start it
        (message "Starting %s..." browse-url-netscape-program)
-       (apply 'start-process (concat "netscape" url) nil
+       (apply #'start-process (concat "netscape" url) nil
               browse-url-netscape-program
               (append browse-url-netscape-startup-arguments (list url))))))
 
@@ -1153,7 +1153,7 @@ How depends on `browse-url-netscape-version'."
   "Send a remote control command to Netscape."
   (declare (obsolete nil "25.1"))
   (let* ((process-environment (browse-url-process-environment)))
-    (apply 'start-process "netscape" nil
+    (apply #'start-process "netscape" nil
            browse-url-netscape-program
            (append browse-url-netscape-arguments
                    (list "-remote" command)))))
@@ -1179,7 +1179,7 @@ used instead of `browse-url-new-window-flag'."
   (setq url (browse-url-encode-url url))
   (let* ((process-environment (browse-url-process-environment))
          (process
-         (apply 'start-process
+         (apply #'start-process
                 (concat "mozilla " url) nil
                 browse-url-mozilla-program
                 (append
@@ -1205,7 +1205,7 @@ used instead of `browse-url-new-window-flag'."
       (let* ((process-environment (browse-url-process-environment)))
        ;; Mozilla is not running - start it
        (message "Starting %s..." browse-url-mozilla-program)
-       (apply 'start-process (concat "mozilla " url) nil
+       (apply #'start-process (concat "mozilla " url) nil
               browse-url-mozilla-program
               (append browse-url-mozilla-startup-arguments (list url))))))
 
@@ -1228,7 +1228,7 @@ instead of `browse-url-new-window-flag'."
   (interactive (browse-url-interactive-arg "URL: "))
   (setq url (browse-url-encode-url url))
   (let* ((process-environment (browse-url-process-environment)))
-    (apply 'start-process
+    (apply #'start-process
            (concat "firefox " url) nil
            browse-url-firefox-program
            (append
@@ -1251,7 +1251,7 @@ The optional argument NEW-WINDOW is not used."
   (interactive (browse-url-interactive-arg "URL: "))
   (setq url (browse-url-encode-url url))
   (let* ((process-environment (browse-url-process-environment)))
-    (apply 'start-process
+    (apply #'start-process
           (concat "chromium " url) nil
           browse-url-chromium-program
           (append
@@ -1269,7 +1269,7 @@ The optional argument NEW-WINDOW is not used."
   (interactive (browse-url-interactive-arg "URL: "))
   (setq url (browse-url-encode-url url))
   (let* ((process-environment (browse-url-process-environment)))
-    (apply 'start-process
+    (apply #'start-process
           (concat "google-chrome " url) nil
           browse-url-chrome-program
           (append
@@ -1299,7 +1299,7 @@ used instead of `browse-url-new-window-flag'."
   (interactive (browse-url-interactive-arg "URL: "))
   (setq url (browse-url-encode-url url))
   (let* ((process-environment (browse-url-process-environment))
-         (process (apply 'start-process
+         (process (apply #'start-process
                         (concat "galeon " url)
                         nil
                         browse-url-galeon-program
@@ -1324,7 +1324,7 @@ used instead of `browse-url-new-window-flag'."
       (let* ((process-environment (browse-url-process-environment)))
        ;; Galeon is not running - start it
        (message "Starting %s..." browse-url-galeon-program)
-       (apply 'start-process (concat "galeon " url) nil
+       (apply #'start-process (concat "galeon " url) nil
               browse-url-galeon-program
               (append browse-url-galeon-startup-arguments (list url))))))
 
@@ -1347,7 +1347,7 @@ used instead of `browse-url-new-window-flag'."
   (interactive (browse-url-interactive-arg "URL: "))
   (setq url (browse-url-encode-url url))
   (let* ((process-environment (browse-url-process-environment))
-         (process (apply 'start-process
+         (process (apply #'start-process
                         (concat "epiphany " url)
                         nil
                         browse-url-epiphany-program
@@ -1371,7 +1371,7 @@ used instead of `browse-url-new-window-flag'."
       (let* ((process-environment (browse-url-process-environment)))
        ;; Epiphany is not running - start it
        (message "Starting %s..." browse-url-epiphany-program)
-       (apply 'start-process (concat "epiphany " url) nil
+       (apply #'start-process (concat "epiphany " url) nil
               browse-url-epiphany-program
               (append browse-url-epiphany-startup-arguments (list url))))))
 
@@ -1412,7 +1412,7 @@ When called non-interactively, optional second argument 
NEW-WINDOW is
 used instead of `browse-url-new-window-flag'."
   (declare (obsolete nil "25.1"))
   (interactive (browse-url-interactive-arg "URL: "))
-  (apply 'start-process (concat "gnome-moz-remote " url)
+  (apply #'start-process (concat "gnome-moz-remote " url)
         nil
         browse-url-gnome-moz-program
         (append
@@ -1446,7 +1446,7 @@ NEW-WINDOW instead of `browse-url-new-window-flag'."
   (interactive (browse-url-interactive-arg "URL: "))
   (setq url (browse-url-encode-url url))
   (let* ((process-environment (browse-url-process-environment)))
-    (apply 'start-process (format "conkeror %s" url)
+    (apply #'start-process (format "conkeror %s" url)
           nil
           browse-url-conkeror-program
           (append
@@ -1496,7 +1496,7 @@ The `browse-url-gnudoit-program' program is used with 
options given by
 `browse-url-gnudoit-args'.  Default to the URL around or before point."
   (declare (obsolete nil "25.1"))
   (interactive (browse-url-interactive-arg "W3 URL: "))
-  (apply 'start-process (concat "gnudoit:" url) nil
+  (apply #'start-process (concat "gnudoit:" url) nil
         browse-url-gnudoit-program
         (append browse-url-gnudoit-args
                 (list (concat "(w3-fetch \"" url "\")")
@@ -1676,7 +1676,7 @@ don't offer a form of remote control."
   (interactive (browse-url-interactive-arg "URL: "))
   (if (not browse-url-generic-program)
       (error "No browser defined (`browse-url-generic-program')"))
-  (apply 'call-process browse-url-generic-program nil
+  (apply #'call-process browse-url-generic-program nil
         0 nil
         (append browse-url-generic-args (list url))))
 
@@ -1751,9 +1751,9 @@ from `browse-url-elinks-wrapper'."
 
 (defvar browse-url-button-map
   (let ((map (make-sparse-keymap)))
-    (define-key map "\r" 'browse-url-button-open)
-    (define-key map [mouse-2] 'browse-url-button-open)
-    (define-key map "w" 'browse-url-button-copy)
+    (define-key map "\r" #'browse-url-button-open)
+    (define-key map [mouse-2] #'browse-url-button-open)
+    (define-key map "w" #'browse-url-button-copy)
     map)
   "The keymap used for browse-url buttons.")
 
diff --git a/lisp/net/dictionary.el b/lisp/net/dictionary.el
index aba3698..5938b81 100644
--- a/lisp/net/dictionary.el
+++ b/lisp/net/dictionary.el
@@ -76,7 +76,7 @@ You can specify here:
 - dict.org: Only use dict.org
 - User-defined: You can specify your own server here"
   :group 'dictionary
-  :set 'dictionary-set-server-var
+  :set #'dictionary-set-server-var
   :type '(choice (const :tag "Automatic" nil)
                  (const :tag "localhost" "localhost")
                  (const :tag "dict.org" "dict.org")
@@ -88,7 +88,7 @@ You can specify here:
   "The port of the dictionary server.
 This port is propably always 2628 so there should be no need to modify it."
   :group 'dictionary
-  :set 'dictionary-set-server-var
+  :set #'dictionary-set-server-var
   :type 'number
   :version "28.1")
 
@@ -189,7 +189,7 @@ where the current word was found."
   nil
   "Connects via a HTTP proxy using the CONNECT command when not nil."
   :group 'dictionary-proxy
-  :set 'dictionary-set-server-var
+  :set #'dictionary-set-server-var
   :type 'boolean
   :version "28.1")
 
@@ -197,7 +197,7 @@ where the current word was found."
   "proxy"
   "The name of the HTTP proxy to use when `dictionary-use-http-proxy' is set."
   :group 'dictionary-proxy
-  :set 'dictionary-set-server-var
+  :set #'dictionary-set-server-var
   :type 'string
   :version "28.1")
 
@@ -205,7 +205,7 @@ where the current word was found."
   3128
   "The port of the proxy server, used only when `dictionary-use-http-proxy' is 
set."
   :group 'dictionary-proxy
-  :set 'dictionary-set-server-var
+  :set #'dictionary-set-server-var
   :type 'number
   :version "28.1")
 
@@ -331,19 +331,19 @@ is utf-8"
     (suppress-keymap map)
     (set-keymap-parent map button-buffer-map)
 
-    (define-key map "q" 'dictionary-close)
-    (define-key map "h" 'dictionary-help)
-    (define-key map "s" 'dictionary-search)
-    (define-key map "d" 'dictionary-lookup-definition)
-    (define-key map "D" 'dictionary-select-dictionary)
-    (define-key map "M" 'dictionary-select-strategy)
-    (define-key map "m" 'dictionary-match-words)
-    (define-key map "l" 'dictionary-previous)
-    (define-key map "n" 'forward-button)
-    (define-key map "p" 'backward-button)
-    (define-key map " " 'scroll-up-command)
-    (define-key map [?\S-\ ] 'scroll-down-command)
-    (define-key map (read-kbd-macro "M-SPC") 'scroll-down-command)
+    (define-key map "q" #'dictionary-close)
+    (define-key map "h" #'dictionary-help)
+    (define-key map "s" #'dictionary-search)
+    (define-key map "d" #'dictionary-lookup-definition)
+    (define-key map "D" #'dictionary-select-dictionary)
+    (define-key map "M" #'dictionary-select-strategy)
+    (define-key map "m" #'dictionary-match-words)
+    (define-key map "l" #'dictionary-previous)
+    (define-key map "n" #'forward-button)
+    (define-key map "p" #'backward-button)
+    (define-key map " " #'scroll-up-command)
+    (define-key map [?\S-\ ] #'scroll-down-command)
+    (define-key map (read-kbd-macro "M-SPC") #'scroll-down-command)
     map)
   "Keymap for the dictionary mode.")
 
@@ -413,7 +413,7 @@ This is a quick reference to this mode describing the 
default key bindings:
   (make-local-variable 'dictionary-default-dictionary)
   (make-local-variable 'dictionary-default-strategy)
 
-  (add-hook 'kill-buffer-hook 'dictionary-close t t)
+  (add-hook 'kill-buffer-hook #'dictionary-close t t)
   (run-hooks 'dictionary-mode-hook))
 
 ;;;###autoload
@@ -535,7 +535,7 @@ The connection takes the proxy setting in customization 
group
 ;; Dealing with closing the buffer
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-(defun dictionary-close (&rest ignored)
+(defun dictionary-close (&rest _ignored)
   "Close the current dictionary buffer and its connection."
   (interactive)
   (if (eq major-mode 'dictionary-mode)
@@ -669,7 +669,7 @@ previous state."
   (setq dictionary-positions (cons (point) (window-start))))
 
 ;; Restore the previous state
-(defun dictionary-restore-state (&rest ignored)
+(defun dictionary-restore-state (&rest _ignored)
   "Restore the state just before the last operation."
   (let ((position (pop dictionary-position-stack))
        (data (pop dictionary-data-stack)))
@@ -829,7 +829,7 @@ The DICTIONARY is only used for decoding the bytes to 
display the DESCRIPTION."
 (defun dictionary-display-word-definition (reply word dictionary)
   "Insert the definition in REPLY for the current WORD from DICTIONARY.
 It will replace links which are found in the REPLY and replace
-them with buttons to perform a a new search."
+them with buttons to perform a new search."
   (let ((start (point)))
     (insert (dictionary-decode-charset reply dictionary))
     (insert "\n\n")
@@ -872,7 +872,7 @@ The word is taken from the buffer, the DICTIONARY is given 
as argument."
                    'help-echo (concat "Press Mouse-2 to lookup \""
                                       word "\" in \"" dictionary "\"")))))
 
-(defun dictionary-select-dictionary (&rest ignored)
+(defun dictionary-select-dictionary (&rest _ignored)
   "Save the current state and start a dictionary selection."
   (interactive)
   (dictionary-ensure-buffer)
@@ -880,7 +880,7 @@ The word is taken from the buffer, the DICTIONARY is given 
as argument."
   (dictionary-do-select-dictionary)
   (dictionary-store-state 'dictionary-do-select-dictionary nil))
 
-(defun dictionary-do-select-dictionary (&rest ignored)
+(defun dictionary-do-select-dictionary (&rest _ignored)
   "The workhorse for doing the dictionary selection."
 
   (message "Looking up databases and descriptions")
@@ -916,7 +916,7 @@ If PATTERN is omitted, it defaults to \"[ 
\\f\\t\\n\\r\\v]+\"."
   (dictionary-display-dictionary-line "! \"The first matching dictionary\"")
   (let* ((reply (dictionary-read-answer))
         (list (dictionary-simple-split-string reply "\n+")))
-    (mapc 'dictionary-display-dictionary-line list))
+    (mapc #'dictionary-display-dictionary-line list))
   (dictionary-post-buffer))
 
 (defun dictionary-display-dictionary-line (string)
@@ -984,7 +984,7 @@ If PATTERN is omitted, it defaults to \"[ 
\\f\\t\\n\\r\\v]+\"."
 
       (dictionary-store-state 'dictionary-display-more-info dictionary))))
 
-(defun dictionary-select-strategy (&rest ignored)
+(defun dictionary-select-strategy (&rest _ignored)
   "Save the current state and start a strategy selection."
   (interactive)
   (dictionary-ensure-buffer)
@@ -1014,7 +1014,7 @@ If PATTERN is omitted, it defaults to \"[ 
\\f\\t\\n\\r\\v]+\"."
   (dictionary-display-strategy-line ". \"The servers default\"")
   (let* ((reply (dictionary-read-answer))
         (list (dictionary-simple-split-string reply "\n+")))
-    (mapc 'dictionary-display-strategy-line list))
+    (mapc #'dictionary-display-strategy-line list))
   (dictionary-post-buffer))
 
 (defun dictionary-display-strategy-line (string)
@@ -1030,7 +1030,7 @@ If PATTERN is omitted, it defaults to \"[ 
\\f\\t\\n\\r\\v]+\"."
                          'help-echo (purecopy "Mouse-2 to select this matching 
algorithm"))
          (insert "\n")))))
 
-(defun dictionary-set-strategy (strategy &rest ignored)
+(defun dictionary-set-strategy (strategy &rest _ignored)
   "Select this STRATEGY as new default."
   (setq dictionary-default-strategy strategy)
   (dictionary-restore-state)
@@ -1194,7 +1194,7 @@ allows editing it."
   (describe-function 'dictionary-mode))
 
 ;;;###autoload
-(defun dictionary-match-words (&optional pattern &rest ignored)
+(defun dictionary-match-words (&optional pattern &rest _ignored)
   "Search PATTERN in current default dictionary using default strategy."
   (interactive)
   ;; can't use interactive because of mouse events
@@ -1270,7 +1270,7 @@ allows editing it."
 
 (defun dictionary-read-definition (&ignore)
   (let ((list (dictionary-simple-split-string (dictionary-read-answer) "\n+")))
-    (mapconcat 'identity (cdr list) "\n")))
+    (mapconcat #'identity (cdr list) "\n")))
 
 ;;; Tooltip support for GNU Emacs
 (defvar global-dictionary-tooltip-mode
@@ -1322,8 +1322,8 @@ will be set to nil."
   (interactive)
   (tooltip-mode on)
   (if on
-      (add-hook 'tooltip-functions 'dictionary-display-tooltip)
-    (remove-hook 'tooltip-functions 'dictionary-display-tooltip)))
+      (add-hook 'tooltip-functions #'dictionary-display-tooltip)
+    (remove-hook 'tooltip-functions #'dictionary-display-tooltip)))
 
 ;;;###autoload
 (defun dictionary-tooltip-mode (&optional arg)
@@ -1364,9 +1364,8 @@ any buffer where (dictionary-tooltip-mode 1) has been 
called."
     (make-local-variable 'dictionary-tooltip-mouse-event)
     (setq-default track-mouse on)
     (dictionary-switch-tooltip-mode 1)
-    (if on
-        (global-set-key [mouse-movement] 'dictionary-tooltip-track-mouse)
-      (global-set-key [mouse-movement] 'ignore))
+    (global-set-key [mouse-movement]
+                    (if on #'dictionary-tooltip-track-mouse #'ignore))
     on))
 
 (provide 'dictionary)
diff --git a/lisp/net/dig.el b/lisp/net/dig.el
index 92dcf73..ddbfb95 100644
--- a/lisp/net/dig.el
+++ b/lisp/net/dig.el
@@ -79,7 +79,7 @@ and is a commonly available debugging tool."
     (push domain cmdline)
     (if server (push (concat "@" server) cmdline)
       (if dig-dns-server (push (concat "@" dig-dns-server) cmdline)))
-    (apply 'call-process dig-program nil buf nil cmdline)
+    (apply #'call-process dig-program nil buf nil cmdline)
     buf))
 
 (defun dig-extract-rr (domain &optional type class)
@@ -120,7 +120,7 @@ Buffer should contain output generated by `dig-invoke'."
 (defvar dig-mode-map
   (let ((map (make-sparse-keymap)))
     (define-key map "g" nil)
-    (define-key map "q" 'dig-exit)
+    (define-key map "q" #'dig-exit)
     map))
 
 (define-derived-mode dig-mode special-mode "Dig"
diff --git a/lisp/net/dns.el b/lisp/net/dns.el
index 90776e3..1086bab 100644
--- a/lisp/net/dns.el
+++ b/lisp/net/dns.el
@@ -135,8 +135,8 @@ updated.  Set this variable to t to disable the check.")
     (if (stringp ended)
        (if (null name)
            ended
-         (concat (mapconcat 'identity (nreverse name) ".") "." ended))
-      (mapconcat 'identity (nreverse name) "."))))
+         (concat (mapconcat #'identity (nreverse name) ".") "." ended))
+      (mapconcat #'identity (nreverse name) "."))))
 
 (defun dns-write (spec &optional tcp-p)
   "Write a DNS packet according to SPEC.
@@ -283,7 +283,7 @@ If TCP-P, the first two bytes of the packet will be the 
length field."
             (let ((bytes nil))
               (dotimes (_ 4)
                 (push (dns-read-bytes 1) bytes))
-              (mapconcat 'number-to-string (nreverse bytes) ".")))
+              (mapconcat #'number-to-string (nreverse bytes) ".")))
            ((eq type 'AAAA)
             (let (hextets)
               (dotimes (_ 8)
@@ -386,7 +386,7 @@ If REVERSE, look up an IP address."
 
   (when reverse
     (setq name (concat
-               (mapconcat 'identity (nreverse (split-string name "\\.")) ".")
+               (mapconcat #'identity (nreverse (split-string name "\\.")) ".")
                ".in-addr.arpa")
          type 'PTR))
 
diff --git a/lisp/net/eudc-bob.el b/lisp/net/eudc-bob.el
index 456d70e..1d7af7f 100644
--- a/lisp/net/eudc-bob.el
+++ b/lisp/net/eudc-bob.el
@@ -41,38 +41,38 @@
 
 (defvar eudc-bob-generic-keymap
   (let ((map (make-sparse-keymap)))
-    (define-key map "s" 'eudc-bob-save-object)
-    (define-key map "!" 'eudc-bob-pipe-object-to-external-program)
-    (define-key map [down-mouse-3] 'eudc-bob-popup-menu)
+    (define-key map "s" #'eudc-bob-save-object)
+    (define-key map "!" #'eudc-bob-pipe-object-to-external-program)
+    (define-key map [down-mouse-3] #'eudc-bob-popup-menu)
     map)
   "Keymap for multimedia objects.")
 
 (defvar eudc-bob-image-keymap
   (let ((map (make-sparse-keymap)))
     (set-keymap-parent map eudc-bob-generic-keymap)
-    (define-key map "t" 'eudc-bob-toggle-inline-display)
+    (define-key map "t" #'eudc-bob-toggle-inline-display)
     map)
   "Keymap for inline images.")
 
 (defvar eudc-bob-sound-keymap
   (let ((map (make-sparse-keymap)))
     (set-keymap-parent map eudc-bob-generic-keymap)
-    (define-key map (kbd "RET") 'eudc-bob-play-sound-at-point)
-    (define-key map [down-mouse-2] 'eudc-bob-play-sound-at-mouse)
+    (define-key map (kbd "RET") #'eudc-bob-play-sound-at-point)
+    (define-key map [down-mouse-2] #'eudc-bob-play-sound-at-mouse)
     map)
   "Keymap for inline sounds.")
 
 (defvar eudc-bob-url-keymap
   (let ((map (make-sparse-keymap)))
-    (define-key map (kbd "RET") 'browse-url-at-point)
-    (define-key map [down-mouse-2] 'browse-url-at-mouse)
+    (define-key map (kbd "RET") #'browse-url-at-point)
+    (define-key map [down-mouse-2] #'browse-url-at-mouse)
     map)
   "Keymap for inline urls.")
 
 (defvar eudc-bob-mail-keymap
   (let ((map (make-sparse-keymap)))
-    (define-key map (kbd "RET") 'goto-address-at-point)
-    (define-key map [down-mouse-2] 'goto-address-at-point)
+    (define-key map (kbd "RET") #'goto-address-at-point)
+    (define-key map [down-mouse-2] #'goto-address-at-point)
     map)
   "Keymap for inline e-mail addresses.")
 
diff --git a/lisp/net/eudc-export.el b/lisp/net/eudc-export.el
index bac75e6..66db781 100644
--- a/lisp/net/eudc-export.el
+++ b/lisp/net/eudc-export.el
@@ -1,4 +1,4 @@
-;;; eudc-export.el --- functions to export EUDC query results
+;;; eudc-export.el --- functions to export EUDC query results  -*- 
lexical-binding: t; -*-
 
 ;; Copyright (C) 1998-2021 Free Software Foundation, Inc.
 
@@ -35,6 +35,7 @@
 ;; NOERROR is so we can compile it.
 (require 'bbdb nil t)
 (require 'bbdb-com nil t)
+(require 'cl-lib)
 
 (defun eudc-create-bbdb-record (record &optional silent)
   "Create a BBDB record using the RECORD alist.
@@ -42,24 +43,22 @@ RECORD is an alist of (KEY . VALUE) where KEY is a 
directory attribute name
 symbol and VALUE is the corresponding value for the record.
 If SILENT is non-nil then the created BBDB record is not displayed."
   (require 'bbdb)
+  (declare-function bbdb-create-internal "bbdb-com" (&rest spec))
+  (declare-function bbdb-display-records "bbdb"
+                    (records &optional layout append))
   ;; This function runs in a special context where lisp symbols corresponding
   ;; to field names in record are bound to the corresponding values
-  (eval
-   `(let* (,@(mapcar (lambda (c)
-                       (list (car c) (if (listp (cdr c))
-                                         (list 'quote (cdr c))
-                                       (cdr c))))
-                    record)
-            bbdb-name
-            bbdb-company
-            bbdb-net
-            bbdb-address
-            bbdb-phones
-            bbdb-notes
-            spec
-            bbdb-record
-            value
-            (conversion-alist (symbol-value eudc-bbdb-conversion-alist)))
+  (cl-progv (mapcar #'car record) (mapcar #'cdr record)
+    (let* (bbdb-name
+          bbdb-company
+          bbdb-net
+          bbdb-address
+          bbdb-phones
+          bbdb-notes
+          spec
+          bbdb-record
+          value
+          (conversion-alist (symbol-value eudc-bbdb-conversion-alist)))
 
       ;; BBDB standard fields
       (setq bbdb-name (eudc-parse-spec (cdr (assq 'name conversion-alist)) 
record nil)
@@ -68,14 +67,14 @@ If SILENT is non-nil then the created BBDB record is not 
displayed."
            bbdb-notes (eudc-parse-spec (cdr (assq 'notes conversion-alist)) 
record nil))
       (setq spec (cdr (assq 'address conversion-alist)))
       (setq bbdb-address (delq nil (eudc-parse-spec (if (listp (car spec))
-                                                     spec
-                                                   (list spec))
-                                                 record t)))
+                                                       spec
+                                                     (list spec))
+                                                   record t)))
       (setq spec (cdr (assq 'phone conversion-alist)))
       (setq bbdb-phones (delq nil (eudc-parse-spec (if (listp (car spec))
-                                                    spec
-                                                  (list spec))
-                                                record t)))
+                                                      spec
+                                                    (list spec))
+                                                  record t)))
       ;; BBDB custom fields
       (setq bbdb-notes (append (list (and bbdb-notes (cons 'notes bbdb-notes)))
                                (mapcar (lambda (mapping)
@@ -85,19 +84,20 @@ If SILENT is non-nil then the created BBDB record is not 
displayed."
                                              (cons (car mapping) value)))
                                       conversion-alist)))
       (setq bbdb-notes (delq nil bbdb-notes))
-      (setq bbdb-record (bbdb-create-internal
-                        bbdb-name
-                        ,@(when (eudc--using-bbdb-3-or-newer-p)
-                            '(nil
-                              nil))
-                        bbdb-company
-                        bbdb-net
-                        ,@(if (eudc--using-bbdb-3-or-newer-p)
-                              '(bbdb-phones
-                                bbdb-address)
-                            '(bbdb-address
-                              bbdb-phones))
-                        bbdb-notes))
+      (setq bbdb-record
+           (apply #'bbdb-create-internal
+                  `(,bbdb-name
+                    ,@(when (eudc--using-bbdb-3-or-newer-p)
+                        '(nil
+                          nil))
+                    ,bbdb-company
+                    ,bbdb-net
+                    ,@(if (eudc--using-bbdb-3-or-newer-p)
+                          (list bbdb-phones
+                                bbdb-address)
+                        (list bbdb-address
+                              bbdb-phones))
+                    ,bbdb-notes)))
       (or silent
          (bbdb-display-records (list bbdb-record))))))
 
@@ -111,7 +111,7 @@ If RECURSE is non-nil then SPEC may be a list of atomic 
specs."
             (symbolp (car spec))
             (fboundp (car spec))))
     (condition-case nil
-       (eval spec)
+       (eval spec t)
       (void-variable nil)))
    ((and recurse
         (listp spec))
@@ -194,9 +194,9 @@ LOCATION is used as the phone location for BBDB."
           (signal (car err) (cdr err)))))
       (if (= 3 (length phone-list))
          (setq phone-list (append phone-list '(nil))))
-      (apply 'vector location phone-list)))
+      (apply #'vector location phone-list)))
    ((listp phone)
-    (vector location (mapconcat 'identity phone ", ")))
+    (vector location (mapconcat #'identity phone ", ")))
    (t
     (error "Invalid phone specification"))))
 
diff --git a/lisp/net/eudc-hotlist.el b/lisp/net/eudc-hotlist.el
index e4b7e8a..a737a99 100644
--- a/lisp/net/eudc-hotlist.el
+++ b/lisp/net/eudc-hotlist.el
@@ -1,4 +1,4 @@
-;;; eudc-hotlist.el --- hotlist management for EUDC
+;;; eudc-hotlist.el --- hotlist management for EUDC  -*- lexical-binding: t; 
-*-
 
 ;; Copyright (C) 1998-2021 Free Software Foundation, Inc.
 
@@ -37,12 +37,12 @@
 
 (defvar eudc-hotlist-mode-map
   (let ((map (make-sparse-keymap)))
-    (define-key map "a" 'eudc-hotlist-add-server)
-    (define-key map "d" 'eudc-hotlist-delete-server)
-    (define-key map "s" 'eudc-hotlist-select-server)
-    (define-key map "t" 'eudc-hotlist-transpose-servers)
-    (define-key map "q" 'eudc-hotlist-quit-edit)
-    (define-key map "x" 'kill-current-buffer)
+    (define-key map "a" #'eudc-hotlist-add-server)
+    (define-key map "d" #'eudc-hotlist-delete-server)
+    (define-key map "s" #'eudc-hotlist-select-server)
+    (define-key map "t" #'eudc-hotlist-transpose-servers)
+    (define-key map "q" #'eudc-hotlist-quit-edit)
+    (define-key map "x" #'kill-current-buffer)
     map))
 
 (define-derived-mode eudc-hotlist-mode fundamental-mode "EUDC-Servers"
diff --git a/lisp/net/eudc.el b/lisp/net/eudc.el
index 4f04804..c112d27 100644
--- a/lisp/net/eudc.el
+++ b/lisp/net/eudc.el
@@ -65,12 +65,12 @@
 (defvar eudc-mode-map
   (let ((map (make-sparse-keymap)))
     (set-keymap-parent map widget-keymap)
-    (define-key map "q" 'kill-current-buffer)
-    (define-key map "x" 'kill-current-buffer)
-    (define-key map "f" 'eudc-query-form)
-    (define-key map "b" 'eudc-try-bbdb-insert)
-    (define-key map "n" 'eudc-move-to-next-record)
-    (define-key map "p" 'eudc-move-to-previous-record)
+    (define-key map "q" #'kill-current-buffer)
+    (define-key map "x" #'kill-current-buffer)
+    (define-key map "f" #'eudc-query-form)
+    (define-key map "b" #'eudc-try-bbdb-insert)
+    (define-key map "n" #'eudc-move-to-next-record)
+    (define-key map "p" #'eudc-move-to-previous-record)
     map))
 
 (defvar mode-popup-menu)
@@ -407,7 +407,7 @@ if any, is called to print the value in cdr of FIELD."
        (val (cdr field)))
     (if match
        (progn
-         (eval (list (cdr match) val))
+         (funcall (cdr match) val)
          (insert "\n"))
       (mapc
        (lambda (val-elem)
diff --git a/lisp/net/eudcb-bbdb.el b/lisp/net/eudcb-bbdb.el
index e11458b..e241a1c 100644
--- a/lisp/net/eudcb-bbdb.el
+++ b/lisp/net/eudcb-bbdb.el
@@ -1,4 +1,4 @@
-;;; eudcb-bbdb.el --- Emacs Unified Directory Client - BBDB Backend
+;;; eudcb-bbdb.el --- Emacs Unified Directory Client - BBDB Backend  -*- 
lexical-binding: t; -*-
 
 ;; Copyright (C) 1998-2021 Free Software Foundation, Inc.
 
@@ -34,6 +34,7 @@
 ;; Make it loadable on systems without bbdb.
 (require 'bbdb nil t)
 (require 'bbdb-com nil t)
+(require 'seq)
 
 ;;{{{      Internal cooking
 
@@ -87,33 +88,30 @@ BBDB < 3 used `net'; BBDB >= 3 uses `mail'."
   "Return RECORD if it matches `eudc-bbdb-current-query', nil otherwise."
   (require 'bbdb)
   (catch 'unmatch
-    (progn
-      (dolist (condition eudc-bbdb-current-query)
-        (let ((attr (car condition))
-              (val (cdr condition))
-              (case-fold-search t)
-              bbdb-val)
-          (or (and (memq attr '(firstname lastname aka company phones
-                                addresses net))
-                   (progn
-                     (setq bbdb-val
-                           (eval (list (intern (concat "bbdb-record-"
-                                                       (symbol-name
-                                                        (eudc-bbdb-field
-                                                         attr))))
-                                       'record)))
-                     (if (listp bbdb-val)
-                         (if eudc-bbdb-enable-substring-matches
-                             (eval `(or ,@(mapcar (lambda (subval)
-                                                    (string-match val subval))
-                                                  bbdb-val)))
-                           (member (downcase val)
-                                   (mapcar 'downcase bbdb-val)))
+    (dolist (condition eudc-bbdb-current-query)
+      (let ((attr (car condition))
+            (val (cdr condition))
+            (case-fold-search t))
+        (or (and (memq attr '(firstname lastname aka company phones
+                              addresses net))
+                 (let ((bbdb-val
+                        (funcall (intern (concat "bbdb-record-"
+                                                 (symbol-name
+                                                  (eudc-bbdb-field
+                                                   attr))))
+                                 record)))
+                   (if (listp bbdb-val)
                        (if eudc-bbdb-enable-substring-matches
-                           (string-match val bbdb-val)
-                         (string-equal (downcase val) (downcase bbdb-val))))))
-              (throw 'unmatch nil))))
-      record)))
+                           (seq-some (lambda (subval)
+                                       (string-match val subval))
+                                     bbdb-val)
+                         (member (downcase val)
+                                 (mapcar #'downcase bbdb-val)))
+                     (if eudc-bbdb-enable-substring-matches
+                         (string-match val bbdb-val)
+                       (string-equal (downcase val) (downcase bbdb-val))))))
+            (throw 'unmatch nil))))
+    record))
 
 ;; External.
 (declare-function bbdb-phone-location   "ext:bbdb" t) ; via bbdb-defstruct
@@ -182,40 +180,34 @@ The record is filtered according to 
`eudc-bbdb-current-return-attributes'."
   (require 'bbdb)
   (let ((attrs (or eudc-bbdb-current-return-attributes
                   '(firstname lastname aka company phones addresses net 
notes)))
-       attr
-       eudc-rec
-       val)
-    (while (prog1
-              (setq attr (car attrs))
-            (setq attrs (cdr attrs)))
-      (cond
-       ((eq attr 'phones)
-       (setq val (eudc-bbdb-extract-phones record)))
-       ((eq attr 'addresses)
-       (setq val (eudc-bbdb-extract-addresses record)))
-       ((eq attr 'notes)
-        (if (eudc--using-bbdb-3-or-newer-p)
-            (setq val (bbdb-record-xfield record 'notes))
-          (setq val (bbdb-record-notes record))))
-       ((memq attr '(firstname lastname aka company net))
-       (setq val (eval
-                  (list (intern
-                         (concat "bbdb-record-"
-                                 (symbol-name (eudc-bbdb-field attr))))
-                        'record))))
-       (t
-       (error "Unknown BBDB attribute")))
-      (cond
-       ((or (not val) (equal val ""))) ; do nothing
-       ((memq attr '(phones addresses))
-       (setq eudc-rec (append val eudc-rec)))
-       ((and (listp val)
-            (= 1 (length val)))
-       (setq eudc-rec (cons (cons attr (car val)) eudc-rec)))
-       ((> (length val) 0)
-       (setq eudc-rec (cons (cons attr val) eudc-rec)))
-       (t
-       (error "Unexpected attribute value"))))
+       eudc-rec)
+    (dolist (attr attrs)
+      (let ((val
+             (pcase attr
+              ('phones    (eudc-bbdb-extract-phones record))
+             ('addresses (eudc-bbdb-extract-addresses record))
+             ('notes
+               (if (eudc--using-bbdb-3-or-newer-p)
+                   (bbdb-record-xfield record 'notes)
+                 (bbdb-record-notes record)))
+              ((or 'firstname 'lastname 'aka 'company 'net)
+               (funcall (intern
+                        (concat "bbdb-record-"
+                                (symbol-name (eudc-bbdb-field attr))))
+                       record))
+             (_
+              (error "Unknown BBDB attribute")))))
+       (cond
+        ((or (not val) (equal val ""))) ; do nothing
+        ((memq attr '(phones addresses))
+         (setq eudc-rec (append val eudc-rec)))
+        ((and (listp val)
+              (= 1 (length val)))
+         (push (cons attr (car val)) eudc-rec))
+        ((> (length val) 0)
+         (push (cons attr val) eudc-rec))
+        (t
+         (error "Unexpected attribute value")))))
     (nreverse eudc-rec)))
 
 
@@ -240,21 +232,20 @@ RETURN-ATTRS is a list of attributes to return, 
defaulting to
     (while (and records (> (length query-attrs) 0))
       (setq bbdb-attrs (append bbdb-attrs (list (car query-attrs))))
       (if (car query-attrs)
-         (setq records (eval `(bbdb-search ,(quote records) ,@bbdb-attrs))))
+         ;; BEWARE: `bbdb-search' is a macro!
+         (setq records (eval `(bbdb-search records ,@bbdb-attrs) t)))
       (setq query-attrs (cdr query-attrs)))
     (mapc (lambda (record)
             (setq filtered (eudc-filter-duplicate-attributes record))
             ;; If there were duplicate attributes reverse the order of the
             ;; record so the unique attributes appear first
             (if (> (length filtered) 1)
-                (setq filtered (mapcar (lambda (rec)
-                                         (reverse rec))
-                                       filtered)))
+                (setq filtered (mapcar #'reverse filtered)))
             (setq result (append result filtered)))
          (delq nil
-               (mapcar 'eudc-bbdb-format-record-as-result
+               (mapcar #'eudc-bbdb-format-record-as-result
                        (delq nil
-                             (mapcar 'eudc-bbdb-filter-non-matching-record
+                             (mapcar #'eudc-bbdb-filter-non-matching-record
                                      records)))))
     result))
 
diff --git a/lisp/net/eudcb-ldap.el b/lisp/net/eudcb-ldap.el
index 4623079..0aff276 100644
--- a/lisp/net/eudcb-ldap.el
+++ b/lisp/net/eudcb-ldap.el
@@ -1,4 +1,4 @@
-;;; eudcb-ldap.el --- Emacs Unified Directory Client - LDAP Backend
+;;; eudcb-ldap.el --- Emacs Unified Directory Client - LDAP Backend  -*- 
lexical-binding: t; -*-
 
 ;; Copyright (C) 1998-2021 Free Software Foundation, Inc.
 
@@ -38,10 +38,10 @@
 
 ;;{{{      Internal cooking
 
-(eval-and-compile
+(defalias 'eudc-ldap-get-host-parameter
   (if (fboundp 'ldap-get-host-parameter)
-      (fset 'eudc-ldap-get-host-parameter 'ldap-get-host-parameter)
-    (defun eudc-ldap-get-host-parameter (host parameter)
+      #'ldap-get-host-parameter
+    (lambda (host parameter)
       "Get the value of PARAMETER for HOST in `ldap-host-parameters-alist'."
       (plist-get (cdr (assoc host ldap-host-parameters-alist))
                 parameter))))
@@ -84,7 +84,7 @@
    record))
 
 (defun eudc-filter-$ (string)
-  (mapconcat 'identity (split-string string "\\$") "\n"))
+  (mapconcat #'identity (split-string string "\\$") "\n"))
 
 (defun eudc-ldap-cleanup-record-filtering-addresses (record)
   "Clean up RECORD to make it suitable for EUDC.
@@ -104,7 +104,7 @@ multiple addresses."
            (value (cdr field)))
        (when (and clean-up-addresses
                   (memq name '(postaladdress registeredaddress)))
-         (setq value (mapcar 'eudc-filter-$ value)))
+         (setq value (mapcar #'eudc-filter-$ value)))
        (if (eq name 'mail)
            (setq mail-addresses (append mail-addresses value))
          (push (cons name (if (cdr value)
@@ -126,9 +126,9 @@ RETURN-ATTRS is a list of attributes to return, defaulting 
to
   (let ((result (ldap-search (eudc-ldap-format-query-as-rfc1558 query)
                             eudc-server
                             (if (listp return-attrs)
-                                (mapcar 'symbol-name return-attrs))))
+                                (mapcar #'symbol-name return-attrs))))
        final-result)
-    (setq result (mapcar 'eudc-ldap-cleanup-record-filtering-addresses result))
+    (setq result (mapcar #'eudc-ldap-cleanup-record-filtering-addresses 
result))
 
     (if (and eudc-strict-return-matches
             return-attrs
@@ -154,7 +154,7 @@ attribute names are returned.  Default to `person'."
   (let ((ldap-host-parameters-alist
         (list (cons eudc-server
                     '(scope subtree sizelimit 1)))))
-    (mapcar 'eudc-ldap-cleanup-record-filtering-addresses
+    (mapcar #'eudc-ldap-cleanup-record-filtering-addresses
            (ldap-search
             (eudc-ldap-format-query-as-rfc1558
              (list (cons "objectclass"
diff --git a/lisp/net/eudcb-mab.el b/lisp/net/eudcb-mab.el
index eb7032a..732881f 100644
--- a/lisp/net/eudcb-mab.el
+++ b/lisp/net/eudcb-mab.el
@@ -1,4 +1,4 @@
-;;; eudcb-mab.el --- Emacs Unified Directory Client - AddressBook backend
+;;; eudcb-mab.el --- Emacs Unified Directory Client - AddressBook backend  -*- 
lexical-binding: t; -*-
 
 ;; Copyright (C) 2003-2021 Free Software Foundation, Inc.
 
diff --git a/lisp/net/eudcb-macos-contacts.el b/lisp/net/eudcb-macos-contacts.el
index b07016c..18c8958 100644
--- a/lisp/net/eudcb-macos-contacts.el
+++ b/lisp/net/eudcb-macos-contacts.el
@@ -1,4 +1,4 @@
-;;; eudcb-macos-contacts.el --- EUDC - macOS Contacts backend
+;;; eudcb-macos-contacts.el --- EUDC - macOS Contacts backend  -*- 
lexical-binding: t; -*-
 
 ;; Copyright (C) 2020-2021 Free Software Foundation, Inc.
 
@@ -74,7 +74,7 @@ end tell" str))
                     "`osascript' executable not found. "
                     "Is this is a macOS 10.0 or later system?"))))
 
-(defun eudc-macos-contacts-query-internal (query &optional return-attrs)
+(defun eudc-macos-contacts-query-internal (query &optional _return-attrs)
   "Query macOS Contacts with QUERY.
 QUERY is a list of cons cells (ATTR . VALUE) where ATTRs should be valid
 macOS Contacts attribute names.
diff --git a/lisp/net/gnutls.el b/lisp/net/gnutls.el
index ff58cbb..9c7bcdc 100644
--- a/lisp/net/gnutls.el
+++ b/lisp/net/gnutls.el
@@ -1,4 +1,4 @@
-;;; gnutls.el --- Support SSL/TLS connections through GnuTLS
+;;; gnutls.el --- Support SSL/TLS connections through GnuTLS  -*- 
lexical-binding: t; -*-
 
 ;; Copyright (C) 2010-2021 Free Software Foundation, Inc.
 
@@ -59,7 +59,6 @@ general, Emacs network security is handled by the Network
 Security Manager (NSM), and the default value of nil delegates
 the job of checking the connection security to the NSM.
 See Info node `(emacs) Network Security'."
-  :group 'gnutls
   :type '(choice (const nil)
                  string))
 
@@ -91,7 +90,6 @@ checks are performed at the gnutls level.  Instead the checks 
are
 performed via `open-network-stream' at a higher level by the
 Network Security Manager.  See Info node `(emacs) Network
 Security'."
-  :group 'gnutls
   :version "24.4"
   :type '(choice
           (const t)
@@ -118,7 +116,6 @@ Security'."
 If a file path contains glob wildcards, they will be expanded.
 The files may be in PEM or DER format, as per the GnuTLS documentation.
 The files may not exist, in which case they will be ignored."
-  :group 'gnutls
   :type '(choice (function :tag "Function to produce list of bundle filenames")
                  (repeat (file :tag "Bundle filename"))))
 
@@ -139,7 +136,6 @@ network security is handled at a higher level via
 node `(emacs) Network Security'."
   :type '(choice (const :tag "Use default value" nil)
                  (integer :tag "Number of bits" 2048))
-  :group 'gnutls
   :version "27.1")
 
 (defcustom gnutls-crlfiles
@@ -150,7 +146,6 @@ node `(emacs) Network Security'."
 If a file path contains glob wildcards, they will be expanded.
 The files may be in PEM or DER format, as per the GnuTLS documentation.
 The files may not exist, in which case they will be ignored."
-  :group 'gnutls
   :type '(choice (function :tag "Function to produce list of CRL filenames")
                  (repeat (file :tag "CRL filename")))
   :version "27.1")
diff --git a/lisp/net/goto-addr.el b/lisp/net/goto-addr.el
index d192630..af12f69 100644
--- a/lisp/net/goto-addr.el
+++ b/lisp/net/goto-addr.el
@@ -1,4 +1,4 @@
-;;; goto-addr.el --- click to browse URL or to send to e-mail address
+;;; goto-addr.el --- click to browse URL or to send to e-mail address  -*- 
lexical-binding: t; -*-
 
 ;; Copyright (C) 1995, 2000-2021 Free Software Foundation, Inc.
 
@@ -73,19 +73,16 @@
 (defcustom goto-address-fontify-p t
   "Non-nil means URLs and e-mail addresses in buffer are fontified.
 But only if `goto-address-highlight-p' is also non-nil."
-  :type 'boolean
-  :group 'goto-address)
+  :type 'boolean)
 
 (defcustom goto-address-highlight-p t
   "Non-nil means URLs and e-mail addresses in buffer are highlighted."
-  :type 'boolean
-  :group 'goto-address)
+  :type 'boolean)
 
 (defcustom goto-address-fontify-maximum-size 30000
   "Maximum size of file in which to fontify and/or highlight URLs.
 A value of t means there is no limit--fontify regardless of the size."
-  :type '(choice (integer :tag "Maximum size") (const :tag "No limit" t))
-  :group 'goto-address)
+  :type '(choice (integer :tag "Maximum size") (const :tag "No limit" t)))
 
 (defvar goto-address-mail-regexp
   ;; Actually pretty much any char could appear in the username part.  -stef
@@ -122,30 +119,26 @@ will have no effect.")
 
 (defvar goto-address-highlight-keymap
   (let ((m (make-sparse-keymap)))
-    (define-key m (kbd "<mouse-2>") 'goto-address-at-point)
-    (define-key m (kbd "C-c RET") 'goto-address-at-point)
+    (define-key m (kbd "<mouse-2>") #'goto-address-at-point)
+    (define-key m (kbd "C-c RET") #'goto-address-at-point)
     m)
   "Keymap to hold goto-addr's mouse key defs under highlighted URLs.")
 
 (defcustom goto-address-url-face 'link
   "Face to use for URLs."
-  :type 'face
-  :group 'goto-address)
+  :type 'face)
 
 (defcustom goto-address-url-mouse-face 'highlight
   "Face to use for URLs when the mouse is on them."
-  :type 'face
-  :group 'goto-address)
+  :type 'face)
 
 (defcustom goto-address-mail-face 'italic
   "Face to use for e-mail addresses."
-  :type 'face
-  :group 'goto-address)
+  :type 'face)
 
 (defcustom goto-address-mail-mouse-face 'secondary-selection
   "Face to use for e-mail addresses when the mouse is on them."
-  :type 'face
-  :group 'goto-address)
+  :type 'face)
 
 (defun goto-address-unfontify (start end)
   "Remove `goto-address' fontification from the given region."
@@ -287,7 +280,6 @@ Also fontifies the buffer appropriately (see 
`goto-address-fontify-p' and
 ;;;###autoload
 (define-globalized-minor-mode global-goto-address-mode
   goto-address-mode goto-addr-mode--turn-on
-  :group 'goto-address
   :version "28.1")
 
 ;;;###autoload
diff --git a/lisp/net/net-utils.el b/lisp/net/net-utils.el
index d5aad3a..3a561a0 100644
--- a/lisp/net/net-utils.el
+++ b/lisp/net/net-utils.el
@@ -1,4 +1,4 @@
-;;; net-utils.el --- network functions
+;;; net-utils.el --- network functions  -*- lexical-binding: t; -*-
 
 ;; Copyright (C) 1998-2021 Free Software Foundation, Inc.
 
@@ -67,17 +67,14 @@
       "tracert"
     "traceroute")
   "Program to trace network hops to a destination."
-  :group 'net-utils
   :type  'string)
 
 (defcustom traceroute-program-options nil
   "Options for the traceroute program."
-  :group 'net-utils
   :type  '(repeat string))
 
 (defcustom ping-program "ping"
   "Program to send network test packets to a host."
-  :group 'net-utils
   :type  'string)
 
 ;; On GNU/Linux and Irix, the system's ping program seems to send packets
@@ -87,7 +84,6 @@
        (list "-c" "4"))
   "Options for the ping program.
 These options can be used to limit how many ICMP packets are emitted."
-  :group 'net-utils
   :type  '(repeat string))
 
 (defcustom ifconfig-program
@@ -98,7 +94,6 @@ These options can be used to limit how many ICMP packets are 
emitted."
         (t "ip"))
   "Program to print network configuration information."
   :version "25.1"                       ; add ip
-  :group 'net-utils
   :type  'string)
 
 (defcustom ifconfig-program-options
@@ -108,7 +103,6 @@ These options can be used to limit how many ICMP packets 
are emitted."
   "Options for the ifconfig program."
   :version "25.1"
   :set-after '(ifconfig-program)
-  :group 'net-utils
   :type  '(repeat string))
 
 (defcustom iwconfig-program
@@ -116,7 +110,6 @@ These options can be used to limit how many ICMP packets 
are emitted."
         ((net-utils--executable-find-sbin "iw") "iw")
         (t "iw"))
   "Program to print wireless network configuration information."
-  :group 'net-utils
   :type 'string
   :version "26.1")
 
@@ -124,7 +117,6 @@ These options can be used to limit how many ICMP packets 
are emitted."
   (cond ((string-match-p "iw\\'" iwconfig-program) (list "dev"))
         (t nil))
  "Options for the iwconfig program."
- :group 'net-utils
  :type '(repeat string)
  :version "26.1")
 
@@ -133,25 +125,21 @@ These options can be used to limit how many ICMP packets 
are emitted."
         ((net-utils--executable-find-sbin "ss"))
         (t "ss"))
   "Program to print network statistics."
-  :group 'net-utils
   :type  'string
   :version "26.1")
 
 (defcustom netstat-program-options
   (list "-a")
   "Options for the netstat program."
-  :group 'net-utils
   :type  '(repeat string))
 
 (defcustom arp-program (or (net-utils--executable-find-sbin "arp") "arp")
   "Program to print IP to address translation tables."
-  :group 'net-utils
   :type  'string)
 
 (defcustom arp-program-options
   (list "-a")
   "Options for the arp program."
-  :group 'net-utils
   :type  '(repeat string))
 
 (defcustom route-program
@@ -162,7 +150,6 @@ These options can be used to limit how many ICMP packets 
are emitted."
         ((net-utils--executable-find-sbin "ip"))
         (t "ip"))
   "Program to print routing tables."
-  :group 'net-utils
   :type  'string
   :version "26.1")
 
@@ -171,18 +158,15 @@ These options can be used to limit how many ICMP packets 
are emitted."
         ((string-match-p "netstat\\'" route-program) (list "-r"))
         (t (list "route")))
   "Options for the route program."
-  :group 'net-utils
   :type  '(repeat string)
   :version "26.1")
 
 (defcustom nslookup-program "nslookup"
   "Program to interactively query DNS information."
-  :group 'net-utils
   :type  'string)
 
 (defcustom nslookup-program-options nil
   "Options for the nslookup program."
-  :group 'net-utils
   :type  '(repeat string))
 
 (defcustom nslookup-prompt-regexp "^> "
@@ -190,28 +174,23 @@ These options can be used to limit how many ICMP packets 
are emitted."
 
 This variable is only used if the variable
 `comint-use-prompt-regexp' is non-nil."
-  :group 'net-utils
   :type  'regexp)
 
 (defcustom dig-program "dig"
   "Program to query DNS information."
-  :group 'net-utils
   :type  'string)
 
 (defcustom dig-program-options nil
   "Options for the dig program."
-  :group 'net-utils
   :type '(repeat string)
   :version "26.1")
 
 (defcustom ftp-program "ftp"
   "Program to run to do FTP transfers."
-  :group 'net-utils
   :type  'string)
 
 (defcustom ftp-program-options nil
   "Options for the ftp program."
-  :group 'net-utils
   :type  '(repeat string))
 
 (defcustom ftp-prompt-regexp "^ftp>"
@@ -219,17 +198,14 @@ This variable is only used if the variable
 
 This variable is only used if the variable
 `comint-use-prompt-regexp' is non-nil."
-  :group 'net-utils
   :type  'regexp)
 
 (defcustom smbclient-program "smbclient"
   "Smbclient program."
-  :group 'net-utils
   :type  'string)
 
 (defcustom smbclient-program-options nil
   "Options for the smbclient program."
-  :group 'net-utils
   :type  '(repeat string))
 
 (defcustom smbclient-prompt-regexp "^smb: >"
@@ -237,17 +213,14 @@ This variable is only used if the variable
 
 This variable is only used if the variable
 `comint-use-prompt-regexp' is non-nil."
-  :group 'net-utils
   :type  'regexp)
 
 (defcustom dns-lookup-program "host"
   "Program to interactively query DNS information."
-  :group 'net-utils
   :type  'string)
 
 (defcustom dns-lookup-program-options nil
   "Options for the dns-lookup program."
-  :group 'net-utils
   :type  '(repeat string))
 
 ;; Internal variables
@@ -265,7 +238,7 @@ This variable is only used if the variable
          1 'font-lock-keyword-face)
    ;; Dotted quads
    (list
-    (mapconcat 'identity
+    (mapconcat #'identity
                (make-list 4 "[0-9]+")
                "\\.")
     0 'font-lock-variable-name-face)
@@ -273,7 +246,7 @@ This variable is only used if the variable
    (list
     (let ((host-expression "[-A-Za-z0-9]+"))
       (concat
-       (mapconcat 'identity
+       (mapconcat #'identity
                   (make-list 2 host-expression)
                   "\\.")
        "\\(\\." host-expression "\\)*"))
@@ -288,7 +261,7 @@ This variable is only used if the variable
   (list
    ;; Dotted quads
    (list
-    (mapconcat 'identity (make-list 4 "[0-9]+") "\\.")
+    (mapconcat #'identity (make-list 4 "[0-9]+") "\\.")
     0 'font-lock-variable-name-face)
    ;; Simple rfc4291 addresses
    (list (concat
@@ -300,7 +273,7 @@ This variable is only used if the variable
    (list
     (let ((host-expression "[-A-Za-z0-9]+"))
       (concat
-       (mapconcat 'identity (make-list 2 host-expression) "\\.")
+       (mapconcat #'identity (make-list 2 host-expression) "\\.")
        "\\(\\." host-expression "\\)*"))
     0 'font-lock-variable-name-face))
   "Expressions to font-lock for general network utilities.")
@@ -371,8 +344,8 @@ This variable is only used if the variable
     (erase-buffer)
     (insert header "\n")
     (set-process-filter
-     (apply 'start-process name buf program args)
-     'net-utils-remove-ctrl-m-filter)
+     (apply #'start-process name buf program args)
+     #'net-utils-remove-ctrl-m-filter)
     (display-buffer buf)
     buf))
 
@@ -405,12 +378,12 @@ This variable is only used if the variable
                 `(net-utils-run-simple ,(current-buffer)
                                        ,program-name ,args nodisplay))
     (set-process-filter
-         (apply 'start-process program-name
-                (current-buffer) program-name args)
-         'net-utils-remove-ctrl-m-filter)
+     (apply #'start-process program-name
+            (current-buffer) program-name args)
+     #'net-utils-remove-ctrl-m-filter)
     (unless nodisplay (display-buffer (current-buffer)))))
 
-(defun net-utils--revert-function (&optional ignore-auto noconfirm)
+(defun net-utils--revert-function (&optional _ignore-auto _noconfirm)
   (message "Reverting `%s'..." (buffer-name))
   (apply (car net-utils--revert-cmd) (cdr net-utils--revert-cmd))
   (let ((proc (get-buffer-process (current-buffer))))
@@ -430,7 +403,7 @@ This variable is only used if the variable
    ifconfig-program
    ifconfig-program-options))
 
-(defalias 'ipconfig 'ifconfig)
+(defalias 'ipconfig #'ifconfig)
 
 ;;;###autoload
 (defun iwconfig ()
@@ -532,7 +505,7 @@ in Lisp code."
     (net-utils-run-program
      "Nslookup"
      (concat "** "
-      (mapconcat 'identity
+      (mapconcat #'identity
                (list "Nslookup" host nslookup-program)
                " ** "))
      nslookup-program
@@ -618,7 +591,7 @@ This command uses `nslookup-program' to look up DNS 
records."
 
 (defvar nslookup-mode-map
   (let ((map (make-sparse-keymap)))
-    (define-key map "\t" 'completion-at-point)
+    (define-key map "\t" #'completion-at-point)
     map))
 
 ;; Using a derived mode gives us keymaps, hooks, etc.
@@ -646,9 +619,9 @@ This command uses `dns-lookup-program' for looking up the 
DNS information."
     (net-utils-run-program
      (concat "DNS Lookup [" host "]")
      (concat "** "
-      (mapconcat 'identity
-               (list "DNS Lookup" host dns-lookup-program)
-               " ** "))
+            (mapconcat #'identity
+                       (list "DNS Lookup" host dns-lookup-program)
+                       " ** "))
      dns-lookup-program
      options)))
 
@@ -669,13 +642,14 @@ This command uses `dig-program' for looking up the DNS 
information."
   (net-utils-run-program
    "Dig"
    (concat "** "
-          (mapconcat 'identity
+          (mapconcat #'identity
                      (list "Dig" host dig-program)
                      " ** "))
    dig-program
    options)))
 
 (autoload 'comint-exec "comint")
+(declare-function comint-watch-for-password-prompt "comint" (string))
 
 ;; This is a lot less than ange-ftp, but much simpler.
 ;;;###autoload
@@ -697,7 +671,7 @@ This command uses `dig-program' for looking up the DNS 
information."
 (defvar ftp-mode-map
   (let ((map (make-sparse-keymap)))
     ;; Occasionally useful
-    (define-key map "\t" 'completion-at-point)
+    (define-key map "\t" #'completion-at-point)
     map))
 
 (define-derived-mode ftp-mode comint-mode "FTP"
@@ -710,9 +684,9 @@ This command uses `dig-program' for looking up the DNS 
information."
   ;; password prompts will probably immediately follow the initial
   ;; connection), but it's better than getting prompted twice for the
   ;; same password.
-  (unless (memq 'comint-watch-for-password-prompt
+  (unless (memq #'comint-watch-for-password-prompt
                (default-value 'comint-output-filter-functions))
-    (add-hook 'comint-output-filter-functions 'comint-watch-for-password-prompt
+    (add-hook 'comint-output-filter-functions 
#'comint-watch-for-password-prompt
              nil t)))
 
 (defun smbclient (host service)
@@ -759,9 +733,9 @@ This command uses `smbclient-program' to connect to HOST."
   ;; password prompts will probably immediately follow the initial
   ;; connection), but it's better than getting prompted twice for the
   ;; same password.
-  (unless (memq 'comint-watch-for-password-prompt
+  (unless (memq #'comint-watch-for-password-prompt
                (default-value 'comint-output-filter-functions))
-    (add-hook 'comint-output-filter-functions 'comint-watch-for-password-prompt
+    (add-hook 'comint-output-filter-functions 
#'comint-watch-for-password-prompt
              nil t)))
 
 
@@ -810,7 +784,7 @@ This list is not complete.")
      (error "Could not open connection to %s" host))
     (erase-buffer)
     (set-marker (process-mark tcp-connection) (point-min))
-    (set-process-filter tcp-connection 'net-utils-remove-ctrl-m-filter)
+    (set-process-filter tcp-connection #'net-utils-remove-ctrl-m-filter)
     (and initial-string
         (process-send-string tcp-connection
                              (concat initial-string "\r\n")))
@@ -825,7 +799,6 @@ This list is not complete.")
 If a host name passed to `finger' matches one of these regular
 expressions, it is assumed to be a host that doesn't accept
 queries of the form USER@HOST, and wants a query containing USER only."
-  :group 'net-utils
   :type '(repeat regexp)
   :version "21.1")
 
@@ -852,7 +825,7 @@ and `network-connection-service-alist', which see."
   (let* ((user-and-host (concat user "@" host))
         (process-name (concat "Finger [" user-and-host "]"))
         (regexps finger-X.500-host-regexps)
-        found)
+        ) ;; found
     (and regexps
         (while (not (string-match (car regexps) host))
           (setq regexps (cdr regexps)))
@@ -866,7 +839,6 @@ and `network-connection-service-alist', which see."
 
 (defcustom whois-server-name "rs.internic.net"
   "Default host name for the whois service."
-  :group 'net-utils
   :type  'string)
 
 (defcustom whois-server-list
@@ -880,7 +852,6 @@ and `network-connection-service-alist', which see."
     ("whois.nic.gov")
     ("whois.ripe.net"))
   "A list of whois servers that can be queried."
-  :group 'net-utils
   :type '(repeat (list string)))
 
 ;; FIXME: modern whois clients include a much better tld <-> whois server
@@ -903,14 +874,12 @@ and `network-connection-service-alist', which see."
     ("whois.nic.gov" . "gov")
     ("whois.nic.mil" . "mil"))
   "Alist to map top level domains to whois servers."
-  :group 'net-utils
   :type '(repeat (cons string string)))
 
 (defcustom whois-guess-server t
   "If non-nil then whois will try to deduce the appropriate whois
 server from the query.  If the query doesn't look like a domain or hostname
 then the server named by `whois-server-name' is used."
-  :group 'net-utils
   :type 'boolean)
 
 (defun whois-get-tld (host)
@@ -951,7 +920,6 @@ The port is deduced from 
`network-connection-service-alist'."
 
 (defcustom whois-reverse-lookup-server "whois.arin.net"
   "Server which provides inverse DNS mapping."
-  :group 'net-utils
   :type  'string)
 
 ;;;###autoload
diff --git a/lisp/net/network-stream.el b/lisp/net/network-stream.el
index b45cefc..1983688 100644
--- a/lisp/net/network-stream.el
+++ b/lisp/net/network-stream.el
@@ -248,8 +248,7 @@ gnutls-boot (as returned by `gnutls-boot-parameters')."
             (list key cert)))))))
 
 ;;;###autoload
-(defalias 'open-protocol-stream 'open-network-stream)
-(define-obsolete-function-alias 'open-protocol-stream 'open-network-stream
+(define-obsolete-function-alias 'open-protocol-stream #'open-network-stream
   "26.1")
 
 (defun network-stream-open-plain (name buffer host service parameters)
diff --git a/lisp/net/newst-backend.el b/lisp/net/newst-backend.el
index 418c1e2..c548865 100644
--- a/lisp/net/newst-backend.el
+++ b/lisp/net/newst-backend.el
@@ -163,7 +163,7 @@ These were mostly extracted from the Radio Community Server
 You may add other entries in `newsticker-url-list'."
   :type `(set ,@(mapcar #'newsticker--splicer
                         newsticker--raw-url-list-defaults))
-  :set 'newsticker--set-customvar-retrieval
+  :set #'newsticker--set-customvar-retrieval
   :group 'newsticker-retrieval)
 
 (defcustom newsticker-url-list nil
@@ -217,7 +217,7 @@ which apply for this feed only, overriding the value of
                        (choice :tag "Wget Arguments"
                                (const  :tag "Default arguments" nil)
                                (repeat :tag "Special arguments" string))))
-  :set 'newsticker--set-customvar-retrieval
+  :set #'newsticker--set-customvar-retrieval
   :group 'newsticker-retrieval)
 
 (defcustom newsticker-retrieval-method
@@ -260,7 +260,7 @@ make it less than 1800 seconds (30 minutes)!"
                  (const   :tag "Daily" 86400)
                  (const   :tag "Weekly" 604800)
                  (integer :tag "Interval"))
-  :set 'newsticker--set-customvar-retrieval
+  :set #'newsticker--set-customvar-retrieval
   :group 'newsticker-retrieval)
 
 (defcustom newsticker-desc-comp-max
@@ -549,7 +549,7 @@ name/timer pair to `newsticker--retrieval-timer-list'."
       (if (<= interval 0)
           (setq interval nil))
       (setq timer (run-at-time start-time interval
-                               'newsticker-get-news feed-name))
+                               #'newsticker-get-news feed-name))
       (if interval
           (add-to-list 'newsticker--retrieval-timer-list
                        (cons feed-name timer))))))
@@ -727,10 +727,10 @@ See `newsticker-get-news'."
           (error "Another wget-process is running for %s" feed-name))
       ;; start wget
       (let* ((args (append wget-arguments (list url)))
-             (proc (apply 'start-process feed-name buffername
+             (proc (apply #'start-process feed-name buffername
                           newsticker-wget-name args)))
         (set-process-coding-system proc 'no-conversion 'no-conversion)
-        (set-process-sentinel proc 'newsticker--sentinel)
+        (set-process-sentinel proc #'newsticker--sentinel)
         (process-put proc 'nt-feed-name feed-name)
         (setq newsticker--process-ids (cons (process-id proc)
                                             newsticker--process-ids))
@@ -1131,9 +1131,9 @@ Restore an xml-string from a an xml NODE that was 
returned by xml-parse..."
         (children (cddr node)))
     (concat "<" qname
             (when att-list " ")
-            (mapconcat 'newsticker--unxml-attribute att-list " ")
+            (mapconcat #'newsticker--unxml-attribute att-list " ")
             ">"
-            (mapconcat 'newsticker--unxml children "") "</" qname ">")))
+            (mapconcat #'newsticker--unxml children "") "</" qname ">")))
 
 (defun newsticker--unxml-attribute (attribute)
   "Actually restore xml-string of an ATTRIBUTE of an xml node."
@@ -1580,7 +1580,7 @@ Remove the pre-formatted from `newsticker--cache'."
   "Forget all cached pre-formatted data.
 Remove the pre-formatted from `newsticker--cache'."
   (mapc (lambda (feed)
-          (mapc 'newsticker--do-forget-preformatted
+          (mapc #'newsticker--do-forget-preformatted
                 (cdr feed)))
         newsticker--cache)
   (when (fboundp 'newsticker--buffer-set-uptodate)
@@ -1593,7 +1593,7 @@ This function calls `message' with arguments STRING and 
ARGS, if
   (and newsticker-debug
        ;;(not (active-minibuffer-window))
        ;;(not (current-message))
-       (apply 'message string args)))
+       (apply #'message string args)))
 
 (defun newsticker--decode-iso8601-date (string)
   "Return ISO8601-encoded STRING in format like `encode-time'.
@@ -1751,10 +1751,10 @@ Save image as FILENAME in DIRECTORY, download it from 
URL."
                  feed-name))
       ;; start wget
       (let* ((args (append wget-arguments (list url)))
-             (proc (apply 'start-process proc-name buffername
+             (proc (apply #'start-process proc-name buffername
                           newsticker-wget-name args)))
         (set-process-coding-system proc 'no-conversion 'no-conversion)
-        (set-process-sentinel proc 'newsticker--image-sentinel)
+        (set-process-sentinel proc #'newsticker--image-sentinel)
         (process-put proc 'nt-directory directory)
         (process-put proc 'nt-feed-name feed-name)
         (process-put proc 'nt-filename filename)))))
@@ -2149,7 +2149,7 @@ FEED is a symbol!"
   "Save cache data for all feeds."
   (unless (file-directory-p newsticker-dir)
     (make-directory newsticker-dir t))
-  (mapc 'newsticker--cache-save-feed newsticker--cache)
+  (mapc #'newsticker--cache-save-feed newsticker--cache)
   nil)
 
 (defun newsticker--cache-save-feed (feed)
@@ -2223,7 +2223,7 @@ If AGES is nil, the total number of items is returned."
 (defun newsticker--stat-num-items-total (&optional age)
   "Return total number of items in all feeds which have the given AGE.
 If AGE is nil, the total number of items is returned."
-  (apply '+
+  (apply #'+
          (mapcar (lambda (feed)
                    (if age
                        (newsticker--stat-num-items (intern (car feed)) age)
@@ -2395,7 +2395,7 @@ the item."
             (make-directory temp-dir t))
           (cd temp-dir)
           (message "Getting image %s" url)
-          (apply 'start-process "wget-image"
+          (apply #'start-process "wget-image"
                  " *newsticker-wget-download-images*"
                  newsticker-wget-name
                  (list url))
@@ -2417,7 +2417,7 @@ This function is suited for adding it to 
`newsticker-new-item-functions'."
           (make-directory temp-dir t))
         (cd temp-dir)
         (message "Getting enclosure %s" url)
-        (apply 'start-process "wget-enclosure"
+        (apply #'start-process "wget-enclosure"
                " *newsticker-wget-download-enclosures*"
                newsticker-wget-name
                (list url))
diff --git a/lisp/net/newst-plainview.el b/lisp/net/newst-plainview.el
index 21d47b8..705bff6 100644
--- a/lisp/net/newst-plainview.el
+++ b/lisp/net/newst-plainview.el
@@ -1,4 +1,4 @@
-;;; newst-plainview.el --- Single buffer frontend for newsticker.
+;;; newst-plainview.el --- Single buffer frontend for newsticker.  -*- 
lexical-binding: t; -*-
 
 ;; Copyright (C) 2003-2021 Free Software Foundation, Inc.
 
@@ -90,7 +90,7 @@ The following sort methods are available:
           (const :tag "Keep original order" sort-by-original-order)
           (const :tag "Sort by time"        sort-by-time)
           (const :tag "Sort by title"       sort-by-title))
-  :set 'newsticker--set-customvar-sorting
+  :set #'newsticker--set-customvar-sorting
   :group 'newsticker-plainview)
 
 (defcustom newsticker-heading-format
@@ -107,7 +107,7 @@ The following printf-like specifiers can be used:
 %s  The statistical data of the feed.  See `newsticker-statistics-format'.
 %t  The title of the feed, i.e. its name."
   :type 'string
-  :set 'newsticker--set-customvar-formatting
+  :set #'newsticker--set-customvar-formatting
   :group 'newsticker-plainview)
 
 (defcustom newsticker-item-format
@@ -122,7 +122,7 @@ The following printf-like specifiers can be used:
     the title of the feed is used.
 %t  The title of the item."
   :type 'string
-  :set 'newsticker--set-customvar-formatting
+  :set #'newsticker--set-customvar-formatting
   :group 'newsticker-plainview)
 
 (defcustom newsticker-desc-format
@@ -133,7 +133,7 @@ The following printf-like specifiers can be used:
 %d  The date the item was (first) retrieved.  See
     `newsticker-date-format'."
   :type 'string
-  :set 'newsticker--set-customvar-formatting
+  :set #'newsticker--set-customvar-formatting
   :group 'newsticker-plainview)
 
 (defcustom newsticker-statistics-format
@@ -146,7 +146,7 @@ The following printf-like specifiers can be used:
 %o  The number of old items in the feed.
 %O  The number of obsolete items in the feed."
   :type 'string
-  :set 'newsticker--set-customvar-formatting
+  :set #'newsticker--set-customvar-formatting
   :group 'newsticker-plainview)
 
 
@@ -195,7 +195,7 @@ If set to t old items will be completely folded and only new
 items will show up in the *newsticker* buffer.  Otherwise old as
 well as new items will be visible."
   :type 'boolean
-  :set 'newsticker--set-customvar-buffer
+  :set #'newsticker--set-customvar-buffer
   :group 'newsticker-plainview)
 
 (defcustom newsticker-show-descriptions-of-new-items
@@ -204,14 +204,14 @@ well as new items will be visible."
 If set to t old items will be folded and new items will be
 unfolded.  Otherwise old as well as new items will be folded."
   :type 'boolean
-  :set 'newsticker--set-customvar-buffer
+  :set #'newsticker--set-customvar-buffer
   :group 'newsticker-plainview)
 
 (defcustom newsticker-show-all-news-elements
   nil
   "Show all news elements."
   :type 'boolean
-  ;;:set 'newsticker--set-customvar
+  ;;:set #'newsticker--set-customvar
   :group 'newsticker-plainview)
 
 ;; ======================================================================
@@ -386,51 +386,45 @@ images."
 
 (defvar newsticker-mode-map
   (let ((map (make-keymap)))
-    (define-key map "sO" 'newsticker-show-old-items)
-    (define-key map "hO" 'newsticker-hide-old-items)
-    (define-key map "sa" 'newsticker-show-all-desc)
-    (define-key map "ha" 'newsticker-hide-all-desc)
-    (define-key map "sf" 'newsticker-show-feed-desc)
-    (define-key map "hf" 'newsticker-hide-feed-desc)
-    (define-key map "so" 'newsticker-show-old-item-desc)
-    (define-key map "ho" 'newsticker-hide-old-item-desc)
-    (define-key map "sn" 'newsticker-show-new-item-desc)
-    (define-key map "hn" 'newsticker-hide-new-item-desc)
-    (define-key map "se" 'newsticker-show-entry)
-    (define-key map "he" 'newsticker-hide-entry)
-    (define-key map "sx" 'newsticker-show-extra)
-    (define-key map "hx" 'newsticker-hide-extra)
-
-    (define-key map [?\S-\ ] 'scroll-down-command)
-    (define-key map " "  'scroll-up-command)
-    (define-key map "q"  'newsticker-close-buffer)
-    (define-key map "p"  'newsticker-previous-item)
-    (define-key map "P"  'newsticker-previous-new-item)
-    (define-key map "F"  'newsticker-previous-feed)
-    (define-key map "\t" 'newsticker-next-item)
-    (define-key map "n"  'newsticker-next-item)
-    (define-key map "N"  'newsticker-next-new-item)
-    (define-key map "f"  'newsticker-next-feed)
-    (define-key map "M"  'newsticker-mark-all-items-as-read)
-    (define-key map "m"
-      'newsticker-mark-all-items-at-point-as-read-and-redraw)
-    (define-key map "o"
-      'newsticker-mark-item-at-point-as-read)
-    (define-key map "O"
-      'newsticker-mark-all-items-at-point-as-read)
-    (define-key map "G"  'newsticker-get-all-news)
-    (define-key map "g"  'newsticker-get-news-at-point)
-    (define-key map "u"  'newsticker-buffer-update)
-    (define-key map "U"  'newsticker-buffer-force-update)
-    (define-key map "a"  'newsticker-add-url)
-
-    (define-key map "i"
-      'newsticker-mark-item-at-point-as-immortal)
-
-    (define-key map "xf"
-      'newsticker-toggle-auto-narrow-to-feed)
-    (define-key map "xi"
-      'newsticker-toggle-auto-narrow-to-item)
+    (define-key map "sO" #'newsticker-show-old-items)
+    (define-key map "hO" #'newsticker-hide-old-items)
+    (define-key map "sa" #'newsticker-show-all-desc)
+    (define-key map "ha" #'newsticker-hide-all-desc)
+    (define-key map "sf" #'newsticker-show-feed-desc)
+    (define-key map "hf" #'newsticker-hide-feed-desc)
+    (define-key map "so" #'newsticker-show-old-item-desc)
+    (define-key map "ho" #'newsticker-hide-old-item-desc)
+    (define-key map "sn" #'newsticker-show-new-item-desc)
+    (define-key map "hn" #'newsticker-hide-new-item-desc)
+    (define-key map "se" #'newsticker-show-entry)
+    (define-key map "he" #'newsticker-hide-entry)
+    (define-key map "sx" #'newsticker-show-extra)
+    (define-key map "hx" #'newsticker-hide-extra)
+
+    (define-key map [?\S-\ ] #'scroll-down-command)
+    (define-key map " "  #'scroll-up-command)
+    (define-key map "q"  #'newsticker-close-buffer)
+    (define-key map "p"  #'newsticker-previous-item)
+    (define-key map "P"  #'newsticker-previous-new-item)
+    (define-key map "F"  #'newsticker-previous-feed)
+    (define-key map "\t" #'newsticker-next-item)
+    (define-key map "n"  #'newsticker-next-item)
+    (define-key map "N"  #'newsticker-next-new-item)
+    (define-key map "f"  #'newsticker-next-feed)
+    (define-key map "M"  #'newsticker-mark-all-items-as-read)
+    (define-key map "m" 
#'newsticker-mark-all-items-at-point-as-read-and-redraw)
+    (define-key map "o"  #'newsticker-mark-item-at-point-as-read)
+    (define-key map "O"  #'newsticker-mark-all-items-at-point-as-read)
+    (define-key map "G"  #'newsticker-get-all-news)
+    (define-key map "g"  #'newsticker-get-news-at-point)
+    (define-key map "u"  #'newsticker-buffer-update)
+    (define-key map "U"  #'newsticker-buffer-force-update)
+    (define-key map "a"  #'newsticker-add-url)
+
+    (define-key map "i"  #'newsticker-mark-item-at-point-as-immortal)
+
+    (define-key map "xf" #'newsticker-toggle-auto-narrow-to-feed)
+    (define-key map "xi" #'newsticker-toggle-auto-narrow-to-item)
 
     ;; Bind menu to mouse.
     (define-key map [down-mouse-3] newsticker-menu)
@@ -479,11 +473,11 @@ images."
 ;; maps for the clickable portions
 (defvar newsticker--url-keymap
   (let ((map (make-sparse-keymap)))
-    (define-key map [mouse-1] 'newsticker-mouse-browse-url)
-    (define-key map [mouse-2] 'newsticker-mouse-browse-url)
-    (define-key map "\n" 'newsticker-browse-url)
-    (define-key map "\C-m" 'newsticker-browse-url)
-    (define-key map [(control return)] 'newsticker-handle-url)
+    (define-key map [mouse-1] #'newsticker-mouse-browse-url)
+    (define-key map [mouse-2] #'newsticker-mouse-browse-url)
+    (define-key map "\n" #'newsticker-browse-url)
+    (define-key map "\C-m" #'newsticker-browse-url)
+    (define-key map [(control return)] #'newsticker-handle-url)
     map)
   "Key map for click-able headings in the newsticker buffer.")
 
@@ -980,7 +974,7 @@ not get changed."
     (let* (pos1 pos2
                 (inhibit-read-only t)
                 inv-prop org-inv-prop
-                is-invisible)
+                ) ;; is-invisible
       (newsticker--buffer-beginning-of-item)
       (newsticker--buffer-goto '(desc))
       (setq pos1 (max (point-min) (1- (point))))
@@ -1009,7 +1003,7 @@ not get changed."
     (let* (pos1 pos2
                 (inhibit-read-only t)
                 inv-prop org-inv-prop
-                is-invisible)
+                ) ;; is-invisible
       (newsticker--buffer-beginning-of-item)
       (newsticker--buffer-goto '(desc))
       (setq pos1 (max (point-min) (1- (point))))
@@ -1147,7 +1141,7 @@ If VALUE is nil, auto-narrowing is turned off, otherwise 
it is turned on."
        (setq index-alist (list feed-list)))
       index-alist)))
 
-(defun newsticker--imenu-goto (name pos &rest args)
+(defun newsticker--imenu-goto (_name pos &rest _args)
   "Go to item NAME at position POS and show item.
 ARGS are ignored."
   (goto-char pos)
@@ -1236,6 +1230,9 @@ item-retrieval time is added as well."
   ;; insert the description
   (newsticker--buffer-do-insert-text item 'desc feed-name-symbol))
 
+(defvar w3m-fill-column)
+(defvar w3-maximum-line-length)
+
 (defun newsticker--buffer-do-insert-text (item type feed-name-symbol)
   "Actually insert contents of news item, format it, render it and all that.
 ITEM is a news item, TYPE tells which part of the item shall be inserted,
diff --git a/lisp/net/newst-reader.el b/lisp/net/newst-reader.el
index b188bd4..40e3044 100644
--- a/lisp/net/newst-reader.el
+++ b/lisp/net/newst-reader.el
@@ -1,4 +1,4 @@
-;;; newst-reader.el --- Generic RSS reader functions.
+;;; newst-reader.el --- Generic RSS reader functions.  -*- lexical-binding: t; 
-*-
 
 ;; Copyright (C) 2003-2021 Free Software Foundation, Inc.
 
@@ -94,7 +94,7 @@ done."
                  (const :tag "Right"      right)
                  (const :tag "Center"     center)
                  (const :tag "Full"       full))
-  :set 'newsticker--set-customvar-formatting
+  :set #'newsticker--set-customvar-formatting
   :group 'newsticker-reader)
 
 (defcustom newsticker-use-full-width
@@ -103,7 +103,7 @@ done."
 If non-nil newsticker sets `fill-column' so that the whole
 window is used when filling.  See also `newsticker-justification'."
   :type 'boolean
-  :set 'newsticker--set-customvar-formatting
+  :set #'newsticker--set-customvar-formatting
   :group 'newsticker-reader)
 
 (defcustom newsticker-html-renderer
@@ -122,7 +122,7 @@ htmlr if this option is set."
                  (const :tag "w3" w3-region)
                  (const :tag "w3m" w3m-region)
                  (const :tag "htmlr" newsticker-htmlr-render))
-  :set 'newsticker--set-customvar-formatting
+  :set #'newsticker--set-customvar-formatting
   :group 'newsticker-reader)
 
 (defcustom newsticker-date-format
@@ -130,7 +130,7 @@ htmlr if this option is set."
   "Format for the date part in item and feed lines.
 See `format-time-string' for a list of valid specifiers."
   :type 'string
-  :set 'newsticker--set-customvar-formatting
+  :set #'newsticker--set-customvar-formatting
   :group 'newsticker-reader)
 
 (defgroup newsticker-faces nil
diff --git a/lisp/net/newst-ticker.el b/lisp/net/newst-ticker.el
index 275c91a..2f76470 100644
--- a/lisp/net/newst-ticker.el
+++ b/lisp/net/newst-ticker.el
@@ -1,4 +1,4 @@
-;; newst-ticker.el --- mode line ticker for newsticker.
+;; newst-ticker.el --- mode line ticker for newsticker.  -*- lexical-binding: 
t; -*-
 
 ;; Copyright (C) 2003-2021 Free Software Foundation, Inc.
 
@@ -83,7 +83,7 @@ smooth display (see `newsticker-scroll-smoothly') a value of 
0.3 seems
 reasonable.  For non-smooth display a value of 10 is a good starting
 point."
   :type 'number
-  :set 'newsticker--set-customvar-ticker
+  :set #'newsticker--set-customvar-ticker
   :group 'newsticker-ticker)
 
 (defcustom newsticker-scroll-smoothly
@@ -104,7 +104,7 @@ at all.  If you change `newsticker-scroll-smoothly' you 
should also change
 If t the echo area will not show immortal items.  See also
 `newsticker-hide-old-items-in-echo-area'."
   :type 'boolean
-  :set 'newsticker--set-customvar-ticker
+  :set #'newsticker--set-customvar-ticker
   :group 'newsticker-ticker)
 
 (defcustom newsticker-hide-old-items-in-echo-area
@@ -113,7 +113,7 @@ If t the echo area will not show immortal items.  See also
 If t the echo area will show only new items, i.e. only items which have
 been added between the last two retrievals."
   :type 'boolean
-  :set 'newsticker--set-customvar-ticker
+  :set #'newsticker--set-customvar-ticker
   :group 'newsticker-ticker)
 
 (defcustom newsticker-hide-obsolete-items-in-echo-area
@@ -122,7 +122,7 @@ been added between the last two retrievals."
 If t the echo area will not show obsolete items.  See also
 `newsticker-hide-old-items-in-echo-area'."
   :type 'boolean
-  :set 'newsticker--set-customvar-ticker
+  :set #'newsticker--set-customvar-ticker
   :group 'newsticker-ticker)
 
 (defun newsticker--display-tick ()
@@ -205,7 +205,7 @@ running already."
       (setq newsticker--ticker-timer
             (run-at-time newsticker-ticker-interval
                          newsticker-ticker-interval
-                         'newsticker--display-tick))))
+                         #'newsticker--display-tick))))
 
 (defun newsticker-stop-ticker ()
   "Stop newsticker's ticker (but not the news retrieval)."
diff --git a/lisp/net/newst-treeview.el b/lisp/net/newst-treeview.el
index 2e207be..d778cc1 100644
--- a/lisp/net/newst-treeview.el
+++ b/lisp/net/newst-treeview.el
@@ -52,86 +52,73 @@
 (defface newsticker-treeview-face
   '((((class color) (background dark))  :foreground "white")
     (((class color) (background light)) :foreground "black"))
-  "Face for newsticker tree."
-  :group 'newsticker-treeview)
+  "Face for newsticker tree.")
 
 (defface newsticker-treeview-new-face
   '((t :inherit newsticker-treeview-face :weight bold))
-  "Face for newsticker tree."
-  :group 'newsticker-treeview)
+  "Face for newsticker tree.")
 
 (defface newsticker-treeview-old-face
   '((t :inherit newsticker-treeview-face))
-  "Face for newsticker tree."
-  :group 'newsticker-treeview)
+  "Face for newsticker tree.")
 
 (defface newsticker-treeview-immortal-face
   '((default :inherit newsticker-treeview-face :slant italic)
     (((class color) (background dark))  :foreground "orange")
     (((class color) (background light)) :foreground "blue"))
-  "Face for newsticker tree."
-  :group 'newsticker-treeview)
+  "Face for newsticker tree.")
 
 (defface newsticker-treeview-obsolete-face
   '((t :inherit newsticker-treeview-face :strike-through t))
-  "Face for newsticker tree."
-  :group 'newsticker-treeview)
+  "Face for newsticker tree.")
 
 (defface newsticker-treeview-selection-face
   '((((class color) (background dark))  :background "#4444aa")
     (((class color) (background light)) :background "#bbbbff"))
-  "Face for newsticker selection."
-  :group 'newsticker-treeview)
+  "Face for newsticker selection.")
 
 (defcustom newsticker-treeview-date-format
   "%d.%m.%y, %H:%M"
   "Format for the date column in the treeview list buffer.
 See `format-time-string' for a list of valid specifiers."
   :version "25.1"
-  :type 'string
-  :group 'newsticker-treeview)
+  :type 'string)
 
 (defcustom newsticker-treeview-own-frame
   nil
   "Decides whether newsticker treeview creates and uses its own frame."
-  :type 'boolean
-  :group 'newsticker-treeview)
+  :type 'boolean)
 
 (defcustom newsticker-treeview-treewindow-width
   30
   "Width of tree window in treeview layout.
 See also `newsticker-treeview-listwindow-height'."
-  :type 'integer
-  :group 'newsticker-treeview)
+  :type 'integer)
 
 (defcustom newsticker-treeview-listwindow-height
   10
   "Height of list window in treeview layout.
 See also `newsticker-treeview-treewindow-width'."
-  :type 'integer
-  :group 'newsticker-treeview)
+  :type 'integer)
 
 (defcustom newsticker-treeview-automatically-mark-displayed-items-as-old
   t
   "Decides whether to automatically mark displayed items as old.
 If t an item is marked as old as soon as it is displayed.  This
 applies to newsticker only."
-  :type 'boolean
-  :group 'newsticker-treeview)
+  :type 'boolean)
 
 (defcustom newsticker-treeview-use-feed-name-from-url-list-in-treeview
   t
   "Use the feed names from 'newsticker-url-list' for display in treeview."
   :version "28.1"
-  :type 'boolean
-  :group 'newsticker-treeview)
+  :type 'boolean)
 
 (defcustom newsticker-treeview-use-feed-name-from-url-list-in-itemview
   t
   "Use feed names from 'newsticker-url-list' in itemview."
   :version "28.1"
-  :type 'boolean
-  :group 'newsticker-treeview)
+  :type 'boolean)
 
 (defvar newsticker-groups
   '("Feeds")
@@ -166,14 +153,16 @@ Example: (\"Topmost group\" \"feed1\" (\"subgroup1\" 
\"feed 2\")
 (defvar newsticker--treeview-feed-tree nil)
 (defvar newsticker--treeview-vfeed-tree nil)
 
+(declare-function newsticker-handle-url "newst-plainview" ())
+
 ;; maps for the clickable portions
 (defvar newsticker--treeview-url-keymap
   (let ((map (make-sparse-keymap 'newsticker--treeview-url-keymap)))
-    (define-key map [mouse-1] 'newsticker-treeview-mouse-browse-url)
-    (define-key map [mouse-2] 'newsticker-treeview-mouse-browse-url)
-    (define-key map "\n" 'newsticker-treeview-browse-url)
-    (define-key map "\C-m" 'newsticker-treeview-browse-url)
-    (define-key map [(control return)] 'newsticker-handle-url)
+    (define-key map [mouse-1] #'newsticker-treeview-mouse-browse-url)
+    (define-key map [mouse-2] #'newsticker-treeview-mouse-browse-url)
+    (define-key map "\n" #'newsticker-treeview-browse-url)
+    (define-key map "\C-m" #'newsticker-treeview-browse-url)
+    (define-key map [(control return)] #'newsticker-handle-url)
     map)
   "Key map for click-able headings in the newsticker treeview buffers.")
 
@@ -342,9 +331,9 @@ If string SHOW-FEED is non-nil it is shown in the item 
string."
         (replace-match " "))
       (let ((map (make-sparse-keymap)))
         (dolist (key'([mouse-1] [mouse-3]))
-                    (define-key map key 'newsticker-treeview-tree-click))
-        (define-key map "\n" 'newsticker-treeview-show-item)
-        (define-key map "\C-m" 'newsticker-treeview-show-item)
+          (define-key map key #'newsticker-treeview-tree-click))
+        (define-key map "\n" #'newsticker-treeview-show-item)
+        (define-key map "\C-m" #'newsticker-treeview-show-item)
         (add-text-properties pos1 (point-max)
                              (list :nt-item item
                                    :nt-feed feed
@@ -626,9 +615,9 @@ If CLEAR-BUFFER is non-nil the list buffer is completely 
erased."
 (defvar newsticker-treeview-list-sort-button-map
   (let ((map (make-sparse-keymap)))
     (define-key map [header-line mouse-1]
-      'newsticker--treeview-list-sort-by-column)
+      #'newsticker--treeview-list-sort-by-column)
     (define-key map [header-line mouse-2]
-      'newsticker--treeview-list-sort-by-column)
+      #'newsticker--treeview-list-sort-by-column)
     map)
   "Local keymap for newsticker treeview list window sort buttons.")
 
@@ -960,9 +949,9 @@ arguments NT-ID, FEED, VFEED and TOOLTIP are added as 
properties."
     (if (and num-new (> num-new 0))
         (setq face 'newsticker-treeview-new-face))
     (dolist (key '([mouse-1] [mouse-3]))
-                 (define-key map key 'newsticker-treeview-tree-click))
-    (define-key map "\n" 'newsticker-treeview-tree-do-click)
-    (define-key map "\C-m" 'newsticker-treeview-tree-do-click)
+      (define-key map key #'newsticker-treeview-tree-click))
+    (define-key map "\n" #'newsticker-treeview-tree-do-click)
+    (define-key map "\C-m" #'newsticker-treeview-tree-do-click)
     (propertize tag 'face face 'keymap map
                 :nt-id nt-id
                 :nt-feed feed
@@ -2029,37 +2018,37 @@ Return t if groups have changed, nil otherwise."
 
 (defvar newsticker-treeview-mode-map
   (let ((map (make-sparse-keymap 'newsticker-treeview-mode-map)))
-    (define-key map " " 'newsticker-treeview-next-page)
-    (define-key map "a" 'newsticker-add-url)
-    (define-key map "b" 'newsticker-treeview-browse-url-item)
-    (define-key map "c" 'newsticker-treeview-customize-current-feed)
-    (define-key map "F" 'newsticker-treeview-prev-feed)
-    (define-key map "f" 'newsticker-treeview-next-feed)
-    (define-key map "g" 'newsticker-treeview-get-news)
-    (define-key map "G" 'newsticker-get-all-news)
-    (define-key map "i" 'newsticker-treeview-toggle-item-immortal)
-    (define-key map "j" 'newsticker-treeview-jump)
-    (define-key map "n" 'newsticker-treeview-next-item)
-    (define-key map "N" 'newsticker-treeview-next-new-or-immortal-item)
-    (define-key map "O" 'newsticker-treeview-mark-list-items-old)
-    (define-key map "o" 'newsticker-treeview-mark-item-old)
-    (define-key map "p" 'newsticker-treeview-prev-item)
-    (define-key map "P" 'newsticker-treeview-prev-new-or-immortal-item)
-    (define-key map "q" 'newsticker-treeview-quit)
-    (define-key map "S" 'newsticker-treeview-save-item)
-    (define-key map "s" 'newsticker-treeview-save)
-    (define-key map "u" 'newsticker-treeview-update)
-    (define-key map "v" 'newsticker-treeview-browse-url)
-    ;;(define-key map "\n" 'newsticker-treeview-scroll-item)
-    ;;(define-key map "\C-m" 'newsticker-treeview-scroll-item)
-    (define-key map "\M-m" 'newsticker-group-move-feed)
-    (define-key map "\M-a" 'newsticker-group-add-group)
-    (define-key map "\M-d" 'newsticker-group-delete-group)
-    (define-key map "\M-r" 'newsticker-group-rename-group)
-    (define-key map [M-down] 'newsticker-group-shift-feed-down)
-    (define-key map [M-up] 'newsticker-group-shift-feed-up)
-    (define-key map [M-S-down] 'newsticker-group-shift-group-down)
-    (define-key map [M-S-up] 'newsticker-group-shift-group-up)
+    (define-key map " " #'newsticker-treeview-next-page)
+    (define-key map "a" #'newsticker-add-url)
+    (define-key map "b" #'newsticker-treeview-browse-url-item)
+    (define-key map "c" #'newsticker-treeview-customize-current-feed)
+    (define-key map "F" #'newsticker-treeview-prev-feed)
+    (define-key map "f" #'newsticker-treeview-next-feed)
+    (define-key map "g" #'newsticker-treeview-get-news)
+    (define-key map "G" #'newsticker-get-all-news)
+    (define-key map "i" #'newsticker-treeview-toggle-item-immortal)
+    (define-key map "j" #'newsticker-treeview-jump)
+    (define-key map "n" #'newsticker-treeview-next-item)
+    (define-key map "N" #'newsticker-treeview-next-new-or-immortal-item)
+    (define-key map "O" #'newsticker-treeview-mark-list-items-old)
+    (define-key map "o" #'newsticker-treeview-mark-item-old)
+    (define-key map "p" #'newsticker-treeview-prev-item)
+    (define-key map "P" #'newsticker-treeview-prev-new-or-immortal-item)
+    (define-key map "q" #'newsticker-treeview-quit)
+    (define-key map "S" #'newsticker-treeview-save-item)
+    (define-key map "s" #'newsticker-treeview-save)
+    (define-key map "u" #'newsticker-treeview-update)
+    (define-key map "v" #'newsticker-treeview-browse-url)
+    ;;(define-key map "\n" #'newsticker-treeview-scroll-item)
+    ;;(define-key map "\C-m" #'newsticker-treeview-scroll-item)
+    (define-key map "\M-m" #'newsticker-group-move-feed)
+    (define-key map "\M-a" #'newsticker-group-add-group)
+    (define-key map "\M-d" #'newsticker-group-delete-group)
+    (define-key map "\M-r" #'newsticker-group-rename-group)
+    (define-key map [M-down] #'newsticker-group-shift-feed-down)
+    (define-key map [M-up] #'newsticker-group-shift-feed-up)
+    (define-key map [M-S-down] #'newsticker-group-shift-group-down)
+    (define-key map [M-S-up] #'newsticker-group-shift-group-up)
     map)
   "Mode map for newsticker treeview.")
 
diff --git a/lisp/net/puny.el b/lisp/net/puny.el
index 1cdefc08..42a7e79 100644
--- a/lisp/net/puny.el
+++ b/lisp/net/puny.el
@@ -37,7 +37,7 @@ For instance, \"fśf.org\" => \"xn--ff-2sa.org\"."
   ;; add a check first to avoid doing unnecessary work.
   (if (string-match "\\`[[:ascii:]]+\\'" domain)
       domain
-    (mapconcat 'puny-encode-string (split-string domain "[.]") ".")))
+    (mapconcat #'puny-encode-string (split-string domain "[.]") ".")))
 
 (defun puny-encode-string (string)
   "Encode STRING according to the IDNA/punycode algorithm.
@@ -57,7 +57,7 @@ For instance, \"bücher\" => \"xn--bcher-kva\"."
 (defun puny-decode-domain (domain)
   "Decode DOMAIN according to the IDNA/punycode algorithm.
 For instance, \"xn--ff-2sa.org\" => \"fśf.org\"."
-  (mapconcat 'puny-decode-string (split-string domain "[.]") "."))
+  (mapconcat #'puny-decode-string (split-string domain "[.]") "."))
 
 (defun puny-decode-string (string)
   "Decode an IDNA/punycode-encoded string.
diff --git a/lisp/net/quickurl.el b/lisp/net/quickurl.el
index ab1f43f..2574c8c 100644
--- a/lisp/net/quickurl.el
+++ b/lisp/net/quickurl.el
@@ -1,4 +1,4 @@
-;;; quickurl.el --- insert a URL based on text at point in buffer
+;;; quickurl.el --- insert a URL based on text at point in buffer  -*- 
lexical-binding: t; -*-
 
 ;; Copyright (C) 1999-2021 Free Software Foundation, Inc.
 
@@ -97,23 +97,19 @@
   (locate-user-emacs-file "quickurls" ".quickurls")
   "File that contains the URL list."
   :version "24.4"                       ; added locate-user-emacs-file
-  :type  'file
-  :group 'quickurl)
+  :type  'file)
 
 (defcustom quickurl-format-function #'quickurl-format-url
   "Function to format the URL before insertion into the current buffer."
-  :type  'function
-  :group 'quickurl)
+  :type  'function)
 
 (defcustom quickurl-sort-function #'quickurl-sort-urls
   "Function to sort the URL list."
-  :type  'function
-  :group 'quickurl)
+  :type  'function)
 
 (defcustom quickurl-grab-lookup-function #'current-word
   "Function to grab the thing to lookup."
-  :type  'function
-  :group 'quickurl)
+  :type  'function)
 
 (defun quickurl--assoc-function (key alist)
   "Default function for `quickurl-assoc-function'."
@@ -122,31 +118,26 @@
 (defcustom quickurl-assoc-function #'quickurl--assoc-function
   "Function to use for alist lookup into `quickurl-urls'."
   :version "26.1"                 ; was the obsolete assoc-ignore-case
-  :type  'function
-  :group 'quickurl)
+  :type  'function)
 
 (defcustom quickurl-completion-ignore-case t
   "Should `quickurl-ask' ignore case when doing the input lookup?"
-  :type  'boolean
-  :group 'quickurl)
+  :type  'boolean)
 
 (defcustom quickurl-prefix ";; -*- lisp -*-\n\n"
   "Text to write to `quickurl-url-file' before writing the URL list."
-  :type  'string
-  :group 'quickurl)
+  :type  'string)
 
 (defcustom quickurl-postfix ""
   "Text to write to `quickurl-url-file' after writing the URL list.
 
 See the constant `quickurl-reread-hook-postfix' for some example text that
 could be used here."
-  :type  'string
-  :group 'quickurl)
+  :type  'string)
 
 (defcustom quickurl-list-mode-hook nil
   "Hooks for `quickurl-list-mode'."
-  :type  'hook
-  :group 'quickurl)
+  :type  'hook)
 
 ;; Constants.
 
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index c80cd49..938fadf 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -293,7 +293,7 @@ The following replacements are made:
 Setting this alone will not affect the prompt;
 use either M-x customize or also call `rcirc-update-prompt'."
   :type 'string
-  :set 'rcirc-set-changed
+  :set #'rcirc-set-changed
   :initialize 'custom-initialize-default)
 
 (defcustom rcirc-keywords nil
diff --git a/lisp/net/secrets.el b/lisp/net/secrets.el
index ad27167..94db318 100644
--- a/lisp/net/secrets.el
+++ b/lisp/net/secrets.el
@@ -643,7 +643,7 @@ starting with a colon.  Example:
 The object labels of the found items are returned as list."
   (mapcar
    (lambda (item-path) (secrets-get-item-property item-path "Label"))
-   (apply 'secrets-search-item-paths collection attributes)))
+   (apply #'secrets-search-item-paths collection attributes)))
 
 (defun secrets-create-item (collection item password &rest attributes)
   "Create a new item in COLLECTION with label ITEM and password PASSWORD.
@@ -780,9 +780,9 @@ ITEM can also be an object path, which is used if contained 
in COLLECTION."
 (defvar secrets-mode-map
   (let ((map (make-sparse-keymap)))
     (set-keymap-parent map (make-composed-keymap special-mode-map 
widget-keymap))
-    (define-key map "n" 'next-line)
-    (define-key map "p" 'previous-line)
-    (define-key map "z" 'kill-current-buffer)
+    (define-key map "n" #'next-line)
+    (define-key map "p" #'previous-line)
+    (define-key map "z" #'kill-current-buffer)
     map)
   "Keymap used in `secrets-mode' buffers.")
 
@@ -859,7 +859,7 @@ to their attributes."
         ;; padding is needed to format attribute names.
         (padding
          (apply
-          'max
+          #'max
           (cons
            (1+ (length "password"))
            (mapcar
diff --git a/lisp/net/shr-color.el b/lisp/net/shr-color.el
index ac1f701..eb78a25 100644
--- a/lisp/net/shr-color.el
+++ b/lisp/net/shr-color.el
@@ -36,14 +36,12 @@
 (defcustom shr-color-visible-luminance-min 40
   "Minimum luminance distance between two colors to be considered visible.
 Must be between 0 and 100."
-  :group 'shr-color
   :type 'number)
 
 (defcustom shr-color-visible-distance-min 5
   "Minimum color distance between two colors to be considered visible.
 This value is used to compare result for `ciede2000'.  It's an
 absolute value without any unit."
-  :group 'shr-color
   :type 'integer)
 
 (defconst shr-color-html-colors-alist
@@ -332,8 +330,8 @@ color will be adapted to be visible on BG."
     (if (or (null fg-norm)
            (null bg-norm))
        (list bg fg)
-      (let* ((fg-lab (apply 'color-srgb-to-lab fg-norm))
-            (bg-lab (apply 'color-srgb-to-lab bg-norm))
+      (let* ((fg-lab (apply #'color-srgb-to-lab fg-norm))
+            (bg-lab (apply #'color-srgb-to-lab bg-norm))
             ;; Compute color distance using CIE DE 2000
             (fg-bg-distance (color-cie-de2000 fg-lab bg-lab))
             ;; Compute luminance distance (subtract L component)
@@ -351,12 +349,12 @@ color will be adapted to be visible on BG."
            (list
             (if fixed-background
                 bg
-              (apply 'format "#%02x%02x%02x"
+              (apply #'format "#%02x%02x%02x"
                      (mapcar (lambda (x) (* (max (min 1 x) 0) 255))
-                             (apply 'color-lab-to-srgb bg-lab))))
-            (apply 'format "#%02x%02x%02x"
+                             (apply #'color-lab-to-srgb bg-lab))))
+            (apply #'format "#%02x%02x%02x"
                    (mapcar (lambda (x) (* (max (min 1 x) 0) 255))
-                           (apply 'color-lab-to-srgb fg-lab))))))))))
+                           (apply #'color-lab-to-srgb fg-lab))))))))))
 
 (provide 'shr-color)
 
diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index 0e89999..c122a19 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -220,20 +220,20 @@ and other things:
 
 (defvar shr-map
   (let ((map (make-sparse-keymap)))
-    (define-key map "a" 'shr-show-alt-text)
-    (define-key map "i" 'shr-browse-image)
-    (define-key map "z" 'shr-zoom-image)
-    (define-key map [?\t] 'shr-next-link)
-    (define-key map [?\M-\t] 'shr-previous-link)
+    (define-key map "a" #'shr-show-alt-text)
+    (define-key map "i" #'shr-browse-image)
+    (define-key map "z" #'shr-zoom-image)
+    (define-key map [?\t] #'shr-next-link)
+    (define-key map [?\M-\t] #'shr-previous-link)
     (define-key map [follow-link] 'mouse-face)
-    (define-key map [mouse-2] 'shr-browse-url)
-    (define-key map [C-down-mouse-1] 'shr-mouse-browse-url-new-window)
-    (define-key map "I" 'shr-insert-image)
-    (define-key map "w" 'shr-maybe-probe-and-copy-url)
-    (define-key map "u" 'shr-maybe-probe-and-copy-url)
-    (define-key map "v" 'shr-browse-url)
-    (define-key map "O" 'shr-save-contents)
-    (define-key map "\r" 'shr-browse-url)
+    (define-key map [mouse-2] #'shr-browse-url)
+    (define-key map [C-down-mouse-1] #'shr-mouse-browse-url-new-window)
+    (define-key map "I" #'shr-insert-image)
+    (define-key map "w" #'shr-maybe-probe-and-copy-url)
+    (define-key map "u" #'shr-maybe-probe-and-copy-url)
+    (define-key map "v" #'shr-browse-url)
+    (define-key map "O" #'shr-save-contents)
+    (define-key map "\r" #'shr-browse-url)
     map))
 
 (defvar shr-image-map
diff --git a/lisp/net/sieve-mode.el b/lisp/net/sieve-mode.el
index 7bc1d16..966f0f0 100644
--- a/lisp/net/sieve-mode.el
+++ b/lisp/net/sieve-mode.el
@@ -139,9 +139,9 @@
 
 (defvar sieve-mode-map
   (let ((map (make-sparse-keymap)))
-    (define-key map "\C-c\C-l" 'sieve-upload)
-    (define-key map "\C-c\C-c" 'sieve-upload-and-kill)
-    (define-key map "\C-c\C-m" 'sieve-manage)
+    (define-key map "\C-c\C-l" #'sieve-upload)
+    (define-key map "\C-c\C-c" #'sieve-upload-and-kill)
+    (define-key map "\C-c\C-m" #'sieve-manage)
     map)
   "Key map used in sieve mode.")
 
diff --git a/lisp/net/soap-client.el b/lisp/net/soap-client.el
index 3cc5569..821ef4a 100644
--- a/lisp/net/soap-client.el
+++ b/lisp/net/soap-client.el
@@ -10,6 +10,7 @@
 ;; Package: soap-client
 ;; Homepage: https://github.com/alex-hhh/emacs-soap-client
 ;; Package-Requires: ((cl-lib "0.6.1"))
+;;FIXME: Put in `Package-Requires:' the Emacs version we expect.
 
 ;; This file is part of GNU Emacs.
 
@@ -771,6 +772,8 @@ This is a specialization of `soap-decode-type' for
         (Array (soap-decode-array node))))))
 
 (defalias 'soap-type-of
+  ;; FIXME: Once we drop support for Emacs<25, use generic functions
+  ;; via `cl-defmethod' instead of our own ad-hoc version of it.
   (if (eq 'soap-xs-basic-type (type-of (make-soap-xs-basic-type)))
       ;; `type-of' in Emacs ≥ 26 already does what we need.
       #'type-of
@@ -1263,7 +1266,7 @@ See also `soap-wsdl-resolve-references'."
              (soap-l2wk (xml-node-name node)))
 
   (setf (soap-xs-simple-type-base type)
-        (mapcar 'soap-l2fq
+        (mapcar #'soap-l2fq
                 (split-string
                  (or (xml-get-attribute-or-nil node 'memberTypes) ""))))
 
@@ -1343,7 +1346,7 @@ See also `soap-wsdl-resolve-references'."
                               (soap-validate-xs-basic-type value base))))
               (error (push (cadr error-object) messages))))
           (when messages
-            (error (mapconcat 'identity (nreverse messages) "; and: "))))
+            (error (mapconcat #'identity (nreverse messages) "; and: "))))
       (cl-labels ((fail-with-message (format value)
                                      (push (format format value) messages)
                                      (throw 'invalid nil)))
@@ -2345,8 +2348,8 @@ See also `soap-resolve-references' and
 
   (when (= (length (soap-operation-parameter-order operation)) 0)
     (setf (soap-operation-parameter-order operation)
-          (mapcar 'car (soap-message-parts
-                        (cdr (soap-operation-input operation))))))
+          (mapcar #'car (soap-message-parts
+                         (cdr (soap-operation-input operation))))))
 
   (setf (soap-operation-parameter-order operation)
         (mapcar (lambda (p)
@@ -2391,13 +2394,13 @@ See also `soap-wsdl-resolve-references'."
 ;; Install resolvers for our types
 (progn
   (put (soap-type-of (make-soap-message)) 'soap-resolve-references
-       'soap-resolve-references-for-message)
+       #'soap-resolve-references-for-message)
   (put (soap-type-of (make-soap-operation)) 'soap-resolve-references
-       'soap-resolve-references-for-operation)
+       #'soap-resolve-references-for-operation)
   (put (soap-type-of (make-soap-binding)) 'soap-resolve-references
-       'soap-resolve-references-for-binding)
+       #'soap-resolve-references-for-binding)
   (put (soap-type-of (make-soap-port)) 'soap-resolve-references
-       'soap-resolve-references-for-port))
+       #'soap-resolve-references-for-port))
 
 (defun soap-wsdl-resolve-references (wsdl)
   "Resolve all references inside the WSDL structure.
@@ -2511,7 +2514,7 @@ Build on WSDL if it is provided."
     (soap-wsdl-resolve-references (soap-parse-wsdl xml wsdl))
     wsdl))
 
-(defalias 'soap-load-wsdl-from-url 'soap-load-wsdl)
+(defalias 'soap-load-wsdl-from-url #'soap-load-wsdl)
 
 (defun soap-parse-wsdl-phase-validate-node (node)
   "Assert that NODE is valid."
@@ -2884,7 +2887,7 @@ decode function to perform the actual decoding."
 
 (if (fboundp 'define-error)
     (define-error 'soap-error "SOAP error")
-  ;; Support older Emacs versions that do not have define-error, so
+  ;; Support Emacs<24.4 that do not have define-error, so
   ;; that soap-client can remain unchanged in GNU ELPA.
   (put 'soap-error
        'error-conditions
@@ -3123,8 +3126,7 @@ http://schemas.xmlsoap.org/soap/encoding/\"\n";))
 
 (defcustom soap-debug nil
   "When t, enable some debugging facilities."
-  :type 'boolean
-  :group 'soap-client)
+  :type 'boolean)
 
 (defun soap-find-port (wsdl service)
   "Return the WSDL port having SERVICE name.
diff --git a/lisp/net/soap-inspect.el b/lisp/net/soap-inspect.el
index 9d4e440..6f9ce6a 100644
--- a/lisp/net/soap-inspect.el
+++ b/lisp/net/soap-inspect.el
@@ -109,7 +109,7 @@ soap-xs-attribute objects."
 This is a specialization of `soap-sample-value' for
 `soap-xs-simple-type' objects."
   (append
-   (mapcar 'soap-sample-value-for-xs-attribute
+   (mapcar #'soap-sample-value-for-xs-attribute
            (soap-xs-type-attributes type))
    (cond
     ((soap-xs-simple-type-enumeration type)
@@ -143,7 +143,7 @@ This is a specialization of `soap-sample-value' for
 This is a specialization of `soap-sample-value' for
 `soap-xs-complex-type' objects."
   (append
-   (mapcar 'soap-sample-value-for-xs-attribute
+   (mapcar #'soap-sample-value-for-xs-attribute
            (soap-xs-type-attributes type))
    (cl-case (soap-xs-complex-type-indicator type)
      (array
@@ -176,31 +176,31 @@ This is a specialization of `soap-sample-value' for
   ;; Install soap-sample-value methods for our types
   (put (soap-type-of (make-soap-xs-basic-type))
        'soap-sample-value
-       'soap-sample-value-for-xs-basic-type)
+       #'soap-sample-value-for-xs-basic-type)
 
   (put (soap-type-of (make-soap-xs-element))
        'soap-sample-value
-       'soap-sample-value-for-xs-element)
+       #'soap-sample-value-for-xs-element)
 
   (put (soap-type-of (make-soap-xs-attribute))
        'soap-sample-value
-       'soap-sample-value-for-xs-attribute)
+       #'soap-sample-value-for-xs-attribute)
 
   (put (soap-type-of (make-soap-xs-attribute))
        'soap-sample-value
-       'soap-sample-value-for-xs-attribute-group)
+       #'soap-sample-value-for-xs-attribute-group)
 
   (put (soap-type-of (make-soap-xs-simple-type))
        'soap-sample-value
-       'soap-sample-value-for-xs-simple-type)
+       #'soap-sample-value-for-xs-simple-type)
 
   (put (soap-type-of (make-soap-xs-complex-type))
        'soap-sample-value
-       'soap-sample-value-for-xs-complex-type)
+       #'soap-sample-value-for-xs-complex-type)
 
   (put (soap-type-of (make-soap-message))
        'soap-sample-value
-       'soap-sample-value-for-message))
+       #'soap-sample-value-for-message))
 
 
 
@@ -437,7 +437,7 @@ TYPE is a `soap-xs-complex-type'."
         (funcall (list 'soap-invoke '*WSDL* "SomeService"
                        (soap-element-name operation))))
     (let ((sample-invocation
-           (append funcall (mapcar 'cdr sample-message-value))))
+           (append funcall (mapcar #'cdr sample-message-value))))
       (pp sample-invocation (current-buffer)))))
 
 (defun soap-inspect-port-type (port-type)
@@ -460,7 +460,7 @@ TYPE is a `soap-xs-complex-type'."
                               collect o))
          op-name-width)
 
-    (setq operations (sort operations 'string<))
+    (setq operations (sort operations #'string<))
 
     (setq op-name-width (cl-loop for o in operations maximizing (length o)))
 
@@ -504,39 +504,39 @@ TYPE is a `soap-xs-complex-type'."
   ;; Install the soap-inspect methods for our types
 
   (put (soap-type-of (make-soap-xs-basic-type)) 'soap-inspect
-       'soap-inspect-xs-basic-type)
+       #'soap-inspect-xs-basic-type)
 
   (put (soap-type-of (make-soap-xs-element)) 'soap-inspect
-       'soap-inspect-xs-element)
+       #'soap-inspect-xs-element)
 
   (put (soap-type-of (make-soap-xs-simple-type)) 'soap-inspect
-       'soap-inspect-xs-simple-type)
+       #'soap-inspect-xs-simple-type)
 
   (put (soap-type-of (make-soap-xs-complex-type)) 'soap-inspect
-       'soap-inspect-xs-complex-type)
+       #'soap-inspect-xs-complex-type)
 
   (put (soap-type-of (make-soap-xs-attribute)) 'soap-inspect
-       'soap-inspect-xs-attribute)
+       #'soap-inspect-xs-attribute)
 
   (put (soap-type-of (make-soap-xs-attribute-group)) 'soap-inspect
-       'soap-inspect-xs-attribute-group)
+       #'soap-inspect-xs-attribute-group)
 
   (put (soap-type-of (make-soap-message)) 'soap-inspect
-       'soap-inspect-message)
+       #'soap-inspect-message)
   (put (soap-type-of (make-soap-operation)) 'soap-inspect
-       'soap-inspect-operation)
+       #'soap-inspect-operation)
 
   (put (soap-type-of (make-soap-port-type)) 'soap-inspect
-       'soap-inspect-port-type)
+       #'soap-inspect-port-type)
 
   (put (soap-type-of (make-soap-binding)) 'soap-inspect
-       'soap-inspect-binding)
+       #'soap-inspect-binding)
 
   (put (soap-type-of (make-soap-port)) 'soap-inspect
-       'soap-inspect-port)
+       #'soap-inspect-port)
 
   (put (soap-type-of (soap-make-wsdl "origin")) 'soap-inspect
-       'soap-inspect-wsdl))
+       #'soap-inspect-wsdl))
 
 (provide 'soap-inspect)
 ;;; soap-inspect.el ends here
diff --git a/lisp/net/telnet.el b/lisp/net/telnet.el
index 44f535f..bb65eca 100644
--- a/lisp/net/telnet.el
+++ b/lisp/net/telnet.el
@@ -1,4 +1,4 @@
-;;; telnet.el --- run a telnet session from within an Emacs buffer
+;;; telnet.el --- run a telnet session from within an Emacs buffer  -*- 
lexical-binding: t; -*-
 
 ;; Copyright (C) 1985, 1988, 1992, 1994, 2001-2021 Free Software
 ;; Foundation, Inc.
@@ -63,11 +63,11 @@ LOGIN-NAME, which is optional, says what to log in as on 
that machine.")
 (defvar telnet-new-line "\r")
 (defvar telnet-mode-map
   (let ((map (nconc (make-sparse-keymap) comint-mode-map)))
-    (define-key map "\C-m" 'telnet-send-input)
-    ;; (define-key map "\C-j" 'telnet-send-input)
-    (define-key map "\C-c\C-q" 'send-process-next-char)
-    (define-key map "\C-c\C-c" 'telnet-interrupt-subjob)
-    (define-key map "\C-c\C-z" 'telnet-c-z)
+    (define-key map "\C-m" #'telnet-send-input)
+    ;; (define-key map "\C-j" #'telnet-send-input)
+    (define-key map "\C-c\C-q" #'send-process-next-char)
+    (define-key map "\C-c\C-c" #'telnet-interrupt-subjob)
+    (define-key map "\C-c\C-z" #'telnet-c-z)
     map))
 
 (defvar telnet-prompt-pattern "^[^#$%>\n]*[#$%>] *")
@@ -152,7 +152,7 @@ rejecting one login and prompting again for a username and 
password.")
            (t (telnet-check-software-type-initialize string)
               (telnet-filter proc string)
               (cond ((> telnet-count telnet-maximum-count)
-                     (set-process-filter proc 'telnet-filter))
+                     (set-process-filter proc #'telnet-filter))
                     (t (setq telnet-count (1+ telnet-count)))))))))
 
 ;; Identical to comint-simple-send, except that it sends telnet-new-line
@@ -227,9 +227,9 @@ Normally input is edited in Emacs and sent a line at a 
time."
     (if (and buffer (get-buffer-process buffer))
        (switch-to-buffer (concat "*" name "*"))
       (switch-to-buffer
-       (apply 'make-comint name telnet-program nil telnet-options))
+       (apply #'make-comint name telnet-program nil telnet-options))
       (setq process (get-buffer-process (current-buffer)))
-      (set-process-filter process 'telnet-initial-filter)
+      (set-process-filter process #'telnet-initial-filter)
       ;; Don't send the `open' cmd till telnet is ready for it.
       (accept-process-output process)
       (erase-buffer)
@@ -263,7 +263,7 @@ Normally input is edited in Emacs and sent a line at a 
time."
   (require 'shell)
   (let ((name (concat "rsh-" host )))
     (switch-to-buffer (make-comint name remote-shell-program nil host))
-    (set-process-filter (get-process name) 'telnet-initial-filter)
+    (set-process-filter (get-process name) #'telnet-initial-filter)
     (telnet-mode)
     (setq-local telnet-connect-command (list 'rsh host))
     (setq telnet-count -16)))
diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el
index 6ec4d1f..aacf83e 100644
--- a/lisp/net/tramp-adb.el
+++ b/lisp/net/tramp-adb.el
@@ -44,7 +44,6 @@
   :version "24.4"
   :type 'string)
 
-;;;###tramp-autoload
 (defcustom tramp-adb-connect-if-not-connected nil
   "Try to run `adb connect' if provided device is not connected currently.
 It is used for TCP/IP devices."
@@ -56,7 +55,6 @@ It is used for TCP/IP devices."
 (defconst tramp-adb-method "adb"
   "When this method name is used, forward all calls to Android Debug Bridge.")
 
-;;;###tramp-autoload
 (defcustom tramp-adb-prompt "^[^#$\n\r]*[#$][[:space:]]"
   "Regexp used as prompt in almquist shell."
   :type 'regexp
diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el
index ad8310c..2fcb7b1 100644
--- a/lisp/net/tramp-cache.el
+++ b/lisp/net/tramp-cache.el
@@ -162,16 +162,20 @@ Return DEFAULT if not set."
     (tramp-message
      key 8 "%s %s %s; inhibit: %s; cache used: %s; cached at: %s"
      file property value remote-file-name-inhibit-cache cache-used cached-at)
+    ;; For analysis purposes, count the number of getting this file attribute.
     (when (>= tramp-verbose 10)
       (let* ((var (intern (concat "tramp-cache-get-count-" property)))
-            (val (or (numberp (and (boundp var) (symbol-value var)))
-                     (progn
-                       (add-hook 'tramp-cache-unload-hook
-                                 (lambda () (makunbound var)))
-                       0))))
+            (val (or (and (boundp var) (numberp (symbol-value var))
+                          (symbol-value var))
+                     0)))
        (set var (1+ val))))
     value))
 
+(add-hook 'tramp-cache-unload-hook
+         (lambda ()
+           (dolist (var (all-completions "tramp-cache-get-count-" obarray))
+             (unintern var obarray))))
+
 ;;;###tramp-autoload
 (defun tramp-set-file-property (key file property value)
   "Set the PROPERTY of FILE to VALUE, in the cache context of KEY.
@@ -186,16 +190,20 @@ Return VALUE."
     ;; We put the timestamp there.
     (puthash property (cons (current-time) value) hash)
     (tramp-message key 8 "%s %s %s" file property value)
+    ;; For analysis purposes, count the number of setting this file attribute.
     (when (>= tramp-verbose 10)
       (let* ((var (intern (concat "tramp-cache-set-count-" property)))
-            (val (or (numberp (and (boundp var) (symbol-value var)))
-                     (progn
-                       (add-hook 'tramp-cache-unload-hook
-                                 (lambda () (makunbound var)))
-                       0))))
+            (val (or (and (boundp var) (numberp (symbol-value var))
+                          (symbol-value var))
+                     0)))
        (set var (1+ val))))
     value))
 
+(add-hook 'tramp-cache-unload-hook
+         (lambda ()
+           (dolist (var (all-completions "tramp-cache-set-count-" obarray))
+             (unintern var obarray))))
+
 ;;;###tramp-autoload
 (defun tramp-flush-file-property (key file property)
   "Remove PROPERTY of FILE in the cache context of KEY."
diff --git a/lisp/net/tramp-cmds.el b/lisp/net/tramp-cmds.el
index 2aacf26..d208f0e 100644
--- a/lisp/net/tramp-cmds.el
+++ b/lisp/net/tramp-cmds.el
@@ -208,7 +208,6 @@ This includes password cache, file cache, connection cache, 
buffers."
   (dolist (name (tramp-list-remote-buffers))
     (when (bufferp (get-buffer name)) (kill-buffer name))))
 
-;;;###tramp-autoload
 (defcustom tramp-default-rename-alist nil
   "Default target for renaming remote buffer file names.
 This is an alist of cons cells (SOURCE . TARGET).  The first
@@ -231,7 +230,6 @@ expression which always matches."
   :type '(repeat (cons (choice :tag "Source regexp" regexp sexp)
                       (choice :tag "Target   name" string (const nil)))))
 
-;;;###tramp-autoload
 (defcustom tramp-confirm-rename-file-names t
   "Whether renaming a buffer file name must be confirmed."
   :group 'tramp
@@ -250,7 +248,7 @@ function returns nil"
          (host (or (file-remote-p string 'host) ""))
          item result)
       (while (setq item (pop tdra))
-       (when (string-match-p (or (eval (car item)) "") string)
+       (when (string-match-p (or (eval (car item) t) "") string)
          (setq tdra nil
                result
                (format-spec
diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el
index 27461e6..b67de1b 100644
--- a/lisp/net/tramp-compat.el
+++ b/lisp/net/tramp-compat.el
@@ -70,7 +70,7 @@
 It is the default value of `temporary-file-directory'."
   ;; We must return a local directory.  If it is remote, we could run
   ;; into an infloop.
-  (eval (car (get 'temporary-file-directory 'standard-value))))
+  (eval (car (get 'temporary-file-directory 'standard-value)) t))
 
 (defsubst tramp-compat-make-temp-name ()
   "Generate a local temporary file name (compat function)."
diff --git a/lisp/net/tramp-crypt.el b/lisp/net/tramp-crypt.el
index f8de708..f44be44 100644
--- a/lisp/net/tramp-crypt.el
+++ b/lisp/net/tramp-crypt.el
@@ -112,6 +112,14 @@ initializing a new crypted remote directory."
   "Non-nil when encryption support is available.")
 (setq tramp-crypt-enabled (executable-find tramp-crypt-encfs-program))
 
+;; This function takes action since Emacs 28.1, when
+;; `read-extended-command-predicate' is set to
+;; `command-completion-default-include-p'.
+(defun tramp-crypt-enabled-p (_symbol _buffer)
+  "A predicate for Tramp interactive commands.
+They are completed by \"M-x TAB\" only when encryption support is enabled."
+  tramp-crypt-enabled)
+
 ;;;###tramp-autoload
 (defconst tramp-crypt-encfs-config ".encfs6.xml"
   "Encfs configuration file name.")
@@ -481,10 +489,15 @@ directory.  File names will be also encrypted."
     (setq tramp-crypt-directories (cons name tramp-crypt-directories)))
   (tramp-register-file-name-handlers))
 
+;; `tramp-crypt-enabled-p' is not autoloaded, and this setting isn't either.
+(function-put
+ #'tramp-crypt-add-directory 'completion-predicate #'tramp-crypt-enabled-p)
+
 (defun tramp-crypt-remove-directory (name)
   "Unmark remote directory NAME for encryption.
 Existing files in that directory and its subdirectories will be
 kept in their encrypted form."
+  ;; (declare (completion tramp-crypt-enabled-p))
   (interactive "DRemote directory name: ")
   (unless tramp-crypt-enabled
     (tramp-user-error nil "Feature is not enabled."))
@@ -498,6 +511,10 @@ kept in their encrypted form."
     (setq tramp-crypt-directories (delete name tramp-crypt-directories))
     (tramp-register-file-name-handlers)))
 
+;; Starting with Emacs 28.1, this can be replaced by the "(declare ...)" form.
+(function-put
+ #'tramp-crypt-remove-directory 'completion-predicate #'tramp-crypt-enabled-p)
+
 ;; `auth-source' requires a user.
 (defun tramp-crypt-dissect-file-name (name)
   "Return a `tramp-file-name' structure for NAME.
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el
index 9d4e04c..c4ec112 100644
--- a/lisp/net/tramp-gvfs.el
+++ b/lisp/net/tramp-gvfs.el
@@ -175,7 +175,6 @@ They are checked during start up via
                    (dbus-list-known-names :session))
       (setq tramp-media-methods (delete method tramp-media-methods)))))
 
-;;;###tramp-autoload
 (defcustom tramp-gvfs-zeroconf-domain "local"
   "Zeroconf domain to be used for discovering services, like host names."
   :group 'tramp
diff --git a/lisp/net/tramp-integration.el b/lisp/net/tramp-integration.el
index 64b5b48..5adc4ce 100644
--- a/lisp/net/tramp-integration.el
+++ b/lisp/net/tramp-integration.el
@@ -231,7 +231,7 @@ NAME must be equal to `tramp-current-connection'."
             (delete (info-lookup->mode-cache 'symbol 'tramp-info-lookup-mode)
                     (info-lookup->topic-cache 'symbol)))))
 
-  (dolist (mode (mapcar 'car (info-lookup->topic-value 'symbol)))
+  (dolist (mode (mapcar #'car (info-lookup->topic-value 'symbol)))
     ;; Add `tramp-info-lookup-mode' to `other-modes' for either
     ;; `emacs-lisp-mode' itself, or to modes which use
     ;; `emacs-lisp-mode' as `other-modes'.  Reset `info-lookup-cache'.
diff --git a/lisp/net/tramp-rclone.el b/lisp/net/tramp-rclone.el
index e6f9fe5..3b6de3e 100644
--- a/lisp/net/tramp-rclone.el
+++ b/lisp/net/tramp-rclone.el
@@ -42,7 +42,6 @@
 (defconst tramp-rclone-method "rclone"
   "When this method name is used, forward all calls to rclone mounts.")
 
-;;;###tramp-autoload
 (defcustom tramp-rclone-program "rclone"
   "Name of the rclone program."
   :group 'tramp
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index dac83b8..7182cd6 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -46,7 +46,6 @@
 (defconst tramp-default-remote-shell "/bin/sh"
   "The default remote shell Tramp applies.")
 
-;;;###tramp-autoload
 (defcustom tramp-inline-compress-start-size 4096
   "The minimum size of compressing where inline transfer.
 When inline transfer, compress transferred data of file whose
@@ -56,23 +55,12 @@ If it is nil, no compression at all will be applied."
   :group 'tramp
   :type '(choice (const nil) integer))
 
-;;;###tramp-autoload
 (defcustom tramp-copy-size-limit 10240
   "Maximum file size where inline copying is preferred to an out-of-the-band 
copy.
 If it is nil, out-of-the-band copy will be used without a check."
   :group 'tramp
   :type '(choice (const nil) integer))
 
-;;;###tramp-autoload
-(defcustom tramp-terminal-type "dumb"
-  "Value of TERM environment variable for logging in to remote host.
-Because Tramp wants to parse the output of the remote shell, it is easily
-confused by ANSI color escape sequences and suchlike.  Often, shell init
-files conditionalize this setup based on the TERM environment variable."
-  :group 'tramp
-  :type 'string)
-
-;;;###tramp-autoload
 (defcustom tramp-histfile-override "~/.tramp_history"
   "When invoking a shell, override the HISTFILE with this value.
 When setting to a string, it redirects the shell history to that
@@ -115,7 +103,6 @@ detected as prompt when being sent on echoing hosts, 
therefore.")
 (defconst tramp-end-of-heredoc (md5 tramp-end-of-output)
   "String used to recognize end of heredoc strings.")
 
-;;;###tramp-autoload
 (defcustom tramp-use-ssh-controlmaster-options t
   "Whether to use `tramp-ssh-controlmaster-options'.
 Set it to nil, if you use Control* or Proxy* options in your ssh
@@ -477,70 +464,6 @@ The string is used in `tramp-methods'.")
  (tramp-set-completion-function "psftp" tramp-completion-function-alist-ssh)
  (tramp-set-completion-function "fcp" tramp-completion-function-alist-ssh))
 
-;; "getconf PATH" yields:
-;; HP-UX: 
/usr/bin:/usr/ccs/bin:/opt/ansic/bin:/opt/langtools/bin:/opt/fortran/bin
-;; Solaris: /usr/xpg4/bin:/usr/ccs/bin:/usr/bin:/opt/SUNWspro/bin
-;; GNU/Linux (Debian, Suse, RHEL): /bin:/usr/bin
-;; FreeBSD, DragonFly: /usr/bin:/bin:/usr/sbin:/sbin: - beware trailing ":"!
-;; FreeBSD 12.1, Darwin: /usr/bin:/bin:/usr/sbin:/sbin
-;; IRIX64: /usr/bin
-;; QNAP QTS: ---
-;; Hydra: /run/current-system/sw/bin:/bin:/usr/bin
-;;;###tramp-autoload
-(defcustom tramp-remote-path
-  '(tramp-default-remote-path "/bin" "/usr/bin" "/sbin" "/usr/sbin"
-    "/usr/local/bin" "/usr/local/sbin" "/local/bin" "/local/freeware/bin"
-    "/local/gnu/bin" "/usr/freeware/bin" "/usr/pkg/bin" "/usr/contrib/bin"
-    "/opt/bin" "/opt/sbin" "/opt/local/bin")
-  "List of directories to search for executables on remote host.
-For every remote host, this variable will be set buffer local,
-keeping the list of existing directories on that host.
-
-You can use \"~\" in this list, but when searching for a shell which groks
-tilde expansion, all directory names starting with \"~\" will be ignored.
-
-`Default Directories' represent the list of directories given by
-the command \"getconf PATH\".  It is recommended to use this
-entry on head of this list, because these are the default
-directories for POSIX compatible commands.  On remote hosts which
-do not offer the getconf command (like cygwin), the value
-\"/bin:/usr/bin\" is used instead.  This entry is represented in
-the list by the special value `tramp-default-remote-path'.
-
-`Private Directories' are the settings of the $PATH environment,
-as given in your `~/.profile'.  This entry is represented in
-the list by the special value `tramp-own-remote-path'."
-  :group 'tramp
-  :type '(repeat (choice
-                 (const :tag "Default Directories" tramp-default-remote-path)
-                 (const :tag "Private Directories" tramp-own-remote-path)
-                 (string :tag "Directory"))))
-
-;;;###tramp-autoload
-(defcustom tramp-remote-process-environment
-  '("ENV=''" "TMOUT=0" "LC_CTYPE=''"
-    "CDPATH=" "HISTORY=" "MAIL=" "MAILCHECK=" "MAILPATH=" "PAGER=cat"
-    "autocorrect=" "correct=")
-  "List of environment variables to be set on the remote host.
-
-Each element should be a string of the form ENVVARNAME=VALUE.  An
-entry ENVVARNAME= disables the corresponding environment variable,
-which might have been set in the init files like ~/.profile.
-
-Special handling is applied to some environment variables,
-which should not be set here:
-
-The PATH environment variable should be set via `tramp-remote-path'.
-
-The TERM environment variable should be set via `tramp-terminal-type'.
-
-The INSIDE_EMACS environment variable will automatically be set
-based on the Tramp and Emacs versions, and should not be set here."
-  :group 'tramp
-  :version "26.1"
-  :type '(repeat string))
-
-;;;###tramp-autoload
 (defcustom tramp-sh-extra-args
   '(("/bash\\'" . "-noediting -norc -noprofile")
     ("/zsh\\'" . "-f +Z -V"))
@@ -2370,53 +2293,29 @@ The method used must be an out-of-band method."
            (setq listener (number-to-string (+ 50000 (random 10000))))))
 
        ;; Compose copy command.
-       (setq host (or host "")
-             user (or user "")
-             port (or port "")
-             spec (format-spec-make
-                   ?t (tramp-get-connection-property
-                       (tramp-get-connection-process v) "temp-file" ""))
-             options (format-spec (tramp-ssh-controlmaster-options v) spec)
-             spec (format-spec-make
-                   ?h host ?u user ?p port ?r listener ?c options
-                   ?k (if keep-date " " "")
+       (setq options
+             (format-spec
+              (tramp-ssh-controlmaster-options v)
+              (format-spec-make
+               ?t (tramp-get-connection-property
+                   (tramp-get-connection-process v) "temp-file" "")))
+             spec (list
+                   ?h (or host "") ?u (or user "") ?p (or port "")
+                   ?r listener ?c options ?k (if keep-date " " "")
                     ?n (concat "2>" (tramp-get-remote-null-device v)))
              copy-program (tramp-get-method-parameter v 'tramp-copy-program)
              copy-keep-date (tramp-get-method-parameter
                              v 'tramp-copy-keep-date)
-
              copy-args
-             (delete
-              ;; " " has either been a replacement of "%k" (when
-              ;; keep-date argument is non-nil), or a replacement
-              ;; for the whole keep-date sublist.
-              " "
-              (dolist
-                  (x (tramp-get-method-parameter v 'tramp-copy-args) copy-args)
-                (setq copy-args
-                      (append
-                       copy-args
-                       (let ((y (mapcar (lambda (z) (format-spec z spec)) x)))
-                         (unless (member "" y) y))))))
-
-             copy-env
-             (delq
-              nil
-              (mapcar
-               (lambda (x)
-                 (setq x (mapcar (lambda (y) (format-spec y spec)) x))
-                 (unless (member "" x) (string-join x " ")))
-               (tramp-get-method-parameter v 'tramp-copy-env)))
-
+             ;; " " has either been a replacement of "%k" (when
+             ;; keep-date argument is non-nil), or a replacement for
+             ;; the whole keep-date sublist.
+             (delete " " (apply #'tramp-expand-args v 'tramp-copy-args spec))
+             copy-env (apply #'tramp-expand-args v 'tramp-copy-env spec)
              remote-copy-program
-             (tramp-get-method-parameter v 'tramp-remote-copy-program))
-
-       (dolist (x (tramp-get-method-parameter v 'tramp-remote-copy-args))
-         (setq remote-copy-args
-               (append
-                remote-copy-args
-                (let ((y (mapcar (lambda (z) (format-spec z spec)) x)))
-                  (unless (member "" y) y)))))
+             (tramp-get-method-parameter v 'tramp-remote-copy-program)
+             remote-copy-args
+             (apply #'tramp-expand-args v 'tramp-remote-copy-args spec))
 
        ;; Check for local copy program.
        (unless (executable-find copy-program)
@@ -2462,10 +2361,11 @@ The method used must be an out-of-band method."
                 v "process-name" (buffer-name (current-buffer)))
                (tramp-set-connection-property
                 v "process-buffer" (current-buffer))
-               (while copy-env
+               (when copy-env
                  (tramp-message
-                  orig-vec 6 "%s=\"%s\"" (car copy-env) (cadr copy-env))
-                 (setenv (pop copy-env) (pop copy-env)))
+                  orig-vec 6 "%s=\"%s\""
+                  (car copy-env) (string-join (cdr copy-env) " "))
+                 (setenv (car copy-env) (string-join (cdr copy-env) " ")))
                (setq
                 copy-args
                 (append
@@ -4918,7 +4818,7 @@ If there is just some editing, retry it after 5 seconds."
       (progn
        (tramp-message
         vec 5 "Cannot timeout session, trying it again in %s seconds." 5)
-       (run-at-time 5 nil 'tramp-timeout-session vec))
+       (run-at-time 5 nil #'tramp-timeout-session vec))
     (tramp-message
      vec 3 "Timeout session %s" (tramp-make-tramp-file-name vec 'noloc))
     (tramp-cleanup-connection vec 'keep-debug nil 'keep-processes)))
@@ -5049,19 +4949,17 @@ connection if a previous connection has died for some 
reason."
                         (l-domain (tramp-file-name-domain hop))
                         (l-host (tramp-file-name-host hop))
                         (l-port (tramp-file-name-port hop))
-                        (login-program
-                         (tramp-get-method-parameter hop 'tramp-login-program))
-                        (login-args
-                         (tramp-get-method-parameter hop 'tramp-login-args))
                         (remote-shell
                          (tramp-get-method-parameter hop 'tramp-remote-shell))
                         (extra-args (tramp-get-sh-extra-args remote-shell))
                         (async-args
-                         (tramp-get-method-parameter hop 'tramp-async-args))
+                         (tramp-compat-flatten-tree
+                          (tramp-get-method-parameter hop 'tramp-async-args)))
                         (connection-timeout
                          (tramp-get-method-parameter
                           hop 'tramp-connection-timeout))
-                        (command login-program)
+                        (command
+                         (tramp-get-method-parameter hop 'tramp-login-program))
                         ;; We don't create the temporary file.  In
                         ;; fact, it is just a prefix for the
                         ;; ControlPath option of ssh; the real
@@ -5075,11 +4973,7 @@ connection if a previous connection has died for some 
reason."
                          (with-tramp-connection-property
                              (tramp-get-process vec) "temp-file"
                            (tramp-compat-make-temp-name)))
-                        spec r-shell)
-
-                   ;; Add arguments for asynchronous processes.
-                   (when (and process-name async-args)
-                     (setq login-args (append async-args login-args)))
+                        r-shell)
 
                    ;; Check, whether there is a restricted shell.
                    (dolist (elt tramp-restricted-shell-hosts-alist)
@@ -5104,31 +4998,28 @@ connection if a previous connection has died for some 
reason."
 
                    ;; Replace `login-args' place holders.
                    (setq
-                    l-host (or l-host "")
-                    l-user (or l-user "")
-                    l-port (or l-port "")
-                    spec (format-spec-make ?t tmpfile)
-                    options (format-spec options spec)
-                    spec (format-spec-make
-                          ?h l-host ?u l-user ?p l-port ?c options
-                          ?l (concat remote-shell " " extra-args " -i"))
                     command
-                    (concat
-                     ;; We do not want to see the trailing local
-                     ;; prompt in `start-file-process'.
-                     (unless r-shell "exec ")
-                     command " "
-                     (mapconcat
-                      (lambda (x)
-                        (setq x (mapcar (lambda (y) (format-spec y spec)) x))
-                        (unless (member "" x) (string-join x " ")))
-                      login-args " ")
-                     ;; Local shell could be a Windows COMSPEC.  It
-                     ;; doesn't know the ";" syntax, but we must exit
-                     ;; always for `start-file-process'.  It could
-                     ;; also be a restricted shell, which does not
-                     ;; allow "exec".
-                     (when r-shell " && exit || exit")))
+                    (mapconcat
+                     #'identity
+                     (append
+                      ;; We do not want to see the trailing local
+                      ;; prompt in `start-file-process'.
+                      (unless r-shell '("exec"))
+                      `(,command)
+                      ;; Add arguments for asynchronous processes.
+                      (when process-name async-args)
+                      (tramp-expand-args
+                       hop 'tramp-login-args
+                       ?h (or l-host "") ?u (or l-user "") ?p (or l-port "")
+                       ?c (format-spec options (format-spec-make ?t tmpfile))
+                       ?l (concat remote-shell " " extra-args " -i"))
+                      ;; Local shell could be a Windows COMSPEC.  It
+                      ;; doesn't know the ";" syntax, but we must
+                      ;; exit always for `start-file-process'.  It
+                      ;; could also be a restricted shell, which does
+                      ;; not allow "exec".
+                      (when r-shell '("&&" "exit" "||" "exit")))
+                     " "))
 
                    ;; Send the command.
                    (tramp-message vec 3 "Sending command `%s'" command)
@@ -5149,7 +5040,7 @@ connection if a previous connection has died for some 
reason."
                (when (tramp-get-connection-property p "session-timeout" nil)
                  (run-at-time
                   (tramp-get-connection-property p "session-timeout" nil) nil
-                  'tramp-timeout-session vec))
+                  #'tramp-timeout-session vec))
 
                ;; Make initial shell settings.
                (tramp-open-connection-setup-interactive-shell p vec)
@@ -5469,7 +5360,7 @@ Nonexistent directories are removed from spec."
                  (progn
                    (tramp-message
                     vec 3
-                   "`getconf PATH' not successful, using default value \"%s\"."
+                    "`getconf PATH' not successful, using default value 
\"%s\"."
                     "/bin:/usr/bin")
                    "/bin:/usr/bin"))))
             (own-remote-path
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el
index 6935955..6fbf088 100644
--- a/lisp/net/tramp-smb.el
+++ b/lisp/net/tramp-smb.el
@@ -60,20 +60,17 @@
   tramp-smb-method
   '((tramp-parse-netrc "~/.netrc"))))
 
-;;;###tramp-autoload
 (defcustom tramp-smb-program "smbclient"
   "Name of SMB client to run."
   :group 'tramp
   :type 'string)
 
-;;;###tramp-autoload
 (defcustom tramp-smb-acl-program "smbcacls"
   "Name of SMB acls to run."
   :group 'tramp
   :type 'string
   :version "24.4")
 
-;;;###tramp-autoload
 (defcustom tramp-smb-conf null-device
   "Path of the \"smb.conf\" file.
 If it is nil, no \"smb.conf\" will be added to the `tramp-smb-program'
@@ -81,7 +78,6 @@ call, letting the SMB client use the default one."
   :group 'tramp
   :type '(choice (const nil) (file :must-match t)))
 
-;;;###tramp-autoload
 (defcustom tramp-smb-options nil
   "List of additional options.
 They are added to the `tramp-smb-program' call via \"--option '...'\".
@@ -305,7 +301,6 @@ See `tramp-actions-before-shell' for more info.")
 Operations not mentioned here will be handled by the default Emacs 
primitives.")
 
 ;; Options for remote processes via winexe.
-;;;###tramp-autoload
 (defcustom tramp-smb-winexe-program "winexe"
   "Name of winexe client to run.
 If it isn't found in the local $PATH, the absolute path of winexe
@@ -314,7 +309,6 @@ shall be given.  This is needed for remote processes."
   :type 'string
   :version "24.3")
 
-;;;###tramp-autoload
 (defcustom tramp-smb-winexe-shell-command "powershell.exe"
   "Shell to be used for processes on remote machines.
 This must be Powershell V2 compatible."
@@ -322,7 +316,6 @@ This must be Powershell V2 compatible."
   :type 'string
   :version "24.3")
 
-;;;###tramp-autoload
 (defcustom tramp-smb-winexe-shell-command-switch "-file -"
   "Command switch used together with `tramp-smb-winexe-shell-command'.
 This can be used to disable echo etc."
diff --git a/lisp/net/tramp-sshfs.el b/lisp/net/tramp-sshfs.el
index feb64b8..c4a36fe 100644
--- a/lisp/net/tramp-sshfs.el
+++ b/lisp/net/tramp-sshfs.el
@@ -40,7 +40,6 @@
 (defconst tramp-sshfs-method "sshfs"
   "Tramp method for sshfs mounts.")
 
-;;;###tramp-autoload
 (defcustom tramp-sshfs-program "sshfs"
   "The sshfs mount command."
   :group 'tramp
@@ -51,9 +50,19 @@
 (tramp--with-startup
  (add-to-list 'tramp-methods
              `(,tramp-sshfs-method
-               (tramp-mount-args
-                (("-p" "%p")
-                 ("-o" "idmap=user,reconnect")))))
+               (tramp-mount-args            (("-C") ("-p" "%p")
+                                             ("-o" "idmap=user,reconnect")))
+               ;; These are for remote processes.
+                (tramp-login-program        "ssh")
+                (tramp-login-args           (("-q")("-l" "%u") ("-p" "%p")
+                                            ("-e" "none") ("%h") ("%l")))
+                (tramp-direct-async         t)
+                (tramp-remote-shell         ,tramp-default-remote-shell)
+                (tramp-remote-shell-login   ("-l"))
+                (tramp-remote-shell-args    ("-c"))))
+
+ (add-to-list 'tramp-connection-properties
+             `(,(format "/%s:" tramp-sshfs-method) "direct-async-process" t))
 
  (tramp-set-completion-function
   tramp-sshfs-method tramp-completion-function-alist-ssh))
@@ -76,7 +85,7 @@
      . tramp-handle-directory-files-and-attributes)
     (dired-compress-file . ignore)
     (dired-uncache . tramp-handle-dired-uncache)
-;;     (exec-path . ignore)
+    (exec-path . tramp-sshfs-handle-exec-path)
     (expand-file-name . tramp-handle-expand-file-name)
     (file-accessible-directory-p . tramp-handle-file-accessible-directory-p)
     (file-acl . ignore)
@@ -117,22 +126,22 @@
     (make-directory . tramp-fuse-handle-make-directory)
     (make-directory-internal . ignore)
     (make-nearby-temp-file . tramp-handle-make-nearby-temp-file)
-;;     (make-process . ignore)
+    (make-process . tramp-handle-make-process)
     (make-symbolic-link . tramp-handle-make-symbolic-link)
-;;     (process-file . ignore)
+    (process-file . tramp-sshfs-handle-process-file)
     (rename-file . tramp-sshfs-handle-rename-file)
     (set-file-acl . ignore)
-    (set-file-modes . ignore)
+    (set-file-modes . tramp-sshfs-handle-set-file-modes)
     (set-file-selinux-context . ignore)
     (set-file-times . ignore)
     (set-visited-file-modtime . tramp-handle-set-visited-file-modtime)
-;;     (shell-command . ignore)
-;;     (start-file-process . ignore)
+    (shell-command . tramp-handle-shell-command)
+    (start-file-process . tramp-handle-start-file-process)
     (substitute-in-file-name . tramp-handle-substitute-in-file-name)
     (temporary-file-directory . tramp-handle-temporary-file-directory)
-;;     (tramp-get-remote-gid . ignore)
-;;     (tramp-get-remote-uid . ignore)
-;;     (tramp-set-file-uid-gid . ignore)
+    (tramp-get-remote-gid . ignore)
+    (tramp-get-remote-uid . ignore)
+    (tramp-set-file-uid-gid . ignore)
     (unhandled-file-name-directory . ignore)
     (vc-registered . ignore)
     (verify-visited-file-modtime . tramp-handle-verify-visited-file-modtime)
@@ -185,6 +194,22 @@ arguments to pass to the OPERATION."
       (with-parsed-tramp-file-name newname nil
        (tramp-flush-file-properties v localname)))))
 
+(defun tramp-sshfs-handle-exec-path ()
+  "Like `exec-path' for Tramp files."
+  (append
+   (with-parsed-tramp-file-name default-directory nil
+     (with-tramp-connection-property (tramp-get-process v) "remote-path"
+       (with-temp-buffer
+        (process-file "getconf" nil t nil "PATH")
+        (split-string
+         (progn
+           ;; Read the expression.
+           (goto-char (point-min))
+           (buffer-substring (point) (point-at-eol)))
+         ":" 'omit))))
+   ;; The equivalent to `exec-directory'.
+   `(,(tramp-file-local-name (expand-file-name default-directory)))))
+
 (defun tramp-sshfs-handle-file-system-info (filename)
   "Like `file-system-info' for Tramp files."
   ;;`file-system-info' exists since Emacs 27.1.
@@ -199,6 +224,34 @@ arguments to pass to the OPERATION."
     (when visit (setq buffer-file-name filename))
     (cons (expand-file-name filename) (cdr result))))
 
+(defun tramp-sshfs-handle-process-file
+  (program &optional infile destination display &rest args)
+  "Like `process-file' for Tramp files."
+  ;; The implementation is not complete yet.
+  (when (and (numberp destination) (zerop destination))
+    (error "Implementation does not handle immediate return"))
+
+  (with-parsed-tramp-file-name default-directory nil
+    (let ((command
+          (format
+           "cd %s && exec %s"
+           localname
+           (mapconcat #'tramp-shell-quote-argument (cons program args) " "))))
+      (unwind-protect
+         (apply
+          #'tramp-call-process
+          v (tramp-get-method-parameter v 'tramp-login-program)
+          infile destination display
+          (tramp-expand-args
+           v 'tramp-login-args
+           ?h (or (tramp-file-name-host v) "")
+           ?u (or (tramp-file-name-user v) "")
+           ?p (or (tramp-file-name-port v) "")
+           ?l command))
+
+       (unless process-file-side-effects
+          (tramp-flush-directory-properties v ""))))))
+
 (defun tramp-sshfs-handle-rename-file
     (filename newname &optional ok-if-already-exists)
   "Like `rename-file' for Tramp files."
@@ -217,6 +270,14 @@ arguments to pass to the OPERATION."
     (with-parsed-tramp-file-name newname nil
       (tramp-flush-file-properties v localname))))
 
+(defun tramp-sshfs-handle-set-file-modes (filename mode &optional flag)
+  "Like `set-file-modes' for Tramp files."
+  (with-parsed-tramp-file-name filename nil
+    (unless (and (eq flag 'nofollow) (file-symlink-p filename))
+      (tramp-flush-file-properties v localname)
+      (tramp-compat-set-file-modes
+       (tramp-fuse-local-file-name filename) mode flag))))
+
 (defun tramp-sshfs-handle-write-region
   (start end filename &optional append visit lockname mustbenew)
   "Like `write-region' for Tramp files."
@@ -269,28 +330,16 @@ connection if a previous connection has died for some 
reason."
 
       (unless
          (or (tramp-fuse-mounted-p vec)
-             (let* ((port (or (tramp-file-name-port vec) ""))
-                    (spec (format-spec-make ?p port))
-                    mount-args
-                    (mount-args
-                     (dolist
-                         (x
-                          (tramp-get-method-parameter vec 'tramp-mount-args)
-                          mount-args)
-                       (setq mount-args
-                             (append
-                              mount-args
-                              (let ((y (mapcar
-                                        (lambda (z) (format-spec z spec))
-                                        x)))
-                                (unless (member "" y) y)))))))
-               (with-temp-buffer
-                 (zerop
-                  (apply
-                   #'tramp-call-process
-                   vec tramp-sshfs-program nil t nil
-                   (tramp-fuse-mount-spec vec)
-                   (tramp-fuse-mount-point vec) mount-args))))
+             (with-temp-buffer
+               (zerop
+                (apply
+                 #'tramp-call-process
+                 vec tramp-sshfs-program nil t nil
+                 (tramp-fuse-mount-spec vec)
+                 (tramp-fuse-mount-point vec)
+                 (tramp-expand-args
+                  vec 'tramp-mount-args
+                  ?p (or (tramp-file-name-port vec) "")))))
          (tramp-error
           vec 'file-error "Error mounting %s" (tramp-fuse-mount-spec vec))))
 
diff --git a/lisp/net/tramp-sudoedit.el b/lisp/net/tramp-sudoedit.el
index e181365..66737e6 100644
--- a/lisp/net/tramp-sudoedit.el
+++ b/lisp/net/tramp-sudoedit.el
@@ -791,22 +791,16 @@ in case of error, t otherwise."
   (tramp-sudoedit-maybe-open-connection vec)
   (with-current-buffer (tramp-get-connection-buffer vec)
     (erase-buffer)
-    (let* ((login (tramp-get-method-parameter vec 'tramp-sudo-login))
-          (host (or (tramp-file-name-host vec) ""))
-          (user (or (tramp-file-name-user vec) ""))
-          (spec (format-spec-make ?h host ?u user))
-          (args (append
-                 (tramp-compat-flatten-tree
-                  (mapcar
-                   (lambda (x)
-                     (setq x (mapcar (lambda (y) (format-spec y spec)) x))
-                     (unless (member "" x) x))
-                   login))
-                 (tramp-compat-flatten-tree (delq nil args))))
-          (delete-exited-processes t)
+    (let* ((delete-exited-processes t)
           (process-connection-type tramp-process-connection-type)
           (p (apply #'start-process
-                    (tramp-get-connection-name vec) (current-buffer) args))
+                    (tramp-get-connection-name vec) (current-buffer)
+                    (append
+                     (tramp-expand-args
+                      vec 'tramp-sudo-login
+                      ?h (or (tramp-file-name-host vec) "")
+                      ?u (or (tramp-file-name-user vec) ""))
+                     (tramp-compat-flatten-tree args))))
           ;; We suppress the messages `Waiting for prompts from remote shell'.
           (tramp-verbose (if (= tramp-verbose 3) 2 tramp-verbose))
           ;; We do not want to save the password.
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 47d62f3..8141f02 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -386,6 +386,8 @@ Also see `tramp-default-method-alist'."
   :type 'string)
 
 (defcustom tramp-default-method-alist nil
+  ;; FIXME: This is not an "alist", because its elements are not of
+  ;; the form (KEY . VAL) but (KEY1 KEY2 VAL).
   "Default method to use for specific host/user pairs.
 This is an alist of items (HOST USER METHOD).  The first matching item
 specifies the method to use for a file name which does not specify a
@@ -413,6 +415,8 @@ This variable is regarded as obsolete, and will be removed 
soon."
   :type '(choice (const nil) string))
 
 (defcustom tramp-default-user-alist nil
+  ;; FIXME: This is not an "alist", because its elements are not of
+  ;; the form (KEY . VAL) but (KEY1 KEY2 VAL).
   "Default user to use for specific method/host pairs.
 This is an alist of items (METHOD HOST USER).  The first matching item
 specifies the user to use for a file name which does not specify a
@@ -432,6 +436,8 @@ Useful for su and sudo methods mostly."
   :type 'string)
 
 (defcustom tramp-default-host-alist nil
+  ;; FIXME: This is not an "alist", because its elements are not of
+  ;; the form (KEY . VAL) but (KEY1 KEY2 VAL).
   "Default host to use for specific method/user pairs.
 This is an alist of items (METHOD USER HOST).  The first matching item
 specifies the host to use for a file name which does not specify a
@@ -447,6 +453,8 @@ empty string for the method name."
                       (choice :tag "    Host name" string (const nil)))))
 
 (defcustom tramp-default-proxies-alist nil
+  ;; FIXME: This is not an "alist", because its elements are not of
+  ;; the form (KEY . VAL) but (KEY1 KEY2 VAL).
   "Route to be followed for specific host/user pairs.
 This is an alist of items (HOST USER PROXY).  The first matching
 item specifies the proxy to be passed for a file name located on
@@ -652,6 +660,14 @@ The regexp should match at end of buffer.
 See also `tramp-yesno-prompt-regexp'."
   :type 'regexp)
 
+(defcustom tramp-terminal-type "dumb"
+  "Value of TERM environment variable for logging in to remote host.
+Because Tramp wants to parse the output of the remote shell, it is easily
+confused by ANSI color escape sequences and suchlike.  Often, shell init
+files conditionalize this setup based on the TERM environment variable."
+  :group 'tramp
+  :type 'string)
+
 (defcustom tramp-terminal-prompt-regexp
   (concat "\\("
          "TERM = (.*)"
@@ -1235,6 +1251,67 @@ let-bind this variable."
   :version "24.4"
   :type '(choice (const nil) integer))
 
+;; "getconf PATH" yields:
+;; HP-UX: 
/usr/bin:/usr/ccs/bin:/opt/ansic/bin:/opt/langtools/bin:/opt/fortran/bin
+;; Solaris: /usr/xpg4/bin:/usr/ccs/bin:/usr/bin:/opt/SUNWspro/bin
+;; GNU/Linux (Debian, Suse, RHEL): /bin:/usr/bin
+;; FreeBSD, DragonFly: /usr/bin:/bin:/usr/sbin:/sbin: - beware trailing ":"!
+;; FreeBSD 12.1, Darwin: /usr/bin:/bin:/usr/sbin:/sbin
+;; IRIX64: /usr/bin
+;; QNAP QTS: ---
+;; Hydra: /run/current-system/sw/bin:/bin:/usr/bin
+(defcustom tramp-remote-path
+  '(tramp-default-remote-path "/bin" "/usr/bin" "/sbin" "/usr/sbin"
+    "/usr/local/bin" "/usr/local/sbin" "/local/bin" "/local/freeware/bin"
+    "/local/gnu/bin" "/usr/freeware/bin" "/usr/pkg/bin" "/usr/contrib/bin"
+    "/opt/bin" "/opt/sbin" "/opt/local/bin")
+  "List of directories to search for executables on remote host.
+For every remote host, this variable will be set buffer local,
+keeping the list of existing directories on that host.
+
+You can use \"~\" in this list, but when searching for a shell which groks
+tilde expansion, all directory names starting with \"~\" will be ignored.
+
+`Default Directories' represent the list of directories given by
+the command \"getconf PATH\".  It is recommended to use this
+entry on head of this list, because these are the default
+directories for POSIX compatible commands.  On remote hosts which
+do not offer the getconf command (like cygwin), the value
+\"/bin:/usr/bin\" is used instead.  This entry is represented in
+the list by the special value `tramp-default-remote-path'.
+
+`Private Directories' are the settings of the $PATH environment,
+as given in your `~/.profile'.  This entry is represented in
+the list by the special value `tramp-own-remote-path'."
+  :group 'tramp
+  :type '(repeat (choice
+                 (const :tag "Default Directories" tramp-default-remote-path)
+                 (const :tag "Private Directories" tramp-own-remote-path)
+                 (string :tag "Directory"))))
+
+(defcustom tramp-remote-process-environment
+  '("ENV=''" "TMOUT=0" "LC_CTYPE=''"
+    "CDPATH=" "HISTORY=" "MAIL=" "MAILCHECK=" "MAILPATH=" "PAGER=cat"
+    "autocorrect=" "correct=")
+  "List of environment variables to be set on the remote host.
+
+Each element should be a string of the form ENVVARNAME=VALUE.  An
+entry ENVVARNAME= disables the corresponding environment variable,
+which might have been set in the init files like ~/.profile.
+
+Special handling is applied to some environment variables,
+which should not be set here:
+
+The PATH environment variable should be set via `tramp-remote-path'.
+
+The TERM environment variable should be set via `tramp-terminal-type'.
+
+The INSIDE_EMACS environment variable will automatically be set
+based on the Tramp and Emacs versions, and should not be set here."
+  :group 'tramp
+  :version "26.1"
+  :type '(repeat string))
+
 (defcustom tramp-completion-reread-directory-timeout 10
   "Defines seconds since last remote command before rereading a directory.
 A remote directory might have changed its contents.  In order to
@@ -1710,6 +1787,10 @@ version, the function does nothing."
   "Used for highlighting Tramp debug buffers in `outline-mode'.")
 
 (defconst tramp-debug-font-lock-keywords
+  ;; FIXME: Make it a function instead of an ELisp expression, so you
+  ;; can evaluate it with `funcall' rather than `eval'!
+  ;; Also, in `font-lock-defaults' you can specify a function name for
+  ;; the "KEYWORDS" part, so font-lock calls it to get the actual keywords!
   '(list
     (concat "^\\(?:" tramp-debug-outline-regexp "\\).+")
     '(1 font-lock-warning-face t t)
@@ -1738,8 +1819,11 @@ The outline level is equal to the verbosity of the Tramp 
message."
        (outline-mode))
       (setq-local outline-level 'tramp-debug-outline-level)
       (setq-local font-lock-keywords
-                  `(t (eval ,tramp-debug-font-lock-keywords)
-                      ,(eval tramp-debug-font-lock-keywords)))
+                  ;; FIXME: This `(t FOO . BAR)' representation in
+                  ;; `font-lock-keywords' is supposed to be an
+                  ;; internal implementation "detail".  Don't abuse it here!
+                  `(t (eval ,tramp-debug-font-lock-keywords t)
+                      ,(eval tramp-debug-font-lock-keywords t)))
       ;; Do not edit the debug buffer.
       (use-local-map special-mode-map))
     (current-buffer)))
@@ -3691,15 +3775,15 @@ User is always nil."
     (setq choices tramp-default-proxies-alist)
     (while choices
       (setq item (pop choices)
-           proxy (eval (nth 2 item)))
+           proxy (eval (nth 2 item) t))
       (when (and
             ;; Host.
             (string-match-p
-             (or (eval (nth 0 item)) "")
+             (or (eval (nth 0 item) t) "")
              (or (tramp-file-name-host-port (car target-alist)) ""))
             ;; User.
             (string-match-p
-             (or (eval (nth 1 item)) "")
+             (or (eval (nth 1 item) t) "")
              (or (tramp-file-name-user-domain (car target-alist)) "")))
        (if (null proxy)
            ;; No more hops needed.
@@ -3750,6 +3834,22 @@ User is always nil."
     ;; Result.
     target-alist))
 
+(defun tramp-expand-args (vec parameter &rest spec-list)
+  "Expand login arguments as given by PARAMETER in `tramp-methods'.
+PARAMETER is a symbol like `tramp-login-args', denoting a list of
+list of strings from `tramp-methods', containing %-sequences for
+substitution.  SPEC-LIST is a list of char/value pairs used for
+`format-spec-make'."
+  (let ((args (tramp-get-method-parameter vec parameter))
+       (spec (apply 'format-spec-make spec-list)))
+    ;; Expand format spec.
+    (tramp-compat-flatten-tree
+     (mapcar
+      (lambda (x)
+       (setq x (mapcar (lambda (y) (format-spec y spec)) x))
+       (unless (member "" x) x))
+      args))))
+
 (defun tramp-direct-async-process-p (&rest args)
   "Whether direct async `make-process' can be called."
   (let ((v (tramp-dissect-file-name default-directory))
@@ -3831,14 +3931,11 @@ It does not support `:stderr'."
                (append `("cd" ,localname "&&" "(" "env") env `(,command ")"))))
 
          ;; Check for `tramp-sh-file-name-handler', because something
-         ;; is different between tramp-adb.el and tramp-sh.el.
+         ;; is different between tramp-sh.el, and tramp-adb.el or
+         ;; tramp-sshfs.el.
          (let* ((sh-file-name-handler-p (tramp-sh-file-name-handler-p v))
                 (login-program
                  (tramp-get-method-parameter v 'tramp-login-program))
-                (login-args
-                 (tramp-get-method-parameter v 'tramp-login-args))
-                (async-args
-                 (tramp-get-method-parameter v 'tramp-async-args))
                 ;; We don't create the temporary file.  In fact, it
                 ;; is just a prefix for the ControlPath option of
                 ;; ssh; the real temporary file has another name, and
@@ -3856,29 +3953,23 @@ It does not support `:stderr'."
                  (when sh-file-name-handler-p
                    (tramp-compat-funcall
                     'tramp-ssh-controlmaster-options v)))
-                spec p)
+                login-args p)
 
-           ;; Replace `login-args' place holders.
+           ;; Replace `login-args' place holders.  Split
+           ;; ControlMaster options.
            (setq
-            spec (format-spec-make ?t tmpfile)
-            options (format-spec (or options "") spec)
-            spec (format-spec-make
-                  ?h (or host "") ?u (or user "") ?p (or port "")
-                  ?c options ?l "")
-            ;; Add arguments for asynchronous processes.
-            login-args (append async-args login-args)
-            ;; Expand format spec.
             login-args
-            (tramp-compat-flatten-tree
-             (mapcar
-              (lambda (x)
-                (setq x (mapcar (lambda (y) (format-spec y spec)) x))
-                (unless (member "" x) x))
-              login-args))
-            ;; Split ControlMaster options.
-            login-args
-            (tramp-compat-flatten-tree
-             (mapcar (lambda (x) (split-string x " ")) login-args))
+            (append
+             (tramp-compat-flatten-tree
+              (tramp-get-method-parameter v 'tramp-async-args))
+             (tramp-compat-flatten-tree
+              (mapcar
+               (lambda (x) (split-string x " "))
+               (tramp-expand-args
+                v 'tramp-login-args
+                ?h (or host "") ?u (or user "") ?p (or port "")
+                ?c (format-spec (or options "") (format-spec-make ?t tmpfile))
+                ?l ""))))
             p (make-process
                :name name :buffer buffer
                :command (append `(,login-program) login-args command)
diff --git a/lisp/net/webjump.el b/lisp/net/webjump.el
index 1fa625c..4baa657 100644
--- a/lisp/net/webjump.el
+++ b/lisp/net/webjump.el
@@ -252,7 +252,7 @@ Please submit bug reports and other feedback to the author, 
Neil W. Van Dyke
                 (cond ((not expr) "")
                       ((stringp expr) expr)
                       ((vectorp expr) (webjump-builtin expr name))
-                      ((listp expr) (eval expr))
+                      ((listp expr) (eval expr t))
                       ((symbolp expr)
                        (if (fboundp expr)
                            (funcall expr name)
diff --git a/lisp/obsolete/iswitchb.el b/lisp/obsolete/iswitchb.el
index a7fd6cc..7ffee76 100644
--- a/lisp/obsolete/iswitchb.el
+++ b/lisp/obsolete/iswitchb.el
@@ -313,7 +313,7 @@ Possible values:
 `otherwindow'  Show new buffer in another window (same frame)
 `display'      Display buffer in another window without switching to it
 `otherframe'   Show new buffer in another frame
-`maybe-frame'  If a buffer is visible in another frame, prompt to ask if you
+`maybe-frame'  If a buffer is visible in another frame, prompt to ask if
                you want to see the buffer in the same window of the current
                frame or in the other frame.
 `always-frame'  If a buffer is visible in another frame, raise that
@@ -1158,18 +1158,6 @@ Copied from `icomplete-exhibit' with two changes:
          (insert (iswitchb-completions
                   contents))))))
 
-(defvar most-len)
-(defvar most-is-exact)
-
-(defun iswitchb-output-completion (com)
-  (if (= (length com) most-len)
-      ;; Most is one exact match,
-      ;; note that and leave out
-      ;; for later indication:
-      (ignore
-       (setq most-is-exact t))
-    (substring com most-len)))
-
 (defun iswitchb-completions (name)
   "Return the string that is displayed after the user's text.
 Modified from `icomplete-completions'."
@@ -1260,16 +1248,11 @@ Modified from `icomplete-completions'."
                        (nreverse res))
                      (list "...")
                      (nthcdr (- (length comps)
-                                (/ iswitchb-max-to-show 2)) comps))))
+                                (/ iswitchb-max-to-show 2))
+                             comps))))
           (let* (
-                 ;;(most (try-completion name candidates predicate))
-                 (most nil)
-                 (most-len (length most))
-                 most-is-exact
                  (alternatives
-                  (mapconcat (if most #'iswitchb-output-completion
-                               #'identity)
-                             comps iswitchb-delim)))
+                  (mapconcat #'identity comps iswitchb-delim)))
 
             (concat
 
@@ -1283,17 +1266,9 @@ Modified from `icomplete-completions'."
                          close-bracket-determined))
              ;; end of partial matches...
 
-             ;; think this bit can be ignored.
-             (and (> most-len (length name))
-                  (concat open-bracket-determined
-                          (substring most (length name))
-                          close-bracket-determined))
-
              ;; list all alternatives
              open-bracket-prospects
-             (if most-is-exact
-                 (concat iswitchb-delim alternatives)
-               alternatives)
+             alternatives
              close-bracket-prospects))))))
 
 (defun iswitchb-minibuffer-setup ()
diff --git a/lisp/org/ob-lilypond.el b/lisp/org/ob-lilypond.el
index fbdd905..47397e6 100644
--- a/lisp/org/ob-lilypond.el
+++ b/lisp/org/ob-lilypond.el
@@ -220,7 +220,7 @@ If error in compilation, attempt to mark the error in 
lilypond org file."
 FILE-NAME is full path to lilypond (.ly) file."
   (message "Compiling LilyPond...")
   (let ((arg-1 org-babel-lilypond-ly-command) ;program
-        (arg-2 nil)                    ;infile
+        ;; (arg-2 nil)                    ;infile
         (arg-3 "*lilypond*")           ;buffer
        (arg-4 t)                      ;display
        (arg-5 (if org-babel-lilypond-gen-png  "--png"  "")) ;&rest...
@@ -231,10 +231,10 @@ FILE-NAME is full path to lilypond (.ly) file."
         (arg-10 (concat "--output=" (file-name-sans-extension file-name)))
         (arg-11 file-name))
     (if test
-        `(,arg-1 ,arg-2 ,arg-3 ,arg-4 ,arg-5 ,arg-6
+        `(,arg-1 ,nil ,arg-3 ,arg-4 ,arg-5 ,arg-6 ;; arg-2
                  ,arg-7 ,arg-8 ,arg-9 ,arg-10 ,arg-11)
       (call-process
-       arg-1 arg-2 arg-3 arg-4 arg-5 arg-6
+       arg-1 nil arg-3 arg-4 arg-5 arg-6 ;; arg-2
        arg-7 arg-8 arg-9 arg-10 arg-11))))
 
 (defun org-babel-lilypond-check-for-compile-error (file-name &optional test)
diff --git a/lisp/org/ol-gnus.el b/lisp/org/ol-gnus.el
index 71051bc..2d51447 100644
--- a/lisp/org/ol-gnus.el
+++ b/lisp/org/ol-gnus.el
@@ -198,11 +198,11 @@ If `org-store-link' was called with a prefix arg the 
meaning of
               (to (mail-fetch-field "To"))
               (from (mail-fetch-field "From"))
               (subject (mail-fetch-field "Subject"))
-              newsgroup xarchive)      ;those are always nil for gcc
+              ) ;; newsgroup xarchive  ;those are always nil for gcc
           (unless gcc (error "Can not create link: No Gcc header found"))
           (org-link-store-props :type "gnus" :from from :subject subject
                                 :message-id id :group gcc :to to)
-          (let ((link (org-gnus-article-link gcc newsgroup id xarchive))
+          (let ((link (org-gnus-article-link gcc nil id nil)) ;;newsgroup 
xarchive
                 (description (org-link-email-description)))
             (org-link-add-props :link link :description description)
             link)))))))
diff --git a/lisp/org/ol.el b/lisp/org/ol.el
index 994e30f..38e2dd6 100644
--- a/lisp/org/ol.el
+++ b/lisp/org/ol.el
@@ -591,7 +591,7 @@ handle this as a special case.
 
 When the function does handle the link, it must return a non-nil value.
 If it decides that it is not responsible for this link, it must return
-nil to indicate that that Org can continue with other options like
+nil to indicate that Org can continue with other options like
 exact and fuzzy text search.")
 
 
@@ -1467,7 +1467,7 @@ non-nil."
            (move-beginning-of-line 2)
            (set-mark (point)))))
     (setq org-store-link-plist nil)
-    (let (link cpltxt desc description search custom-id agenda-link)
+    (let (link cpltxt desc search custom-id agenda-link) ;; description
       (cond
        ;; Store a link using an external link type, if any function is
        ;; available. If more than one can generate a link from current
@@ -1598,7 +1598,7 @@ non-nil."
                      'org-create-file-search-functions))
        (setq link (concat "file:" (abbreviate-file-name buffer-file-name)
                           "::" search))
-       (setq cpltxt (or description link)))
+       (setq cpltxt (or link))) ;; description
 
        ((and (buffer-file-name (buffer-base-buffer)) (derived-mode-p 
'org-mode))
        (org-with-limited-levels
diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el
index 2844b0e..251ad97 100644
--- a/lisp/org/org-clock.el
+++ b/lisp/org/org-clock.el
@@ -2239,7 +2239,7 @@ have priority."
                  ((>= month 7) 3)
                  ((>= month 4) 2)
                  (t 1)))
-        m1 h1 d1 month1 y1 shiftedy shiftedm shiftedq)
+        h1 d1 month1 y1 shiftedy shiftedm shiftedq) ;; m1
     (cond
      ((string-match "\\`[0-9]+\\'" skey)
       (setq y (string-to-number skey) month 1 d 1 key 'year))
@@ -2342,7 +2342,7 @@ have priority."
                  (`interactive (org-read-date nil t nil "Range end? "))
                  (`untilnow (current-time))
                  (_ (encode-time 0
-                                 (or m1 m)
+                                 m ;; (or m1 m)
                                  (or h1 h)
                                  (or d1 d)
                                  (or month1 month)
@@ -2389,7 +2389,7 @@ the currently selected interval size."
        (user-error "Line needs a :block definition before this command works")
       (let* ((b (match-beginning 1)) (e (match-end 1))
             (s (match-string 1))
-            block shift ins y mw d date wp m)
+            block shift ins y mw d date wp) ;; m
        (cond
         ((equal s "yesterday") (setq s "today-1"))
         ((equal s "lastweek") (setq s "thisweek-1"))
@@ -2414,7 +2414,7 @@ the currently selected interval size."
          (cond
           (d (setq ins (format-time-string
                         "%Y-%m-%d"
-                        (encode-time 0 0 0 (+ d n) m y))))
+                        (encode-time 0 0 0 (+ d n) nil y)))) ;; m
           ((and wp (string-match "w\\|W" wp) mw (> (length wp) 0))
            (require 'cal-iso)
            (setq date (calendar-gregorian-from-absolute
diff --git a/lisp/org/org-crypt.el b/lisp/org/org-crypt.el
index caf9de9..103baeb 100644
--- a/lisp/org/org-crypt.el
+++ b/lisp/org/org-crypt.el
@@ -284,6 +284,8 @@ Assume `epg-context' is set."
         nil)))
     (_ nil)))
 
+(defvar org--matcher-tags-todo-only)
+
 ;;;###autoload
 (defun org-encrypt-entries ()
   "Encrypt all top-level entries in the current buffer."
diff --git a/lisp/org/org-protocol.el b/lisp/org/org-protocol.el
index 74043f8..726c1ca 100644
--- a/lisp/org/org-protocol.el
+++ b/lisp/org/org-protocol.el
@@ -535,7 +535,7 @@ The location for a browser's bookmark should look like this:
         encodeURIComponent(location.href)"
   ;; As we enter this function for a match on our protocol, the return value
   ;; defaults to nil.
-  (let ((result nil)
+  (let (;; (result nil)
        (f (org-protocol-sanitize-uri
            (plist-get (org-protocol-parse-parameters fname nil '(:url))
                       :url))))
@@ -586,7 +586,7 @@ The location for a browser's bookmark should look like this:
               (if (file-exists-p the-file)
                   (message "%s: permission denied!" the-file)
                 (message "%s: no such file or directory." the-file))))))
-      result)))
+      nil))) ;; FIXME: Really?
 
 
 ;;; Core functions:
diff --git a/lisp/org/org-tempo.el b/lisp/org/org-tempo.el
index 36b8614..c121b8e 100644
--- a/lisp/org/org-tempo.el
+++ b/lisp/org/org-tempo.el
@@ -65,7 +65,7 @@ just like `org-structure-template-alist'.  The tempo snippet
 \"<KEY\" will be expanded using the KEYWORD value.  For example
 \"<L\" at the beginning of a line is expanded to \"#+latex:\".
 
-Do not use \"I\" as a KEY, as it it reserved for expanding
+Do not use \"I\" as a KEY, as it is reserved for expanding
 \"#+include\"."
   :group 'org-tempo
   :type '(repeat (cons (string :tag "Key")
diff --git a/lisp/org/org.el b/lisp/org/org.el
index 41898dc..cebe173 100644
--- a/lisp/org/org.el
+++ b/lisp/org/org.el
@@ -20318,7 +20318,7 @@ unless optional argument NO-INHERITANCE is non-nil."
 
 (defun org-point-at-end-of-empty-headline ()
   "If point is at the end of an empty headline, return t, else nil.
-If the heading only contains a TODO keyword, it is still still considered
+If the heading only contains a TODO keyword, it is still considered
 empty."
   (let ((case-fold-search nil))
     (and (looking-at "[ \t]*$")
diff --git a/lisp/org/ox-odt.el b/lisp/org/ox-odt.el
index 2d550d9..a076d15 100644
--- a/lisp/org/ox-odt.el
+++ b/lisp/org/ox-odt.el
@@ -2111,7 +2111,8 @@ SHORT-CAPTION are strings."
         (caption (let ((c (org-export-get-caption element-or-parent)))
                    (and c (org-export-data c info))))
         ;; FIXME: We don't use short-caption for now
-        (short-caption nil))
+        ;; (short-caption nil)
+        )
     (when (or label caption)
       (let* ((default-category
               (cl-case (org-element-type element)
@@ -2159,7 +2160,7 @@ SHORT-CAPTION are strings."
                           "<text:sequence text:ref-name=\"%s\" 
text:name=\"%s\" text:formula=\"ooow:%s+1\" 
style:num-format=\"1\">%s</text:sequence>"
                           label counter counter seqno))
                   (?c . ,(or caption "")))))
-              short-caption))
+              nil)) ;; short-caption
            ;; Case 2: Handle Label reference.
            (reference
             (let* ((fmt (cddr (assoc-string label-style org-odt-label-styles 
t)))
@@ -2362,14 +2363,14 @@ used as a communication channel."
         ;; If yes, note down its contents.  It will go in to frame
         ;; description.  This quite useful for debugging.
         (desc (and replaces (org-element-property :value replaces)))
-        width height)
+        ) ;; width height
     (cond
      ((eq embed-as 'character)
-      (org-odt--render-image/formula "InlineFormula" href width height
+      (org-odt--render-image/formula "InlineFormula" href nil nil ;; width 
height
                                     nil nil title desc))
      (t
       (let* ((equation (org-odt--render-image/formula
-                       "CaptionedDisplayFormula" href width height
+                       "CaptionedDisplayFormula" href nil nil ;; width height
                        captions nil title desc))
             (label
              (let* ((org-odt-category-map-alist
diff --git a/lisp/org/ox.el b/lisp/org/ox.el
index 050a809..36ecf01 100644
--- a/lisp/org/ox.el
+++ b/lisp/org/ox.el
@@ -2706,9 +2706,9 @@ a list of footnote definitions or in the widened buffer."
               (and (or (eq (org-element-type f) 'footnote-definition)
                        (eq (org-element-property :type f) 'inline))
                    (org-element-property :label f)))))
-         seen)
+         ) ;; seen
       (dolist (l (funcall list-labels tree))
-       (cond ((member l seen))
+       (cond ;; ((member l seen))
              ((member l known-definitions) (push l defined))
              (t (push l undefined)))))
     ;; Complete MISSING-DEFINITIONS by finding the definition of every
diff --git a/lisp/outline.el b/lisp/outline.el
index a859f9a..79029a6 100644
--- a/lisp/outline.el
+++ b/lisp/outline.el
@@ -207,13 +207,11 @@ in the file it applies to.")
                                (list 'face nil
                                      'keymap outline-mode-cycle-map)))
                        (outline-font-lock-face))
-                  (when (and outline-minor-mode
-                             (eq outline-minor-mode-highlight 'override))
-                    'append)
-                  (if (and outline-minor-mode
-                           (eq outline-minor-mode-highlight t))
-                      'append
-                    t))))
+                  (when outline-minor-mode
+                    (pcase outline-minor-mode-highlight
+                      ('override t)
+                      ('append 'append)))
+                  t)))
   "Additional expressions to highlight in Outline mode.")
 
 (defface outline-1
@@ -343,10 +341,12 @@ Typing these keys anywhere outside heading lines uses 
their default bindings."
 Non-nil value works well only when outline font-lock keywords
 don't conflict with the major mode's font-lock keywords.
 When t, it puts outline faces only if there are no major mode's faces
-on headings.  When `override', it tries to append outline faces
-to major mode's faces."
+on headings.  When `override', it completely overwrites major mode's
+faces with outline faces.  When `append', it tries to append outline
+faces to major mode's faces."
   :type '(choice (const :tag "No highlighting" nil)
-                 (const :tag "Append to major mode faces" override)
+                 (const :tag "Overwrite major mode faces" override)
+                 (const :tag "Append outline faces to major mode faces" append)
                  (const :tag "Highlight separately from major mode faces" t))
   :version "28.1")
 ;;;###autoload(put 'outline-minor-mode-highlight 'safe-local-variable 
'booleanp)
@@ -362,6 +362,7 @@ to major mode's faces."
           (overlay-put overlay 'outline-overlay t)
           (when (or (eq outline-minor-mode-highlight 'override)
                     (and (eq outline-minor-mode-highlight t)
+                         (goto-char (match-beginning 0))
                          (not (get-text-property (point) 'face))))
             (overlay-put overlay 'face (outline-font-lock-face)))
           (when outline-minor-mode-cycle
diff --git a/lisp/progmodes/cfengine.el b/lisp/progmodes/cfengine.el
index bef99f2..472788d 100644
--- a/lisp/progmodes/cfengine.el
+++ b/lisp/progmodes/cfengine.el
@@ -987,13 +987,11 @@ Intended as the value of `indent-line-function'."
     (if (> (- (point-max) pos) (point))
        (goto-char (- (point-max) pos)))))
 
-;; This doesn't work too well in Emacs 21.2.  See 22.1 development
-;; code.
 (defun cfengine-fill-paragraph (&optional justify)
   "Fill `paragraphs' in Cfengine code."
   (interactive "P")
   (or (if (fboundp 'fill-comment-paragraph)
-         (fill-comment-paragraph justify) ; post Emacs 21.3
+          (fill-comment-paragraph justify)
        ;; else do nothing in a comment
        (nth 4 (parse-partial-sexp (save-excursion
                                     (beginning-of-defun)
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index 6b22228..734797b 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -907,22 +907,12 @@ In regular expressions (including character classes):
 
 
 (defun cperl-make-indent (column &optional minimum keep)
-  "Makes indent of the current line the requested amount.
-Unless KEEP, removes the old indentation.  Works around a bug in ancient
-versions of Emacs."
-  (let ((prop (get-text-property (point) 'syntax-type)))
-    (or keep
-       (delete-horizontal-space))
-    (indent-to column minimum)
-    ;; In old versions (e.g., 19.33) `indent-to' would not inherit properties
-    (and prop
-        (> (current-column) 0)
-        (save-excursion
-          (beginning-of-line)
-          (or (get-text-property (point) 'syntax-type)
-              (and (looking-at "\\=[ \t]")
-                     (put-text-property (point) (match-end 0)
-                                        'syntax-type prop)))))))
+  "Indent from point with tabs and spaces until COLUMN is reached.
+MINIMUM is like in `indent-to', which see.
+Unless KEEP, removes the old indentation."
+  (or keep
+      (delete-horizontal-space))
+  (indent-to column minimum))
 
 ;; Probably it is too late to set these guys already, but it can help later:
 
@@ -6711,9 +6701,9 @@ One may build such TAGS files from CPerl mode menu."
                        (or (nthcdr 2 elt)
                            ;; Only in one file
                            (setcdr elt (cdr (nth 1 elt))))))
-           to l1 l2 l3)
+           to) ;; l1 l2 l3
        ;; (setq cperl-hierarchy '(() () ())) ; Would write into '() later!
-       (setq cperl-hierarchy (list l1 l2 l3))
+       (setq cperl-hierarchy (list () () ())) ;; (list l1 l2 l3)
        (or tags-table-list
            (call-interactively 'visit-tags-table))
        (mapc
@@ -6759,7 +6749,7 @@ One may build such TAGS files from CPerl mode menu."
                         "\\)\\(::\\)?"))
         (packages (cdr (nth 1 to)))
         (methods (cdr (nth 2 to)))
-        l1 head cons1 cons2 ord writeto recurse
+        head cons1 cons2 ord writeto recurse ;; l1
         root-packages root-functions
         (move-deeper
           (lambda (elt)
@@ -6779,7 +6769,7 @@ One may build such TAGS files from CPerl mode menu."
                    (setq root-functions (cons elt root-functions)))
                   (t
                    (setq root-packages (cons elt root-packages)))))))
-    (setcdr to l1)                     ; Init to dynamic space
+    (setcdr to nil) ;; l1              ; Init to dynamic space
     (setq writeto to)
     (setq ord 1)
     (mapc move-deeper packages)
diff --git a/lisp/progmodes/ebrowse.el b/lisp/progmodes/ebrowse.el
index 40bdaad..cafdb3b 100644
--- a/lisp/progmodes/ebrowse.el
+++ b/lisp/progmodes/ebrowse.el
@@ -3184,8 +3184,8 @@ MEMBER-NAME is the name of the member found."
     (let* ((start (point))
           (name (progn (skip-chars-forward "a-zA-Z0-9_")
                        (buffer-substring start (point))))
-          class)
-      (list class name))))
+          ) ;; class
+      (list nil name)))) ;; class
 
 
 (defun ebrowse-tags-choose-class (_tree header name initial-class-name)
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index d59da24..18da439 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -106,7 +106,7 @@
 ;;
 ;; - Write a new function that will determine the current project
 ;; based on the directory and add it to `project-find-functions'
-;; (which see) using `add-hook'. It is a good idea to depend on the
+;; (which see) using `add-hook'.  It is a good idea to depend on the
 ;; directory only, and not on the current major mode, for example.
 ;; Because the usual expectation is that all files in the directory
 ;; belong to the same project (even if some/most of them are ignored).
@@ -775,7 +775,7 @@ pattern to search for."
     xrefs))
 
 (defun project--read-regexp ()
-  (let ((sym (thing-at-point 'symbol)))
+  (let ((sym (thing-at-point 'symbol t)))
     (read-regexp "Find regexp" (and sym (regexp-quote sym)))))
 
 ;;;###autoload
@@ -1255,7 +1255,6 @@ It's also possible to enter an arbitrary directory not in 
the list."
 
 ;;; Project switching
 
-;;;###autoload
 (defcustom project-switch-commands
   '((project-find-file "Find file")
     (project-find-regexp "Find regexp")
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index af46365..c066d9d 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -411,6 +411,12 @@ elements is negated: these commands will NOT prompt."
   "Functions called after returning to a pre-jump location."
   :type 'hook)
 
+(defcustom xref-after-update-hook nil
+  "Functions called after the xref buffer is updated."
+  :type 'hook
+  :version "28.1"
+  :package-version '(xref . "1.0.4"))
+
 (defvar xref--marker-ring (make-ring xref-marker-ring-length)
   "Ring of markers to implement the marker stack.")
 
@@ -927,7 +933,8 @@ GROUP is a string for decoration purposes and XREF is an
                          prefix summary)
                         (setq prev-line line
                               prev-group group))))
-           (insert "\n")))
+           (insert "\n"))
+  (run-hooks 'xref-after-update-hook))
 
 (defun xref--analyze (xrefs)
   "Find common filenames in XREFS.
diff --git a/lisp/ses.el b/lisp/ses.el
index d6090f3..a11c754 100644
--- a/lisp/ses.el
+++ b/lisp/ses.el
@@ -332,9 +332,9 @@ column or default printer and then modify its output.")
       next-line-add-newlines transient-mark-mode)
     "Buffer-local variables used by SES."))
 
-(defmacro ses--metaprogramming (exp) (declare (debug t)) (eval exp t))
-(ses--metaprogramming
- `(progn ,@(mapcar (lambda (x) `(defvar ,(or (car-safe x) x))) ses-localvars)))
+(defmacro ses--\,@ (exp) (declare (debug t)) (macroexp-progn (eval exp t)))
+(ses--\,@
+ (mapcar (lambda (x) `(defvar ,(or (car-safe x) x))) ses-localvars))
 
 (defun ses-set-localvars ()
   "Set buffer-local and initialize some SES variables."
@@ -840,31 +840,31 @@ and ARGS and reset `ses-start-time' to the current time."
   "Install VAL as the contents for field FIELD (named by a quoted symbol) of
 cell (ROW,COL).  This is undoable.  The cell's data will be updated through
 `post-command-hook'."
-  `(let ((row ,row)
-         (col ,col)
-         (val ,val))
-     (let* ((cell (ses-get-cell row col))
+  (macroexp-let2 nil row row
+  (macroexp-let2 nil col col
+  (macroexp-let2 nil val val
+    `(let* ((cell (ses-get-cell ,row ,col))
             (change
              ,(let ((field (progn (cl-assert (eq (car field) 'quote))
                                   (cadr field))))
                 (if (eq field 'value)
-                    '(ses-set-with-undo (ses-cell-symbol cell) val)
+                    `(ses-set-with-undo (ses-cell-symbol cell) ,val)
                   ;; (let* ((slots (get 'ses-cell 'cl-struct-slots))
                   ;;        (slot (or (assq field slots)
                   ;;                  (error "Unknown field %S" field)))
                   ;;        (idx (- (length slots)
                   ;;                (length (memq slot slots)))))
-                  ;;   `(ses-aset-with-undo cell ,idx val))
+                  ;;   `(ses-aset-with-undo cell ,idx ,val))
                   (let ((getter (intern-soft (format "ses-cell--%s" field))))
                     `(ses-setter-with-undo
                       (eval-when-compile
                         (cons #',getter
                               (lambda (newval cell)
                                 (setf (,getter cell) newval))))
-                      val cell))))))
+                      ,val cell))))))
        (if change
-           (add-to-list 'ses--deferred-write (cons row col))))
-     nil)) ; Make coverage-tester happy.
+           (add-to-list 'ses--deferred-write (cons ,row ,col)))
+       nil))))) ; Make coverage-tester happy.
 
 (defun ses-cell-set-formula (row col formula)
   "Store a new formula for (ROW . COL) and enqueue the cell for
diff --git a/lisp/simple.el b/lisp/simple.el
index 122b8d5..068ab6c 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -2824,8 +2824,35 @@ the minibuffer contents."
 
 (defconst undo-equiv-table (make-hash-table :test 'eq :weakness t)
   "Table mapping redo records to the corresponding undo one.
-A redo record for undo-in-region maps to t.
-A redo record for ordinary undo maps to the following (earlier) undo.")
+A redo record for an undo in region maps to 'undo-in-region.
+A redo record for ordinary undo maps to the following (earlier) undo.
+A redo record that undoes to the beginning of the undo list maps to t.
+In the rare case where there are (erroneously) consecutive nil's in
+`buffer-undo-list', `undo' maps the previous valid undo record to
+'empty, if the previous record is a redo record, `undo' doesn't change
+its mapping.
+
+To be clear, a redo record is just an undo record, the only difference
+is that it is created by an undo command (instead of an ordinary buffer
+edit).  Since a record used to undo ordinary change is called undo
+record, a record used to undo an undo is called redo record.
+
+`undo' uses this table to make sure the previous command is `undo'.
+`undo-redo' uses this table to set the correct `pending-undo-list'.
+
+When you undo, `pending-undo-list' shrinks and `buffer-undo-list'
+grows, and Emacs maps the tip of `buffer-undo-list' to the tip of
+`pending-undo-list' in this table.
+
+For example, consider this undo list where each node represents an
+undo record: if we undo from 4, `pending-undo-list' will be at 3,
+`buffer-undo-list' at 5, and 5 will map to 3.
+
+    |
+    3  5
+    | /
+    |/
+    4")
 
 (defvar undo-in-region nil
   "Non-nil if `pending-undo-list' is not just a tail of `buffer-undo-list'.")
@@ -2872,7 +2899,9 @@ as an argument limits undo to changes within the current 
region."
     ;; the next command should not be a "consecutive undo".
     ;; So set `this-command' to something other than `undo'.
     (setq this-command 'undo-start)
-
+    ;; Here we decide whether to break the undo chain.  If the
+    ;; previous command is `undo', we don't call `undo-start', i.e.,
+    ;; don't break the undo chain.
     (unless (and (eq last-command 'undo)
                 (or (eq pending-undo-list t)
                     ;; If something (a timer or filter?) changed the buffer
@@ -2901,7 +2930,7 @@ as an argument limits undo to changes within the current 
region."
        ;; undo-redo-undo-redo-... so skip to the very last equiv.
        (while (let ((next (gethash equiv undo-equiv-table)))
                 (if next (setq equiv next))))
-       (setq pending-undo-list equiv)))
+       (setq pending-undo-list (if (consp equiv) equiv t))))
     (undo-more
      (if (numberp arg)
         (prefix-numeric-value arg)
@@ -2917,11 +2946,17 @@ as an argument limits undo to changes within the 
current region."
       (while (eq (car list) nil)
        (setq list (cdr list)))
       (puthash list
-               ;; Prevent identity mapping.  This can happen if
-               ;; consecutive nils are erroneously in undo list.
-               (if (or undo-in-region (eq list pending-undo-list))
-                   t
-                 pending-undo-list)
+               (cond
+                (undo-in-region 'undo-in-region)
+                ;; Prevent identity mapping.  This can happen if
+                ;; consecutive nils are erroneously in undo list.  It
+                ;; has to map to _something_ so that the next `undo'
+                ;; command recognizes that the previous command is
+                ;; `undo' and doesn't break the undo chain.
+                ((eq list pending-undo-list)
+                 (or (gethash list undo-equiv-table)
+                     'empty))
+                (t pending-undo-list))
               undo-equiv-table))
     ;; Don't specify a position in the undo record for the undo command.
     ;; Instead, undoing this should move point to where the change is.
@@ -3234,7 +3269,7 @@ list can be applied to the current buffer."
         undo-elt)
     (while ulist
       (when undo-no-redo
-        (while (gethash ulist undo-equiv-table)
+        (while (consp (gethash ulist undo-equiv-table))
           (setq ulist (gethash ulist undo-equiv-table))))
       (setq undo-elt (car ulist))
       (cond
diff --git a/lisp/subr.el b/lisp/subr.el
index 77bc7a3..ef0e5e6 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -887,7 +887,9 @@ Example:
 
 (defun remove (elt seq)
   "Return a copy of SEQ with all occurrences of ELT removed.
-SEQ must be a list, vector, or string.  The comparison is done with `equal'."
+SEQ must be a list, vector, or string.  The comparison is done with `equal'.
+Contrary to `delete', this does not use side-effects, and the argument
+SEQ is not modified."
   (declare (side-effect-free t))
   (if (nlistp seq)
       ;; If SEQ isn't a list, there's no need to copy SEQ because
diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index 917b5e4..5c6f73a 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -519,10 +519,10 @@ the formatted tab name to display in the tab bar."
                  ""))
      'face (if current-p 'tab-bar-tab 'tab-bar-tab-inactive))))
 
-(defvar tab-bar-format '(tab-bar-format-history
-                         tab-bar-format-tabs
-                         tab-bar-separator
-                         tab-bar-format-add-tab)
+(defcustom tab-bar-format '(tab-bar-format-history
+                            tab-bar-format-tabs
+                            tab-bar-separator
+                            tab-bar-format-add-tab)
   "Template for displaying tab bar items.
 Every item in the list is a function that returns
 a string, or a list of menu-item elements, or nil.
@@ -530,7 +530,22 @@ When you add more items `tab-bar-format-align-right' and
 `tab-bar-format-global' to the end, then after enabling
 `display-time-mode' (or any other mode that uses `global-mode-string')
 it will display time aligned to the right on the tab bar instead of
-the mode line.")
+the mode line.  Replacing `tab-bar-format-tabs' with
+`tab-bar-format-tabs-groups' will group tabs on the tab bar."
+  :type 'hook
+  :options '(tab-bar-format-history
+             tab-bar-format-tabs
+             tab-bar-format-tabs-groups
+             tab-bar-separator
+             tab-bar-format-add-tab
+             tab-bar-format-align-right
+             tab-bar-format-global)
+  :initialize 'custom-initialize-default
+  :set (lambda (sym val)
+         (set-default sym val)
+         (force-mode-line-update))
+  :group 'tab-bar
+  :version "28.1")
 
 (defun tab-bar-format-history ()
   (when (and tab-bar-history-mode tab-bar-history-buttons-show)
@@ -543,39 +558,90 @@ the mode line.")
        menu-item ,tab-bar-forward-button tab-bar-history-forward
        :help "Click to go forward in tab history"))))
 
+(defun tab-bar--format-tab (tab i)
+  (append
+   `((,(intern (format "sep-%i" i)) menu-item ,(tab-bar-separator) ignore))
+   (cond
+    ((eq (car tab) 'current-tab)
+     `((current-tab
+        menu-item
+        ,(funcall tab-bar-tab-name-format-function tab i)
+        ignore
+        :help "Current tab")))
+    (t
+     `((,(intern (format "tab-%i" i))
+        menu-item
+        ,(funcall tab-bar-tab-name-format-function tab i)
+        ,(or
+          (alist-get 'binding tab)
+          `(lambda ()
+             (interactive)
+             (tab-bar-select-tab ,i)))
+        :help "Click to visit tab"))))
+   `((,(if (eq (car tab) 'current-tab) 'C-current-tab (intern (format 
"C-tab-%i" i)))
+      menu-item ""
+      ,(or
+        (alist-get 'close-binding tab)
+        `(lambda ()
+           (interactive)
+           (tab-bar-close-tab ,i)))))))
+
 (defun tab-bar-format-tabs ()
-  (let ((separator (tab-bar-separator))
-        (tabs (funcall tab-bar-tabs-function))
-        (i 0))
+  (let ((i 0))
     (mapcan
      (lambda (tab)
        (setq i (1+ i))
-       (append
-        `((,(intern (format "sep-%i" i)) menu-item ,separator ignore))
-        (cond
-         ((eq (car tab) 'current-tab)
-          `((current-tab
-             menu-item
-             ,(funcall tab-bar-tab-name-format-function tab i)
-             ignore
-             :help "Current tab")))
-         (t
-          `((,(intern (format "tab-%i" i))
-             menu-item
-             ,(funcall tab-bar-tab-name-format-function tab i)
-             ,(or
-               (alist-get 'binding tab)
-               `(lambda ()
-                  (interactive)
-                  (tab-bar-select-tab ,i)))
-             :help "Click to visit tab"))))
-        `((,(if (eq (car tab) 'current-tab) 'C-current-tab (intern (format 
"C-tab-%i" i)))
-           menu-item ""
-           ,(or
-             (alist-get 'close-binding tab)
-             `(lambda ()
-                (interactive)
-                (tab-bar-close-tab ,i)))))))
+       (tab-bar--format-tab tab i))
+     (funcall tab-bar-tabs-function))))
+
+(defcustom tab-bar-tab-group-format-function #'tab-bar-tab-group-format-default
+  "Function to format a tab group name.
+Function gets two arguments, a tab with a group name and its number,
+and should return the formatted tab group name to display in the tab bar."
+  :type 'function
+  :initialize 'custom-initialize-default
+  :set (lambda (sym val)
+         (set-default sym val)
+         (force-mode-line-update))
+  :group 'tab-bar
+  :version "28.1")
+
+(defun tab-bar-tab-group-format-default (tab i)
+  (propertize
+   (concat (if tab-bar-tab-hints (format "%d " i) "")
+           (alist-get 'group tab))
+   'face 'tab-bar-tab-inactive))
+
+(defun tab-bar--format-tab-group (tab i)
+  (append
+   `((,(intern (format "sep-%i" i)) menu-item ,(tab-bar-separator) ignore))
+   `((,(intern (format "group-%i" i))
+      menu-item
+      ,(funcall tab-bar-tab-group-format-function tab i)
+      ,(or
+        (alist-get 'binding tab)
+        `(lambda ()
+           (interactive)
+           (tab-bar-select-tab ,i)))
+      :help "Click to visit group"))))
+
+(defun tab-bar-format-tabs-groups ()
+  (let* ((tabs (funcall tab-bar-tabs-function))
+         (current-group (alist-get 'group (tab-bar--current-tab-find tabs)))
+         (previous-group nil)
+         (i 0))
+    (mapcan
+     (lambda (tab)
+       (let ((tab-group (alist-get 'group tab)))
+         (setq i (1+ i))
+         (prog1 (if (or (not tab-group) (equal tab-group current-group))
+                    ;; Show current group and ungrouped tabs
+                    (tab-bar--format-tab tab i)
+                  ;; Otherwise, show first group tab with a group name,
+                  ;; but hide other group tabs
+                  (unless (equal previous-group tab-group)
+                    (tab-bar--format-tab-group tab i)))
+           (setq previous-group tab-group))))
      tabs)))
 
 (defun tab-bar-format-add-tab ()
@@ -590,7 +656,7 @@ the mode line.")
          (rest (mapconcat (lambda (item) (nth 2 item)) rest ""))
          (hpos (length rest))
          (str (propertize " " 'display `(space :align-to (- right ,hpos)))))
-    `((tab-bar-format-align-right menu-item ,str ignore))))
+    `((align-right menu-item ,str ignore))))
 
 (defun tab-bar-format-global ()
   "Format `global-mode-string' to display it in the tab bar.
@@ -599,10 +665,7 @@ When `tab-bar-format-global' is added to `tab-bar-format'
 then modes that display information on the mode line
 using `global-mode-string' will display the same text
 on the tab bar instead."
-  `((tab-bar-format-global
-     menu-item
-     ,(format-mode-line global-mode-string)
-     ignore)))
+  `((global menu-item ,(format-mode-line global-mode-string) ignore)))
 
 (defun tab-bar-format-list (format-list)
   (let ((i 0))
@@ -648,6 +711,7 @@ on the tab bar instead."
 (defun tab-bar--tab (&optional frame)
   (let* ((tab (assq 'current-tab (frame-parameter frame 'tabs)))
          (tab-explicit-name (alist-get 'explicit-name tab))
+         (tab-group (alist-get 'group tab))
          (bl  (seq-filter #'buffer-live-p (frame-parameter frame 
'buffer-list)))
          (bbl (seq-filter #'buffer-live-p (frame-parameter frame 
'buried-buffer-list))))
     `(tab
@@ -655,6 +719,7 @@ on the tab bar instead."
                    (alist-get 'name tab)
                  (funcall tab-bar-tab-name-function)))
       (explicit-name . ,tab-explicit-name)
+      ,@(if tab-group `((group . ,tab-group)))
       (time . ,(float-time))
       (ws . ,(window-state-get
               (frame-root-window (or frame (selected-frame))) 'writable))
@@ -670,12 +735,18 @@ on the tab bar instead."
   ;; necessary when switching tabs, otherwise the destination tab
   ;; inherits the current tab's `explicit-name' parameter.
   (let* ((tab (or tab (assq 'current-tab (frame-parameter frame 'tabs))))
-         (tab-explicit-name (alist-get 'explicit-name tab)))
+         (tab-explicit-name (alist-get 'explicit-name tab))
+         (tab-group (alist-get 'group tab)))
     `(current-tab
       (name . ,(if tab-explicit-name
                    (alist-get 'name tab)
                  (funcall tab-bar-tab-name-function)))
-      (explicit-name . ,tab-explicit-name))))
+      (explicit-name . ,tab-explicit-name)
+      ,@(if tab-group `((group . ,tab-group))))))
+
+(defun tab-bar--current-tab-find (&optional tabs frame)
+  (seq-find (lambda (tab) (eq (car tab) 'current-tab))
+            (or tabs (funcall tab-bar-tabs-function frame))))
 
 (defun tab-bar--current-tab-index (&optional tabs frame)
   (seq-position (or tabs (funcall tab-bar-tabs-function frame))
@@ -766,7 +837,7 @@ ARG counts from 1."
                      tab-bar-history-forward)))
 
          (ws
-          (window-state-put ws (frame-root-window (selected-frame)) 'safe)))
+          (window-state-put ws nil 'safe)))
 
         (setq tab-bar-history-omit t)
 
@@ -1144,22 +1215,24 @@ for the last tab on a frame is determined by
   "Close all tabs on the selected frame, except the selected one."
   (interactive)
   (let* ((tabs (funcall tab-bar-tabs-function))
-         (current-index (tab-bar--current-tab-index tabs)))
-    (when current-index
-      (dotimes (index (length tabs))
-        (unless (or (eq index current-index)
+         (current-tab (tab-bar--current-tab-find tabs))
+         (index 0))
+    (when current-tab
+      (dolist (tab tabs)
+        (unless (or (eq tab current-tab)
                     (run-hook-with-args-until-success
-                     'tab-bar-tab-prevent-close-functions
-                     (nth index tabs)
+                     'tab-bar-tab-prevent-close-functions tab
                      ;; `last-tab-p' logically can't ever be true
                      ;; if we make it this far
                      nil))
           (push `((frame . ,(selected-frame))
                   (index . ,index)
-                  (tab . ,(nth index tabs)))
+                  (tab . ,tab))
                 tab-bar-closed-tabs)
-          (run-hook-with-args 'tab-bar-tab-pre-close-functions (nth index 
tabs) nil)))
-      (set-frame-parameter nil 'tabs (list (nth current-index tabs)))
+          (run-hook-with-args 'tab-bar-tab-pre-close-functions tab nil)
+          (setq tabs (delq tab tabs)))
+        (setq index (1+ index)))
+      (set-frame-parameter nil 'tabs tabs)
 
       ;; Recalculate tab-bar-lines and update frames
       (tab-bar--update-tab-bar-lines)
@@ -1240,6 +1313,67 @@ function `tab-bar-tab-name-function'."
   (tab-bar-rename-tab new-name (1+ (tab-bar--tab-index-by-name tab-name))))
 
 
+;;; Tab groups
+
+(defun tab-bar-change-tab-group (group-name &optional arg)
+  "Add the tab specified by its absolute position ARG to GROUP-NAME.
+If no ARG is specified, then set the GROUP-NAME for the current tab.
+ARG counts from 1.
+If GROUP-NAME is the empty string, then remove the tab from any group.
+While using this command, you might also want to replace
+`tab-bar-format-tabs' with `tab-bar-format-tabs-groups' in
+`tab-bar-format' to group tabs on the tab bar."
+  (interactive
+   (let* ((tabs (funcall tab-bar-tabs-function))
+          (tab-index (or current-prefix-arg (1+ (tab-bar--current-tab-index 
tabs))))
+          (group-name (alist-get 'group (nth (1- tab-index) tabs))))
+     (list (completing-read
+            "Group name for tab (leave blank to remove group): "
+            (delete-dups (delq nil (cons group-name
+                                         (mapcar (lambda (tab)
+                                                   (alist-get 'group tab))
+                                                 (funcall 
tab-bar-tabs-function))))))
+           current-prefix-arg)))
+  (let* ((tabs (funcall tab-bar-tabs-function))
+         (tab-index (if arg
+                        (1- (max 0 (min arg (length tabs))))
+                      (tab-bar--current-tab-index tabs)))
+         (tab (nth tab-index tabs))
+         (group (assq 'group tab))
+         (group-new-name (and (> (length group-name) 0) group-name)))
+    (if group
+        (setcdr group group-new-name)
+      (nconc tab `((group . ,group-new-name))))
+
+    (force-mode-line-update)
+    (unless tab-bar-mode
+      (message "Set tab group to '%s'" group-new-name))))
+
+(defun tab-bar-close-group-tabs (group-name)
+  "Close all tabs that belong to GROUP-NAME on the selected frame."
+  (interactive
+   (let* ((tabs (funcall tab-bar-tabs-function))
+          (group-name (alist-get 'group (tab-bar--current-tab-find tabs))))
+     (list (completing-read
+            "Close all tabs with group name: "
+            (delete-dups (delq nil (cons group-name
+                                         (mapcar (lambda (tab)
+                                                   (alist-get 'group tab))
+                                                 (funcall 
tab-bar-tabs-function)))))))))
+  (let* ((close-group (and (> (length group-name) 0) group-name))
+         (tab-bar-tab-prevent-close-functions
+          (cons (lambda (tab _last-tab-p)
+                  (not (equal (alist-get 'group tab) close-group)))
+                tab-bar-tab-prevent-close-functions)))
+    (tab-bar-close-other-tabs)
+
+    (let* ((tabs (funcall tab-bar-tabs-function))
+           (current-tab (tab-bar--current-tab-find tabs)))
+      (when (and current-tab (equal (alist-get 'group current-tab)
+                                    close-group))
+        (tab-bar-close-tab)))))
+
+
 ;;; Tab history mode
 
 (defvar tab-bar-history-limit 10
@@ -1260,7 +1394,7 @@ function `tab-bar-tab-name-function'."
 (defvar tab-bar-history-old-minibuffer-depth 0
   "Minibuffer depth before the current command.")
 
-(defun tab-bar-history--pre-change ()
+(defun tab-bar--history-pre-change ()
   (setq tab-bar-history-old-minibuffer-depth (minibuffer-depth))
   ;; Store wc before possibly entering the minibuffer
   (when (zerop tab-bar-history-old-minibuffer-depth)
@@ -1343,9 +1477,9 @@ and can restore them."
                                                 :ascent center))
                                tab-bar-forward-button))
 
-        (add-hook 'pre-command-hook 'tab-bar-history--pre-change)
+        (add-hook 'pre-command-hook 'tab-bar--history-pre-change)
         (add-hook 'window-configuration-change-hook 'tab-bar--history-change))
-    (remove-hook 'pre-command-hook 'tab-bar-history--pre-change)
+    (remove-hook 'pre-command-hook 'tab-bar--history-pre-change)
     (remove-hook 'window-configuration-change-hook 'tab-bar--history-change)))
 
 
@@ -1630,6 +1764,8 @@ a function, then it is called with two arguments: BUFFER 
and ALIST, and
 should return the tab name.  When a `tab-name' entry is omitted, create
 a new tab without an explicit name.
 
+The ALIST entry `tab-group' (string or function) defines the tab group.
+
 If ALIST contains a `reusable-frames' entry, its value determines
 which frames to search for a reusable tab:
   nil -- the selected frame (actually the last non-minibuffer frame)
@@ -1682,6 +1818,8 @@ then it is called with two arguments: BUFFER and ALIST, 
and should return
 the tab name.  When a `tab-name' entry is omitted, create a new tab without
 an explicit name.
 
+The ALIST entry `tab-group' (string or function) defines the tab group.
+
 This is an action function for buffer display, see Info
 node `(elisp) Buffer Display Action Functions'.  It should be
 called only by `display-buffer' or a function directly or
@@ -1693,6 +1831,11 @@ indirectly called by the latter."
         (setq tab-name (funcall tab-name buffer alist)))
       (when tab-name
         (tab-bar-rename-tab tab-name)))
+    (let ((tab-group (alist-get 'tab-group alist)))
+      (when (functionp tab-group)
+        (setq tab-group (funcall tab-group buffer alist)))
+      (when tab-group
+        (tab-bar-change-tab-group tab-group)))
     (window--display-buffer buffer (selected-window) 'tab alist)))
 
 (defun switch-to-buffer-other-tab (buffer-or-name &optional norecord)
@@ -1760,6 +1903,7 @@ When `switch-to-buffer-obey-display-actions' is non-nil,
 (defalias 'tab-duplicate   'tab-bar-duplicate-tab)
 (defalias 'tab-close       'tab-bar-close-tab)
 (defalias 'tab-close-other 'tab-bar-close-other-tabs)
+(defalias 'tab-close-group 'tab-bar-close-group-tabs)
 (defalias 'tab-undo        'tab-bar-undo-close-tab)
 (defalias 'tab-select      'tab-bar-select-tab)
 (defalias 'tab-switch      'tab-bar-switch-to-tab)
@@ -1770,6 +1914,7 @@ When `switch-to-buffer-obey-display-actions' is non-nil,
 (defalias 'tab-move        'tab-bar-move-tab)
 (defalias 'tab-move-to     'tab-bar-move-tab-to)
 (defalias 'tab-rename      'tab-bar-rename-tab)
+(defalias 'tab-group       'tab-bar-change-tab-group)
 (defalias 'tab-list        'tab-switcher)
 
 (define-key tab-prefix-map "n" 'tab-duplicate)
@@ -1777,10 +1922,12 @@ When `switch-to-buffer-obey-display-actions' is non-nil,
 (define-key tab-prefix-map "2" 'tab-new)
 (define-key tab-prefix-map "1" 'tab-close-other)
 (define-key tab-prefix-map "0" 'tab-close)
+(define-key tab-prefix-map "u" 'tab-undo)
 (define-key tab-prefix-map "o" 'tab-next)
 (define-key tab-prefix-map "O" 'tab-previous)
 (define-key tab-prefix-map "m" 'tab-move)
 (define-key tab-prefix-map "M" 'tab-move-to)
+(define-key tab-prefix-map "G" 'tab-group)
 (define-key tab-prefix-map "r" 'tab-rename)
 (define-key tab-prefix-map "\r" 'tab-switch)
 (define-key tab-prefix-map "b" 'switch-to-buffer-other-tab)
diff --git a/lisp/tab-line.el b/lisp/tab-line.el
index 903862a..f2c4901 100644
--- a/lisp/tab-line.el
+++ b/lisp/tab-line.el
@@ -44,6 +44,7 @@ whether the tab is a buffer, and whether the tab is selected."
   :type '(repeat
           (choice (function-item tab-line-tab-face-special)
                   (function-item tab-line-tab-face-inactive-alternating)
+                  (function-item tab-line-tab-face-group)
                   (function :tag "Custom function")))
   :group 'tab-line
   :version "28.1")
@@ -95,6 +96,16 @@ function `tab-line-tab-face-special'."
   :version "28.1"
   :group 'tab-line-faces)
 
+(defface tab-line-tab-group
+  '((default
+      :inherit tab-line
+      :box nil))
+  "Face for group tabs.
+Applied when option `tab-line-tab-face-functions' includes
+function `tab-line-tab-face-group'."
+  :version "28.1"
+  :group 'tab-line-faces)
+
 (defface tab-line-tab-current
   '((default
       :inherit tab-line-tab)
@@ -294,7 +305,10 @@ be displayed, or just a list of strings to display in the 
tab line.
 By default, use function `tab-line-tabs-window-buffers' that
 returns a list of buffers associated with the selected window.
 When `tab-line-tabs-mode-buffers', return a list of buffers
-with the same major mode as the current buffer."
+with the same major mode as the current buffer.
+When `tab-line-tabs-buffer-groups', return a list of buffers
+grouped either by `tab-line-tabs-buffer-group-function', when set,
+or by `tab-line-tabs-buffer-groups'."
   :type '(choice (const :tag "Window buffers"
                         tab-line-tabs-window-buffers)
                  (const :tag "Same mode buffers"
@@ -356,6 +370,11 @@ If the major mode's name string matches REGEXP, use 
GROUPNAME instead.")
           mode))))
 
 (defun tab-line-tabs-buffer-groups ()
+  "Return a list of tabs that should be displayed in the tab line.
+By default return a list of buffers grouped by major mode,
+according to `tab-line-tabs-buffer-groups'.
+If non-nil, `tab-line-tabs-buffer-group-function' is used to
+generate the group name."
   (if (window-parameter nil 'tab-line-groups)
       (let* ((buffers (funcall tab-line-tabs-buffer-list-function))
              (groups
@@ -385,6 +404,7 @@ If the major mode's name string matches REGEXP, use 
GROUPNAME instead.")
                       (set-window-parameter nil 'tab-line-group nil))))
            (group-tab `(tab
                         (name . ,group)
+                        (group-tab . t)
                         (select . ,(lambda ()
                                      (set-window-parameter nil 
'tab-line-groups t)
                                      (set-window-parameter nil 'tab-line-group 
group)
@@ -520,6 +540,13 @@ When TAB is a non-file-backed buffer, make FACE inherit 
from
     (setf face `(:inherit (tab-line-tab-special ,face))))
   face)
 
+(defun tab-line-tab-face-group (tab _tabs face _buffer-p _selected-p)
+  "Return FACE for TAB according to whether it's a group tab.
+For use in `tab-line-tab-face-functions'."
+  (when (alist-get 'group-tab tab)
+    (setf face `(:inherit (tab-line-tab-group ,face))))
+  face)
+
 (defvar tab-line-auto-hscroll)
 
 (defun tab-line-format ()
diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el
index 59f7c87..fa9b475 100644
--- a/lisp/tar-mode.el
+++ b/lisp/tar-mode.el
@@ -685,12 +685,12 @@ For instance, if mode is #o700, then it produces 
`rwx------'."
 (define-derived-mode tar-mode special-mode "Tar"
   "Major mode for viewing a tar file as a dired-like listing of its contents.
 You can move around using the usual cursor motion commands.
-Letters no longer insert themselves.
-Type `e' to pull a file out of the tar file and into its own buffer;
+Letters no longer insert themselves.\\<tar-mode-map>
+Type \\[tar-extract] to pull a file out of the tar file and into its own 
buffer;
 or click mouse-2 on the file's line in the Tar mode buffer.
-Type `c' to copy an entry from the tar file into another file on disk.
+Type \\[tar-copy] to copy an entry from the tar file into another file on disk.
 
-If you edit a sub-file of this archive (as with the `e' command) and
+If you edit a sub-file of this archive (as with the \\[tar-extract] command) 
and
 save it with \\[save-buffer], the contents of that buffer will be
 saved back into the tar-file buffer; in this way you can edit a file
 inside of a tar archive without extracting it and re-archiving it.
diff --git a/lisp/textmodes/artist.el b/lisp/textmodes/artist.el
index 9a886d2..3d08122 100644
--- a/lisp/textmodes/artist.el
+++ b/lisp/textmodes/artist.el
@@ -3466,7 +3466,7 @@ The Y-RADIUS must be 0, but the X-RADIUS must not be 0."
        (line-char  (if artist-line-char-set artist-line-char ?-))
        (i          0)
        (point-list nil)
-       (fill-info  nil)
+       ;; (fill-info  nil)
        (shape-info (make-vector 2 0)))
     (while (< i width)
       (let* ((line-x (+ left-edge i))
@@ -3479,7 +3479,7 @@ The Y-RADIUS must be 0, but the X-RADIUS must not be 0."
        (setq point-list (append point-list (list new-coord)))
        (setq i (1+ i))))
     (aset shape-info 0 point-list)
-    (aset shape-info 1 fill-info)
+    (aset shape-info 1 nil) ;; fill-info
     (artist-make-2point-object (artist-make-endpoint x1 y1)
                               (artist-make-endpoint x-radius y-radius)
                               shape-info)))
diff --git a/lisp/textmodes/enriched.el b/lisp/textmodes/enriched.el
index c44b69c..e43370c 100644
--- a/lisp/textmodes/enriched.el
+++ b/lisp/textmodes/enriched.el
@@ -389,6 +389,8 @@ which can be the value of the `face' text property."
         (apply 'append (mapcar 'enriched-face-ans face)))
        ((let* ((fg (face-attribute face :foreground))
                (bg (face-attribute face :background))
+                (weight (face-attribute face :weight))
+                (slant (face-attribute face :slant))
                (props (face-font face t))
                (ans (cdr (format-annotate-single-property-change
                           'face nil props enriched-translations))))
@@ -396,6 +398,10 @@ which can be the value of the `face' text property."
             (setq ans (cons (list "x-color" fg) ans)))
           (unless (eq bg 'unspecified)
             (setq ans (cons (list "x-bg-color" bg) ans)))
+           (if (eq weight 'bold)
+               (setq ans (cons (list "bold") ans)))
+           (if (eq slant 'italic)
+               (setq ans (cons (list "italic") ans)))
           ans))))
 
 ;;;
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index 83dba71..a48b345 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -2293,8 +2293,8 @@ If OPOINT is non-nil, restore point there after adjusting 
it for replacement."
                                 corrects)
                       '()))
         (affix      (car (cdr (cdr (cdr poss)))))
-        show-affix-info
-        (base-menu  (let ((save (if (and (consp affix) show-affix-info)
+        ;; show-affix-info
+        (base-menu  (let ((save (if nil ;; (and (consp affix) show-affix-info)
                                     (list
                                      (list (concat "Save affix: " (car affix))
                                            'save)
diff --git a/lisp/textmodes/reftex-vars.el b/lisp/textmodes/reftex-vars.el
index 1b29eaf..5b1e8bd 100644
--- a/lisp/textmodes/reftex-vars.el
+++ b/lisp/textmodes/reftex-vars.el
@@ -1318,7 +1318,7 @@ macro before insertion.  For example, it will change
     \\cite[][Chapter 1]{Jones}     -> \\cite[Chapter 1]{Jones}
     \\cite[see][]{Jones}           -> \\cite[see][]{Jones}
     \\cite[see][Chapter 1]{Jones}  -> \\cite{Jones}
-Is is possible that other packages have other conventions about which
+It is possible that other packages have other conventions about which
 optional argument is interpreted how - that is why this cleaning up
 can be turned off."
   :group 'reftex-citation-support
diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el
index c51285d..ce15637 100644
--- a/lisp/textmodes/rst.el
+++ b/lisp/textmodes/rst.el
@@ -616,7 +616,7 @@ After interpretation of ARGS the results are concatenated 
as for
    (:constructor
     rst-Ado-new-transition
     (&aux
-     (char nil)
+     ;; (char nil)
      (-style 'transition)))
    ;; Construct a simple section header.
    (:constructor
diff --git a/lisp/textmodes/table.el b/lisp/textmodes/table.el
index 06785e4..60122b2 100644
--- a/lisp/textmodes/table.el
+++ b/lisp/textmodes/table.el
@@ -1492,7 +1492,7 @@ Move the point under the table as shown below.
     +--------------+------+--------------------------------+
     -!-
 
-Type M-x table-insert-row instead of \\[table-insert-row-column].  
\\[table-insert-row-column] does not work
+Type \\[table-insert-row] instead of \\[table-insert-row-column].  
\\[table-insert-row-column] does not work
 when the point is outside of the table.  This insertion at
 outside of the table effectively appends a row at the end.
 
diff --git a/lisp/tooltip.el b/lisp/tooltip.el
index af3b86b..03d9f54 100644
--- a/lisp/tooltip.el
+++ b/lisp/tooltip.el
@@ -131,7 +131,11 @@ of the `tooltip' face are used instead."
      :inherit variable-pitch)
     (t
      :inherit variable-pitch))
-  "Face for tooltips."
+  "Face for tooltips.
+
+When using the GTK toolkit, this face will only be used if
+`x-gtk-use-system-tooltips' is non-nil."
+  :group 'tooltip
   :group 'basic-faces)
 
 (defcustom tooltip-use-echo-area nil
diff --git a/lisp/userlock.el b/lisp/userlock.el
index a340ff8..57311ac 100644
--- a/lisp/userlock.el
+++ b/lisp/userlock.el
@@ -1,4 +1,4 @@
-;;; userlock.el --- handle file access contention between multiple users
+;;; userlock.el --- handle file access contention between multiple users  -*- 
lexical-binding: t -*-
 
 ;; Copyright (C) 1985-1986, 2001-2021 Free Software Foundation, Inc.
 
@@ -39,6 +39,10 @@
 
 (define-error 'file-locked "File is locked" 'file-error)
 
+(defun userlock--fontify-key (key)
+  "Add the `help-key-binding' face to string KEY."
+  (propertize key 'face 'help-key-binding))
+
 ;;;###autoload
 (defun ask-user-about-lock (file opponent)
   "Ask user what to do when he wants to edit FILE but it is locked by OPPONENT.
@@ -64,8 +68,12 @@ in any way you like."
                          (match-string 0 opponent)))
              opponent))
       (while (null answer)
-       (message "%s locked by %s: (s, q, p, ?)? "
-                short-file short-opponent)
+        (message "%s locked by %s: (%s, %s, %s, %s)? "
+                 short-file short-opponent
+                 (userlock--fontify-key "s")
+                 (userlock--fontify-key "q")
+                 (userlock--fontify-key "p")
+                 (userlock--fontify-key "?"))
        (if noninteractive (error "Cannot resolve lock conflict in batch mode"))
        (let ((tem (let ((inhibit-quit t)
                         (cursor-in-echo-area t))
@@ -80,7 +88,12 @@ in any way you like."
                                      (?? . help))))
            (cond ((null answer)
                   (beep)
-                  (message "Please type q, s, or p; or ? for help")
+                   (message "Please type %s, %s, or %s; or %s for help"
+                            (userlock--fontify-key "q")
+                            (userlock--fontify-key "s")
+                            (userlock--fontify-key "p")
+                            ;; FIXME: Why do we use "?" here and "C-h" below?
+                            (userlock--fontify-key "?"))
                   (sit-for 3))
                  ((eq (cdr answer) 'help)
                   (ask-user-about-lock-help)
@@ -91,14 +104,19 @@ in any way you like."
 
 (defun ask-user-about-lock-help ()
   (with-output-to-temp-buffer "*Help*"
-    (princ "It has been detected that you want to modify a file that someone 
else has
+    (with-current-buffer standard-output
+      (insert
+       (format
+        "It has been detected that you want to modify a file that someone else 
has
 already started modifying in Emacs.
 
-You can <s>teal the file; the other user becomes the
+You can <%s>teal the file; the other user becomes the
   intruder if (s)he ever unmodifies the file and then changes it again.
-You can <p>roceed; you edit at your own (and the other user's) risk.
-You can <q>uit; don't modify this file.")
-    (with-current-buffer standard-output
+You can <%s>roceed; you edit at your own (and the other user's) risk.
+You can <%s>uit; don't modify this file."
+        (userlock--fontify-key "s")
+        (userlock--fontify-key "p")
+        (userlock--fontify-key "q")))
       (help-mode))))
 
 (define-error 'file-supersession nil 'file-error)
@@ -151,8 +169,13 @@ The buffer in question is current when this function is 
called."
   (save-window-excursion
     (let ((prompt
           (format "%s changed on disk; \
-really edit the buffer? (y, n, r or C-h) "
-                  (file-name-nondirectory filename)))
+really edit the buffer? (%s, %s, %s or %s) "
+                   (file-name-nondirectory filename)
+                   (userlock--fontify-key "y")
+                   (userlock--fontify-key "n")
+                   (userlock--fontify-key "r")
+                   ;; FIXME: Why do we use "C-h" here and "?" above?
+                   (userlock--fontify-key "C-h")))
          (choices '(?y ?n ?r ?? ?\C-h))
          answer)
       (when noninteractive
@@ -177,20 +200,28 @@ really edit the buffer? (y, n, r or C-h) "
 
 (defun ask-user-about-supersession-help ()
   (with-output-to-temp-buffer "*Help*"
-    (princ
-     (substitute-command-keys
-      "You want to modify a buffer whose disk file has changed
+    (let ((revert-buffer-binding
+           ;; This takes place in the original buffer.
+           (substitute-command-keys "\\[revert-buffer]")))
+      (with-current-buffer standard-output
+        (insert
+         (format
+          "You want to modify a buffer whose disk file has changed
 since you last read it in or saved it with this buffer.
 
-If you say `y' to go ahead and modify this buffer,
+If you say %s to go ahead and modify this buffer,
 you risk ruining the work of whoever rewrote the file.
-If you say `r' to revert, the contents of the buffer are refreshed
+If you say %s to revert, the contents of the buffer are refreshed
 from the file on disk.
-If you say `n', the change you started to make will be aborted.
-
-Usually, you should type `n' and then `\\[revert-buffer]',
-to get the latest version of the file, then make the change again."))
-    (with-current-buffer standard-output
-      (help-mode))))
+If you say %s, the change you started to make will be aborted.
+
+Usually, you should type %s and then %s,
+to get the latest version of the file, then make the change again."
+          (userlock--fontify-key "y")
+          (userlock--fontify-key "r")
+          (userlock--fontify-key "n")
+          (userlock--fontify-key "n")
+          revert-buffer-binding))
+        (help-mode)))))
 
 ;;; userlock.el ends here
diff --git a/lisp/vc/pcvs-parse.el b/lisp/vc/pcvs-parse.el
index d0b2e89..3a96c93 100644
--- a/lisp/vc/pcvs-parse.el
+++ b/lisp/vc/pcvs-parse.el
@@ -197,6 +197,9 @@ The remaining KEYS are passed directly to 
`cvs-create-fileinfo'."
 
 (defun cvs-parse-table ()
   "Table of message objects for `cvs-parse-process'."
+  (with-suppressed-warnings ((lexical c file dir path base-rev subtype))
+    (defvar c) (defvar file) (defvar dir) (defvar path) (defvar base-rev)
+    (defvar subtype))
   (let (c file dir path base-rev subtype)
     (cvs-or
 
@@ -402,6 +405,8 @@ The remaining KEYS are passed directly to 
`cvs-create-fileinfo'."
 
 
 (defun cvs-parse-merge ()
+  (with-suppressed-warnings ((lexical path base-rev head-rev type))
+    (defvar path) (defvar base-rev) (defvar head-rev) (defvar type))
   (let (path base-rev head-rev type)
     ;; A merge (maybe with a conflict).
     (and
@@ -446,6 +451,9 @@ The remaining KEYS are passed directly to 
`cvs-create-fileinfo'."
                            :merge (cons base-rev head-rev))))))
 
 (defun cvs-parse-status ()
+  (with-suppressed-warnings ((lexical nofile path base-rev head-rev type))
+    (defvar nofile) (defvar path) (defvar base-rev) (defvar head-rev)
+    (defvar type))
   (let (nofile path base-rev head-rev type)
     (and
      (cvs-match
@@ -494,6 +502,8 @@ The remaining KEYS are passed directly to 
`cvs-create-fileinfo'."
                          :head-rev head-rev))))
 
 (defun cvs-parse-commit ()
+  (with-suppressed-warnings ((lexical path file base-rev subtype))
+    (defvar path) (defvar file) (defvar base-rev) (defvar subtype))
   (let (path file base-rev subtype)
     (cvs-or
 
diff --git a/lisp/vc/smerge-mode.el b/lisp/vc/smerge-mode.el
index 782c799..694d452 100644
--- a/lisp/vc/smerge-mode.el
+++ b/lisp/vc/smerge-mode.el
@@ -1450,30 +1450,31 @@ If no conflict maker is found, turn off `smerge-mode'."
 First tries to go to the next conflict in the current buffer, and if not
 found, uses VC to try and find the next file with conflict."
   (interactive)
-  (let ((buffer (current-buffer)))
-    (condition-case nil
-        ;; FIXME: Try again from BOB before moving to the next file.
-        (smerge-next)
-      (error
-       (if (and (or smerge-change-buffer-confirm
-                    (and (buffer-modified-p) buffer-file-name))
-                (not (or (eq last-command this-command)
-                         (eq ?\r last-command-event)))) ;Called via M-x!?
-           ;; FIXME: Don't emit this message if `vc-find-conflicted-file' won't
-           ;; go to another file anyway (because there are no more conflicted
-           ;; files).
-           (message (if (buffer-modified-p)
-                        "No more conflicts here.  Repeat to save and go to 
next buffer"
-                      "No more conflicts here.  Repeat to go to next buffer"))
-         (if (and (buffer-modified-p) buffer-file-name)
-             (save-buffer))
-         (vc-find-conflicted-file)
-         (when (eq buffer (current-buffer))
-           ;; Try to find a conflict marker in current file above the point.
-           (let ((prev-pos (point)))
-             (goto-char (point-min))
-             (unless (ignore-errors (not (smerge-next)))
-               (goto-char prev-pos)))))))))
+  (condition-case nil
+      ;; FIXME: Try again from BOB before moving to the next file.
+      (smerge-next)
+    (error
+     (if (and (or smerge-change-buffer-confirm
+                  (and (buffer-modified-p) buffer-file-name))
+              (not (or (eq last-command this-command)
+                       (eq ?\r last-command-event)))) ;Called via M-x!?
+         ;; FIXME: Don't emit this message if `vc-find-conflicted-file' won't
+         ;; go to another file anyway (because there are no more conflicted
+         ;; files).
+         (message (if (buffer-modified-p)
+                      "No more conflicts here.  Repeat to save and go to next 
buffer"
+                    "No more conflicts here.  Repeat to go to next buffer"))
+       (if (and (buffer-modified-p) buffer-file-name)
+           (save-buffer))
+       (vc-find-conflicted-file)
+       ;; At this point, the caret will only be at a conflict marker
+       ;; if the file did not correspond to an opened
+       ;; buffer. Otherwise we need to jump to a marker explicitly.
+       (unless (looking-at "^<<<<<<<")
+         (let ((prev-pos (point)))
+           (goto-char (point-min))
+           (unless (ignore-errors (not (smerge-next)))
+             (goto-char prev-pos))))))))
 
 (provide 'smerge-mode)
 
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index b926c38..95126fa 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -1832,7 +1832,7 @@ Return t if the buffer had changes, nil otherwise."
          (backend (car vc-fileset))
          (first (car files))
          (rev1-default nil)
-         (rev2-default nil))
+         ) ;; (rev2-default nil)
     (cond
      ;; someday we may be able to do revision completion on non-singleton
      ;; filesets, but not yet.
@@ -1856,9 +1856,10 @@ Return t if the buffer had changes, nil otherwise."
                                     rev1-default "): ")
                           "Older revision: "))
            (rev2-prompt (concat "Newer revision (default "
-                                (or rev2-default "current source") "): "))
+                                ;; (or rev2-default
+                                "current source): "))
            (rev1 (vc-read-revision rev1-prompt files backend rev1-default))
-           (rev2 (vc-read-revision rev2-prompt files backend rev2-default)))
+           (rev2 (vc-read-revision rev2-prompt files backend nil))) ;; 
rev2-default
       (when (string= rev1 "") (setq rev1 nil))
       (when (string= rev2 "") (setq rev2 nil))
       (list files rev1 rev2))))
diff --git a/lisp/xdg.el b/lisp/xdg.el
index 0f0df53..1103949 100644
--- a/lisp/xdg.el
+++ b/lisp/xdg.el
@@ -256,8 +256,8 @@ which is expected to be ordered by priority as in
         (when (file-readable-p f)
           (insert-file-contents-literally f nil nil nil t)
           (goto-char (point-min))
-          (let (end)
-            (while (not (or (eobp) end))
+          (let () ;; end
+            (while (not (or (eobp))) ;; end
               (if (= (following-char) ?\[)
                   (progn (setq sec (char-after (1+ (point))))
                          (forward-line))
diff --git a/src/buffer.c b/src/buffer.c
index 03c10cc..8e33162 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -2419,6 +2419,7 @@ results, see Info node `(elisp)Swapping Text'.  */)
   swapfield (overlay_center, ptrdiff_t);
   swapfield_ (undo_list, Lisp_Object);
   swapfield_ (mark, Lisp_Object);
+  swapfield_ (mark_active, Lisp_Object); /* Belongs with the `mark'.  */
   swapfield_ (enable_multibyte_characters, Lisp_Object);
   swapfield_ (bidi_display_reordering, Lisp_Object);
   swapfield_ (bidi_paragraph_direction, Lisp_Object);
diff --git a/src/dispnew.c b/src/dispnew.c
index 0b64ea6..f594b6d 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -3588,6 +3588,7 @@ update_window (struct window *w, bool force_p)
       int yb;
       bool changed_p = 0, mouse_face_overwritten_p = 0;
       int n_updated = 0;
+      bool invisible_rows_marked = false;
 
 #ifdef HAVE_WINDOW_SYSTEM
       gui_update_window_begin (w);
@@ -3679,13 +3680,36 @@ update_window (struct window *w, bool force_p)
               tempted to optimize redisplay based on lines displayed
               in the first redisplay.  */
            if (MATRIX_ROW_BOTTOM_Y (row) >= yb)
-             for (i = vpos + 1; i < w->current_matrix->nrows - 1; ++i)
-               SET_MATRIX_ROW_ENABLED_P (w->current_matrix, i, false);
+             {
+               for (i = vpos + 1; i < w->current_matrix->nrows - 1; ++i)
+                 SET_MATRIX_ROW_ENABLED_P (w->current_matrix, i, false);
+               invisible_rows_marked = true;
+             }
          }
 
       /* Was display preempted?  */
       paused_p = row < end;
 
+      if (!paused_p && !invisible_rows_marked)
+       {
+         /* If we didn't mark the invisible rows in the current
+            matrix as invalid above, do that now.  This can happen if
+            scrolling_window updates the last visible rows of the
+            current matrix, in which case the above loop doesn't get
+            to examine the last visible row.  */
+         int i;
+         for (i = 0; i < w->current_matrix->nrows - 1; ++i)
+           {
+             struct glyph_row *current_row = MATRIX_ROW (w->current_matrix, i);
+             if (current_row->enabled_p
+                 && MATRIX_ROW_BOTTOM_Y (current_row) >= yb)
+               {
+                 for (++i ; i < w->current_matrix->nrows - 1; ++i)
+                   SET_MATRIX_ROW_ENABLED_P (w->current_matrix, i, false);
+               }
+           }
+       }
+
     set_cursor:
 
       /* Update the tab line after scrolling because a new tab
diff --git a/src/fns.c b/src/fns.c
index b193ad6..766e767 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -1867,7 +1867,8 @@ If SEQ is not a list, deletion is never performed 
destructively;
 instead this function creates and returns a new vector or string.
 
 Write `(setq foo (delete element foo))' to be sure of correctly
-changing the value of a sequence `foo'.  */)
+changing the value of a sequence `foo'.  See also `remove', which
+does not modify the argument.  */)
   (Lisp_Object elt, Lisp_Object seq)
 {
   if (VECTORP (seq))
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 5500839..16487b0 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -5470,11 +5470,10 @@ update_frame_tool_bar (struct frame *f)
       GtkWidget *wbutton = NULL;
       Lisp_Object specified_file;
       bool vert_only = ! NILP (PROP (TOOL_BAR_ITEM_VERT_ONLY));
-      const char *label
-       = (EQ (style, Qimage) || (vert_only && horiz)) ? NULL
-       : STRINGP (PROP (TOOL_BAR_ITEM_LABEL))
-       ? SSDATA (PROP (TOOL_BAR_ITEM_LABEL))
-       : "";
+      Lisp_Object label
+       = (EQ (style, Qimage) || (vert_only && horiz))
+       ? Qnil
+       : PROP (TOOL_BAR_ITEM_LABEL);
 
       ti = gtk_toolbar_get_nth_item (GTK_TOOLBAR (wtoolbar), j);
 
@@ -5587,8 +5586,11 @@ update_frame_tool_bar (struct frame *f)
 
       /* If there is an existing widget, check if it's stale; if so,
         remove it and make a new tool item from scratch.  */
-      if (ti && xg_tool_item_stale_p (wbutton, stock_name, icon_name,
-                                     img, label, horiz))
+      if (ti && xg_tool_item_stale_p (wbutton, stock_name, icon_name, img,
+                                     NILP (label)
+                                     ? NULL
+                                     : STRINGP (label) ? SSDATA (label) : "",
+                                     horiz))
        {
          gtk_container_remove (GTK_CONTAINER (wtoolbar),
                                GTK_WIDGET (ti));
@@ -5645,7 +5647,11 @@ update_frame_tool_bar (struct frame *f)
 #else
          if (w) gtk_misc_set_padding (GTK_MISC (w), hmargin, vmargin);
 #endif
-          ti = xg_make_tool_item (f, w, &wbutton, label, i, horiz, text_image);
+          ti = xg_make_tool_item (f, w, &wbutton,
+                                 NILP (label)
+                                 ? NULL
+                                 : STRINGP (label) ? SSDATA (label) : "",
+                                 i, horiz, text_image);
           gtk_toolbar_insert (GTK_TOOLBAR (wtoolbar), ti, j);
         }
 
diff --git a/src/image.c b/src/image.c
index 62bca41..cf360c2 100644
--- a/src/image.c
+++ b/src/image.c
@@ -150,11 +150,13 @@ typedef struct pgtk_bitmap_record Bitmap_Record;
 # define COLOR_TABLE_SUPPORT 1
 #endif
 
+#ifdef HAVE_RSVG
 #if defined HAVE_NS
 # define FRAME_SCALE_FACTOR(f) ns_frame_scale_factor (f)
 #else
 # define FRAME_SCALE_FACTOR(f) 1;
 #endif
+#endif
 
 static void image_disable_image (struct frame *, struct image *);
 static void image_edge_detection (struct frame *, struct image *, Lisp_Object,
@@ -2348,12 +2350,17 @@ image_set_transform (struct frame *f, struct image *img)
   compute_image_rotation (img, &rotation);
 
 # if defined USE_CAIRO || defined HAVE_XRENDER || defined HAVE_NS
-  /* We want scale up operations to use a nearest neighbour filter to
+  /* We want scale up operations to use a nearest neighbor filter to
      show real pixels instead of munging them, but scale down
      operations to use a blended filter, to avoid aliasing and the like.
 
      TODO: implement for Windows.  */
-  bool scale_down = (width < img->width) || (height < img->height);
+  bool smoothing;
+  Lisp_Object s = image_spec_value (img->spec, QCtransform_smoothing, NULL);
+  if (NILP (s))
+    smoothing = (width < img->width) || (height < img->height);
+  else
+    smoothing = !NILP (s);
 # endif
 
   /* Perform scale transformation.  */
@@ -2467,13 +2474,13 @@ image_set_transform (struct frame *f, struct image *img)
   /* Under NS the transform is applied to the drawing surface at
      drawing time, so store it for later.  */
   ns_image_set_transform (img->pixmap, matrix);
-  ns_image_set_smoothing (img->pixmap, scale_down);
+  ns_image_set_smoothing (img->pixmap, smoothing);
 # elif defined USE_CAIRO
   cairo_matrix_t cr_matrix = {matrix[0][0], matrix[0][1], matrix[1][0],
                              matrix[1][1], matrix[2][0], matrix[2][1]};
   cairo_pattern_t *pattern = cairo_pattern_create_rgb (0, 0, 0);
   cairo_pattern_set_matrix (pattern, &cr_matrix);
-  cairo_pattern_set_filter (pattern, scale_down
+  cairo_pattern_set_filter (pattern, smoothing
                             ? CAIRO_FILTER_BEST : CAIRO_FILTER_NEAREST);
   /* Dummy solid color pattern just to record pattern matrix.  */
   img->cr_data = pattern;
@@ -2492,13 +2499,13 @@ image_set_transform (struct frame *f, struct image *img)
              XDoubleToFixed (matrix[2][2])}}};
 
       XRenderSetPictureFilter (FRAME_X_DISPLAY (f), img->picture,
-                               scale_down ? FilterBest : FilterNearest, 0, 0);
+                               smoothing ? FilterBest : FilterNearest, 0, 0);
       XRenderSetPictureTransform (FRAME_X_DISPLAY (f), img->picture, &tmat);
 
       if (img->mask_picture)
         {
           XRenderSetPictureFilter (FRAME_X_DISPLAY (f), img->mask_picture,
-                                   scale_down ? FilterBest : FilterNearest, 0, 
0);
+                                   smoothing ? FilterBest : FilterNearest, 0, 
0);
           XRenderSetPictureTransform (FRAME_X_DISPLAY (f), img->mask_picture,
                                       &tmat);
         }
@@ -3508,6 +3515,7 @@ static int
 xbm_scan (char **s, char *end, char *sval, int *ival)
 {
   unsigned char c UNINIT;
+  char *sval_end = sval + BUFSIZ;
 
  loop:
 
@@ -3567,7 +3575,7 @@ xbm_scan (char **s, char *end, char *sval, int *ival)
   else if (c_isalpha (c) || c == '_')
     {
       *sval++ = c;
-      while (*s < end
+      while (*s < end && sval < sval_end
             && (c = *(*s)++, (c_isalnum (c) || c == '_')))
        *sval++ = c;
       *sval = 0;
@@ -10833,6 +10841,7 @@ non-numeric, there is no explicit limit on the size of 
images.  */);
   DEFSYM (QCrotation, ":rotation");
   DEFSYM (QCmatrix, ":matrix");
   DEFSYM (QCscale, ":scale");
+  DEFSYM (QCtransform_smoothing, ":transform-smoothing");
   DEFSYM (QCcolor_adjustment, ":color-adjustment");
   DEFSYM (QCmask, ":mask");
 
diff --git a/src/keyboard.c b/src/keyboard.c
index 4540b31..c7765c4 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -6687,6 +6687,7 @@ parse_solitary_modifier (Lisp_Object symbol)
     case 'c':
       MULTI_LETTER_MOD (ctrl_modifier, "ctrl", 4);
       MULTI_LETTER_MOD (ctrl_modifier, "control", 7);
+      MULTI_LETTER_MOD (click_modifier, "click", 5);
       break;
 
     case 'H':
@@ -12388,8 +12389,6 @@ syms_of_keyboard_for_pdumper (void)
   eassert (initial_kboard == NULL);
   initial_kboard = allocate_kboard (Qt);
 
-  Vwhile_no_input_ignore_events = Qnil;
-
   inhibit_record_char = false;
 }
 
diff --git a/src/sysdep.c b/src/sysdep.c
index 941b4e2..d940acc 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -1785,7 +1785,15 @@ handle_arith_signal (int sig)
 
 /* Alternate stack used by SIGSEGV handler below.  */
 
-static unsigned char sigsegv_stack[SIGSTKSZ];
+/* Storage for the alternate signal stack.
+   64 KiB is not too large for Emacs, and is large enough
+   for all known platforms.  Smaller sizes may run into trouble.
+   For example, libsigsegv 2.6 through 2.8 have a bug where some
+   architectures use more than the Linux default of an 8 KiB alternate
+   stack when deciding if a fault was caused by stack overflow.  */
+static max_align_t sigsegv_stack[(64 * 1024
+                                 + sizeof (max_align_t) - 1)
+                                / sizeof (max_align_t)];
 
 
 /* Return true if SIGINFO indicates a stack overflow.  */
@@ -2662,6 +2670,13 @@ void
 errputc (int c)
 {
   fputc_unlocked (c, errstream ());
+
+#ifdef WINDOWSNT
+  /* Flush stderr after outputting a newline since stderr is fully
+     buffered when redirected to a pipe, contrary to POSIX.  */
+  if (c == '\n')
+    fflush_unlocked (stderr);
+#endif
 }
 
 void
diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el 
b/test/lisp/emacs-lisp/bytecomp-tests.el
index 03c267c..5147cd2 100644
--- a/test/lisp/emacs-lisp/bytecomp-tests.el
+++ b/test/lisp/emacs-lisp/bytecomp-tests.el
@@ -1222,6 +1222,11 @@ compiled correctly."
         (byte-compile 'counter)
         (should (equal (counter) 1))))))
 
+(ert-deftest bytecomp-string-vs-docstring ()
+  ;; Don't confuse a string return value for a docstring.
+  (let ((lexical-binding t))
+    (should (equal (funcall (byte-compile '(lambda (x) "foo")) 'dummy) 
"foo"))))
+
 ;; Local Variables:
 ;; no-byte-compile: t
 ;; End:
diff --git a/test/lisp/emacs-lisp/ert-tests.el 
b/test/lisp/emacs-lisp/ert-tests.el
index bdacb08..5c96961 100644
--- a/test/lisp/emacs-lisp/ert-tests.el
+++ b/test/lisp/emacs-lisp/ert-tests.el
@@ -814,7 +814,7 @@ This macro is used to test if macroexpansion in `should' 
works."
                   :body (lambda () (should (integerp (ert-fail "Boo"))))))))
     (should (ert-test-failed-p result))
     (should (equal (ert-test-failed-condition result)
-                   '(ert-test-failed ("Boo"))))))
+                   '(ert-test-failed "Boo")))))
 
 
 (provide 'ert-tests)
diff --git a/test/lisp/kmacro-tests.el b/test/lisp/kmacro-tests.el
index c891072..8736f7f 100644
--- a/test/lisp/kmacro-tests.el
+++ b/test/lisp/kmacro-tests.el
@@ -519,7 +519,7 @@ This is a regression test for: Bug#3412, Bug#11817."
     (should (eq saved-binding (key-binding "\C-a")))))
 
 (kmacro-tests-deftest kmacro-tests-name-or-bind-to-key-when-no-macro ()
-  "Bind to key, symbol or register fails when when no macro exists."
+  "Bind to key, symbol or register fails when no macro exists."
   (should-error (kmacro-bind-to-key nil))
   (should-error (kmacro-name-last-macro 'kmacro-tests-symbol-for-test))
   (should-error (kmacro-to-register)))
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index d9a8065..be428fc 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -3537,7 +3537,7 @@ They might differ only in time attributes or directory 
size."
 This tests also `file-executable-p', `file-writable-p' and `set-file-modes'."
   (skip-unless (tramp--test-enabled))
   (skip-unless
-   (or (tramp--test-sh-p) (tramp--test-sudoedit-p)
+   (or (tramp--test-sh-p) (tramp--test-sshfs-p) (tramp--test-sudoedit-p)
        ;; Not all tramp-gvfs.el methods support changing the file mode.
        (and
        (tramp--test-gvfs-p)
@@ -4368,11 +4368,15 @@ This tests also `make-symbolic-link', `file-truename' 
and `add-name-to-file'."
          (and (featurep 'tramp-test-load) (unload-feature 'tramp-test-load))
          (delete-file tmp-name))))))
 
+(defun tramp--test-shell-file-name ()
+  "Return default remote shell.."
+  (if (tramp--test-adb-p) "/system/bin/sh" "/bin/sh"))
+
 (ert-deftest tramp-test28-process-file ()
   "Check `process-file'."
   :tags '(:expensive-test)
   (skip-unless (tramp--test-enabled))
-  (skip-unless (or (tramp--test-adb-p) (tramp--test-sh-p)))
+  (skip-unless (or (tramp--test-adb-p) (tramp--test-sh-p) 
(tramp--test-sshfs-p)))
   (skip-unless (not (tramp--test-crypt-p)))
 
   (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil)))
@@ -4389,25 +4393,27 @@ This tests also `make-symbolic-link', `file-truename' 
and `add-name-to-file'."
            (should-not (zerop (process-file "binary-does-not-exist")))
            ;; Return exit code.
            (should (= 42 (process-file
-                          (if (tramp--test-adb-p) "/system/bin/sh" "/bin/sh")
+                          (tramp--test-shell-file-name)
                           nil nil nil "-c" "exit 42")))
            ;; Return exit code in case the process is interrupted,
            ;; and there's no indication for a signal describing string.
-           (let (process-file-return-signal-string)
-             (should
-              (= (+ 128 2)
-                 (process-file
-                  (if (tramp--test-adb-p) "/system/bin/sh" "/bin/sh")
-                  nil nil nil "-c" "kill -2 $$"))))
+           (unless (tramp--test-sshfs-p)
+             (let (process-file-return-signal-string)
+               (should
+                (= (+ 128 2)
+                   (process-file
+                    (tramp--test-shell-file-name)
+                    nil nil nil "-c" "kill -2 $$")))))
            ;; Return string in case the process is interrupted and
            ;; there's an indication for a signal describing string.
-           (let ((process-file-return-signal-string t))
-             (should
-              (string-match-p
-               "Interrupt\\|Signal 2"
-               (process-file
-                (if (tramp--test-adb-p) "/system/bin/sh" "/bin/sh")
-                nil nil nil "-c" "kill -2 $$"))))
+           (unless (tramp--test-sshfs-p)
+             (let ((process-file-return-signal-string t))
+               (should
+                (string-match-p
+                 "Interrupt\\|Signal 2"
+                 (process-file
+                  (tramp--test-shell-file-name)
+                  nil nil nil "-c" "kill -2 $$")))))
 
            (with-temp-buffer
              (write-region "foo" nil tmp-name)
@@ -4451,7 +4457,7 @@ This tests also `make-symbolic-link', `file-truename' and 
`add-name-to-file'."
   "Check `start-file-process'."
   :tags '(:expensive-test)
   (skip-unless (tramp--test-enabled))
-  (skip-unless (or (tramp--test-adb-p) (tramp--test-sh-p)))
+  (skip-unless (or (tramp--test-adb-p) (tramp--test-sh-p) 
(tramp--test-sshfs-p)))
   (skip-unless (not (tramp--test-crypt-p)))
 
   (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil)))
@@ -4571,7 +4577,7 @@ If UNSTABLE is non-nil, the test is tagged as 
`:unstable'."
   "Check `make-process'."
   :tags '(:expensive-test)
   (skip-unless (tramp--test-enabled))
-  (skip-unless (or (tramp--test-adb-p) (tramp--test-sh-p)))
+  (skip-unless (or (tramp--test-adb-p) (tramp--test-sh-p) 
(tramp--test-sshfs-p)))
   (skip-unless (not (tramp--test-crypt-p)))
   ;; `make-process' supports file name handlers since Emacs 27.
   (skip-unless (tramp--test-emacs27-p))
@@ -4799,7 +4805,7 @@ INPUT, if non-nil, is a string sent to the process."
   ;; Prior Emacs 27, `shell-file-name' was hard coded as "/bin/sh" for
   ;; remote processes in Emacs.  That doesn't work for tramp-adb.el.
   (skip-unless (or (and (tramp--test-adb-p) (tramp--test-emacs27-p))
-                  (tramp--test-sh-p)))
+                  (tramp--test-sh-p) (tramp--test-sshfs-p)))
   (skip-unless (not (tramp--test-crypt-p)))
 
   (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil)))
@@ -4898,7 +4904,7 @@ INPUT, if non-nil, is a string sent to the process."
   :tags '(:expensive-test :unstable)
   (skip-unless (tramp--test-enabled))
   (skip-unless nil)
-  (skip-unless (or (tramp--test-adb-p) (tramp--test-sh-p)))
+  (skip-unless (or (tramp--test-adb-p) (tramp--test-sh-p) 
(tramp--test-sshfs-p)))
   (skip-unless (not (tramp--test-crypt-p)))
   ;; Prior Emacs 27, `shell-command-dont-erase-buffer' wasn't working properly.
   (skip-unless (tramp--test-emacs27-p))
@@ -5223,7 +5229,7 @@ Use direct async.")
   ;; Prior Emacs 27, `shell-file-name' was hard coded as "/bin/sh" for
   ;; remote processes in Emacs.  That doesn't work for tramp-adb.el.
   (skip-unless (or (and (tramp--test-adb-p) (tramp--test-emacs27-p))
-                  (tramp--test-sh-p)))
+                  (tramp--test-sh-p) (tramp--test-sshfs-p)))
   (skip-unless (not (tramp--test-crypt-p)))
   ;; Since Emacs 26.1.
   (skip-unless (and (fboundp 'connection-local-set-profile-variables)
@@ -5245,8 +5251,7 @@ Use direct async.")
          (with-no-warnings
            (connection-local-set-profile-variables
             'remote-sh
-            `((explicit-shell-file-name
-               . ,(if (tramp--test-adb-p) "/system/bin/sh" "/bin/sh"))
+            `((explicit-shell-file-name . ,(tramp--test-shell-file-name))
               (explicit-sh-args . ("-c" "echo foo"))))
            (connection-local-set-profiles
             `(:application tramp
@@ -5280,7 +5285,7 @@ Use direct async.")
 (ert-deftest tramp-test35-exec-path ()
   "Check `exec-path' and `executable-find'."
   (skip-unless (tramp--test-enabled))
-  (skip-unless (or (tramp--test-adb-p) (tramp--test-sh-p)))
+  (skip-unless (or (tramp--test-adb-p) (tramp--test-sh-p) 
(tramp--test-sshfs-p)))
   (skip-unless (not (tramp--test-crypt-p)))
   ;; Since Emacs 27.1.
   (skip-unless (fboundp 'exec-path))
@@ -6120,7 +6125,6 @@ Use the `stat' command."
   (skip-unless (tramp--test-sh-p))
   (skip-unless (not (tramp--test-rsync-p)))
   (skip-unless (not (tramp--test-windows-nt-and-pscp-psftp-p)))
-  (skip-unless (or (tramp--test-emacs26-p) (not (tramp--test-rclone-p))))
   ;; We cannot use `tramp-test-vec', because this fails during compilation.
   (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
     (skip-unless (tramp-get-remote-stat v)))
@@ -6140,7 +6144,6 @@ Use the `perl' command."
   (skip-unless (tramp--test-sh-p))
   (skip-unless (not (tramp--test-rsync-p)))
   (skip-unless (not (tramp--test-windows-nt-and-pscp-psftp-p)))
-  (skip-unless (or (tramp--test-emacs26-p) (not (tramp--test-rclone-p))))
   ;; We cannot use `tramp-test-vec', because this fails during compilation.
   (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
     (skip-unless (tramp-get-remote-perl v)))
@@ -6163,7 +6166,6 @@ Use the `ls' command."
   (skip-unless (tramp--test-sh-p))
   (skip-unless (not (tramp--test-rsync-p)))
   (skip-unless (not (tramp--test-windows-nt-and-pscp-psftp-p)))
-  (skip-unless (or (tramp--test-emacs26-p) (not (tramp--test-rclone-p))))
 
   (let ((tramp-connection-properties
         (append
@@ -6249,7 +6251,6 @@ Use the `stat' command."
   (skip-unless (not (tramp--test-windows-nt-and-pscp-psftp-p)))
   (skip-unless (not (tramp--test-ksh-p)))
   (skip-unless (not (tramp--test-crypt-p)))
-  (skip-unless (or (tramp--test-emacs26-p) (not (tramp--test-rclone-p))))
   ;; We cannot use `tramp-test-vec', because this fails during compilation.
   (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
     (skip-unless (tramp-get-remote-stat v)))
@@ -6273,7 +6274,6 @@ Use the `perl' command."
   (skip-unless (not (tramp--test-windows-nt-and-pscp-psftp-p)))
   (skip-unless (not (tramp--test-ksh-p)))
   (skip-unless (not (tramp--test-crypt-p)))
-  (skip-unless (or (tramp--test-emacs26-p) (not (tramp--test-rclone-p))))
   ;; We cannot use `tramp-test-vec', because this fails during compilation.
   (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
     (skip-unless (tramp-get-remote-perl v)))
@@ -6300,7 +6300,6 @@ Use the `ls' command."
   (skip-unless (not (tramp--test-windows-nt-and-pscp-psftp-p)))
   (skip-unless (not (tramp--test-ksh-p)))
   (skip-unless (not (tramp--test-crypt-p)))
-  (skip-unless (or (tramp--test-emacs26-p) (not (tramp--test-rclone-p))))
 
   (let ((tramp-connection-properties
         (append
@@ -6341,6 +6340,7 @@ Use the `ls' command."
   "Set \"process-name\" and \"process-buffer\" connection properties.
 The values are derived from PROC.  Run BODY.
 This is needed in timer functions as well as process filters and sentinels."
+  ;; FIXME: For tramp-sshfs.el, `processp' does not work.
   (declare (indent 1) (debug (processp body)))
   `(let* ((v (tramp-get-connection-property ,proc "vector" nil))
          (pname (tramp-get-connection-property v "process-name" nil))
@@ -6390,7 +6390,7 @@ process sentinels.  They shall not disturb each other."
     (define-key special-event-map [sigusr1] #'tramp--test-timeout-handler)
     (let* (;; For the watchdog.
           (default-directory (expand-file-name temporary-file-directory))
-          (shell-file-name (if (tramp--test-adb-p) "/system/bin/sh" "/bin/sh"))
+          (shell-file-name (tramp--test-shell-file-name))
           ;; It doesn't work on w32 systems.
           (watchdog
             (start-process-shell-command
@@ -6765,8 +6765,10 @@ If INTERACTIVE is non-nil, the tests are run 
interactively."
 ;; * Work on skipped tests.  Make a comment, when it is impossible.
 ;; * Revisit expensive tests, once problems in `tramp-error' are solved.
 ;; * Fix `tramp-test06-directory-file-name' for `ftp'.
-;; * Implement `tramp-test31-interrupt-process' for `adb' and for
-;;   direct async processes.
+;; * Implement `tramp-test31-interrupt-process' for `adb', `sshfs' and
+;;   for direct async processes.
+;; * Check, why direct async processes do not work for
+;;   `tramp-test43-asynchronous-requests'.
 
 (provide 'tramp-tests)
 
diff --git a/test/lisp/simple-tests.el b/test/lisp/simple-tests.el
index f2ddc2e..601eca6 100644
--- a/test/lisp/simple-tests.el
+++ b/test/lisp/simple-tests.el
@@ -465,8 +465,124 @@ See bug#35036."
     (simple-tests--exec '(backward-char undo-redo undo-redo))
     (should (equal (buffer-string) "abc"))
     (simple-tests--exec '(backward-char undo-redo undo-redo))
+    (should (equal (buffer-string) "abcde"))))
+
+(ert-deftest simple-tests--undo-in-region ()
+  ;; Test undo/redo in region.
+  (with-temp-buffer
+    ;; Enable `transient-mark-mode' so `region-active-p' works as
+    ;; expected. `region-active-p' is used to determine whether to
+    ;; perform regional undo in `undo'.
+    (transient-mark-mode)
+    (buffer-enable-undo)
+    (dolist (x '("a" "b" "c" "d" "e"))
+      (insert x)
+      (undo-boundary))
+    (should (equal (buffer-string) "abcde"))
+    ;; The test does this: activate region, `undo', break the undo
+    ;; chain (by deactivating and reactivating the region), then
+    ;; `undo-only'.  There used to be a bug in
+    ;; `undo-make-selective-list' that makes `undo-only' error out in
+    ;; that case, which is fixed by in the same commit as this change.
+    (simple-tests--exec '(move-beginning-of-line
+                          push-mark-command
+                          forward-char
+                          forward-char
+                          undo))
+    (should (equal (buffer-string) "acde"))
+    (simple-tests--exec '(move-beginning-of-line
+                          push-mark-command
+                          forward-char
+                          forward-char
+                          undo-only))
     (should (equal (buffer-string) "abcde"))
-    ))
+    ;; Rest are simple redo in region tests.
+    (simple-tests--exec '(undo-redo))
+    (should (equal (buffer-string) "acde"))
+    (simple-tests--exec '(undo-redo))
+    (should (equal (buffer-string) "abcde"))))
+
+(defun simple-tests--sans-leading-nil (lst)
+  "Return LST sans the leading nils."
+  (while (and (consp lst) (null (car lst)))
+    (setq lst (cdr lst)))
+  lst)
+
+(ert-deftest simple-tests--undo-equiv-table ()
+  (with-temp-buffer
+    (buffer-enable-undo)
+    (transient-mark-mode)
+    (let ((ul-hash-table (make-hash-table :test #'equal)))
+      (dolist (x '("a" "b" "c"))
+        (insert x)
+        (puthash x (simple-tests--sans-leading-nil buffer-undo-list)
+                 ul-hash-table)
+        (undo-boundary))
+      (should (equal (buffer-string) "abc"))
+      ;; Tests mappings in `undo-equiv-table'.
+      (simple-tests--exec '(undo))
+      (should (equal (buffer-string) "ab"))
+      (should (eq (gethash (simple-tests--sans-leading-nil
+                            buffer-undo-list)
+                           undo-equiv-table)
+                  (gethash "b" ul-hash-table)))
+      (simple-tests--exec '(backward-char undo))
+      (should (equal (buffer-string) "abc"))
+      (should (eq (gethash (simple-tests--sans-leading-nil
+                            buffer-undo-list)
+                           undo-equiv-table)
+                  (gethash "c" ul-hash-table)))
+      ;; Undo in region should map to 'undo-in-region.
+      (simple-tests--exec '(backward-char
+                            push-mark-command
+                            move-end-of-line
+                            undo))
+      (should (equal (buffer-string) "ab"))
+      (should (eq (gethash (simple-tests--sans-leading-nil
+                            buffer-undo-list)
+                           undo-equiv-table)
+                  'undo-in-region))
+      ;; The undo that undoes to the beginning should map to t.
+      (deactivate-mark 'force)
+      (simple-tests--exec '(backward-char
+                            undo undo undo
+                            undo undo undo))
+      (should (equal (buffer-string) ""))
+      (should (eq (gethash (simple-tests--sans-leading-nil
+                            buffer-undo-list)
+                           undo-equiv-table)
+                  t))
+      ;; Erroneous nil undo should map to 'empty.
+      (insert "a")
+      (undo-boundary)
+      (push nil buffer-undo-list)
+      (simple-tests--exec '(backward-char undo))
+      (should (equal (buffer-string) "a"))
+      (should (eq (gethash (simple-tests--sans-leading-nil
+                            buffer-undo-list)
+                           undo-equiv-table)
+                  'empty))
+      ;; But if the previous record is a redo record, its mapping
+      ;; shouldn't change.
+      (insert "e")
+      (undo-boundary)
+      (should (equal (buffer-string) "ea"))
+      (puthash "e" (simple-tests--sans-leading-nil buffer-undo-list)
+               ul-hash-table)
+      (insert "a")
+      (undo-boundary)
+      (simple-tests--exec '(backward-char undo))
+      (should (equal (buffer-string) "ea"))
+      (push nil buffer-undo-list)
+      (simple-tests--exec '(forward-char undo))
+      ;; Buffer content should change since we just undid a nil
+      ;; record.
+      (should (equal (buffer-string) "ea"))
+      ;; The previous redo record shouldn't map to empty.
+      (should (equal (gethash (simple-tests--sans-leading-nil
+                               buffer-undo-list)
+                              undo-equiv-table)
+                     (gethash "e" ul-hash-table))))))
 
 ;;; undo auto-boundary tests
 (ert-deftest undo-auto-boundary-timer ()



reply via email to

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