emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 8cdb9d9 4/4: Merge branch 'master' of git.sv.gnu.or


From: Dmitry Gutov
Subject: [Emacs-diffs] master 8cdb9d9 4/4: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Date: Thu, 23 May 2019 21:54:30 -0400 (EDT)

branch: master
commit 8cdb9d9d24be0894ec3adc79f7f4af61e131850e
Merge: 62349fe 5b6401b
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
---
 .gitlab-ci.yml                                     |   2 +-
 admin/authors.el                                   |   2 -
 admin/find-gc.el                                   |   2 -
 admin/last-chance.el                               |   1 -
 autogen.sh                                         |  13 +-
 build-aux/git-hooks/prepare-commit-msg             |  45 +++
 build-aux/make-info-dir                            |   1 -
 doc/emacs/building.texi                            |   6 +
 doc/emacs/custom.texi                              |   1 +
 doc/emacs/programs.texi                            |   5 +-
 doc/lispref/functions.texi                         |   4 +
 doc/lispref/hooks.texi                             |   1 +
 doc/lispref/loading.texi                           |  23 +-
 doc/lispref/sequences.texi                         |   2 +-
 doc/lispref/variables.texi                         |   2 +-
 etc/NEWS                                           |  15 +-
 etc/refcards/Makefile                              |   2 +-
 etc/tutorials/TUTORIAL.translators                 |   5 +-
 lib-src/etags.c                                    |   2 +-
 lisp/abbrev.el                                     |   1 -
 lisp/align.el                                      |   1 -
 lisp/allout-widgets.el                             |  41 +--
 lisp/allout.el                                     |  94 +++--
 lisp/array.el                                      |   1 -
 lisp/autoinsert.el                                 |   1 -
 lisp/autorevert.el                                 | 124 +++++--
 lisp/bindings.el                                   |   1 -
 lisp/bs.el                                         |   1 -
 lisp/buff-menu.el                                  |   1 -
 lisp/calendar/time-date.el                         |   2 +-
 lisp/case-table.el                                 |   1 -
 lisp/cdl.el                                        |   1 -
 lisp/cedet/cedet.el                                |   2 +-
 lisp/cedet/semantic/imenu.el                       |   2 +-
 lisp/cedet/semantic/senator.el                     |   1 -
 lisp/cedet/semantic/wisent/python.el               |   4 +-
 lisp/cedet/srecode/insert.el                       |  34 +-
 lisp/char-fold.el                                  |   1 -
 lisp/chistory.el                                   |   1 -
 lisp/cmuscheme.el                                  |   1 -
 lisp/comint.el                                     |   1 -
 lisp/completion.el                                 |   1 -
 lisp/composite.el                                  |   2 +-
 lisp/cus-edit.el                                   |   1 -
 lisp/cus-theme.el                                  |   1 -
 lisp/custom.el                                     |   1 -
 lisp/dabbrev.el                                    |   4 +-
 lisp/delim-col.el                                  |  70 ++--
 lisp/delsel.el                                     |   1 -
 lisp/descr-text.el                                 |   1 -
 lisp/dired-aux.el                                  |   1 -
 lisp/dired.el                                      |   1 -
 lisp/disp-table.el                                 |   1 -
 lisp/display-fill-column-indicator.el              |   1 -
 lisp/display-line-numbers.el                       |   1 -
 lisp/dnd.el                                        |   1 -
 lisp/dos-fns.el                                    |   1 -
 lisp/dos-vars.el                                   |   1 -
 lisp/dynamic-setting.el                            |   1 -
 lisp/ebuff-menu.el                                 |   1 -
 lisp/echistory.el                                  |   1 -
 lisp/ehelp.el                                      |   1 -
 lisp/electric.el                                   |   1 -
 lisp/emacs-lisp/advice.el                          |   1 -
 lisp/emacs-lisp/avl-tree.el                        |   1 -
 lisp/emacs-lisp/backquote.el                       |   1 -
 lisp/emacs-lisp/byte-opt.el                        |   1 -
 lisp/emacs-lisp/byte-run.el                        |   1 -
 lisp/emacs-lisp/bytecomp.el                        |   1 -
 lisp/emacs-lisp/cconv.el                           |   1 -
 lisp/emacs-lisp/cl-indent.el                       |   1 -
 lisp/emacs-lisp/cl-macs.el                         |   5 +-
 lisp/emacs-lisp/debug.el                           |   1 -
 lisp/emacs-lisp/derived.el                         |   1 -
 lisp/emacs-lisp/disass.el                          |   1 -
 lisp/emacs-lisp/edebug.el                          |   1 -
 lisp/emacs-lisp/eldoc.el                           |   2 +-
 lisp/emacs-lisp/elp.el                             |   1 -
 lisp/emacs-lisp/ewoc.el                            |   2 +-
 lisp/emacs-lisp/float-sup.el                       |   1 -
 lisp/emacs-lisp/helper.el                          |   1 -
 lisp/emacs-lisp/lisp-mnt.el                        |   1 -
 lisp/emacs-lisp/lisp-mode.el                       |   1 -
 lisp/emacs-lisp/lisp.el                            |   1 -
 lisp/emacs-lisp/map-ynp.el                         |   1 -
 lisp/emacs-lisp/map.el                             |   2 -
 lisp/emacs-lisp/regexp-opt.el                      |   1 -
 lisp/emacs-lisp/ring.el                            |   1 -
 lisp/emacs-lisp/rmc.el                             |   2 -
 lisp/emacs-lisp/rx.el                              |  15 +-
 lisp/emacs-lisp/seq.el                             |   2 -
 lisp/emacs-lisp/subr-x.el                          |   1 -
 lisp/emacs-lisp/syntax.el                          |   1 -
 lisp/emacs-lisp/tcover-ses.el                      |   4 +-
 lisp/emacs-lisp/tcover-unsafep.el                  |   4 +-
 lisp/emacs-lisp/thunk.el                           |   2 -
 lisp/emacs-lisp/timer-list.el                      |   1 -
 lisp/emacs-lisp/timer.el                           |   1 -
 lisp/emacs-lisp/tq.el                              |   1 -
 lisp/emacs-lisp/trace.el                           |   1 -
 lisp/emacs-lisp/warnings.el                        |   1 -
 lisp/emacs-lock.el                                 |   1 -
 lisp/env.el                                        |   1 -
 lisp/erc/erc-autoaway.el                           |   1 -
 lisp/erc/erc-backend.el                            |   1 -
 lisp/erc/erc-button.el                             |   1 -
 lisp/erc/erc-capab.el                              |   2 -
 lisp/erc/erc-compat.el                             |   1 -
 lisp/erc/erc-dcc.el                                |   1 -
 lisp/erc/erc-ezbounce.el                           |   1 -
 lisp/erc/erc-fill.el                               |   1 -
 lisp/erc/erc-goodies.el                            |   1 -
 lisp/erc/erc-ibuffer.el                            |   1 -
 lisp/erc/erc-identd.el                             |   1 -
 lisp/erc/erc-imenu.el                              |   1 -
 lisp/erc/erc-join.el                               |   1 -
 lisp/erc/erc-lang.el                               |   1 -
 lisp/erc/erc-list.el                               |   1 -
 lisp/erc/erc-log.el                                |   1 -
 lisp/erc/erc-match.el                              |   1 -
 lisp/erc/erc-menu.el                               |   1 -
 lisp/erc/erc-netsplit.el                           |   1 -
 lisp/erc/erc-networks.el                           |   1 -
 lisp/erc/erc-notify.el                             |   1 -
 lisp/erc/erc-page.el                               |   2 -
 lisp/erc/erc-pcomplete.el                          |   1 -
 lisp/erc/erc-replace.el                            |   1 -
 lisp/erc/erc-ring.el                               |   1 -
 lisp/erc/erc-services.el                           |   2 -
 lisp/erc/erc-sound.el                              |   2 -
 lisp/erc/erc-speedbar.el                           |   1 -
 lisp/erc/erc-spelling.el                           |   1 -
 lisp/erc/erc-stamp.el                              |   1 -
 lisp/erc/erc-track.el                              |   1 -
 lisp/erc/erc-truncate.el                           |   1 -
 lisp/erc/erc-xdcc.el                               |   1 -
 lisp/erc/erc.el                                    |   1 -
 lisp/expand.el                                     |   1 -
 lisp/faces.el                                      |   1 -
 lisp/ffap.el                                       |   1 -
 lisp/filenotify.el                                 |  14 +-
 lisp/files-x.el                                    |   1 -
 lisp/files.el                                      |   7 +-
 lisp/filesets.el                                   |   1 -
 lisp/find-dired.el                                 |   1 -
 lisp/find-file.el                                  |   1 -
 lisp/flow-ctrl.el                                  |   1 -
 lisp/foldout.el                                    |   1 -
 lisp/follow.el                                     |   1 -
 lisp/font-core.el                                  |   1 -
 lisp/font-lock.el                                  |   1 -
 lisp/frame.el                                      |   1 -
 lisp/fringe.el                                     |   1 -
 lisp/gnus/gnus-art.el                              |   2 +-
 lisp/gnus/gnus-async.el                            |   2 +-
 lisp/gnus/gnus-demon.el                            |   4 +-
 lisp/gnus/mail-source.el                           |   5 +-
 lisp/gnus/mm-decode.el                             |   2 +-
 lisp/gnus/nnheader.el                              |   6 +-
 lisp/gnus/nnmail.el                                |   2 -
 lisp/gnus/nnmaildir.el                             |   2 +-
 lisp/gnus/nntp.el                                  |   6 +-
 lisp/help-fns.el                                   |  19 +-
 lisp/help-macro.el                                 |   1 -
 lisp/help-mode.el                                  |   1 -
 lisp/help.el                                       |   1 -
 lisp/hexl.el                                       |   1 -
 lisp/hippie-exp.el                                 |   1 -
 lisp/hl-line.el                                    |   1 -
 lisp/icomplete.el                                  |   4 +-
 lisp/ielm.el                                       |   1 -
 lisp/iimage.el                                     |   1 -
 lisp/image.el                                      |   1 -
 lisp/imenu.el                                      |   1 -
 lisp/indent.el                                     |   1 -
 lisp/info.el                                       |   1 -
 lisp/informat.el                                   |   1 -
 lisp/international/isearch-x.el                    |   4 +-
 lisp/international/iso-ascii.el                    |   1 -
 lisp/international/iso-transl.el                   |   1 -
 lisp/international/ogonek.el                       |   1 -
 lisp/international/quail.el                        |   6 +-
 lisp/international/utf7.el                         |   1 -
 lisp/isearch.el                                    |   1 -
 lisp/isearchb.el                                   |   1 -
 lisp/jka-cmpr-hook.el                              |   1 -
 lisp/jka-compr.el                                  |   1 -
 lisp/kermit.el                                     |   1 -
 lisp/language/cyrillic.el                          |   2 +-
 lisp/language/european.el                          |   2 +-
 lisp/language/indian.el                            |   2 +-
 lisp/language/thai-word.el                         |   2 +-
 lisp/leim/quail/py-punct.el                        |   2 +-
 lisp/leim/quail/pypunct-b5.el                      |   2 +-
 lisp/linum.el                                      |   1 -
 lisp/loadhist.el                                   |   1 -
 lisp/loadup.el                                     |   1 -
 lisp/lpr.el                                        |   1 -
 lisp/ls-lisp.el                                    |   1 -
 lisp/macros.el                                     |   1 -
 lisp/mail/blessmail.el                             |   1 -
 lisp/mail/emacsbug.el                              |   1 -
 lisp/mail/feedmail.el                              |   2 +-
 lisp/mail/hashcash.el                              |   1 -
 lisp/mail/mail-extr.el                             |   1 -
 lisp/mail/mail-utils.el                            |   1 -
 lisp/mail/mailabbrev.el                            |   1 -
 lisp/mail/mailalias.el                             |   1 -
 lisp/mail/reporter.el                              |   1 -
 lisp/mail/rfc822.el                                |   1 -
 lisp/mail/rmail.el                                 |   1 -
 lisp/mail/rmailedit.el                             |   1 -
 lisp/mail/rmailkwd.el                              |   1 -
 lisp/mail/rmailmm.el                               |   1 -
 lisp/mail/rmailmsc.el                              |   1 -
 lisp/mail/rmailout.el                              |   1 -
 lisp/mail/rmailsort.el                             |   1 -
 lisp/mail/rmailsum.el                              |   1 -
 lisp/mail/sendmail.el                              |   1 -
 lisp/mail/supercite.el                             |   1 -
 lisp/mail/undigest.el                              |   1 -
 lisp/mail/unrmail.el                               |   1 -
 lisp/makesum.el                                    |   1 -
 lisp/man.el                                        |   1 -
 lisp/menu-bar.el                                   |   1 -
 lisp/misc.el                                       |   1 -
 lisp/mouse.el                                      |   1 -
 lisp/msb.el                                        |   1 -
 lisp/mwheel.el                                     |   2 +-
 lisp/net/ange-ftp.el                               |   1 -
 lisp/net/browse-url.el                             |   1 -
 lisp/net/goto-addr.el                              |   1 -
 lisp/net/ldap.el                                   |   1 -
 lisp/net/pop3.el                                   |   1 -
 lisp/net/socks.el                                  |   2 +-
 lisp/net/telnet.el                                 |   1 -
 lisp/newcomment.el                                 |   2 +-
 lisp/novice.el                                     |   1 -
 lisp/obarray.el                                    |   1 -
 lisp/obsolete/abbrevlist.el                        |   1 -
 lisp/obsolete/bruce.el                             |   1 -
 lisp/obsolete/fast-lock.el                         |   1 -
 lisp/obsolete/gs.el                                |   1 -
 lisp/obsolete/gulp.el                              |   1 -
 lisp/obsolete/info-edit.el                         |   1 -
 lisp/obsolete/lazy-lock.el                         |   1 -
 lisp/obsolete/ledit.el                             |   1 -
 lisp/obsolete/levents.el                           |   1 -
 lisp/obsolete/lucid.el                             |   1 -
 lisp/obsolete/mailpost.el                          |   1 -
 lisp/obsolete/meese.el                             |   1 -
 lisp/obsolete/pc-mode.el                           |   1 -
 lisp/obsolete/rcompile.el                          |   1 -
 lisp/obsolete/sregex.el                            |   1 -
 lisp/obsolete/sup-mouse.el                         |   1 -
 lisp/obsolete/terminal.el                          |   1 -
 lisp/obsolete/yow.el                               |   1 -
 lisp/org/org-id.el                                 |   3 +-
 lisp/org/org.el                                    |   6 +-
 lisp/org/ox-publish.el                             |   2 +-
 lisp/outline.el                                    |   1 -
 lisp/paren.el                                      |   1 -
 lisp/play/cookie1.el                               |   1 -
 lisp/play/dissociate.el                            |   1 -
 lisp/play/doctor.el                                |   1 -
 lisp/play/gomoku.el                                |   1 -
 lisp/play/hanoi.el                                 |   1 -
 lisp/play/life.el                                  |   1 -
 lisp/play/spook.el                                 |   1 -
 lisp/play/studly.el                                |   1 -
 lisp/progmodes/ada-mode.el                         |   2 +-
 lisp/progmodes/asm-mode.el                         |   1 -
 lisp/progmodes/cc-align.el                         |  12 +-
 lisp/progmodes/cc-awk.el                           |   1 -
 lisp/progmodes/cc-engine.el                        |  71 +---
 lisp/progmodes/compile.el                          |   1 -
 lisp/progmodes/cperl-mode.el                       |   1 -
 lisp/progmodes/dcl-mode.el                         |   1 -
 lisp/progmodes/ebrowse.el                          |   1 -
 lisp/progmodes/elisp-mode.el                       |   1 -
 lisp/progmodes/etags.el                            |   1 -
 lisp/progmodes/gdb-mi.el                           |   1 -
 lisp/progmodes/grep.el                             |   1 -
 lisp/progmodes/gud.el                              |   1 -
 lisp/progmodes/make-mode.el                        |   1 -
 lisp/progmodes/mixal-mode.el                       |   1 -
 lisp/progmodes/modula2.el                          |   1 -
 lisp/progmodes/octave.el                           |   1 -
 lisp/progmodes/perl-mode.el                        |   1 -
 lisp/progmodes/prog-mode.el                        |   1 -
 lisp/progmodes/project.el                          |   4 +-
 lisp/progmodes/python.el                           |   1 -
 lisp/progmodes/sh-script.el                        |   1 -
 lisp/progmodes/tcl.el                              |   1 -
 lisp/progmodes/xscheme.el                          |   1 -
 lisp/ps-bdf.el                                     |   2 +-
 lisp/ps-def.el                                     |   4 +-
 lisp/ps-mule.el                                    |   4 +-
 lisp/ps-print.el                                   |   6 +-
 lisp/ps-samp.el                                    |   4 +-
 lisp/register.el                                   |   1 -
 lisp/replace.el                                    |   1 -
 lisp/reposition.el                                 |   1 -
 lisp/rot13.el                                      |   1 -
 lisp/savehist.el                                   |   1 -
 lisp/saveplace.el                                  |   1 -
 lisp/scroll-bar.el                                 |   1 -
 lisp/scroll-lock.el                                |   1 -
 lisp/select.el                                     |   1 -
 lisp/server.el                                     |   1 -
 lisp/ses.el                                        |   2 +-
 lisp/shell.el                                      |   1 -
 lisp/simple.el                                     |   1 -
 lisp/skeleton.el                                   |   1 -
 lisp/sort.el                                       |   1 -
 lisp/soundex.el                                    |   1 -
 lisp/startup.el                                    |   1 -
 lisp/strokes.el                                    |   1 -
 lisp/subr.el                                       |   1 -
 lisp/t-mouse.el                                    |   1 -
 lisp/tabify.el                                     |   1 -
 lisp/talk.el                                       |   1 -
 lisp/tar-mode.el                                   |   1 -
 lisp/tempo.el                                      |  41 +--
 lisp/term/common-win.el                            |   1 -
 lisp/term/pc-win.el                                |   1 -
 lisp/term/tty-colors.el                            |   1 -
 lisp/textmodes/bib-mode.el                         |   1 -
 lisp/textmodes/fill.el                             |   1 -
 lisp/textmodes/flyspell.el                         |   1 -
 lisp/textmodes/makeinfo.el                         |   1 -
 lisp/textmodes/nroff-mode.el                       |   1 -
 lisp/textmodes/page.el                             |   1 -
 lisp/textmodes/paragraphs.el                       |   1 -
 lisp/textmodes/picture.el                          |   2 -
 lisp/textmodes/refbib.el                           |   1 -
 lisp/textmodes/refer.el                            |   1 -
 lisp/textmodes/remember.el                         |   1 -
 lisp/textmodes/sgml-mode.el                        |  36 +-
 lisp/textmodes/table.el                            |   2 +-
 lisp/textmodes/tex-mode.el                         |   1 -
 lisp/textmodes/texinfmt.el                         |   1 -
 lisp/textmodes/texinfo.el                          |   1 -
 lisp/textmodes/texnfo-upd.el                       |   1 -
 lisp/textmodes/text-mode.el                        |   1 -
 lisp/textmodes/underline.el                        |   1 -
 lisp/thingatpt.el                                  |   1 -
 lisp/thread.el                                     |   1 -
 lisp/thumbs.el                                     |   1 -
 lisp/time.el                                       |   2 -
 lisp/tmm.el                                        |   1 -
 lisp/tutorial.el                                   |   1 -
 lisp/uniquify.el                                   |   1 -
 lisp/url/url-dav.el                                |   1 -
 lisp/url/url-gw.el                                 |   1 -
 lisp/url/url-handlers.el                           | 161 +++++----
 lisp/url/url-http.el                               |   1 -
 lisp/url/url-util.el                               |   1 -
 lisp/url/url.el                                    |   1 -
 lisp/userlock.el                                   |   1 -
 lisp/vc/add-log.el                                 |   1 -
 lisp/vc/compare-w.el                               |   1 -
 lisp/vc/diff.el                                    |   1 -
 lisp/vc/vc-annotate.el                             |   1 -
 lisp/vc/vc-bzr.el                                  |   1 -
 lisp/vc/vc-cvs.el                                  |   1 -
 lisp/vc/vc-dispatcher.el                           |   1 -
 lisp/vc/vc-filewise.el                             |   1 -
 lisp/vc/vc-hg.el                                   |   1 -
 lisp/vc/vc-hooks.el                                |   1 -
 lisp/vc/vc-rcs.el                                  |   1 -
 lisp/vc/vc-sccs.el                                 |   1 -
 lisp/vc/vc-src.el                                  |   1 -
 lisp/vc/vc.el                                      |   1 -
 lisp/vcursor.el                                    |   1 -
 lisp/version.el                                    |   1 -
 lisp/view.el                                       |   1 -
 lisp/vt100-led.el                                  |   1 -
 lisp/w32-fns.el                                    |   2 +-
 lisp/wid-edit.el                                   |   1 -
 lisp/window.el                                     |   1 -
 lisp/woman.el                                      |   1 -
 lisp/x-dnd.el                                      |   1 -
 src/alloc.c                                        |   4 +-
 src/buffer.c                                       |  22 +-
 src/character.h                                    |   9 +-
 src/data.c                                         |  23 +-
 src/dispextern.h                                   |  85 +++--
 src/eval.c                                         |   4 +-
 src/fileio.c                                       |   9 +-
 src/fns.c                                          |   6 +-
 src/font.h                                         |   4 +-
 src/frame.h                                        |   4 +-
 src/ftcrfont.c                                     | 381 ++++++++++++++-------
 src/ftfont.c                                       | 224 +++++++++---
 src/ftfont.h                                       |  18 +-
 src/ftxfont.c                                      |   8 +-
 src/gtkutil.c                                      |   2 +-
 src/gtkutil.h                                      |   2 +-
 src/image.c                                        | 325 +++++++++---------
 src/keyboard.c                                     |   4 +-
 src/lisp.h                                         |   2 +-
 src/macfont.m                                      |  17 +-
 src/msdos.h                                        |   1 -
 src/nsfont.m                                       |   2 +-
 src/nsgui.h                                        |  61 +---
 src/nsimage.m                                      |   4 +-
 src/nsmenu.m                                       |   7 +-
 src/nsselect.m                                     |  14 +-
 src/nsterm.h                                       |  54 +--
 src/nsterm.m                                       | 101 ++----
 src/regex-emacs.c                                  |   2 +-
 src/search.c                                       |   7 +-
 src/termhooks.h                                    |   8 +-
 src/w32fns.c                                       |  27 +-
 src/w32font.c                                      |  20 +-
 src/w32font.h                                      |   2 +-
 src/w32gui.h                                       |  43 +--
 src/w32term.c                                      | 119 +++----
 src/w32term.h                                      |  50 +--
 src/window.c                                       |   6 +-
 src/window.h                                       |  10 +-
 src/xdisp.c                                        | 250 ++++++--------
 src/xfaces.c                                       |  68 ++--
 src/xfns.c                                         |   2 +-
 src/xfont.c                                        | 111 +++---
 src/xftfont.c                                      | 156 +--------
 src/xterm.c                                        |  21 +-
 src/xterm.h                                        |  14 +-
 test/lisp/autorevert-tests.el                      | 112 +++++-
 test/lisp/delim-col-tests.el                       | 181 ++++++++++
 test/lisp/emacs-lisp/map-tests.el                  |   1 -
 test/lisp/emacs-lisp/rx-tests.el                   |   8 +-
 test/lisp/emacs-lisp/seq-tests.el                  |   1 -
 test/lisp/emacs-lisp/thunk-tests.el                |   1 -
 test/lisp/help-fns-tests.el                        |   2 -
 test/lisp/md4-tests.el                             |   1 -
 test/lisp/org/org-tests.el                         |   2 -
 test/lisp/soundex-tests.el                         |   2 -
 test/lisp/tempo-tests.el                           | 228 ++++++++++++
 test/lisp/textmodes/sgml-mode-tests.el             |   4 +
 test/lisp/vc/diff-mode-tests.el                    |   1 -
 test/lisp/vc/smerge-mode-tests.el                  |   2 -
 test/lisp/vc/vc-bzr-tests.el                       |   1 -
 test/lisp/vc/vc-hg-tests.el                        |   1 -
 test/lisp/xdg-tests.el                             |   1 -
 test/manual/biditest.el                            |   1 -
 .../etags/el-src/emacs/lisp/progmodes/etags.el     |   1 -
 test/src/lcms-tests.el                             |   2 -
 449 files changed, 2260 insertions(+), 1934 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 92efcf6..df48764 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -21,7 +21,7 @@
 # any particular service that uses that protocol.  Also, it is intended for
 # evaluation purposes, thus possibly temporary.
 
-# Maintainer: address@hidden
+# Maintainer: Ted Zlatanov <address@hidden>
 # URL: https://emba.gnu.org/emacs/emacs
 
 image: debian:stretch
diff --git a/admin/authors.el b/admin/authors.el
index a3f8bdd..8329f3f 100644
--- a/admin/authors.el
+++ b/admin/authors.el
@@ -1,10 +1,8 @@
-
 ;;; authors.el --- utility for maintaining Emacs's AUTHORS file
 
 ;; Copyright (C) 2000-2019 Free Software Foundation, Inc.
 
 ;; Author: Gerd Moellmann <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: maint
 ;; Package: emacs
 
diff --git a/admin/find-gc.el b/admin/find-gc.el
index bf93c4e..9b92556 100644
--- a/admin/find-gc.el
+++ b/admin/find-gc.el
@@ -2,8 +2,6 @@
 
 ;; Copyright (C) 1992, 2001-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
-
 ;; This file is part of GNU Emacs.
 
 ;; GNU Emacs is free software: you can redistribute it and/or modify
diff --git a/admin/last-chance.el b/admin/last-chance.el
index 5f993be..ceed1c7 100644
--- a/admin/last-chance.el
+++ b/admin/last-chance.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2016-2019 Free Software Foundation, Inc.
 
 ;; Author: Thien-Thi Nguyen <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: maint
 ;; Package: emacs
 
diff --git a/autogen.sh b/autogen.sh
index 40d0c37..cff4a54 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -4,7 +4,6 @@
 ## Copyright (C) 2011-2019 Free Software Foundation, Inc.
 
 ## Author: Glenn Morris <address@hidden>
-## Maintainer: address@hidden
 
 ## This file is part of GNU Emacs.
 
@@ -316,8 +315,16 @@ git_config transfer.fsckObjects true
 
 # Configure 'git diff' hunk header format.
 
+# This xfuncname is based on Git's built-in 'cpp' pattern.
+# The first line rejects jump targets and access declarations.
+# The second line matches top-level functions and methods.
+# The third line matches preprocessor and DEFUN macros.
+git_config diff.cpp.xfuncname \
+'!^[ \t]*[A-Za-z_][A-Za-z_0-9]*:[[:space:]]*($|/[/*])
+^((::[[:space:]]*)?[A-Za-z_][A-Za-z_0-9]*[[:space:]]*\(.*)$
+^((#define[[:space:]]|DEFUN).*)$'
 git_config diff.elisp.xfuncname \
-          '^\(def[^[:space:]]+[[:space:]]+([^()[:space:]]+)'
+           '^\([^[:space:]]*def[^[:space:]]+[[:space:]]+([^()[:space:]]+)'
 git_config 'diff.m4.xfuncname' '^((m4_)?define|A._DEFUN(_ONCE)?)\([^),]*'
 git_config 'diff.make.xfuncname' \
           
'^([$.[:alnum:]_].*:|[[:alnum:]_]+[[:space:]]*([*:+]?[:?]?|!?)=|define .*)'
@@ -332,7 +339,7 @@ git_config diff.texinfo.xfuncname \
 tailored_hooks=
 sample_hooks=
 
-for hook in commit-msg pre-commit; do
+for hook in commit-msg pre-commit prepare-commit-msg; do
     cmp -- build-aux/git-hooks/$hook "$hooks/$hook" >/dev/null 2>&1 ||
        tailored_hooks="$tailored_hooks $hook"
 done
diff --git a/build-aux/git-hooks/prepare-commit-msg 
b/build-aux/git-hooks/prepare-commit-msg
new file mode 100755
index 0000000..3562a80
--- /dev/null
+++ b/build-aux/git-hooks/prepare-commit-msg
@@ -0,0 +1,45 @@
+#!/bin/sh
+# Check the format of GNU Emacs change log entries.
+
+# Copyright 2019 Free Software Foundation, Inc.
+
+# This file is part of GNU Emacs.
+
+# GNU Emacs is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU Emacs is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
+
+COMMIT_MSG_FILE=$1
+COMMIT_SOURCE=$2
+SHA1=$3
+
+# Prefer gawk if available, as it handles NUL bytes properly.
+if type gawk >/dev/null 2>&1; then
+  awk=gawk
+else
+  awk=awk
+fi
+
+exec $awk '
+  # Catch the case when someone ran git-commit with -s option,
+  # which automatically adds Signed-off-by.
+  /^Signed-off-by: / {
+    print "'\''Signed-off-by:'\'' in commit message"
+    status = 1
+  }
+  END {
+    if (status != 0) {
+      print "Commit aborted; please see the file 'CONTRIBUTE'"
+    }
+    exit status
+  }
+' <"$COMMIT_MSG_FILE"
diff --git a/build-aux/make-info-dir b/build-aux/make-info-dir
index 2dcac87..51f384a 100755
--- a/build-aux/make-info-dir
+++ b/build-aux/make-info-dir
@@ -5,7 +5,6 @@
 ## Copyright (C) 2013-2019 Free Software Foundation, Inc.
 
 ## Author: Glenn Morris <address@hidden>
-## Maintainer: address@hidden
 
 ## This file is part of GNU Emacs.
 
diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi
index 518d157..6e16588 100644
--- a/doc/emacs/building.texi
+++ b/doc/emacs/building.texi
@@ -1521,6 +1521,12 @@ library lets Emacs properly set up the hyperlinks in the 
@file{*Help*}
 buffer).  To disable this feature, change the variable
 @code{help-enable-auto-load} to @code{nil}.
 
address@hidden help-enable-completion-auto-load
+Automatic loading also occurs when completing names for
address@hidden and @code{describe-function}, based on the
+prefix being completed.  To disable this feature, change the variable
address@hidden to @code{nil}.
+
 @vindex load-dangerous-libraries
 @cindex Lisp files byte-compiled by XEmacs
   By default, Emacs refuses to load compiled Lisp files which were
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi
index 8a8ac5d..bdd6dec 100644
--- a/doc/emacs/custom.texi
+++ b/doc/emacs/custom.texi
@@ -801,6 +801,7 @@ Its value is 70
   Automatically becomes buffer-local when set.
   This variable is safe as a file local variable if its value
   satisfies the predicate ‘integerp’.
+  Probably introduced at or before Emacs version 18.
 
 Documentation:
 Column beyond which automatic line-wrapping should happen.
diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi
index c1ad5b5..28bfa5b 100644
--- a/doc/emacs/programs.texi
+++ b/doc/emacs/programs.texi
@@ -1298,8 +1298,11 @@ count as blocks.
 @findex hs-show-block
 @findex hs-show-region
 @findex hs-hide-level
address@hidden hs-toggle-hiding
address@hidden hs-mouse-toggle-hiding
 @kindex C-c @@ C-h
 @kindex C-c @@ C-s
address@hidden C-c @@ C-c
 @kindex C-c @@ C-M-h
 @kindex C-c @@ C-M-s
 @kindex C-c @@ C-r
@@ -1312,7 +1315,7 @@ Hide the current block (@code{hs-hide-block}).
 @item C-c @@ C-s
 Show the current block (@code{hs-show-block}).
 @item C-c @@ C-c
address@hidden C-x @@ C-e
address@hidden C-c @@ C-e
 Either hide or show the current block (@code{hs-toggle-hiding}).
 @item S-mouse-2
 Toggle hiding for the block you click on (@code{hs-mouse-toggle-hiding}).
diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi
index 97f7fb9..2f9d898 100644
--- a/doc/lispref/functions.texi
+++ b/doc/lispref/functions.texi
@@ -1122,6 +1122,10 @@ a byte-code function object (@pxref{Byte Compilation}).
 When lexical binding is enabled, @var{function-object} is converted
 into a closure.  @xref{Closures}.
 @end itemize
+
+When @var{function-object} is a symbol and the code is byte compiled,
+the byte-compiler will warn if that function is not defined or might
+not be known at run time.
 @end defspec
 
 @cindex @samp{#'} syntax
diff --git a/doc/lispref/hooks.texi b/doc/lispref/hooks.texi
index 7199246..f775aa4 100644
--- a/doc/lispref/hooks.texi
+++ b/doc/lispref/hooks.texi
@@ -251,6 +251,7 @@ I thought did not need to be mentioned here:
 
 Lisp:
 after-load-functions
+after-set-visited-file-name-hook
 auto-coding-functions
 choose-completion-string-functions
 completing-read-function
diff --git a/doc/lispref/loading.texi b/doc/lispref/loading.texi
index 6f1213f..3261e6d 100644
--- a/doc/lispref/loading.texi
+++ b/doc/lispref/loading.texi
@@ -466,9 +466,11 @@ first call to the function automatically loads the proper 
library, in
 order to install the real definition and other associated code, then
 runs the real definition as if it had been loaded all along.
 Autoloading can also be triggered by looking up the documentation of
-the function or macro (@pxref{Documentation Basics}).
+the function or macro (@pxref{Documentation Basics}), and completion
+of variable and function names (@pxref{Autoload by Prefix} below).
 
 @menu
+* Autoload by Prefix:: Autoload by Prefix.
 * When to Autoload::   When to Use Autoload.
 @end menu
 
@@ -703,6 +705,25 @@ symbol's new function value.  If the value of the optional 
argument
 function, only a macro.
 @end defun
 
address@hidden Autoload by Prefix
address@hidden Autoload by Prefix
address@hidden autoload by prefix
+
address@hidden definition-prefixes
address@hidden register-definition-prefixes
address@hidden autoload-compute-prefixes
+During completion for the commands @code{describe-variable} and
address@hidden, Emacs will try to load files which may
+contain definitions matching the prefix being completed.  The variable
address@hidden holds a hashtable which maps a prefix to
+the corresponding list of files to load for it.  Entries to this
+mapping are added by calls to @code{register-definition-prefixes}
+which are generated by @code{update-file-autoloads}
+(@pxref{Autoload}).  Files which don't contain any definitions worth
+loading (test files, for examples), should set
address@hidden to @code{nil} as a file-local
+variable.
+
 @node When to Autoload
 @subsection When to Use Autoload
 @cindex autoload, when to use
diff --git a/doc/lispref/sequences.texi b/doc/lispref/sequences.texi
index a7f270c..4b67a5f 100644
--- a/doc/lispref/sequences.texi
+++ b/doc/lispref/sequences.texi
@@ -601,7 +601,7 @@ returned value is a list.
 @defun seq-mapn function &rest sequences
   This function returns the result of applying @var{function} to each
 element of @var{sequences}.  The arity (@pxref{What Is a Function,
-sub-arity}) of @var{function} must match the number of sequences.
+subr-arity}) of @var{function} must match the number of sequences.
 Mapping stops at the end of the shortest sequence, and the returned
 value is a list.
 
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi
index aca7d2f..932b7c8 100644
--- a/doc/lispref/variables.texi
+++ b/doc/lispref/variables.texi
@@ -2009,7 +2009,7 @@ all files in those directories.  The list in 
@var{variables} can be of
 one of the two forms: @code{(@var{major-mode} . @var{alist})} or
 @code{(@var{directory} . @var{list})}.  With the first form, if the
 file's buffer turns on a mode that is derived from @var{major-mode},
-then the all the variables in the associated @var{alist} are applied;
+then all the variables in the associated @var{alist} are applied;
 @var{alist} should be of the form @code{(@var{name} . @var{value})}.
 A special value @code{nil} for @var{major-mode} means the settings are
 applicable to any mode.  In @var{alist}, you can use a special
diff --git a/etc/NEWS b/etc/NEWS
index d70cda1..0641430 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -153,6 +153,12 @@ after Emacs has finished initialization and is ready for 
use.
 emacs.service file to eg "~/.config/systemd/user/", you will need to copy
 the new version of the file again.)
 
++++
+** New option 'help-enable-completion-auto-load'.
+This allows disabling the new feature introduced in Emacs 26.1 which
+loads files during completion of 'C-h f' and 'C-h v' according to
+'definition-prefixes'.
+
 
 * Changes in Emacs 27.1
 
@@ -1321,6 +1327,12 @@ when given in a string.  Previously, '(any "\x80-\xff")' 
would match
 characters U+0080...U+00FF.  Now the expression matches raw bytes in
 the 128...255 range, as expected.
 
+*** The rx 'or' and 'seq' forms no longer require any arguments.
+(or) produces a regexp that never matches anything, while (seq)
+matches the empty string, each being an identity for the operation.
+This also works for their aliases: '|' for 'or'; ':', 'and' and
+'sequence' for 'seq'.
+
 ** Frames
 
 +++
@@ -1443,8 +1455,7 @@ When set to a non-nil value, buffers in Auto Revert mode 
are no longer
 polled for changes periodically.  This reduces the power consumption
 of an idle Emacs, but may fail on some network file systems; set
 'auto-revert-notify-exclude-dir-regexp' to match files where
-notification is not supported.  The new variable currently has no
-effect in 'global-auto-revert-mode'.  The default value is nil.
+notification is not supported.  The default value is nil.
 
 *** New variable 'buffer-auto-revert-by-notification'
 A major mode can declare that notification on the buffer's default
diff --git a/etc/refcards/Makefile b/etc/refcards/Makefile
index 469e8fa..0ba6db5 100644
--- a/etc/refcards/Makefile
+++ b/etc/refcards/Makefile
@@ -40,7 +40,7 @@ PDF_CZECH = \
 PDF_FRENCH = \
        fr-dired-ref.pdf \
        fr-refcard.pdf \
-       fr-survival.pdf \
+       fr-survival.pdf
 
 PDF_GERMAN = de-refcard.pdf
 
diff --git a/etc/tutorials/TUTORIAL.translators 
b/etc/tutorials/TUTORIAL.translators
index 2747d39..b6b9578 100644
--- a/etc/tutorials/TUTORIAL.translators
+++ b/etc/tutorials/TUTORIAL.translators
@@ -41,8 +41,8 @@ Maintainer: Alfredo Finelli <address@hidden>
            Italian GNU Translation Group <address@hidden>
 
 * TUTORIAL.ja:
-Author:     Kenichi Handa <address@hidden>
-Maintainer: Kenichi Handa <address@hidden>
+Author:     Kenichi Handa <address@hidden>
+Maintainer: Kenichi Handa <address@hidden>
 
 * TUTORIAL.ko:
 Author:     Koaunghi Un <address@hidden>
@@ -94,4 +94,3 @@ Maintainer: Chao-Hong Liu <address@hidden>
 ;;; Local Variables:
 ;;; coding: utf-8
 ;;; End:
-
diff --git a/lib-src/etags.c b/lib-src/etags.c
index 949ab5a..6bd04d1 100644
--- a/lib-src/etags.c
+++ b/lib-src/etags.c
@@ -4282,7 +4282,7 @@ Yacc_entries (FILE *inf)
   while (perhaps_more_input (file_pointer)                             \
         && (readline (&(line_buffer), file_pointer),                   \
             (char_pointer) = (line_buffer).buffer,                     \
-            true))                                                     \
+            true))
 
 #define LOOKING_AT(cp, kw)  /* kw is the keyword, a literal string */  \
   ((assert ("" kw), true)   /* syntax error if not a literal string */ \
diff --git a/lisp/abbrev.el b/lisp/abbrev.el
index 3c88ec6..be19da5 100644
--- a/lisp/abbrev.el
+++ b/lisp/abbrev.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1985-1987, 1992, 2001-2019 Free Software Foundation,
 ;; Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: abbrev convenience
 ;; Package: emacs
 
diff --git a/lisp/align.el b/lisp/align.el
index 443237b..aeb845a 100644
--- a/lisp/align.el
+++ b/lisp/align.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1999-2019 Free Software Foundation, Inc.
 
 ;; Author: John Wiegley <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: convenience languages lisp
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/allout-widgets.el b/lisp/allout-widgets.el
index 67fce32..fd04c31 100644
--- a/lisp/allout-widgets.el
+++ b/lisp/allout-widgets.el
@@ -70,12 +70,7 @@
 (require 'allout)
 (require 'widget)
 (require 'wid-edit)
-
-(eval-when-compile
-  (progn
-    (require 'overlay)
-    (require 'cl)
-    ))
+(eval-when-compile (require 'cl-lib))
 
 ;;;_ : internal variables needed before user-customization variables
 ;;; In order to enable activation of allout-widgets-mode via customization,
@@ -960,7 +955,7 @@ posting threshold criteria."
         (when changes-pending
           (while changes-record
             (setq entry (pop changes-record))
-            (case (car entry)
+            (pcase (car entry)
               (:exposed (push entry exposures))
               (:added (push entry additions))
               (:deleted (push entry deletions))
@@ -1378,34 +1373,34 @@ FROM and TO must be in increasing order, as must be the 
pairs in RANGES."
 
     ;; fresh:
     (setq ranges nil)
-    (assert (equal (funcall try 3 5) '(nil ((3 5)))))
+    (cl-assert (equal (funcall try 3 5) '(nil ((3 5)))))
     ;; add range at end:
-    (assert (equal (funcall try 10 12) '(nil ((3 5) (10 12)))))
+    (cl-assert (equal (funcall try 10 12) '(nil ((3 5) (10 12)))))
     ;; add range at beginning:
-    (assert (equal (funcall try 1 2) '(nil ((1 2) (3 5) (10 12)))))
+    (cl-assert (equal (funcall try 1 2) '(nil ((1 2) (3 5) (10 12)))))
     ;; insert range somewhere in the middle:
-    (assert (equal (funcall try 7 9) '(nil ((1 2) (3 5) (7 9) (10 12)))))
+    (cl-assert (equal (funcall try 7 9) '(nil ((1 2) (3 5) (7 9) (10 12)))))
     ;; consolidate some:
-    (assert (equal (funcall try 5 8) '(t ((1 2) (3 9) (10 12)))))
+    (cl-assert (equal (funcall try 5 8) '(t ((1 2) (3 9) (10 12)))))
     ;; add more:
-    (assert (equal (funcall try 15 17) '(nil ((1 2) (3 9) (10 12) (15 17)))))
+    (cl-assert (equal (funcall try 15 17) '(nil ((1 2) (3 9) (10 12) (15 
17)))))
     ;; add more:
-    (assert (equal (funcall try 20 22)
+    (cl-assert (equal (funcall try 20 22)
                    '(nil ((1 2) (3 9) (10 12) (15 17) (20 22)))))
     ;; encompass more:
-    (assert (equal (funcall try 4 11) '(t ((1 2) (3 12) (15 17) (20 22)))))
+    (cl-assert (equal (funcall try 4 11) '(t ((1 2) (3 12) (15 17) (20 22)))))
     ;; encompass all:
-    (assert (equal (funcall try 2 25) '(t ((1 25)))))
+    (cl-assert (equal (funcall try 2 25) '(t ((1 25)))))
 
     ;; fresh slate:
     (setq ranges nil)
-    (assert (equal (funcall try 20 25) '(nil ((20 25)))))
-    (assert (equal (funcall try 30 35) '(nil ((20 25) (30 35)))))
-    (assert (equal (funcall try 26 28) '(nil ((20 25) (26 28) (30 35)))))
-    (assert (equal (funcall try 15 20) '(t ((15 25) (26 28) (30 35)))))
-    (assert (equal (funcall try 10 30) '(t ((10 35)))))
-    (assert (equal (funcall try 5 6) '(nil ((5 6) (10 35)))))
-    (assert (equal (funcall try 2 100) '(t ((2 100)))))
+    (cl-assert (equal (funcall try 20 25) '(nil ((20 25)))))
+    (cl-assert (equal (funcall try 30 35) '(nil ((20 25) (30 35)))))
+    (cl-assert (equal (funcall try 26 28) '(nil ((20 25) (26 28) (30 35)))))
+    (cl-assert (equal (funcall try 15 20) '(t ((15 25) (26 28) (30 35)))))
+    (cl-assert (equal (funcall try 10 30) '(t ((10 35)))))
+    (cl-assert (equal (funcall try 5 6) '(nil ((5 6) (10 35)))))
+    (cl-assert (equal (funcall try 2 100) '(t ((2 100)))))
 
     (setq ranges nil)
     ))
diff --git a/lisp/allout.el b/lisp/allout.el
index b3b87e5..0760855 100644
--- a/lisp/allout.el
+++ b/lisp/allout.el
@@ -79,12 +79,7 @@
 
 ;;;_* Dependency loads
 (require 'overlay)
-(eval-when-compile
-  ;; `cl' is required for `assert'.  `assert' is not covered by a standard
-  ;; autoload, but it is a macro, so that eval-when-compile is sufficient
-  ;; to byte-compile it in, or to do the require when the buffer evalled.
-  (require 'cl)
-  )
+(eval-when-compile (require 'cl-lib))
 
 ;;;_* USER CUSTOMIZATION VARIABLES:
 
@@ -6122,13 +6117,13 @@ signal."
                                                           (point-max))))
     ;; determine key mode and, if keypair, recipients:
     (setq recipients
-          (case keypair-mode
+          (pcase keypair-mode
 
-            (decrypting nil)
+            ('decrypting nil)
 
-            (default (if encrypt-to (epg-list-keys epg-context encrypt-to)))
+            ('default (if encrypt-to (epg-list-keys epg-context encrypt-to)))
 
-            ((prompt prompt-save)
+            ((or 'prompt 'prompt-save)
              (save-window-excursion
                (epa-select-keys epg-context keypair-message)))))
 
@@ -6786,6 +6781,7 @@ To ignore intangibility, bind 
`inhibit-point-motion-hooks' to t."
 (defvar allout-tests-locally-true nil
   "Fodder for allout resumptions tests -- defvar just for byte compiler.")
 (defun allout-test-resumptions ()
+  ;; FIXME: Use ERT.
   "Exercise allout resumptions."
   ;; for each resumption case, we also test that the right local/global
   ;; scopes are affected during resumption effects:
@@ -6794,48 +6790,48 @@ To ignore intangibility, bind 
`inhibit-point-motion-hooks' to t."
   (with-temp-buffer
     (allout-tests-obliterate-variable 'allout-tests-globally-unbound)
     (allout-add-resumptions '(allout-tests-globally-unbound t))
-    (assert (not (default-boundp 'allout-tests-globally-unbound)))
-    (assert (local-variable-p 'allout-tests-globally-unbound (current-buffer)))
-    (assert (boundp 'allout-tests-globally-unbound))
-    (assert (equal allout-tests-globally-unbound t))
+    (cl-assert (not (default-boundp 'allout-tests-globally-unbound)))
+    (cl-assert (local-variable-p 'allout-tests-globally-unbound 
(current-buffer)))
+    (cl-assert (boundp 'allout-tests-globally-unbound))
+    (cl-assert (equal allout-tests-globally-unbound t))
     (allout-do-resumptions)
-    (assert (not (local-variable-p 'allout-tests-globally-unbound
+    (cl-assert (not (local-variable-p 'allout-tests-globally-unbound
                                    (current-buffer))))
-    (assert (not (boundp 'allout-tests-globally-unbound))))
+    (cl-assert (not (boundp 'allout-tests-globally-unbound))))
 
   ;; ensure that variable with prior global value is resumed
   (with-temp-buffer
     (allout-tests-obliterate-variable 'allout-tests-globally-true)
     (setq allout-tests-globally-true t)
     (allout-add-resumptions '(allout-tests-globally-true nil))
-    (assert (equal (default-value 'allout-tests-globally-true) t))
-    (assert (local-variable-p 'allout-tests-globally-true (current-buffer)))
-    (assert (equal allout-tests-globally-true nil))
+    (cl-assert (equal (default-value 'allout-tests-globally-true) t))
+    (cl-assert (local-variable-p 'allout-tests-globally-true (current-buffer)))
+    (cl-assert (equal allout-tests-globally-true nil))
     (allout-do-resumptions)
-    (assert (not (local-variable-p 'allout-tests-globally-true
+    (cl-assert (not (local-variable-p 'allout-tests-globally-true
                                    (current-buffer))))
-    (assert (boundp 'allout-tests-globally-true))
-    (assert (equal allout-tests-globally-true t)))
+    (cl-assert (boundp 'allout-tests-globally-true))
+    (cl-assert (equal allout-tests-globally-true t)))
 
   ;; ensure that prior local value is resumed
   (with-temp-buffer
     (allout-tests-obliterate-variable 'allout-tests-locally-true)
     (set (make-local-variable 'allout-tests-locally-true) t)
-    (assert (not (default-boundp 'allout-tests-locally-true))
+    (cl-assert (not (default-boundp 'allout-tests-locally-true))
             nil (concat "Test setup mistake -- variable supposed to"
                         " not have global binding, but it does."))
-    (assert (local-variable-p 'allout-tests-locally-true (current-buffer))
+    (cl-assert (local-variable-p 'allout-tests-locally-true (current-buffer))
             nil (concat "Test setup mistake -- variable supposed to have"
                         " local binding, but it lacks one."))
     (allout-add-resumptions '(allout-tests-locally-true nil))
-    (assert (not (default-boundp 'allout-tests-locally-true)))
-    (assert (local-variable-p 'allout-tests-locally-true (current-buffer)))
-    (assert (equal allout-tests-locally-true nil))
+    (cl-assert (not (default-boundp 'allout-tests-locally-true)))
+    (cl-assert (local-variable-p 'allout-tests-locally-true (current-buffer)))
+    (cl-assert (equal allout-tests-locally-true nil))
     (allout-do-resumptions)
-    (assert (boundp 'allout-tests-locally-true))
-    (assert (local-variable-p 'allout-tests-locally-true (current-buffer)))
-    (assert (equal allout-tests-locally-true t))
-    (assert (not (default-boundp 'allout-tests-locally-true))))
+    (cl-assert (boundp 'allout-tests-locally-true))
+    (cl-assert (local-variable-p 'allout-tests-locally-true (current-buffer)))
+    (cl-assert (equal allout-tests-locally-true t))
+    (cl-assert (not (default-boundp 'allout-tests-locally-true))))
 
   ;; ensure that last of multiple resumptions holds, for various scopes.
   (with-temp-buffer
@@ -6851,27 +6847,27 @@ To ignore intangibility, bind 
`inhibit-point-motion-hooks' to t."
                             '(allout-tests-globally-true 3)
                             '(allout-tests-locally-true 4))
     ;; reestablish many of the basic conditions are maintained after re-add:
-    (assert (not (default-boundp 'allout-tests-globally-unbound)))
-    (assert (local-variable-p 'allout-tests-globally-unbound (current-buffer)))
-    (assert (equal allout-tests-globally-unbound 2))
-    (assert (default-boundp 'allout-tests-globally-true))
-    (assert (local-variable-p 'allout-tests-globally-true (current-buffer)))
-    (assert (equal allout-tests-globally-true 3))
-    (assert (not (default-boundp 'allout-tests-locally-true)))
-    (assert (local-variable-p 'allout-tests-locally-true (current-buffer)))
-    (assert (equal allout-tests-locally-true 4))
+    (cl-assert (not (default-boundp 'allout-tests-globally-unbound)))
+    (cl-assert (local-variable-p 'allout-tests-globally-unbound 
(current-buffer)))
+    (cl-assert (equal allout-tests-globally-unbound 2))
+    (cl-assert (default-boundp 'allout-tests-globally-true))
+    (cl-assert (local-variable-p 'allout-tests-globally-true (current-buffer)))
+    (cl-assert (equal allout-tests-globally-true 3))
+    (cl-assert (not (default-boundp 'allout-tests-locally-true)))
+    (cl-assert (local-variable-p 'allout-tests-locally-true (current-buffer)))
+    (cl-assert (equal allout-tests-locally-true 4))
     (allout-do-resumptions)
-    (assert (not (local-variable-p 'allout-tests-globally-unbound
+    (cl-assert (not (local-variable-p 'allout-tests-globally-unbound
                                    (current-buffer))))
-    (assert (not (boundp 'allout-tests-globally-unbound)))
-    (assert (not (local-variable-p 'allout-tests-globally-true
+    (cl-assert (not (boundp 'allout-tests-globally-unbound)))
+    (cl-assert (not (local-variable-p 'allout-tests-globally-true
                                    (current-buffer))))
-    (assert (boundp 'allout-tests-globally-true))
-    (assert (equal allout-tests-globally-true t))
-    (assert (boundp 'allout-tests-locally-true))
-    (assert (local-variable-p 'allout-tests-locally-true (current-buffer)))
-    (assert (equal allout-tests-locally-true t))
-    (assert (not (default-boundp 'allout-tests-locally-true))))
+    (cl-assert (boundp 'allout-tests-globally-true))
+    (cl-assert (equal allout-tests-globally-true t))
+    (cl-assert (boundp 'allout-tests-locally-true))
+    (cl-assert (local-variable-p 'allout-tests-locally-true (current-buffer)))
+    (cl-assert (equal allout-tests-locally-true t))
+    (cl-assert (not (default-boundp 'allout-tests-locally-true))))
 
   ;; ensure that deliberately unbinding registered variables doesn't foul 
things
   (with-temp-buffer
diff --git a/lisp/array.el b/lisp/array.el
index 2fffe01..28635d1 100644
--- a/lisp/array.el
+++ b/lisp/array.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1987, 2000-2019 Free Software Foundation, Inc.
 
 ;; Author: David M. Brown
-;; Maintainer: address@hidden
 ;; Keywords: extensions
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/autoinsert.el b/lisp/autoinsert.el
index f7ecfe2..c2ebea7 100644
--- a/lisp/autoinsert.el
+++ b/lisp/autoinsert.el
@@ -6,7 +6,6 @@
 ;; Author: Charlie Martin <address@hidden>
 ;; Adapted-By: Daniel Pfeiffer <address@hidden>
 ;; Keywords: convenience
-;; Maintainer: address@hidden
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/autorevert.el b/lisp/autorevert.el
index 197a2bf..2de855b 100644
--- a/lisp/autorevert.el
+++ b/lisp/autorevert.el
@@ -312,10 +312,7 @@ when those files are modified from another computer.
 
 When nil, buffers in Auto-Revert Mode will always be polled for
 changes to their files on disk every `auto-revert-interval'
-seconds, in addition to using notification for those files.
-
-In Global Auto-Revert Mode, polling is always done regardless of
-the value of this variable."
+seconds, in addition to using notification for those files."
   :group 'auto-revert
   :type 'boolean
   :set (lambda (variable value)
@@ -335,6 +332,9 @@ buffers to this list.
 The timer function `auto-revert-buffers' is responsible for purging
 the list of old buffers.")
 
+(defvar-local auto-revert--global-mode nil
+  "Non-nil if buffer is handled by Global Auto-Revert mode.")
+
 (defvar auto-revert-remaining-buffers ()
   "Buffers not checked when user input stopped execution.")
 
@@ -501,34 +501,107 @@ specifies in the mode line."
   :global t :group 'auto-revert :lighter global-auto-revert-mode-text
   (auto-revert-set-timer)
   (if global-auto-revert-mode
-      (auto-revert-buffers)
+      ;; Turn global-auto-revert-mode ON.
+      (progn
+        (dolist (buf (buffer-list))
+          (with-current-buffer buf
+            (auto-revert--global-add-current-buffer)))
+        ;; Make sure future buffers are added as well.
+        (add-hook 'find-file-hook #'auto-revert--global-adopt-current-buffer)
+        (add-hook 'after-set-visited-file-name-hook
+                  #'auto-revert--global-set-visited-file-name)
+        ;; To track non-file buffers, we need to listen in to buffer
+        ;; creation in general.  Listening to major-mode changes is
+        ;; suitable, since we then know whether it's a mode that is tracked.
+        (when global-auto-revert-non-file-buffers
+          (add-hook 'after-change-major-mode-hook
+                    #'auto-revert--global-adopt-current-buffer))
+        (auto-revert-buffers))
+    ;; Turn global-auto-revert-mode OFF.
+    (remove-hook 'after-change-major-mode-hook
+                 #'auto-revert--global-adopt-current-buffer)
+    (remove-hook 'after-set-visited-file-name-hook
+                 #'auto-revert--global-set-visited-file-name)
+    (remove-hook 'find-file-hook #'auto-revert--global-adopt-current-buffer)
     (dolist (buf (buffer-list))
       (with-current-buffer buf
-        (when (and auto-revert-notify-watch-descriptor
-                   (not (memq buf auto-revert-buffer-list)))
-         (auto-revert-notify-rm-watch))))))
+        (when auto-revert--global-mode
+          (setq auto-revert--global-mode nil)
+          (when (and auto-revert-notify-watch-descriptor
+                     (not (or auto-revert-mode auto-revert-tail-mode)))
+           (auto-revert-notify-rm-watch)))))))
+
+(defun auto-revert--global-add-current-buffer ()
+  "Set current buffer to be tracked by Global Auto-Revert if appropriate."
+  (when (and (not auto-revert--global-mode)
+             (or buffer-file-name
+                 (and global-auto-revert-non-file-buffers
+                      (not (string-prefix-p " " (buffer-name)))
+                      ;; Any non-file buffer must have a custom
+                      ;; `buffer-stale-function' to be tracked, since
+                      ;; we wouldn't know when to revert it otherwise.
+                      (not (eq buffer-stale-function
+                               #'buffer-stale--default-function))))
+             (not (memq 'major-mode global-auto-revert-ignore-modes))
+             (not global-auto-revert-ignore-buffer))
+    (setq auto-revert--global-mode t)))
+
+(defun auto-revert--global-adopt-current-buffer ()
+  "Consider tracking current buffer in a running Global Auto-Revert mode."
+  (auto-revert--global-add-current-buffer)
+  (auto-revert-set-timer))
+
+(defun auto-revert--global-set-visited-file-name ()
+  "Update Global Auto-Revert management of the current buffer.
+Called after `set-visited-file-name'."
+  ;; Remove any existing notifier first so that we don't track the
+  ;; wrong file in case the file name was changed.
+  (when auto-revert-notify-watch-descriptor
+    (auto-revert-notify-rm-watch))
+  (auto-revert--global-adopt-current-buffer))
 
 (defun auto-revert--polled-buffers ()
   "List of buffers that need to be polled."
-  (cond (global-auto-revert-mode (buffer-list))
+  (cond (global-auto-revert-mode
+         (mapcan (lambda (buffer)
+                   (and (not (and auto-revert-avoid-polling
+                                  (buffer-local-value
+                                   'auto-revert-notify-watch-descriptor
+                                   buffer)))
+                        (or (buffer-local-value
+                             'auto-revert--global-mode buffer)
+                            (buffer-local-value 'auto-revert-mode buffer)
+                            (buffer-local-value 'auto-revert-tail-mode buffer))
+                        (list buffer)))
+                 (buffer-list)))
         (auto-revert-avoid-polling
          (mapcan (lambda (buffer)
-                     (and (not (buffer-local-value
-                                'auto-revert-notify-watch-descriptor buffer))
-                          (list buffer)))
-                   auto-revert-buffer-list))
+                   (and (not (buffer-local-value
+                              'auto-revert-notify-watch-descriptor buffer))
+                        (list buffer)))
+                 auto-revert-buffer-list))
         (t auto-revert-buffer-list)))
 
 ;; Same as above in a boolean context, but cheaper.
 (defun auto-revert--need-polling-p ()
   "Whether periodic polling is required."
-  (or global-auto-revert-mode
-      (if auto-revert-avoid-polling
-          (not (cl-every (lambda (buffer)
-                           (buffer-local-value
-                            'auto-revert-notify-watch-descriptor buffer))
-                         auto-revert-buffer-list))
-        auto-revert-buffer-list)))
+  (cond (global-auto-revert-mode
+         (or (not auto-revert-avoid-polling)
+             (cl-some
+              (lambda (buffer)
+                (and (not (buffer-local-value
+                           'auto-revert-notify-watch-descriptor buffer))
+                     (or (buffer-local-value 'auto-revert--global-mode buffer)
+                         (buffer-local-value 'auto-revert-mode buffer)
+                         (buffer-local-value 'auto-revert-tail-mode buffer))))
+              (buffer-list))))
+        (auto-revert-avoid-polling
+         (not (cl-every
+               (lambda (buffer)
+                 (buffer-local-value
+                  'auto-revert-notify-watch-descriptor buffer))
+               auto-revert-buffer-list)))
+        (t auto-revert-buffer-list)))
 
 (defun auto-revert-set-timer ()
   "Restart or cancel the timer used by Auto-Revert Mode.
@@ -652,9 +725,8 @@ system.")
                      (null buffer-file-name))
                 (auto-revert-notify-rm-watch)
                 ;; Restart the timer if it wasn't running.
-                (when (and (memq buffer auto-revert-buffer-list)
-                           (not auto-revert-timer))
-                  (auto-revert-set-timer)))))
+                (unless auto-revert-timer)
+                  (auto-revert-set-timer))))
 
         ;; Loop over all buffers, in order to find the intended one.
         (cl-dolist (buffer buffers)
@@ -697,12 +769,10 @@ If the buffer needs to be reverted, do it now."
         (auto-revert-handler)))))
 
 (defun auto-revert-active-p ()
-  "Check if auto-revert is active (in current buffer or globally)."
+  "Check if auto-revert is active in current buffer."
   (or auto-revert-mode
       auto-revert-tail-mode
-      (and global-auto-revert-mode
-           (not global-auto-revert-ignore-buffer)
-           (not (memq major-mode global-auto-revert-ignore-modes)))))
+      auto-revert--global-mode))
 
 (defun auto-revert-handler ()
   "Revert current buffer, if appropriate.
diff --git a/lisp/bindings.el b/lisp/bindings.el
index 744bcc3..4f09d58 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1985-1987, 1992-1996, 1999-2019 Free Software
 ;; Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: internal
 ;; Package: emacs
 
diff --git a/lisp/bs.el b/lisp/bs.el
index cd9524a..c564da2 100644
--- a/lisp/bs.el
+++ b/lisp/bs.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 1998-2019 Free Software Foundation, Inc.
 ;; Author: Olaf Sylvester <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: convenience
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el
index 5f88986..c8cd25c 100644
--- a/lisp/buff-menu.el
+++ b/lisp/buff-menu.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1985-1987, 1993-1995, 2000-2019 Free Software
 ;; Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: convenience
 ;; Package: emacs
 
diff --git a/lisp/calendar/time-date.el b/lisp/calendar/time-date.el
index decb21e..2c0280c 100644
--- a/lisp/calendar/time-date.el
+++ b/lisp/calendar/time-date.el
@@ -156,7 +156,7 @@ If DATE lacks timezone information, GMT is assumed."
      (let ((overflow-error '(error "Specified time is not representable")))
        (if (equal err overflow-error)
           (signal (car err) (cdr err))
-        (condition-case-unless-debug err
+        (condition-case err
             (encode-time (parse-time-string
                           (timezone-make-date-arpa-standard date)))
           (error
diff --git a/lisp/case-table.el b/lisp/case-table.el
index c27e772..7474d63 100644
--- a/lisp/case-table.el
+++ b/lisp/case-table.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1988, 1994, 2001-2019 Free Software Foundation, Inc.
 
 ;; Author: Howard Gayle
-;; Maintainer: address@hidden
 ;; Keywords: i18n
 ;; Package: emacs
 
diff --git a/lisp/cdl.el b/lisp/cdl.el
index 752e59b..36f72ef0 100644
--- a/lisp/cdl.el
+++ b/lisp/cdl.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1993, 2001-2019 Free Software Foundation, Inc.
 
 ;; Author: Ata Etemadi <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: data
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/cedet/cedet.el b/lisp/cedet/cedet.el
index b3d4a5d..9260cfb 100644
--- a/lisp/cedet/cedet.el
+++ b/lisp/cedet/cedet.el
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2002-2019 Free Software Foundation, Inc.
 
 ;; Author: David Ponce <address@hidden>
-;; Maintainer: Eric M. Ludlam  <address@hidden>
+;; Maintainer: Eric M. Ludlam <address@hidden>
 ;; Version: 2.0
 ;; Keywords: OO, lisp
 
diff --git a/lisp/cedet/semantic/imenu.el b/lisp/cedet/semantic/imenu.el
index 0fb9eca..15ab50c 100644
--- a/lisp/cedet/semantic/imenu.el
+++ b/lisp/cedet/semantic/imenu.el
@@ -4,7 +4,7 @@
 ;; Foundation, Inc.
 
 ;; Author: Eric M. Ludlam <address@hidden>
-;; Maintainer: Eric Ludlam
+;; Maintainer: Eric M. Ludlam <address@hidden>
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/cedet/semantic/senator.el b/lisp/cedet/semantic/senator.el
index 2462662..79bb4b2 100644
--- a/lisp/cedet/semantic/senator.el
+++ b/lisp/cedet/semantic/senator.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2000-2019 Free Software Foundation, Inc.
 
 ;; Author: David Ponce <address@hidden>
-;; Maintainer: address@hidden
 ;; Created: 10 Nov 2000
 ;; Keywords: syntax
 
diff --git a/lisp/cedet/semantic/wisent/python.el 
b/lisp/cedet/semantic/wisent/python.el
index c530329..c5849ff 100644
--- a/lisp/cedet/semantic/wisent/python.el
+++ b/lisp/cedet/semantic/wisent/python.el
@@ -2,8 +2,8 @@
 
 ;; Copyright (C) 2002, 2004, 2006-2019 Free Software Foundation, Inc.
 
-;; Author: Richard Kim  <address@hidden>
-;; Maintainer: Richard Kim  <address@hidden>
+;; Author: Richard Kim <address@hidden>
+;; Maintainer: Richard Kim <address@hidden>
 ;; Created: June 2002
 ;; Keywords: syntax
 
diff --git a/lisp/cedet/srecode/insert.el b/lisp/cedet/srecode/insert.el
index 26af2ff..a7445ea 100644
--- a/lisp/cedet/srecode/insert.el
+++ b/lisp/cedet/srecode/insert.el
@@ -1,4 +1,4 @@
-;;; srecode/insert.el --- Insert srecode templates to an output stream.
+;;; srecode/insert.el --- Insert srecode templates to an output stream  -*- 
lexical-binding:t -*-
 
 ;; Copyright (C) 2005, 2007-2019 Free Software Foundation, Inc.
 
@@ -26,9 +26,6 @@
 ;; Manage the insertion process for a template.
 ;;
 
-(eval-when-compile
-  (require 'cl)) ;; for `lexical-let'
-
 (require 'srecode/compile)
 (require 'srecode/find)
 (require 'srecode/dictionary)
@@ -1049,21 +1046,20 @@ template where a ^ inserter occurs."
   ;; which implements the wrap insertion behavior in FUNCTION. The
   ;; maximum valid nesting depth is just the current depth + 1.
   (let ((srecode-template-inserter-point-override
-        (lexical-let ((inserter1 sti))
-          (cons
-           ;; DEPTH
-           (+ (length (oref-default 'srecode-template active)) 1)
-           ;; FUNCTION
-           (lambda (dict)
-             (let ((srecode-template-inserter-point-override nil))
-               (if (srecode-dictionary-lookup-name
-                    dict (oref inserter1 :object-name))
-                   ;; Insert our sectional part with looping.
-                   (srecode-insert-method-helper
-                    inserter1 dict 'template)
-                 ;; Insert our sectional part just once.
-                 (srecode-insert-subtemplate
-                  inserter1 dict 'template))))))))
+        (cons
+         ;; DEPTH
+         (+ (length (oref-default 'srecode-template active)) 1)
+         ;; FUNCTION
+         (lambda (dict)
+           (let ((srecode-template-inserter-point-override nil))
+             (if (srecode-dictionary-lookup-name
+                  dict (oref sti :object-name))
+                 ;; Insert our sectional part with looping.
+                 (srecode-insert-method-helper
+                  sti dict 'template)
+               ;; Insert our sectional part just once.
+               (srecode-insert-subtemplate
+                sti dict 'template)))))))
     ;; Do a regular insertion for an include, but with our override in
     ;; place.
     (cl-call-next-method)))
diff --git a/lisp/char-fold.el b/lisp/char-fold.el
index e61bc3e..426b1a9 100644
--- a/lisp/char-fold.el
+++ b/lisp/char-fold.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 2015-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: matching
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/chistory.el b/lisp/chistory.el
index 59bdc00..9c29bb7 100644
--- a/lisp/chistory.el
+++ b/lisp/chistory.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1985, 2001-2019 Free Software Foundation, Inc.
 
 ;; Author: K. Shane Hartman
-;; Maintainer: address@hidden
 ;; Keywords: convenience
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/cmuscheme.el b/lisp/cmuscheme.el
index ed6f1bf..f949a8c 100644
--- a/lisp/cmuscheme.el
+++ b/lisp/cmuscheme.el
@@ -4,7 +4,6 @@
 ;; Inc.
 
 ;; Author: Olin Shivers <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: processes, lisp
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/comint.el b/lisp/comint.el
index d21cc13..3939371 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -4,7 +4,6 @@
 
 ;; Author: Olin Shivers <address@hidden>
 ;;     Simon Marshall <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: processes
 ;; Package: emacs
 
diff --git a/lisp/completion.el b/lisp/completion.el
index 89285c7..ff392dd 100644
--- a/lisp/completion.el
+++ b/lisp/completion.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1990, 1993, 1995, 1997, 2001-2019 Free Software
 ;; Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: abbrev convenience
 ;; Author: Jim Salem <address@hidden> of Thinking Machines Inc.
 ;;  (ideas suggested by Brewster Kahle)
diff --git a/lisp/composite.el b/lisp/composite.el
index d2df3d1..87f5630 100644
--- a/lisp/composite.el
+++ b/lisp/composite.el
@@ -7,7 +7,7 @@
 ;;   National Institute of Advanced Industrial Science and Technology (AIST)
 ;;   Registration Number H14PRO021
 
-;; Author: Kenichi HANDA <address@hidden>
+;; Author: Kenichi Handa <address@hidden>
 ;; (according to ack.texi)
 ;; Keywords: mule, multilingual, character composition
 ;; Package: emacs
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 6d47e60..e65f19d 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1996-1997, 1999-2019 Free Software Foundation, Inc.
 ;;
 ;; Author: Per Abrahamsen <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: help, faces
 ;; Package: emacs
 
diff --git a/lisp/cus-theme.el b/lisp/cus-theme.el
index bc9d1d4..9846aa8 100644
--- a/lisp/cus-theme.el
+++ b/lisp/cus-theme.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2001-2019 Free Software Foundation, Inc.
 ;;
 ;; Author: Alex Schroeder <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: help, faces
 ;; Package: emacs
 
diff --git a/lisp/custom.el b/lisp/custom.el
index 29bf9e5..e2bf871 100644
--- a/lisp/custom.el
+++ b/lisp/custom.el
@@ -4,7 +4,6 @@
 ;; Inc.
 ;;
 ;; Author: Per Abrahamsen <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: help, faces
 ;; Package: emacs
 
diff --git a/lisp/dabbrev.el b/lisp/dabbrev.el
index 2159f96..aa22d6c 100644
--- a/lisp/dabbrev.el
+++ b/lisp/dabbrev.el
@@ -6,7 +6,6 @@
 ;; Author: Don Morrison
 ;;     Lars Lindberg
 ;; (according to ack.texi)
-;; Maintainer: address@hidden
 ;; Created: 16 Mars 1992
 ;; Lindberg's last update version: 5.7
 ;; Keywords: abbrev expand completion convenience
@@ -238,8 +237,7 @@ See also `dabbrev-ignored-buffer-names'."
   :version "21.1")
 
 (defcustom dabbrev-check-other-buffers t
-  "Should \\[dabbrev-expand] look in other buffers?\
-
+  "Should \\[dabbrev-expand] look in other buffers?
 nil: Don't look in other buffers.
 t: Also look for expansions in the buffers pointed out by
    `dabbrev-select-buffers-function'.
diff --git a/lisp/delim-col.el b/lisp/delim-col.el
index a968b32..4b4fc7f 100644
--- a/lisp/delim-col.el
+++ b/lisp/delim-col.el
@@ -1,12 +1,12 @@
-;;; delim-col.el --- prettify all columns in a region or rectangle
+;;; delim-col.el --- prettify all columns in a region or rectangle  -*- 
lexical-binding: t; -*-
 
 ;; Copyright (C) 1999-2019 Free Software Foundation, Inc.
 
 ;; Author: Vinicius Jose Latorre <address@hidden>
 ;; Maintainer: Vinicius Jose Latorre <address@hidden>
 ;; Version: 2.1
-;; Keywords: internal
-;; X-URL: http://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre
+;; Keywords: convenience text
+;; X-URL: https://www.emacswiki.org/emacs/ViniciusJoseLatorre
 
 ;; This file is part of GNU Emacs.
 
@@ -27,11 +27,6 @@
 
 ;; delim-col helps to prettify columns in a text region or rectangle.
 ;;
-;; To use it, make sure that this file is in load-path and insert in your
-;; .emacs:
-;;
-;;    (require 'delim-col)
-;;
 ;; If you have, for example, the following columns:
 ;;
 ;;     a       b       c       d
@@ -91,9 +86,9 @@
 ;;     aaa     [ <bbb>, <cccc>    ]    dddd
 ;;     aa      [ <bb> , <ccccccc> ]    ddd
 ;;
-;; Note that `delimit-columns-region' operates over all text region
-;; selected, extending the region start to the beginning of line and the
-;; region end to the end of line.  While `delimit-columns-rectangle'
+;; Note that `delimit-columns-region' operates over the entire selected
+;; text region, extending the region start to the beginning of line and
+;; the region end to the end of line.  While `delimit-columns-rectangle'
 ;; operates over the text rectangle selected which rectangle diagonal is
 ;; given by the region start and end.
 ;;
@@ -117,6 +112,7 @@
 
 ;;; Code:
 
+(require 'rect)
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; User Options:
@@ -125,6 +121,7 @@
   "Prettify columns."
   :link '(emacs-library-link :tag "Source Lisp File" "delim-col.el")
   :prefix "delimit-columns-"
+  :group 'convenience
   :group 'text)
 
 (defcustom delimit-columns-str-before ""
@@ -213,10 +210,11 @@ See also `delimit-columns-end' for documentation.
 The following relation must hold:
    0 <= delimit-columns-start <= delimit-columns-end
 
-The column number start from 0 and it's relative to the beginning of selected
-region.  So if you selected a text region, the first column (column 0) is
-located at beginning of line.  If you selected a text rectangle, the first
-column (column 0) is located at left corner."
+The column number starts at 0 and is relative to the beginning of
+the selected region.  So if you select a text region, the first
+column (column 0) is located at the beginning of line.  If you
+select a text rectangle, the first column (column 0) is located
+at the left corner."
   :type '(integer :tag "Column Start")
   :group 'columns)
 
@@ -228,10 +226,11 @@ See also `delimit-columns-start' for documentation.
 The following relation must hold:
    0 <= delimit-columns-start <= delimit-columns-end
 
-The column number start from 0 and it's relative to the beginning of selected
-region.  So if you selected a text region, the first column (column 0) is
-located at beginning of line.  If you selected a text rectangle, the first
-column (column 0) is located at left corner."
+The column number starts at 0 and is relative to the beginning of
+the selected region.  So if you select a text region, the first
+column (column 0) is located at the beginning of line.  If you
+select a text rectangle, the first column (column 0) is located
+at the left corner."
   :type '(integer :tag "Column End")
   :group 'columns)
 
@@ -247,20 +246,20 @@ column (column 0) is located at left corner."
 
 ;;;###autoload
 (defun delimit-columns-customize ()
-  "Customization of `columns' group."
+  "Customize the `columns' group."
   (interactive)
   (customize-group 'columns))
 
 
-(defmacro delimit-columns-str (str)
-  `(if (stringp ,str) ,str ""))
+(defun delimit-columns-str (str)
+  (if (stringp str) str ""))
 
 
 ;;;###autoload
 (defun delimit-columns-region (start end)
   "Prettify all columns in a text region.
 
-START and END delimits the text region."
+START and END delimit the text region."
   (interactive "*r")
   (let ((delimit-columns-str-before
         (delimit-columns-str delimit-columns-str-before))
@@ -273,8 +272,7 @@ START and END delimits the text region."
        (delimit-columns-after
         (delimit-columns-str delimit-columns-after))
        (delimit-columns-start
-        (if (and (integerp delimit-columns-start)
-                 (>= delimit-columns-start 0))
+         (if (natnump delimit-columns-start)
             delimit-columns-start
           0))
        (delimit-columns-end
@@ -309,14 +307,11 @@ START and END delimits the text region."
        (set-marker the-end nil)))))
 
 
-(require 'rect)
-
-
 ;;;###autoload
 (defun delimit-columns-rectangle (start end)
   "Prettify all columns in a text rectangle.
 
-START and END delimits the corners of text rectangle."
+START and END delimit the corners of the text rectangle."
   (interactive "*r")
   (let ((delimit-columns-str-before
         (delimit-columns-str delimit-columns-str-before))
@@ -329,8 +324,7 @@ START and END delimits the corners of text rectangle."
        (delimit-columns-after
         (delimit-columns-str delimit-columns-after))
        (delimit-columns-start
-        (if (and (integerp delimit-columns-start)
-                 (>= delimit-columns-start 0))
+         (if (natnump delimit-columns-start)
             delimit-columns-start
           0))
        (delimit-columns-end
@@ -344,11 +338,11 @@ START and END delimits the corners of text rectangle."
       ;; get maximum length for each column
       (and delimit-columns-format
           (save-excursion
-            (operate-on-rectangle 'delimit-columns-rectangle-max
+             (operate-on-rectangle #'delimit-columns-rectangle-max
                                   start the-end nil)))
       ;; prettify columns
       (save-excursion
-       (operate-on-rectangle 'delimit-columns-rectangle-line
+        (operate-on-rectangle #'delimit-columns-rectangle-line
                              start the-end nil))
       ;; nullify markers
       (set-marker delimit-columns-limit nil)
@@ -359,7 +353,7 @@ START and END delimits the corners of text rectangle."
 ;; Internal Variables and Functions:
 
 
-(defun delimit-columns-rectangle-max (startpos &optional _ignore1 _ignore2)
+(defun delimit-columns-rectangle-max (startpos &optional _begextra _endextra)
   (set-marker delimit-columns-limit (point))
   (goto-char startpos)
   (let ((ncol 1)
@@ -392,7 +386,7 @@ START and END delimits the corners of text rectangle."
       (setq values (cdr values)))))
 
 
-(defun delimit-columns-rectangle-line (startpos &optional _ignore1 _ignore2)
+(defun delimit-columns-rectangle-line (startpos &optional _begextra _endextra)
   (let ((len  (length delimit-columns-max))
        (ncol 0)
        origin)
@@ -442,8 +436,7 @@ START and END delimits the corners of text rectangle."
            ((eq delimit-columns-format 'padding)
             (insert spaces delimit-columns-after delimit-columns-str-after))
            (t
-            (insert delimit-columns-after spaces delimit-columns-str-after))
-           ))
+             (insert delimit-columns-after spaces delimit-columns-str-after))))
     (goto-char (max (point) delimit-columns-limit))))
 
 
@@ -466,8 +459,7 @@ START and END delimits the corners of text rectangle."
         (insert delimit-columns-after
                 delimit-columns-str-separator
                 spaces
-                delimit-columns-before))
-       ))
+                 delimit-columns-before))))
 
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
diff --git a/lisp/delsel.el b/lisp/delsel.el
index 8f71bc6..a815b91 100644
--- a/lisp/delsel.el
+++ b/lisp/delsel.el
@@ -4,7 +4,6 @@
 ;; Inc.
 
 ;; Author: Matthieu Devin <address@hidden>
-;; Maintainer: address@hidden
 ;; Created: 14 Jul 92
 ;; Keywords: convenience emulations
 
diff --git a/lisp/descr-text.el b/lisp/descr-text.el
index 8be2b94..2976b78 100644
--- a/lisp/descr-text.el
+++ b/lisp/descr-text.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1994-1996, 2001-2019 Free Software Foundation, Inc.
 
 ;; Author: Boris Goldowsky <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: faces, i18n, Unicode, multilingual
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 51749ac..387bd4e 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -4,7 +4,6 @@
 ;; Foundation, Inc.
 
 ;; Author: Sebastian Kremer <address@hidden>.
-;; Maintainer: address@hidden
 ;; Keywords: files
 ;; Package: emacs
 
diff --git a/lisp/dired.el b/lisp/dired.el
index ea1943d..f137d4a 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -4,7 +4,6 @@
 ;; Foundation, Inc.
 
 ;; Author: Sebastian Kremer <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: files
 ;; Package: emacs
 
diff --git a/lisp/disp-table.el b/lisp/disp-table.el
index 4a59750..f1676bb 100644
--- a/lisp/disp-table.el
+++ b/lisp/disp-table.el
@@ -5,7 +5,6 @@
 
 ;; Author: Erik Naggum <address@hidden>
 ;; Based on a previous version by Howard Gayle
-;; Maintainer: address@hidden
 ;; Keywords: i18n
 ;; Package: emacs
 
diff --git a/lisp/display-fill-column-indicator.el 
b/lisp/display-fill-column-indicator.el
index 6d5f5a9..ec89ade 100644
--- a/lisp/display-fill-column-indicator.el
+++ b/lisp/display-fill-column-indicator.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: convenience
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/display-line-numbers.el b/lisp/display-line-numbers.el
index d38f2e6..ac01112 100644
--- a/lisp/display-line-numbers.el
+++ b/lisp/display-line-numbers.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 2017-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: convenience
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/dnd.el b/lisp/dnd.el
index 459a723..82bb7c9 100644
--- a/lisp/dnd.el
+++ b/lisp/dnd.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2005-2019 Free Software Foundation, Inc.
 
 ;; Author: Jan Djärv <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: window, drag, drop
 ;; Package: emacs
 
diff --git a/lisp/dos-fns.el b/lisp/dos-fns.el
index c575dd4..bffd540 100644
--- a/lisp/dos-fns.el
+++ b/lisp/dos-fns.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1991, 1993, 1995-1996, 2001-2019 Free Software
 ;; Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: internal
 ;; Package: emacs
 
diff --git a/lisp/dos-vars.el b/lisp/dos-vars.el
index 53de20b..0bf1013 100644
--- a/lisp/dos-vars.el
+++ b/lisp/dos-vars.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 1998, 2001-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: internal
 ;; Package: emacs
 
diff --git a/lisp/dynamic-setting.el b/lisp/dynamic-setting.el
index cf1a8d3..ea530f9 100644
--- a/lisp/dynamic-setting.el
+++ b/lisp/dynamic-setting.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2009-2019 Free Software Foundation, Inc.
 
 ;; Author: Jan Djärv <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: font, system-font, tool-bar-style
 ;; Package: emacs
 
diff --git a/lisp/ebuff-menu.el b/lisp/ebuff-menu.el
index 6543e5f..ddfad25 100644
--- a/lisp/ebuff-menu.el
+++ b/lisp/ebuff-menu.el
@@ -4,7 +4,6 @@
 ;; Inc.
 
 ;; Author: Richard Mlynarik <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: convenience
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/echistory.el b/lisp/echistory.el
index e932daf..8006d7b 100644
--- a/lisp/echistory.el
+++ b/lisp/echistory.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1985, 2001-2019 Free Software Foundation, Inc.
 
 ;; Author: K. Shane Hartman
-;; Maintainer: address@hidden
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/ehelp.el b/lisp/ehelp.el
index 2a24c98..8fc8e1f 100644
--- a/lisp/ehelp.el
+++ b/lisp/ehelp.el
@@ -4,7 +4,6 @@
 
 ;; Author: Richard Mlynarik
 ;; (according to ack.texi and authors.el)
-;; Maintainer: address@hidden
 ;; Keywords: help, extensions
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/electric.el b/lisp/electric.el
index 07da2f1..1f4c132 100644
--- a/lisp/electric.el
+++ b/lisp/electric.el
@@ -4,7 +4,6 @@
 ;; Inc.
 
 ;; Author: K. Shane Hartman
-;; Maintainer: address@hidden
 ;; Keywords: extensions
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el
index 2034f33..dfd6d2e 100644
--- a/lisp/emacs-lisp/advice.el
+++ b/lisp/emacs-lisp/advice.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1993-1994, 2000-2019 Free Software Foundation, Inc.
 
 ;; Author: Hans Chalupsky <address@hidden>
-;; Maintainer: address@hidden
 ;; Created: 12 Dec 1992
 ;; Keywords: extensions, lisp, tools
 ;; Package: emacs
diff --git a/lisp/emacs-lisp/avl-tree.el b/lisp/emacs-lisp/avl-tree.el
index d2a3a13..a173956 100644
--- a/lisp/emacs-lisp/avl-tree.el
+++ b/lisp/emacs-lisp/avl-tree.el
@@ -6,7 +6,6 @@
 ;;         Inge Wallin <address@hidden>
 ;;         Thomas Bellman <address@hidden>
 ;;         Toby Cubitt <address@hidden>
-;; Maintainer: address@hidden
 ;; Created: 10 May 1991
 ;; Keywords: extensions, data structures, AVL, tree
 
diff --git a/lisp/emacs-lisp/backquote.el b/lisp/emacs-lisp/backquote.el
index 5e72dc3..344a0ba 100644
--- a/lisp/emacs-lisp/backquote.el
+++ b/lisp/emacs-lisp/backquote.el
@@ -4,7 +4,6 @@
 ;; Inc.
 
 ;; Author: Rick Sladkey <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: extensions, internal
 ;; Package: emacs
 
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el
index 44cca61..02a9749 100644
--- a/lisp/emacs-lisp/byte-opt.el
+++ b/lisp/emacs-lisp/byte-opt.el
@@ -4,7 +4,6 @@
 
 ;; Author: Jamie Zawinski <address@hidden>
 ;;     Hallvard Furuseth <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: internal
 ;; Package: emacs
 
diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el
index 842d1d4..811b485d 100644
--- a/lisp/emacs-lisp/byte-run.el
+++ b/lisp/emacs-lisp/byte-run.el
@@ -4,7 +4,6 @@
 
 ;; Author: Jamie Zawinski <address@hidden>
 ;;     Hallvard Furuseth <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: internal
 ;; Package: emacs
 
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index e76baf5..95e287c 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -5,7 +5,6 @@
 
 ;; Author: Jamie Zawinski <address@hidden>
 ;;     Hallvard Furuseth <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: lisp
 ;; Package: emacs
 
diff --git a/lisp/emacs-lisp/cconv.el b/lisp/emacs-lisp/cconv.el
index 58ca9d5..21af4b6 100644
--- a/lisp/emacs-lisp/cconv.el
+++ b/lisp/emacs-lisp/cconv.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2011-2019 Free Software Foundation, Inc.
 
 ;; Author: Igor Kuzmin <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: lisp
 ;; Package: emacs
 
diff --git a/lisp/emacs-lisp/cl-indent.el b/lisp/emacs-lisp/cl-indent.el
index 10af440..ea6efbf 100644
--- a/lisp/emacs-lisp/cl-indent.el
+++ b/lisp/emacs-lisp/cl-indent.el
@@ -4,7 +4,6 @@
 
 ;; Author: Richard Mlynarik <address@hidden>
 ;; Created: July 1987
-;; Maintainer: address@hidden
 ;; Keywords: lisp, tools
 ;; Package: emacs
 
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index c4a1dcb..24e79ac 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -2597,8 +2597,9 @@ rather than all at the end (i.e. like `let*' rather than 
like `let')."
 ;;;###autoload
 (defmacro cl-callf (func place &rest args)
   "Set PLACE to (FUNC PLACE ARGS...).
-FUNC should be an unquoted function name.  PLACE may be a symbol,
-or any generalized variable allowed by `setf'."
+FUNC should be an unquoted function name or a lambda expression.
+PLACE may be a symbol, or any generalized variable allowed by
+`setf'."
   (declare (indent 2) (debug (cl-function place &rest form)))
   (gv-letplace (getter setter) place
     (let* ((rargs (cons getter args)))
diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el
index 8989aa0..259f240 100644
--- a/lisp/emacs-lisp/debug.el
+++ b/lisp/emacs-lisp/debug.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1985-1986, 1994, 2001-2019 Free Software Foundation,
 ;; Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: lisp, tools, maint
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/emacs-lisp/derived.el b/lisp/emacs-lisp/derived.el
index 6db0584..9f7beea 100644
--- a/lisp/emacs-lisp/derived.el
+++ b/lisp/emacs-lisp/derived.el
@@ -5,7 +5,6 @@
 ;; Inc.
 
 ;; Author: David Megginson (address@hidden)
-;; Maintainer: address@hidden
 ;; Keywords: extensions
 ;; Package: emacs
 
diff --git a/lisp/emacs-lisp/disass.el b/lisp/emacs-lisp/disass.el
index 3fc2224..ed3c1fb 100644
--- a/lisp/emacs-lisp/disass.el
+++ b/lisp/emacs-lisp/disass.el
@@ -4,7 +4,6 @@
 
 ;; Author: Doug Cutting <address@hidden>
 ;;     Jamie Zawinski <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: internal
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index ab5553b..b8da76c 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -4,7 +4,6 @@
 ;; Inc.
 
 ;; Author: Daniel LaLiberte <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: lisp, tools, maint
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el
index 188d99e..23f303b 100644
--- a/lisp/emacs-lisp/eldoc.el
+++ b/lisp/emacs-lisp/eldoc.el
@@ -3,7 +3,7 @@
 ;; Copyright (C) 1996-2019 Free Software Foundation, Inc.
 
 ;; Author: Noah Friedman <address@hidden>
-;; Maintainer: address@hidden
+;; Maintainer: Noah Friedman <address@hidden>
 ;; Keywords: extensions
 ;; Created: 1995-10-06
 
diff --git a/lisp/emacs-lisp/elp.el b/lisp/emacs-lisp/elp.el
index f0dcb51..1f8d31a 100644
--- a/lisp/emacs-lisp/elp.el
+++ b/lisp/emacs-lisp/elp.el
@@ -4,7 +4,6 @@
 ;; Foundation, Inc.
 
 ;; Author: Barry A. Warsaw
-;; Maintainer: address@hidden
 ;; Created: 26-Feb-1994
 ;; Keywords: debugging lisp tools
 
diff --git a/lisp/emacs-lisp/ewoc.el b/lisp/emacs-lisp/ewoc.el
index c33b465..597afdd 100644
--- a/lisp/emacs-lisp/ewoc.el
+++ b/lisp/emacs-lisp/ewoc.el
@@ -4,7 +4,7 @@
 
 ;; Author: Per Cederqvist <address@hidden>
 ;;     Inge Wallin <address@hidden>
-;; Maintainer: address@hidden
+;; Maintainer: Stefan Monnier <address@hidden>
 ;; Created: 3 Aug 1992
 ;; Keywords: extensions, lisp
 
diff --git a/lisp/emacs-lisp/float-sup.el b/lisp/emacs-lisp/float-sup.el
index 54c8afe..6ee378e 100644
--- a/lisp/emacs-lisp/float-sup.el
+++ b/lisp/emacs-lisp/float-sup.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 1985-1987, 2001-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: internal
 ;; Package: emacs
 
diff --git a/lisp/emacs-lisp/helper.el b/lisp/emacs-lisp/helper.el
index d1bd46f..4a84cfa 100644
--- a/lisp/emacs-lisp/helper.el
+++ b/lisp/emacs-lisp/helper.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1985, 2001-2019 Free Software Foundation, Inc.
 
 ;; Author: K. Shane Hartman
-;; Maintainer: address@hidden
 ;; Keywords: help
 ;; Package: emacs
 
diff --git a/lisp/emacs-lisp/lisp-mnt.el b/lisp/emacs-lisp/lisp-mnt.el
index 91c7615..81adbd5 100644
--- a/lisp/emacs-lisp/lisp-mnt.el
+++ b/lisp/emacs-lisp/lisp-mnt.el
@@ -4,7 +4,6 @@
 ;; Inc.
 
 ;; Author: Eric S. Raymond <address@hidden>
-;; Maintainer: address@hidden
 ;; Created: 14 Jul 1992
 ;; Keywords: docs
 ;; X-Bogus-Bureaucratic-Cruft: Gruad will get you if you don't watch out!
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index fa6dc98..021708c 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 1985-1986, 1999-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: lisp, languages
 ;; Package: emacs
 
diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el
index 38df920..f653f6c 100644
--- a/lisp/emacs-lisp/lisp.el
+++ b/lisp/emacs-lisp/lisp.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1985-1986, 1994, 2000-2019 Free Software Foundation,
 ;; Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: lisp, languages
 ;; Package: emacs
 
diff --git a/lisp/emacs-lisp/map-ynp.el b/lisp/emacs-lisp/map-ynp.el
index a688330..e8337a9 100644
--- a/lisp/emacs-lisp/map-ynp.el
+++ b/lisp/emacs-lisp/map-ynp.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1991-1995, 2000-2019 Free Software Foundation, Inc.
 
 ;; Author: Roland McGrath <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: lisp, extensions
 ;; Package: emacs
 
diff --git a/lisp/emacs-lisp/map.el b/lisp/emacs-lisp/map.el
index 54e802e..774df3f 100644
--- a/lisp/emacs-lisp/map.el
+++ b/lisp/emacs-lisp/map.el
@@ -8,8 +8,6 @@
 ;; Package-Requires: ((emacs "25"))
 ;; Package: map
 
-;; Maintainer: address@hidden
-
 ;; This file is part of GNU Emacs.
 
 ;; GNU Emacs is free software: you can redistribute it and/or modify
diff --git a/lisp/emacs-lisp/regexp-opt.el b/lisp/emacs-lisp/regexp-opt.el
index 00f72e2..2753bbd 100644
--- a/lisp/emacs-lisp/regexp-opt.el
+++ b/lisp/emacs-lisp/regexp-opt.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1994-2019 Free Software Foundation, Inc.
 
 ;; Author: Simon Marshall <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: strings, regexps, extensions
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/emacs-lisp/ring.el b/lisp/emacs-lisp/ring.el
index c7d0268..91c043f 100644
--- a/lisp/emacs-lisp/ring.el
+++ b/lisp/emacs-lisp/ring.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 1992, 2001-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: extensions
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/emacs-lisp/rmc.el b/lisp/emacs-lisp/rmc.el
index 6d1adae..4c90f47 100644
--- a/lisp/emacs-lisp/rmc.el
+++ b/lisp/emacs-lisp/rmc.el
@@ -2,8 +2,6 @@
 
 ;; Copyright (C) 2016-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
-
 ;; This file is part of GNU Emacs.
 
 ;; GNU Emacs is free software: you can redistribute it and/or modify
diff --git a/lisp/emacs-lisp/rx.el b/lisp/emacs-lisp/rx.el
index fdd2431..ed32490 100644
--- a/lisp/emacs-lisp/rx.el
+++ b/lisp/emacs-lisp/rx.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2001-2019 Free Software Foundation, Inc.
 
 ;; Author: Gerd Moellmann <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: strings, regexps, extensions
 
 ;; This file is part of GNU Emacs.
@@ -107,15 +106,16 @@
 ;;; Code:
 
 (require 'cl-lib)
+(require 'cl-extra)
 
 ;; FIXME: support macros.
 
 (defvar rx-constituents              ;Not `const' because some modes extend it.
-  '((and               . (rx-and 1 nil))
+  '((and               . (rx-and 0 nil))
     (seq               . and)          ; SRE
     (:                 . and)          ; SRE
     (sequence          . and)          ; sregex
-    (or                        . (rx-or 1 nil))
+    (or                        . (rx-or 0 nil))
     (|                 . or)           ; SRE
     (not-newline       . ".")
     (nonl              . not-newline)  ; SRE
@@ -391,9 +391,11 @@ FORM is of the form `(and FORM1 ...)'."
   "Parse and produce code from FORM, which is `(or FORM1 ...)'."
   (rx-check form)
   (rx-group-if
-   (if (memq nil (mapcar 'stringp (cdr form)))
-       (mapconcat (lambda (x) (rx-form x '|)) (cdr form) "\\|")
+   (cond
+    ((null (cdr form)) regexp-unmatchable)
+    ((cl-every #'stringp (cdr form))
      (regexp-opt (cdr form) nil t))
+    (t (mapconcat (lambda (x) (rx-form x '|)) (cdr form) "\\|")))
    (and (memq rx-parent '(: * t)) rx-parent)))
 
 
@@ -1122,6 +1124,7 @@ CHAR
 `(seq SEXP1 SEXP2 ...)'
 `(sequence SEXP1 SEXP2 ...)'
      matches what SEXP1 matches, followed by what SEXP2 matches, etc.
+     Without arguments, matches the empty string.
 
 `(submatch SEXP1 SEXP2 ...)'
 `(group SEXP1 SEXP2 ...)'
@@ -1137,7 +1140,7 @@ CHAR
 `(| SEXP1 SEXP2 ...)'
      matches anything that matches SEXP1 or SEXP2, etc.  If all
      args are strings, use `regexp-opt' to optimize the resulting
-     regular expression.
+     regular expression.  Without arguments, never matches anything.
 
 `(minimal-match SEXP)'
      produce a non-greedy regexp for SEXP.  Normally, regexps matching
diff --git a/lisp/emacs-lisp/seq.el b/lisp/emacs-lisp/seq.el
index 3413cd1..8997b75 100644
--- a/lisp/emacs-lisp/seq.el
+++ b/lisp/emacs-lisp/seq.el
@@ -7,8 +7,6 @@
 ;; Version: 2.21
 ;; Package: seq
 
-;; Maintainer: address@hidden
-
 ;; This file is part of GNU Emacs.
 
 ;; GNU Emacs is free software: you can redistribute it and/or modify
diff --git a/lisp/emacs-lisp/subr-x.el b/lisp/emacs-lisp/subr-x.el
index b9ffe6a..3344583 100644
--- a/lisp/emacs-lisp/subr-x.el
+++ b/lisp/emacs-lisp/subr-x.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 2013-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: convenience
 ;; Package: emacs
 
diff --git a/lisp/emacs-lisp/syntax.el b/lisp/emacs-lisp/syntax.el
index f1904e6..f488bed 100644
--- a/lisp/emacs-lisp/syntax.el
+++ b/lisp/emacs-lisp/syntax.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 2000-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: internal
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/emacs-lisp/tcover-ses.el b/lisp/emacs-lisp/tcover-ses.el
index 29b4818..8d2f821 100644
--- a/lisp/emacs-lisp/tcover-ses.el
+++ b/lisp/emacs-lisp/tcover-ses.el
@@ -2,8 +2,8 @@
 
 ;; Copyright (C) 2002-2019 Free Software Foundation, Inc.
 
-;; Author: Jonathan Yavner <address@hidden>
-;; Maintainer: Jonathan Yavner <address@hidden>
+;; Author: Jonathan Yavner <address@hidden>
+;; Maintainer: Jonathan Yavner <address@hidden>
 ;; Keywords: spreadsheet lisp utility
 ;; Package: testcover
 
diff --git a/lisp/emacs-lisp/tcover-unsafep.el 
b/lisp/emacs-lisp/tcover-unsafep.el
index 571f53c..daae3ad 100644
--- a/lisp/emacs-lisp/tcover-unsafep.el
+++ b/lisp/emacs-lisp/tcover-unsafep.el
@@ -2,8 +2,8 @@
 
 ;; Copyright (C) 2002-2019 Free Software Foundation, Inc.
 
-;; Author: Jonathan Yavner <address@hidden>
-;; Maintainer: Jonathan Yavner <address@hidden>
+;; Author: Jonathan Yavner <address@hidden>
+;; Maintainer: Jonathan Yavner <address@hidden>
 ;; Keywords: safety lisp utility
 ;; Package: testcover
 
diff --git a/lisp/emacs-lisp/thunk.el b/lisp/emacs-lisp/thunk.el
index e1370c4..968dc71 100644
--- a/lisp/emacs-lisp/thunk.el
+++ b/lisp/emacs-lisp/thunk.el
@@ -7,8 +7,6 @@
 ;; Version: 1.0
 ;; Package: thunk
 
-;; Maintainer: address@hidden
-
 ;; This file is part of GNU Emacs.
 
 ;; GNU Emacs is free software: you can redistribute it and/or modify
diff --git a/lisp/emacs-lisp/timer-list.el b/lisp/emacs-lisp/timer-list.el
index 55aa56b..3a791c2 100644
--- a/lisp/emacs-lisp/timer-list.el
+++ b/lisp/emacs-lisp/timer-list.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 2016-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Package: emacs
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el
index 22ccc35..668da42 100644
--- a/lisp/emacs-lisp/timer.el
+++ b/lisp/emacs-lisp/timer.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 1996, 2001-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Package: emacs
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/emacs-lisp/tq.el b/lisp/emacs-lisp/tq.el
index 4249305..ca2d2a2 100644
--- a/lisp/emacs-lisp/tq.el
+++ b/lisp/emacs-lisp/tq.el
@@ -4,7 +4,6 @@
 ;; Inc.
 
 ;; Author: Scott Draves <address@hidden>
-;; Maintainer: address@hidden
 ;; Adapted-By: ESR
 ;; Keywords: extensions
 
diff --git a/lisp/emacs-lisp/trace.el b/lisp/emacs-lisp/trace.el
index 2f271c1..0a83511 100644
--- a/lisp/emacs-lisp/trace.el
+++ b/lisp/emacs-lisp/trace.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1993, 1998, 2000-2019 Free Software Foundation, Inc.
 
 ;; Author: Hans Chalupsky <address@hidden>
-;; Maintainer: address@hidden
 ;; Created: 15 Dec 1992
 ;; Keywords: tools, lisp
 
diff --git a/lisp/emacs-lisp/warnings.el b/lisp/emacs-lisp/warnings.el
index 13ca605..70d6b07 100644
--- a/lisp/emacs-lisp/warnings.el
+++ b/lisp/emacs-lisp/warnings.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 2002-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: internal
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/emacs-lock.el b/lisp/emacs-lock.el
index 0cded29..05b4c01 100644
--- a/lisp/emacs-lock.el
+++ b/lisp/emacs-lock.el
@@ -4,7 +4,6 @@
 
 ;; Author: Juanma Barranquero <address@hidden>
 ;; Inspired by emacs-lock.el by Tom Wurgler <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: extensions, processes
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/env.el b/lisp/env.el
index 5a4130e..30b63a8 100644
--- a/lisp/env.el
+++ b/lisp/env.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 1991, 1994, 2000-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: processes, unix
 ;; Package: emacs
 
diff --git a/lisp/erc/erc-autoaway.el b/lisp/erc/erc-autoaway.el
index 9e224e0..298cffb 100644
--- a/lisp/erc/erc-autoaway.el
+++ b/lisp/erc/erc-autoaway.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2002-2004, 2006-2019 Free Software Foundation, Inc.
 
 ;; Author: Jorgen Schaefer <address@hidden>
-;; Maintainer: address@hidden
 ;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ErcAutoAway
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el
index 210830a..eb441c2 100644
--- a/lisp/erc/erc-backend.el
+++ b/lisp/erc/erc-backend.el
@@ -4,7 +4,6 @@
 
 ;; Filename: erc-backend.el
 ;; Author: Lawrence Mitchell <address@hidden>
-;; Maintainer: address@hidden
 ;; Created: 2004-05-7
 ;; Keywords: IRC chat client internet
 
diff --git a/lisp/erc/erc-button.el b/lisp/erc/erc-button.el
index c8aa887..8e2a6b9 100644
--- a/lisp/erc/erc-button.el
+++ b/lisp/erc/erc-button.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1996-2004, 2006-2019 Free Software Foundation, Inc.
 
 ;; Author: Mario Lang <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: irc, button, url, regexp
 ;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ErcButton
 
diff --git a/lisp/erc/erc-capab.el b/lisp/erc/erc-capab.el
index 210a773..3d99c25 100644
--- a/lisp/erc/erc-capab.el
+++ b/lisp/erc/erc-capab.el
@@ -2,8 +2,6 @@
 
 ;; Copyright (C) 2006-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
-
 ; This file is part of GNU Emacs.
 
 ;; GNU Emacs is free software: you can redistribute it and/or modify
diff --git a/lisp/erc/erc-compat.el b/lisp/erc/erc-compat.el
index e724e36..3b36277 100644
--- a/lisp/erc/erc-compat.el
+++ b/lisp/erc/erc-compat.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2002-2003, 2005-2019 Free Software Foundation, Inc.
 
 ;; Author: Alex Schroeder <address@hidden>
-;; Maintainer: address@hidden
 ;; URL: http://www.emacswiki.org/cgi-bin/wiki/ERC
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/erc/erc-dcc.el b/lisp/erc/erc-dcc.el
index a6b7532..b835191 100644
--- a/lisp/erc/erc-dcc.el
+++ b/lisp/erc/erc-dcc.el
@@ -6,7 +6,6 @@
 ;; Author: Ben A. Mesander <address@hidden>
 ;;         Noah Friedman <address@hidden>
 ;;         Per Persson <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: comm, processes
 ;; Created: 1994-01-23
 
diff --git a/lisp/erc/erc-ezbounce.el b/lisp/erc/erc-ezbounce.el
index a2c9336..5784e63 100644
--- a/lisp/erc/erc-ezbounce.el
+++ b/lisp/erc/erc-ezbounce.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2002, 2004, 2006-2019 Free Software Foundation, Inc.
 
 ;; Author: Andreas Fuchs <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: comm
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/erc/erc-fill.el b/lisp/erc/erc-fill.el
index 934b52a..ef876f4 100644
--- a/lisp/erc/erc-fill.el
+++ b/lisp/erc/erc-fill.el
@@ -4,7 +4,6 @@
 
 ;; Author: Andreas Fuchs <address@hidden>
 ;;         Mario Lang <address@hidden>
-;; Maintainer: address@hidden
 ;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ErcFilling
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/erc/erc-goodies.el b/lisp/erc/erc-goodies.el
index 884c594..0d16aaf 100644
--- a/lisp/erc/erc-goodies.el
+++ b/lisp/erc/erc-goodies.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2001-2019 Free Software Foundation, Inc.
 
 ;; Author: Jorgen Schaefer <address@hidden>
-;; Maintainer: address@hidden
 
 ;; Most code is taken verbatim from erc.el, see there for the original
 ;; authors.
diff --git a/lisp/erc/erc-ibuffer.el b/lisp/erc/erc-ibuffer.el
index 149c858..ce0104b 100644
--- a/lisp/erc/erc-ibuffer.el
+++ b/lisp/erc/erc-ibuffer.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2002, 2004, 2006-2019 Free Software Foundation, Inc.
 
 ;; Author: Mario Lang <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: comm
 ;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ErcIbuffer
 
diff --git a/lisp/erc/erc-identd.el b/lisp/erc/erc-identd.el
index d95e0ea..96b4589 100644
--- a/lisp/erc/erc-identd.el
+++ b/lisp/erc/erc-identd.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2003, 2006-2019 Free Software Foundation, Inc.
 
 ;; Author: John Wiegley <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: comm, processes
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/erc/erc-imenu.el b/lisp/erc/erc-imenu.el
index 08f52f1..e40dc1f 100644
--- a/lisp/erc/erc-imenu.el
+++ b/lisp/erc/erc-imenu.el
@@ -4,7 +4,6 @@
 ;; Inc.
 
 ;; Author: Mario Lang <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: comm
 ;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ErcImenu
 
diff --git a/lisp/erc/erc-join.el b/lisp/erc/erc-join.el
index 896521e..18cc8b5 100644
--- a/lisp/erc/erc-join.el
+++ b/lisp/erc/erc-join.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2002-2004, 2006-2019 Free Software Foundation, Inc.
 
 ;; Author: Alex Schroeder <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: irc
 ;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ErcAutoJoin
 
diff --git a/lisp/erc/erc-lang.el b/lisp/erc/erc-lang.el
index f0dbe69..765898d 100644
--- a/lisp/erc/erc-lang.el
+++ b/lisp/erc/erc-lang.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2002, 2004, 2006-2019 Free Software Foundation, Inc.
 
 ;; Author: Alex Schroeder <address@hidden>
-;; Maintainer: address@hidden
 ;; Old-Version: 1.0.0
 ;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ErcLang
 ;; Keywords: comm languages processes
diff --git a/lisp/erc/erc-list.el b/lisp/erc/erc-list.el
index d8d9e17..6a2ba78 100644
--- a/lisp/erc/erc-list.el
+++ b/lisp/erc/erc-list.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2008-2019 Free Software Foundation, Inc.
 
 ;; Author: Tom Tromey <address@hidden>
-;; Maintainer: address@hidden
 ;; Old-Version: 0.1
 ;; Keywords: comm
 
diff --git a/lisp/erc/erc-log.el b/lisp/erc/erc-log.el
index 4153f5c..fc12dc7 100644
--- a/lisp/erc/erc-log.el
+++ b/lisp/erc/erc-log.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2003-2019 Free Software Foundation, Inc.
 
 ;; Author: Lawrence Mitchell <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: IRC, chat, client, Internet, logging
 
 ;; Created 2003-04-26
diff --git a/lisp/erc/erc-match.el b/lisp/erc/erc-match.el
index cc4b4a8..98ddebd 100644
--- a/lisp/erc/erc-match.el
+++ b/lisp/erc/erc-match.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2002-2019 Free Software Foundation, Inc.
 
 ;; Author: Andreas Fuchs <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: comm, faces
 ;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ErcMatch
 
diff --git a/lisp/erc/erc-menu.el b/lisp/erc/erc-menu.el
index 8173829..e13404c 100644
--- a/lisp/erc/erc-menu.el
+++ b/lisp/erc/erc-menu.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2001-2002, 2004-2019 Free Software Foundation, Inc.
 
 ;; Author: Mario Lang <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: comm, processes, menu
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/erc/erc-netsplit.el b/lisp/erc/erc-netsplit.el
index 87c3a61..252af71 100644
--- a/lisp/erc/erc-netsplit.el
+++ b/lisp/erc/erc-netsplit.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2002-2004, 2006-2019 Free Software Foundation, Inc.
 
 ;; Author: Mario Lang <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: comm
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/erc/erc-networks.el b/lisp/erc/erc-networks.el
index eca8ad6..e92da7b 100644
--- a/lisp/erc/erc-networks.el
+++ b/lisp/erc/erc-networks.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2002, 2004-2019 Free Software Foundation, Inc.
 
 ;; Author: Mario Lang <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: comm
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/erc/erc-notify.el b/lisp/erc/erc-notify.el
index 45dae89..9bd062a 100644
--- a/lisp/erc/erc-notify.el
+++ b/lisp/erc/erc-notify.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2002-2004, 2006-2019 Free Software Foundation, Inc.
 
 ;; Author: Mario Lang <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: comm
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/erc/erc-page.el b/lisp/erc/erc-page.el
index cb57883..4e7fed7 100644
--- a/lisp/erc/erc-page.el
+++ b/lisp/erc/erc-page.el
@@ -2,8 +2,6 @@
 
 ;; Copyright (C) 2002, 2004, 2006-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
-
 ;; This file is part of GNU Emacs.
 
 ;; GNU Emacs is free software: you can redistribute it and/or modify
diff --git a/lisp/erc/erc-pcomplete.el b/lisp/erc/erc-pcomplete.el
index dd2da85..e2489a8 100644
--- a/lisp/erc/erc-pcomplete.el
+++ b/lisp/erc/erc-pcomplete.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2002-2004, 2006-2019 Free Software Foundation, Inc.
 
 ;; Author: Sacha Chua <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: comm, convenience
 ;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ErcCompletion
 
diff --git a/lisp/erc/erc-replace.el b/lisp/erc/erc-replace.el
index 2e0e54a..e1c495c 100644
--- a/lisp/erc/erc-replace.el
+++ b/lisp/erc/erc-replace.el
@@ -4,7 +4,6 @@
 ;; Inc.
 
 ;; Author: Andreas Fuchs <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: IRC, client, Internet
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/erc/erc-ring.el b/lisp/erc/erc-ring.el
index 5459d8b..54f91d1 100644
--- a/lisp/erc/erc-ring.el
+++ b/lisp/erc/erc-ring.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2001-2004, 2006-2019 Free Software Foundation, Inc.
 
 ;; Author: Alex Schroeder <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: comm
 ;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ErcHistory
 
diff --git a/lisp/erc/erc-services.el b/lisp/erc/erc-services.el
index 886ba60..f500f4c 100644
--- a/lisp/erc/erc-services.el
+++ b/lisp/erc/erc-services.el
@@ -2,8 +2,6 @@
 
 ;; Copyright (C) 2002-2004, 2006-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
-
 ;; This file is part of GNU Emacs.
 
 ;; GNU Emacs is free software: you can redistribute it and/or modify
diff --git a/lisp/erc/erc-sound.el b/lisp/erc/erc-sound.el
index 34f7ce6..38e0b28 100644
--- a/lisp/erc/erc-sound.el
+++ b/lisp/erc/erc-sound.el
@@ -2,8 +2,6 @@
 
 ;; Copyright (C) 2002-2003, 2006-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
-
 ;; This file is part of GNU Emacs.
 
 ;; GNU Emacs is free software: you can redistribute it and/or modify
diff --git a/lisp/erc/erc-speedbar.el b/lisp/erc/erc-speedbar.el
index 0a1e38f..833ad2f 100644
--- a/lisp/erc/erc-speedbar.el
+++ b/lisp/erc/erc-speedbar.el
@@ -4,7 +4,6 @@
 
 ;; Author: Mario Lang <address@hidden>
 ;; Contributor: Eric M. Ludlam <address@hidden>
-;; Maintainer: address@hidden
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/erc/erc-spelling.el b/lisp/erc/erc-spelling.el
index 69a83fa..8df7ea9 100644
--- a/lisp/erc/erc-spelling.el
+++ b/lisp/erc/erc-spelling.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2005-2019 Free Software Foundation, Inc.
 
 ;; Author: Jorgen Schaefer <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: irc
 ;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ErcSpelling
 
diff --git a/lisp/erc/erc-stamp.el b/lisp/erc/erc-stamp.el
index 860fdbb..541c67a 100644
--- a/lisp/erc/erc-stamp.el
+++ b/lisp/erc/erc-stamp.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2002-2004, 2006-2019 Free Software Foundation, Inc.
 
 ;; Author: Mario Lang <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: comm, processes, timestamp
 ;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ErcStamp
 
diff --git a/lisp/erc/erc-track.el b/lisp/erc/erc-track.el
index e51e605..14e86c1 100644
--- a/lisp/erc/erc-track.el
+++ b/lisp/erc/erc-track.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2002-2019 Free Software Foundation, Inc.
 
 ;; Author: Mario Lang <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: comm, faces
 ;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ErcChannelTracking
 
diff --git a/lisp/erc/erc-truncate.el b/lisp/erc/erc-truncate.el
index 0417429..73c7316 100644
--- a/lisp/erc/erc-truncate.el
+++ b/lisp/erc/erc-truncate.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2003-2004, 2006-2019 Free Software Foundation, Inc.
 
 ;; Author: Andreas Fuchs <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: IRC, chat, client, Internet, logging
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/erc/erc-xdcc.el b/lisp/erc/erc-xdcc.el
index 162b22e..20a91b7 100644
--- a/lisp/erc/erc-xdcc.el
+++ b/lisp/erc/erc-xdcc.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2003-2004, 2006-2019 Free Software Foundation, Inc.
 
 ;; Author: Mario Lang <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: comm, processes
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index d1fa5c7..fc0f612 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -10,7 +10,6 @@
 ;;               Gergely Nagy (address@hidden)
 ;;               David Edmondson (address@hidden)
 ;;               Kelvin White (address@hidden)
-;; Maintainer: address@hidden
 ;; Keywords: IRC, chat, client, Internet
 
 ;; Version: 5.3
diff --git a/lisp/expand.el b/lisp/expand.el
index 0c4d343..7eaf7fd 100644
--- a/lisp/expand.el
+++ b/lisp/expand.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1995-1996, 2001-2019 Free Software Foundation, Inc.
 
 ;; Author: Frederic Lepied <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: abbrev
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/faces.el b/lisp/faces.el
index 89b5986..137ce99 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 1992-1996, 1998-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: internal
 ;; Package: emacs
 
diff --git a/lisp/ffap.el b/lisp/ffap.el
index 08f7208..4e91a7a 100644
--- a/lisp/ffap.el
+++ b/lisp/ffap.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1995-1997, 2000-2019 Free Software Foundation, Inc.
 
 ;; Author: Michelangelo Grigni <address@hidden>
-;; Maintainer: address@hidden
 ;; Created: 29 Mar 1993
 ;; Keywords: files, hypermedia, matching, mouse, convenience
 
diff --git a/lisp/filenotify.el b/lisp/filenotify.el
index 26b83ce..d77046d 100644
--- a/lisp/filenotify.el
+++ b/lisp/filenotify.el
@@ -238,11 +238,17 @@ EVENT is the cadr of the event in 
`file-notify-handle-event'
                       (string-equal
                        (file-notify--watch-filename watch)
                        (file-name-nondirectory file))
+
                       ;; Directory matches.
-                      (string-equal
-                       (file-name-nondirectory file)
-                       (file-name-nondirectory
-                        (file-notify--watch-directory watch)))
+                      ;;  FIXME: What purpose would this condition serve?
+                      ;;  Doesn't it just slip through events for files
+                      ;;  having the same name as the last component of the
+                      ;;  directory of the file that we are really watching?
+                      ;;(string-equal
+                      ;; (file-name-nondirectory file)
+                      ;; (file-name-nondirectory
+                      ;;  (file-notify--watch-directory watch)))
+
                       ;; File1 matches.
                       (and (stringp file1)
                            (string-equal
diff --git a/lisp/files-x.el b/lisp/files-x.el
index b71e920..0d156db 100644
--- a/lisp/files-x.el
+++ b/lisp/files-x.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2009-2019 Free Software Foundation, Inc.
 
 ;; Author: Juri Linkov <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: files
 ;; Package: emacs
 
diff --git a/lisp/files.el b/lisp/files.el
index 1dec0ed..989d1cb 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 1985-1987, 1992-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Package: emacs
 
 ;; This file is part of GNU Emacs.
@@ -4269,6 +4268,9 @@ However, the mode will not be changed if
   :type 'boolean
   :group 'editing-basics)
 
+(defvar after-set-visited-file-name-hook nil
+  "Normal hook run just after setting visited file name of current buffer.")
+
 (defun set-visited-file-name (filename &optional no-query along-with-file)
   "Change name of file visited in current buffer to FILENAME.
 This also renames the buffer to correspond to the new file.
@@ -4389,7 +4391,8 @@ the old visited file has been renamed to the new name 
FILENAME."
              (set-auto-mode t)
              (or (eq old major-mode)
                  (hack-local-variables))))
-    (error nil))))
+      (error nil))
+    (run-hooks 'after-set-visited-file-name-hook)))
 
 (defun write-file (filename &optional confirm)
   "Write current buffer into file FILENAME.
diff --git a/lisp/filesets.el b/lisp/filesets.el
index b74b4a8..05c30de 100644
--- a/lisp/filesets.el
+++ b/lisp/filesets.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2002-2019 Free Software Foundation, Inc.
 
 ;; Author: Thomas Link <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: filesets convenience
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/find-dired.el b/lisp/find-dired.el
index ef137be..578f765 100644
--- a/lisp/find-dired.el
+++ b/lisp/find-dired.el
@@ -5,7 +5,6 @@
 
 ;; Author: Roland McGrath <address@hidden>,
 ;;        Sebastian Kremer <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: unix
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/find-file.el b/lisp/find-file.el
index 8731408..f93d2a0 100644
--- a/lisp/find-file.el
+++ b/lisp/find-file.el
@@ -1,7 +1,6 @@
 ;;; find-file.el --- find a file corresponding to this one given a pattern
 
 ;; Author: Henry Guillaume <address@hidden, address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: c, matching, tools
 
 ;; Copyright (C) 1994-1995, 2001-2019 Free Software Foundation, Inc.
diff --git a/lisp/flow-ctrl.el b/lisp/flow-ctrl.el
index e92b6b4..0b95efa 100644
--- a/lisp/flow-ctrl.el
+++ b/lisp/flow-ctrl.el
@@ -4,7 +4,6 @@
 ;; Inc.
 
 ;; Author: Kevin Gallagher
-;; Maintainer: address@hidden
 ;; Adapted-By: ESR
 ;; Keywords: hardware
 
diff --git a/lisp/foldout.el b/lisp/foldout.el
index 3ef88fe..2eae65a 100644
--- a/lisp/foldout.el
+++ b/lisp/foldout.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1994, 2001-2019 Free Software Foundation, Inc.
 
 ;; Author: Kevin Broadey <address@hidden>
-;; Maintainer: address@hidden
 ;; Created: 27 Jan 1994
 ;; Version: 1.10
 ;; Keywords: folding, outlines
diff --git a/lisp/follow.el b/lisp/follow.el
index acc2b26..47e7aa4 100644
--- a/lisp/follow.el
+++ b/lisp/follow.el
@@ -4,7 +4,6 @@
 ;; Inc.
 
 ;; Author: Anders Lindgren
-;; Maintainer: address@hidden
 ;; Created: 1995-05-25
 ;; Keywords: display, window, minor-mode, convenience
 
diff --git a/lisp/font-core.el b/lisp/font-core.el
index 6b26f0c..da6c91b 100644
--- a/lisp/font-core.el
+++ b/lisp/font-core.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 1992-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: languages, faces
 ;; Package: emacs
 
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index 3991a4e..b0e4598 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -5,7 +5,6 @@
 ;; Author: Jamie Zawinski
 ;;     Richard Stallman
 ;;     Stefan Monnier
-;; Maintainer: address@hidden
 ;; Keywords: languages, faces
 ;; Package: emacs
 
diff --git a/lisp/frame.el b/lisp/frame.el
index a8c230c..8e0738f 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1993-1994, 1996-1997, 2000-2019 Free Software
 ;; Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: internal
 ;; Package: emacs
 
diff --git a/lisp/fringe.el b/lisp/fringe.el
index 92387a2..632efa8 100644
--- a/lisp/fringe.el
+++ b/lisp/fringe.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2002-2019 Free Software Foundation, Inc.
 
 ;; Author: Simon Josefsson <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: frames
 ;; Package: emacs
 
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index baa8a24..a1b82f8 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -3733,7 +3733,7 @@ is to run."
   "Stop the Date timer."
   (interactive)
   (when article-lapsed-timer
-    (nnheader-cancel-timer article-lapsed-timer)
+    (cancel-timer article-lapsed-timer)
     (setq article-lapsed-timer nil)))
 
 (defun article-date-user (&optional highlight)
diff --git a/lisp/gnus/gnus-async.el b/lisp/gnus/gnus-async.el
index 4e2723e..b3da350 100644
--- a/lisp/gnus/gnus-async.el
+++ b/lisp/gnus/gnus-async.el
@@ -146,7 +146,7 @@ that was fetched."
        (when next
          (when gnus-async-timer
            (ignore-errors
-             (nnheader-cancel-timer 'gnus-async-timer)))
+             (cancel-timer 'gnus-async-timer)))
          (setq gnus-async-timer
                (run-with-idle-timer
                 0.1 nil 'gnus-async-prefetch-article
diff --git a/lisp/gnus/gnus-demon.el b/lisp/gnus/gnus-demon.el
index 6c5e0b7..cb70d95 100644
--- a/lisp/gnus/gnus-demon.el
+++ b/lisp/gnus/gnus-demon.el
@@ -111,7 +111,7 @@ marked with SPECIAL."
                                               func idle time))))
             ((and idle (> idle (gnus-demon-idle-since)))
              (when time
-               (nnheader-cancel-timer (plist-get gnus-demon-timers func))
+               (cancel-timer (plist-get gnus-demon-timers func))
                (setq gnus-demon-timers
                      (plist-put gnus-demon-timers func
                                (run-with-idle-timer idle nil
@@ -202,7 +202,7 @@ marked with SPECIAL."
   "Cancel any Gnus daemons."
   (interactive)
   (dotimes (i (/ (length gnus-demon-timers) 2))
-    (nnheader-cancel-timer (nth (1+ (* i 2)) gnus-demon-timers)))
+    (cancel-timer (nth (1+ (* i 2)) gnus-demon-timers)))
   (setq gnus-demon-timers nil))
 
 (defun gnus-demon-add-disconnection ()
diff --git a/lisp/gnus/mail-source.el b/lisp/gnus/mail-source.el
index 7514e64..9d70bd5 100644
--- a/lisp/gnus/mail-source.el
+++ b/lisp/gnus/mail-source.el
@@ -31,7 +31,6 @@
 (autoload 'auth-source-search "auth-source")
 (autoload 'pop3-movemail "pop3")
 (autoload 'pop3-get-message-count "pop3")
-(autoload 'nnheader-cancel-timer "nnheader")
 (require 'mm-util)
 (require 'message) ;; for `message-directory'
 
@@ -989,9 +988,9 @@ This only works when `display-time' is enabled."
              (> (prefix-numeric-value arg) 0))))
     (setq mail-source-report-new-mail on)
     (and mail-source-report-new-mail-timer
-        (nnheader-cancel-timer mail-source-report-new-mail-timer))
+        (cancel-timer mail-source-report-new-mail-timer))
     (and mail-source-report-new-mail-idle-timer
-        (nnheader-cancel-timer mail-source-report-new-mail-idle-timer))
+        (cancel-timer mail-source-report-new-mail-idle-timer))
     (setq mail-source-report-new-mail-timer nil)
     (setq mail-source-report-new-mail-idle-timer nil)
     (if on
diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el
index 5b1859e..0b9cdde 100644
--- a/lisp/gnus/mm-decode.el
+++ b/lisp/gnus/mm-decode.el
@@ -1111,7 +1111,7 @@ external if displayed external."
          (mm-remove-part handle)))))))
 
 (defun mm-destroy-parts (handles)
-  "Remove the displayed MIME parts represented by HANDLES."
+  "Destroy the displayed MIME parts represented by HANDLES."
   (if (and (listp handles)
           (bufferp (car handles)))
       (mm-destroy-part handles)
diff --git a/lisp/gnus/nnheader.el b/lisp/gnus/nnheader.el
index d30a739..6ef324a 100644
--- a/lisp/gnus/nnheader.el
+++ b/lisp/gnus/nnheader.el
@@ -121,7 +121,6 @@ on your system, you could say something like:
 
 (autoload 'nnmail-message-id "nnmail")
 (autoload 'mail-position-on-field "sendmail")
-(autoload 'gnus-buffer-live-p "gnus-util")
 
 ;;; Header access macros.
 
@@ -970,8 +969,9 @@ See `find-file-noselect' for the arguments."
   "Strip all \r's from the current buffer."
   (nnheader-skeleton-replace "\r"))
 
-(defalias 'nnheader-cancel-timer 'cancel-timer)
-(defalias 'nnheader-cancel-function-timers 'cancel-function-timers)
+(define-obsolete-function-alias 'nnheader-cancel-timer 'cancel-timer "27.1")
+(define-obsolete-function-alias 'nnheader-cancel-function-timers
+  'cancel-function-timers "27.1")
 
 ;; When changing this function, consider changing `pop3-accept-process-output'
 ;; as well.
diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el
index b6dbbea..37f6e75 100644
--- a/lisp/gnus/nnmail.el
+++ b/lisp/gnus/nnmail.el
@@ -34,8 +34,6 @@
 (require 'mm-util)
 (require 'gnus-int)
 
-(autoload 'gnus-add-buffer "gnus")
-(autoload 'gnus-kill-buffer "gnus")
 (autoload 'mail-send-and-exit "sendmail" nil t)
 
 (defgroup nnmail nil
diff --git a/lisp/gnus/nnmaildir.el b/lisp/gnus/nnmaildir.el
index 9d02773..ac125c9 100644
--- a/lisp/gnus/nnmaildir.el
+++ b/lisp/gnus/nnmaildir.el
@@ -1490,7 +1490,7 @@ This variable is set by `nnmaildir-request-article'.")
                       'excl)
         (when (fboundp 'unix-sync)
           (unix-sync)))) ;; no fsync :(
-      (nnheader-cancel-timer 24h)
+      (cancel-timer 24h)
       (condition-case err
          (add-name-to-file tmpfile curfile)
        (error
diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el
index e2fa1d8..0e5057e 100644
--- a/lisp/gnus/nntp.el
+++ b/lisp/gnus/nntp.el
@@ -647,7 +647,7 @@ command whose response triggered the error."
                               (nntp-close-server))
                             (signal 'quit nil))))
                  (when -timer
-                   (nnheader-cancel-timer -timer)))
+                   (cancel-timer -timer)))
                nil))
       (setq nntp--report-1 nntp-report-n))
     nntp-with-open-group-internal))
@@ -1280,7 +1280,7 @@ If SEND-IF-FORCE, only send authinfo to the server if the
             (signal 'quit nil)
             nil))))
     (when timer
-      (nnheader-cancel-timer timer))
+      (cancel-timer timer))
     (when (and process
               (not (memq (process-status process) '(open run))))
       (with-current-buffer pbuffer
@@ -1339,7 +1339,7 @@ If SEND-IF-FORCE, only send authinfo to the server if the
 (defun nntp-async-stop (proc)
   (setq nntp-async-process-list (delq proc nntp-async-process-list))
   (when (and nntp-async-timer (not nntp-async-process-list))
-    (nnheader-cancel-timer nntp-async-timer)
+    (cancel-timer nntp-async-timer)
     (setq nntp-async-timer nil)))
 
 (defun nntp-after-change-function (beg end len)
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 50d69e7..91b4104 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1985-1986, 1993-1994, 1998-2019 Free Software
 ;; Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: help, internal
 ;; Package: emacs
 
@@ -104,11 +103,23 @@ and the output should go to `standard-output'.")
         (with-demoted-errors "while loading: %S"
           (load file 'noerror 'nomessage))))))
 
+(defcustom help-enable-completion-auto-load t
+  "Whether completion for Help commands can perform autoloading.
+If non-nil, whenever invoking completion for `describe-function'
+or `describe-variable' load files that might contain definitions
+with the current prefix.  The files are chosen according to
+`definition-prefixes'."
+  :type 'boolean
+  :group 'help
+  :version "26.3")
+
 (defun help--symbol-completion-table (string pred action)
-  (let ((prefixes (radix-tree-prefixes (help-definition-prefixes) string)))
-    (help--load-prefixes prefixes))
+  (when help-enable-completion-auto-load
+    (let ((prefixes (radix-tree-prefixes (help-definition-prefixes) string)))
+      (help--load-prefixes prefixes)))
   (let ((prefix-completions
-         (mapcar #'intern (all-completions string definition-prefixes))))
+         (and help-enable-completion-auto-load
+              (mapcar #'intern (all-completions string definition-prefixes)))))
     (complete-with-action action obarray string
                           (if pred (lambda (sym)
                                      (or (funcall pred sym)
diff --git a/lisp/help-macro.el b/lisp/help-macro.el
index a16d1e3..9c90d6d 100644
--- a/lisp/help-macro.el
+++ b/lisp/help-macro.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1993-1994, 2001-2019 Free Software Foundation, Inc.
 
 ;; Author: Lynn Slater <address@hidden>
-;; Maintainer: address@hidden
 ;; Created: Mon Oct  1 11:42:39 1990
 ;; Adapted-By: ESR
 ;; Package: emacs
diff --git a/lisp/help-mode.el b/lisp/help-mode.el
index 6cc3f0d..304c45d 100644
--- a/lisp/help-mode.el
+++ b/lisp/help-mode.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1985-1986, 1993-1994, 1998-2019 Free Software
 ;; Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: help, internal
 ;; Package: emacs
 
diff --git a/lisp/help.el b/lisp/help.el
index 42ff375..0677368 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1985-1986, 1993-1994, 1998-2019 Free Software
 ;; Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: help, internal
 ;; Package: emacs
 
diff --git a/lisp/hexl.el b/lisp/hexl.el
index ee5a9c0..df501df 100644
--- a/lisp/hexl.el
+++ b/lisp/hexl.el
@@ -4,7 +4,6 @@
 ;; Inc.
 
 ;; Author: Keith Gabryelski <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: data
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/hippie-exp.el b/lisp/hippie-exp.el
index 404f448..17d3dc7 100644
--- a/lisp/hippie-exp.el
+++ b/lisp/hippie-exp.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1992, 2001-2019 Free Software Foundation, Inc.
 
 ;; Author: Anders Holst <address@hidden>
-;; Maintainer: address@hidden
 ;; Version: 1.6
 ;; Keywords: abbrev convenience
 
diff --git a/lisp/hl-line.el b/lisp/hl-line.el
index 1c09bc2..e4fef21 100644
--- a/lisp/hl-line.el
+++ b/lisp/hl-line.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1998, 2000-2019 Free Software Foundation, Inc.
 
 ;; Author:  Dave Love <address@hidden>
-;; Maintainer: address@hidden
 ;; Created: 1998-09-13
 ;; Keywords: faces, frames, emulations
 
diff --git a/lisp/icomplete.el b/lisp/icomplete.el
index 10fd3a6..698025e 100644
--- a/lisp/icomplete.el
+++ b/lisp/icomplete.el
@@ -3,8 +3,8 @@
 ;; Copyright (C) 1992-1994, 1997, 1999, 2001-2019 Free Software
 ;; Foundation, Inc.
 
-;; Author: Ken Manheimer <address@hidden>
-;; Maintainer: Ken Manheimer <address@hidden>
+;; Author: Ken Manheimer <ken dot manheimer at gmail...>
+;; Maintainer: Ken Manheimer <ken dot manheimer at gmail...>
 ;; Created: Mar 1993 Ken Manheimer, address@hidden - first release to usenet
 ;; Keywords: help, abbrev
 
diff --git a/lisp/ielm.el b/lisp/ielm.el
index c7a31a2..1531415 100644
--- a/lisp/ielm.el
+++ b/lisp/ielm.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1994, 2001-2019 Free Software Foundation, Inc.
 
 ;; Author: David Smith <address@hidden>
-;; Maintainer: address@hidden
 ;; Created: 25 Feb 1994
 ;; Keywords: lisp
 
diff --git a/lisp/iimage.el b/lisp/iimage.el
index e51108e..17b715a 100644
--- a/lisp/iimage.el
+++ b/lisp/iimage.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2004-2019 Free Software Foundation, Inc.
 
 ;; Author: KOSEKI Yoshinori <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: multimedia
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/image.el b/lisp/image.el
index db11302..6cc2cc3 100644
--- a/lisp/image.el
+++ b/lisp/image.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 1998-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: multimedia
 ;; Package: emacs
 
diff --git a/lisp/imenu.el b/lisp/imenu.el
index 5084fe6..6e16e13 100644
--- a/lisp/imenu.el
+++ b/lisp/imenu.el
@@ -4,7 +4,6 @@
 
 ;; Author: Ake Stenhoff <address@hidden>
 ;;         Lars Lindberg <address@hidden>
-;; Maintainer: address@hidden
 ;; Created: 8 Feb 1994
 ;; Keywords: tools convenience
 
diff --git a/lisp/indent.el b/lisp/indent.el
index bf87d6a..1dbece7 100644
--- a/lisp/indent.el
+++ b/lisp/indent.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 1985, 1995, 2001-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Package: emacs
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/info.el b/lisp/info.el
index c211887..6180395 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 1985-1986, 1992-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: help
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/informat.el b/lisp/informat.el
index 8108ffe..246b3b9 100644
--- a/lisp/informat.el
+++ b/lisp/informat.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 1986, 2001-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: help
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/international/isearch-x.el b/lisp/international/isearch-x.el
index 6c2a2dc..c12e7b3 100644
--- a/lisp/international/isearch-x.el
+++ b/lisp/international/isearch-x.el
@@ -8,8 +8,8 @@
 
 ;; Keywords: i18n, multilingual, isearch
 
-;; Author: Kenichi HANDA <address@hidden>
-;; Maintainer: Kenichi HANDA <address@hidden>
+;; Author: Kenichi Handa <address@hidden>
+;; Maintainer: Kenichi Handa <address@hidden>
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/international/iso-ascii.el b/lisp/international/iso-ascii.el
index 395e6c4..b317b8a 100644
--- a/lisp/international/iso-ascii.el
+++ b/lisp/international/iso-ascii.el
@@ -4,7 +4,6 @@
 ;; Inc.
 
 ;; Author: Howard Gayle
-;; Maintainer: address@hidden
 ;; Keywords: i18n
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/international/iso-transl.el b/lisp/international/iso-transl.el
index b573e1e..14da02c 100644
--- a/lisp/international/iso-transl.el
+++ b/lisp/international/iso-transl.el
@@ -4,7 +4,6 @@
 ;; Inc.
 
 ;; Author: Howard Gayle
-;; Maintainer: address@hidden
 ;; Keywords: i18n
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/international/ogonek.el b/lisp/international/ogonek.el
index 543f2e3..fd68137 100644
--- a/lisp/international/ogonek.el
+++ b/lisp/international/ogonek.el
@@ -4,7 +4,6 @@
 
 ;; Author: Włodek Bzyl
 ;;        Ryszard Kubiak
-;; Maintainer: address@hidden
 ;; Keywords: i18n
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/international/quail.el b/lisp/international/quail.el
index 3266b93..2683118 100644
--- a/lisp/international/quail.el
+++ b/lisp/international/quail.el
@@ -6,9 +6,9 @@
 ;;   National Institute of Advanced Industrial Science and Technology (AIST)
 ;;   Registration Number H14PRO021
 
-;; Author: Kenichi HANDA <address@hidden>
-;;        Naoto TAKAHASHI <address@hidden>
-;; Maintainer: Kenichi HANDA <address@hidden>
+;; Author: Kenichi Handa <address@hidden>
+;;        Naoto Takahashi <address@hidden>
+;; Maintainer: Kenichi Handa <address@hidden>
 ;; Keywords: mule, multilingual, input method, i18n
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/international/utf7.el b/lisp/international/utf7.el
index 0e67a62..f22fb8d 100644
--- a/lisp/international/utf7.el
+++ b/lisp/international/utf7.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1999-2019 Free Software Foundation, Inc.
 
 ;; Author: Jon K Hellan <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: mail
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/isearch.el b/lisp/isearch.el
index bb29c29..5aaeae4 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1992-1997, 1999-2019 Free Software Foundation, Inc.
 
 ;; Author: Daniel LaLiberte <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: matching
 ;; Package: emacs
 
diff --git a/lisp/isearchb.el b/lisp/isearchb.el
index ee392b3..dc18368 100644
--- a/lisp/isearchb.el
+++ b/lisp/isearchb.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2004-2019 Free Software Foundation, Inc.
 
 ;; Author: John Wiegley <address@hidden>
-;; Maintainer: address@hidden
 ;; Created: 16 Apr 2004
 ;; Version: 1.5
 ;; Keywords: lisp
diff --git a/lisp/jka-cmpr-hook.el b/lisp/jka-cmpr-hook.el
index 3aa84f4..b6ff9f1 100644
--- a/lisp/jka-cmpr-hook.el
+++ b/lisp/jka-cmpr-hook.el
@@ -4,7 +4,6 @@
 ;; Foundation, Inc.
 
 ;; Author: Jay K. Adams <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: data
 ;; Package: emacs
 
diff --git a/lisp/jka-compr.el b/lisp/jka-compr.el
index 63fb449..8c9dd8a 100644
--- a/lisp/jka-compr.el
+++ b/lisp/jka-compr.el
@@ -4,7 +4,6 @@
 ;; Inc.
 
 ;; Author: Jay K. Adams <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: data
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/kermit.el b/lisp/kermit.el
index f6ed1fb..77c2cbd 100644
--- a/lisp/kermit.el
+++ b/lisp/kermit.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1988, 2001-2019 Free Software Foundation, Inc.
 
 ;; Author: Jeff Norden <address@hidden>
-;; Maintainer: address@hidden
 ;; Created: 15 Feb 1988
 ;; Keywords: comm
 
diff --git a/lisp/language/cyrillic.el b/lisp/language/cyrillic.el
index 75d4249..564ac5f 100644
--- a/lisp/language/cyrillic.el
+++ b/lisp/language/cyrillic.el
@@ -9,7 +9,7 @@
 ;;   National Institute of Advanced Industrial Science and Technology (AIST)
 ;;   Registration Number H13PRO009
 
-;; Author: Kenichi Handa <address@hidden>
+;; Author: Kenichi Handa <address@hidden>
 ;; Keywords: multilingual, Cyrillic, i18n
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/language/european.el b/lisp/language/european.el
index 8c38175..fedbca4 100644
--- a/lisp/language/european.el
+++ b/lisp/language/european.el
@@ -525,7 +525,7 @@ method and applying Turkish case rules for the characters 
i, I, ı, İ.")))
     (set-case-syntax ?ı "w" table)))
 
 ;; Polish ISO 8859-2 environment.
-;; Maintainer: Wlodek Bzyl <address@hidden>
+;; Maintainer: Włodek Bzyl <address@hidden>
 ;; Keywords: multilingual, Polish
 
 (set-language-info-alist
diff --git a/lisp/language/indian.el b/lisp/language/indian.el
index d63e9b4..894a015 100644
--- a/lisp/language/indian.el
+++ b/lisp/language/indian.el
@@ -5,7 +5,7 @@
 ;;   National Institute of Advanced Industrial Science and Technology (AIST)
 ;;   Registration Number H14PRO021
 
-;; Maintainer:  Kenichi Handa <address@hidden>
+;; Maintainer:  Kenichi Handa <address@hidden>
 ;;             KAWABATA, Taichi <address@hidden>
 ;; Keywords:   multilingual, i18n, Indian
 
diff --git a/lisp/language/thai-word.el b/lisp/language/thai-word.el
index e67dd09..94c6ab9 100644
--- a/lisp/language/thai-word.el
+++ b/lisp/language/thai-word.el
@@ -4,7 +4,7 @@
 ;;   National Institute of Advanced Industrial Science and Technology (AIST)
 ;;   Registration Number H14PRO021
 
-;; Author: Kenichi HANDA <address@hidden>
+;; Author: Kenichi Handa <address@hidden>
 
 ;; Keywords: thai, word break, emacs
 
diff --git a/lisp/leim/quail/py-punct.el b/lisp/leim/quail/py-punct.el
index eed70a8..49ea66e 100644
--- a/lisp/leim/quail/py-punct.el
+++ b/lisp/leim/quail/py-punct.el
@@ -6,7 +6,7 @@
 ;;   National Institute of Advanced Industrial Science and Technology (AIST)
 ;;   Registration Number H14PRO021
 
-;; Author: Ken'ichi HANDA <address@hidden>
+;; Author: Ken'ichi Handa <address@hidden>
 
 ;; Keywords: multilingual, input method, Chinese
 
diff --git a/lisp/leim/quail/pypunct-b5.el b/lisp/leim/quail/pypunct-b5.el
index 45597a4..9f4e73c 100644
--- a/lisp/leim/quail/pypunct-b5.el
+++ b/lisp/leim/quail/pypunct-b5.el
@@ -5,7 +5,7 @@
 ;;   National Institute of Advanced Industrial Science and Technology (AIST)
 ;;   Registration Number H14PRO021
 
-;; Author: Ken'ichi HANDA <address@hidden>
+;; Author: Ken'ichi Handa <address@hidden>
 
 ;; Keywords: multilingual, input method, Chinese
 
diff --git a/lisp/linum.el b/lisp/linum.el
index 0b4b008..6fe3057 100644
--- a/lisp/linum.el
+++ b/lisp/linum.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2008-2019 Free Software Foundation, Inc.
 
 ;; Author: Markus Triska <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: convenience
 ;; Version: 0.9x
 
diff --git a/lisp/loadhist.el b/lisp/loadhist.el
index 4e5d8e0..69f2c0b 100644
--- a/lisp/loadhist.el
+++ b/lisp/loadhist.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1995, 1998, 2000-2019 Free Software Foundation, Inc.
 
 ;; Author: Eric S. Raymond <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: internal
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/loadup.el b/lisp/loadup.el
index 67e8aa7..c43d147 100644
--- a/lisp/loadup.el
+++ b/lisp/loadup.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1985-1986, 1992, 1994, 2001-2019 Free Software
 ;; Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: internal
 ;; Package: emacs
 
diff --git a/lisp/lpr.el b/lisp/lpr.el
index 436f9e3..17a37f1 100644
--- a/lisp/lpr.el
+++ b/lisp/lpr.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1985, 1988, 1992, 1994, 2001-2019 Free Software
 ;; Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: unix
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el
index 1f2c468..7ab97eb 100644
--- a/lisp/ls-lisp.el
+++ b/lisp/ls-lisp.el
@@ -4,7 +4,6 @@
 
 ;; Author: Sebastian Kremer <address@hidden>
 ;; Modified by: Francis J. Wright <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: unix, dired
 ;; Package: emacs
 
diff --git a/lisp/macros.el b/lisp/macros.el
index 4b38506..b9020a2 100644
--- a/lisp/macros.el
+++ b/lisp/macros.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1985-1987, 1992, 1994-1995, 2001-2019 Free Software
 ;; Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: abbrev
 ;; Package: emacs
 
diff --git a/lisp/mail/blessmail.el b/lisp/mail/blessmail.el
index 62094bf..2a2ff3d 100644
--- a/lisp/mail/blessmail.el
+++ b/lisp/mail/blessmail.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 1994, 2001-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: internal
 ;; Package: emacs
 
diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el
index c637e24..2cd6d56 100644
--- a/lisp/mail/emacsbug.el
+++ b/lisp/mail/emacsbug.el
@@ -4,7 +4,6 @@
 ;; Foundation, Inc.
 
 ;; Author: K. Shane Hartman
-;; Maintainer: address@hidden
 ;; Keywords: maint mail
 ;; Package: emacs
 
diff --git a/lisp/mail/feedmail.el b/lisp/mail/feedmail.el
index a90d9c4..180e32b 100644
--- a/lisp/mail/feedmail.el
+++ b/lisp/mail/feedmail.el
@@ -1657,7 +1657,7 @@ local gurus."
 (declare-function smtp-via-smtp "ext:smtp" (sender recipients 
smtp-text-buffer))
 (defvar smtp-server)
 
-;; FLIM's smtp.el pointed out to me by Kenichi Handa <address@hidden>
+;; FLIM's smtp.el pointed out to me by Kenichi Handa <address@hidden>
 (defun feedmail-buffer-to-smtp (prepped errors-to addr-listoid)
   "Function which actually calls smtp-via-smtp to send buffer as e-mail."
   (feedmail-say-debug ">in-> feedmail-buffer-to-smtp %s" addr-listoid)
diff --git a/lisp/mail/hashcash.el b/lisp/mail/hashcash.el
index 6068952..ec17d66 100644
--- a/lisp/mail/hashcash.el
+++ b/lisp/mail/hashcash.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2003-2005, 2007-2019 Free Software Foundation, Inc.
 
 ;; Written by: Paul Foley <address@hidden> (1997-2002)
-;; Maintainer: address@hidden
 ;; Keywords: mail, hashcash
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/mail/mail-extr.el b/lisp/mail/mail-extr.el
index c1e90c3..e610806 100644
--- a/lisp/mail/mail-extr.el
+++ b/lisp/mail/mail-extr.el
@@ -4,7 +4,6 @@
 ;; Inc.
 
 ;; Author: Joe Wells <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: mail
 ;; Package: mail-utils
 
diff --git a/lisp/mail/mail-utils.el b/lisp/mail/mail-utils.el
index cbcbdfa..f561c08 100644
--- a/lisp/mail/mail-utils.el
+++ b/lisp/mail/mail-utils.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 1985, 2001-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: mail, news
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/mail/mailabbrev.el b/lisp/mail/mailabbrev.el
index d59df88..17f4f0c 100644
--- a/lisp/mail/mailabbrev.el
+++ b/lisp/mail/mailabbrev.el
@@ -4,7 +4,6 @@
 ;; Software Foundation, Inc.
 
 ;; Author: Jamie Zawinski <address@hidden; now address@hidden>
-;; Maintainer: address@hidden
 ;; Created: 19 Oct 90
 ;; Keywords: mail
 
diff --git a/lisp/mail/mailalias.el b/lisp/mail/mailalias.el
index 42896c1..68e44f8 100644
--- a/lisp/mail/mailalias.el
+++ b/lisp/mail/mailalias.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1985, 1987, 1995-1997, 2001-2019 Free Software
 ;; Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: mail
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/mail/reporter.el b/lisp/mail/reporter.el
index 10db110..3172c97 100644
--- a/lisp/mail/reporter.el
+++ b/lisp/mail/reporter.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1993-1998, 2001-2019 Free Software Foundation, Inc.
 
 ;; Author:          1993-1998 Barry A. Warsaw
-;; Maintainer: address@hidden
 ;; Created:         19-Apr-1993
 ;; Keywords: maint mail tools
 
diff --git a/lisp/mail/rfc822.el b/lisp/mail/rfc822.el
index a53a77e..4cf624c 100644
--- a/lisp/mail/rfc822.el
+++ b/lisp/mail/rfc822.el
@@ -4,7 +4,6 @@
 ;; Inc.
 
 ;; Author: Richard Mlynarik <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: mail
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 91291b8..d0ebf7d 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1985-1988, 1993-1998, 2000-2019 Free Software
 ;; Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: mail
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/mail/rmailedit.el b/lisp/mail/rmailedit.el
index 01d5524..a9ce1e6 100644
--- a/lisp/mail/rmailedit.el
+++ b/lisp/mail/rmailedit.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 1985, 1994, 2001-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: mail
 ;; Package: rmail
 
diff --git a/lisp/mail/rmailkwd.el b/lisp/mail/rmailkwd.el
index 9427796..ee71ab4 100644
--- a/lisp/mail/rmailkwd.el
+++ b/lisp/mail/rmailkwd.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1985, 1988, 1994, 2001-2019 Free Software Foundation,
 ;; Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: mail
 ;; Package: rmail
 
diff --git a/lisp/mail/rmailmm.el b/lisp/mail/rmailmm.el
index af52813..d32147f 100644
--- a/lisp/mail/rmailmm.el
+++ b/lisp/mail/rmailmm.el
@@ -4,7 +4,6 @@
 
 ;; Author: Alexander Pohoyda
 ;;     Alex Schroeder
-;; Maintainer: address@hidden
 ;; Keywords: mail
 ;; Package: rmail
 
diff --git a/lisp/mail/rmailmsc.el b/lisp/mail/rmailmsc.el
index ba0c2ae..4c42935 100644
--- a/lisp/mail/rmailmsc.el
+++ b/lisp/mail/rmailmsc.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 1985, 2001-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: mail
 ;; Package: rmail
 
diff --git a/lisp/mail/rmailout.el b/lisp/mail/rmailout.el
index 12d3761..d956708 100644
--- a/lisp/mail/rmailout.el
+++ b/lisp/mail/rmailout.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1985, 1987, 1993-1994, 2001-2019 Free Software
 ;; Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: mail
 ;; Package: rmail
 
diff --git a/lisp/mail/rmailsort.el b/lisp/mail/rmailsort.el
index 4a70103..18185ec 100644
--- a/lisp/mail/rmailsort.el
+++ b/lisp/mail/rmailsort.el
@@ -4,7 +4,6 @@
 ;; Inc.
 
 ;; Author: Masanobu UMEDA <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: mail
 ;; Package: rmail
 
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el
index 79a322c..80cfbfd 100644
--- a/lisp/mail/rmailsum.el
+++ b/lisp/mail/rmailsum.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1985, 1993-1996, 2000-2019 Free Software Foundation,
 ;; Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: mail
 ;; Package: rmail
 
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index 208ebb6..0db0557 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1985-1986, 1992-1996, 1998, 2000-2019 Free Software
 ;; Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: mail
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/mail/supercite.el b/lisp/mail/supercite.el
index ad69dca..3173246 100644
--- a/lisp/mail/supercite.el
+++ b/lisp/mail/supercite.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1993, 1997, 2001-2019 Free Software Foundation, Inc.
 
 ;; Author: 1993 Barry A. Warsaw <address@hidden>
-;; Maintainer: address@hidden
 ;; Created: February 1993
 ;; Keywords: mail, news
 
diff --git a/lisp/mail/undigest.el b/lisp/mail/undigest.el
index bbf3c83..499f16e 100644
--- a/lisp/mail/undigest.el
+++ b/lisp/mail/undigest.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1985-1986, 1994, 1996, 2001-2019 Free Software
 ;; Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: mail
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/mail/unrmail.el b/lisp/mail/unrmail.el
index 4d9ad67..c409210 100644
--- a/lisp/mail/unrmail.el
+++ b/lisp/mail/unrmail.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 1992, 2001-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: mail
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/makesum.el b/lisp/makesum.el
index 10ad78e..847e304 100644
--- a/lisp/makesum.el
+++ b/lisp/makesum.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 1985, 2001-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: help
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/man.el b/lisp/man.el
index d52ca21..feb0e09 100644
--- a/lisp/man.el
+++ b/lisp/man.el
@@ -4,7 +4,6 @@
 ;; Foundation, Inc.
 
 ;; Author: Barry A. Warsaw <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: help
 ;; Adapted-By: ESR, pot
 
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index 4ff60ed..d12cdd7 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1993-1995, 2000-2019 Free Software Foundation, Inc.
 
 ;; Author: Richard M. Stallman
-;; Maintainer: address@hidden
 ;; Keywords: internal, mouse
 ;; Package: emacs
 
diff --git a/lisp/misc.el b/lisp/misc.el
index 4cf6cad..0080762 100644
--- a/lisp/misc.el
+++ b/lisp/misc.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 1989, 2001-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: convenience
 ;; Package: emacs
 
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 8428c1e..af53c05 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 1993-1995, 1999-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: hardware, mouse
 ;; Package: emacs
 
diff --git a/lisp/msb.el b/lisp/msb.el
index 7a1a338..b626624 100644
--- a/lisp/msb.el
+++ b/lisp/msb.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1993-1995, 1997-2019 Free Software Foundation, Inc.
 
 ;; Author: Lars Lindberg <address@hidden>
-;; Maintainer: address@hidden
 ;; Created: 8 Oct 1993
 ;; Lindberg's last update version: 3.34
 ;; Keywords: mouse buffer menu
diff --git a/lisp/mwheel.el b/lisp/mwheel.el
index 23f491d..86788fc 100644
--- a/lisp/mwheel.el
+++ b/lisp/mwheel.el
@@ -1,7 +1,7 @@
 ;;; mwheel.el --- Wheel mouse support
 
 ;; Copyright (C) 1998, 2000-2019 Free Software Foundation, Inc.
-;; Maintainer: William M. Perry <address@hidden>
+;; Maintainer: Bill Perry <address@hidden>
 ;; Keywords: mouse
 ;; Package: emacs
 
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el
index b0a1e17..81b654c 100644
--- a/lisp/net/ange-ftp.el
+++ b/lisp/net/ange-ftp.el
@@ -4,7 +4,6 @@
 ;; Inc.
 
 ;; Author: Andy Norman (address@hidden)
-;; Maintainer: address@hidden
 ;; Keywords: comm
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index aa31e25..0c63cbd 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1995-2019 Free Software Foundation, Inc.
 
 ;; Author: Denis Howe <address@hidden>
-;; Maintainer: address@hidden
 ;; Created: 03 Apr 1995
 ;; Keywords: hypertext, hypermedia, mouse
 
diff --git a/lisp/net/goto-addr.el b/lisp/net/goto-addr.el
index c25d787..d7fd058 100644
--- a/lisp/net/goto-addr.el
+++ b/lisp/net/goto-addr.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1995, 2000-2019 Free Software Foundation, Inc.
 
 ;; Author: Eric Ding <address@hidden>
-;; Maintainer: address@hidden
 ;; Created: 15 Aug 1995
 ;; Keywords: mh-e, www, mouse, mail
 
diff --git a/lisp/net/ldap.el b/lisp/net/ldap.el
index 75fc7d6..2df473c 100644
--- a/lisp/net/ldap.el
+++ b/lisp/net/ldap.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1998-2019 Free Software Foundation, Inc.
 
 ;; Author: Oscar Figueiredo <address@hidden>
-;; Maintainer: address@hidden
 ;; Created: April 1998
 ;; Keywords: comm
 
diff --git a/lisp/net/pop3.el b/lisp/net/pop3.el
index 599e230..1911450 100644
--- a/lisp/net/pop3.el
+++ b/lisp/net/pop3.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1996-2019 Free Software Foundation, Inc.
 
 ;; Author: Richard L. Pieri <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: mail
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/net/socks.el b/lisp/net/socks.el
index 6356707..c9f7419 100644
--- a/lisp/net/socks.el
+++ b/lisp/net/socks.el
@@ -3,7 +3,7 @@
 ;; Copyright (C) 1996-2000, 2002, 2007-2019 Free Software Foundation,
 ;; Inc.
 
-;; Author: William M. Perry <address@hidden>
+;; Author: Bill Perry <address@hidden>
 ;;         Dave Love <address@hidden>
 ;; Keywords: comm, firewalls
 
diff --git a/lisp/net/telnet.el b/lisp/net/telnet.el
index cf3634f..465927d 100644
--- a/lisp/net/telnet.el
+++ b/lisp/net/telnet.el
@@ -4,7 +4,6 @@
 ;; Foundation, Inc.
 
 ;; Author: William F. Schelter
-;; Maintainer: address@hidden
 ;; Keywords: unix, comm
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/newcomment.el b/lisp/newcomment.el
index ab2be08..ac706b9 100644
--- a/lisp/newcomment.el
+++ b/lisp/newcomment.el
@@ -3,7 +3,7 @@
 ;; Copyright (C) 1999-2019 Free Software Foundation, Inc.
 
 ;; Author: code extracted from Emacs-20's simple.el
-;; Maintainer: Stefan Monnier <address@hidden>
+;; Maintainer: Stefan Monnier <address@hidden>
 ;; Keywords: comment uncomment
 ;; Package: emacs
 
diff --git a/lisp/novice.el b/lisp/novice.el
index 3da4e25..1da4b71 100644
--- a/lisp/novice.el
+++ b/lisp/novice.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1985-1987, 1994, 2001-2019 Free Software Foundation,
 ;; Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: internal, help
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/obarray.el b/lisp/obarray.el
index c83d5d4..fbab506 100644
--- a/lisp/obarray.el
+++ b/lisp/obarray.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 2015-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: obarray functions
 ;; Package: emacs
 
diff --git a/lisp/obsolete/abbrevlist.el b/lisp/obsolete/abbrevlist.el
index e2bf14f..dfd7b2b 100644
--- a/lisp/obsolete/abbrevlist.el
+++ b/lisp/obsolete/abbrevlist.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1986, 1992, 2001-2019 Free Software Foundation, Inc.
 ;; Suggested by a previous version by Gildea.
 
-;; Maintainer: address@hidden
 ;; Keywords: abbrev
 ;; Package: emacs
 ;; Obsolete-since: 24.1
diff --git a/lisp/obsolete/bruce.el b/lisp/obsolete/bruce.el
index fba54c1..8044a0e 100644
--- a/lisp/obsolete/bruce.el
+++ b/lisp/obsolete/bruce.el
@@ -4,7 +4,6 @@
 ;; Copyright (C) 1988, 1993, 1997, 2001-2019 Free Software Foundation,
 ;; Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: games
 ;; Created: Jan 1997
 ;; Obsolete-since: 24.3
diff --git a/lisp/obsolete/fast-lock.el b/lisp/obsolete/fast-lock.el
index 5180d45..10af6ab 100644
--- a/lisp/obsolete/fast-lock.el
+++ b/lisp/obsolete/fast-lock.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1994-1998, 2001-2019 Free Software Foundation, Inc.
 
 ;; Author: Simon Marshall <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: faces files
 ;; Version: 3.14
 ;; Obsolete-since: 22.1
diff --git a/lisp/obsolete/gs.el b/lisp/obsolete/gs.el
index cfdc9dc..24c9b67 100644
--- a/lisp/obsolete/gs.el
+++ b/lisp/obsolete/gs.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 1998, 2001-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: internal
 ;; Obsolete-since: 26.1
 
diff --git a/lisp/obsolete/gulp.el b/lisp/obsolete/gulp.el
index bdb3406..373ee35 100644
--- a/lisp/obsolete/gulp.el
+++ b/lisp/obsolete/gulp.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1996, 2001-2019 Free Software Foundation, Inc.
 
 ;; Author: Sam Shteingold <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: maint
 ;; Obsolete-since: 25.1
 
diff --git a/lisp/obsolete/info-edit.el b/lisp/obsolete/info-edit.el
index b64e840..e520faf 100644
--- a/lisp/obsolete/info-edit.el
+++ b/lisp/obsolete/info-edit.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 1985-1986, 1992-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: help
 ;; Obsolete-since: 24.4
 
diff --git a/lisp/obsolete/lazy-lock.el b/lisp/obsolete/lazy-lock.el
index 44f8528..5167928 100644
--- a/lisp/obsolete/lazy-lock.el
+++ b/lisp/obsolete/lazy-lock.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1994-1998, 2001-2019 Free Software Foundation, Inc.
 
 ;; Author: Simon Marshall <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: faces files
 ;; Version: 2.11
 ;; Obsolete-since: 22.1
diff --git a/lisp/obsolete/ledit.el b/lisp/obsolete/ledit.el
index 6383a42..91efa29 100644
--- a/lisp/obsolete/ledit.el
+++ b/lisp/obsolete/ledit.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 1985, 2001-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: languages
 ;; Obsolete-since: 24.3
 
diff --git a/lisp/obsolete/levents.el b/lisp/obsolete/levents.el
index 714b3fb..f2b081d 100644
--- a/lisp/obsolete/levents.el
+++ b/lisp/obsolete/levents.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 1993, 2001-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: emulations
 ;; Obsolete-since: 23.2
 
diff --git a/lisp/obsolete/lucid.el b/lisp/obsolete/lucid.el
index d1b702e..9d0c5da 100644
--- a/lisp/obsolete/lucid.el
+++ b/lisp/obsolete/lucid.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 1993, 1995, 2001-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: emulations
 ;; Obsolete-since: 23.2
 
diff --git a/lisp/obsolete/mailpost.el b/lisp/obsolete/mailpost.el
index 2f74faf..33cc43c 100644
--- a/lisp/obsolete/mailpost.el
+++ b/lisp/obsolete/mailpost.el
@@ -6,7 +6,6 @@
 ;; This file is part of GNU Emacs.
 
 ;; Author: Gary Delp <address@hidden>
-;; Maintainer: address@hidden
 ;; Created: 13 Jan 1986
 ;; Keywords: mail
 ;; Obsolete-since: 24.3
diff --git a/lisp/obsolete/meese.el b/lisp/obsolete/meese.el
index 81739df..190db94 100644
--- a/lisp/obsolete/meese.el
+++ b/lisp/obsolete/meese.el
@@ -5,7 +5,6 @@
 
 ;; This file is part of GNU Emacs.
 
-;; Maintainer: address@hidden
 ;; Keywords: games
 ;; Obsolete-since: 24.4
 
diff --git a/lisp/obsolete/pc-mode.el b/lisp/obsolete/pc-mode.el
index 6d1a456..4908b51 100644
--- a/lisp/obsolete/pc-mode.el
+++ b/lisp/obsolete/pc-mode.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 1995, 2001-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: emulations
 ;; Obsolete-since: 24.1
 
diff --git a/lisp/obsolete/rcompile.el b/lisp/obsolete/rcompile.el
index dfa8009..53537a0 100644
--- a/lisp/obsolete/rcompile.el
+++ b/lisp/obsolete/rcompile.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1993-1994, 2001-2019 Free Software Foundation, Inc.
 
 ;; Author: Alon Albert <address@hidden>
-;; Maintainer: address@hidden
 ;; Created: 1993 Oct 6
 ;; Keywords: tools, processes
 ;; Obsolete-since: 24.4
diff --git a/lisp/obsolete/sregex.el b/lisp/obsolete/sregex.el
index 884cd3e..ba36f2d 100644
--- a/lisp/obsolete/sregex.el
+++ b/lisp/obsolete/sregex.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1997-1998, 2000-2019 Free Software Foundation, Inc.
 
 ;; Author: Bob Glickstein <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: extensions
 ;; Obsolete-since: 24.1
 
diff --git a/lisp/obsolete/sup-mouse.el b/lisp/obsolete/sup-mouse.el
index 6bd4278..752ebf5 100644
--- a/lisp/obsolete/sup-mouse.el
+++ b/lisp/obsolete/sup-mouse.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1985-1986, 2001-2019 Free Software Foundation, Inc.
 
 ;; Author: Wolfgang Rupprecht
-;; Maintainer: address@hidden
 ;; Created: 21 Nov 1986
 ;; Keywords: hardware
 ;; Obsolete-since: 24.4
diff --git a/lisp/obsolete/terminal.el b/lisp/obsolete/terminal.el
index ce6f230..d0631b3 100644
--- a/lisp/obsolete/terminal.el
+++ b/lisp/obsolete/terminal.el
@@ -4,7 +4,6 @@
 ;; Foundation, Inc.
 
 ;; Author: Richard Mlynarik <address@hidden>
-;; Maintainer: address@hidden
 ;; Obsolete-since: 24.4
 ;; Keywords: comm, terminals
 
diff --git a/lisp/obsolete/yow.el b/lisp/obsolete/yow.el
index 5cbb2ef..eddb3f9 100644
--- a/lisp/obsolete/yow.el
+++ b/lisp/obsolete/yow.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 1993-1995, 2000-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Author: Richard Mlynarik
 ;; Keywords: games
 ;; Obsolete-since: 24.4
diff --git a/lisp/org/org-id.el b/lisp/org/org-id.el
index 6a9d729..44cc7b2 100644
--- a/lisp/org/org-id.el
+++ b/lisp/org/org-id.el
@@ -83,8 +83,7 @@
 
 (defcustom org-id-link-to-org-use-id nil
   "Non-nil means storing a link to an Org file will use entry IDs.
-\\<org-mode-map>\
-
+\\<org-mode-map>
 The variable can have the following values:
 
 t     Create an ID if needed to make a link to the current entry.
diff --git a/lisp/org/org.el b/lisp/org/org.el
index ce6dd24..119d0a2 100644
--- a/lisp/org/org.el
+++ b/lisp/org/org.el
@@ -863,8 +863,7 @@ depends on, if any."
 
 (defcustom org-support-shift-select nil
   "Non-nil means make shift-cursor commands select text when possible.
-\\<org-mode-map>\
-
+\\<org-mode-map>
 In Emacs 23, when `shift-select-mode' is on, shifted cursor keys
 start selecting a region, or enlarge regions started in this way.
 In Org mode, in special contexts, these same keys are used for
@@ -2259,8 +2258,7 @@ See `org-file-apps'.")
     ("\\.x?html?\\'" . default)
     ("\\.pdf\\'" . default))
   "External applications for opening `file:path' items in a document.
-\\<org-mode-map>\
-
+\\<org-mode-map>
 Org mode uses system defaults for different file types, but
 you can use this variable to set the application for a given file
 extension.  The entries in this list are cons cells where the car identifies
diff --git a/lisp/org/ox-publish.el b/lisp/org/ox-publish.el
index 74312bc..9126647 100644
--- a/lisp/org/ox-publish.el
+++ b/lisp/org/ox-publish.el
@@ -2,7 +2,7 @@
 ;; Copyright (C) 2006-2019 Free Software Foundation, Inc.
 
 ;; Author: David O'Toole <address@hidden>
-;; Maintainer: Carsten Dominik <carsten DOT dominik AT gmail DOT com>
+;; Maintainer: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: hypermedia, outlines, wp
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/outline.el b/lisp/outline.el
index 74df77b..7783d37 100644
--- a/lisp/outline.el
+++ b/lisp/outline.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1986, 1993-1995, 1997, 2000-2019 Free Software
 ;; Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: outlines
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/paren.el b/lisp/paren.el
index 13908d4..d00e7d9 100644
--- a/lisp/paren.el
+++ b/lisp/paren.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1993, 1996, 2001-2019 Free Software Foundation, Inc.
 
 ;; Author: address@hidden
-;; Maintainer: address@hidden
 ;; Keywords: languages, faces
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/play/cookie1.el b/lisp/play/cookie1.el
index e461b37..fb310fa 100644
--- a/lisp/play/cookie1.el
+++ b/lisp/play/cookie1.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1993, 2001-2019 Free Software Foundation, Inc.
 
 ;; Author: Eric S. Raymond <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: games, extensions
 ;; Created: Mon Mar 22 17:06:26 1993
 
diff --git a/lisp/play/dissociate.el b/lisp/play/dissociate.el
index a5880c0..fc76f2b 100644
--- a/lisp/play/dissociate.el
+++ b/lisp/play/dissociate.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 1985, 2001-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: games
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/play/doctor.el b/lisp/play/doctor.el
index b1ab670..e9c78f5 100644
--- a/lisp/play/doctor.el
+++ b/lisp/play/doctor.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1985, 1987, 1994, 1996, 2000-2019 Free Software
 ;; Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: games
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/play/gomoku.el b/lisp/play/gomoku.el
index 6d5553b..562e5c0 100644
--- a/lisp/play/gomoku.el
+++ b/lisp/play/gomoku.el
@@ -4,7 +4,6 @@
 ;; Inc.
 
 ;; Author: Philippe Schnoebelen <address@hidden>
-;; Maintainer: address@hidden
 ;; Adapted-By: ESR, Daniel Pfeiffer <address@hidden>
 ;; Keywords: games
 
diff --git a/lisp/play/hanoi.el b/lisp/play/hanoi.el
index d762290..1f2e2c0 100644
--- a/lisp/play/hanoi.el
+++ b/lisp/play/hanoi.el
@@ -1,7 +1,6 @@
 ;;; hanoi.el --- towers of hanoi in Emacs
 
 ;; Author: Damon Anton Permezel
-;; Maintainer: address@hidden
 ;; Keywords: games
 
 ; Author (a) 1985, Damon Anton Permezel
diff --git a/lisp/play/life.el b/lisp/play/life.el
index 6cce1e5..7d9f147 100644
--- a/lisp/play/life.el
+++ b/lisp/play/life.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1988, 2001-2019 Free Software Foundation, Inc.
 
 ;; Author: Kyle Jones <kyleuunet.uu.net>
-;; Maintainer: address@hidden
 ;; Keywords: games
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/play/spook.el b/lisp/play/spook.el
index d884c0a..c1394a3 100644
--- a/lisp/play/spook.el
+++ b/lisp/play/spook.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 1988, 1993, 2001-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: games
 ;; Created: May 1987
 
diff --git a/lisp/play/studly.el b/lisp/play/studly.el
index ff1bf03..6d54f6d 100644
--- a/lisp/play/studly.el
+++ b/lisp/play/studly.el
@@ -5,7 +5,6 @@
 
 ;; This file is part of GNU Emacs.
 
-;; Maintainer: address@hidden
 ;; Keywords: games
 
 ;;; Commentary:
diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el
index e01f1e8..50f7b4c 100644
--- a/lisp/progmodes/ada-mode.el
+++ b/lisp/progmodes/ada-mode.el
@@ -5,7 +5,7 @@
 ;; Author: Rolf Ebert      <address@hidden>
 ;;      Markus Heritsch <address@hidden>
 ;;      Emmanuel Briot  <address@hidden>
-;; Maintainer: Stephen Leake <address@hidden>
+;; Maintainer: Stephen Leake <address@hidden>
 ;; Keywords: languages ada
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/progmodes/asm-mode.el b/lisp/progmodes/asm-mode.el
index c56d16e..491b780 100644
--- a/lisp/progmodes/asm-mode.el
+++ b/lisp/progmodes/asm-mode.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1991, 2001-2019 Free Software Foundation, Inc.
 
 ;; Author: Eric S. Raymond <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: tools, languages
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/progmodes/cc-align.el b/lisp/progmodes/cc-align.el
index 009f58e..74548f6 100644
--- a/lisp/progmodes/cc-align.el
+++ b/lisp/progmodes/cc-align.el
@@ -90,26 +90,26 @@ Works with: topmost-intro-cont."
 
 (defun c-lineup-gnu-DEFUN-intro-cont (langelem)
   "Line up the continuation lines of a DEFUN macro in the Emacs C source.
-These lines are indented as though they were `knr-argdecl-intro' lines.
+These lines are indented `c-basic-offset' columns, usually from column 0.
 Return nil when we're not in such a construct.
 
-This function is for historical compatibility with how previous CC Modes (5.28
-and earlier) indented such lines.
+This function was formally for use in DEFUNs, which used to have knr
+argument lists.  Now (2019-05) it just indents the argument list of the
+DEFUN's function, which would otherwise go to column 0.
 
 Here is an example:
 
 DEFUN (\"forward-char\", Fforward_char, Sforward_char, 0, 1, \"p\",
        doc: /* Move point right N characters (left if N is negative).
 On reaching end of buffer, stop and signal error.  */)
-     (n)                      <- c-lineup-gnu-DEFUN-into-cont
-     Lisp_Object n;           <- c-lineup-gnu-DEFUN-into-cont
+  (Lisp_Object n)             <- c-lineup-gnu-DEFUN-into-cont
 
 Works with: topmost-intro-cont."
   (save-excursion
     (let (case-fold-search)
       (goto-char (c-langelem-pos langelem))
       (if (looking-at "\\<DEFUN\\>")
-         (c-calc-offset '(knr-argdecl-intro))))))
+         c-basic-offset))))
 
 (defun c-block-in-arglist-dwim (arglist-start)
   ;; This function implements the DWIM to avoid far indentation of
diff --git a/lisp/progmodes/cc-awk.el b/lisp/progmodes/cc-awk.el
index 1a67a95..ff4ea1a 100644
--- a/lisp/progmodes/cc-awk.el
+++ b/lisp/progmodes/cc-awk.el
@@ -4,7 +4,6 @@
 ;; Inc.
 
 ;; Author: Alan Mackenzie <address@hidden> (originally based on awk-mode.el)
-;; Maintainer: address@hidden
 ;; Keywords: AWK, cc-mode, unix, languages
 ;; Package: cc-mode
 
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index c0f044d..c043367 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -7245,78 +7245,33 @@ comment at the start of cc-engine.el for more info."
          (c-depropertize-raw-strings-in-region found-beg (point))))))
 
 (defun c-maybe-re-mark-raw-string ()
-  ;; When this function is called, point is immediately after a ".  If this "
-  ;; is the characteristic " of of a raw string delimiter, apply the pertinent
-  ;; `syntax-table' text properties to the entire raw string (when properly
-  ;; terminated) or just the delimiter (otherwise).
+  ;; When this function is called, point is immediately after a " which opens
+  ;; a string.  If this " is the characteristic " of of a raw string
+  ;; opener, apply the pertinent `syntax-table' text properties to the
+  ;; entire raw string (when properly terminated) or just the delimiter
+  ;; (otherwise).  In either of these cases, return t, otherwise return nil.
   ;;
-  ;; If the " is in any way part of a raw string, return non-nil.  Otherwise
-  ;; return nil.
   (let ((here (point))
        in-macro macro-end id Rquote found)
-    (cond
-     ((and
-       (eq (char-before (1- (point))) ?R)
-       (looking-at "\\([^ ()\\\n\r\t]\\{0,16\\}\\)("))
+    (when
+       (and
+        (eq (char-before (1- (point))) ?R)
+        (looking-at "\\([^ ()\\\n\r\t]\\{0,16\\}\\)("))
       (save-excursion
        (setq in-macro (c-beginning-of-macro))
        (setq macro-end (when in-macro
                          (c-end-of-macro)
                          (point) ;; (min (1+ (point)) (point-max))
                          )))
-      (if (not
+      (when
+         (not
           (c-propertize-raw-string-opener
            (match-string-no-properties 1) ; id
            (1- (point))                   ; open quote
            (match-end 1)                  ; open paren
            macro-end))              ; bound (end of macro) or nil.
-         (goto-char (or macro-end (point-max))))
-      t)
-     ((save-excursion
-       (and
-        (search-backward-regexp ")\\([^ ()\\\n\r\t]\\{0,16\\}\\)\"\\="
-                                (c-point 'bol) t)
-        (setq id (match-string-no-properties 1))
-        (let* ((quoted-id (regexp-quote id))
-               (quoted-id-depth (regexp-opt-depth quoted-id)))
-          (while
-              (and
-               ;; Search back for an opening delimiter with identifier `id'.
-               ;; A closing delimiter with `id' "blocks" our search.
-               (search-backward-regexp ; This could be slow.
-                (concat "\\(R\"" quoted-id "(\\)"
-                        "\\|"
-                        "\\()" quoted-id "\"\\)")
-                nil t)
-               (setq found t)
-               (if (eq (c-in-literal) 'string)
-                   (match-beginning 1)
-                 (match-beginning (+ 2 quoted-id-depth)))))
-          (and found
-               (null (c-in-literal))
-               (match-beginning 1)))
-        (setq Rquote (point))))
-      (save-excursion
-       (goto-char Rquote)
-       (setq in-macro (c-beginning-of-macro))
-       (setq macro-end (when in-macro
-                         (c-end-of-macro)
-                         (point))))
-      (if (or (not in-macro)
-             (<= here macro-end))
-         (progn
-           (c-propertize-raw-string-opener
-            id (1+ (point)) (match-end 1) macro-end)
-           (goto-char here)
-           t)
-       (goto-char here)
-       nil))
-
-     (t
-      ;; If the " is in another part of a raw string (whether as part of the
-      ;; identifier, or in the string itself) the `syntax-table' text
-      ;; properties on the raw string will be current.  So, we can use...
-      (c-raw-string-pos)))))
+       (goto-char (or macro-end (point-max))))
+      t)))
 
 
 ;; Handling of small scale constructs like types and names.
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 1a0d9bd..3930f09 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -5,7 +5,6 @@
 
 ;; Authors: Roland McGrath <address@hidden>,
 ;;         Daniel Pfeiffer <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: tools, processes
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index ba007d6..fd3eec7 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -5,7 +5,6 @@
 ;; Author: Ilya Zakharevich
 ;;     Bob Olson
 ;;     Jonathan Rockway <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: languages, Perl
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/progmodes/dcl-mode.el b/lisp/progmodes/dcl-mode.el
index d5803c7..757f0f2 100644
--- a/lisp/progmodes/dcl-mode.el
+++ b/lisp/progmodes/dcl-mode.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1997, 2001-2019 Free Software Foundation, Inc.
 
 ;; Author: Odd Gripenstam <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: DCL editing major-mode languages
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/progmodes/ebrowse.el b/lisp/progmodes/ebrowse.el
index 3faec49..0f44487 100644
--- a/lisp/progmodes/ebrowse.el
+++ b/lisp/progmodes/ebrowse.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1992-2019 Free Software Foundation, Inc.
 
 ;; Author: Gerd Moellmann <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: C++ tags tools
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index cb1b17b..d62c131 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 1985-1986, 1999-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: lisp, languages
 ;; Package: emacs
 
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el
index 910c320..54ca135 100644
--- a/lisp/progmodes/etags.el
+++ b/lisp/progmodes/etags.el
@@ -4,7 +4,6 @@
 ;; Software Foundation, Inc.
 
 ;; Author: Roland McGrath <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: tools
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index 716f40c..e09aaa3 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2007-2019 Free Software Foundation, Inc.
 
 ;; Author: Nick Roberts <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: unix, tools
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index 79178c4..d094c95 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -4,7 +4,6 @@
 ;; Foundation, Inc.
 
 ;; Author: Roland McGrath <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: tools, processes
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index 4306f5d..f5680f2 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -4,7 +4,6 @@
 ;; Inc.
 
 ;; Author: Eric S. Raymond <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: unix, tools
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el
index cffb749..c3ff235 100644
--- a/lisp/progmodes/make-mode.el
+++ b/lisp/progmodes/make-mode.el
@@ -4,7 +4,6 @@
 
 ;; Author: Thomas Neumann <address@hidden>
 ;;     Eric S. Raymond <address@hidden>
-;; Maintainer: address@hidden
 ;; Adapted-By: ESR
 ;; Keywords: unix, tools
 
diff --git a/lisp/progmodes/mixal-mode.el b/lisp/progmodes/mixal-mode.el
index a759709..1dd5d51 100644
--- a/lisp/progmodes/mixal-mode.el
+++ b/lisp/progmodes/mixal-mode.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2003-2019 Free Software Foundation, Inc.
 
 ;; Author: Pieter E.J. Pareit <address@hidden>
-;; Maintainer: address@hidden
 ;; Created: 09 Nov 2002
 ;; Version: 0.1
 ;; Keywords: languages, Knuth, mix, mixal, asm, mixvm, The Art Of Computer 
Programming
diff --git a/lisp/progmodes/modula2.el b/lisp/progmodes/modula2.el
index aa41230..087d1f6 100644
--- a/lisp/progmodes/modula2.el
+++ b/lisp/progmodes/modula2.el
@@ -2,7 +2,6 @@
 
 ;; Author: Michael Schmidt <address@hidden>
 ;;     Tom Perrine <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: languages
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el
index 8a7e24e..4d4e2e1 100644
--- a/lisp/progmodes/octave.el
+++ b/lisp/progmodes/octave.el
@@ -4,7 +4,6 @@
 
 ;; Author: Kurt Hornik <address@hidden>
 ;;        John Eaton <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: languages
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el
index 7cbd30a..f01d6b6 100644
--- a/lisp/progmodes/perl-mode.el
+++ b/lisp/progmodes/perl-mode.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1990, 1994, 2001-2019 Free Software Foundation, Inc.
 
 ;; Author: William F. Mann
-;; Maintainer: address@hidden
 ;; Adapted-By: ESR
 ;; Keywords: languages
 
diff --git a/lisp/progmodes/prog-mode.el b/lisp/progmodes/prog-mode.el
index 2b05735..bd56d1a 100644
--- a/lisp/progmodes/prog-mode.el
+++ b/lisp/progmodes/prog-mode.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 2013-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: internal
 ;; Package: emacs
 
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index d494efa..88ea59b 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -447,14 +447,14 @@ pattern to search for."
     (read-regexp "Find regexp" (and id (regexp-quote id)))))
 
 ;;;###autoload
-(defun project-find-file (&optional filename)
+(defun project-find-file ()
   "Visit a file (with completion) in the current project's roots.
 The completion default is the filename at point, if one is
 recognized."
   (interactive)
   (let* ((pr (project-current t))
          (dirs (project-roots pr)))
-    (project-find-file-in (or filename (thing-at-point 'filename)) dirs pr)))
+    (project-find-file-in (thing-at-point 'filename) dirs pr)))
 
 ;;;###autoload
 (defun project-or-external-find-file ()
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 188bc97..74e865b 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -6,7 +6,6 @@
 ;; URL: https://github.com/fgallina/python.el
 ;; Version: 0.26.1
 ;; Package-Requires: ((emacs "24.1") (cl-lib "1.0"))
-;; Maintainer: address@hidden
 ;; Created: Jul 2010
 ;; Keywords: languages
 
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index 853a350..8f52a36 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -5,7 +5,6 @@
 
 ;; Author: Daniel Pfeiffer <address@hidden>
 ;; Version: 2.0f
-;; Maintainer: address@hidden
 ;; Keywords: languages, unix
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/progmodes/tcl.el b/lisp/progmodes/tcl.el
index ffb3d41..31315e2 100644
--- a/lisp/progmodes/tcl.el
+++ b/lisp/progmodes/tcl.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 1994, 1998-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Author: Tom Tromey <address@hidden>
 ;;    Chris Lindblad <address@hidden>
 ;; Keywords: languages tcl modes
diff --git a/lisp/progmodes/xscheme.el b/lisp/progmodes/xscheme.el
index 62c42d3..7ae4712 100644
--- a/lisp/progmodes/xscheme.el
+++ b/lisp/progmodes/xscheme.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1986-1987, 1989-1990, 2001-2019 Free Software
 ;; Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: languages, lisp
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/ps-bdf.el b/lisp/ps-bdf.el
index be80b4a..2e75e53 100644
--- a/lisp/ps-bdf.el
+++ b/lisp/ps-bdf.el
@@ -9,7 +9,7 @@
 ;;   National Institute of Advanced Industrial Science and Technology (AIST)
 ;;   Registration Number H13PRO009
 
-;; Author: Kenichi Handa <address@hidden>
+;; Author: Kenichi Handa <address@hidden>
 ;; (according to ack.texi)
 ;; Keywords: wp, BDF, font, PostScript
 ;; Package: ps-print
diff --git a/lisp/ps-def.el b/lisp/ps-def.el
index 2063133..d248556 100644
--- a/lisp/ps-def.el
+++ b/lisp/ps-def.el
@@ -3,8 +3,8 @@
 ;; Copyright (C) 2007-2019 Free Software Foundation, Inc.
 
 ;; Author: Vinicius Jose Latorre <address@hidden>
-;;     Kenichi Handa <address@hidden> (multi-byte characters)
-;; Maintainer: Kenichi Handa <address@hidden> (multi-byte characters)
+;;     Kenichi Handa <address@hidden> (multi-byte characters)
+;; Maintainer: Kenichi Handa <address@hidden> (multi-byte characters)
 ;;     Vinicius Jose Latorre <address@hidden>
 ;; Keywords: wp, print, PostScript
 ;; X-URL: http://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre
diff --git a/lisp/ps-mule.el b/lisp/ps-mule.el
index c88d6d2..537ba96 100644
--- a/lisp/ps-mule.el
+++ b/lisp/ps-mule.el
@@ -3,8 +3,8 @@
 ;; Copyright (C) 1998-2019 Free Software Foundation, Inc.
 
 ;; Author: Vinicius Jose Latorre <address@hidden>
-;;     Kenichi Handa <address@hidden> (multi-byte characters)
-;; Maintainer: Kenichi Handa <address@hidden> (multi-byte characters)
+;;     Kenichi Handa <address@hidden> (multi-byte characters)
+;; Maintainer: Kenichi Handa <address@hidden> (multi-byte characters)
 ;;     Vinicius Jose Latorre <address@hidden>
 ;; Keywords: wp, print, PostScript, multibyte, mule
 ;; Package: ps-print
diff --git a/lisp/ps-print.el b/lisp/ps-print.el
index 59ac84a..d0d9cbe 100644
--- a/lisp/ps-print.el
+++ b/lisp/ps-print.el
@@ -5,8 +5,8 @@
 ;; Author: Jim Thompson (was <address@hidden>)
 ;;     Jacques Duthen (was <address@hidden>)
 ;;     Vinicius Jose Latorre <address@hidden>
-;;     Kenichi Handa <address@hidden> (multi-byte characters)
-;; Maintainer: Kenichi Handa <address@hidden> (multi-byte characters)
+;;     Kenichi Handa <address@hidden> (multi-byte characters)
+;; Maintainer: Kenichi Handa <address@hidden> (multi-byte characters)
 ;;     Vinicius Jose Latorre <address@hidden>
 ;; Keywords: wp, print, PostScript
 ;; Version: 7.3.5
@@ -1405,7 +1405,7 @@ Please send all bug fixes and enhancements to
 ;; prologue code suggestion, for odd/even printing suggestion and for
 ;; `ps-prologue-file' enhancement.
 ;;
-;; Thanks to Ken'ichi Handa <address@hidden> for multi-byte buffer handling.
+;; Thanks to Ken'ichi Handa <address@hidden> for multi-byte buffer handling.
 ;;
 ;; Thanks to Matthew O Persico <address@hidden> for line number on
 ;; empty columns.
diff --git a/lisp/ps-samp.el b/lisp/ps-samp.el
index 784b435..99c17c7 100644
--- a/lisp/ps-samp.el
+++ b/lisp/ps-samp.el
@@ -5,8 +5,8 @@
 ;; Author: Jim Thompson (was <address@hidden>)
 ;;     Jacques Duthen (was <address@hidden>)
 ;;     Vinicius Jose Latorre <address@hidden>
-;;     Kenichi Handa <address@hidden> (multi-byte characters)
-;; Maintainer: Kenichi Handa <address@hidden> (multi-byte characters)
+;;     Kenichi Handa <address@hidden> (multi-byte characters)
+;; Maintainer: Kenichi Handa <address@hidden> (multi-byte characters)
 ;;     Vinicius Jose Latorre <address@hidden>
 ;; Keywords: wp, print, PostScript
 ;; X-URL: http://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre
diff --git a/lisp/register.el b/lisp/register.el
index 775e1a2..d3825fe 100644
--- a/lisp/register.el
+++ b/lisp/register.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1985, 1993-1994, 2001-2019 Free Software Foundation,
 ;; Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: internal
 ;; Package: emacs
 
diff --git a/lisp/replace.el b/lisp/replace.el
index 9d1b7bf..00b8be5 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1985-1987, 1992, 1994, 1996-1997, 2000-2019 Free
 ;; Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Package: emacs
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/reposition.el b/lisp/reposition.el
index 22f9986..0416845 100644
--- a/lisp/reposition.el
+++ b/lisp/reposition.el
@@ -4,7 +4,6 @@
 
 ;; Author: Michael D. Ernst <address@hidden>
 ;; Created: Jan 1991
-;; Maintainer: address@hidden
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/rot13.el b/lisp/rot13.el
index 8f4044d..bdb2e4b 100644
--- a/lisp/rot13.el
+++ b/lisp/rot13.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1988, 2001-2019 Free Software Foundation, Inc.
 
 ;; Author: Howard Gayle
-;; Maintainer: address@hidden
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/savehist.el b/lisp/savehist.el
index fb3b748..84cba61 100644
--- a/lisp/savehist.el
+++ b/lisp/savehist.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1997, 2005-2019 Free Software Foundation, Inc.
 
 ;; Author: Hrvoje Niksic <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: minibuffer
 ;; Version: 24
 
diff --git a/lisp/saveplace.el b/lisp/saveplace.el
index 730d31e..960cace 100644
--- a/lisp/saveplace.el
+++ b/lisp/saveplace.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1993-1994, 2001-2019 Free Software Foundation, Inc.
 
 ;; Author: Karl Fogel <address@hidden>
-;; Maintainer: address@hidden
 ;; Created: July, 1993
 ;; Keywords: bookmarks, placeholders
 
diff --git a/lisp/scroll-bar.el b/lisp/scroll-bar.el
index dc0df7a..4fc9df8 100644
--- a/lisp/scroll-bar.el
+++ b/lisp/scroll-bar.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 1993-1995, 1999-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: hardware
 ;; Package: emacs
 
diff --git a/lisp/scroll-lock.el b/lisp/scroll-lock.el
index 8281edb..7212732 100644
--- a/lisp/scroll-lock.el
+++ b/lisp/scroll-lock.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2005-2019 Free Software Foundation, Inc.
 
 ;; Author: Ralf Angeli <address@hidden>
-;; Maintainer: address@hidden
 ;; Created: 2005-06-18
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/select.el b/lisp/select.el
index af6bf46..a8adc16 100644
--- a/lisp/select.el
+++ b/lisp/select.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 1993-1994, 2001-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: internal
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/server.el b/lisp/server.el
index 436a44a..f692673 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -4,7 +4,6 @@
 ;; Inc.
 
 ;; Author: William Sommerfeld <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: processes
 
 ;; Changes by address@hidden and by rms.
diff --git a/lisp/ses.el b/lisp/ses.el
index 73157d6..7fdacc7 100644
--- a/lisp/ses.el
+++ b/lisp/ses.el
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2002-2019 Free Software Foundation, Inc.
 
 ;; Author: Jonathan Yavner <address@hidden>
-;; Maintainer: Vincent Belaïche  <address@hidden>
+;; Maintainer: Vincent Belaïche <address@hidden>
 ;; Keywords: spreadsheet Dijkstra
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/shell.el b/lisp/shell.el
index 5357027..6e2ae85 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -5,7 +5,6 @@
 
 ;; Author: Olin Shivers <address@hidden>
 ;;     Simon Marshall <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: processes
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/simple.el b/lisp/simple.el
index 4454791..c0e8d58 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 1985-1987, 1993-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: internal
 ;; Package: emacs
 
diff --git a/lisp/skeleton.el b/lisp/skeleton.el
index bce73d6..1d06b64 100644
--- a/lisp/skeleton.el
+++ b/lisp/skeleton.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1993-1996, 2001-2019 Free Software Foundation, Inc.
 
 ;; Author: Daniel Pfeiffer <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: extensions, abbrev, languages, tools
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/sort.el b/lisp/sort.el
index 6ea1c44..86cb180 100644
--- a/lisp/sort.el
+++ b/lisp/sort.el
@@ -4,7 +4,6 @@
 ;; Foundation, Inc.
 
 ;; Author: Howie Kaye
-;; Maintainer: address@hidden
 ;; Keywords: unix
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/soundex.el b/lisp/soundex.el
index 1f1f9ca..9e4c797 100644
--- a/lisp/soundex.el
+++ b/lisp/soundex.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1993, 2001-2019 Free Software Foundation, Inc.
 
 ;; Author: Christian Plaunt <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: matching
 ;; Created: Sat May 15 14:48:18 1993
 
diff --git a/lisp/startup.el b/lisp/startup.el
index 421a6ea..a88118e 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1985-1986, 1992, 1994-2019 Free Software Foundation,
 ;; Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: internal
 ;; Package: emacs
 
diff --git a/lisp/strokes.el b/lisp/strokes.el
index 9265b8a..29daaa5 100644
--- a/lisp/strokes.el
+++ b/lisp/strokes.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1997, 2000-2019 Free Software Foundation, Inc.
 
 ;; Author: David Bakhash <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: lisp, mouse, extensions
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/subr.el b/lisp/subr.el
index 05fb9fe..c97d9b9 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1985-1986, 1992, 1994-1995, 1999-2019 Free Software
 ;; Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: internal
 ;; Package: emacs
 
diff --git a/lisp/t-mouse.el b/lisp/t-mouse.el
index 14b292d..1f4be16 100644
--- a/lisp/t-mouse.el
+++ b/lisp/t-mouse.el
@@ -1,7 +1,6 @@
 ;;; t-mouse.el --- mouse support within the text terminal
 
 ;; Author: Nick Roberts <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: mouse gpm linux
 
 ;; Copyright (C) 1994-1995, 1998, 2006-2019 Free Software Foundation,
diff --git a/lisp/tabify.el b/lisp/tabify.el
index 37cd8fb..345771e 100644
--- a/lisp/tabify.el
+++ b/lisp/tabify.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 1985, 1994, 2001-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Package: emacs
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/talk.el b/lisp/talk.el
index 0b7d5db..b5c77a9 100644
--- a/lisp/talk.el
+++ b/lisp/talk.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 1995, 2001-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: comm, frames
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el
index 599da9a..c75fe7c 100644
--- a/lisp/tar-mode.el
+++ b/lisp/tar-mode.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1990-1991, 1993-2019 Free Software Foundation, Inc.
 
 ;; Author: Jamie Zawinski <address@hidden>
-;; Maintainer: address@hidden
 ;; Created: 04 Apr 1990
 ;; Keywords: unix
 
diff --git a/lisp/tempo.el b/lisp/tempo.el
index 28afbec..e3b9c76 100644
--- a/lisp/tempo.el
+++ b/lisp/tempo.el
@@ -1,11 +1,11 @@
-;;; tempo.el --- Flexible template insertion
+;;; tempo.el --- Flexible template insertion -*- lexical-binding: t; -*-
 
 ;; Copyright (C) 1994-1995, 2001-2019 Free Software Foundation, Inc.
 
 ;; Author: David Kågedal <address@hidden>
 ;; Created: 16 Feb 1994
 ;; Kågedal's last version number: 1.2.4
-;; Keywords: extensions, languages, tools
+;; Keywords: abbrev, extensions, languages, tools
 
 ;; This file is part of GNU Emacs.
 
@@ -152,7 +152,7 @@ setting it to (upcase), for example.")
 (defvar tempo-tags nil
   "An association list with tags and corresponding templates.")
 
-(defvar tempo-local-tags '((tempo-tags . nil))
+(defvar-local tempo-local-tags '((tempo-tags . nil))
   "A list of locally installed tag completion lists.
 It is an association list where the car of every element is a symbol
 whose variable value is a template list.  The cdr part, if non-nil,
@@ -161,16 +161,16 @@ documentation for the function `tempo-complete-tag' for 
more info.
 
 `tempo-tags' is always in the last position in this list.")
 
-(defvar tempo-collection nil
+(defvar-local tempo-collection nil
   "A collection of all the tags defined for the current buffer.")
 
-(defvar tempo-dirty-collection t
+(defvar-local tempo-dirty-collection t
   "Indicates if the tag collection needs to be rebuilt.")
 
-(defvar tempo-marks nil
+(defvar-local tempo-marks nil
   "A list of marks to jump to with `\\[tempo-forward-mark]' and 
`\\[tempo-backward-mark]'.")
 
-(defvar tempo-match-finder "\\b\\([[:word:]]+\\)\\="
+(defvar-local tempo-match-finder "\\b\\([[:word:]]+\\)\\="
   "The regexp or function used to find the string to match against tags.
 
 If `tempo-match-finder' is a string, it should contain a regular
@@ -195,23 +195,15 @@ A list of symbols which are bound to functions that take 
one argument.
 This function should return something to be sent to `tempo-insert' if
 it recognizes the argument, and nil otherwise.")
 
-(defvar tempo-named-insertions nil
+(defvar-local tempo-named-insertions nil
   "Temporary storage for named insertions.")
 
-(defvar tempo-region-start (make-marker)
+(defvar-local tempo-region-start (make-marker)
   "Region start when inserting around the region.")
 
-(defvar tempo-region-stop (make-marker)
+(defvar-local tempo-region-stop (make-marker)
   "Region stop when inserting around the region.")
 
-;; Make some variables local to every buffer
-
-(make-variable-buffer-local 'tempo-marks)
-(make-variable-buffer-local 'tempo-local-tags)
-(make-variable-buffer-local 'tempo-match-finder)
-(make-variable-buffer-local 'tempo-collection)
-(make-variable-buffer-local 'tempo-dirty-collection)
-
 ;;; Functions
 
 ;;
@@ -268,11 +260,14 @@ The elements in ELEMENTS can be of several types:
  - `n>': Inserts a newline and indents line.
  - `o': Like `%' but leaves the point before the newline.
  - nil: It is ignored.
- - Anything else: It is evaluated and the result is treated as an
-   element to be inserted.  One additional tag is useful for these
-   cases.  If an expression returns a list (l foo bar), the elements
-   after `l' will be inserted according to the usual rules.  This makes
-   it possible to return several elements from one expression."
+ - Anything else: Each function in `tempo-user-elements' is called
+   with it as argument until one of them returns non-nil, and the
+   result is inserted.  If all of them return nil, it is evaluated and
+   the result is treated as an element to be inserted.  One additional
+   tag is useful for these cases.  If an expression returns a list (l
+   foo bar), the elements after `l' will be inserted according to the
+   usual rules.  This makes it possible to return several elements
+   from one expression."
   (let* ((template-name (intern (concat "tempo-template-"
                                       name)))
         (command-name template-name))
diff --git a/lisp/term/common-win.el b/lisp/term/common-win.el
index b7a778f..d7fceb8 100644
--- a/lisp/term/common-win.el
+++ b/lisp/term/common-win.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 1993-1994, 2001-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: terminals
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/term/pc-win.el b/lisp/term/pc-win.el
index 0927599..c434ea6 100644
--- a/lisp/term/pc-win.el
+++ b/lisp/term/pc-win.el
@@ -4,7 +4,6 @@
 ;; Foundation, Inc.
 
 ;; Author: Morten Welinder <address@hidden>
-;; Maintainer: address@hidden
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/term/tty-colors.el b/lisp/term/tty-colors.el
index 307586f..2718aec 100644
--- a/lisp/term/tty-colors.el
+++ b/lisp/term/tty-colors.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1999-2019 Free Software Foundation, Inc.
 
 ;; Author: Eli Zaretskii
-;; Maintainer: address@hidden
 ;; Keywords: terminals, faces
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/textmodes/bib-mode.el b/lisp/textmodes/bib-mode.el
index 7a5d3ef..de82232 100644
--- a/lisp/textmodes/bib-mode.el
+++ b/lisp/textmodes/bib-mode.el
@@ -4,7 +4,6 @@
 
 ;; Author: Henry Kautz
 ;; (according to authors.el)
-;; Maintainer: address@hidden
 ;; Keywords: bib
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el
index c285491..46dbcfe 100644
--- a/lisp/textmodes/fill.el
+++ b/lisp/textmodes/fill.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1985-1986, 1992, 1994-1997, 1999, 2001-2019 Free
 ;; Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: wp
 ;; Package: emacs
 
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index d18916d..a06f8ed 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1998, 2000-2019 Free Software Foundation, Inc.
 
 ;; Author: Manuel Serrano <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: convenience
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/textmodes/makeinfo.el b/lisp/textmodes/makeinfo.el
index ff3d242..f351b87 100644
--- a/lisp/textmodes/makeinfo.el
+++ b/lisp/textmodes/makeinfo.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1991, 1993, 2001-2019 Free Software Foundation, Inc.
 
 ;; Author: Robert J. Chassell
-;; Maintainer: address@hidden
 ;; Keywords: docs convenience
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/textmodes/nroff-mode.el b/lisp/textmodes/nroff-mode.el
index f33d4df..e5964d1 100644
--- a/lisp/textmodes/nroff-mode.el
+++ b/lisp/textmodes/nroff-mode.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1985-1986, 1994-1995, 1997, 2001-2019 Free Software
 ;; Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: wp
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/textmodes/page.el b/lisp/textmodes/page.el
index 220ef2d..bc92121 100644
--- a/lisp/textmodes/page.el
+++ b/lisp/textmodes/page.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 1985, 2001-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: wp convenience
 ;; Package: emacs
 
diff --git a/lisp/textmodes/paragraphs.el b/lisp/textmodes/paragraphs.el
index 92a6b90..8a1af3a 100644
--- a/lisp/textmodes/paragraphs.el
+++ b/lisp/textmodes/paragraphs.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1985-1987, 1991, 1994-1997, 1999-2019 Free Software
 ;; Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: wp
 ;; Package: emacs
 
diff --git a/lisp/textmodes/picture.el b/lisp/textmodes/picture.el
index b520849..79039bc 100644
--- a/lisp/textmodes/picture.el
+++ b/lisp/textmodes/picture.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1985, 1994, 2001-2019 Free Software Foundation, Inc.
 
 ;; Author: K. Shane Hartman
-;; Maintainer: address@hidden
 ;; Keywords: convenience wp
 
 ;; This file is part of GNU Emacs.
@@ -625,7 +624,6 @@ Leaves the region surrounding the rectangle."
 (defvar picture-mode-map
   (let ((map (make-keymap)))
     (define-key map [remap self-insert-command] 'picture-self-insert)
-    (define-key map [remap self-insert-command] 'picture-self-insert)
     (define-key map [remap completion-separator-self-insert-command]
                          'picture-self-insert)
     (define-key map [remap completion-separator-self-insert-autofilling]
diff --git a/lisp/textmodes/refbib.el b/lisp/textmodes/refbib.el
index 3ba52e6..03b1b04 100644
--- a/lisp/textmodes/refbib.el
+++ b/lisp/textmodes/refbib.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1989, 2001-2019 Free Software Foundation, Inc.
 
 ;; Author: Henry Kautz <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: bib, tex
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/textmodes/refer.el b/lisp/textmodes/refer.el
index f13e1d7..3d4d0d2 100644
--- a/lisp/textmodes/refer.el
+++ b/lisp/textmodes/refer.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1992, 1996, 2001-2019 Free Software Foundation, Inc.
 
 ;; Author: Ashwin Ram <address@hidden>
-;; Maintainer: address@hidden
 ;; Adapted-By: ESR
 ;; Keywords: bib
 
diff --git a/lisp/textmodes/remember.el b/lisp/textmodes/remember.el
index 67ecd3c..efc1108 100644
--- a/lisp/textmodes/remember.el
+++ b/lisp/textmodes/remember.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1999-2001, 2003-2019 Free Software Foundation, Inc.
 
 ;; Author: John Wiegley <address@hidden>
-;; Maintainer: address@hidden
 ;; Created: 29 Mar 1999
 ;; Version: 2.0
 ;; Keywords: data memory todo pim
diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el
index 1b064fb..d0586fd 100644
--- a/lisp/textmodes/sgml-mode.el
+++ b/lisp/textmodes/sgml-mode.el
@@ -4,7 +4,6 @@
 ;; Foundation, Inc.
 
 ;; Author: James Clark <address@hidden>
-;; Maintainer: address@hidden
 ;; Adapted-By: ESR, Daniel Pfeiffer <address@hidden>,
 ;;             address@hidden
 ;; Keywords: wp, hypermedia, comm, languages
@@ -329,6 +328,24 @@ Any terminating `>' or `/' is not matched.")
 (defvar sgml-font-lock-keywords sgml-font-lock-keywords-1
   "Rules for highlighting SGML code.  See also `sgml-tag-face-alist'.")
 
+(defvar-local sgml--syntax-propertize-ppss nil)
+
+(defun sgml--syntax-propertize-ppss (pos)
+  "Return PPSS at POS, fixing the syntax of any lone `>' along the way."
+  (cl-assert (>= pos (car sgml--syntax-propertize-ppss)))
+  (let ((ppss (parse-partial-sexp (car sgml--syntax-propertize-ppss) pos -1
+                                  nil (cdr sgml--syntax-propertize-ppss))))
+    (while (eq -1 (car ppss))
+      (put-text-property (1- (point)) (point)
+                         'syntax-table (string-to-syntax "."))
+      ;; Hack attack: rather than recompute the ppss from
+      ;; (car sgml--syntax-propertize-ppss), we manually "fix it".
+      (setcar ppss 0)
+      (setq ppss (parse-partial-sexp (point) pos -1 nil ppss)))
+    (setcdr sgml--syntax-propertize-ppss ppss)
+    (setcar sgml--syntax-propertize-ppss pos)
+    ppss))
+
 (eval-and-compile
   (defconst sgml-syntax-propertize-rules
     (syntax-propertize-precompile-rules
@@ -345,23 +362,28 @@ Any terminating `>' or `/' is not matched.")
      ;; the resulting number of calls to syntax-ppss made it too slow
      ;; (bug#33887), so we're now careful to leave alone any pair
      ;; of quotes that doesn't hold a < or > char, which is the vast majority.
-     ("\\(?:\\(?1:\"\\)[^\"<>]*[<>\"]\\|\\(?1:'\\)[^'<>]*[<>']\\)"
-      (1 (unless (memq (char-before) '(?\' ?\"))
+     ("\\(?:\\(?1:\"\\)[^\"<>]*\\|\\(?1:'\\)[^'\"<>]*\\)"
+      (1 (if (eq (char-after) (char-after (match-beginning 0)))
+             (forward-char 1)
            ;; Be careful to call `syntax-ppss' on a position before the one
            ;; we're going to change, so as not to need to flush the data we
            ;; just computed.
-           (if (prog1 (zerop (car (syntax-ppss (match-beginning 0))))
-                 (goto-char (1- (match-end 0))))
+           (if (zerop (save-excursion
+                        (car (sgml--syntax-propertize-ppss
+                              (match-beginning 0)))))
                (string-to-syntax ".")))))
      )))
 
 (defun sgml-syntax-propertize (start end)
   "Syntactic keywords for `sgml-mode'."
-  (goto-char start)
+  (setq sgml--syntax-propertize-ppss (cons start (syntax-ppss start)))
+  (cl-assert (>= (cadr sgml--syntax-propertize-ppss) 0))
   (sgml-syntax-propertize-inside end)
   (funcall
    (syntax-propertize-rules sgml-syntax-propertize-rules)
-   start end))
+   start end)
+  ;; Catch any '>' after the last quote.
+  (sgml--syntax-propertize-ppss end))
 
 (defun sgml-syntax-propertize-inside (end)
   (let ((ppss (syntax-ppss)))
diff --git a/lisp/textmodes/table.el b/lisp/textmodes/table.el
index f27c705..256fac6 100644
--- a/lisp/textmodes/table.el
+++ b/lisp/textmodes/table.el
@@ -590,7 +590,7 @@
 ;; attempt of implementing the table feature to Emacs.  This greatly
 ;; motivated me to follow through to its completion.
 ;;
-;; Kenichi Handa <address@hidden> kindly guided me through to
+;; Kenichi Handa <address@hidden> kindly guided me through to
 ;; overcome many technical issues while I was struggling with quail
 ;; related internationalization problems.
 ;;
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index 9c91d27..8611b73 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1985-1986, 1989, 1992, 1994-1999, 2001-2019 Free
 ;; Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: tex
 
 ;; Contributions over the years by William F. Schelter, Dick King,
diff --git a/lisp/textmodes/texinfmt.el b/lisp/textmodes/texinfmt.el
index 9ccc73a..5a54e0d 100644
--- a/lisp/textmodes/texinfmt.el
+++ b/lisp/textmodes/texinfmt.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1985-1986, 1988, 1990-1998, 2000-2019 Free Software
 ;; Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: maint, tex, docs
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/textmodes/texinfo.el b/lisp/textmodes/texinfo.el
index 71cdcab..54306d2 100644
--- a/lisp/textmodes/texinfo.el
+++ b/lisp/textmodes/texinfo.el
@@ -5,7 +5,6 @@
 
 ;; Author: Robert J. Chassell
 ;; Date:   [See date below for texinfo-version]
-;; Maintainer: address@hidden
 ;; Keywords: maint, tex, docs
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/textmodes/texnfo-upd.el b/lisp/textmodes/texnfo-upd.el
index e960e99..4f49c7f 100644
--- a/lisp/textmodes/texnfo-upd.el
+++ b/lisp/textmodes/texnfo-upd.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1989-1992, 2001-2019 Free Software Foundation, Inc.
 
 ;; Author: Robert J. Chassell
-;; Maintainer: address@hidden
 ;; Keywords: maint, tex, docs
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/textmodes/text-mode.el b/lisp/textmodes/text-mode.el
index e676a5d..ac292e4 100644
--- a/lisp/textmodes/text-mode.el
+++ b/lisp/textmodes/text-mode.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1985, 1992, 1994, 2001-2019 Free Software Foundation,
 ;; Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: wp
 ;; Package: emacs
 
diff --git a/lisp/textmodes/underline.el b/lisp/textmodes/underline.el
index e0bfd24..8c904f5 100644
--- a/lisp/textmodes/underline.el
+++ b/lisp/textmodes/underline.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 1985, 2001-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: wp
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/thingatpt.el b/lisp/thingatpt.el
index 60a20e2..e0184a7 100644
--- a/lisp/thingatpt.el
+++ b/lisp/thingatpt.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1991-1998, 2000-2019 Free Software Foundation, Inc.
 
 ;; Author: Mike Williams <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: extensions, matching, mouse
 ;; Created: Thu Mar 28 13:48:23 1991
 
diff --git a/lisp/thread.el b/lisp/thread.el
index e8f3cc7..3242d1d 100644
--- a/lisp/thread.el
+++ b/lisp/thread.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2018-2019 Free Software Foundation, Inc.
 
 ;; Author: Gemini Lasswell <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: thread, tools
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/thumbs.el b/lisp/thumbs.el
index 6a17a75..dd0491a 100644
--- a/lisp/thumbs.el
+++ b/lisp/thumbs.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2004-2019 Free Software Foundation, Inc.
 
 ;; Author: Jean-Philippe Theberge <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: Multimedia
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/time.el b/lisp/time.el
index 35157c5..c2f60d3 100644
--- a/lisp/time.el
+++ b/lisp/time.el
@@ -3,8 +3,6 @@
 ;; Copyright (C) 1985-1987, 1993-1994, 1996, 2000-2019 Free Software
 ;; Foundation, Inc.
 
-;; Maintainer: address@hidden
-
 ;; This file is part of GNU Emacs.
 
 ;; GNU Emacs is free software: you can redistribute it and/or modify
diff --git a/lisp/tmm.el b/lisp/tmm.el
index 44f04ea..bb96b5a 100644
--- a/lisp/tmm.el
+++ b/lisp/tmm.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1994-1996, 2000-2019 Free Software Foundation, Inc.
 
 ;; Author: Ilya Zakharevich <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: convenience
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/tutorial.el b/lisp/tutorial.el
index 37ebb5c..e428182 100644
--- a/lisp/tutorial.el
+++ b/lisp/tutorial.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 2006-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: help, internal
 ;; Package: emacs
 
diff --git a/lisp/uniquify.el b/lisp/uniquify.el
index 3dd9e34..29612b3 100644
--- a/lisp/uniquify.el
+++ b/lisp/uniquify.el
@@ -4,7 +4,6 @@
 ;; Inc.
 
 ;; Author: Dick King <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: files
 ;; Created: 15 May 86
 ;; Package: emacs
diff --git a/lisp/url/url-dav.el b/lisp/url/url-dav.el
index a4cf0f0..dba3134 100644
--- a/lisp/url/url-dav.el
+++ b/lisp/url/url-dav.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2001, 2004-2019 Free Software Foundation, Inc.
 
 ;; Author: Bill Perry <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: url, vc
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/url/url-gw.el b/lisp/url/url-gw.el
index 5436084..00d784a 100644
--- a/lisp/url/url-gw.el
+++ b/lisp/url/url-gw.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1997-1998, 2004-2019 Free Software Foundation, Inc.
 
 ;; Author: Bill Perry <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: comm, data, processes
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/url/url-handlers.el b/lisp/url/url-handlers.el
index 4988068..9d7837d 100644
--- a/lisp/url/url-handlers.el
+++ b/lisp/url/url-handlers.el
@@ -23,17 +23,17 @@
 
 ;;; Code:
 
-;; (require 'url)
 (require 'url-parse)
-;; (require 'url-util)
 (eval-when-compile (require 'mm-decode))
-;; (require 'mailcap)
 (eval-when-compile (require 'subr-x))
 ;; The following are autoloaded instead of `require'd to avoid eagerly
 ;; loading all of URL when turning on url-handler-mode in the .emacs.
-(autoload 'url-expand-file-name "url-expand" "Convert url to a fully specified 
url, and canonicalize it.")
-(autoload 'mm-dissect-buffer "mm-decode" "Dissect the current buffer and 
return a list of MIME handles.")
-(autoload 'url-scheme-get-property "url-methods" "Get property of a URL 
SCHEME.")
+(autoload 'url-expand-file-name "url-expand"
+  "Convert URL to a fully specified URL, and canonicalize it.")
+(autoload 'mm-dissect-buffer "mm-decode"
+  "Dissect the current buffer and return a list of MIME handles.")
+(autoload 'url-scheme-get-property "url-methods"
+  "Get PROPERTY of a URL SCHEME.")
 
 ;; Always used after mm-dissect-buffer and defined in the same file.
 (declare-function mm-save-part-to-file "mm-decode" (handle file))
@@ -112,15 +112,16 @@
       (push (cons url-handler-regexp 'url-file-handler)
            file-name-handler-alist)))
 
-(defcustom url-handler-regexp 
"\\`\\(https?\\|ftp\\|file\\|nfs\\|ssh\\|scp\\|rsync\\|telnet\\)://"
+(defcustom url-handler-regexp
+  "\\`\\(?:https?\\|ftp\\|file\\|nfs\\|ssh\\|scp\\|rsync\\|telnet\\)://"
   "Regular expression for URLs handled by `url-handler-mode'.
 When URL Handler mode is enabled, this regular expression is
 added to `file-name-handler-alist'.
 
 Some valid URL protocols just do not make sense to visit
-interactively \(about, data, info, irc, mailto, etc.).  This
+interactively (about, data, info, irc, mailto, etc.).  This
 regular expression avoids conflicts with local files that look
-like URLs \(Gnus is particularly bad at this)."
+like URLs (Gnus is particularly bad at this)."
   :group 'url
   :type 'regexp
   :version "25.1"
@@ -144,8 +145,8 @@ like URLs \(Gnus is particularly bad at this)."
 ;;;###autoload
 (defun url-file-handler (operation &rest args)
   "Function called from the `file-name-handler-alist' routines.
-OPERATION is what needs to be done (`file-exists-p', etc).  ARGS are
-the arguments that would have been passed to OPERATION."
+OPERATION is what needs to be done (`file-exists-p', etc.).
+ARGS are the arguments that would have been passed to OPERATION."
   ;; Avoid recursive load.
   (if (and load-in-progress url-file-handler-load-in-progress)
       (url-run-real-handler operation args)
@@ -153,48 +154,46 @@ the arguments that would have been passed to OPERATION."
       ;; Check, whether there are arguments we want pass to Tramp.
       (if (catch :do
             (dolist (url (cons default-directory args))
-              (and (member
-                    (url-type (url-generic-parse-url (and (stringp url) url)))
-                    url-tramp-protocols)
+              (and (stringp url)
+                   (member (url-type (url-generic-parse-url url))
+                           url-tramp-protocols)
                    (throw :do t))))
-          (apply 'url-tramp-file-handler operation args)
+          (apply #'url-tramp-file-handler operation args)
         ;; Otherwise, let's do the job.
         (let ((fn (get operation 'url-file-handlers))
-              (val nil)
-              (hooked nil))
-          (if (and (not fn) (intern-soft (format "url-%s" operation))
+              val)
+          (if (and (not fn)
                    (fboundp (intern-soft (format "url-%s" operation))))
               (error "Missing URL handler mapping for %s" operation))
-          (if fn
-              (setq hooked t
-                    val (save-match-data (apply fn args)))
-            (setq hooked nil
-                  val (url-run-real-handler operation args)))
-          (url-debug 'handlers "%s %S%S => %S" (if hooked "Hooked" "Real")
+          (setq val (if fn (save-match-data (apply fn args))
+                      (url-run-real-handler operation args)))
+          (url-debug 'handlers "%s %S%S => %S" (if fn "Hooked" "Real")
                      operation args val)
           val)))))
 
-(defun url-file-handler-identity (&rest args)
-  ;; Identity function
-  (car args))
-
-;; These are operations that we can fully support
-(put 'file-readable-p 'url-file-handlers 'url-file-exists-p)
-(put 'substitute-in-file-name 'url-file-handlers 'url-file-handler-identity)
-(put 'file-name-absolute-p 'url-file-handlers (lambda (&rest ignored) t))
-(put 'expand-file-name 'url-file-handlers 'url-handler-expand-file-name)
-(put 'directory-file-name 'url-file-handlers 'url-handler-directory-file-name)
-(put 'file-name-directory 'url-file-handlers 'url-handler-file-name-directory)
-(put 'unhandled-file-name-directory 'url-file-handlers 
'url-handler-unhandled-file-name-directory)
-(put 'file-remote-p 'url-file-handlers 'url-handler-file-remote-p)
-;; (put 'file-name-as-directory 'url-file-handlers 
'url-handler-file-name-as-directory)
+(defun url-file-handler-identity (arg &rest _ignored)
+  ;; Identity function.
+  arg)
+
+;; These are operations that we can fully support.
+(put 'file-readable-p 'url-file-handlers #'url-file-exists-p)
+(put 'substitute-in-file-name 'url-file-handlers #'url-file-handler-identity)
+(put 'file-name-absolute-p 'url-file-handlers (lambda (&rest _ignored) t))
+(put 'expand-file-name 'url-file-handlers #'url-handler-expand-file-name)
+(put 'directory-file-name 'url-file-handlers #'url-handler-directory-file-name)
+(put 'file-name-directory 'url-file-handlers #'url-handler-file-name-directory)
+(put 'unhandled-file-name-directory 'url-file-handlers
+     #'url-handler-unhandled-file-name-directory)
+(put 'file-remote-p 'url-file-handlers #'url-handler-file-remote-p)
+;; (put 'file-name-as-directory 'url-file-handlers
+;;      #'url-handler-file-name-as-directory)
 
 ;; These are operations that we do not support yet (DAV!!!)
-(put 'file-writable-p 'url-file-handlers 'ignore)
-(put 'file-symlink-p 'url-file-handlers 'ignore)
+(put 'file-writable-p 'url-file-handlers #'ignore)
+(put 'file-symlink-p 'url-file-handlers #'ignore)
 ;; Just like for ange-ftp: let's not waste time trying to look for RCS/foo,v
 ;; files and such since we can't do anything clever with them anyway.
-(put 'vc-registered 'url-file-handlers 'ignore)
+(put 'vc-registered 'url-file-handlers #'ignore)
 
 (defun url-handler-expand-file-name (file &optional base)
   ;; When we see "/foo/bar" in a file whose working dir is "http://bla/bla";,
@@ -215,7 +214,7 @@ the arguments that would have been passed to OPERATION."
 ;; reversible:  (f-n-a-d (d-f-n (f-n-a-d X))) == (f-n-a-d X)
 (defun url-handler-directory-file-name (dir)
   ;; When there's more than a single /, just don't touch the slashes at all.
-  (if (string-match "//\\'" dir) dir
+  (if (string-suffix-p "//" dir) dir
     (url-run-real-handler 'directory-file-name (list dir))))
 
 (defun url-handler-unhandled-file-name-directory (filename)
@@ -257,44 +256,42 @@ the arguments that would have been passed to OPERATION."
       ;; `url-handler-unhandled-file-name-directory'.
       nil)))
 
-;; The actual implementation
+;; The actual implementation.
 ;;;###autoload
-(defun url-copy-file (url newname &optional ok-if-already-exists
-                          _keep-time _preserve-uid-gid _preserve-permissions)
-  "Copy URL to NEWNAME.  Both args must be strings.
-Signal a `file-already-exists' error if file NEWNAME already exists,
-unless a third argument OK-IF-ALREADY-EXISTS is supplied and non-nil.
-A number as third arg means request confirmation if NEWNAME already exists.
-This is what happens in interactive use with M-x.
-Fourth arg KEEP-TIME non-nil means give the new file the same
-last-modified time as the old one.  (This works on only some systems.)
-Args PRESERVE-UID-GID and PRESERVE-PERMISSIONS are ignored.
-A prefix arg makes KEEP-TIME non-nil."
-  (if (and (file-exists-p newname)
-          (not ok-if-already-exists))
-      (signal 'file-already-exists (list "File exists" newname)))
-  (let ((buffer (url-retrieve-synchronously url))
-       (handle nil))
-    (if (not buffer)
-        (signal 'file-missing (list "Opening URL" "No such file or directory"
-                                    url)))
-    (with-current-buffer buffer
-      (setq handle (mm-dissect-buffer t)))
+(defun url-copy-file (url newname &optional ok-if-already-exists &rest 
_ignored)
+  "Copy URL to NEWNAME.  Both arguments must be strings.
+Signal a `file-already-exists' error if file NEWNAME already
+exists, unless a third argument OK-IF-ALREADY-EXISTS is supplied
+and non-nil.  An integer as third argument means request
+confirmation if NEWNAME already exists."
+  (and (file-exists-p newname)
+       (or (not ok-if-already-exists)
+           (and (integerp ok-if-already-exists)
+                (not (yes-or-no-p
+                      (format "File %s already exists; copy to it anyway? "
+                              newname)))))
+       (signal 'file-already-exists (list "File already exists" newname)))
+  (let* ((buffer (or (url-retrieve-synchronously url)
+                     (signal 'file-missing
+                             (list "Opening URL"
+                                   "No such file or directory" url))))
+         (handle (with-current-buffer buffer
+                   (mm-dissect-buffer t))))
     (let ((mm-attachment-file-modes (default-file-modes)))
       (mm-save-part-to-file handle newname))
     (kill-buffer buffer)
     (mm-destroy-parts handle)))
-(put 'copy-file 'url-file-handlers 'url-copy-file)
+(put 'copy-file 'url-file-handlers #'url-copy-file)
 
 ;;;###autoload
-(defun url-file-local-copy (url &rest ignored)
+(defun url-file-local-copy (url &rest _ignored)
   "Copy URL into a temporary file on this machine.
 Returns the name of the local copy, or nil, if FILE is directly
 accessible."
   (let ((filename (make-temp-file "url")))
     (url-copy-file url filename 'ok-if-already-exists)
     filename))
-(put 'file-local-copy 'url-file-handlers 'url-file-local-copy)
+(put 'file-local-copy 'url-file-handlers #'url-file-local-copy)
 
 (defun url-insert (buffer &optional beg end)
   "Insert the body of a URL object.
@@ -330,8 +327,8 @@ This is like `url-insert', but also decodes the current 
buffer as
 if it had been inserted from a file named URL."
   (if visit (setq buffer-file-name url))
   (save-excursion
-    (let* ((start (point))
-           (size-and-charset (url-insert buffer beg end)))
+    (let ((start (point))
+          (size-and-charset (url-insert buffer beg end)))
       (kill-buffer buffer)
       (when replace
         (delete-region (point-min) start)
@@ -342,10 +339,9 @@ if it had been inserted from a file named URL."
         (decode-coding-inserted-region (point-min) (point) url
                                        visit beg end replace))
       (let ((inserted (car size-and-charset)))
-        (when (fboundp 'after-insert-file-set-coding)
-          (let ((insval (after-insert-file-set-coding inserted visit)))
-            (if insval (setq inserted insval))))
-        (list url inserted)))))
+        (list url (or (and (fboundp 'after-insert-file-set-coding)
+                           (after-insert-file-set-coding inserted visit))
+                      inserted))))))
 
 ;;;###autoload
 (defun url-insert-file-contents (url &optional visit beg end replace)
@@ -356,15 +352,14 @@ if it had been inserted from a file named URL."
       ;; instead.  See bug#17549.
       (url-http--insert-file-helper buffer url visit))
     (url-insert-buffer-contents buffer url visit beg end replace)))
-
-(put 'insert-file-contents 'url-file-handlers 'url-insert-file-contents)
+(put 'insert-file-contents 'url-file-handlers #'url-insert-file-contents)
 
 (defun url-file-name-completion (url _directory &optional _predicate)
   ;; Even if it's not implemented, it's not an error to ask for completion,
   ;; in case it's available (bug#14806).
   ;; (error "Unimplemented")
   url)
-(put 'file-name-completion 'url-file-handlers 'url-file-name-completion)
+(put 'file-name-completion 'url-file-handlers #'url-file-name-completion)
 
 (defun url-file-name-all-completions (_file _directory)
   ;; Even if it's not implemented, it's not an error to ask for completion,
@@ -372,7 +367,7 @@ if it had been inserted from a file named URL."
   ;; (error "Unimplemented")
   nil)
 (put 'file-name-all-completions
-     'url-file-handlers 'url-file-name-all-completions)
+     'url-file-handlers #'url-file-name-all-completions)
 
 ;; All other handlers map onto their respective backends.
 (defmacro url-handlers-create-wrapper (method args)
@@ -382,10 +377,10 @@ if it had been inserted from a file named URL."
                 (or (documentation method t) "No original documentation."))
        (setq url (url-generic-parse-url url))
        (when (url-type url)
-         (funcall (url-scheme-get-property (url-type url) (quote ,method))
-                  ,@(remove '&rest (remove '&optional args)))))
+         (funcall (url-scheme-get-property (url-type url) ',method)
+                  ,@(remq '&rest (remq '&optional args)))))
      (unless (get ',method 'url-file-handlers)
-       (put ',method 'url-file-handlers ',(intern (format "url-%s" method))))))
+       (put ',method 'url-file-handlers #',(intern (format "url-%s" 
method))))))
 
 (url-handlers-create-wrapper file-exists-p (url))
 (url-handlers-create-wrapper file-attributes (url &optional id-format))
@@ -396,12 +391,12 @@ if it had been inserted from a file named URL."
 (url-handlers-create-wrapper directory-files (url &optional full match nosort))
 (url-handlers-create-wrapper file-truename (url &optional counter prev-dirs))
 
-(add-hook 'find-file-hook 'url-handlers-set-buffer-mode)
+(add-hook 'find-file-hook #'url-handlers-set-buffer-mode)
 
 (defun url-handlers-set-buffer-mode ()
   "Set correct modes for the current buffer if visiting a remote file."
-  (and (stringp buffer-file-name)
-       (string-match url-handler-regexp buffer-file-name)
+  (and buffer-file-name
+       (string-match-p url-handler-regexp buffer-file-name)
        (auto-save-mode 0)))
 
 (provide 'url-handlers)
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index 00803a1..a11f514 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1999, 2001, 2004-2019 Free Software Foundation, Inc.
 
 ;; Author: Bill Perry <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: comm, data, processes
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/url/url-util.el b/lisp/url/url-util.el
index a46e7bb..dbcc9a6 100644
--- a/lisp/url/url-util.el
+++ b/lisp/url/url-util.el
@@ -4,7 +4,6 @@
 ;; Inc.
 
 ;; Author: Bill Perry <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: comm, data, processes
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/url/url.el b/lisp/url/url.el
index 5242d42..eafac8a 100644
--- a/lisp/url/url.el
+++ b/lisp/url/url.el
@@ -4,7 +4,6 @@
 ;; Inc.
 
 ;; Author: Bill Perry <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: comm, data, processes, hypermedia
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/userlock.el b/lisp/userlock.el
index f077bc9..c4178ac 100644
--- a/lisp/userlock.el
+++ b/lisp/userlock.el
@@ -4,7 +4,6 @@
 
 ;; Author: Richard King
 ;; (according to authors.el)
-;; Maintainer: address@hidden
 ;; Keywords: internal
 ;; Package: emacs
 
diff --git a/lisp/vc/add-log.el b/lisp/vc/add-log.el
index f9efd44..5cd4f46 100644
--- a/lisp/vc/add-log.el
+++ b/lisp/vc/add-log.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1985-1986, 1988, 1993-1994, 1997-1998, 2000-2019 Free
 ;; Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: vc tools
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/vc/compare-w.el b/lisp/vc/compare-w.el
index 02c08af..2811d46 100644
--- a/lisp/vc/compare-w.el
+++ b/lisp/vc/compare-w.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1986, 1989, 1993, 1997, 2001-2019 Free Software
 ;; Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: convenience files vc
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/vc/diff.el b/lisp/vc/diff.el
index 523be87..bee3659 100644
--- a/lisp/vc/diff.el
+++ b/lisp/vc/diff.el
@@ -5,7 +5,6 @@
 
 ;; Author: Frank Bresz
 ;; (according to authors.el)
-;; Maintainer: address@hidden
 ;; Keywords: unix, vc, tools
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/vc/vc-annotate.el b/lisp/vc/vc-annotate.el
index 8483813..15f234f 100644
--- a/lisp/vc/vc-annotate.el
+++ b/lisp/vc/vc-annotate.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1997-1998, 2000-2019 Free Software Foundation, Inc.
 
 ;; Author:     Martin Lorentzson  <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: vc tools
 ;; Package: vc
 
diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el
index ee1646c..3ab8c49 100644
--- a/lisp/vc/vc-bzr.el
+++ b/lisp/vc/vc-bzr.el
@@ -4,7 +4,6 @@
 
 ;; Author: Dave Love <address@hidden>
 ;;        Riccardo Murri <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: vc tools
 ;; Created: Sept 2006
 ;; Package: vc
diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el
index 626e190..cc1845a 100644
--- a/lisp/vc/vc-cvs.el
+++ b/lisp/vc/vc-cvs.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1995, 1998-2019 Free Software Foundation, Inc.
 
 ;; Author:      FSF (see vc.el for full credits)
-;; Maintainer:  address@hidden
 ;; Package: vc
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el
index c4b327a..579448b 100644
--- a/lisp/vc/vc-dispatcher.el
+++ b/lisp/vc/vc-dispatcher.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2008-2019 Free Software Foundation, Inc.
 
 ;; Author:     FSF (see below for full credits)
-;; Maintainer: address@hidden
 ;; Keywords: vc tools
 ;; Package: vc
 
diff --git a/lisp/vc/vc-filewise.el b/lisp/vc/vc-filewise.el
index f05e8ef..37c71f9 100644
--- a/lisp/vc/vc-filewise.el
+++ b/lisp/vc/vc-filewise.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1992-1996, 1998-2019 Free Software Foundation, Inc.
 
 ;; Author:     FSF (see vc.el for full credits)
-;; Maintainer: address@hidden
 ;; Package: vc
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el
index 876d824..f1b603b 100644
--- a/lisp/vc/vc-hg.el
+++ b/lisp/vc/vc-hg.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2006-2019 Free Software Foundation, Inc.
 
 ;; Author: Ivan Kanis
-;; Maintainer: address@hidden
 ;; Keywords: vc tools
 ;; Package: vc
 
diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el
index 07b3d86..1871e1e 100644
--- a/lisp/vc/vc-hooks.el
+++ b/lisp/vc/vc-hooks.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1992-1996, 1998-2019 Free Software Foundation, Inc.
 
 ;; Author:     FSF (see vc.el for full credits)
-;; Maintainer: address@hidden
 ;; Package: vc
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/vc/vc-rcs.el b/lisp/vc/vc-rcs.el
index 598e982..ee227b1 100644
--- a/lisp/vc/vc-rcs.el
+++ b/lisp/vc/vc-rcs.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1992-2019 Free Software Foundation, Inc.
 
 ;; Author:     FSF (see vc.el for full credits)
-;; Maintainer: address@hidden
 ;; Package: vc
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/vc/vc-sccs.el b/lisp/vc/vc-sccs.el
index 4e9f5a0..0d27528 100644
--- a/lisp/vc/vc-sccs.el
+++ b/lisp/vc/vc-sccs.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1992-2019 Free Software Foundation, Inc.
 
 ;; Author:     FSF (see vc.el for full credits)
-;; Maintainer: address@hidden
 ;; Package: vc
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/vc/vc-src.el b/lisp/vc/vc-src.el
index f847592..b708cd4 100644
--- a/lisp/vc/vc-src.el
+++ b/lisp/vc/vc-src.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1992-2019 Free Software Foundation, Inc.
 
 ;; Author:     FSF (see vc.el for full credits)
-;; Maintainer: address@hidden
 ;; Package: vc
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index b992a8e..d9fb829 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1992-1998, 2000-2019 Free Software Foundation, Inc.
 
 ;; Author:     FSF (see below for full credits)
-;; Maintainer: address@hidden
 ;; Keywords: vc tools
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/vcursor.el b/lisp/vcursor.el
index 3e8b6ee..7673d9b 100644
--- a/lisp/vcursor.el
+++ b/lisp/vcursor.el
@@ -4,7 +4,6 @@
 ;; Inc.
 
 ;; Author:   Peter Stephenson <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: virtual cursor, convenience
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/version.el b/lisp/version.el
index d13d8c3..d5bc3eb 100644
--- a/lisp/version.el
+++ b/lisp/version.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1985, 1992, 1994-1995, 1999-2019 Free Software
 ;; Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: internal
 ;; Package: emacs
 
diff --git a/lisp/view.el b/lisp/view.el
index e74ce1e..c8d5f0d 100644
--- a/lisp/view.el
+++ b/lisp/view.el
@@ -4,7 +4,6 @@
 ;; Foundation, Inc.
 
 ;; Author: K. Shane Hartman
-;; Maintainer: address@hidden
 ;; Keywords: files
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/vt100-led.el b/lisp/vt100-led.el
index d7b5f0a..6678f49 100644
--- a/lisp/vt100-led.el
+++ b/lisp/vt100-led.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1988, 2001-2019 Free Software Foundation, Inc.
 
 ;; Author: Howard Gayle
-;; Maintainer: address@hidden
 ;; Keywords: hardware
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/w32-fns.el b/lisp/w32-fns.el
index 2b6464a..443a995 100644
--- a/lisp/w32-fns.el
+++ b/lisp/w32-fns.el
@@ -308,7 +308,7 @@ names."
 (declare-function w32-version "w32-win" ())
 (declare-function w32-read-registry "w32fns" (root key name))
 
-(defun w32--os-descriptiono ()
+(defun w32--os-description ()
   "Return a string describing the underlying OS and its version."
   (let* ((w32ver (car (w32-version)))
          (w9x-p (< w32ver 5))
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
index b9f98cd..713c857 100644
--- a/lisp/wid-edit.el
+++ b/lisp/wid-edit.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1996-1997, 1999-2019 Free Software Foundation, Inc.
 ;;
 ;; Author: Per Abrahamsen <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: extensions
 ;; Package: emacs
 
diff --git a/lisp/window.el b/lisp/window.el
index 2c9d177..7e6a484 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1985, 1989, 1992-1994, 2000-2019 Free Software
 ;; Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Keywords: internal
 ;; Package: emacs
 
diff --git a/lisp/woman.el b/lisp/woman.el
index 39d9b80..5735447 100644
--- a/lisp/woman.el
+++ b/lisp/woman.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2000-2019 Free Software Foundation, Inc.
 
 ;; Author: Francis J. Wright <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: help, unix
 ;; Adapted-By: Eli Zaretskii <address@hidden>
 ;; Version: 0.551
diff --git a/lisp/x-dnd.el b/lisp/x-dnd.el
index e4e2dec..31d409c 100644
--- a/lisp/x-dnd.el
+++ b/lisp/x-dnd.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2004-2019 Free Software Foundation, Inc.
 
 ;; Author: Jan Djärv <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: window, drag, drop
 ;; Package: emacs
 
diff --git a/src/alloc.c b/src/alloc.c
index af4adb3..5c5b56d 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -6384,7 +6384,7 @@ mark_object (Lisp_Object arg)
   do {                                         \
     CHECK_ALLOCATED ();                                \
     CHECK_LIVE (LIVEP);                                \
-  } while (0)                                  \
+  } while (false)
 
   /* Check both of the above conditions, for symbols.  */
 #define CHECK_ALLOCATED_AND_LIVE_SYMBOL()      \
@@ -6394,7 +6394,7 @@ mark_object (Lisp_Object arg)
        CHECK_ALLOCATED ();                     \
        CHECK_LIVE (live_symbol_p);             \
       }                                                \
-  } while (0)                                  \
+  } while (false)
 
 #else /* not GC_CHECK_MARKED_OBJECTS */
 
diff --git a/src/buffer.c b/src/buffer.c
index 3b5078a..209e29f 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -5603,17 +5603,17 @@ Use the command `abbrev-mode' to change this variable.  
*/);
                     doc: /* Non-nil if searches and matches should ignore 
case.  */);
 
   DEFVAR_PER_BUFFER ("fill-column", &BVAR (current_buffer, fill_column),
-                    Qfixnump,
+                    Qintegerp,
                     doc: /* Column beyond which automatic line-wrapping should 
happen.
 Interactively, you can set the buffer local value using \\[set-fill-column].  
*/);
 
   DEFVAR_PER_BUFFER ("left-margin", &BVAR (current_buffer, left_margin),
-                    Qfixnump,
+                    Qintegerp,
                     doc: /* Column for the default `indent-line-function' to 
indent to.
 Linefeed indents to this column in Fundamental mode.  */);
 
   DEFVAR_PER_BUFFER ("tab-width", &BVAR (current_buffer, tab_width),
-                    Qfixnump,
+                    Qintegerp,
                     doc: /* Distance between tab stops (for display of tab 
characters), in columns.
 NOTE: This controls the display width of a TAB character, and not
 the size of an indentation step.
@@ -5784,7 +5784,7 @@ If it is nil, that means don't auto-save this buffer.  
*/);
 Backing up is done before the first time the file is saved.  */);
 
   DEFVAR_PER_BUFFER ("buffer-saved-size", &BVAR (current_buffer, save_length),
-                    Qfixnump,
+                    Qintegerp,
                     doc: /* Length of current buffer when last read in, saved 
or auto-saved.
 0 initially.
 -1 means auto-saving turned off until next real save.
@@ -5858,7 +5858,7 @@ In addition, a char-table has six extra slots to control 
the display of:
 See also the functions `display-table-slot' and `set-display-table-slot'.  */);
 
   DEFVAR_PER_BUFFER ("left-margin-width", &BVAR (current_buffer, 
left_margin_cols),
-                    Qfixnump,
+                    Qintegerp,
                     doc: /* Width in columns of left marginal area for display 
of a buffer.
 A value of nil means no marginal area.
 
@@ -5866,7 +5866,7 @@ Setting this variable does not take effect until a new 
buffer is displayed
 in a window.  To make the change take effect, call `set-window-buffer'.  */);
 
   DEFVAR_PER_BUFFER ("right-margin-width", &BVAR (current_buffer, 
right_margin_cols),
-                    Qfixnump,
+                    Qintegerp,
                     doc: /* Width in columns of right marginal area for 
display of a buffer.
 A value of nil means no marginal area.
 
@@ -5874,7 +5874,7 @@ Setting this variable does not take effect until a new 
buffer is displayed
 in a window.  To make the change take effect, call `set-window-buffer'.  */);
 
   DEFVAR_PER_BUFFER ("left-fringe-width", &BVAR (current_buffer, 
left_fringe_width),
-                    Qfixnump,
+                    Qintegerp,
                     doc: /* Width of this buffer's left fringe (in pixels).
 A value of 0 means no left fringe is shown in this buffer's window.
 A value of nil means to use the left fringe width from the window's frame.
@@ -5883,7 +5883,7 @@ Setting this variable does not take effect until a new 
buffer is displayed
 in a window.  To make the change take effect, call `set-window-buffer'.  */);
 
   DEFVAR_PER_BUFFER ("right-fringe-width", &BVAR (current_buffer, 
right_fringe_width),
-                    Qfixnump,
+                    Qintegerp,
                     doc: /* Width of this buffer's right fringe (in pixels).
 A value of 0 means no right fringe is shown in this buffer's window.
 A value of nil means to use the right fringe width from the window's frame.
@@ -5900,12 +5900,12 @@ Setting this variable does not take effect until a new 
buffer is displayed
 in a window.  To make the change take effect, call `set-window-buffer'.  */);
 
   DEFVAR_PER_BUFFER ("scroll-bar-width", &BVAR (current_buffer, 
scroll_bar_width),
-                    Qfixnump,
+                    Qintegerp,
                     doc: /* Width of this buffer's vertical scroll bars in 
pixels.
 A value of nil means to use the scroll bar width from the window's frame.  */);
 
   DEFVAR_PER_BUFFER ("scroll-bar-height", &BVAR (current_buffer, 
scroll_bar_height),
-                    Qfixnump,
+                    Qintegerp,
                     doc: /* Height of this buffer's horizontal scroll bars in 
pixels.
 A value of nil means to use the scroll bar height from the window's frame.  
*/);
 
@@ -6175,7 +6175,7 @@ Setting this variable is very fast, much faster than 
scanning all the text in
 the buffer looking for properties to change.  */);
 
   DEFVAR_PER_BUFFER ("buffer-display-count",
-                    &BVAR (current_buffer, display_count), Qfixnump,
+                    &BVAR (current_buffer, display_count), Qintegerp,
                     doc: /* A number incremented each time this buffer is 
displayed in a window.
 The function `set-window-buffer' increments it.  */);
 
diff --git a/src/character.h b/src/character.h
index 5dff85a..cc57a2a 100644
--- a/src/character.h
+++ b/src/character.h
@@ -558,12 +558,13 @@ enum
 
 /* Return a non-outlandish value for the tab width.  */
 
-#define SANE_TAB_WIDTH(buf) \
-  sanitize_tab_width (XFIXNAT (BVAR (buf, tab_width)))
+#define SANE_TAB_WIDTH(buf) sanitize_tab_width (BVAR (buf, tab_width))
+
 INLINE int
-sanitize_tab_width (EMACS_INT width)
+sanitize_tab_width (Lisp_Object width)
 {
-  return 0 < width && width <= 1000 ? width : 8;
+  return (FIXNUMP (width) && 0 < XFIXNUM (width) && XFIXNUM (width) <= 1000
+         ? XFIXNUM (width) : 8);
 }
 
 /* Return the width of ASCII character C.  The width is measured by
diff --git a/src/data.c b/src/data.c
index 476d28e..c1699ae 100644
--- a/src/data.c
+++ b/src/data.c
@@ -1122,20 +1122,21 @@ store_symval_forwarding (lispfwd valcontents, 
Lisp_Object newval,
        int offset = XBUFFER_OBJFWD (valcontents)->offset;
        Lisp_Object predicate = XBUFFER_OBJFWD (valcontents)->predicate;
 
-       if (!NILP (newval))
+       if (!NILP (newval) && !NILP (predicate))
          {
-           if (SYMBOLP (predicate))
+           eassert (SYMBOLP (predicate));
+           Lisp_Object choiceprop = Fget (predicate, Qchoice);
+           if (!NILP (choiceprop))
              {
-               Lisp_Object prop;
-
-               if ((prop = Fget (predicate, Qchoice), !NILP (prop)))
-                 {
-                   if (NILP (Fmemq (newval, prop)))
-                     wrong_choice (prop, newval);
-                 }
-               else if ((prop = Fget (predicate, Qrange), !NILP (prop)))
+               if (NILP (Fmemq (newval, choiceprop)))
+                 wrong_choice (choiceprop, newval);
+             }
+           else
+             {
+               Lisp_Object rangeprop = Fget (predicate, Qrange);
+               if (CONSP (rangeprop))
                  {
-                   Lisp_Object min = XCAR (prop), max = XCDR (prop);
+                   Lisp_Object min = XCAR (rangeprop), max = XCDR (rangeprop);
                    if (! NUMBERP (newval)
                        || NILP (CALLN (Fleq, min, newval, max)))
                      wrong_range (min, max, newval);
diff --git a/src/dispextern.h b/src/dispextern.h
index e86ea6a..aa80fa6 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -34,16 +34,45 @@ along with GNU Emacs.  If not, see 
<https://www.gnu.org/licenses/>.  */
 #ifdef HAVE_XRENDER
 # include <X11/extensions/Xrender.h>
 #endif
+
+typedef XColor Emacs_Color;
+typedef Cursor Emacs_Cursor;
+#define No_Cursor (None)
+typedef Pixmap Emacs_Pixmap;
+typedef XRectangle Emacs_Rectangle;
+typedef XGCValues Emacs_GC;
 #else /* !HAVE_X_WINDOWS */
 
-/* X-related stuff used by non-X gui code.  */
+/* XColor-like struct used by non-X code.  */
 
-typedef struct {
+typedef struct
+{
   unsigned long pixel;
   unsigned short red, green, blue;
-  char flags;
-  char pad;
-} XColor;
+} Emacs_Color;
+
+/* Accommodate X's usage of None as a null resource ID.  */
+#define No_Cursor (NULL)
+
+/* XRectangle-like struct used by non-X GUI code.  */
+typedef struct
+{
+  int x, y;
+  unsigned width, height;
+} Emacs_Rectangle;
+
+/* XGCValues-like struct used by non-X GUI code.  */
+typedef struct
+{
+  unsigned long foreground;
+  unsigned long background;
+} Emacs_GC;
+
+/* Mask values to select foreground/background.  */
+/* FIXME: The GC handling in w32 really should be redesigned as to not
+   need these.  */
+#define GCForeground 0x01
+#define GCBackground 0x02
 
 #endif /* HAVE_X_WINDOWS */
 
@@ -63,16 +92,16 @@ xstrcasecmp (char const *a, char const *b)
 #ifdef HAVE_X_WINDOWS
 #include <X11/Xresource.h> /* for XrmDatabase */
 typedef struct x_display_info Display_Info;
-typedef XImage * XImagePtr;
-typedef XImagePtr XImagePtr_or_DC;
+typedef XImage *Emacs_Pix_Container;
+typedef XImage *Emacs_Pix_Context;
 #define NativeRectangle XRectangle
 #endif
 
 #ifdef HAVE_NTGUI
 #include "w32gui.h"
 typedef struct w32_display_info Display_Info;
-typedef XImage *XImagePtr;
-typedef HDC XImagePtr_or_DC;
+typedef XImage *Emacs_Pix_Container;
+typedef HDC Emacs_Pix_Context;
 #endif
 
 #ifdef HAVE_NS
@@ -80,8 +109,8 @@ typedef HDC XImagePtr_or_DC;
 #define FACE_COLOR_TO_PIXEL(face_color, frame) 
ns_color_index_to_rgba(face_color, frame)
 /* Following typedef needed to accommodate the MSDOS port, believe it or not.  
*/
 typedef struct ns_display_info Display_Info;
-typedef Pixmap XImagePtr;
-typedef XImagePtr XImagePtr_or_DC;
+typedef Emacs_Pixmap Emacs_Pix_Container;
+typedef Emacs_Pixmap Emacs_Pix_Context;
 #else
 #define FACE_COLOR_TO_PIXEL(face_color, frame) face_color
 #endif
@@ -92,8 +121,7 @@ typedef XImagePtr XImagePtr_or_DC;
 #endif
 
 #ifndef HAVE_WINDOW_SYSTEM
-typedef int Cursor;
-#define No_Cursor (0)
+typedef void *Emacs_Cursor;
 #endif
 
 #ifndef NativeRectangle
@@ -1040,7 +1068,7 @@ struct glyph_row
 #ifdef HAVE_WINDOW_SYSTEM
   /* Non-NULL means the current clipping area.  This is temporarily
      set while exposing a region.  Coordinates are frame-relative.  */
-  XRectangle *clip;
+  const Emacs_Rectangle *clip;
 #endif
 };
 
@@ -1289,7 +1317,7 @@ struct glyph_string
   enum glyph_row_area area;
 
   /* Characters to be drawn, and number of characters.  */
-  XChar2b *char2b;
+  unsigned *char2b;
   int nchars;
 
   /* A face-override for drawing cursors, mouse face and similar.  */
@@ -1350,7 +1378,7 @@ struct glyph_string
   GC gc;
 #endif
 #if defined (HAVE_NTGUI)
-  XGCValues *gc;
+  Emacs_GC *gc;
   HDC hdc;
 #endif
 
@@ -1592,8 +1620,11 @@ struct face
 
   /* If non-zero, this is a GC that we can use without modification for
      drawing the characters in this face.  */
+# ifdef HAVE_X_WINDOWS
   GC gc;
-
+# else
+  Emacs_GC *gc;
+# endif
   /* Background stipple or bitmap used for this face.  This is
      an id as returned from load_pixmap.  */
   ptrdiff_t stipple;
@@ -2888,7 +2919,7 @@ struct redisplay_interface
   void (*draw_glyph_string) (struct glyph_string *s);
 
   /* Define cursor CURSOR on frame F.  */
-  void (*define_frame_cursor) (struct frame *f, Cursor cursor);
+  void (*define_frame_cursor) (struct frame *f, Emacs_Cursor cursor);
 
   /* Clear the area at (X,Y,WIDTH,HEIGHT) of frame F.  */
   void (*clear_frame_area) (struct frame *f, int x, int y,
@@ -2955,7 +2986,7 @@ struct image
   struct timespec timestamp;
 
   /* Pixmaps of the image.  */
-  Pixmap pixmap, mask;
+  Emacs_Pixmap pixmap, mask;
 
 #ifdef USE_CAIRO
   void *cr_data;
@@ -2965,7 +2996,7 @@ struct image
      Non-NULL means it and its Pixmap counterpart may be out of sync
      and the latter is outdated.  NULL means the X image has been
      synchronized to Pixmap.  */
-  XImagePtr ximg, mask_img;
+  XImage *ximg, *mask_img;
 
 # ifdef HAVE_NATIVE_SCALING
   /* Picture versions of pixmap and mask for compositing.  */
@@ -3311,7 +3342,9 @@ extern void handle_tool_bar_click (struct frame *,
                                    int, int, bool, int);
 
 extern void expose_frame (struct frame *, int, int, int, int);
-extern bool gui_intersect_rectangles (XRectangle *, XRectangle *, XRectangle 
*);
+extern bool gui_intersect_rectangles (const Emacs_Rectangle *,
+                                      const Emacs_Rectangle *,
+                                      Emacs_Rectangle *);
 #endif /* HAVE_WINDOW_SYSTEM */
 
 extern void note_mouse_highlight (struct frame *, int, int);
@@ -3363,10 +3396,10 @@ extern void image_destroy_bitmap (struct frame *, 
ptrdiff_t);
 extern void image_destroy_all_bitmaps (Display_Info *);
 #ifdef HAVE_X_WINDOWS
 extern void x_create_bitmap_mask (struct frame *, ptrdiff_t);
+extern void x_kill_gs_process (Pixmap, struct frame *);
 #endif
 extern Lisp_Object image_find_image_file (Lisp_Object);
 
-void x_kill_gs_process (Pixmap, struct frame *);
 struct image_cache *make_image_cache (void);
 void free_image_cache (struct frame *);
 void clear_image_caches (Lisp_Object);
@@ -3384,9 +3417,9 @@ ptrdiff_t lookup_image (struct frame *, Lisp_Object);
 #endif
 
 RGB_PIXEL_COLOR image_background (struct image *, struct frame *,
-                                XImagePtr_or_DC ximg);
+                                  Emacs_Pix_Context img);
 int image_background_transparent (struct image *, struct frame *,
-                                  XImagePtr_or_DC mask);
+                                  Emacs_Pix_Context mask);
 
 int image_ascent (struct image *, struct face *, struct glyph_slice *);
 
@@ -3410,8 +3443,8 @@ void x_free_colors (struct frame *, unsigned long *, int);
 
 void update_face_from_frame_parameter (struct frame *, Lisp_Object,
                                        Lisp_Object);
-extern bool tty_defined_color (struct frame *f, const char *, XColor *, bool,
-                               bool);
+extern bool tty_defined_color (struct frame *, const char *, Emacs_Color *,
+                               bool, bool);
 
 Lisp_Object tty_color_name (struct frame *, int);
 void clear_face_cache (bool);
diff --git a/src/eval.c b/src/eval.c
index 567c32e..5bba876 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -544,8 +544,8 @@ usage: (quote ARG)  */)
 
 DEFUN ("function", Ffunction, Sfunction, 1, UNEVALLED, 0,
        doc: /* Like `quote', but preferred for objects which are functions.
-In byte compilation, `function' causes its argument to be compiled.
-`quote' cannot do that.
+In byte compilation, `function' causes its argument to be handled by
+the byte compiler.  `quote' cannot do that.
 usage: (function ARG)  */)
   (Lisp_Object args)
 {
diff --git a/src/fileio.c b/src/fileio.c
index 4ee125d..9e97799 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -5802,6 +5802,7 @@ A non-nil CURRENT-ONLY argument means save only current 
buffer.  */)
            && BUF_SAVE_MODIFF (b) < BUF_MODIFF (b)
            && BUF_AUTOSAVE_MODIFF (b) < BUF_MODIFF (b)
            /* -1 means we've turned off autosaving for a while--see below.  */
+           && FIXNUMP (BVAR (b, save_length))
            && XFIXNUM (BVAR (b, save_length)) >= 0
            && (do_handled_files
                || NILP (Ffind_file_name_handler (BVAR (b, auto_save_file_name),
@@ -5815,13 +5816,17 @@ A non-nil CURRENT-ONLY argument means save only current 
buffer.  */)
                && before_time.tv_sec - b->auto_save_failure_time < 1200)
              continue;
 
+           enum { growth_factor = 4 };
+           verify (BUF_BYTES_MAX <= EMACS_INT_MAX / growth_factor);
+
            set_buffer_internal (b);
            if (NILP (Vauto_save_include_big_deletions)
-               && (XFIXNAT (BVAR (b, save_length)) * 10
-                   > (BUF_Z (b) - BUF_BEG (b)) * 13)
+               && FIXNUMP (BVAR (b, save_length))
                /* A short file is likely to change a large fraction;
                   spare the user annoying messages.  */
                && XFIXNAT (BVAR (b, save_length)) > 5000
+               && (growth_factor * (BUF_Z (b) - BUF_BEG (b))
+                   < (growth_factor - 1) * XFIXNAT (BVAR (b, save_length)))
                /* These messages are frequent and annoying for `*mail*'.  */
                && !NILP (BVAR (b, filename))
                && NILP (no_message))
diff --git a/src/fns.c b/src/fns.c
index c320249..6b1f733 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -1131,10 +1131,8 @@ string the same way whether it is unibyte or multibyte.) 
 */)
 DEFUN ("string-make-unibyte", Fstring_make_unibyte, Sstring_make_unibyte,
        1, 1, 0,
        doc: /* Return the unibyte equivalent of STRING.
-Multibyte character codes are converted to unibyte according to
-`nonascii-translation-table' or, if that is nil, `nonascii-insert-offset'.
-If the lookup in the translation table fails, this function takes just
-the low 8 bits of each character.  */)
+Multibyte character codes above 255 are converted to unibyte
+by taking just the low 8 bits of each character's code.  */)
   (Lisp_Object string)
 {
   CHECK_STRING (string);
diff --git a/src/font.h b/src/font.h
index 3720650..9ca0c97 100644
--- a/src/font.h
+++ b/src/font.h
@@ -647,7 +647,7 @@ struct font_driver
      the font FONT and the sequence of glyph codes CODE, and store the
      result in METRICS.  */
   void (*text_extents) (struct font *font,
-                       unsigned *code, int nglyphs,
+                       const unsigned *code, int nglyphs,
                        struct font_metrics *metrics);
 
 #ifdef HAVE_WINDOW_SYSTEM
@@ -894,7 +894,7 @@ extern Lisp_Object ftfont_shape (Lisp_Object);
 extern unsigned ftfont_encode_char (struct font *, int);
 extern void ftfont_close (struct font *);
 extern void ftfont_filter_properties (Lisp_Object, Lisp_Object);
-extern void ftfont_text_extents (struct font *, unsigned *, int,
+extern void ftfont_text_extents (struct font *, const unsigned *, int,
                                 struct font_metrics *);
 extern void syms_of_ftfont (void);
 #endif /* HAVE_FREETYPE */
diff --git a/src/frame.h b/src/frame.h
index b8aed82..fa45a32 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -1480,7 +1480,7 @@ FRAME_BOTTOM_DIVIDER_WIDTH (struct frame *f)
     - FRAME_TOTAL_FRINGE_WIDTH (f)                                     \
     - FRAME_SCROLL_BAR_AREA_WIDTH (f)                                  \
     - 2 * FRAME_INTERNAL_BORDER_WIDTH (f))                             \
-   / FRAME_COLUMN_WIDTH (f))                                           \
+   / FRAME_COLUMN_WIDTH (f))
 
 #define FRAME_PIXEL_HEIGHT_TO_TEXT_LINES(f, height)                    \
   (((height)                                                           \
@@ -1626,7 +1626,7 @@ flush_frame (struct frame *f)
 #ifdef HAVE_WINDOW_SYSTEM
 
 struct MonitorInfo {
-  XRectangle geom, work;
+  Emacs_Rectangle geom, work;
   int mm_width, mm_height;
   char *name;
 };
diff --git a/src/ftcrfont.c b/src/ftcrfont.c
index e7c73ea..9686cec 100644
--- a/src/ftcrfont.c
+++ b/src/ftcrfont.c
@@ -79,7 +79,6 @@ ftcrfont_glyph_extents (struct font *font,
       cairo_glyph_t cr_glyph = {.index = glyph};
       cairo_text_extents_t extents;
 
-      FT_Activate_Size (ftcrfont_info->ft_size_draw);
       cairo_scaled_font_glyph_extents (ftcrfont_info->cr_scaled_font,
                                       &cr_glyph, 1, &extents);
       cache->lbearing = floor (extents.x_bearing);
@@ -118,103 +117,159 @@ ftcrfont_match (struct frame *f, Lisp_Object spec)
 static Lisp_Object
 ftcrfont_open (struct frame *f, Lisp_Object entity, int pixel_size)
 {
-  Lisp_Object font_object;
-
-  FT_UInt size = XFIXNUM (AREF (entity, FONT_SIZE_INDEX));
+  FcResult result;
+  Lisp_Object val, filename, font_object;
+  FcPattern *pat, *match;
+  struct font_info *ftcrfont_info;
+  struct font *font;
+  double size = 0;
+  cairo_font_face_t *font_face;
+  cairo_font_extents_t extents;
+  FT_Face ft_face;
+  FcMatrix *matrix;
+
+  val = assq_no_quit (QCfont_entity, AREF (entity, FONT_EXTRA_INDEX));
+  if (! CONSP (val))
+    return Qnil;
+  val = XCDR (val);
+  filename = XCAR (val);
+  size = XFIXNUM (AREF (entity, FONT_SIZE_INDEX));
   if (size == 0)
     size = pixel_size;
+
+  block_input ();
+
+  pat = ftfont_entity_pattern (entity, pixel_size);
+  FcConfigSubstitute (NULL, pat, FcMatchPattern);
+  FcDefaultSubstitute (pat);
+  match = FcFontMatch (NULL, pat, &result);
+  ftfont_fix_match (pat, match);
+
+  FcPatternDestroy (pat);
+  font_face = cairo_ft_font_face_create_for_pattern (match);
+  if (!font_face)
+    {
+      unblock_input ();
+      FcPatternDestroy (match);
+      return Qnil;
+    }
+  cairo_matrix_t font_matrix, ctm;
+  cairo_matrix_init_scale (&font_matrix, pixel_size, pixel_size);
+  cairo_matrix_init_identity (&ctm);
+  cairo_font_options_t *options = cairo_font_options_create ();
+  cairo_scaled_font_t *scaled_font
+    = cairo_scaled_font_create (font_face, &font_matrix, &ctm, options);
+  cairo_font_face_destroy (font_face);
+  cairo_font_options_destroy (options);
+  unblock_input ();
+
   font_object = font_build_object (VECSIZE (struct font_info),
                                   Qftcr, entity, size);
+  ASET (font_object, FONT_FILE_INDEX, filename);
+  font = XFONT_OBJECT (font_object);
+  font->pixel_size = size;
+  font->driver = &ftcrfont_driver;
+  font->encoding_charset = font->repertory_charset = -1;
+
+  ftcrfont_info = (struct font_info *) font;
+  ftcrfont_info->cr_scaled_font = scaled_font;
+
+  /* This means that there's no need of transformation.  */
+  ftcrfont_info->matrix.xx = 0;
+  if (FcPatternGetMatrix (match, FC_MATRIX, 0, &matrix) == FcResultMatch)
+    {
+      ftcrfont_info->matrix.xx = 0x10000L * matrix->xx;
+      ftcrfont_info->matrix.yy = 0x10000L * matrix->yy;
+      ftcrfont_info->matrix.xy = 0x10000L * matrix->xy;
+      ftcrfont_info->matrix.yx = 0x10000L * matrix->yx;
+    }
+
+  ftcrfont_info->metrics = NULL;
+  ftcrfont_info->metrics_nrows = 0;
+
   block_input ();
-  font_object = ftfont_open2 (f, entity, pixel_size, font_object);
-  if (FONT_OBJECT_P (font_object))
+  cairo_glyph_t stack_glyph;
+  int n = 0;
+  font->min_width = font->average_width = font->space_width = 0;
+  for (char c = 32; c < 127; c++)
     {
-      struct font *font = XFONT_OBJECT (font_object);
-      struct font_info *ftcrfont_info = (struct font_info *) font;
-      FT_Face ft_face = ftcrfont_info->ft_size->face;
-
-      font->driver = &ftcrfont_driver;
-      FT_New_Size (ft_face, &ftcrfont_info->ft_size_draw);
-      FT_Activate_Size (ftcrfont_info->ft_size_draw);
-      if (ftcrfont_info->bitmap_strike_index < 0)
-       FT_Set_Pixel_Sizes (ft_face, 0, font->pixel_size);
-      else
-       FT_Select_Size (ft_face, ftcrfont_info->bitmap_strike_index);
-      cairo_font_face_t *font_face =
-       cairo_ft_font_face_create_for_ft_face (ft_face, 0);
-      cairo_matrix_t font_matrix, ctm;
-      cairo_matrix_init_scale (&font_matrix, pixel_size, pixel_size);
-      cairo_matrix_init_identity (&ctm);
-      cairo_font_options_t *options = cairo_font_options_create ();
-      ftcrfont_info->cr_scaled_font =
-       cairo_scaled_font_create (font_face, &font_matrix, &ctm, options);
-      cairo_font_face_destroy (font_face);
-      cairo_font_options_destroy (options);
-      ftcrfont_info->metrics = NULL;
-      ftcrfont_info->metrics_nrows = 0;
-      if (ftcrfont_info->bitmap_strike_index >= 0)
+      cairo_glyph_t *glyphs = &stack_glyph;
+      int num_glyphs = 1;
+      cairo_status_t status =
+       cairo_scaled_font_text_to_glyphs (ftcrfont_info->cr_scaled_font,
+                                         0, 0, &c, 1, &glyphs, &num_glyphs,
+                                         NULL, NULL, NULL);
+
+      if (status == CAIRO_STATUS_SUCCESS)
        {
-         /* Several members of struct font/font_info set by
-            ftfont_open2 are bogus.  Recalculate them with cairo
-            scaled font functions.  */
-         cairo_font_extents_t extents;
-         cairo_scaled_font_extents (ftcrfont_info->cr_scaled_font, &extents);
-         font->ascent = lround (extents.ascent);
-         Lisp_Object val = assq_no_quit (QCminspace,
-                                         AREF (entity, FONT_EXTRA_INDEX));
-         if (!(CONSP (val) && NILP (XCDR (val))))
-           {
-             font->descent = lround (extents.descent);
-             font->height = font->ascent + font->descent;
-           }
-         else
+         if (glyphs != &stack_glyph)
+           cairo_glyph_free (glyphs);
+         else if (stack_glyph.index)
            {
-             font->height = lround (extents.height);
-             font->descent = font->height - font->ascent;
+             int this_width = ftcrfont_glyph_extents (font, stack_glyph.index,
+                                                      NULL);
+
+             if (this_width > 0
+                 && (! font->min_width
+                     || font->min_width > this_width))
+               font->min_width = this_width;
+             if (c == 32)
+               font->space_width = this_width;
+             font->average_width += this_width;
+             n++;
            }
+       }
+    }
+  if (n > 0)
+    font->average_width /= n;
 
-         cairo_glyph_t stack_glyph;
-         int n = 0;
-         font->min_width = font->average_width = font->space_width = 0;
-         for (char c = 32; c < 127; c++)
-           {
-             cairo_glyph_t *glyphs = &stack_glyph;
-             int num_glyphs = 1;
-             cairo_status_t status =
-               cairo_scaled_font_text_to_glyphs (ftcrfont_info->cr_scaled_font,
-                                                 0, 0, &c, 1,
-                                                 &glyphs, &num_glyphs,
-                                                 NULL, NULL, NULL);
-
-             if (status == CAIRO_STATUS_SUCCESS)
-               {
-                 if (glyphs != &stack_glyph)
-                   cairo_glyph_free (glyphs);
-                 else
-                   {
-                     int this_width =
-                       ftcrfont_glyph_extents (font, stack_glyph.index, NULL);
-
-                     if (this_width > 0
-                         && (! font->min_width
-                             || font->min_width > this_width))
-                       font->min_width = this_width;
-                     if (c == 32)
-                       font->space_width = this_width;
-                     font->average_width += this_width;
-                     n++;
-                   }
-               }
-           }
-         if (n > 0)
-           font->average_width /= n;
+  cairo_scaled_font_extents (ftcrfont_info->cr_scaled_font, &extents);
+  font->ascent = lround (extents.ascent);
+  val = assq_no_quit (QCminspace, AREF (entity, FONT_EXTRA_INDEX));
+  if (!(CONSP (val) && NILP (XCDR (val))))
+    {
+      font->descent = lround (extents.descent);
+      font->height = font->ascent + font->descent;
+    }
+  else
+    {
+      font->height = lround (extents.height);
+      font->descent = font->height - font->ascent;
+    }
 
-         font->underline_position = -1;
-         font->underline_thickness = 0;
-       }
+  ft_face = cairo_ft_scaled_font_lock_face (scaled_font);
+  if (XFIXNUM (AREF (entity, FONT_SIZE_INDEX)) == 0)
+    {
+      int upEM = ft_face->units_per_EM;
+
+      font->underline_position = -ft_face->underline_position * size / upEM;
+      font->underline_thickness = ft_face->underline_thickness * size / upEM;
+      if (font->underline_thickness > 2)
+       font->underline_position -= font->underline_thickness / 2;
+    }
+  else
+    {
+      font->underline_position = -1;
+      font->underline_thickness = 0;
     }
+#ifdef HAVE_LIBOTF
+  ftcrfont_info->maybe_otf = (ft_face->face_flags & FT_FACE_FLAG_SFNT) != 0;
+  ftcrfont_info->otf = NULL;
+#endif /* HAVE_LIBOTF */
+  if (ft_face->units_per_EM)
+    ftcrfont_info->bitmap_position_unit = 0;
+  else
+    ftcrfont_info->bitmap_position_unit = (extents.height
+                                          / ft_face->size->metrics.height);
+  cairo_ft_scaled_font_unlock_face (scaled_font);
+  ftcrfont_info->ft_size = NULL;
   unblock_input ();
 
+  font->baseline_offset = 0;
+  font->relative_compose = 0;
+  font->default_ascent = 0;
+  font->vertical_centering = false;
+
   return font_object;
 }
 
@@ -225,24 +280,63 @@ ftcrfont_close (struct font *font)
     return;
 
   struct font_info *ftcrfont_info = (struct font_info *) font;
-  int i;
 
   block_input ();
-  for (i = 0; i < ftcrfont_info->metrics_nrows; i++)
+#ifdef HAVE_LIBOTF
+  if (ftcrfont_info->otf)
+    {
+      OTF_close (ftcrfont_info->otf);
+      ftcrfont_info->otf = NULL;
+    }
+#endif
+  for (int i = 0; i < ftcrfont_info->metrics_nrows; i++)
     if (ftcrfont_info->metrics[i])
       xfree (ftcrfont_info->metrics[i]);
   if (ftcrfont_info->metrics)
     xfree (ftcrfont_info->metrics);
-  FT_Done_Size (ftcrfont_info->ft_size_draw);
   cairo_scaled_font_destroy (ftcrfont_info->cr_scaled_font);
   unblock_input ();
+}
+
+static int
+ftcrfont_has_char (Lisp_Object font, int c)
+{
+  if (FONT_ENTITY_P (font))
+    return ftfont_has_char (font, c);
 
-  ftfont_close (font);
+  return -1;
+}
+
+static unsigned
+ftcrfont_encode_char (struct font *font, int c)
+{
+  struct font_info *ftcrfont_info = (struct font_info *) font;
+  unsigned code = FONT_INVALID_CODE;
+  unsigned char utf8[MAX_MULTIBYTE_LENGTH];
+  unsigned char *p = utf8;
+  cairo_glyph_t stack_glyph;
+  cairo_glyph_t *glyphs = &stack_glyph;
+  int num_glyphs = 1;
+
+  CHAR_STRING_ADVANCE (c, p);
+  if (cairo_scaled_font_text_to_glyphs (ftcrfont_info->cr_scaled_font, 0, 0,
+                                       (char *) utf8, p - utf8,
+                                       &glyphs, &num_glyphs,
+                                       NULL, NULL, NULL)
+      == CAIRO_STATUS_SUCCESS)
+    {
+      if (glyphs != &stack_glyph)
+       cairo_glyph_free (glyphs);
+      else if (stack_glyph.index)
+       code = stack_glyph.index;
+    }
+
+  return code;
 }
 
 static void
 ftcrfont_text_extents (struct font *font,
-                       unsigned *code,
+                       const unsigned *code,
                        int nglyphs,
                        struct font_metrics *metrics)
 {
@@ -280,10 +374,18 @@ ftcrfont_get_bitmap (struct font *font, unsigned int code,
 {
   struct font_info *ftcrfont_info = (struct font_info *) font;
 
-  if (ftcrfont_info->bitmap_strike_index < 0)
-    return ftfont_get_bitmap (font, code, bitmap, bits_per_pixel);
+  if (ftcrfont_info->bitmap_position_unit)
+    return -1;
 
-  return -1;
+  cairo_scaled_font_t *scaled_font = ftcrfont_info->cr_scaled_font;
+  FT_Face ft_face = cairo_ft_scaled_font_lock_face (scaled_font);
+
+  ftcrfont_info->ft_size = ft_face->size;
+  int result = ftfont_get_bitmap (font, code, bitmap, bits_per_pixel);
+  cairo_ft_scaled_font_unlock_face (scaled_font);
+  ftcrfont_info->ft_size = NULL;
+
+  return result;
 }
 
 static int
@@ -292,25 +394,75 @@ ftcrfont_anchor_point (struct font *font, unsigned int 
code, int idx,
 {
   struct font_info *ftcrfont_info = (struct font_info *) font;
 
-  if (ftcrfont_info->bitmap_strike_index < 0)
-    return ftfont_anchor_point (font, code, idx, x, y);
+  if (ftcrfont_info->bitmap_position_unit)
+    return -1;
 
-  return -1;
+  cairo_scaled_font_t *scaled_font = ftcrfont_info->cr_scaled_font;
+  FT_Face ft_face = cairo_ft_scaled_font_lock_face (scaled_font);
+
+  ftcrfont_info->ft_size = ft_face->size;
+  int result = ftfont_anchor_point (font, code, idx, x, y);
+  cairo_ft_scaled_font_unlock_face (scaled_font);
+  ftcrfont_info->ft_size = NULL;
+
+  return result;
 }
 
+#ifdef HAVE_LIBOTF
 static Lisp_Object
-ftcrfont_shape (Lisp_Object lgstring)
+ftcrfont_otf_capability (struct font *font)
 {
+  struct font_info *ftcrfont_info = (struct font_info *) font;
+  cairo_scaled_font_t *scaled_font = ftcrfont_info->cr_scaled_font;
+  FT_Face ft_face = cairo_ft_scaled_font_lock_face (scaled_font);
+
+  ftcrfont_info->ft_size = ft_face->size;
+  Lisp_Object result = ftfont_otf_capability (font);
+  cairo_ft_scaled_font_unlock_face (scaled_font);
+  ftcrfont_info->ft_size = NULL;
+
+  return result;
+}
+#endif
+
 #if defined HAVE_M17N_FLT && defined HAVE_LIBOTF
+static Lisp_Object
+ftcrfont_shape (Lisp_Object lgstring)
+{
   struct font *font = CHECK_FONT_GET_OBJECT (LGSTRING_FONT (lgstring));
   struct font_info *ftcrfont_info = (struct font_info *) font;
 
-  if (ftcrfont_info->bitmap_strike_index < 0)
-    return ftfont_shape (lgstring);
+  if (ftcrfont_info->bitmap_position_unit)
+    return make_fixnum (0);
+
+  cairo_scaled_font_t *scaled_font = ftcrfont_info->cr_scaled_font;
+  FT_Face ft_face = cairo_ft_scaled_font_lock_face (scaled_font);
+
+  ftcrfont_info->ft_size = ft_face->size;
+  Lisp_Object result = ftfont_shape (lgstring);
+  cairo_ft_scaled_font_unlock_face (scaled_font);
+  ftcrfont_info->ft_size = NULL;
+
+  return result;
+}
 #endif
 
-  return make_fixnum (0);
+#ifdef HAVE_OTF_GET_VARIATION_GLYPHS
+static int
+ftcrfont_variation_glyphs (struct font *font, int c, unsigned variations[256])
+{
+  struct font_info *ftcrfont_info = (struct font_info *) font;
+  cairo_scaled_font_t *scaled_font = ftcrfont_info->cr_scaled_font;
+  FT_Face ft_face = cairo_ft_scaled_font_lock_face (scaled_font);
+
+  ftcrfont_info->ft_size = ft_face->size;
+  int result = ftfont_variation_glyphs (font, c, variations);
+  cairo_ft_scaled_font_unlock_face (scaled_font);
+  ftcrfont_info->ft_size = NULL;
+
+  return result;
 }
+#endif /* HAVE_OTF_GET_VARIATION_GLYPHS */
 
 static int
 ftcrfont_draw (struct glyph_string *s,
@@ -321,8 +473,6 @@ ftcrfont_draw (struct glyph_string *s,
   struct font_info *ftcrfont_info = (struct font_info *) s->font;
   cairo_t *cr;
   cairo_glyph_t *glyphs;
-  cairo_surface_t *surface;
-  cairo_surface_type_t surface_type;
   int len = to - from;
   int i;
 
@@ -341,28 +491,17 @@ ftcrfont_draw (struct glyph_string *s,
   glyphs = alloca (sizeof (cairo_glyph_t) * len);
   for (i = 0; i < len; i++)
     {
-      unsigned code = ((XCHAR2B_BYTE1 (s->char2b + from + i) << 8)
-                      | XCHAR2B_BYTE2 (s->char2b + from + i));
-
-      glyphs[i].index = code;
+      glyphs[i].index = s->char2b[from + i];
       glyphs[i].x = x;
       glyphs[i].y = y;
-      x += (s->padding_p ? 1 : ftcrfont_glyph_extents (s->font, code, NULL));
+      x += (s->padding_p ? 1 : ftcrfont_glyph_extents (s->font,
+                                                       glyphs[i].index,
+                                                       NULL));
     }
 
   x_set_cr_source_with_gc_foreground (f, s->gc);
   cairo_set_scaled_font (cr, ftcrfont_info->cr_scaled_font);
-
-  FT_Activate_Size (ftcrfont_info->ft_size_draw);
   cairo_show_glyphs (cr, glyphs, len);
-  surface = cairo_get_target (cr);
-  /* XXX: It used to be necessary to flush when exporting.  It might
-     be the case that this is no longer necessary.  */
-  surface_type = cairo_surface_get_type (surface);
-  if (surface_type != CAIRO_SURFACE_TYPE_XLIB
-      && (surface_type != CAIRO_SURFACE_TYPE_IMAGE
-         || cairo_image_surface_get_format (surface) != CAIRO_FORMAT_ARGB32))
-    cairo_surface_flush (surface);
 
   x_end_cr_clip (f);
 
@@ -384,18 +523,20 @@ struct font_driver const ftcrfont_driver =
   .list_family = ftfont_list_family,
   .open = ftcrfont_open,
   .close = ftcrfont_close,
-  .has_char = ftfont_has_char,
-  .encode_char = ftfont_encode_char,
+  .has_char = ftcrfont_has_char,
+  .encode_char = ftcrfont_encode_char,
   .text_extents = ftcrfont_text_extents,
   .draw = ftcrfont_draw,
   .get_bitmap = ftcrfont_get_bitmap,
   .anchor_point = ftcrfont_anchor_point,
 #ifdef HAVE_LIBOTF
-  .otf_capability = ftfont_otf_capability,
+  .otf_capability = ftcrfont_otf_capability,
 #endif
+#if defined HAVE_M17N_FLT && defined HAVE_LIBOTF
   .shape = ftcrfont_shape,
+#endif
 #ifdef HAVE_OTF_GET_VARIATION_GLYPHS
-  .get_variation_glyphs = ftfont_variation_glyphs,
+  .get_variation_glyphs = ftcrfont_variation_glyphs,
 #endif
   .filter_properties = ftfont_filter_properties,
   .combining_capability = ftfont_combining_capability,
diff --git a/src/ftfont.c b/src/ftfont.c
index 4770c3c..d8b510d 100644
--- a/src/ftfont.c
+++ b/src/ftfont.c
@@ -1079,12 +1079,159 @@ ftfont_list_family (struct frame *f)
   return list;
 }
 
+void
+ftfont_fix_match (FcPattern *pat, FcPattern *match)
+{
+  /*  These values are not used for matching (except antialias), but for
+      rendering, so make sure they are carried over to the match.
+      We also put antialias here because most fonts are antialiased, so
+      the match will have antialias true.  */
+
+  FcBool b = FcTrue;
+  int i;
+  double dpi;
+
+  FcPatternGetBool (pat, FC_ANTIALIAS, 0, &b);
+  if (! b)
+    {
+      FcPatternDel (match, FC_ANTIALIAS);
+      FcPatternAddBool (match, FC_ANTIALIAS, FcFalse);
+    }
+  FcPatternGetBool (pat, FC_HINTING, 0, &b);
+  if (! b)
+    {
+      FcPatternDel (match, FC_HINTING);
+      FcPatternAddBool (match, FC_HINTING, FcFalse);
+    }
+#ifndef FC_HINT_STYLE
+# define FC_HINT_STYLE "hintstyle"
+#endif
+  if (FcResultMatch == FcPatternGetInteger (pat, FC_HINT_STYLE, 0, &i))
+    {
+      FcPatternDel (match, FC_HINT_STYLE);
+      FcPatternAddInteger (match, FC_HINT_STYLE, i);
+    }
+#ifndef FC_LCD_FILTER
+  /* Older fontconfig versions don't have FC_LCD_FILTER. */
+#define FC_LCD_FILTER "lcdfilter"
+#endif
+  if (FcResultMatch == FcPatternGetInteger (pat, FC_LCD_FILTER, 0, &i))
+    {
+      FcPatternDel (match, FC_LCD_FILTER);
+      FcPatternAddInteger (match, FC_LCD_FILTER, i);
+    }
+  if (FcResultMatch == FcPatternGetInteger (pat, FC_RGBA, 0, &i))
+    {
+      FcPatternDel (match, FC_RGBA);
+      FcPatternAddInteger (match, FC_RGBA, i);
+    }
+  if (FcResultMatch == FcPatternGetDouble (pat, FC_DPI, 0, &dpi))
+    {
+      FcPatternDel (match, FC_DPI);
+      FcPatternAddDouble (match, FC_DPI, dpi);
+    }
+}
+
+void
+ftfont_add_rendering_parameters (FcPattern *pat, Lisp_Object entity)
+{
+  Lisp_Object tail;
+  int ival;
+
+  for (tail = AREF (entity, FONT_EXTRA_INDEX); CONSP (tail); tail = XCDR 
(tail))
+    {
+      Lisp_Object key = XCAR (XCAR (tail));
+      Lisp_Object val = XCDR (XCAR (tail));
+
+      if (EQ (key, QCantialias))
+          FcPatternAddBool (pat, FC_ANTIALIAS, NILP (val) ? FcFalse : FcTrue);
+      else if (EQ (key, QChinting))
+       FcPatternAddBool (pat, FC_HINTING, NILP (val) ? FcFalse : FcTrue);
+      else if (EQ (key, QCautohint))
+       FcPatternAddBool (pat, FC_AUTOHINT, NILP (val) ? FcFalse : FcTrue);
+      else if (EQ (key, QChintstyle))
+       {
+         if (FIXNUMP (val))
+           FcPatternAddInteger (pat, FC_HINT_STYLE, XFIXNUM (val));
+          else if (SYMBOLP (val)
+                   && FcNameConstant (SDATA (SYMBOL_NAME (val)), &ival))
+           FcPatternAddInteger (pat, FC_HINT_STYLE, ival);
+       }
+      else if (EQ (key, QCrgba))
+       {
+         if (FIXNUMP (val))
+           FcPatternAddInteger (pat, FC_RGBA, XFIXNUM (val));
+          else if (SYMBOLP (val)
+                   && FcNameConstant (SDATA (SYMBOL_NAME (val)), &ival))
+           FcPatternAddInteger (pat, FC_RGBA, ival);
+       }
+      else if (EQ (key, QClcdfilter))
+       {
+         if (FIXNUMP (val))
+           FcPatternAddInteger (pat, FC_LCD_FILTER, ival = XFIXNUM (val));
+          else if (SYMBOLP (val)
+                   && FcNameConstant (SDATA (SYMBOL_NAME (val)), &ival))
+           FcPatternAddInteger (pat, FC_LCD_FILTER, ival);
+       }
+#ifdef FC_EMBOLDEN
+      else if (EQ (key, QCembolden))
+       FcPatternAddBool (pat, FC_EMBOLDEN, NILP (val) ? FcFalse : FcTrue);
+#endif
+    }
+}
+
+FcPattern *
+ftfont_entity_pattern (Lisp_Object entity, int pixel_size)
+{
+  Lisp_Object val, filename, idx;
+  FcPattern *pat;
+  int i;
+
+  val = assq_no_quit (QCfont_entity, AREF (entity, FONT_EXTRA_INDEX));
+  eassert (CONSP (val));
+  val = XCDR (val);
+  filename = XCAR (val);
+  idx = XCDR (val);
+  pat = FcPatternCreate ();
+  FcPatternAddInteger (pat, FC_WEIGHT, FONT_WEIGHT_NUMERIC (entity));
+  i = FONT_SLANT_NUMERIC (entity) - 100;
+  if (i < 0) i = 0;
+  FcPatternAddInteger (pat, FC_SLANT, i);
+  FcPatternAddInteger (pat, FC_WIDTH, FONT_WIDTH_NUMERIC (entity));
+  FcPatternAddDouble (pat, FC_PIXEL_SIZE, pixel_size);
+  val = AREF (entity, FONT_FAMILY_INDEX);
+  if (! NILP (val))
+    FcPatternAddString (pat, FC_FAMILY, (FcChar8 *) SDATA (SYMBOL_NAME (val)));
+  val = AREF (entity, FONT_FOUNDRY_INDEX);
+  if (! NILP (val))
+    FcPatternAddString (pat, FC_FOUNDRY, (FcChar8 *) SDATA (SYMBOL_NAME 
(val)));
+  val = AREF (entity, FONT_SPACING_INDEX);
+  if (! NILP (val))
+    FcPatternAddInteger (pat, FC_SPACING, XFIXNUM (val));
+  val = AREF (entity, FONT_DPI_INDEX);
+  if (! NILP (val))
+    {
+      double dbl = XFIXNUM (val);
+
+      FcPatternAddDouble (pat, FC_DPI, dbl);
+    }
+  val = AREF (entity, FONT_AVGWIDTH_INDEX);
+  if (FIXNUMP (val) && XFIXNUM (val) == 0)
+    FcPatternAddBool (pat, FC_SCALABLE, FcTrue);
+  /* This is necessary to identify the exact font (e.g. 10x20.pcf.gz
+     over 10x20-ISO8859-1.pcf.gz).  */
+  FcPatternAddCharSet (pat, FC_CHARSET, ftfont_get_fc_charset (entity));
+
+  ftfont_add_rendering_parameters (pat, entity);
+
+  FcPatternAddString (pat, FC_FILE, (FcChar8 *) SDATA (filename));
+  FcPatternAddInteger (pat, FC_INDEX, XFIXNUM (idx));
+
+  return pat;
+}
 
 Lisp_Object
-ftfont_open2 (struct frame *f,
-              Lisp_Object entity,
-              int pixel_size,
-              Lisp_Object font_object)
+ftfont_open (struct frame *f, Lisp_Object entity, int pixel_size)
 {
   struct font_info *ftfont_info;
   struct font *font;
@@ -1092,12 +1239,11 @@ ftfont_open2 (struct frame *f,
   FT_Face ft_face;
   FT_Size ft_size;
   FT_UInt size;
-  Lisp_Object val, filename, idx, cache;
+  Lisp_Object val, filename, idx, cache, font_object;
   bool scalable;
   int spacing;
   int i;
   double upEM;
-  FT_Int strike_index = -1;
 
   val = assq_no_quit (QCfont_entity, AREF (entity, FONT_EXTRA_INDEX));
   if (! CONSP (val))
@@ -1126,35 +1272,17 @@ ftfont_open2 (struct frame *f,
     size = pixel_size;
   if (FT_Set_Pixel_Sizes (ft_face, size, size) != 0)
     {
-      int min_distance = INT_MAX;
-      bool magnify = true;
-
-      for (FT_Int i = 0; i < ft_face->num_fixed_sizes; i++)
-       {
-         int distance = ft_face->available_sizes[i].height - (int) size;
-
-         /* Prefer down-scaling to upscaling.  */
-         if (magnify == (distance < 0) ? abs (distance) <= min_distance
-             : magnify)
-           {
-             magnify = distance < 0;
-             min_distance = abs (distance);
-             strike_index = i;
-           }
-       }
-
-      if (strike_index < 0 || FT_Select_Size (ft_face, strike_index) != 0)
+      if (cache_data->face_refcount == 0)
        {
-         if (cache_data->face_refcount == 0)
-           {
-             FT_Done_Face (ft_face);
-             cache_data->ft_face = NULL;
-           }
-         return Qnil;
+         FT_Done_Face (ft_face);
+         cache_data->ft_face = NULL;
        }
+      return Qnil;
     }
   cache_data->face_refcount++;
 
+  font_object = font_build_object (VECSIZE (struct font_info),
+                                  Qfreetype, entity, size);
   ASET (font_object, FONT_FILE_INDEX, filename);
   font = XFONT_OBJECT (font_object);
   ftfont_info = (struct font_info *) font;
@@ -1164,7 +1292,6 @@ ftfont_open2 (struct frame *f,
   ftfont_info->maybe_otf = (ft_face->face_flags & FT_FACE_FLAG_SFNT) != 0;
   ftfont_info->otf = NULL;
 #endif /* HAVE_LIBOTF */
-  ftfont_info->bitmap_strike_index = strike_index;
   /* This means that there's no need of transformation.  */
   ftfont_info->matrix.xx = 0;
   font->pixel_size = size;
@@ -1258,31 +1385,6 @@ ftfont_open2 (struct frame *f,
   return font_object;
 }
 
-Lisp_Object
-ftfont_open (struct frame *f, Lisp_Object entity, int pixel_size)
-{
-  Lisp_Object font_object;
-  FT_UInt size;
-  size = XFIXNUM (AREF (entity, FONT_SIZE_INDEX));
-  if (size == 0)
-    size = pixel_size;
-  font_object = font_build_object (VECSIZE (struct font_info),
-                                  Qfreetype, entity, size);
-  font_object = ftfont_open2 (f, entity, pixel_size, font_object);
-  if (FONT_OBJECT_P (font_object))
-    {
-      struct font *font = XFONT_OBJECT (font_object);
-      struct font_info *ftfont_info = (struct font_info *) font;
-
-      if (ftfont_info->bitmap_strike_index >= 0)
-       {
-         ftfont_close (font);
-         font_object = Qnil;
-       }
-    }
-  return font_object;
-}
-
 void
 ftfont_close (struct font *font)
 {
@@ -1353,7 +1455,7 @@ ftfont_encode_char (struct font *font, int c)
 }
 
 void
-ftfont_text_extents (struct font *font, unsigned int *code,
+ftfont_text_extents (struct font *font, const unsigned int *code,
                     int nglyphs, struct font_metrics *metrics)
 {
   struct font_info *ftfont_info = (struct font_info *) font;
@@ -2789,6 +2891,14 @@ syms_of_ftfont (void)
   /* The boolean-valued font property key specifying the use of leading.  */
   DEFSYM (QCminspace, ":minspace");
 
+  /* Fontconfig's rendering parameters.  */
+  DEFSYM (QChinting, ":hinting");
+  DEFSYM (QCautohint, ":autohint");
+  DEFSYM (QChintstyle, ":hintstyle");
+  DEFSYM (QCrgba, ":rgba");
+  DEFSYM (QCembolden, ":embolden");
+  DEFSYM (QClcdfilter, ":lcdfilter");
+
   staticpro (&freetype_font_cache);
   freetype_font_cache = list1 (Qt);
 
diff --git a/src/ftfont.h b/src/ftfont.h
index adbda49..7860469 100644
--- a/src/ftfont.h
+++ b/src/ftfont.h
@@ -37,10 +37,9 @@ along with GNU Emacs.  If not, see 
<https://www.gnu.org/licenses/>.  */
 #endif /* HAVE_LIBOTF */
 
 extern FcCharSet *ftfont_get_fc_charset (Lisp_Object);
-extern Lisp_Object ftfont_open2 (struct frame *f,
-                                 Lisp_Object entity,
-                                 int pixel_size,
-                                 Lisp_Object font_object);
+extern void ftfont_fix_match (FcPattern *, FcPattern *);
+extern void ftfont_add_rendering_parameters (FcPattern *, Lisp_Object);
+extern FcPattern *ftfont_entity_pattern (Lisp_Object, int);
 
 /* This struct is shared by the XFT, Freetype, and Cairo font
    backends.  Members up to and including 'matrix' are common, the
@@ -54,17 +53,14 @@ struct font_info
 #endif /* HAVE_LIBOTF */
   FT_Size ft_size;
   int index;
-  /* Index of the bitmap strike used as a fallback for
-     FT_Set_Pixel_Sizes failure.  If the value is non-negative, then
-     ft_size is not of the requested size.  Otherwise it is -1.  */
-  FT_Int bitmap_strike_index;
   FT_Matrix matrix;
 
 #ifdef USE_CAIRO
   cairo_scaled_font_t *cr_scaled_font;
-  /* To prevent cairo from cluttering the activated FT_Size maintained
-     in ftfont.c, we activate this special FT_Size before drawing.  */
-  FT_Size ft_size_draw;
+  /* Scale factor from the bitmap strike metrics in 1/64 pixels, used
+     as the hb_position_t value in HarfBuzz, to those in (scaled)
+     pixels.  The value is 0 for scalable fonts.  */
+  double bitmap_position_unit;
   /* Font metrics cache.  */
   struct font_metrics **metrics;
   short metrics_nrows;
diff --git a/src/ftxfont.c b/src/ftxfont.c
index f9a69c3..8bce7f1 100644
--- a/src/ftxfont.c
+++ b/src/ftxfont.c
@@ -252,7 +252,7 @@ ftxfont_draw (struct glyph_string *s, int from, int to, int 
x, int y,
   struct font *font = s->font;
   XPoint p[0x700];
   int n[7];
-  unsigned *code;
+  unsigned *code = s->char2b + from;
   int len = to - from;
   int i;
   GC *gcs;
@@ -260,14 +260,9 @@ ftxfont_draw (struct glyph_string *s, int from, int to, 
int x, int y,
 
   n[0] = n[1] = n[2] = n[3] = n[4] = n[5] = n[6] = 0;
 
-  USE_SAFE_ALLOCA;
-  SAFE_NALLOCA (code, 1, len);
   block_input ();
   if (with_background)
     ftxfont_draw_background (f, font, s->gc, x, y, s->width);
-  for (i = 0; i < len; i++)
-    code[i] = ((XCHAR2B_BYTE1 (s->char2b + from + i) << 8)
-              | XCHAR2B_BYTE2 (s->char2b + from + i));
 
   if (face->gc == s->gc)
     {
@@ -312,7 +307,6 @@ ftxfont_draw (struct glyph_string *s, int from, int to, int 
x, int y,
     }
 
   unblock_input ();
-  SAFE_FREE ();
 
   return len;
 }
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 4823357..43918dd 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -520,7 +520,7 @@ get_utf8_string (const char *str)
 bool
 xg_check_special_colors (struct frame *f,
                          const char *color_name,
-                         XColor *color)
+                         Emacs_Color *color)
 {
   bool success_p = 0;
   bool get_bg = strcmp ("gtk_selection_bg_color", color_name) == 0;
diff --git a/src/gtkutil.h b/src/gtkutil.h
index ec89978..229aa08 100644
--- a/src/gtkutil.h
+++ b/src/gtkutil.h
@@ -166,7 +166,7 @@ extern void xg_free_frame_widgets (struct frame *f);
 extern void xg_set_background_color (struct frame *f, unsigned long bg);
 extern bool xg_check_special_colors (struct frame *f,
                                     const char *color_name,
-                                    XColor *color);
+                                    Emacs_Color *color);
 
 extern void xg_set_frame_icon (struct frame *f,
                                Pixmap icon_pixmap,
diff --git a/src/image.c b/src/image.c
index 071b92a..699bdfd 100644
--- a/src/image.c
+++ b/src/image.c
@@ -132,17 +132,17 @@ static unsigned long *colors_in_color_table (int *n);
 #ifdef HAVE_NS
 /* Use with images created by ns_image_for_XPM.  */
 static unsigned long
-XGetPixel (XImagePtr ximage, int x, int y)
+XGetPixel (Emacs_Pix_Container image, int x, int y)
 {
-  return ns_get_pixel (ximage, x, y);
+  return ns_get_pixel (image, x, y);
 }
 
 /* Use with images created by ns_image_for_XPM; alpha set to 1;
    pixel is assumed to be in RGB form.  */
 static void
-XPutPixel (XImagePtr ximage, int x, int y, unsigned long pixel)
+XPutPixel (Emacs_Pix_Container image, int x, int y, unsigned long pixel)
 {
-  ns_put_pixel (ximage, x, y, pixel);
+  ns_put_pixel (image, x, y, pixel);
 }
 #endif /* HAVE_NS */
 
@@ -228,7 +228,7 @@ image_create_bitmap_from_data (struct frame *f, char *bits,
 
 #ifdef HAVE_NTGUI
   Lisp_Object frame UNINIT;    /* The value is not used.  */
-  Pixmap bitmap;
+  Emacs_Pixmap bitmap;
   bitmap = CreateBitmap (width, height,
                         FRAME_DISPLAY_INFO (XFRAME (frame))->n_planes,
                         FRAME_DISPLAY_INFO (XFRAME (frame))->n_cbits,
@@ -412,17 +412,19 @@ typedef void Picture;
 #endif
 
 static bool image_create_x_image_and_pixmap_1 (struct frame *, int, int, int,
-                                               XImagePtr *, Pixmap *, Picture 
*);
-static void image_destroy_x_image (XImagePtr ximg);
+                                               Emacs_Pix_Container *,
+                                               Emacs_Pixmap *, Picture *);
+static void image_destroy_x_image (Emacs_Pix_Container);
 
 #ifdef HAVE_NTGUI
-static XImagePtr_or_DC image_get_x_image_or_dc (struct frame *, struct image *,
-                                               bool, HGDIOBJ *);
-static void image_unget_x_image_or_dc (struct image *, bool, XImagePtr_or_DC,
-                                      HGDIOBJ);
+static HDC image_get_x_image_or_dc (struct frame *, struct image *,
+                                    bool, HGDIOBJ *);
+static void image_unget_x_image_or_dc (struct image *, bool,
+                                       HDC, HGDIOBJ);
 #else
-static XImagePtr image_get_x_image (struct frame *, struct image *, bool);
-static void image_unget_x_image (struct image *, bool, XImagePtr);
+static Emacs_Pix_Container image_get_x_image (struct frame *, struct image *,
+                                              bool);
+static void image_unget_x_image (struct image *, bool, Emacs_Pix_Container);
 #define image_get_x_image_or_dc(f, img, mask_p, dummy) \
   image_get_x_image (f, img, mask_p)
 #define image_unget_x_image_or_dc(img, mask_p, ximg, dummy)    \
@@ -436,7 +438,7 @@ static void image_sync_to_pixmaps (struct frame *, struct 
image *);
 /* Useful functions defined in the section
    `Image type independent image structures' below. */
 
-static unsigned long four_corners_best (XImagePtr ximg,
+static unsigned long four_corners_best (XImage *ximg,
                                         int *corners,
                                         unsigned long width,
                                         unsigned long height);
@@ -449,7 +451,7 @@ void
 x_create_bitmap_mask (struct frame *f, ptrdiff_t id)
 {
   Pixmap pixmap, mask;
-  XImagePtr ximg, mask_img;
+  XImage *ximg, *mask_img;
   unsigned long width, height;
   bool result;
   unsigned long bg;
@@ -1076,10 +1078,10 @@ image_ascent (struct image *img, struct face *face, 
struct glyph_slice *slice)
 
 #ifdef USE_CAIRO
 static uint32_t
-xcolor_to_argb32 (XColor xc)
+emacs_color_to_argb32 (Emacs_Color *ec)
 {
-  return ((0xffu << 24) | ((xc.red / 256) << 16)
-         | ((xc.green / 256) << 8) | (xc.blue / 256));
+  return ((0xffu << 24) | ((ec->red / 256) << 16)
+         | ((ec->green / 256) << 8) | (ec->blue / 256));
 }
 
 static uint32_t
@@ -1087,11 +1089,11 @@ get_spec_bg_or_alpha_as_argb (struct image *img,
                               struct frame *f)
 {
   uint32_t bgcolor = 0;
-  XColor xbgcolor;
+  Emacs_Color xbgcolor;
   Lisp_Object bg = image_spec_value (img->spec, QCbackground, NULL);
 
   if (STRINGP (bg) && x_parse_color (f, SSDATA (bg), &xbgcolor))
-    bgcolor = xcolor_to_argb32 (xbgcolor);
+    bgcolor = emacs_color_to_argb32 (&xbgcolor);
 
   return bgcolor;
 }
@@ -1121,10 +1123,10 @@ set_cairo_image_surface (struct image *img, 
cairo_surface_t *surface)
 /* Image background colors.  */
 
 /* Find the "best" corner color of a bitmap.
-   On W32, XIMG is assumed to a device context with the bitmap selected.  */
+   On W32, PIMG is assumed to a device context with the bitmap selected.  */
 
 static RGB_PIXEL_COLOR
-four_corners_best (XImagePtr_or_DC ximg, int *corners,
+four_corners_best (Emacs_Pix_Context pimg, int *corners,
                   unsigned long width, unsigned long height)
 {
   RGB_PIXEL_COLOR corner_pixels[4];
@@ -1133,19 +1135,19 @@ four_corners_best (XImagePtr_or_DC ximg, int *corners,
 
   if (corners && corners[BOT_CORNER] >= 0)
     {
-      /* Get the colors at the corner_pixels of ximg.  */
-      corner_pixels[0] = GET_PIXEL (ximg, corners[LEFT_CORNER], 
corners[TOP_CORNER]);
-      corner_pixels[1] = GET_PIXEL (ximg, corners[RIGHT_CORNER] - 1, 
corners[TOP_CORNER]);
-      corner_pixels[2] = GET_PIXEL (ximg, corners[RIGHT_CORNER] - 1, 
corners[BOT_CORNER] - 1);
-      corner_pixels[3] = GET_PIXEL (ximg, corners[LEFT_CORNER], 
corners[BOT_CORNER] - 1);
+      /* Get the colors at the corner_pixels of pimg.  */
+      corner_pixels[0] = GET_PIXEL (pimg, corners[LEFT_CORNER], 
corners[TOP_CORNER]);
+      corner_pixels[1] = GET_PIXEL (pimg, corners[RIGHT_CORNER] - 1, 
corners[TOP_CORNER]);
+      corner_pixels[2] = GET_PIXEL (pimg, corners[RIGHT_CORNER] - 1, 
corners[BOT_CORNER] - 1);
+      corner_pixels[3] = GET_PIXEL (pimg, corners[LEFT_CORNER], 
corners[BOT_CORNER] - 1);
     }
   else
     {
-      /* Get the colors at the corner_pixels of ximg.  */
-      corner_pixels[0] = GET_PIXEL (ximg, 0, 0);
-      corner_pixels[1] = GET_PIXEL (ximg, width - 1, 0);
-      corner_pixels[2] = GET_PIXEL (ximg, width - 1, height - 1);
-      corner_pixels[3] = GET_PIXEL (ximg, 0, height - 1);
+      /* Get the colors at the corner_pixels of pimg.  */
+      corner_pixels[0] = GET_PIXEL (pimg, 0, 0);
+      corner_pixels[1] = GET_PIXEL (pimg, width - 1, 0);
+      corner_pixels[2] = GET_PIXEL (pimg, width - 1, height - 1);
+      corner_pixels[3] = GET_PIXEL (pimg, 0, height - 1);
     }
   /* Choose the most frequently found color as background.  */
   for (i = best_count = 0; i < 4; ++i)
@@ -1165,27 +1167,27 @@ four_corners_best (XImagePtr_or_DC ximg, int *corners,
 
 /* Return the `background' field of IMG.  If IMG doesn't have one yet,
    it is guessed heuristically.  If non-zero, XIMG is an existing
-   XImage object (or device context with the image selected on W32) to
-   use for the heuristic.  */
+   Emacs_Pix_Context object (device context with the image selected on
+   W32) to use for the heuristic.  */
 
 RGB_PIXEL_COLOR
-image_background (struct image *img, struct frame *f, XImagePtr_or_DC ximg)
+image_background (struct image *img, struct frame *f, Emacs_Pix_Context pimg)
 {
   if (! img->background_valid)
     /* IMG doesn't have a background yet, try to guess a reasonable value.  */
     {
-      bool free_ximg = !ximg;
+      bool free_pimg = !pimg;
 #ifdef HAVE_NTGUI
       HGDIOBJ prev;
 #endif /* HAVE_NTGUI */
 
-      if (free_ximg)
-       ximg = image_get_x_image_or_dc (f, img, 0, &prev);
+      if (free_pimg)
+       pimg = image_get_x_image_or_dc (f, img, 0, &prev);
 
-      img->background = four_corners_best (ximg, img->corners, img->width, 
img->height);
+      img->background = four_corners_best (pimg, img->corners, img->width, 
img->height);
 
-      if (free_ximg)
-       image_unget_x_image_or_dc (img, 0, ximg, prev);
+      if (free_pimg)
+       image_unget_x_image_or_dc (img, 0, pimg, prev);
 
       img->background_valid = 1;
     }
@@ -1195,10 +1197,12 @@ image_background (struct image *img, struct frame *f, 
XImagePtr_or_DC ximg)
 
 /* Return the `background_transparent' field of IMG.  If IMG doesn't
    have one yet, it is guessed heuristically.  If non-zero, MASK is an
-   existing XImage object to use for the heuristic.  */
+   existing Emacs_Pix_Context (XImage* on X) object to use for the
+   heuristic.  */
 
 int
-image_background_transparent (struct image *img, struct frame *f, 
XImagePtr_or_DC mask)
+image_background_transparent (struct image *img, struct frame *f,
+                              Emacs_Pix_Context mask)
 {
   if (! img->background_transparent_valid)
     /* IMG doesn't have a background yet, try to guess a reasonable value.  */
@@ -1321,7 +1325,7 @@ static unsigned long
 image_alloc_image_color (struct frame *f, struct image *img,
                          Lisp_Object color_name, unsigned long dflt)
 {
-  XColor color;
+  Emacs_Color color;
   unsigned long result;
 
   eassert (STRINGP (color_name));
@@ -2001,7 +2005,7 @@ mark_image_cache (struct image_cache *c)
    WIDTH and HEIGHT must both be positive.
    If XIMG is null, assume it is a bitmap.  */
 static bool
-image_check_image_size (XImagePtr ximg, int width, int height)
+image_check_image_size (Emacs_Pix_Container ximg, int width, int height)
 {
 #ifdef HAVE_X_WINDOWS
   /* Respect Xlib's limits: it cannot deal with images that have more
@@ -2035,18 +2039,20 @@ image_check_image_size (XImagePtr ximg, int width, int 
height)
 #endif
 }
 
-/* Create an XImage and a pixmap of size WIDTH x HEIGHT for use on
-   frame F.  Set *XIMG and *PIXMAP to the XImage and Pixmap created.
-   Set (*XIMG)->data to a raster of WIDTH x HEIGHT pixels allocated
-   via xmalloc.  Print error messages via image_error if an error
-   occurs.  Value is true if successful.
+/* Create an Emacs_Pix_Container and a pixmap of size WIDTH x
+   HEIGHT for use on frame F.  Set *PIMG and *PIXMAP to the
+   Emacs_Pix_Container and Emacs_Pixmap created.  Set (*PIMG)->data
+   to a raster of WIDTH x HEIGHT pixels allocated via xmalloc.  Print
+   error messages via image_error if an error occurs.  Value is true
+   if successful.
 
    On W32, a DEPTH of zero signifies a 24 bit image, otherwise DEPTH
    should indicate the bit depth of the image.  */
 
 static bool
 image_create_x_image_and_pixmap_1 (struct frame *f, int width, int height, int 
depth,
-                                   XImagePtr *ximg, Pixmap *pixmap, Picture 
*picture)
+                                   Emacs_Pix_Container *pimg,
+                                   Emacs_Pixmap *pixmap, Picture *picture)
 {
 #ifdef HAVE_X_WINDOWS
   Display *display = FRAME_X_DISPLAY (f);
@@ -2057,33 +2063,33 @@ image_create_x_image_and_pixmap_1 (struct frame *f, int 
width, int height, int d
 
   if (depth <= 0)
     depth = DefaultDepthOfScreen (screen);
-  *ximg = XCreateImage (display, DefaultVisualOfScreen (screen),
+  *pimg = XCreateImage (display, DefaultVisualOfScreen (screen),
                        depth, ZPixmap, 0, NULL, width, height,
                        depth > 16 ? 32 : depth > 8 ? 16 : 8, 0);
-  if (*ximg == NULL)
+  if (*pimg == NULL)
     {
       image_error ("Unable to allocate X image");
       return 0;
     }
 
-  if (! image_check_image_size (*ximg, width, height))
+  if (! image_check_image_size (*pimg, width, height))
     {
-      image_destroy_x_image (*ximg);
-      *ximg = NULL;
+      image_destroy_x_image (*pimg);
+      *pimg = NULL;
       image_error ("Image too large (%dx%d)",
                   make_fixnum (width), make_fixnum (height));
       return 0;
     }
 
   /* Allocate image raster.  */
-  (*ximg)->data = xmalloc ((*ximg)->bytes_per_line * height);
+  (*pimg)->data = xmalloc ((*pimg)->bytes_per_line * height);
 
   /* Allocate a pixmap of the same size.  */
   *pixmap = XCreatePixmap (display, drawable, width, height, depth);
   if (*pixmap == NO_PIXMAP)
     {
-      image_destroy_x_image (*ximg);
-      *ximg = NULL;
+      image_destroy_x_image (*pimg);
+      *pimg = NULL;
       image_error ("Unable to create X pixmap");
       return 0;
     }
@@ -2150,10 +2156,10 @@ image_create_x_image_and_pixmap_1 (struct frame *f, int 
width, int height, int d
   if (depth < 16)
     palette_colors = 1 << (depth - 1);
 
-  *ximg = xmalloc (sizeof (XImage) + palette_colors * sizeof (RGBQUAD));
+  *pimg = xmalloc (sizeof (XImage) + palette_colors * sizeof (RGBQUAD));
 
-  header = &(*ximg)->info.bmiHeader;
-  memset (&(*ximg)->info, 0, sizeof (BITMAPINFO));
+  header = &(*pimg)->info.bmiHeader;
+  memset (&(*pimg)->info, 0, sizeof (BITMAPINFO));
   header->biSize = sizeof (*header);
   header->biWidth = width;
   header->biHeight = -height;  /* negative indicates a top-down bitmap.  */
@@ -2165,10 +2171,10 @@ image_create_x_image_and_pixmap_1 (struct frame *f, int 
width, int height, int d
   /* TODO: fill in palette.  */
   if (depth == 1)
     {
-      (*ximg)->info.bmiColors[0].rgbBlue = 0;
-      (*ximg)->info.bmiColors[0].rgbGreen = 0;
-      (*ximg)->info.bmiColors[0].rgbRed = 0;
-      (*ximg)->info.bmiColors[0].rgbReserved = 0;
+      (*pimg)->info.bmiColors[0].rgbBlue = 0;
+      (*pimg)->info.bmiColors[0].rgbGreen = 0;
+      (*pimg)->info.bmiColors[0].rgbRed = 0;
+      (*pimg)->info.bmiColors[0].rgbReserved = 0;
       /* bmiColors is a variable-length array declared by w32api
         headers as bmiColors[1], which triggers a warning under
         -Warray-bounds; shut that up.  */
@@ -2176,10 +2182,10 @@ image_create_x_image_and_pixmap_1 (struct frame *f, int 
width, int height, int d
 #      pragma GCC push_options
 #      pragma GCC diagnostic ignored "-Warray-bounds"
 #     endif
-      (*ximg)->info.bmiColors[1].rgbBlue = 255;
-      (*ximg)->info.bmiColors[1].rgbGreen = 255;
-      (*ximg)->info.bmiColors[1].rgbRed = 255;
-      (*ximg)->info.bmiColors[1].rgbReserved = 0;
+      (*pimg)->info.bmiColors[1].rgbBlue = 255;
+      (*pimg)->info.bmiColors[1].rgbGreen = 255;
+      (*pimg)->info.bmiColors[1].rgbRed = 255;
+      (*pimg)->info.bmiColors[1].rgbReserved = 0;
 #     if GNUC_PREREQ (4, 4, 0)
 #      pragma GCC pop_options
 #     endif
@@ -2189,10 +2195,10 @@ image_create_x_image_and_pixmap_1 (struct frame *f, int 
width, int height, int d
 
   /* Create a DIBSection and raster array for the bitmap,
      and store its handle in *pixmap.  */
-  *pixmap = CreateDIBSection (hdc, &((*ximg)->info),
+  *pixmap = CreateDIBSection (hdc, &((*pimg)->info),
                              (depth < 16) ? DIB_PAL_COLORS : DIB_RGB_COLORS,
                              /* casting avoids a GCC warning */
-                             (void **)&((*ximg)->data), NULL, 0);
+                             (void **)&((*pimg)->data), NULL, 0);
 
   /* Realize display palette and garbage all frames. */
   release_frame_dc (f, hdc);
@@ -2204,8 +2210,8 @@ image_create_x_image_and_pixmap_1 (struct frame *f, int 
width, int height, int d
       /* All system errors are < 10000, so the following is safe.  */
       XSETINT (errcode, err);
       image_error ("Unable to create bitmap, error code %d", errcode);
-      image_destroy_x_image (*ximg);
-      *ximg = NULL;
+      image_destroy_x_image (*pimg);
+      *pimg = NULL;
       return 0;
     }
 
@@ -2217,69 +2223,70 @@ image_create_x_image_and_pixmap_1 (struct frame *f, int 
width, int height, int d
   *pixmap = ns_image_for_XPM (width, height, depth);
   if (*pixmap == 0)
     {
-      *ximg = NULL;
+      *pimg = NULL;
       image_error ("Unable to allocate NSImage for XPM pixmap");
       return 0;
     }
-  *ximg = *pixmap;
+  *pimg = *pixmap;
   return 1;
 #endif
 }
 
 
-/* Destroy XImage XIMG.  Free XIMG->data.  */
+/* Destroy Emacs_Pix_Container PIMG.  Free data associated with PIMG.  */
 
 static void
-image_destroy_x_image (XImagePtr ximg)
+image_destroy_x_image (Emacs_Pix_Container pimg)
 {
   eassert (input_blocked_p ());
-  if (ximg)
+  if (pimg)
     {
 #ifdef HAVE_X_WINDOWS
-      xfree (ximg->data);
-      ximg->data = NULL;
-      XDestroyImage (ximg);
+      xfree (pimg->data);
+      pimg->data = NULL;
+      XDestroyImage (pimg);
 #endif /* HAVE_X_WINDOWS */
 #ifdef HAVE_NTGUI
       /* Data will be freed by DestroyObject.  */
-      ximg->data = NULL;
-      xfree (ximg);
+      pimg->data = NULL;
+      xfree (pimg);
 #endif /* HAVE_NTGUI */
 #ifdef HAVE_NS
-      ns_release_object (ximg);
+      ns_release_object (pimg);
 #endif /* HAVE_NS */
     }
 }
 
 
-/* Put XImage XIMG into pixmap PIXMAP on frame F.  WIDTH and HEIGHT
-   are width and height of both the image and pixmap.  */
+/* Put Emacs_Pix_Container PIMG into pixmap PIXMAP on frame F.
+   WIDTH and HEIGHT are width and height of both the image and
+   pixmap.  */
 
 static void
-gui_put_x_image (struct frame *f, XImagePtr ximg, Pixmap pixmap,
-                 int width, int height)
+gui_put_x_image (struct frame *f, Emacs_Pix_Container pimg,
+                 Emacs_Pixmap pixmap, int width, int height)
 {
 #ifdef HAVE_X_WINDOWS
   GC gc;
 
   eassert (input_blocked_p ());
   gc = XCreateGC (FRAME_X_DISPLAY (f), pixmap, 0, NULL);
-  XPutImage (FRAME_X_DISPLAY (f), pixmap, gc, ximg, 0, 0, 0, 0,
-             ximg->width, ximg->height);
+  XPutImage (FRAME_X_DISPLAY (f), pixmap, gc, pimg, 0, 0, 0, 0,
+             pimg->width, pimg->height);
   XFreeGC (FRAME_X_DISPLAY (f), gc);
 #endif /* HAVE_X_WINDOWS */
 
 #ifdef HAVE_NTGUI
 #if 0  /* I don't think this is necessary looking at where it is used.  */
   HDC hdc = get_frame_dc (f);
-  SetDIBits (hdc, pixmap, 0, height, ximg->data, &(ximg->info), 
DIB_RGB_COLORS);
+  SetDIBits (hdc, pixmap, 0, height, pimg->data, &(pimg->info), 
DIB_RGB_COLORS);
   release_frame_dc (f, hdc);
 #endif
 #endif /* HAVE_NTGUI */
 
 #ifdef HAVE_NS
-  eassert (ximg == pixmap);
-  ns_retain_object (ximg);
+  eassert (pimg == pixmap);
+  ns_retain_object (pimg);
 #endif
 }
 
@@ -2289,7 +2296,7 @@ gui_put_x_image (struct frame *f, XImagePtr ximg, Pixmap 
pixmap,
 static bool
 image_create_x_image_and_pixmap (struct frame *f, struct image *img,
                                 int width, int height, int depth,
-                                XImagePtr *ximg, bool mask_p)
+                                Emacs_Pix_Container *ximg, bool mask_p)
 {
   eassert ((!mask_p ? img->pixmap : img->mask) == NO_PIXMAP);
 
@@ -2302,14 +2309,14 @@ image_create_x_image_and_pixmap (struct frame *f, 
struct image *img,
                                             picture);
 }
 
-/* Put X image XIMG into image IMG on frame F, as a mask if and only
-   if MASK_P.  On X, this simply records XIMG on a member of IMG, so
+/* Put pixel image PIMG into image IMG on frame F, as a mask if and only
+   if MASK_P.  On X, this simply records PIMG on a member of IMG, so
    it can be put into the pixmap afterwards via image_sync_to_pixmaps.
-   On the other platforms, it puts XIMG into the pixmap, then frees
-   the X image and its buffer.  */
+   On the other platforms, it puts PIMG into the pixmap, then frees
+   the pixel image and its buffer.  */
 
 static void
-image_put_x_image (struct frame *f, struct image *img, XImagePtr ximg,
+image_put_x_image (struct frame *f, struct image *img, Emacs_Pix_Container 
ximg,
                   bool mask_p)
 {
 #ifdef HAVE_X_WINDOWS
@@ -2357,12 +2364,12 @@ image_sync_to_pixmaps (struct frame *f, struct image 
*img)
    currently selected GDI object into *PREV for future restoration by
    image_unget_x_image_or_dc.  */
 
-static XImagePtr_or_DC
+static HDC
 image_get_x_image_or_dc (struct frame *f, struct image *img, bool mask_p,
                         HGDIOBJ *prev)
 {
   HDC frame_dc = get_frame_dc (f);
-  XImagePtr_or_DC ximg = CreateCompatibleDC (frame_dc);
+  HDC ximg = CreateCompatibleDC (frame_dc);
 
   release_frame_dc (f, frame_dc);
   *prev = SelectObject (ximg, !mask_p ? img->pixmap : img->mask);
@@ -2372,7 +2379,7 @@ image_get_x_image_or_dc (struct frame *f, struct image 
*img, bool mask_p,
 
 static void
 image_unget_x_image_or_dc (struct image *img, bool mask_p,
-                          XImagePtr_or_DC ximg, HGDIOBJ prev)
+                          HDC ximg, HGDIOBJ prev)
 {
   SelectObject (ximg, prev);
   DeleteDC (ximg);
@@ -2381,11 +2388,11 @@ image_unget_x_image_or_dc (struct image *img, bool 
mask_p,
 /* Get the X image for IMG on frame F.  The resulting X image data
    should be treated as read-only at least on X.  */
 
-static XImagePtr
+static Emacs_Pix_Container
 image_get_x_image (struct frame *f, struct image *img, bool mask_p)
 {
 #ifdef HAVE_X_WINDOWS
-  XImagePtr ximg_in_img = !mask_p ? img->ximg : img->mask_img;
+  XImage *ximg_in_img = !mask_p ? img->ximg : img->mask_img;
 
   if (ximg_in_img)
     return ximg_in_img;
@@ -2393,7 +2400,7 @@ image_get_x_image (struct frame *f, struct image *img, 
bool mask_p)
     return XGetImage (FRAME_X_DISPLAY (f), !mask_p ? img->pixmap : img->mask,
                      0, 0, img->width, img->height, ~0, ZPixmap);
 #elif defined (HAVE_NS)
-  XImagePtr pixmap = !mask_p ? img->pixmap : img->mask;
+  Emacs_Pix_Container pixmap = !mask_p ? img->pixmap : img->mask;
 
   ns_retain_object (pixmap);
   return pixmap;
@@ -2401,10 +2408,10 @@ image_get_x_image (struct frame *f, struct image *img, 
bool mask_p)
 }
 
 static void
-image_unget_x_image (struct image *img, bool mask_p, XImagePtr ximg)
+image_unget_x_image (struct image *img, bool mask_p, Emacs_Pix_Container ximg)
 {
 #ifdef HAVE_X_WINDOWS
-  XImagePtr ximg_in_img = !mask_p ? img->ximg : img->mask_img;
+  XImage *ximg_in_img = !mask_p ? img->ximg : img->mask_img;
 
   if (ximg_in_img)
     eassert (ximg == ximg_in_img);
@@ -4201,7 +4208,7 @@ xpm_load_image (struct frame *f,
 #ifndef HAVE_NS
   bool have_mask = false;
 #endif
-  XImagePtr ximg = NULL, mask_img = NULL;
+  Emacs_Pix_Container ximg = NULL, mask_img = NULL;
 
 #define match() \
      LA1 = xpm_scan (&s, end, &beg, &len)
@@ -4286,7 +4293,7 @@ xpm_load_image (struct frame *f,
       char *color, *max_color;
       int key, next_key, max_key = 0;
       Lisp_Object symbol_color = Qnil, color_val;
-      XColor cdef;
+      Emacs_Color cdef;
 
       expect (XPM_TK_STRING);
       if (len <= chars_per_pixel || len >= BUFSIZ + chars_per_pixel)
@@ -4772,18 +4779,18 @@ static int laplace_matrix[9] = {
 #define COLOR_INTENSITY(R, G, B) ((2 * (R) + 3 * (G) + (B)) / 6)
 
 
-/* On frame F, return an array of XColor structures describing image
-   IMG->pixmap.  Each XColor structure has its pixel color set.  RGB_P
-   means also fill the red/green/blue members of the XColor
-   structures.  Value is a pointer to the array of XColors structures,
+/* On frame F, return an array of Emacs_Color structures describing image
+   IMG->pixmap.  Each Emacs_Color structure has its pixel color set.  RGB_P
+   means also fill the red/green/blue members of the Emacs_Color
+   structures.  Value is a pointer to the array of Emacs_Color structures,
    allocated with xmalloc; it must be freed by the caller.  */
 
-static XColor *
-image_to_xcolors (struct frame *f, struct image *img, bool rgb_p)
+static Emacs_Color *
+image_to_emacs_colors (struct frame *f, struct image *img, bool rgb_p)
 {
   int x, y;
-  XColor *colors, *p;
-  XImagePtr_or_DC ximg;
+  Emacs_Color *colors, *p;
+  Emacs_Pix_Context ximg;
   ptrdiff_t nbytes;
 #ifdef HAVE_NTGUI
   HGDIOBJ prev;
@@ -4798,13 +4805,13 @@ image_to_xcolors (struct frame *f, struct image *img, 
bool rgb_p)
   /* Get the X image or create a memory device context for IMG. */
   ximg = image_get_x_image_or_dc (f, img, 0, &prev);
 
-  /* Fill the `pixel' members of the XColor array.  I wished there
+  /* Fill the `pixel' members of the Emacs_Color array.  I wished there
      were an easy and portable way to circumvent XGetPixel.  */
   p = colors;
   for (y = 0; y < img->height; ++y)
     {
 #if defined (HAVE_X_WINDOWS) || defined (HAVE_NTGUI)
-      XColor *row = p;
+      Emacs_Color *row = p;
       for (x = 0; x < img->width; ++x, ++p)
        p->pixel = GET_PIXEL (ximg, x, y);
       if (rgb_p)
@@ -4839,7 +4846,7 @@ image_to_xcolors (struct frame *f, struct image *img, 
bool rgb_p)
    stored in ximg->data.  */
 
 static void
-XPutPixel (XImagePtr ximg, int x, int y, COLORREF color)
+XPutPixel (XImage *ximg, int x, int y, COLORREF color)
 {
   int width = ximg->info.bmiHeader.biWidth;
   unsigned char * pixel;
@@ -4878,16 +4885,16 @@ XPutPixel (XImagePtr ximg, int x, int y, COLORREF color)
 
 #endif /* HAVE_NTGUI */
 
-/* Create IMG->pixmap from an array COLORS of XColor structures, whose
+/* Create IMG->pixmap from an array COLORS of Emacs_Color structures, whose
    RGB members are set.  F is the frame on which this all happens.
    COLORS will be freed; an existing IMG->pixmap will be freed, too.  */
 
 static void
-image_from_xcolors (struct frame *f, struct image *img, XColor *colors)
+image_from_emacs_colors (struct frame *f, struct image *img, Emacs_Color 
*colors)
 {
   int x, y;
-  XImagePtr oimg = NULL;
-  XColor *p;
+  Emacs_Pix_Container oimg = NULL;
+  Emacs_Color *p;
 
   init_color_table ();
 
@@ -4925,8 +4932,8 @@ static void
 image_detect_edges (struct frame *f, struct image *img,
                     int *matrix, int color_adjust)
 {
-  XColor *colors = image_to_xcolors (f, img, 1);
-  XColor *new, *p;
+  Emacs_Color *colors = image_to_emacs_colors (f, img, 1);
+  Emacs_Color *new, *p;
   int x, y, i, sum;
   ptrdiff_t nbytes;
 
@@ -4969,7 +4976,7 @@ image_detect_edges (struct frame *f, struct image *img,
            for (xx = x - 1; xx < x + 2; ++xx, ++i)
              if (matrix[i])
                {
-                 XColor *t = COLOR (colors, xx, yy);
+                 Emacs_Color *t = COLOR (colors, xx, yy);
                  r += matrix[i] * t->red;
                  g += matrix[i] * t->green;
                  b += matrix[i] * t->blue;
@@ -4983,7 +4990,7 @@ image_detect_edges (struct frame *f, struct image *img,
     }
 
   xfree (colors);
-  image_from_xcolors (f, img, new);
+  image_from_emacs_colors (f, img, new);
 
 #undef COLOR
 }
@@ -5066,8 +5073,8 @@ image_disable_image (struct frame *f, struct image *img)
       /* Color (or grayscale).  Convert to gray, and equalize.  Just
         drawing such images with a stipple can look very odd, so
         we're using this method instead.  */
-      XColor *colors = image_to_xcolors (f, img, 1);
-      XColor *p, *end;
+      Emacs_Color *colors = image_to_emacs_colors (f, img, 1);
+      Emacs_Color *p, *end;
       const int h = 15000;
       const int l = 30000;
 
@@ -5080,7 +5087,7 @@ image_disable_image (struct frame *f, struct image *img)
          p->red = p->green = p->blue = i2;
        }
 
-      image_from_xcolors (f, img, colors);
+      image_from_emacs_colors (f, img, colors);
     }
 
   /* Draw a cross over the disabled image, if we must or if we
@@ -5158,13 +5165,13 @@ static void
 image_build_heuristic_mask (struct frame *f, struct image *img,
                             Lisp_Object how)
 {
-  XImagePtr_or_DC ximg;
+  Emacs_Pix_Context ximg;
 #ifdef HAVE_NTGUI
   HGDIOBJ prev;
   char *mask_img;
   int row_width;
 #elif !defined HAVE_NS
-  XImagePtr mask_img;
+  Emacs_Pix_Container mask_img;
 #endif
   int x, y;
   bool use_img_background;
@@ -5400,7 +5407,7 @@ pbm_load (struct frame *f, struct image *img)
   char *contents = NULL;
   char *end, *p;
 #ifndef USE_CAIRO
-  XImagePtr ximg;
+  Emacs_Pix_Container ximg;
 #endif
 
   specified_file = image_spec_value (img->spec, QCfile, NULL);
@@ -5522,7 +5529,7 @@ pbm_load (struct frame *f, struct image *img)
       unsigned long fg = FRAME_FOREGROUND_PIXEL (f);
       unsigned long bg = FRAME_BACKGROUND_PIXEL (f);
 #ifdef USE_CAIRO
-      XColor xfg, xbg;
+      Emacs_Color xfg, xbg;
       int fga32, bga32;
 #endif
       /* Parse the image specification.  */
@@ -5542,7 +5549,7 @@ pbm_load (struct frame *f, struct image *img)
           xfg.pixel = fg;
           x_query_colors (f, &xfg, 1);
         }
-      fga32 = xcolor_to_argb32 (xfg);
+      fga32 = emacs_color_to_argb32 (&xfg);
 
       if (! fmt[PBM_BACKGROUND].count
           || ! STRINGP (fmt[PBM_BACKGROUND].value)
@@ -5555,7 +5562,7 @@ pbm_load (struct frame *f, struct image *img)
           xbg.pixel = bg;
           x_query_colors (f, &xbg, 1);
        }
-      bga32 = xcolor_to_argb32 (xbg);
+      bga32 = emacs_color_to_argb32 (&xbg);
 #else
       if (fmt[PBM_FOREGROUND].count
          && STRINGP (fmt[PBM_FOREGROUND].value))
@@ -5700,7 +5707,7 @@ pbm_load (struct frame *f, struct image *img)
 #else
   if (NILP (image_spec_value (img->spec, QCbackground, NULL)))
     /* Casting avoids a GCC warning.  */
-    IMAGE_BACKGROUND (img, f, (XImagePtr_or_DC)ximg);
+    IMAGE_BACKGROUND (img, f, (Emacs_Pix_Context)ximg);
 
   /* Put ximg into the image.  */
   image_put_x_image (f, img, ximg, 0);
@@ -5795,6 +5802,7 @@ DEF_DLL_FN (png_uint_32, png_get_valid, (png_structp, 
png_infop, png_uint_32));
 DEF_DLL_FN (void, png_set_strip_16, (png_structp));
 DEF_DLL_FN (void, png_set_expand, (png_structp));
 DEF_DLL_FN (void, png_set_gray_to_rgb, (png_structp));
+DEF_DLL_FN (int, png_set_interlace_handling, (png_structp));
 DEF_DLL_FN (void, png_set_background,
            (png_structp, png_color_16p, int, int, double));
 DEF_DLL_FN (png_uint_32, png_get_bKGD,
@@ -5833,6 +5841,7 @@ init_png_functions (void)
   LOAD_DLL_FN (library, png_set_strip_16);
   LOAD_DLL_FN (library, png_set_expand);
   LOAD_DLL_FN (library, png_set_gray_to_rgb);
+  LOAD_DLL_FN (library, png_set_interlace_handling);
   LOAD_DLL_FN (library, png_set_background);
   LOAD_DLL_FN (library, png_get_bKGD);
   LOAD_DLL_FN (library, png_read_update_info);
@@ -5868,6 +5877,7 @@ init_png_functions (void)
 #  undef png_set_background
 #  undef png_set_expand
 #  undef png_set_gray_to_rgb
+#  undef png_set_interlace_handling
 #  undef png_set_longjmp_fn
 #  undef png_set_read_fn
 #  undef png_set_sig_bytes
@@ -5892,6 +5902,7 @@ init_png_functions (void)
 #  define png_set_background fn_png_set_background
 #  define png_set_expand fn_png_set_expand
 #  define png_set_gray_to_rgb fn_png_set_gray_to_rgb
+#  define png_set_interlace_handling fn_png_set_interlace_handling
 #  define png_set_longjmp_fn fn_png_set_longjmp_fn
 #  define png_set_read_fn fn_png_set_read_fn
 #  define png_set_sig_bytes fn_png_set_sig_bytes
@@ -6022,7 +6033,7 @@ png_load_body (struct frame *f, struct image *img, struct 
png_load_context *c)
   cairo_surface_t *surface;
   uint32_t *dataptr;
 #else
-  XImagePtr ximg, mask_img = NULL;
+  Emacs_Pix_Container ximg, mask_img = NULL;
 #endif
 
   /* Find out what file to load.  */
@@ -6180,7 +6191,7 @@ png_load_body (struct frame *f, struct image *img, struct 
png_load_context *c)
       /* png_color_16 *image_bg; */
       Lisp_Object specified_bg
        = image_spec_value (img->spec, QCbackground, NULL);
-      XColor color;
+      Emacs_Color color;
 
       /* If the user specified a color, try to use it; if not, use the
         current frame background, ignoring any default background
@@ -6206,7 +6217,7 @@ png_load_body (struct frame *f, struct image *img, struct 
png_load_context *c)
        }
     }
 
-  /* Update info structure.  */
+  png_set_interlace_handling (png_ptr);
   png_read_update_info (png_ptr, info_ptr);
 
   /* Get number of channels.  Valid values are 1 for grayscale images
@@ -6335,7 +6346,7 @@ png_load_body (struct frame *f, struct image *img, struct 
png_load_context *c)
 #else
   /* Maybe fill in the background field while we have ximg handy.
      Casting avoids a GCC warning.  */
-  IMAGE_BACKGROUND (img, f, (XImagePtr_or_DC)ximg);
+  IMAGE_BACKGROUND (img, f, (Emacs_Pix_Context)ximg);
 
   /* Put ximg into the image.  */
   image_put_x_image (f, img, ximg, 0);
@@ -6345,7 +6356,7 @@ png_load_body (struct frame *f, struct image *img, struct 
png_load_context *c)
     {
       /* Fill in the background_transparent field while we have the
         mask handy.  Casting avoids a GCC warning.  */
-      image_background_transparent (img, f, (XImagePtr_or_DC)mask_img);
+      image_background_transparent (img, f, (Emacs_Pix_Context)mask_img);
 
       image_put_x_image (f, img, mask_img, 1);
     }
@@ -6765,7 +6776,7 @@ jpeg_load_body (struct frame *f, struct image *img,
   int i, ir, ig, ib;
 #ifndef USE_CAIRO
   unsigned long *colors;
-  XImagePtr ximg = NULL;
+  Emacs_Pix_Container ximg = NULL;
 #endif
 
   /* Open the JPEG file.  */
@@ -6955,7 +6966,7 @@ jpeg_load_body (struct frame *f, struct image *img,
   /* Maybe fill in the background field while we have ximg handy. */
   if (NILP (image_spec_value (img->spec, QCbackground, NULL)))
     /* Casting avoids a GCC warning.  */
-    IMAGE_BACKGROUND (img, f, (XImagePtr_or_DC)ximg);
+    IMAGE_BACKGROUND (img, f, (Emacs_Pix_Context)ximg);
 
   /* Put ximg into the image.  */
   image_put_x_image (f, img, ximg, 0);
@@ -7255,7 +7266,7 @@ tiff_load (struct frame *f, struct image *img)
   int width, height, x, y, count;
   uint32 *buf;
   int rc;
-  XImagePtr ximg;
+  Emacs_Pix_Container ximg;
   tiff_memory_source memsrc;
   Lisp_Object image;
 
@@ -7425,7 +7436,7 @@ tiff_load (struct frame *f, struct image *img)
   /* Maybe fill in the background field while we have ximg handy. */
   if (NILP (image_spec_value (img->spec, QCbackground, NULL)))
     /* Casting avoids a GCC warning on W32.  */
-    IMAGE_BACKGROUND (img, f, (XImagePtr_or_DC)ximg);
+    IMAGE_BACKGROUND (img, f, (Emacs_Pix_Context)ximg);
 
   /* Put ximg into the image.  */
   image_put_x_image (f, img, ximg, 0);
@@ -7813,7 +7824,7 @@ gif_load (struct frame *f, struct image *img)
   uint32_t *data32 = (uint32_t *) cairo_image_surface_get_data (surface);
   if (STRINGP (specified_bg))
     {
-      XColor color;
+      Emacs_Color color;
       if (FRAME_TERMINAL (f)->defined_color_hook
           (f, SSDATA (specified_bg), &color, false, false))
         {
@@ -7829,7 +7840,7 @@ gif_load (struct frame *f, struct image *img)
     }
 #else
   /* Create the X image and pixmap.  */
-  XImagePtr ximg;
+  Emacs_Pix_Container ximg;
   if (!image_create_x_image_and_pixmap (f, img, width, height, 0, &ximg, 0))
     {
       gif_close (gif, NULL);
@@ -8059,7 +8070,7 @@ gif_load (struct frame *f, struct image *img)
   /* Maybe fill in the background field while we have ximg handy. */
   if (NILP (image_spec_value (img->spec, QCbackground, NULL)))
     /* Casting avoids a GCC warning.  */
-    IMAGE_BACKGROUND (img, f, (XImagePtr_or_DC)ximg);
+    IMAGE_BACKGROUND (img, f, (Emacs_Pix_Context)ximg);
 
   /* Put ximg into the image.  */
   image_put_x_image (f, img, ximg, 0);
@@ -8443,7 +8454,7 @@ imagemagick_load_image (struct frame *f, struct image 
*img,
   size_t image_width, image_height;
   MagickBooleanType status;
 #ifndef USE_CAIRO
-  XImagePtr ximg;
+  Emacs_Pix_Container ximg;
 #endif
   int x, y;
   MagickWand *image_wand;
@@ -8548,7 +8559,7 @@ imagemagick_load_image (struct frame *f, struct image 
*img,
 
   /* Retrieve the frame's background color, for use later.  */
   {
-    XColor bgcolor;
+    Emacs_Color bgcolor;
     Lisp_Object specified_bg;
 
     specified_bg = image_spec_value (img->spec, QCbackground, NULL);
@@ -9274,7 +9285,7 @@ svg_load_image (struct frame *f, struct image *img, char 
*contents,
     g_object_unref (pixbuf);
 #else
     /* Try to create a x pixmap to hold the svg pixmap.  */
-    XImagePtr ximg;
+    Emacs_Pix_Container ximg;
     if (!image_create_x_image_and_pixmap (f, img, width, height, 0, &ximg, 0))
       {
        g_object_unref (pixbuf);
@@ -9285,7 +9296,7 @@ svg_load_image (struct frame *f, struct image *img, char 
*contents,
 
     /* Handle alpha channel by combining the image with a background
        color.  */
-    XColor background;
+    Emacs_Color background;
     Lisp_Object specified_bg = image_spec_value (img->spec, QCbackground, 
NULL);
     if (!STRINGP (specified_bg)
        || !FRAME_TERMINAL (f)->defined_color_hook (f,
@@ -9341,7 +9352,7 @@ svg_load_image (struct frame *f, struct image *img, char 
*contents,
 
     /* Maybe fill in the background field while we have ximg handy.
        Casting avoids a GCC warning.  */
-    IMAGE_BACKGROUND (img, f, (XImagePtr_or_DC)ximg);
+    IMAGE_BACKGROUND (img, f, (Emacs_Pix_Context)ximg);
 
     /* Put ximg into the image.  */
     image_put_x_image (f, img, ximg, 0);
@@ -9569,7 +9580,7 @@ x_kill_gs_process (Pixmap pixmap, struct frame *f)
      img->pixmap.  */
   if (x_mutable_colormap (FRAME_X_VISUAL (f)))
     {
-      XImagePtr ximg;
+      XImage *ximg;
 
       block_input ();
 
diff --git a/src/keyboard.c b/src/keyboard.c
index 5f2b7af..bb4d185 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -3909,7 +3909,7 @@ kbd_buffer_get_event (KBOARD **kbp,
       case END_SESSION_EVENT:
       case LANGUAGE_CHANGE_EVENT:
 #endif
-#if defined (HAVE_X11) || defined (HAVE_NTGUI) || defined (HAVE_NS)
+#ifdef HAVE_WINDOW_SYSTEM
       case DELETE_WINDOW_EVENT:
       case ICONIFY_EVENT:
       case DEICONIFY_EVENT:
@@ -5283,7 +5283,7 @@ make_lispy_event (struct input_event *event)
 
   switch (event->kind)
     {
-#if defined (HAVE_X11) || defined (HAVE_NTGUI) || defined (HAVE_NS)
+#ifdef HAVE_WINDOW_SYSTEM
     case DELETE_WINDOW_EVENT:
       /* Make an event (delete-frame (FRAME)).  */
       return list2 (Qdelete_frame, list1 (event->frame_or_window));
diff --git a/src/lisp.h b/src/lisp.h
index 876b757..6db9059 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -2679,7 +2679,7 @@ struct Lisp_Buffer_Objfwd
   {
     enum Lisp_Fwd_Type type;   /* = Lisp_Fwd_Buffer_Obj */
     int offset;
-    /* One of Qnil, Qfixnump, Qsymbolp, Qstringp, Qfloatp or Qnumberp.  */
+    /* One of Qnil, Qintegerp, Qsymbolp, Qstringp, Qfloatp or Qnumberp.  */
     Lisp_Object predicate;
   };
 
diff --git a/src/macfont.m b/src/macfont.m
index 0ade77e..f825e62 100644
--- a/src/macfont.m
+++ b/src/macfont.m
@@ -1639,7 +1639,7 @@ static Lisp_Object macfont_open (struct frame *, 
Lisp_Object, int);
 static void macfont_close (struct font *);
 static int macfont_has_char (Lisp_Object, int);
 static unsigned macfont_encode_char (struct font *, int);
-static void macfont_text_extents (struct font *, unsigned int *, int,
+static void macfont_text_extents (struct font *, const unsigned int *, int,
                                   struct font_metrics *);
 static int macfont_draw (struct glyph_string *, int, int, int, int, bool);
 static Lisp_Object macfont_shape (Lisp_Object);
@@ -2735,7 +2735,7 @@ macfont_encode_char (struct font *font, int c)
 }
 
 static void
-macfont_text_extents (struct font *font, unsigned int *code, int nglyphs,
+macfont_text_extents (struct font *font, const unsigned int *code, int nglyphs,
                       struct font_metrics *metrics)
 {
   int width, i;
@@ -2818,7 +2818,18 @@ macfont_draw (struct glyph_string *s, int from, int to, 
int x, int y,
       }
   }
 
-  context = [[NSGraphicsContext currentContext] graphicsPort];
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101000
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 101000
+  if ([[NSGraphicsContext currentContext] 
respondsToSelector:@selector(CGContext)])
+#endif
+    context = [[NSGraphicsContext currentContext] CGContext];
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 101000
+  else
+#endif
+#endif
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 101000
+    context = [[NSGraphicsContext currentContext] graphicsPort];
+#endif
   CGContextSaveGState (context);
 
   if (!CGRectIsNull (background_rect))
diff --git a/src/msdos.h b/src/msdos.h
index 90ceea8..3614c94 100644
--- a/src/msdos.h
+++ b/src/msdos.h
@@ -86,7 +86,6 @@ typedef int GC;
 typedef int Pixmap;
 typedef int Display;
 typedef int Window;
-typedef int XRectangle;
 #define PIX_TYPE unsigned long
 #define XDISPLAY
 
diff --git a/src/nsfont.m b/src/nsfont.m
index 9721e48..eca97ab 100644
--- a/src/nsfont.m
+++ b/src/nsfont.m
@@ -945,7 +945,7 @@ nsfont_encode_char (struct font *font, int c)
    of METRICS.  The glyphs are specified by their glyph codes in
    CODE (length NGLYPHS).  */
 static void
-nsfont_text_extents (struct font *font, unsigned int *code,
+nsfont_text_extents (struct font *font, const unsigned int *code,
                     int nglyphs, struct font_metrics *metrics)
 {
   struct nsfont_info *font_info = (struct nsfont_info *)font;
diff --git a/src/nsgui.h b/src/nsgui.h
index ab6cdff..c219535 100644
--- a/src/nsgui.h
+++ b/src/nsgui.h
@@ -58,72 +58,23 @@ typedef struct _XCharStruct
   int descent;
 } XCharStruct;
 
-/* Fake structure from Xlib.h to represent two-byte characters.  */
-#ifndef __OBJC__
-typedef unsigned short unichar;
-#endif
-typedef unichar XChar2b;
-
-#define STORE_XCHAR2B(chp, b1, b2) \
-  (*(chp) = ((XChar2b)((((b1) & 0x00ff) << 8) | ((b2) & 0x00ff))))
-
-#define XCHAR2B_BYTE1(chp) \
-  ((*(chp) & 0xff00) >> 8)
-
-#define XCHAR2B_BYTE2(chp) \
-  (*(chp) & 0x00ff)
-
 /* Used in xdisp.c when comparing faces and frame colors.  */
 extern unsigned long ns_color_index_to_rgba(int idx, struct frame *f);
 
-/* XXX: xfaces requires these structures, but the question is are we
-        forced to use them?  */
-typedef struct _XGCValues
-{
-  unsigned long foreground;
-  unsigned long background;
 #ifdef __OBJC__
-  struct ns_font *font;
+typedef id Emacs_Pixmap;
 #else
-  void *font;
+typedef void *Emacs_Pixmap;
 #endif
-} XGCValues;
-
-typedef XGCValues * GC;
-
-#define GCForeground 0x01
-#define GCBackground 0x02
-#define GCFont 0x03
 
 #ifdef __OBJC__
-typedef id Pixmap;
+typedef NSCursor *Emacs_Cursor;
 #else
-typedef void *Pixmap;
+typedef void *Emacs_Cursor;
 #endif
 
-#ifdef __OBJC__
-typedef NSCursor * Cursor;
-#else
-typedef void *Cursor;
-#endif
-
-#define No_Cursor (0)
-
-#ifdef __OBJC__
-typedef NSColor * Color;
-#else
-typedef void * Color;
-#endif
 typedef int Window;
 
-
-/* Some sort of attempt to normalize rectangle handling.  Seems a bit
-   much for what is accomplished.  */
-typedef struct {
-      int x, y;
-      unsigned width, height;
-} XRectangle;
-
 #ifndef __OBJC__
 #if defined (__LP64__) && __LP64__
 typedef double CGFloat;
@@ -137,13 +88,13 @@ typedef struct _NSRect  { NSPoint origin; NSSize size; } 
NSRect;
 
 #define NativeRectangle NSRect
 
-#define CONVERT_TO_XRECT(xr, nr)               \
+#define CONVERT_TO_EMACS_RECT(xr, nr)          \
   ((xr).x     = (nr).origin.x,                 \
    (xr).y     = (nr).origin.y,                 \
    (xr).width = (nr).size.width,               \
    (xr).height = (nr).size.height)
 
-#define CONVERT_FROM_XRECT(xr, nr)             \
+#define CONVERT_FROM_EMACS_RECT(xr, nr)                \
   ((nr).origin.x    = (xr).x,                  \
    (nr).origin.y    = (xr).y,                  \
    (nr).size.width  = (xr).width,              \
diff --git a/src/nsimage.m b/src/nsimage.m
index 33236c4..0249d22 100644
--- a/src/nsimage.m
+++ b/src/nsimage.m
@@ -313,8 +313,8 @@ ns_set_alpha (void *img, int x, int y, unsigned char a)
   if (bmRep == nil || color == nil)
     return self;
 
-  if ([color colorSpaceName] != NSCalibratedRGBColorSpace)
-    rgbColor = [color colorUsingColorSpaceName: NSCalibratedRGBColorSpace];
+  if ([color colorSpace] != [NSColorSpace deviceRGBColorSpace])
+    rgbColor = [color colorUsingColorSpace:[NSColorSpace deviceRGBColorSpace]];
   else
     rgbColor = color;
 
diff --git a/src/nsmenu.m b/src/nsmenu.m
index fd13233..3fe06cd 100644
--- a/src/nsmenu.m
+++ b/src/nsmenu.m
@@ -668,9 +668,9 @@ ns_activate_menubar (struct frame *f)
       /* Draw radio buttons and tickboxes.  */
       if (wv->selected && (wv->button_type == BUTTON_TYPE_TOGGLE ||
                            wv->button_type == BUTTON_TYPE_RADIO))
-        [item setState: NSOnState];
+        [item setState: NSControlStateValueOn];
       else
-        [item setState: NSOffState];
+        [item setState: NSControlStateValueOff];
 
       [item setTag: (NSInteger)wv->call_data];
     }
@@ -1594,7 +1594,7 @@ ns_popup_dialog (struct frame *f, Lisp_Object header, 
Lisp_Object contents)
   [cell setBordered: NO];
   [cell setEnabled: NO];
   [cell setCellAttribute: NSCellIsInsetButton to: 8];
-  [cell setBezelStyle: NSRoundedBezelStyle];
+  [cell setBezelStyle: NSBezelStyleRounded];
 
   matrix = [[NSMatrix alloc] initWithFrame: contentRect
                                       mode: NSHighlightModeMatrix
@@ -1607,7 +1607,6 @@ ns_popup_dialog (struct frame *f, Lisp_Object header, 
Lisp_Object contents)
   [matrix autorelease];
 
   [[self contentView] addSubview: matrix];
-  [self setOneShot: YES];
   [self setReleasedWhenClosed: YES];
   [self setHidesOnDeactivate: YES];
   return self;
diff --git a/src/nsselect.m b/src/nsselect.m
index cf36c86..b044fe6 100644
--- a/src/nsselect.m
+++ b/src/nsselect.m
@@ -57,7 +57,7 @@ symbol_to_nsstring (Lisp_Object sym)
   if (EQ (sym, QCLIPBOARD))   return NSPasteboardNameGeneral;
   if (EQ (sym, QPRIMARY))     return NXPrimaryPboard;
   if (EQ (sym, QSECONDARY))   return NXSecondaryPboard;
-  if (EQ (sym, QTEXT))        return NSStringPboardType;
+  if (EQ (sym, QTEXT))        return NSPasteboardTypeString;
   return [NSString stringWithUTF8String: SSDATA (SYMBOL_NAME (sym))];
 }
 
@@ -76,11 +76,11 @@ ns_string_to_symbol (NSString *t)
     return QPRIMARY;
   if ([t isEqualToString: NXSecondaryPboard])
     return QSECONDARY;
-  if ([t isEqualToString: NSStringPboardType])
+  if ([t isEqualToString: NSPasteboardTypeString])
     return QTEXT;
   if ([t isEqualToString: NSFilenamesPboardType])
     return QFILE_NAME;
-  if ([t isEqualToString: NSTabularTextPboardType])
+  if ([t isEqualToString: NSPasteboardTypeTabularText])
     return QTEXT;
   return intern ([t UTF8String]);
 }
@@ -193,7 +193,7 @@ ns_string_to_pasteboard_internal (id pb, Lisp_Object str, 
NSString *gtype)
       else
         {
          // Used for ns-own-selection-internal.
-         eassert (gtype == NSStringPboardType);
+         eassert (gtype == NSPasteboardTypeString);
           [pb setString: nsStr forType: gtype];
         }
       [nsStr release];
@@ -345,7 +345,7 @@ anything that the functions on `selection-converter-alist' 
know about.  */)
   }
 
   /* We only support copy of text.  */
-  type = NSStringPboardType;
+  type = NSPasteboardTypeString;
   target_symbol = ns_string_to_symbol (type);
   if (STRINGP (value))
     {
@@ -472,9 +472,9 @@ nxatoms_of_nsselect (void)
             [NSNumber numberWithLong:0], NSPasteboardNameGeneral,
             [NSNumber numberWithLong:0], NXPrimaryPboard,
             [NSNumber numberWithLong:0], NXSecondaryPboard,
-            [NSNumber numberWithLong:0], NSStringPboardType,
+            [NSNumber numberWithLong:0], NSPasteboardTypeString,
             [NSNumber numberWithLong:0], NSFilenamesPboardType,
-            [NSNumber numberWithLong:0], NSTabularTextPboardType,
+            [NSNumber numberWithLong:0], NSPasteboardTypeTabularText,
         nil] retain];
 }
 
diff --git a/src/nsterm.h b/src/nsterm.h
index ffaf809..1e56276 100644
--- a/src/nsterm.h
+++ b/src/nsterm.h
@@ -872,10 +872,10 @@ struct ns_display_info
   Lisp_Object rdb;
 
   /* The cursor to use for vertical scroll bars.  */
-  Cursor vertical_scroll_bar_cursor;
+  Emacs_Cursor vertical_scroll_bar_cursor;
 
   /* The cursor to use for horizontal scroll bars.  */
-  Cursor horizontal_scroll_bar_cursor;
+  Emacs_Cursor horizontal_scroll_bar_cursor;
 
   /* Information about the range of text currently shown in
      mouse-face.  */
@@ -931,24 +931,24 @@ struct ns_output
 #endif
 
   /* NSCursors are initialized in initFrameFromEmacs.  */
-  Cursor text_cursor;
-  Cursor nontext_cursor;
-  Cursor modeline_cursor;
-  Cursor hand_cursor;
-  Cursor hourglass_cursor;
-  Cursor horizontal_drag_cursor;
-  Cursor vertical_drag_cursor;
-  Cursor left_edge_cursor;
-  Cursor top_left_corner_cursor;
-  Cursor top_edge_cursor;
-  Cursor top_right_corner_cursor;
-  Cursor right_edge_cursor;
-  Cursor bottom_right_corner_cursor;
-  Cursor bottom_edge_cursor;
-  Cursor bottom_left_corner_cursor;
+  Emacs_Cursor text_cursor;
+  Emacs_Cursor nontext_cursor;
+  Emacs_Cursor modeline_cursor;
+  Emacs_Cursor hand_cursor;
+  Emacs_Cursor hourglass_cursor;
+  Emacs_Cursor horizontal_drag_cursor;
+  Emacs_Cursor vertical_drag_cursor;
+  Emacs_Cursor left_edge_cursor;
+  Emacs_Cursor top_left_corner_cursor;
+  Emacs_Cursor top_edge_cursor;
+  Emacs_Cursor top_right_corner_cursor;
+  Emacs_Cursor right_edge_cursor;
+  Emacs_Cursor bottom_right_corner_cursor;
+  Emacs_Cursor bottom_edge_cursor;
+  Emacs_Cursor bottom_left_corner_cursor;
 
   /* NS-specific */
-  Cursor current_pointer;
+  Emacs_Cursor current_pointer;
 
   /* lord knows why Emacs needs to know about our Window ids.. */
   Window window_desc, parent_desc;
@@ -1134,10 +1134,10 @@ extern void ns_set_doc_edited (void);
 extern bool
 ns_defined_color (struct frame *f,
                   const char *name,
-                  XColor *color_def, bool alloc,
+                  Emacs_Color *color_def, bool alloc,
                   bool makeIndex);
 extern void
-ns_query_color (void *col, XColor *color_def, bool setPixel);
+ns_query_color (void *col, Emacs_Color *color_def, bool setPixel);
 
 #ifdef __OBJC__
 extern int ns_lisp_to_color (Lisp_Object color, NSColor **col);
@@ -1165,10 +1165,6 @@ extern void ns_release_autorelease_pool (void *);
 extern const char *ns_get_defaults_value (const char *key);
 extern void ns_init_locale (void);
 
-#ifdef NS_IMPL_COCOA
-extern void ns_enable_screen_updates (void);
-#endif
-
 /* in nsmenu */
 extern void update_frame_tool_bar (struct frame *f);
 extern void free_frame_tool_bar (struct frame *f);
@@ -1336,4 +1332,14 @@ enum NSWindowTabbingMode
 /* Deprecated in macOS 10.13.  */
 #define NSPasteboardNameGeneral NSGeneralPboard
 #endif
+
+#if !defined (NS_IMPL_COCOA) || !defined (MAC_OS_X_VERSION_10_14)
+/* Deprecated in macOS 10.14.  */
+#define NSPasteboardTypeString NSStringPboardType
+#define NSPasteboardTypeTabularText NSTabularTextPboardType
+#define NSPasteboardTypeURL NSURLPboardType
+#define NSControlStateValueOn NSOnState
+#define NSControlStateValueOff NSOffState
+#define NSBezelStyleRounded NSRoundedBezelStyle
+#endif
 #endif /* HAVE_NS */
diff --git a/src/nsterm.m b/src/nsterm.m
index d688ace..0cae5e9 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -160,20 +160,28 @@ char const * nstrace_fullscreen_type_name (int fs_type)
 
 - (NSColor *)colorUsingDefaultColorSpace
 {
-  /* FIXMES: We're checking for colorWithSRGBRed here so this will
-     only work in the same place as in the method above.  It should
-     really be a check whether we're on macOS 10.7 or above.  */
+  /* FIXME: We're checking for colorWithSRGBRed here so this will only
+     work in the same place as in the method above.  It should really
+     be a check whether we're on macOS 10.7 or above.  */
 #if defined (NS_IMPL_COCOA) \
   && MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
-  if (ns_use_srgb_colorspace
 #if MAC_OS_X_VERSION_MIN_REQUIRED < 1070
-      && [NSColor respondsToSelector:
-                    @selector(colorWithSRGBRed:green:blue:alpha:)]
+  if ([NSColor respondsToSelector:
+                 @selector(colorWithSRGBRed:green:blue:alpha:)])
 #endif
-      )
-    return [self colorUsingColorSpace: [NSColorSpace sRGBColorSpace]];
+    {
+      if (ns_use_srgb_colorspace)
+        return [self colorUsingColorSpace: [NSColorSpace sRGBColorSpace]];
+      else
+        return [self colorUsingColorSpace: [NSColorSpace deviceRGBColorSpace]];
+    }
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 1070
+  else
 #endif
+#endif /* NS_IMPL_COCOA && MAC_OS_X_VERSION_MAX_ALLOWED >= 1070  */
+#if defined (NS_IMPL_GNUSTEP) || MAC_OS_X_VERSION_MIN_REQUIRED < 1070
   return [self colorUsingColorSpaceName: NSCalibratedRGBColorSpace];
+#endif
 }
 
 @end
@@ -283,9 +291,6 @@ static int ns_window_num = 0;
 static BOOL ns_fake_keydown = NO;
 #ifdef NS_IMPL_COCOA
 static BOOL ns_menu_bar_is_hidden = NO;
-
-/* The number of times NSDisableScreenUpdates has been called.  */
-static int disable_screen_updates_count = 0;
 #endif
 /* static int debug_lock = 0; */
 
@@ -688,40 +693,6 @@ ns_release_autorelease_pool (void *pool)
 }
 
 
-#ifdef NS_IMPL_COCOA
-/* Disabling screen updates can be used to make several actions appear
-   "atomic" to the end user.  It seems some actions can still update
-   the display, though.
-
-   When we re-enable screen updates the number of calls to
-   NSEnableScreenUpdates should match the number to
-   NSDisableScreenUpdates.
-
-   We use these functions to prevent the user seeing a blank frame
-   after it has been resized.  ns_set_window_size disables updates and
-   when redisplay completes unwind_redisplay enables them again
-   (bug#30699).  */
-
-static void
-ns_disable_screen_updates (void)
-{
-  NSDisableScreenUpdates ();
-  disable_screen_updates_count++;
-}
-
-void
-ns_enable_screen_updates (void)
-/* Re-enable screen updates.  Called from unwind_redisplay.  */
-{
-  while (disable_screen_updates_count > 0)
-    {
-      NSEnableScreenUpdates ();
-      disable_screen_updates_count--;
-    }
-}
-#endif
-
-
 static BOOL
 ns_menu_bar_should_be_hidden (void)
 /* True, if the menu bar should be hidden.  */
@@ -1779,15 +1750,6 @@ ns_set_window_size (struct frame *f,
 
   block_input ();
 
-#ifdef NS_IMPL_COCOA
-  /* To prevent showing the user a blank frame, stop updates being
-     flushed to the screen until after redisplay has completed.  This
-     breaks live resize (resizing with a mouse), so don't do it if
-     we're in a live resize loop.  */
-  if (![view inLiveResize])
-    ns_disable_screen_updates ();
-#endif
-
   if (pixelwise)
     {
       pixelwidth = FRAME_TEXT_TO_PIXEL_WIDTH (f, width);
@@ -2327,7 +2289,7 @@ ns_color_index_to_rgba(int idx, struct frame *f)
 }
 
 void
-ns_query_color(void *col, XColor *color_def, bool setPixel)
+ns_query_color(void *col, Emacs_Color *color_def, bool setPixel)
 /* --------------------------------------------------------------------------
          Get ARGB values out of NSColor col and put them into color_def.
          If setPixel, set the pixel to a concatenated version.
@@ -2350,7 +2312,7 @@ ns_query_color(void *col, XColor *color_def, bool 
setPixel)
 bool
 ns_defined_color (struct frame *f,
                   const char *name,
-                  XColor *color_def,
+                  Emacs_Color *color_def,
                   bool alloc,
                   bool makeIndex)
 /* --------------------------------------------------------------------------
@@ -2378,7 +2340,7 @@ ns_defined_color (struct frame *f,
 }
 
 static void
-ns_query_frame_background_color (struct frame *f, XColor *bgcolor)
+ns_query_frame_background_color (struct frame *f, Emacs_Color *bgcolor)
 /* --------------------------------------------------------------------------
      External (hook): Store F's background color into *BGCOLOR
    -------------------------------------------------------------------------- 
*/
@@ -2576,7 +2538,7 @@ ns_frame_up_to_date (struct frame *f)
 
 
 static void
-ns_define_frame_cursor (struct frame *f, Cursor cursor)
+ns_define_frame_cursor (struct frame *f, Emacs_Cursor cursor)
 /* --------------------------------------------------------------------------
     External (RIF): set frame mouse pointer type.
    -------------------------------------------------------------------------- 
*/
@@ -4972,7 +4934,7 @@ ns_judge_scroll_bars (struct frame *f)
    ========================================================================== 
*/
 
 static void
-ns_free_pixmap (struct frame *_f, Pixmap pixmap)
+ns_free_pixmap (struct frame *_f, Emacs_Pixmap pixmap)
 {
   ns_release_object (pixmap);
 }
@@ -5459,14 +5421,14 @@ ns_term_init (Lisp_Object display_name)
 
   NSTRACE_MSG ("Input/output types");
 
-  ns_send_types = [[NSArray arrayWithObjects: NSStringPboardType, nil] retain];
-  ns_return_types = [[NSArray arrayWithObjects: NSStringPboardType, nil]
+  ns_send_types = [[NSArray arrayWithObjects: NSPasteboardTypeString, nil] 
retain];
+  ns_return_types = [[NSArray arrayWithObjects: NSPasteboardTypeString, nil]
                       retain];
   ns_drag_types = [[NSArray arrayWithObjects:
-                            NSStringPboardType,
-                            NSTabularTextPboardType,
+                            NSPasteboardTypeString,
+                            NSPasteboardTypeTabularText,
                             NSFilenamesPboardType,
-                            NSURLPboardType, nil] retain];
+                            NSPasteboardTypeURL, nil] retain];
 
   /* If fullscreen is in init/default-frame-alist, focus isn't set
      right for fullscreen windows, so set this.  */
@@ -8276,6 +8238,9 @@ not_in_argv (NSString *arg)
     {
       return NO;
     }
+  /* FIXME: NSFilenamesPboardType is deprecated in 10.14, but the
+     NSURL method can only handle one file at a time.  Stick with the
+     existing code at the moment.  */
   else if ([type isEqualToString: NSFilenamesPboardType])
     {
       NSArray *files;
@@ -8370,8 +8335,8 @@ not_in_argv (NSString *arg)
 
   NSTRACE ("[EmacsView writeSelectionToPasteboard:types:]");
 
-  /* We only support NSStringPboardType.  */
-  if ([types containsObject:NSStringPboardType] == NO) {
+  /* We only support NSPasteboardTypeString.  */
+  if ([types containsObject:NSPasteboardTypeString] == NO) {
     return NO;
   }
 
@@ -8385,7 +8350,7 @@ not_in_argv (NSString *arg)
   if (! STRINGP (val))
     return NO;
 
-  typesDeclared = [NSArray arrayWithObject:NSStringPboardType];
+  typesDeclared = [NSArray arrayWithObject:NSPasteboardTypeString];
   [pb declareTypes:typesDeclared owner:nil];
   ns_string_to_pasteboard (pb, val);
   return YES;
@@ -9047,10 +9012,12 @@ not_in_argv (NSString *arg)
       last_hit_part = horizontal ? scroll_bar_before_handle : 
scroll_bar_above_handle; break;
     case NSScrollerIncrementPage:
       last_hit_part = horizontal ? scroll_bar_after_handle : 
scroll_bar_below_handle; break;
+#if defined (NS_IMPL_GNUSTEP) || MAC_OS_X_VERSION_MIN_REQUIRED < 1070
     case NSScrollerDecrementLine:
       last_hit_part = horizontal ? scroll_bar_left_arrow : 
scroll_bar_up_arrow; break;
     case NSScrollerIncrementLine:
       last_hit_part = horizontal ? scroll_bar_right_arrow : 
scroll_bar_down_arrow; break;
+#endif
     case NSScrollerKnob:
       last_hit_part = horizontal ? scroll_bar_horizontal_handle : 
scroll_bar_handle; break;
     case NSScrollerKnobSlot:  /* GNUstep-only */
diff --git a/src/regex-emacs.c b/src/regex-emacs.c
index 8dc6980..4cb1703 100644
--- a/src/regex-emacs.c
+++ b/src/regex-emacs.c
@@ -3432,7 +3432,7 @@ static bool bcmp_translate (re_char *, re_char *, 
ptrdiff_t,
      {                                                                 \
        d = string2;                                                    \
        dend = end_match_2;                                             \
-     }                                                                 \
+     }
 
 /* Test if at very beginning or at very end of the virtual concatenation
    of STRING1 and STRING2.  If only one string, it's STRING2.  */
diff --git a/src/search.c b/src/search.c
index dfbae5c..8a0f707 100644
--- a/src/search.c
+++ b/src/search.c
@@ -1324,12 +1324,7 @@ search_buffer_non_re (Lisp_Object string, ptrdiff_t pos,
     }
   else
     {
-      /* Converting multibyte to single-byte.
-
-         ??? Perhaps this conversion should be done in a special way
-         by subtracting nonascii-insert-offset from each non-ASCII char,
-         so that only the multibyte chars which really correspond to
-         the chosen single-byte character set can possibly match.  */
+      /* Converting multibyte to single-byte.  */
       raw_pattern_size = SCHARS (string);
       raw_pattern_size_byte = SCHARS (string);
       raw_pattern = SAFE_ALLOCA (raw_pattern_size + 1);
diff --git a/src/termhooks.h b/src/termhooks.h
index 0962add..f182712 100644
--- a/src/termhooks.h
+++ b/src/termhooks.h
@@ -496,7 +496,7 @@ struct terminal
 
    If MAKEINDEX (on NS), set COLOR_DEF pixel to ARGB.  */
   bool (*defined_color_hook) (struct frame *f, const char *color_name,
-                              XColor *color_def,
+                              Emacs_Color *color_def,
                               bool alloc,
                               bool makeIndex);
 
@@ -515,13 +515,13 @@ struct terminal
 
   /* This hook is called to store the frame's background color into
      BGCOLOR.  */
-  void (*query_frame_background_color) (struct frame *f, XColor *bgcolor);
+  void (*query_frame_background_color) (struct frame *f, Emacs_Color *bgcolor);
 
 #if defined (HAVE_X_WINDOWS) || defined (HAVE_NTGUI)
   /* On frame F, translate pixel colors to RGB values for the NCOLORS
      colors in COLORS.  Use cached information, if available.  */
 
-  void (*query_colors) (struct frame *f, XColor *colors, int ncolors);
+  void (*query_colors) (struct frame *f, Emacs_Color *colors, int ncolors);
 #endif
   /* Return the current position of the mouse.
 
@@ -744,7 +744,7 @@ struct terminal
   /* Image hooks */
 #ifdef HAVE_WINDOW_SYSTEM
   /* Free the pixmap PIXMAP on F.  */
-  void (*free_pixmap) (struct frame *f, Pixmap pixmap);
+  void (*free_pixmap) (struct frame *f, Emacs_Pixmap pixmap);
 
 #endif
 
diff --git a/src/w32fns.c b/src/w32fns.c
index 525642b..bb74fcc 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -1174,7 +1174,7 @@ gamma_correct (struct frame *f, COLORREF *color)
    If ALLOC is nonzero, allocate a new colormap cell.  */
 
 bool
-w32_defined_color (struct frame *f, const char *color, XColor *color_def,
+w32_defined_color (struct frame *f, const char *color, Emacs_Color *color_def,
                   bool alloc_p, bool _makeIndex)
 {
   register Lisp_Object tem;
@@ -1248,7 +1248,7 @@ w32_defined_color (struct frame *f, const char *color, 
XColor *color_def,
 static int
 w32_decode_color (struct frame *f, Lisp_Object arg, int def)
 {
-  XColor cdef;
+  Emacs_Color cdef;
 
   CHECK_STRING (arg);
 
@@ -2247,15 +2247,15 @@ w32_set_z_group (struct frame *f, Lisp_Object 
new_value, Lisp_Object old_value)
 
 /* Subroutines for creating a frame.  */
 
-Cursor w32_load_cursor (LPCTSTR);
+HCURSOR w32_load_cursor (LPCTSTR);
 
-Cursor
+HCURSOR
 w32_load_cursor (LPCTSTR name)
 {
   /* Try first to load cursor from application resource.  */
-  Cursor cursor = LoadImage ((HINSTANCE) GetModuleHandle (NULL),
-                            name, IMAGE_CURSOR, 0, 0,
-                            LR_DEFAULTCOLOR | LR_DEFAULTSIZE | LR_SHARED);
+  HCURSOR cursor = LoadImage ((HINSTANCE) GetModuleHandle (NULL),
+                              name, IMAGE_CURSOR, 0, 0,
+                              LR_DEFAULTCOLOR | LR_DEFAULTSIZE | LR_SHARED);
   if (!cursor)
     {
       /* Then try to load a shared predefined cursor.  */
@@ -5217,7 +5217,7 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM 
lParam)
 
     case WM_EMACS_SETCURSOR:
       {
-       Cursor cursor = (Cursor) wParam;
+       HCURSOR cursor = (HCURSOR) wParam;
        f = w32_window_to_frame (dpyinfo, hwnd);
        if (f && cursor)
          {
@@ -5559,22 +5559,19 @@ w32_icon (struct frame *f, Lisp_Object parms)
 static void
 w32_make_gc (struct frame *f)
 {
-  XGCValues gc_values;
+  Emacs_GC gc_values;
 
   block_input ();
 
   /* Create the GC's of this frame.
      Note that many default values are used.  */
 
-  /* Normal video */
-  gc_values.font = FRAME_FONT (f);
-
   /* Cursor has cursor-color background, background-color foreground.  */
   gc_values.foreground = FRAME_BACKGROUND_PIXEL (f);
   gc_values.background = f->output_data.w32->cursor_pixel;
   f->output_data.w32->cursor_gc
     = XCreateGC (NULL, FRAME_W32_WINDOW (f),
-                (GCFont | GCForeground | GCBackground),
+                (GCForeground | GCBackground),
                 &gc_values);
 
   /* Reliefs.  */
@@ -6100,7 +6097,7 @@ DEFUN ("xw-color-defined-p", Fxw_color_defined_p, 
Sxw_color_defined_p, 1, 2, 0,
        doc: /* SKIP: real doc in xfns.c.  */)
   (Lisp_Object color, Lisp_Object frame)
 {
-  XColor foo;
+  Emacs_Color foo;
   struct frame *f = decode_window_system_frame (frame);
 
   CHECK_STRING (color);
@@ -6115,7 +6112,7 @@ DEFUN ("xw-color-values", Fxw_color_values, 
Sxw_color_values, 1, 2, 0,
        doc: /* SKIP: real doc in xfns.c.  */)
   (Lisp_Object color, Lisp_Object frame)
 {
-  XColor foo;
+  Emacs_Color foo;
   struct frame *f = decode_window_system_frame (frame);
 
   CHECK_STRING (color);
diff --git a/src/w32font.c b/src/w32font.c
index 848016d..47a33ae 100644
--- a/src/w32font.c
+++ b/src/w32font.c
@@ -433,7 +433,7 @@ w32font_encode_char (struct font *font, int c)
    CODE (length NGLYPHS).  Apparently metrics can be NULL, in this
    case just return the overall width.  */
 void
-w32font_text_extents (struct font *font, unsigned *code,
+w32font_text_extents (struct font *font, const unsigned *code,
                      int nglyphs, struct font_metrics *metrics)
 {
   int i;
@@ -704,11 +704,23 @@ w32font_draw (struct glyph_string *s, int from, int to,
       int i;
 
       for (i = 0; i < len; i++)
-       ExtTextOutW (s->hdc, x + i, y, options, NULL,
-                    s->char2b + from + i, 1, NULL);
+       {
+         WCHAR c = s->char2b[from + i] & 0xFFFF;
+         ExtTextOutW (s->hdc, x + i, y, options, NULL, &c, 1, NULL);
+       }
     }
   else
-    ExtTextOutW (s->hdc, x, y, options, NULL, s->char2b + from, len, NULL);
+    {
+      /* The number of glyphs in a glyph_string cannot be larger than
+        the maximum value of the 'used' member of a glyph_row, so we
+        are OK using alloca here.  */
+      eassert (len <= SHRT_MAX);
+      WCHAR *chars = alloca (len * sizeof (WCHAR));
+      int j;
+      for (j = 0; j < len; j++)
+       chars[j] = s->char2b[from + j] & 0xFFFF;
+      ExtTextOutW (s->hdc, x, y, options, NULL, chars, len, NULL);
+    }
 
   /* Restore clip region.  */
   if (s->num_clips > 0)
diff --git a/src/w32font.h b/src/w32font.h
index 65f42a3..c7bb7f3 100644
--- a/src/w32font.h
+++ b/src/w32font.h
@@ -74,7 +74,7 @@ int w32font_open_internal (struct frame *f, Lisp_Object 
font_entity,
                            int pixel_size, Lisp_Object font_object);
 void w32font_close (struct font *font);
 int w32font_has_char (Lisp_Object entity, int c);
-void w32font_text_extents (struct font *font, unsigned *code, int nglyphs,
+void w32font_text_extents (struct font *font, const unsigned *code, int 
nglyphs,
                           struct font_metrics *metrics);
 int w32font_draw (struct glyph_string *s, int from, int to,
                   int x, int y, bool with_background);
diff --git a/src/w32gui.h b/src/w32gui.h
index 5dcbbd9..62bad33 100644
--- a/src/w32gui.h
+++ b/src/w32gui.h
@@ -27,41 +27,11 @@ along with GNU Emacs.  If not, see 
<https://www.gnu.org/licenses/>.  */
 #define local_alloc(n) (HeapAlloc (local_heap, HEAP_ZERO_MEMORY, (n)))
 #define local_free(p) (HeapFree (local_heap, 0, ((LPVOID) (p))))
 
-/* Emulate X GC's by keeping color and font info in a structure.  */
-typedef struct _XGCValues
-{
-  COLORREF foreground;
-  COLORREF background;
-  struct font *font;
-} XGCValues;
-
-#define GCForeground 0x01
-#define GCBackground 0x02
-#define GCFont 0x03
-
-typedef HBITMAP Pixmap;
-typedef HBITMAP Bitmap;
+typedef HBITMAP Emacs_Pixmap;
 
-typedef XGCValues * GC;
-typedef COLORREF Color;
 typedef HWND Window;
 typedef HDC Display;  /* HDC so it doesn't conflict with xpm lib.  */
-typedef HCURSOR Cursor;
-
-#define No_Cursor (0)
-
-#define XChar2b wchar_t
-
-/* Dealing with bits of wchar_t as if they were an XChar2b.  */
-#define STORE_XCHAR2B(chp, byte1, byte2) \
-  ((*(chp)) = ((XChar2b)((((byte1) & 0x00ff) << 8) | ((byte2) & 0x00ff))))
-
-#define XCHAR2B_BYTE1(chp) \
-  (((*(chp)) & 0xff00) >> 8)
-
-#define XCHAR2B_BYTE2(chp) \
-  ((*(chp)) & 0x00ff)
-
+typedef HCURSOR Emacs_Cursor;
 
 /* Windows equivalent of XImage.  */
 typedef struct _XImage
@@ -110,20 +80,15 @@ extern HINSTANCE hinst;
 #define PBaseSize      (1L << 8) /* program specified base for incrementing */
 #define PWinGravity    (1L << 9) /* program specified window gravity */
 
-typedef struct {
-    int x, y;
-    unsigned width, height;
-} XRectangle;
-
 #define NativeRectangle RECT
 
-#define CONVERT_TO_XRECT(xr,nr)                        \
+#define CONVERT_TO_EMACS_RECT(xr,nr)            \
   ((xr).x = (nr).left,                         \
    (xr).y = (nr).top,                          \
    (xr).width = ((nr).right - (nr).left),      \
    (xr).height = ((nr).bottom - (nr).top))
 
-#define CONVERT_FROM_XRECT(xr,nr)              \
+#define CONVERT_FROM_EMACS_RECT(xr,nr)         \
   ((nr).left = (xr).x,                         \
    (nr).top = (xr).y,                          \
    (nr).right = ((xr).x + (xr).width),         \
diff --git a/src/w32term.c b/src/w32term.c
index 435455e..5726124 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -85,7 +85,7 @@ static int any_help_event_p;
 extern unsigned int msh_mousewheel;
 
 extern int w32_codepage_for_font (char *fontname);
-extern Cursor w32_load_cursor (LPCTSTR name);
+extern HCURSOR w32_load_cursor (LPCTSTR name);
 
 
 /* This is display since w32 does not support multiple ones.  */
@@ -166,7 +166,7 @@ int w32_message_fd = -1;
 
 static void w32_handle_tool_bar_click (struct frame *,
                                        struct input_event *);
-static void w32_define_cursor (Window, Cursor);
+static void w32_define_cursor (Window, Emacs_Cursor);
 
 static void w32_scroll_bar_clear (struct frame *);
 static void w32_raise_frame (struct frame *);
@@ -237,23 +237,21 @@ record_event (char *locus, int type)
 
 
 static void
-XChangeGC (void *ignore, XGCValues *gc, unsigned long mask,
-          XGCValues *xgcv)
+XChangeGC (void *ignore, Emacs_GC *gc, unsigned long mask,
+          Emacs_GC *egc)
 {
   if (mask & GCForeground)
-    gc->foreground = xgcv->foreground;
+    gc->foreground = egc->foreground;
   if (mask & GCBackground)
-    gc->background = xgcv->background;
-  if (mask & GCFont)
-    gc->font = xgcv->font;
+    gc->background = egc->background;
 }
 
-XGCValues *
-XCreateGC (void *ignore, HWND wignore, unsigned long mask, XGCValues *xgcv)
+Emacs_GC *
+XCreateGC (void *ignore, HWND wignore, unsigned long mask, Emacs_GC *egc)
 {
-  XGCValues *gc = xzalloc (sizeof (XGCValues));
+  Emacs_GC *gc = xzalloc (sizeof (*gc));
 
-  XChangeGC (ignore, gc, mask, xgcv);
+  XChangeGC (ignore, gc, mask, egc);
 
   return gc;
 }
@@ -337,7 +335,7 @@ w32_draw_underwave (struct glyph_string *s, COLORREF color)
 
   int wave_height = 3 * scale_y, wave_length = 2 * scale_x, thickness = 
scale_y;
   int dx, dy, x0, y0, width, x1, y1, x2, y2, odd, xmax;
-  XRectangle wave_clip, string_clip, final_clip;
+  Emacs_Rectangle wave_clip, string_clip, final_clip;
   RECT w32_final_clip, w32_string_clip;
   HPEN hp, oldhp;
 
@@ -356,14 +354,14 @@ w32_draw_underwave (struct glyph_string *s, COLORREF 
color)
   wave_clip.height = wave_height;
 
   get_glyph_string_clip_rect (s, &w32_string_clip);
-  CONVERT_TO_XRECT (string_clip, w32_string_clip);
+  CONVERT_TO_EMACS_RECT (string_clip, w32_string_clip);
 
   if (!gui_intersect_rectangles (&wave_clip, &string_clip, &final_clip))
     return;
 
   hp = CreatePen (PS_SOLID, thickness, color);
   oldhp = SelectObject (s->hdc, hp);
-  CONVERT_FROM_XRECT (final_clip, w32_final_clip);
+  CONVERT_FROM_EMACS_RECT (final_clip, w32_final_clip);
   w32_set_clip_rectangle (s->hdc, &w32_final_clip);
 
   /* Draw the waves */
@@ -396,7 +394,7 @@ w32_draw_underwave (struct glyph_string *s, COLORREF color)
 
 /* Draw a hollow rectangle at the specified position.  */
 static void
-w32_draw_rectangle (HDC hdc, XGCValues *gc, int x, int y,
+w32_draw_rectangle (HDC hdc, Emacs_GC *gc, int x, int y,
                     int width, int height)
 {
   HBRUSH hb, oldhb;
@@ -906,38 +904,37 @@ w32_set_cursor_gc (struct glyph_string *s)
   else
     {
       /* Cursor on non-default face: must merge.  */
-      XGCValues xgcv;
+      Emacs_GC egc;
       unsigned long mask;
 
-      xgcv.background = s->f->output_data.w32->cursor_pixel;
-      xgcv.foreground = s->face->background;
+      egc.background = s->f->output_data.w32->cursor_pixel;
+      egc.foreground = s->face->background;
 
       /* If the glyph would be invisible, try a different foreground.  */
-      if (xgcv.foreground == xgcv.background)
-       xgcv.foreground = s->face->foreground;
-      if (xgcv.foreground == xgcv.background)
-       xgcv.foreground = s->f->output_data.w32->cursor_foreground_pixel;
-      if (xgcv.foreground == xgcv.background)
-       xgcv.foreground = s->face->foreground;
+      if (egc.foreground == egc.background)
+       egc.foreground = s->face->foreground;
+      if (egc.foreground == egc.background)
+       egc.foreground = s->f->output_data.w32->cursor_foreground_pixel;
+      if (egc.foreground == egc.background)
+       egc.foreground = s->face->foreground;
 
       /* Make sure the cursor is distinct from text in this face.  */
-      if (xgcv.background == s->face->background
-         && xgcv.foreground == s->face->foreground)
+      if (egc.background == s->face->background
+         && egc.foreground == s->face->foreground)
        {
-         xgcv.background = s->face->foreground;
-         xgcv.foreground = s->face->background;
+         egc.background = s->face->foreground;
+         egc.foreground = s->face->background;
        }
 
       IF_DEBUG (w32_check_font (s->f, s->font));
-      xgcv.font = s->font;
-      mask = GCForeground | GCBackground | GCFont;
+      mask = GCForeground | GCBackground;
 
       if (FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc)
        XChangeGC (NULL, FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc,
-                  mask, &xgcv);
+                  mask, &egc);
       else
        FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc
-         = XCreateGC (NULL, FRAME_W32_WINDOW (s->f), mask, &xgcv);
+         = XCreateGC (NULL, FRAME_W32_WINDOW (s->f), mask, &egc);
 
       s->gc = FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc;
     }
@@ -972,21 +969,20 @@ w32_set_mouse_face_gc (struct glyph_string *s)
     {
       /* Otherwise construct scratch_cursor_gc with values from FACE
         but font FONT.  */
-      XGCValues xgcv;
+      Emacs_GC egc;
       unsigned long mask;
 
-      xgcv.background = s->face->background;
-      xgcv.foreground = s->face->foreground;
+      egc.background = s->face->background;
+      egc.foreground = s->face->foreground;
       IF_DEBUG (w32_check_font (s->f, s->font));
-      xgcv.font = s->font;
-      mask = GCForeground | GCBackground | GCFont;
+      mask = GCForeground | GCBackground;
 
       if (FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc)
        XChangeGC (NULL, FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc,
-                  mask, &xgcv);
+                  mask, &egc);
       else
        FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc
-         = XCreateGC (NULL, FRAME_W32_WINDOW (s->f), mask, &xgcv);
+         = XCreateGC (NULL, FRAME_W32_WINDOW (s->f), mask, &egc);
 
       s->gc = FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc;
     }
@@ -1101,14 +1097,10 @@ w32_compute_glyph_string_overhangs (struct glyph_string 
*s)
       && s->first_glyph->type == CHAR_GLYPH
       && !s->font_not_found_p)
     {
-      unsigned *code = alloca (sizeof (unsigned) * s->nchars);
       struct font *font = s->font;
       struct font_metrics metrics;
-      int i;
 
-      for (i = 0; i < s->nchars; i++)
-       code[i] = s->char2b[i];
-      font->driver->text_extents (font, code, s->nchars, &metrics);
+      font->driver->text_extents (font, s->char2b, s->nchars, &metrics);
       s->right_overhang = (metrics.rbearing > metrics.width
                           ? metrics.rbearing - metrics.width : 0);
       s->left_overhang = metrics.lbearing < 0 ? -metrics.lbearing : 0;
@@ -1353,7 +1345,7 @@ static void
 w32_draw_glyphless_glyph_string_foreground (struct glyph_string *s)
 {
   struct glyph *glyph = s->first_glyph;
-  XChar2b char2b[8];
+  unsigned char2b[8];
   int x, i, j;
   bool with_background;
 
@@ -1410,16 +1402,12 @@ w32_draw_glyphless_glyph_string_foreground (struct 
glyph_string *s)
        {
          struct font *font = s->font;
          int upper_len = (len + 1) / 2;
-         unsigned code;
          HFONT old_font;
 
          old_font = SelectObject (s->hdc, FONT_HANDLE (font));
          /* It is certain that all LEN characters in STR are ASCII.  */
          for (j = 0; j < len; j++)
-           {
-             code = font->driver->encode_char (font, str[j]);
-             STORE_XCHAR2B (char2b + j, code >> 8, code & 0xFF);
-           }
+            char2b[j] = font->driver->encode_char (font, str[j]) & 0xFFFF;
          font->driver->draw (s, 0, upper_len,
                              x + glyph->slice.glyphless.upper_xoff,
                              s->ybase + glyph->slice.glyphless.upper_yoff,
@@ -1517,7 +1505,7 @@ w32_alloc_lighter_color (struct frame *f, COLORREF *color,
    colors in COLORS.  On W32, we no longer try to map colors to
    a palette.  */
 static void
-w32_query_colors (struct frame *f, XColor *colors, int ncolors)
+w32_query_colors (struct frame *f, Emacs_Color *colors, int ncolors)
 {
   int i;
 
@@ -1534,7 +1522,7 @@ w32_query_colors (struct frame *f, XColor *colors, int 
ncolors)
 /* Store F's background color into *BGCOLOR.  */
 
 static void
-w32_query_frame_background_color (struct frame *f, XColor *bgcolor)
+w32_query_frame_background_color (struct frame *f, Emacs_Color *bgcolor)
 {
   bgcolor->pixel = FRAME_BACKGROUND_PIXEL (f);
   w32_query_colors (f, bgcolor, 1);
@@ -1551,7 +1539,7 @@ static void
 w32_setup_relief_color (struct frame *f, struct relief *relief, double factor,
                        int delta, COLORREF default_pixel)
 {
-  XGCValues xgcv;
+  Emacs_GC egc;
   struct w32_output *di = f->output_data.w32;
   unsigned long mask = GCForeground;
   COLORREF pixel;
@@ -1563,22 +1551,21 @@ w32_setup_relief_color (struct frame *f, struct relief 
*relief, double factor,
   /* TODO: Free colors (if using palette)? */
 
   /* Allocate new color.  */
-  xgcv.foreground = default_pixel;
+  egc.foreground = default_pixel;
   pixel = background;
   if (w32_alloc_lighter_color (f, &pixel, factor, delta))
-    xgcv.foreground = relief->pixel = pixel;
+    egc.foreground = relief->pixel = pixel;
 
-  xgcv.font = NULL;    /* avoid compiler warnings */
   if (relief->gc == 0)
     {
 #if 0 /* TODO: stipple */
-      xgcv.stipple = dpyinfo->gray;
+      egc.stipple = dpyinfo->gray;
       mask |= GCStipple;
 #endif
-      relief->gc = XCreateGC (NULL, FRAME_W32_WINDOW (f), mask, &xgcv);
+      relief->gc = XCreateGC (NULL, FRAME_W32_WINDOW (f), mask, &egc);
     }
   else
-    XChangeGC (NULL, relief->gc, mask, &xgcv);
+    XChangeGC (NULL, relief->gc, mask, &egc);
 }
 
 
@@ -1627,7 +1614,7 @@ w32_draw_relief_rect (struct frame *f,
                      RECT *clip_rect)
 {
   int i;
-  XGCValues gc;
+  Emacs_GC gc;
   HDC hdc = get_frame_dc (f);
 
   if (raised_p)
@@ -2286,7 +2273,7 @@ w32_draw_stretch_glyph_string (struct glyph_string *s)
       /* Clear rest using the GC of the original non-cursor face.  */
       if (width < background_width)
        {
-         XGCValues *gc = s->face->gc;
+         Emacs_GC *gc = s->face->gc;
          int y = s->y;
          int w = background_width - width, h = s->height;
          RECT r;
@@ -3429,7 +3416,7 @@ static void w32_horizontal_scroll_bar_report_motion 
(struct frame **, Lisp_Objec
                                                      Lisp_Object *, 
Lisp_Object *,
                                                      Time *);
 static void
-w32_define_cursor (Window window, Cursor cursor)
+w32_define_cursor (Window window, Emacs_Cursor cursor)
 {
   PostMessage (window, WM_EMACS_SETCURSOR, (WPARAM) cursor, 0);
 }
@@ -5806,7 +5793,7 @@ w32_draw_bar_cursor (struct window *w, struct glyph_row 
*row,
 /* RIF: Define cursor CURSOR on frame F.  */
 
 static void
-w32_define_frame_cursor (struct frame *f, Cursor cursor)
+w32_define_frame_cursor (struct frame *f, Emacs_Cursor cursor)
 {
   w32_define_cursor (FRAME_W32_WINDOW (f), cursor);
 }
@@ -6947,7 +6934,7 @@ w32_toggle_invisible_pointer (struct frame *f, bool 
invisible)
  ***********************************************************************/
 
 static void
-w32_free_pixmap (struct frame *_f, Pixmap pixmap)
+w32_free_pixmap (struct frame *_f, Emacs_Pixmap pixmap)
 {
   DeleteObject (pixmap);
 }
@@ -7208,7 +7195,7 @@ w32_term_init (Lisp_Object display_name, char 
*xrm_option, char *resource_name)
 
   /* initialize palette with white and black */
   {
-    XColor color;
+    Emacs_Color color;
     w32_defined_color (0, "white", &color, true, false);
     w32_defined_color (0, "black", &color, true, false);
   }
diff --git a/src/w32term.h b/src/w32term.h
index a03b9fd..729e8d0 100644
--- a/src/w32term.h
+++ b/src/w32term.h
@@ -56,7 +56,7 @@ extern BOOL bUseDflt;
 
 struct w32_bitmap_record
 {
-  Pixmap pixmap;
+  Emacs_Pixmap pixmap;
   char *file;
   HINSTANCE hinst; /* Used to load the file */
   int refcount;
@@ -114,10 +114,10 @@ struct w32_display_info
   Window root_window;
 
   /* The cursor to use for vertical scroll bars.  */
-  Cursor vertical_scroll_bar_cursor;
+  HCURSOR vertical_scroll_bar_cursor;
 
   /* The cursor to use for horizontal scroll bars.  */
-  Cursor horizontal_scroll_bar_cursor;
+  HCURSOR horizontal_scroll_bar_cursor;
 
   /* Resource data base */
   const char *rdb;
@@ -142,7 +142,7 @@ struct w32_display_info
   int smallest_font_height;
 
   /* Reusable Graphics Context for drawing a cursor in a non-default face. */
-  XGCValues *scratch_cursor_gc;
+  Emacs_GC *scratch_cursor_gc;
 
   /* Information about the range of text currently shown in
      mouse-face.  */
@@ -241,7 +241,7 @@ extern void w32_set_scroll_bar_default_height (struct frame 
*);
 
 extern struct w32_display_info *w32_term_init (Lisp_Object,
                                               char *, char *);
-extern bool w32_defined_color (struct frame *, const char *, XColor *,
+extern bool w32_defined_color (struct frame *, const char *, Emacs_Color *,
                                bool, bool);
 extern int w32_display_pixel_height (struct w32_display_info *);
 extern int w32_display_pixel_width (struct w32_display_info *);
@@ -308,7 +308,7 @@ struct w32_output
   HPALETTE old_palette;
 
   /* Here are the Graphics Contexts for the default font.  */
-  XGCValues *cursor_gc;                                /* cursor drawing */
+  Emacs_GC *cursor_gc;                 /* cursor drawing */
 
   /* The window used for this frame.
      May be zero while the frame object is being created
@@ -348,27 +348,27 @@ struct w32_output
   COLORREF scroll_bar_background_pixel;
 
   /* Descriptor for the cursor in use for this window.  */
-  Cursor text_cursor;
-  Cursor nontext_cursor;
-  Cursor modeline_cursor;
-  Cursor hand_cursor;
-  Cursor hourglass_cursor;
-  Cursor horizontal_drag_cursor;
-  Cursor vertical_drag_cursor;
-  Cursor left_edge_cursor;
-  Cursor top_left_corner_cursor;
-  Cursor top_edge_cursor;
-  Cursor top_right_corner_cursor;
-  Cursor right_edge_cursor;
-  Cursor bottom_right_corner_cursor;
-  Cursor bottom_edge_cursor;
-  Cursor bottom_left_corner_cursor;
+  HCURSOR text_cursor;
+  HCURSOR nontext_cursor;
+  HCURSOR modeline_cursor;
+  HCURSOR hand_cursor;
+  HCURSOR hourglass_cursor;
+  HCURSOR horizontal_drag_cursor;
+  HCURSOR vertical_drag_cursor;
+  HCURSOR left_edge_cursor;
+  HCURSOR top_left_corner_cursor;
+  HCURSOR top_edge_cursor;
+  HCURSOR top_right_corner_cursor;
+  HCURSOR right_edge_cursor;
+  HCURSOR bottom_right_corner_cursor;
+  HCURSOR bottom_edge_cursor;
+  HCURSOR bottom_left_corner_cursor;
 
   /* Non-zero means hourglass cursor is currently displayed.  */
   unsigned hourglass_p : 1;
 
   /* Non-hourglass cursor that is currently active.  */
-  Cursor current_cursor;
+  HCURSOR current_cursor;
 
   DWORD dwStyle;
 
@@ -388,7 +388,7 @@ struct w32_output
   /* Relief GCs, colors etc.  */
   struct relief
   {
-    XGCValues *gc;
+    Emacs_GC *gc;
     unsigned long pixel;
   }
   black_relief, white_relief;
@@ -721,7 +721,7 @@ extern void complete_deferred_msg (HWND hwnd, UINT msg, 
LRESULT result);
 extern BOOL parse_button (int, int, int *, int *);
 
 extern void w32_sys_ring_bell (struct frame *f);
-extern void w32_query_color (struct frame *, XColor *);
+extern void w32_query_color (struct frame *, Emacs_Color *);
 extern void w32_delete_display (struct w32_display_info *dpyinfo);
 
 #define FILE_NOTIFICATIONS_SIZE 16384
@@ -805,7 +805,7 @@ typedef struct tagTRACKMOUSEEVENT
 struct image;
 struct face;
 
-XGCValues *XCreateGC (void *, HWND, unsigned long, XGCValues *);
+Emacs_GC *XCreateGC (void *, HWND, unsigned long, Emacs_GC *);
 
 typedef DWORD (WINAPI * ClipboardSequence_Proc) (void);
 typedef BOOL (WINAPI * AppendMenuW_Proc) (
diff --git a/src/window.c b/src/window.c
index 30ffad0..deeb4f6 100644
--- a/src/window.c
+++ b/src/window.c
@@ -3947,8 +3947,8 @@ set_window_buffer (Lisp_Object window, Lisp_Object buffer,
   b->display_error_modiff = 0;
 
   /* Update time stamps of buffer display.  */
-  if (FIXNUMP (BVAR (b, display_count)))
-    bset_display_count (b, make_fixnum (XFIXNUM (BVAR (b, display_count)) + 
1));
+  if (INTEGERP (BVAR (b, display_count)))
+    bset_display_count (b, Fadd1 (BVAR (b, display_count)));
   bset_display_time (b, Fcurrent_time ());
 
   w->window_end_pos = 0;
@@ -4089,7 +4089,7 @@ displaying that buffer.  */)
       return Qt;
     }
 
-  if (WINDOWP (object))
+  if (WINDOW_LIVE_P (object))
     {
       struct window *w = XWINDOW (object);
       mark_window_display_accurate (object, false);
diff --git a/src/window.h b/src/window.h
index fdef407..6b0f0e5 100644
--- a/src/window.h
+++ b/src/window.h
@@ -595,7 +595,7 @@ wset_next_buffers (struct window *w, Lisp_Object val)
 #define WINDOW_BUFFER(W)                       \
   (WINDOW_LEAF_P(W)                            \
    ? (W)->contents                             \
-   : Qnil)                                     \
+   : Qnil)
 
 /* Return the canonical column width of the frame of window W.  */
 #define WINDOW_FRAME_COLUMN_WIDTH(W) \
@@ -649,7 +649,7 @@ wset_next_buffers (struct window *w, Lisp_Object val)
 #define WINDOW_RIGHTMOST_P(W)                                  \
   (WINDOW_RIGHT_PIXEL_EDGE (W)                                 \
    == (WINDOW_RIGHT_PIXEL_EDGE                                 \
-       (XWINDOW (FRAME_ROOT_WINDOW (WINDOW_XFRAME (W))))))     \
+       (XWINDOW (FRAME_ROOT_WINDOW (WINDOW_XFRAME (W))))))
 
 /* True if window W has no other windows below it on its frame (the
    minibuffer window is not counted in this respect unless W itself is a
@@ -657,13 +657,13 @@ wset_next_buffers (struct window *w, Lisp_Object val)
 #define WINDOW_BOTTOMMOST_P(W)                                 \
   (WINDOW_BOTTOM_PIXEL_EDGE (W)                                        \
    == (WINDOW_BOTTOM_PIXEL_EDGE                                        \
-       (XWINDOW (FRAME_ROOT_WINDOW (WINDOW_XFRAME (W))))))     \
+       (XWINDOW (FRAME_ROOT_WINDOW (WINDOW_XFRAME (W))))))
 
 /* True if window W takes up the full width of its frame.  */
 #define WINDOW_FULL_WIDTH_P(W)                                 \
   (WINDOW_PIXEL_WIDTH (W)                                      \
    == (WINDOW_PIXEL_WIDTH                                      \
-       (XWINDOW (FRAME_ROOT_WINDOW (WINDOW_XFRAME (W))))))     \
+       (XWINDOW (FRAME_ROOT_WINDOW (WINDOW_XFRAME (W))))))
 
 /* Width of right divider of window W.  */
 #define WINDOW_RIGHT_DIVIDER_WIDTH(W)                          \
@@ -1122,7 +1122,7 @@ struct glyph *get_phys_cursor_glyph (struct window *w);
 
 /* True if WINDOW is a valid window.  */
 #define WINDOW_VALID_P(WINDOW)                                 \
-  (WINDOWP (WINDOW) && !NILP (XWINDOW (WINDOW)->contents))     \
+  (WINDOWP (WINDOW) && !NILP (XWINDOW (WINDOW)->contents))
 
 /* A window of any sort, leaf or interior, is "valid" if its
    contents slot is non-nil.  */
diff --git a/src/xdisp.c b/src/xdisp.c
index 1aa677f..5f43815 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -376,17 +376,26 @@ static Lisp_Object list_of_error;
               || it->s[IT_BYTEPOS (*it)] == '\t'))                     \
        || (IT_BYTEPOS (*it) < ZV_BYTE                                  \
           && (*BYTE_POS_ADDR (IT_BYTEPOS (*it)) == ' '                 \
-              || *BYTE_POS_ADDR (IT_BYTEPOS (*it)) == '\t'))))         \
-
-/* Test all the conditions needed to print the fill column indicator.  */
-#define FILL_COLUMN_INDICATOR_NEEDED(it)                       \
-  Vdisplay_fill_column_indicator                       \
-  && (it->continuation_lines_width == 0)                       \
-  && (!NILP (Vdisplay_fill_column_indicator_column))           \
-  && FIXNATP (Vdisplay_fill_column_indicator_character)                \
-  && ((EQ (Vdisplay_fill_column_indicator_column, Qt)          \
-       && FIXNATP (BVAR (current_buffer, fill_column)))                \
-      || (FIXNATP (Vdisplay_fill_column_indicator_column)))
+              || *BYTE_POS_ADDR (IT_BYTEPOS (*it)) == '\t'))))
+
+/* If all the conditions needed to print the fill column indicator are
+   met, return the (nonnegative) column number, else return a negative
+   value.  */
+static int
+fill_column_indicator_column (struct it *it)
+{
+  if (Vdisplay_fill_column_indicator
+      && it->continuation_lines_width == 0
+      && CHARACTERP (Vdisplay_fill_column_indicator_character))
+    {
+      Lisp_Object col = (EQ (Vdisplay_fill_column_indicator_column, Qt)
+                        ? BVAR (current_buffer, fill_column)
+                        : Vdisplay_fill_column_indicator_column);
+      if (RANGED_FIXNUMP (0, col, INT_MAX))
+       return XFIXNUM (col);
+    }
+  return -1;
+}
 
 /* True means print newline to stdout before next mini-buffer message.  */
 
@@ -2080,7 +2089,7 @@ frame_to_window_pixel_xy (struct window *w, int *x, int 
*y)
 int
 get_glyph_string_clip_rects (struct glyph_string *s, NativeRectangle *rects, 
int n)
 {
-  XRectangle r;
+  Emacs_Rectangle r;
 
   if (n <= 0)
     return 0;
@@ -2142,7 +2151,7 @@ get_glyph_string_clip_rects (struct glyph_string *s, 
NativeRectangle *rects, int
         take the intersection with the rectangle of the cursor.  */
       if (s->for_overlaps & OVERLAPS_ERASED_CURSOR)
        {
-         XRectangle rc, r_save = r;
+         Emacs_Rectangle rc, r_save = r;
 
          rc.x = WINDOW_TEXT_TO_FRAME_PIXEL_X (s->w, s->w->phys_cursor.x);
          rc.y = s->w->phys_cursor.y;
@@ -2208,7 +2217,7 @@ get_glyph_string_clip_rects (struct glyph_string *s, 
NativeRectangle *rects, int
 
   if (s->row->clip)
     {
-      XRectangle r_save = r;
+      Emacs_Rectangle r_save = r;
 
       if (! gui_intersect_rectangles (&r_save, s->row->clip, &r))
        r.width = 0;
@@ -2217,8 +2226,8 @@ get_glyph_string_clip_rects (struct glyph_string *s, 
NativeRectangle *rects, int
   if ((s->for_overlaps & OVERLAPS_BOTH) == 0
       || ((s->for_overlaps & OVERLAPS_BOTH) == OVERLAPS_BOTH && n == 1))
     {
-#ifdef CONVERT_FROM_XRECT
-      CONVERT_FROM_XRECT (r, *rects);
+#ifdef CONVERT_FROM_EMACS_RECT
+      CONVERT_FROM_EMACS_RECT (r, *rects);
 #else
       *rects = r;
 #endif
@@ -2230,10 +2239,10 @@ get_glyph_string_clip_rects (struct glyph_string *s, 
NativeRectangle *rects, int
         multiple clipping rectangles, we exclude the row of the glyph
         string from the clipping rectangle.  This is to avoid drawing
         the same text on the environment with anti-aliasing.  */
-#ifdef CONVERT_FROM_XRECT
-      XRectangle rs[2];
+#ifdef CONVERT_FROM_EMACS_RECT
+      Emacs_Rectangle rs[2];
 #else
-      XRectangle *rs = rects;
+      Emacs_Rectangle *rs = rects;
 #endif
       int i = 0, row_y = WINDOW_TO_FRAME_PIXEL_Y (s->w, s->row->y);
 
@@ -2266,9 +2275,9 @@ get_glyph_string_clip_rects (struct glyph_string *s, 
NativeRectangle *rects, int
        }
 
       n = i;
-#ifdef CONVERT_FROM_XRECT
+#ifdef CONVERT_FROM_EMACS_RECT
       for (i = 0; i < n; i++)
-       CONVERT_FROM_XRECT (rs[i], rects[i]);
+       CONVERT_FROM_EMACS_RECT (rs[i], rects[i]);
 #endif
       return n;
     }
@@ -13986,12 +13995,6 @@ redisplay_internal (void)
 #if defined (USE_X_TOOLKIT) || defined (USE_GTK) || defined (HAVE_NS)
   if (popup_activated ())
     {
-#ifdef NS_IMPL_COCOA
-      /* On macOS we may have disabled screen updates due to window
-         resizing.  We should re-enable them so the popup can be
-         displayed.  */
-      ns_enable_screen_updates ();
-#endif
       return;
     }
 #endif
@@ -14794,12 +14797,6 @@ unwind_redisplay (void)
 {
   redisplaying_p = false;
   unblock_buffer_flips ();
-#ifdef NS_IMPL_COCOA
-  /* On macOS we may have disabled screen updates due to window
-     resizing.  When redisplay completes we want to re-enable
-     them.  */
-  ns_enable_screen_updates ();
-#endif
 }
 
 
@@ -20172,18 +20169,11 @@ append_space_for_newline (struct it *it, bool 
default_face_p)
          /* Corner case for when display-fill-column-indicator-mode
             is active and the extra character should be added in the
             same place than the line.  */
-         if ((it->w->pseudo_window_p == 0)
-             && FILL_COLUMN_INDICATOR_NEEDED(it))
+         int indicator_column = (it->w->pseudo_window_p == 0
+                                 ? fill_column_indicator_column (it)
+                                 : -1);
+         if (0 <= indicator_column)
            {
-              int fill_column_indicator_column = -1;
-
-              if (EQ (Vdisplay_fill_column_indicator_column, Qt))
-                fill_column_indicator_column =
-                  XFIXNAT (BVAR (current_buffer, fill_column));
-              else
-                fill_column_indicator_column =
-                  XFIXNAT (Vdisplay_fill_column_indicator_column);
-
               struct font *font =
                 default_face->font ?
                   default_face->font : FRAME_FONT (it->f);
@@ -20191,18 +20181,19 @@ append_space_for_newline (struct it *it, bool 
default_face_p)
                 font->average_width ?
                   font->average_width : font->space_width;
 
-              const int column_x =
-                char_width * fill_column_indicator_column +
-                  it->lnum_pixel_width;
-
-              if (it->current_x == column_x)
+              int column_x;
+              if (!INT_MULTIPLY_WRAPV (indicator_column, char_width,
+                                       &column_x)
+                  && !INT_ADD_WRAPV (it->lnum_pixel_width, column_x,
+                                     &column_x)
+                  && it->current_x == column_x)
                 {
                   it->c = it->char_to_display =
                     XFIXNAT (Vdisplay_fill_column_indicator_character);
                   it->face_id =
                     merge_faces (it->w, Qfill_column_indicator,
                                  0, saved_face_id);
-                  face = FACE_FROM_ID(it->f, it->face_id);
+                  face = FACE_FROM_ID (it->f, it->face_id);
                   goto produce_glyphs;
                 }
            }
@@ -20434,30 +20425,22 @@ extend_face_to_end_of_line (struct it *it)
          /* Display fill column indicator if not in modeline or
             toolbar and display fill column indicator mode is
             active.  */
-         if ((it->w->pseudo_window_p == 0)
-             && FILL_COLUMN_INDICATOR_NEEDED(it))
+         int indicator_column = (it->w->pseudo_window_p == 0
+                                 ? fill_column_indicator_column (it)
+                                 : -1);
+         if (0 <= indicator_column)
             {
-              int fill_column_indicator_column = -1;
-
-              if (EQ (Vdisplay_fill_column_indicator_column, Qt))
-                fill_column_indicator_column =
-                  XFIXNAT (BVAR (current_buffer, fill_column));
-              else
-                fill_column_indicator_column =
-                  XFIXNAT (Vdisplay_fill_column_indicator_column);
-
              struct font *font =
                default_face->font ? default_face->font : FRAME_FONT (f);
              const int char_width =
                font->average_width ?
                  font->average_width : font->space_width;
 
-             const int column_x =
-               char_width * fill_column_indicator_column +
-                 it->lnum_pixel_width;
-
-             if ((it->current_x <= column_x)
-                 && (column_x <= it->last_visible_x))
+             int column_x;
+             if (!INT_MULTIPLY_WRAPV (indicator_column, char_width, &column_x)
+                 && !INT_ADD_WRAPV (it->lnum_pixel_width, column_x, &column_x)
+                 && it->current_x <= column_x
+                 && column_x <= it->last_visible_x)
                {
                  const char saved_char = it->char_to_display;
                  const struct text_pos saved_pos = it->position;
@@ -20637,45 +20620,33 @@ extend_face_to_end_of_line (struct it *it)
        it->face_id = face->id;
 
       /* Display fill-column indicator if needed.  */
-      if (FILL_COLUMN_INDICATOR_NEEDED(it))
+      int indicator_column = fill_column_indicator_column (it);
+      if (0 <= indicator_column
+         && INT_ADD_WRAPV (it->lnum_pixel_width, indicator_column,
+                           &indicator_column))
+       indicator_column = -1;
+      do
        {
-         int fill_column_indicator_column = -1;
+         int saved_face_id;
+         bool indicate = it->current_x == indicator_column;
+         if (indicate)
+           {
+             saved_face_id = it->face_id;
+             it->face_id =
+               merge_faces (it->w, Qfill_column_indicator, 0, saved_face_id);
+             it->c = it->char_to_display =
+               XFIXNAT (Vdisplay_fill_column_indicator_character);
+           }
 
-         /* Vdisplay_fill_column_indicator_column accepts the special
-            value t to use the default fill-column variable.  The
-            conditions are all defined in the macro
-            FILL_COLUMN_INDICATOR_NEEDED.  */
-         if (EQ (Vdisplay_fill_column_indicator_column, Qt))
-           fill_column_indicator_column =
-             XFIXNAT (BVAR (current_buffer, fill_column)) + 
it->lnum_pixel_width;
-         else
-           fill_column_indicator_column =
-             XFIXNAT (Vdisplay_fill_column_indicator_column) + 
it->lnum_pixel_width;
+         PRODUCE_GLYPHS (it);
 
-         do
+         if (indicate)
            {
-             if (it->current_x == fill_column_indicator_column)
-               {
-                 const int saved_face_id = it->face_id;
-                 it->face_id =
-                   merge_faces (it->w, Qfill_column_indicator, 0, 
saved_face_id);
-                 it->c = it->char_to_display =
-                   XFIXNAT (Vdisplay_fill_column_indicator_character);
-                 PRODUCE_GLYPHS (it);
-                 it->face_id = saved_face_id;
-                 it->c = it->char_to_display = ' ';
-               }
-             else
-               PRODUCE_GLYPHS (it);
-           } while (it->current_x <= it->last_visible_x);
+             it->face_id = saved_face_id;
+             it->c = it->char_to_display = ' ';
+           }
        }
-      else
-       {
-          do
-           {
-             PRODUCE_GLYPHS (it);
-            } while (it->current_x <= it->last_visible_x);
-        }
+      while (it->current_x <= it->last_visible_x);
 
       if (WINDOW_RIGHT_MARGIN_WIDTH (it->w) > 0
          && (it->glyph_row->used[RIGHT_MARGIN_AREA]
@@ -25914,7 +25885,7 @@ dump_glyph_string (struct glyph_string *s)
 #endif /* GLYPH_DEBUG */
 
 /* Initialize glyph string S.  CHAR2B is a suitably allocated vector
-   of XChar2b structures for S; it can't be allocated in
+   of 2-byte unsigned integers for S; it can't be allocated in
    init_glyph_string because it must be allocated via `alloca'.  W
    is the window on which S is drawn.  ROW and AREA are the glyph row
    and area within the row from which S is constructed.  START is the
@@ -25944,7 +25915,7 @@ init_glyph_string (struct glyph_string *s,
 #ifdef HAVE_NTGUI
                   HDC hdc,
 #endif
-                  XChar2b *char2b, struct window *w, struct glyph_row *row,
+                  unsigned *char2b, struct window *w, struct glyph_row *row,
                   enum glyph_row_area area, int start, enum draw_glyphs_face 
hl)
 {
   memset (s, 0, sizeof *s);
@@ -26023,7 +25994,7 @@ append_glyph_string (struct glyph_string **head, struct 
glyph_string **tail,
 
 static struct face *
 get_char_face_and_encoding (struct frame *f, int c, int face_id,
-                           XChar2b *char2b, bool display_p)
+                           unsigned *char2b, bool display_p)
 {
   struct face *face = FACE_FROM_ID (f, face_id);
   unsigned code = 0;
@@ -26035,7 +26006,8 @@ get_char_face_and_encoding (struct frame *f, int c, int 
face_id,
       if (code == FONT_INVALID_CODE)
        code = 0;
     }
-  STORE_XCHAR2B (char2b, (code >> 8), (code & 0xFF));
+  /* Ensure that the code is only 2 bytes wide.  */
+  *char2b = code & 0xFFFF;
 
   /* Make sure X resources of the face are allocated.  */
 #ifdef HAVE_X_WINDOWS
@@ -26056,7 +26028,7 @@ get_char_face_and_encoding (struct frame *f, int c, int 
face_id,
 
 static struct face *
 get_glyph_face_and_encoding (struct frame *f, struct glyph *glyph,
-                            XChar2b *char2b)
+                            unsigned *char2b)
 {
   struct face *face;
   unsigned code = 0;
@@ -26078,7 +26050,8 @@ get_glyph_face_and_encoding (struct frame *f, struct 
glyph *glyph,
        code = 0;
     }
 
-  STORE_XCHAR2B (char2b, (code >> 8), (code & 0xFF));
+  /* Ensure that the code is only 2 bytes wide.  */
+  *char2b = code & 0xFFFF;
   return face;
 }
 
@@ -26087,7 +26060,7 @@ get_glyph_face_and_encoding (struct frame *f, struct 
glyph *glyph,
    Return true iff FONT has a glyph for C.  */
 
 static bool
-get_char_glyph_code (int c, struct font *font, XChar2b *char2b)
+get_char_glyph_code (int c, struct font *font, unsigned *char2b)
 {
   unsigned code;
 
@@ -26098,7 +26071,9 @@ get_char_glyph_code (int c, struct font *font, XChar2b 
*char2b)
 
   if (code == FONT_INVALID_CODE)
     return false;
-  STORE_XCHAR2B (char2b, (code >> 8), (code & 0xFF));
+
+  /* Ensure that the code is only 2 bytes wide.  */
+  *char2b = code & 0xFFFF;
   return true;
 }
 
@@ -26211,7 +26186,8 @@ fill_gstring_glyph_string (struct glyph_string *s, int 
face_id,
       Lisp_Object lglyph = LGSTRING_GLYPH (lgstring, i);
       unsigned code = LGLYPH_CODE (lglyph);
 
-      STORE_XCHAR2B ((s->char2b + i), code >> 8, code & 0xFF);
+      /* Ensure that the code is only 2 bytes wide.  */
+      s->char2b[i] = code & 0xFFFF;
     }
   s->width = composition_gstring_width (lgstring, s->cmp_from, s->cmp_to, 
NULL);
   return glyph - s->row->glyphs[s->area];
@@ -26390,17 +26366,16 @@ fill_stretch_glyph_string (struct glyph_string *s, 
int start, int end)
 }
 
 static struct font_metrics *
-get_per_char_metric (struct font *font, XChar2b *char2b)
+get_per_char_metric (struct font *font, const unsigned *char2b)
 {
   static struct font_metrics metrics;
-  unsigned code;
 
   if (! font)
     return NULL;
-  code = (XCHAR2B_BYTE1 (char2b) << 8) | XCHAR2B_BYTE2 (char2b);
-  if (code == FONT_INVALID_CODE)
+  if (*char2b == FONT_INVALID_CODE)
     return NULL;
-  font->driver->text_extents (font, &code, 1, &metrics);
+
+  font->driver->text_extents (font, char2b, 1, &metrics);
   return &metrics;
 }
 
@@ -26418,7 +26393,7 @@ normal_char_ascent_descent (struct font *font, int c, 
int *ascent, int *descent)
 
   if (FONT_TOO_HIGH (font))
     {
-      XChar2b char2b;
+      unsigned char2b;
 
       /* Get metrics of C, defaulting to a reasonably sized ASCII
         character.  */
@@ -26465,7 +26440,7 @@ gui_get_glyph_overhangs (struct glyph *glyph, struct 
frame *f, int *left, int *r
 
   if (glyph->type == CHAR_GLYPH)
     {
-      XChar2b char2b;
+      unsigned char2b;
       struct face *face = get_glyph_face_and_encoding (f, glyph, &char2b);
       if (face->font)
        {
@@ -26779,7 +26754,7 @@ compute_overhangs_and_x (struct glyph_string *s, int x, 
bool backward_p)
      do                                                                        
   \
        {                                                                  \
         int face_id;                                                      \
-        XChar2b *char2b;                                                  \
+        unsigned *char2b;                                         \
                                                                           \
         face_id = (row)->glyphs[area][START].face_id;                     \
                                                                           \
@@ -26808,7 +26783,7 @@ compute_overhangs_and_x (struct glyph_string *s, int x, 
bool backward_p)
     struct face *base_face = FACE_FROM_ID (f, face_id);                    \
     ptrdiff_t cmp_id = (row)->glyphs[area][START].u.cmp.id;                \
     struct composition *cmp = composition_table[cmp_id];                   \
-    XChar2b *char2b;                                                       \
+    unsigned *char2b;                                                      \
     struct glyph_string *first_s = NULL;                                   \
     int n;                                                                 \
                                                                            \
@@ -26840,7 +26815,7 @@ compute_overhangs_and_x (struct glyph_string *s, int x, 
bool backward_p)
 #define BUILD_GSTRING_GLYPH_STRING(START, END, HEAD, TAIL, HL, X, LAST_X) \
   do {                                                                   \
     int face_id;                                                         \
-    XChar2b *char2b;                                                     \
+    unsigned *char2b;                                                    \
     Lisp_Object gstring;                                                 \
                                                                          \
     face_id = (row)->glyphs[area][START].face_id;                        \
@@ -28433,7 +28408,7 @@ gui_produce_glyphs (struct it *it)
 
   if (it->what == IT_CHARACTER)
     {
-      XChar2b char2b;
+      unsigned char2b;
       struct face *face = FACE_FROM_ID (it->f, it->face_id);
       struct font *font = face->font;
       struct font_metrics *pcm = NULL;
@@ -28832,7 +28807,7 @@ gui_produce_glyphs (struct it *it)
          int lbearing, rbearing;
          int i, width, ascent, descent;
          int c;
-         XChar2b char2b;
+         unsigned char2b;
          struct font_metrics *pcm;
          ptrdiff_t pos;
 
@@ -31153,7 +31128,7 @@ Returns the alist element for the first matching AREA 
in MAP.  */)
 
 /* Display frame CURSOR, optionally using shape defined by POINTER.  */
 static void
-define_frame_cursor1 (struct frame *f, Cursor cursor, Lisp_Object pointer)
+define_frame_cursor1 (struct frame *f, Emacs_Cursor cursor, Lisp_Object 
pointer)
 {
 #ifdef HAVE_WINDOW_SYSTEM
   if (!FRAME_WINDOW_P (f))
@@ -31205,7 +31180,7 @@ note_mode_line_or_margin_highlight (Lisp_Object window, 
int x, int y,
   struct window *w = XWINDOW (window);
   struct frame *f = XFRAME (w->frame);
   Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
-  Cursor cursor = No_Cursor;
+  Emacs_Cursor cursor = No_Cursor;
   Lisp_Object pointer = Qnil;
   int dx, dy, width, height;
   ptrdiff_t charpos;
@@ -31518,7 +31493,7 @@ note_mouse_highlight (struct frame *f, int x, int y)
   enum window_part part = ON_NOTHING;
   Lisp_Object window;
   struct window *w;
-  Cursor cursor = No_Cursor;
+  Emacs_Cursor cursor = No_Cursor;
   Lisp_Object pointer = Qnil;  /* Takes precedence over cursor!  */
   struct buffer *b;
 
@@ -32137,7 +32112,7 @@ cancel_mouse_face (struct frame *f)
    which intersects rectangle R.  R is in window-relative coordinates.  */
 
 static void
-expose_area (struct window *w, struct glyph_row *row, XRectangle *r,
+expose_area (struct window *w, struct glyph_row *row, const Emacs_Rectangle *r,
             enum glyph_row_area area)
 {
   struct glyph *first = row->glyphs[area];
@@ -32195,7 +32170,7 @@ expose_area (struct window *w, struct glyph_row *row, 
XRectangle *r,
    true if mouse-face was overwritten.  */
 
 static bool
-expose_line (struct window *w, struct glyph_row *row, XRectangle *r)
+expose_line (struct window *w, struct glyph_row *row, const Emacs_Rectangle *r)
 {
   eassert (row->enabled_p);
 
@@ -32230,7 +32205,7 @@ static void
 expose_overlaps (struct window *w,
                 struct glyph_row *first_overlapping_row,
                 struct glyph_row *last_overlapping_row,
-                XRectangle *r)
+                const Emacs_Rectangle *r)
 {
   struct glyph_row *row;
 
@@ -32256,9 +32231,9 @@ expose_overlaps (struct window *w,
 /* Return true if W's cursor intersects rectangle R.  */
 
 static bool
-phys_cursor_in_rect_p (struct window *w, XRectangle *r)
+phys_cursor_in_rect_p (struct window *w, const Emacs_Rectangle *r)
 {
-  XRectangle cr, result;
+  Emacs_Rectangle cr, result;
   struct glyph *cursor_glyph;
   struct glyph_row *row;
 
@@ -32416,10 +32391,10 @@ gui_draw_bottom_divider (struct window *w)
    mouse-face.  */
 
 static bool
-expose_window (struct window *w, XRectangle *fr)
+expose_window (struct window *w, const Emacs_Rectangle *fr)
 {
   struct frame *f = XFRAME (w->frame);
-  XRectangle wr, r;
+  Emacs_Rectangle wr, r;
   bool mouse_face_overwritten_p = false;
 
   /* If window is not yet fully initialized, do nothing.  This can
@@ -32578,7 +32553,7 @@ expose_window (struct window *w, XRectangle *fr)
    true if the exposure overwrites mouse-face.  */
 
 static bool
-expose_window_tree (struct window *w, XRectangle *r)
+expose_window_tree (struct window *w, const Emacs_Rectangle *r)
 {
   struct frame *f = XFRAME (w->frame);
   bool mouse_face_overwritten_p = false;
@@ -32606,7 +32581,7 @@ expose_window_tree (struct window *w, XRectangle *r)
 void
 expose_frame (struct frame *f, int x, int y, int w, int h)
 {
-  XRectangle r;
+  Emacs_Rectangle r;
   bool mouse_face_overwritten_p = false;
 
   TRACE ((stderr, "expose_frame "));
@@ -32693,10 +32668,11 @@ expose_frame (struct frame *f, int x, int y, int w, 
int h)
    empty.  */
 
 bool
-gui_intersect_rectangles (XRectangle *r1, XRectangle *r2, XRectangle *result)
+gui_intersect_rectangles (const Emacs_Rectangle *r1, const Emacs_Rectangle *r2,
+                          Emacs_Rectangle *result)
 {
-  XRectangle *left, *right;
-  XRectangle *upper, *lower;
+  const Emacs_Rectangle *left, *right;
+  const Emacs_Rectangle *upper, *lower;
   bool intersection_p = false;
 
   /* Rearrange so that R1 is the left-most rectangle.  */
diff --git a/src/xfaces.c b/src/xfaces.c
index 5c2414b..d211ec8 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -348,7 +348,7 @@ static void free_face_cache (struct face_cache *);
 static bool merge_face_ref (struct window *w,
                             struct frame *, Lisp_Object, Lisp_Object *,
                            bool, struct named_merge_point *);
-static int color_distance (XColor *x, XColor *y);
+static int color_distance (Emacs_Color *x, Emacs_Color *y);
 
 #ifdef HAVE_WINDOW_SYSTEM
 static void set_font_frame_param (Lisp_Object, Lisp_Object);
@@ -513,12 +513,12 @@ x_free_gc (struct frame *f, GC gc)
 #ifdef HAVE_NTGUI
 /* W32 emulation of GCs */
 
-static GC
-x_create_gc (struct frame *f, unsigned long mask, XGCValues *xgcv)
+static Emacs_GC *
+x_create_gc (struct frame *f, unsigned long mask, Emacs_GC *egc)
 {
-  GC gc;
+  Emacs_GC *gc;
   block_input ();
-  gc = XCreateGC (NULL, FRAME_W32_WINDOW (f), mask, xgcv);
+  gc = XCreateGC (NULL, FRAME_W32_WINDOW (f), mask, egc);
   unblock_input ();
   IF_DEBUG (++ngcs);
   return gc;
@@ -528,7 +528,7 @@ x_create_gc (struct frame *f, unsigned long mask, XGCValues 
*xgcv)
 /* Free GC which was used on frame F.  */
 
 static void
-x_free_gc (struct frame *f, GC gc)
+x_free_gc (struct frame *f, Emacs_GC *gc)
 {
   IF_DEBUG ((--ngcs, eassert (ngcs >= 0)));
   xfree (gc);
@@ -539,18 +539,18 @@ x_free_gc (struct frame *f, GC gc)
 #ifdef HAVE_NS
 /* NS emulation of GCs */
 
-static GC
+static Emacs_GC *
 x_create_gc (struct frame *f,
             unsigned long mask,
-            XGCValues *xgcv)
+            Emacs_GC *egc)
 {
-  GC gc = xmalloc (sizeof *gc);
-  *gc = *xgcv;
+  Emacs_GC *gc = xmalloc (sizeof *gc);
+  *gc = *egc;
   return gc;
 }
 
 static void
-x_free_gc (struct frame *f, GC gc)
+x_free_gc (struct frame *f, Emacs_GC *gc)
 {
   xfree (gc);
 }
@@ -802,7 +802,7 @@ load_pixmap (struct frame *f, Lisp_Object name)
 
 
 /***********************************************************************
-                               X Colors
+                            Color Handling
  ***********************************************************************/
 
 /* Parse RGB_LIST, and fill in the RGB fields of COLOR.
@@ -810,7 +810,7 @@ load_pixmap (struct frame *f, Lisp_Object name)
    Return true iff RGB_LIST is OK.  */
 
 static bool
-parse_rgb_list (Lisp_Object rgb_list, XColor *color)
+parse_rgb_list (Lisp_Object rgb_list, Emacs_Color *color)
 {
 #define PARSE_RGB_LIST_FIELD(field)                                    \
   if (CONSP (rgb_list) && FIXNUMP (XCAR (rgb_list)))                   \
@@ -835,8 +835,8 @@ parse_rgb_list (Lisp_Object rgb_list, XColor *color)
    returned in it.  */
 
 static bool
-tty_lookup_color (struct frame *f, Lisp_Object color, XColor *tty_color,
-                 XColor *std_color)
+tty_lookup_color (struct frame *f, Lisp_Object color, Emacs_Color *tty_color,
+                 Emacs_Color *std_color)
 {
   Lisp_Object frame, color_desc;
 
@@ -897,7 +897,7 @@ tty_lookup_color (struct frame *f, Lisp_Object color, 
XColor *tty_color,
 
 bool
 tty_defined_color (struct frame *f, const char *color_name,
-                  XColor *color_def, bool alloc, bool _makeIndex)
+                  Emacs_Color *color_def, bool alloc, bool _makeIndex)
 {
   bool status = true;
 
@@ -965,7 +965,7 @@ tty_color_name (struct frame *f, int idx)
 static bool
 face_color_gray_p (struct frame *f, const char *color_name)
 {
-  XColor color;
+  Emacs_Color color;
   bool gray_p;
 
   if (FRAME_TERMINAL (f)->defined_color_hook
@@ -994,7 +994,7 @@ face_color_supported_p (struct frame *f, const char 
*color_name,
                        bool background_p)
 {
   Lisp_Object frame;
-  XColor not_used;
+  Emacs_Color not_used;
 
   XSETFRAME (frame, f);
   return
@@ -1043,7 +1043,7 @@ COLOR must be a valid color name.  */)
 
 static unsigned long
 load_color2 (struct frame *f, struct face *face, Lisp_Object name,
-             enum lface_attribute_index target_index, XColor *color)
+             enum lface_attribute_index target_index, Emacs_Color *color)
 {
   eassert (STRINGP (name));
   eassert (target_index == LFACE_FOREGROUND_INDEX
@@ -1117,7 +1117,7 @@ unsigned long
 load_color (struct frame *f, struct face *face, Lisp_Object name,
            enum lface_attribute_index target_index)
 {
-  XColor color;
+  Emacs_Color color;
   return load_color2 (f, face, name, target_index, &color);
 }
 
@@ -1134,7 +1134,7 @@ load_face_colors (struct frame *f, struct face *face,
                  Lisp_Object attrs[LFACE_VECTOR_SIZE])
 {
   Lisp_Object fg, bg, dfg;
-  XColor xfg, xbg;
+  Emacs_Color xfg, xbg;
 
   bg = attrs[LFACE_BACKGROUND_INDEX];
   fg = attrs[LFACE_FOREGROUND_INDEX];
@@ -4140,25 +4140,25 @@ prepare_face_for_display (struct frame *f, struct face 
*face)
 
   if (face->gc == 0)
     {
-      XGCValues xgcv;
+      Emacs_GC egc;
       unsigned long mask = GCForeground | GCBackground | GCGraphicsExposures;
 
-      xgcv.foreground = face->foreground;
-      xgcv.background = face->background;
+      egc.foreground = face->foreground;
+      egc.background = face->background;
 #ifdef HAVE_X_WINDOWS
-      xgcv.graphics_exposures = False;
+      egc.graphics_exposures = False;
 #endif
 
       block_input ();
 #ifdef HAVE_X_WINDOWS
       if (face->stipple)
        {
-         xgcv.fill_style = FillOpaqueStippled;
-         xgcv.stipple = image_bitmap_pixmap (f, face->stipple);
+         egc.fill_style = FillOpaqueStippled;
+         egc.stipple = image_bitmap_pixmap (f, face->stipple);
          mask |= GCFillStyle | GCStipple;
        }
 #endif
-      face->gc = x_create_gc (f, mask, &xgcv);
+      face->gc = x_create_gc (f, mask, &egc);
       if (face->font)
        font_prepare_for_face (f, face);
       unblock_input ();
@@ -4170,7 +4170,7 @@ prepare_face_for_display (struct frame *f, struct face 
*face)
 /* Returns the `distance' between the colors X and Y.  */
 
 static int
-color_distance (XColor *x, XColor *y)
+color_distance (Emacs_Color *x, Emacs_Color *y)
 {
   /* This formula is from a paper titled `Colour metric' by Thiadmer Riemersma.
      Quoting from that paper:
@@ -4205,7 +4205,7 @@ two lists of the form (RED GREEN BLUE) aforementioned. */)
    Lisp_Object metric)
 {
   struct frame *f = decode_live_frame (frame);
-  XColor cdef1, cdef2;
+  Emacs_Color cdef1, cdef2;
 
   if (!(CONSP (color1) && parse_rgb_list (color1, &cdef1))
       && !(STRINGP (color1)
@@ -4885,8 +4885,8 @@ tty_supports_face_attributes_p (struct frame *f,
 {
   int weight, slant;
   Lisp_Object val, fg, bg;
-  XColor fg_tty_color, fg_std_color;
-  XColor bg_tty_color, bg_std_color;
+  Emacs_Color fg_tty_color, fg_std_color;
+  Emacs_Color bg_tty_color, bg_std_color;
   unsigned test_caps = 0;
   Lisp_Object *def_attrs = def_face->lface;
 
@@ -4988,7 +4988,7 @@ tty_supports_face_attributes_p (struct frame *f,
       else
        /* Make sure the color is really different than the default.  */
        {
-         XColor def_fg_color;
+         Emacs_Color def_fg_color;
          if (tty_lookup_color (f, def_fg, &def_fg_color, 0)
              && (color_distance (&fg_tty_color, &def_fg_color)
                  <= TTY_SAME_COLOR_THRESHOLD))
@@ -5012,7 +5012,7 @@ tty_supports_face_attributes_p (struct frame *f,
       else
        /* Make sure the color is really different than the default.  */
        {
-         XColor def_bg_color;
+         Emacs_Color def_bg_color;
          if (tty_lookup_color (f, def_bg, &def_bg_color, 0)
              && (color_distance (&bg_tty_color, &def_bg_color)
                  <= TTY_SAME_COLOR_THRESHOLD))
diff --git a/src/xfns.c b/src/xfns.c
index c8cc170..4195980 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -653,7 +653,7 @@ gamma_correct (struct frame *f, XColor *color)
 
 bool
 x_defined_color (struct frame *f, const char *color_name,
-                XColor *color, bool alloc_p, bool _makeIndex)
+                Emacs_Color *color, bool alloc_p, bool _makeIndex)
 {
   bool success_p = false;
   Colormap cmap = FRAME_X_COLORMAP (f);
diff --git a/src/xfont.c b/src/xfont.c
index ff80df4..81808e7 100644
--- a/src/xfont.c
+++ b/src/xfont.c
@@ -46,18 +46,20 @@ struct xfont_info
 
 /* Prototypes of support functions.  */
 
-static XCharStruct *xfont_get_pcm (XFontStruct *, XChar2b *);
+static XCharStruct *xfont_get_pcm (XFontStruct *, unsigned char2b);
 
 /* Get metrics of character CHAR2B in XFONT.  Value is null if CHAR2B
    is not contained in the font.  */
 
 static XCharStruct *
-xfont_get_pcm (XFontStruct *xfont, XChar2b *char2b)
+xfont_get_pcm (XFontStruct *xfont, unsigned char2b)
 {
   /* The result metric information.  */
   XCharStruct *pcm = NULL;
+  const unsigned char byte1 = char2b >> 8;
+  const unsigned char byte2 = char2b & 0xFF;
 
-  eassert (xfont && char2b);
+  eassert (xfont);
 
   if (xfont->per_char != NULL)
     {
@@ -66,13 +68,13 @@ xfont_get_pcm (XFontStruct *xfont, XChar2b *char2b)
          /* min_char_or_byte2 specifies the linear character index
             corresponding to the first element of the per_char array,
             max_char_or_byte2 is the index of the last character.  A
-            character with non-zero CHAR2B->byte1 is not in the font.
+            character with non-zero byte1 is not in the font.
             A character with byte2 less than min_char_or_byte2 or
             greater max_char_or_byte2 is not in the font.  */
-         if (char2b->byte1 == 0
-             && char2b->byte2 >= xfont->min_char_or_byte2
-             && char2b->byte2 <= xfont->max_char_or_byte2)
-           pcm = xfont->per_char + char2b->byte2 - xfont->min_char_or_byte2;
+         if (byte1 == 0
+             && byte2 >= xfont->min_char_or_byte2
+             && byte2 <= xfont->max_char_or_byte2)
+           pcm = xfont->per_char + byte2 - xfont->min_char_or_byte2;
        }
       else
        {
@@ -89,14 +91,14 @@ xfont_get_pcm (XFontStruct *xfont, XChar2b *char2b)
             D = max_char_or_byte2 - min_char_or_byte2 + 1
             / = integer division
             \ = integer modulus  */
-         if (char2b->byte1 >= xfont->min_byte1
-             && char2b->byte1 <= xfont->max_byte1
-             && char2b->byte2 >= xfont->min_char_or_byte2
-             && char2b->byte2 <= xfont->max_char_or_byte2)
+         if (byte1 >= xfont->min_byte1
+             && byte1 <= xfont->max_byte1
+             && byte2 >= xfont->min_char_or_byte2
+             && byte2 <= xfont->max_char_or_byte2)
            pcm = (xfont->per_char
                   + ((xfont->max_char_or_byte2 - xfont->min_char_or_byte2 + 1)
-                     * (char2b->byte1 - xfont->min_byte1))
-                  + (char2b->byte2 - xfont->min_char_or_byte2));
+                     * (byte1 - xfont->min_byte1))
+                  + (byte2 - xfont->min_char_or_byte2));
        }
     }
   else
@@ -104,8 +106,8 @@ xfont_get_pcm (XFontStruct *xfont, XChar2b *char2b)
       /* If the per_char pointer is null, all glyphs between the first
         and last character indexes inclusive have the same
         information, as given by both min_bounds and max_bounds.  */
-      if (char2b->byte2 >= xfont->min_char_or_byte2
-         && char2b->byte2 <= xfont->max_char_or_byte2)
+      if (byte2 >= xfont->min_char_or_byte2
+         && byte2 <= xfont->max_char_or_byte2)
        pcm = &xfont->max_bounds;
     }
 
@@ -193,7 +195,6 @@ xfont_chars_supported (Lisp_Object chars, XFontStruct 
*xfont,
        {
          int c = XFIXNUM (XCAR (chars));
          unsigned code = ENCODE_CHAR (charset, c);
-         XChar2b char2b;
 
          if (code == CHARSET_INVALID_CODE (charset))
            break;
@@ -201,9 +202,7 @@ xfont_chars_supported (Lisp_Object chars, XFontStruct 
*xfont,
            continue;
          if (code >= 0x10000)
            break;
-         char2b.byte1 = code >> 8;
-         char2b.byte2 = code & 0xFF;
-         if (! xfont_get_pcm (xfont, &char2b))
+         if (! xfont_get_pcm (xfont, code))
            break;
        }
       return (NILP (chars));
@@ -216,7 +215,6 @@ xfont_chars_supported (Lisp_Object chars, XFontStruct 
*xfont,
        {
          int c = XFIXNUM (AREF (chars, i));
          unsigned code = ENCODE_CHAR (charset, c);
-         XChar2b char2b;
 
          if (code == CHARSET_INVALID_CODE (charset))
            continue;
@@ -224,9 +222,7 @@ xfont_chars_supported (Lisp_Object chars, XFontStruct 
*xfont,
            break;
          if (code >= 0x10000)
            continue;
-         char2b.byte1 = code >> 8;
-         char2b.byte2 = code & 0xFF;
-         if (xfont_get_pcm (xfont, &char2b))
+         if (xfont_get_pcm (xfont, code))
            break;
        }
       return (i >= 0);
@@ -801,11 +797,9 @@ xfont_open (struct frame *f, Lisp_Object entity, int 
pixel_size)
   else
     {
       XCharStruct *pcm;
-      XChar2b char2b;
       Lisp_Object val;
 
-      char2b.byte1 = 0x00, char2b.byte2 = 0x20;
-      pcm = xfont_get_pcm (xfont, &char2b);
+      pcm = xfont_get_pcm (xfont, 0x20);
       if (pcm)
        font->space_width = pcm->width;
       else
@@ -823,8 +817,8 @@ xfont_open (struct frame *f, Lisp_Object entity, int 
pixel_size)
            {
              int width = font->space_width, n = pcm != NULL;
 
-             for (char2b.byte2 = 33; char2b.byte2 <= 126; char2b.byte2++)
-               if ((pcm = xfont_get_pcm (xfont, &char2b)) != NULL)
+             for (unsigned char2b = 33; char2b <= 126; ++char2b)
+               if ((pcm = xfont_get_pcm (xfont, char2b)) != NULL)
                  width += pcm->width, n++;
              if (n > 0)
                font->average_width = width / n;
@@ -934,7 +928,6 @@ xfont_encode_char (struct font *font, int c)
   XFontStruct *xfont = ((struct xfont_info *) font)->xfont;
   struct charset *charset;
   unsigned code;
-  XChar2b char2b;
 
   charset = CHARSET_FROM_ID (font->encoding_charset);
   code = ENCODE_CHAR (charset, c);
@@ -946,13 +939,11 @@ xfont_encode_char (struct font *font, int c)
       return (ENCODE_CHAR (charset, c) != CHARSET_INVALID_CODE (charset)
              ? code : FONT_INVALID_CODE);
     }
-  char2b.byte1 = code >> 8;
-  char2b.byte2 = code & 0xFF;
-  return (xfont_get_pcm (xfont, &char2b) ? code : FONT_INVALID_CODE);
+  return (xfont_get_pcm (xfont, code) ? code : FONT_INVALID_CODE);
 }
 
 static void
-xfont_text_extents (struct font *font, unsigned int *code,
+xfont_text_extents (struct font *font, const unsigned int *code,
                    int nglyphs, struct font_metrics *metrics)
 {
   XFontStruct *xfont = ((struct xfont_info *) font)->xfont;
@@ -961,13 +952,11 @@ xfont_text_extents (struct font *font, unsigned int *code,
 
   for (i = 0, first = true; i < nglyphs; i++)
     {
-      XChar2b char2b;
       static XCharStruct *pcm;
 
       if (code[i] >= 0x10000)
        continue;
-      char2b.byte1 = code[i] >> 8, char2b.byte2 = code[i] & 0xFF;
-      pcm = xfont_get_pcm (xfont, &char2b);
+      pcm = xfont_get_pcm (xfont, code[i]);
       if (! pcm)
        continue;
       if (first)
@@ -1017,7 +1006,7 @@ xfont_draw (struct glyph_string *s, int from, int to, int 
x, int y,
       USE_SAFE_ALLOCA;
       char *str = SAFE_ALLOCA (len);
       for (i = 0; i < len ; i++)
-       str[i] = XCHAR2B_BYTE2 (s->char2b + from + i);
+       str[i] = s->char2b[from + i] & 0xFF;
       block_input ();
       if (with_background)
        {
@@ -1049,21 +1038,51 @@ xfont_draw (struct glyph_string *s, int from, int to, 
int x, int y,
     {
       if (s->padding_p)
        for (i = 0; i < len; i++)
-          XDrawImageString16 (display, FRAME_X_DRAWABLE (s->f),
-                             gc, x + i, y, s->char2b + from + i, 1);
+          {
+            const unsigned code = s->char2b[from + i];
+            const XChar2b char2b = { .byte1 = code >> 8,
+                                     .byte2 = code & 0xFF };
+            XDrawImageString16 (display, FRAME_X_DRAWABLE (s->f),
+                                gc, x + i, y, &char2b, 1);
+          }
       else
-        XDrawImageString16 (display, FRAME_X_DRAWABLE (s->f),
-                           gc, x, y, s->char2b + from, len);
+        {
+          USE_SAFE_ALLOCA;
+          const unsigned *code = s->char2b + from;
+          XChar2b *char2b;
+          SAFE_NALLOCA (char2b, 1, len);
+          for (int i = 0; i < len; ++i)
+            char2b[i] = (XChar2b) { .byte1 = code[i] >> 8,
+                                    .byte2 = code[i] & 0xFF };
+          XDrawImageString16 (display, FRAME_X_DRAWABLE (s->f),
+                              gc, x, y, char2b, len);
+          SAFE_FREE ();
+        }
     }
   else
     {
       if (s->padding_p)
        for (i = 0; i < len; i++)
-          XDrawString16 (display, FRAME_X_DRAWABLE (s->f),
-                        gc, x + i, y, s->char2b + from + i, 1);
+          {
+            const unsigned code = s->char2b[from + i];
+            const XChar2b char2b = { .byte1 = code >> 8,
+                                     .byte2 = code & 0xFF };
+            XDrawString16 (display, FRAME_X_DRAWABLE (s->f),
+                           gc, x + i, y, &char2b, 1);
+          }
       else
-        XDrawString16 (display, FRAME_X_DRAWABLE (s->f),
-                      gc, x, y, s->char2b + from, len);
+        {
+          USE_SAFE_ALLOCA;
+          const unsigned *code = s->char2b + from;
+          XChar2b *char2b;
+          SAFE_NALLOCA (char2b, 1, len);
+          for (int i = 0; i < len; ++i)
+            char2b[i] = (XChar2b) { .byte1 = code[i] >> 8,
+                                    .byte2 = code[i] & 0xFF };
+          XDrawString16 (display, FRAME_X_DRAWABLE (s->f),
+                         gc, x, y, char2b, len);
+          SAFE_FREE ();
+        }
     }
   unblock_input ();
 
diff --git a/src/xftfont.c b/src/xftfont.c
index 8a4516f..4f0a0d8 100644
--- a/src/xftfont.c
+++ b/src/xftfont.c
@@ -127,120 +127,18 @@ xftfont_match (struct frame *f, Lisp_Object spec)
 
 static FcChar8 ascii_printable[95];
 
-static void
-xftfont_fix_match (FcPattern *pat, FcPattern *match)
-{
-  /*  These values are not used for matching (except antialias), but for
-      rendering, so make sure they are carried over to the match.
-      We also put antialias here because most fonts are antialiased, so
-      the match will have antialias true.  */
-
-  FcBool b = FcTrue;
-  int i;
-  double dpi;
-
-  FcPatternGetBool (pat, FC_ANTIALIAS, 0, &b);
-  if (! b)
-    {
-      FcPatternDel (match, FC_ANTIALIAS);
-      FcPatternAddBool (match, FC_ANTIALIAS, FcFalse);
-    }
-  FcPatternGetBool (pat, FC_HINTING, 0, &b);
-  if (! b)
-    {
-      FcPatternDel (match, FC_HINTING);
-      FcPatternAddBool (match, FC_HINTING, FcFalse);
-    }
-#ifndef FC_HINT_STYLE
-# define FC_HINT_STYLE "hintstyle"
-#endif
-  if (FcResultMatch == FcPatternGetInteger (pat, FC_HINT_STYLE, 0, &i))
-    {
-      FcPatternDel (match, FC_HINT_STYLE);
-      FcPatternAddInteger (match, FC_HINT_STYLE, i);
-    }
-#ifndef FC_LCD_FILTER
-  /* Older fontconfig versions don't have FC_LCD_FILTER. */
-#define FC_LCD_FILTER "lcdfilter"
-#endif
-  if (FcResultMatch == FcPatternGetInteger (pat, FC_LCD_FILTER, 0, &i))
-    {
-      FcPatternDel (match, FC_LCD_FILTER);
-      FcPatternAddInteger (match, FC_LCD_FILTER, i);
-    }
-  if (FcResultMatch == FcPatternGetInteger (pat, FC_RGBA, 0, &i))
-    {
-      FcPatternDel (match, FC_RGBA);
-      FcPatternAddInteger (match, FC_RGBA, i);
-    }
-  if (FcResultMatch == FcPatternGetDouble (pat, FC_DPI, 0, &dpi))
-    {
-      FcPatternDel (match, FC_DPI);
-      FcPatternAddDouble (match, FC_DPI, dpi);
-    }
-}
-
-static void
-xftfont_add_rendering_parameters (FcPattern *pat, Lisp_Object entity)
-{
-  Lisp_Object tail;
-  int ival;
-
-  for (tail = AREF (entity, FONT_EXTRA_INDEX); CONSP (tail); tail = XCDR 
(tail))
-    {
-      Lisp_Object key = XCAR (XCAR (tail));
-      Lisp_Object val = XCDR (XCAR (tail));
-
-      if (EQ (key, QCantialias))
-          FcPatternAddBool (pat, FC_ANTIALIAS, NILP (val) ? FcFalse : FcTrue);
-      else if (EQ (key, QChinting))
-       FcPatternAddBool (pat, FC_HINTING, NILP (val) ? FcFalse : FcTrue);
-      else if (EQ (key, QCautohint))
-       FcPatternAddBool (pat, FC_AUTOHINT, NILP (val) ? FcFalse : FcTrue);
-      else if (EQ (key, QChintstyle))
-       {
-         if (FIXNUMP (val))
-           FcPatternAddInteger (pat, FC_HINT_STYLE, XFIXNUM (val));
-          else if (SYMBOLP (val)
-                   && FcNameConstant (SDATA (SYMBOL_NAME (val)), &ival))
-           FcPatternAddInteger (pat, FC_HINT_STYLE, ival);
-       }
-      else if (EQ (key, QCrgba))
-       {
-         if (FIXNUMP (val))
-           FcPatternAddInteger (pat, FC_RGBA, XFIXNUM (val));
-          else if (SYMBOLP (val)
-                   && FcNameConstant (SDATA (SYMBOL_NAME (val)), &ival))
-           FcPatternAddInteger (pat, FC_RGBA, ival);
-       }
-      else if (EQ (key, QClcdfilter))
-       {
-         if (FIXNUMP (val))
-           FcPatternAddInteger (pat, FC_LCD_FILTER, ival = XFIXNUM (val));
-          else if (SYMBOLP (val)
-                   && FcNameConstant (SDATA (SYMBOL_NAME (val)), &ival))
-           FcPatternAddInteger (pat, FC_LCD_FILTER, ival);
-       }
-#ifdef FC_EMBOLDEN
-      else if (EQ (key, QCembolden))
-       FcPatternAddBool (pat, FC_EMBOLDEN, NILP (val) ? FcFalse : FcTrue);
-#endif
-    }
-}
-
 static Lisp_Object
 xftfont_open (struct frame *f, Lisp_Object entity, int pixel_size)
 {
   FcResult result;
   Display *display = FRAME_X_DISPLAY (f);
-  Lisp_Object val, filename, idx, font_object;
+  Lisp_Object val, filename, font_object;
   FcPattern *pat = NULL, *match;
   struct font_info *xftfont_info = NULL;
   struct font *font;
   double size = 0;
   XftFont *xftfont = NULL;
   int spacing;
-  int i;
   XGlyphInfo extents;
   FT_Face ft_face;
   FcMatrix *matrix;
@@ -250,52 +148,17 @@ xftfont_open (struct frame *f, Lisp_Object entity, int 
pixel_size)
     return Qnil;
   val = XCDR (val);
   filename = XCAR (val);
-  idx = XCDR (val);
   size = XFIXNUM (AREF (entity, FONT_SIZE_INDEX));
   if (size == 0)
     size = pixel_size;
-  pat = FcPatternCreate ();
-  FcPatternAddInteger (pat, FC_WEIGHT, FONT_WEIGHT_NUMERIC (entity));
-  i = FONT_SLANT_NUMERIC (entity) - 100;
-  if (i < 0) i = 0;
-  FcPatternAddInteger (pat, FC_SLANT, i);
-  FcPatternAddInteger (pat, FC_WIDTH, FONT_WIDTH_NUMERIC (entity));
-  FcPatternAddDouble (pat, FC_PIXEL_SIZE, pixel_size);
-  val = AREF (entity, FONT_FAMILY_INDEX);
-  if (! NILP (val))
-    FcPatternAddString (pat, FC_FAMILY, (FcChar8 *) SDATA (SYMBOL_NAME (val)));
-  val = AREF (entity, FONT_FOUNDRY_INDEX);
-  if (! NILP (val))
-    FcPatternAddString (pat, FC_FOUNDRY, (FcChar8 *) SDATA (SYMBOL_NAME 
(val)));
-  val = AREF (entity, FONT_SPACING_INDEX);
-  if (! NILP (val))
-    FcPatternAddInteger (pat, FC_SPACING, XFIXNUM (val));
-  val = AREF (entity, FONT_DPI_INDEX);
-  if (! NILP (val))
-    {
-      double dbl = XFIXNUM (val);
-
-      FcPatternAddDouble (pat, FC_DPI, dbl);
-    }
-  val = AREF (entity, FONT_AVGWIDTH_INDEX);
-  if (FIXNUMP (val) && XFIXNUM (val) == 0)
-    FcPatternAddBool (pat, FC_SCALABLE, FcTrue);
-  /* This is necessary to identify the exact font (e.g. 10x20.pcf.gz
-     over 10x20-ISO8859-1.pcf.gz).  */
-  FcPatternAddCharSet (pat, FC_CHARSET, ftfont_get_fc_charset (entity));
-
-  xftfont_add_rendering_parameters (pat, entity);
-
-  FcPatternAddString (pat, FC_FILE, (FcChar8 *) SDATA (filename));
-  FcPatternAddInteger (pat, FC_INDEX, XFIXNUM (idx));
-
 
   block_input ();
 
+  pat = ftfont_entity_pattern (entity, pixel_size);
   /* Substitute in values from X resources and XftDefaultSet.  */
   XftDefaultSubstitute (display, FRAME_X_SCREEN_NUMBER (f), pat);
   match = XftFontMatch (display, FRAME_X_SCREEN_NUMBER (f), pat, &result);
-  xftfont_fix_match (pat, match);
+  ftfont_fix_match (pat, match);
 
   FcPatternDestroy (pat);
   xftfont = XftFontOpenPattern (display, match);
@@ -536,7 +399,7 @@ xftfont_encode_char (struct font *font, int c)
 }
 
 static void
-xftfont_text_extents (struct font *font, unsigned int *code,
+xftfont_text_extents (struct font *font, const unsigned int *code,
                      int nglyphs, struct font_metrics *metrics)
 {
   struct font_info *xftfont_info = (struct font_info *) font;
@@ -621,8 +484,7 @@ xftfont_draw (struct glyph_string *s, int from, int to, int 
x, int y,
     }
   code = alloca (sizeof (FT_UInt) * len);
   for (i = 0; i < len; i++)
-    code[i] = ((XCHAR2B_BYTE1 (s->char2b + from + i) << 8)
-              | XCHAR2B_BYTE2 (s->char2b + from + i));
+    code[i] = s->char2b[from + i];
 
   if (s->padding_p)
     for (i = 0; i < len; i++)
@@ -696,7 +558,7 @@ xftfont_cached_font_ok (struct frame *f, Lisp_Object 
font_object,
   bool ok = false;
   int i1, i2, r1, r2;
 
-  xftfont_add_rendering_parameters (pat, entity);
+  ftfont_add_rendering_parameters (pat, entity);
   XftDefaultSubstitute (display, FRAME_X_SCREEN_NUMBER (f), pat);
 
   r1 = FcPatternGetBool (pat, FC_ANTIALIAS, 0, &b1);
@@ -769,12 +631,6 @@ void
 syms_of_xftfont (void)
 {
   DEFSYM (Qxft, "xft");
-  DEFSYM (QChinting, ":hinting");
-  DEFSYM (QCautohint, ":autohint");
-  DEFSYM (QChintstyle, ":hintstyle");
-  DEFSYM (QCrgba, ":rgba");
-  DEFSYM (QCembolden, ":embolden");
-  DEFSYM (QClcdfilter, ":lcdfilter");
 
   DEFVAR_BOOL ("xft-font-ascent-descent-override",
               xft_font_ascent_descent_override,
diff --git a/src/xterm.c b/src/xterm.c
index 4f4a1d6..559d1b4 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -1599,13 +1599,8 @@ x_compute_glyph_string_overhangs (struct glyph_string *s)
 
       if (s->first_glyph->type == CHAR_GLYPH)
        {
-         unsigned *code = alloca (sizeof (unsigned) * s->nchars);
          struct font *font = s->font;
-         int i;
-
-         for (i = 0; i < s->nchars; i++)
-           code[i] = (s->char2b[i].byte1 << 8) | s->char2b[i].byte2;
-         font->driver->text_extents (font, code, s->nchars, &metrics);
+         font->driver->text_extents (font, s->char2b, s->nchars, &metrics);
        }
       else
        {
@@ -1831,7 +1826,7 @@ static void
 x_draw_glyphless_glyph_string_foreground (struct glyph_string *s)
 {
   struct glyph *glyph = s->first_glyph;
-  XChar2b char2b[8];
+  unsigned char2b[8];
   int x, i, j;
 
   /* If first glyph of S has a left box line, start drawing the text
@@ -1882,14 +1877,10 @@ x_draw_glyphless_glyph_string_foreground (struct 
glyph_string *s)
       if (str)
        {
          int upper_len = (len + 1) / 2;
-         unsigned code;
 
          /* It is assured that all LEN characters in STR is ASCII.  */
          for (j = 0; j < len; j++)
-           {
-             code = s->font->driver->encode_char (s->font, str[j]);
-             STORE_XCHAR2B (char2b + j, code >> 8, code & 0xFF);
-           }
+            char2b[j] = s->font->driver->encode_char (s->font, str[j]) & 
0xFFFF;
          s->font->driver->draw (s, 0, upper_len,
                                 x + glyph->slice.glyphless.upper_xoff,
                                 s->ybase + glyph->slice.glyphless.upper_yoff,
@@ -8200,7 +8191,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
              fit in 81 bytes.  So, we must prepare sufficient
              bytes for copy_buffer.  513 bytes (256 chars for
              two-byte character set) seems to be a fairly good
-             approximation.  -- 2000.8.10 address@hidden  */
+             approximation.  -- 2000.8.10 address@hidden  */
           unsigned char copy_buffer[513];
           unsigned char *copy_bufptr = copy_buffer;
           int copy_bufsiz = sizeof (copy_buffer);
@@ -9356,7 +9347,7 @@ x_draw_bar_cursor (struct window *w, struct glyph_row 
*row, int width, enum text
 /* RIF: Define cursor CURSOR on frame F.  */
 
 static void
-x_define_frame_cursor (struct frame *f, Cursor cursor)
+x_define_frame_cursor (struct frame *f, Emacs_Cursor cursor)
 {
   if (!f->pointer_invisible
       && f->output_data.x->current_cursor != cursor)
@@ -12161,7 +12152,7 @@ x_check_font (struct frame *f, struct font *font)
  ***********************************************************************/
 
 static void
-x_free_pixmap (struct frame *f, Pixmap pixmap)
+x_free_pixmap (struct frame *f, Emacs_Pixmap pixmap)
 {
   XFreePixmap (FRAME_X_DISPLAY (f), pixmap);
 }
diff --git a/src/xterm.h b/src/xterm.h
index 84030d5..ce1443c 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -731,8 +731,6 @@ struct x_output
 #endif
 };
 
-#define No_Cursor (None)
-
 enum
 {
   /* Values for focus_state, used as bit mask.
@@ -1224,7 +1222,8 @@ extern void destroy_frame_xic (struct frame *);
 extern void xic_set_preeditarea (struct window *, int, int);
 extern void xic_set_statusarea (struct frame *);
 extern void xic_set_xfontset (struct frame *, const char *);
-extern bool x_defined_color (struct frame *, const char *, XColor *, bool, 
bool);
+extern bool x_defined_color (struct frame *, const char *, Emacs_Color *,
+                             bool, bool);
 #ifdef HAVE_X_I18N
 extern void free_frame_xic (struct frame *);
 # if defined HAVE_X_WINDOWS && defined USE_X_TOOLKIT
@@ -1263,15 +1262,6 @@ extern void x_session_close (void);
 
 #define FRAME_X_EMBEDDED_P(f) (FRAME_X_OUTPUT(f)->explicit_parent != 0)
 
-#define STORE_XCHAR2B(chp, b1, b2) \
-  ((chp)->byte1 = (b1), (chp)->byte2 = (b2))
-
-#define XCHAR2B_BYTE1(chp) \
-  ((chp)->byte1)
-
-#define XCHAR2B_BYTE2(chp) \
-  ((chp)->byte2)
-
 #define STORE_NATIVE_RECT(nr,rx,ry,rwidth,rheight)     \
   ((nr).x = (rx),                                      \
    (nr).y = (ry),                                      \
diff --git a/test/lisp/autorevert-tests.el b/test/lisp/autorevert-tests.el
index 0cc5b9c..5024a2d 100644
--- a/test/lisp/autorevert-tests.el
+++ b/test/lisp/autorevert-tests.el
@@ -1,4 +1,4 @@
-;;; auto-revert-tests.el --- Tests of auto-revert
+;;; auto-revert-tests.el --- Tests of auto-revert   -*- lexical-binding: t -*-
 
 ;; Copyright (C) 2015-2019 Free Software Foundation, Inc.
 
@@ -150,7 +150,7 @@ This expects `auto-revert--messages' to be bound by
        (tramp-dissect-file-name temporary-file-directory) nil 'keep-password)
        (condition-case err
            (funcall (ert-test-body ert-test))
-         (error (message "%s" err) (signal car err cdr err))))))
+         (error (message "%s" err) (signal (car err) (cdr err)))))))
 
 (ert-deftest auto-revert-test00-auto-revert-mode ()
   "Check autorevert for a file."
@@ -310,8 +310,9 @@ This expects `auto-revert--messages' to be bound by
             ;; notification should be disabled, falling back to
             ;; polling.
             (should (string-match "any text" (buffer-string)))
-            ;; With w32notify, the 'stopped' events are not sent.
+            ;; With w32notify, and on emba, the `stopped' events are not sent.
             (or (eq file-notify--library 'w32notify)
+                (getenv "EMACS_EMBA_CI")
                 (should-not auto-revert-notify-watch-descriptor))
 
             ;; Once the file has been recreated, the buffer shall be
@@ -435,6 +436,111 @@ This expects `auto-revert--messages' to be bound by
 (auto-revert--deftest-remote auto-revert-test04-auto-revert-mode-dired
   "Check remote autorevert for dired.")
 
+(defun auto-revert-test--write-file (string file)
+  "Write STRING to FILE."
+  (write-region string nil file nil 'no-message))
+
+(defun auto-revert-test--buffer-string (buffer)
+  "Contents of BUFFER as a string."
+  (with-current-buffer buffer
+    (buffer-string)))
+
+(defun auto-revert-test--wait-for (pred max-wait)
+  "Wait until PRED is true, or MAX-WAIT seconds elapsed."
+  (let ((ct (current-time)))
+    (while (and (< (float-time (time-subtract (current-time) ct)) max-wait)
+                (not (funcall pred)))
+      (read-event nil nil 0.1))))
+
+(defun auto-revert-test--wait-for-buffer-text (buffer string max-wait)
+  "Wait until BUFFER has the contents STRING, or MAX-WAIT seconds elapsed."
+  (auto-revert-test--wait-for
+   (lambda () (string-equal (auto-revert-test--buffer-string buffer) string))
+   max-wait))
+
+(ert-deftest auto-revert-test05-global-notify ()
+  "Test `global-auto-revert-mode' without polling."
+  :tags '(:expensive-test)
+  (skip-unless (or file-notify--library
+                   (file-remote-p temporary-file-directory)))
+  (let* ((auto-revert-use-notify t)
+         (auto-revert-avoid-polling t)
+         (was-in-global-auto-revert-mode global-auto-revert-mode)
+         (file-1 (make-temp-file "global-auto-revert-test-1"))
+         (file-2 (make-temp-file "global-auto-revert-test-2"))
+         (file-3 (make-temp-file "global-auto-revert-test-3"))
+         (file-2b (concat file-2 "-b"))
+         buf-1 buf-2 buf-3)
+    (unwind-protect
+        (progn
+          (setq buf-1 (find-file-noselect file-1))
+          (setq buf-2 (find-file-noselect file-2))
+          (auto-revert-test--write-file "1-a" file-1)
+          (should (equal (auto-revert-test--buffer-string buf-1) ""))
+
+          (global-auto-revert-mode 1)   ; Turn it on.
+
+          (should (buffer-local-value
+                   'auto-revert-notify-watch-descriptor buf-1))
+          (should (buffer-local-value
+                   'auto-revert-notify-watch-descriptor buf-2))
+
+          ;; buf-1 should have been reverted immediately when the mode
+          ;; was enabled.
+          (should (equal (auto-revert-test--buffer-string buf-1) "1-a"))
+
+          ;; Alter a file.
+          (auto-revert-test--write-file "2-a" file-2)
+          ;; Allow for some time to handle notification events.
+          (auto-revert-test--wait-for-buffer-text buf-2 "2-a" 1)
+          (should (equal (auto-revert-test--buffer-string buf-2) "2-a"))
+
+          ;; Visit a file, and modify it on disk.
+          (setq buf-3 (find-file-noselect file-3))
+          ;; Newly opened buffers won't be use notification until the
+          ;; first poll cycle; wait for it.
+          (auto-revert-test--wait-for
+           (lambda () (buffer-local-value
+                       'auto-revert-notify-watch-descriptor buf-3))
+           (+ auto-revert-interval 1))
+          (should (buffer-local-value
+                   'auto-revert-notify-watch-descriptor buf-3))
+          (auto-revert-test--write-file "3-a" file-3)
+          (auto-revert-test--wait-for-buffer-text buf-3 "3-a" 1)
+          (should (equal (auto-revert-test--buffer-string buf-3) "3-a"))
+
+          ;; Delete a visited file, and re-create it with new contents.
+          (delete-file file-1)
+          (sleep-for 0.5)
+          (should (equal (auto-revert-test--buffer-string buf-1) "1-a"))
+          (auto-revert-test--write-file "1-b" file-1)
+          (auto-revert-test--wait-for-buffer-text buf-1 "1-b"
+           (+ auto-revert-interval 1))
+          (should (buffer-local-value
+                   'auto-revert-notify-watch-descriptor buf-1))
+
+          ;; Write a buffer to a new file, then modify the new file on disk.
+          (with-current-buffer buf-2
+            (write-file file-2b))
+          (should (equal (auto-revert-test--buffer-string buf-2) "2-a"))
+          (auto-revert-test--write-file "2-b" file-2b)
+          (auto-revert-test--wait-for-buffer-text buf-2 "2-b"
+           (+ auto-revert-interval 1))
+          (should (buffer-local-value
+                   'auto-revert-notify-watch-descriptor buf-2)))
+
+      ;; Clean up.
+      (unless was-in-global-auto-revert-mode
+        (global-auto-revert-mode 0))    ; Turn it off.
+      (dolist (buf (list buf-1 buf-2 buf-3))
+        (ignore-errors (kill-buffer buf)))
+      (dolist (file (list file-1 file-2 file-2b file-3))
+        (ignore-errors (delete-file file)))
+      )))
+
+(auto-revert--deftest-remote auto-revert-test04-auto-revert-mode-dired
+  "Test `global-auto-revert-mode' without polling for remote buffers.")
+
 (defun auto-revert-test-all (&optional interactive)
   "Run all tests for \\[auto-revert]."
   (interactive "p")
diff --git a/test/lisp/delim-col-tests.el b/test/lisp/delim-col-tests.el
new file mode 100644
index 0000000..f2a0377
--- /dev/null
+++ b/test/lisp/delim-col-tests.el
@@ -0,0 +1,181 @@
+;;; delim-col-tests.el --- Tests for delim-col.el  -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2019 Free Software Foundation, Inc.
+
+;; Author: Stefan Kangas <address@hidden>
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;;; Code:
+
+(require 'ert)
+(require 'delim-col)
+
+(ert-deftest delim-col-tests-delimit-columns ()
+  (with-temp-buffer
+    (insert "a b       c\n")
+    (delimit-columns-region (point-min) (point-max))
+    (should (equal (buffer-string) "a, b, c\n")))
+  (with-temp-buffer
+    (insert "a b       c       d\n"
+            "aaaa      bb      ccc     ddddd\n"
+            "aaa       bbb     cccc    dddd\n"
+            "aa        bb      ccccccc ddd\n")
+    (delimit-columns-region (point-min) (point-max))
+    (should (equal (buffer-string)
+                   (concat "a,    b,   c,       d    \n"
+                           "aaaa, bb,  ccc,     ddddd\n"
+                           "aaa,  bbb, cccc,    dddd \n"
+                           "aa,   bb,  ccccccc, ddd  \n")))))
+
+(ert-deftest delim-col-tests-delimit-rectangle ()
+  (with-temp-buffer
+    (insert "a b       c       d\n"
+            "aaaa      bb      ccc     ddddd\n"
+            "aaa       bbb     cccc    dddd\n"
+            "aa        bb      ccccccc ddd\n")
+    (delimit-columns-rectangle 3 58) ; from first b to last c
+    (should (equal (buffer-string)
+                   (concat "a  b,   c          d\n"
+                           "aaaa       bb,  ccc        ddddd\n"
+                           "aaa        bbb, cccc       dddd\n"
+                           "aa bb,  ccccccc    ddd\n")))))
+
+(ert-deftest delim-col-tests-delimit-columns-str-separator ()
+  (let ((delimit-columns-str-separator ":"))
+    (with-temp-buffer
+      (insert "a       b\n")
+      (delimit-columns-region (point-min) (point-max))
+      (should (equal (buffer-string) "a:b\n")))
+    (with-temp-buffer
+      (insert "a       b       c       d\n"
+              "aa      bb      cc      dd\n")
+      (delimit-columns-rectangle 3 16) ; from first b to last c
+      (should (equal (buffer-string)
+                     (concat "a        b: c    d\n"
+                             "aa       bb:cc   dd\n"))))))
+
+(ert-deftest delim-col-tests-delimit-columns-str-before-after ()
+  (let ((delimit-columns-str-before "[ ")
+        (delimit-columns-str-after " ]"))
+    (with-temp-buffer
+      (insert "a       b       c\n")
+      (delimit-columns-region (point-min) (point-max))
+      (should (equal (buffer-string) "[ a, b, c ]\n")))
+    (with-temp-buffer
+      (insert "a       b       c       d\n"
+              "aaaa    bb      ccc     ddddd\n"
+              "aaa     bbb     cccc    dddd\n"
+              "aa      bb      ccccccc ddd\n")
+      (delimit-columns-region (point-min) (point-max))
+      (should (equal (buffer-string)
+                     (concat "[ a,    b,   c,       d     ]\n"
+                             "[ aaaa, bb,  ccc,     ddddd ]\n"
+                             "[ aaa,  bbb, cccc,    dddd  ]\n"
+                             "[ aa,   bb,  ccccccc, ddd   ]\n"))))
+    (with-temp-buffer
+      (insert "a       b       c       d\n"
+              "aaaa    bb      ccc     ddddd\n"
+              "aaa     bbb     cccc    dddd\n"
+              "aa      bb      ccccccc ddd\n")
+     (delimit-columns-rectangle 3 58)   ; from first b to last c
+     (should (equal (buffer-string)
+                    (concat "a [ b,   c       ]        d\n"
+                            "aaaa      [ bb,  ccc     ]        ddddd\n"
+                            "aaa       [ bbb, cccc    ]        dddd\n"
+                            "aa        [ bb,  ccccccc ]        ddd\n"))))))
+
+(ert-deftest delim-col-tests-delimit-colummns-before-after ()
+  (let ((delimit-columns-before "<")
+        (delimit-columns-after ">"))
+    (with-temp-buffer
+      (insert "a       b\n")
+      (delimit-columns-region (point-min) (point-max))
+      (should (equal (buffer-string) "<a>, <b>\n")))
+    (with-temp-buffer
+      (insert "a       b       c       d\n"
+              "aa      bb      cc      dd\n")
+      (delimit-columns-rectangle 3 17)
+      (should (equal (buffer-string)
+                     (concat "a        <b>,  <c>       d\n"
+                             "aa       <bb>, <cc>      dd\n"))))))
+
+(ert-deftest delim-col-tests-delimit-columns-separator ()
+  (let ((delimit-columns-separator ","))
+    (with-temp-buffer
+      (insert "a,b,c\n")
+      (delimit-columns-region (point-min) (point-max))
+      (should (equal (buffer-string) "a, b, c\n")))))
+
+(ert-deftest delim-col-tests-delimit-columns-format/nil ()
+  (let ((delimit-columns-format nil))
+    (with-temp-buffer
+      (insert "a       b\n"
+              "aa      bb\n")
+      (delimit-columns-region (point-min) (point-max))
+      (should (equal (buffer-string)
+                     (concat "a, b\n"
+                             "aa, bb\n"))))
+    (with-temp-buffer
+      (insert "a       b       c       d\n"
+              "aa      bb      cc      dd\n")
+      (delimit-columns-rectangle 3 17) ; from first b to last c
+      (should (equal (buffer-string)
+                     (concat "a        b, c    d\n"
+                             "aa       bb, cc  dd\n"))))))
+
+(ert-deftest delim-col-tests-delimit-columns-format/separator ()
+  (let ((delimit-columns-format 'separator)
+        (delimit-columns-before "<")
+        (delimit-columns-after ">"))
+    (with-temp-buffer
+      (insert "a       b\n"
+              "aa      bb\n")
+      (delimit-columns-region (point-min) (point-max))
+      (should (equal (buffer-string)
+                     (concat "<a> , <b> \n"
+                             "<aa>, <bb>\n"))))
+    (with-temp-buffer
+      (insert "a       b       c       d\n"
+              "aa      bb      cc      dd\n")
+      (delimit-columns-rectangle 3 17) ; from first b to last c
+      (should (equal (buffer-string)
+                     (concat "a        <b> , <c>       d\n"
+                             "aa       <bb>, <cc>      dd\n"))))))
+
+(ert-deftest delim-col-tests-delimit-columns-format/padding ()
+  (let ((delimit-columns-format 'padding)
+        (delimit-columns-before "<")
+        (delimit-columns-after ">"))
+    (with-temp-buffer
+      (insert "a       b\n"
+              "aa      bb\n")
+      (delimit-columns-region (point-min) (point-max))
+      (should (equal (buffer-string)
+                     (concat "<a >, <b >\n"
+                             "<aa>, <bb>\n"))))
+    (with-temp-buffer
+      (insert "a       b       c       d\n"
+              "aa      bb      cc      dd\n")
+      (delimit-columns-rectangle 3 17)  ; from first b to last c
+      (should (equal (buffer-string)
+                     (concat "a        <b >, <c >      d\n"
+                             "aa       <bb>, <cc>      dd\n"))))))
+
+(provide 'delim-col-tests)
+;;; delim-col-tests.el ends here
diff --git a/test/lisp/emacs-lisp/map-tests.el 
b/test/lisp/emacs-lisp/map-tests.el
index a54af80..5e044d4 100644
--- a/test/lisp/emacs-lisp/map-tests.el
+++ b/test/lisp/emacs-lisp/map-tests.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2015-2019 Free Software Foundation, Inc.
 
 ;; Author: Nicolas Petton <address@hidden>
-;; Maintainer: address@hidden
 
 ;; This file is part of GNU Emacs.
 
diff --git a/test/lisp/emacs-lisp/rx-tests.el b/test/lisp/emacs-lisp/rx-tests.el
index 4a5919e..6f392d6 100644
--- a/test/lisp/emacs-lisp/rx-tests.el
+++ b/test/lisp/emacs-lisp/rx-tests.el
@@ -107,7 +107,13 @@
                    "ab"))
     (should (equal (and (string-match (rx (or "a" "ab" "abc")) s)
                         (match-string 0 s))
-                   "a"))))
+                   "a")))
+  ;; Test zero-argument `or'.
+  (should (equal (rx (or)) regexp-unmatchable)))
+
+(ert-deftest rx-seq ()
+  ;; Test zero-argument `seq'.
+  (should (equal (rx (seq)) "")))
 
 (provide 'rx-tests)
 ;; rx-tests.el ends here.
diff --git a/test/lisp/emacs-lisp/seq-tests.el 
b/test/lisp/emacs-lisp/seq-tests.el
index ef05e2b..8f66ba4 100644
--- a/test/lisp/emacs-lisp/seq-tests.el
+++ b/test/lisp/emacs-lisp/seq-tests.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2014-2019 Free Software Foundation, Inc.
 
 ;; Author: Nicolas Petton <address@hidden>
-;; Maintainer: address@hidden
 
 ;; This file is part of GNU Emacs.
 
diff --git a/test/lisp/emacs-lisp/thunk-tests.el 
b/test/lisp/emacs-lisp/thunk-tests.el
index caa2c41..69bfc19 100644
--- a/test/lisp/emacs-lisp/thunk-tests.el
+++ b/test/lisp/emacs-lisp/thunk-tests.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2015-2019 Free Software Foundation, Inc.
 
 ;; Author: Nicolas Petton <address@hidden>
-;; Maintainer: address@hidden
 
 ;; This file is part of GNU Emacs.
 
diff --git a/test/lisp/help-fns-tests.el b/test/lisp/help-fns-tests.el
index e31ac6a..2e94830 100644
--- a/test/lisp/help-fns-tests.el
+++ b/test/lisp/help-fns-tests.el
@@ -2,8 +2,6 @@
 
 ;; Copyright (C) 2014-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
-
 ;; This file is part of GNU Emacs.
 
 ;; GNU Emacs is free software: you can redistribute it and/or modify
diff --git a/test/lisp/md4-tests.el b/test/lisp/md4-tests.el
index 9712411..56b09c1 100644
--- a/test/lisp/md4-tests.el
+++ b/test/lisp/md4-tests.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2017-2019 Free Software Foundation, Inc.
 
 ;; Author: Mark Oteiza <address@hidden>
-;; Maintainer: address@hidden
 
 ;; This file is part of GNU Emacs.
 
diff --git a/test/lisp/org/org-tests.el b/test/lisp/org/org-tests.el
index 4b82aa8..33f9e45 100644
--- a/test/lisp/org/org-tests.el
+++ b/test/lisp/org/org-tests.el
@@ -2,8 +2,6 @@
 
 ;; Copyright (C) 2018-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
-
 ;; This file is part of GNU Emacs.
 
 ;; GNU Emacs is free software: you can redistribute it and/or modify
diff --git a/test/lisp/soundex-tests.el b/test/lisp/soundex-tests.el
index d8d79b8..4de45f9 100644
--- a/test/lisp/soundex-tests.el
+++ b/test/lisp/soundex-tests.el
@@ -2,8 +2,6 @@
 
 ;; Copyright (C) 2017-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
-
 ;; This file is part of GNU Emacs.
 
 ;; GNU Emacs is free software: you can redistribute it and/or modify
diff --git a/test/lisp/tempo-tests.el b/test/lisp/tempo-tests.el
new file mode 100644
index 0000000..6e610ff
--- /dev/null
+++ b/test/lisp/tempo-tests.el
@@ -0,0 +1,228 @@
+;;; tempo-tests.el --- Test suite for tempo.el  -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2019 Free Software Foundation, Inc.
+
+;; Author: Federico Tedin <address@hidden>
+;; Keywords: abbrev
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
+
+;;; Code:
+
+(require 'tempo)
+(eval-when-compile (require 'cl-lib))
+
+(ert-deftest tempo-string-element-test ()
+  "Test a template containing a string element."
+  (with-temp-buffer
+    (tempo-define-template "test" '("GNU Emacs Tempo test"))
+    (tempo-insert-template 'tempo-template-test nil)
+    (should (equal (buffer-string) "GNU Emacs Tempo test"))))
+
+(ert-deftest tempo-p-bare-element-test ()
+  "Test a template containing a bare `p' element."
+  (with-temp-buffer
+    (tempo-define-template "test" '("abcde" p))
+    (tempo-insert-template 'tempo-template-test nil)
+    (tempo-forward-mark)
+    (should (equal (point) 6))))
+
+(ert-deftest tempo-r-bare-element-test ()
+  "Test a template containing a bare `r' element."
+  (with-temp-buffer
+    (tempo-define-template "test" '("abcde" r "ghijk"))
+    (insert "F")
+    (set-mark (point))
+    (goto-char (point-min))
+    (tempo-insert-template 'tempo-template-test t)
+    (should (equal (buffer-string) "abcdeFghijk"))))
+
+(ert-deftest tempo-p-element-test ()
+  "Testing template containing a `p' (prompt) element."
+  (with-temp-buffer
+    (tempo-define-template "test" '("hello " (p ">")))
+    (let ((tempo-interactive t))
+      (cl-letf (((symbol-function 'read-string) (lambda (&rest _) "world")))
+        (tempo-insert-template 'tempo-template-test nil))
+      (should (equal (buffer-string) "hello world")))))
+
+(ert-deftest tempo-P-element-test ()
+  "Testing template containing a `P' (prompt) element."
+  (with-temp-buffer
+    (tempo-define-template "test" '("hello " (P ">")))
+    ;; By default, `tempo-interactive' is nil, `P' should ignore this.
+    (cl-letf (((symbol-function 'read-string) (lambda (&rest _) "world")))
+      (tempo-insert-template 'tempo-template-test nil))
+    (should (equal (buffer-string) "hello world"))))
+
+(ert-deftest tempo-r-element-test ()
+  "Testing template containing an `r' (with prompt) element."
+  (with-temp-buffer
+    (tempo-define-template "test" '("abcde" (r ">") "ghijk"))
+    (let ((tempo-interactive t))
+      (cl-letf (((symbol-function 'read-string) (lambda (&rest _) "F")))
+        (tempo-insert-template 'tempo-template-test nil))
+      (should (equal (buffer-string) "abcdeFghijk")))))
+
+(ert-deftest tempo-s-element-test ()
+  "Testing template containing an `s' element."
+  (with-temp-buffer
+    (tempo-define-template "test" '("hello " (p ">" P1) " " (s P1)))
+    (let ((tempo-interactive t))
+      (cl-letf (((symbol-function 'read-string) (lambda (&rest _) "world!")))
+        (tempo-insert-template 'tempo-template-test nil))
+      (should (equal (buffer-string) "hello world! world!")))))
+
+(ert-deftest tempo-&-element-test ()
+  "Testing template containing an `&' element."
+  (tempo-define-template "test" '(& "test"))
+  (with-temp-buffer
+    (insert "  ")
+    (tempo-insert-template 'tempo-template-test nil)
+    (should (equal (buffer-string) "  test")))
+  (with-temp-buffer
+    (insert "hello")
+    (tempo-insert-template 'tempo-template-test nil)
+    (should (equal (buffer-string) "hello\ntest"))))
+
+(ert-deftest tempo-%-element-test ()
+  "Testing template containing an `%' element."
+  (tempo-define-template "test" '("test" %))
+  (with-temp-buffer
+    (tempo-insert-template 'tempo-template-test nil)
+    (should (equal (buffer-string) "test")))
+  (with-temp-buffer
+    (insert "hello")
+    (goto-char (point-min))
+    (tempo-insert-template 'tempo-template-test nil)
+    (should (equal (buffer-string) "test\nhello"))))
+
+(ert-deftest tempo-n-element-test ()
+  "Testing template containing an `n' element."
+  (tempo-define-template "test" '("test" n "test"))
+  (with-temp-buffer
+    (tempo-insert-template 'tempo-template-test nil)
+    (should (equal (buffer-string) "test\ntest"))))
+
+(ert-deftest tempo-n>-element-test ()
+  "Testing template containing an `n>' element."
+  (tempo-define-template "test" '("(progn" n> "(list 1 2 3))"))
+  (with-temp-buffer
+    (emacs-lisp-mode)
+    (tempo-insert-template 'tempo-template-test nil)
+    ;; Tempo should have inserted two spaces before (list 1 2 3)
+    (should (equal (buffer-string) "(progn\n  (list 1 2 3))"))))
+
+(ert-deftest tempo->-element-test ()
+  "Testing template containing a `>' element."
+  (with-temp-buffer
+    (emacs-lisp-mode)
+    (insert "(progn\n)")
+    (backward-char)
+    (tempo-define-template "test" '("(list 1 2 3)" >))
+    (tempo-insert-template 'tempo-template-test nil)
+    ;; Tempo should have inserted two spaces before (list 1 2 3)
+    (should (equal (buffer-string) "(progn\n  (list 1 2 3))"))))
+
+(ert-deftest tempo-r>-bare-element-test ()
+  "Testing template containing a bare `r>' element."
+  (with-temp-buffer
+    (tempo-define-template "test" '("(progn" n r> ")"))
+    (emacs-lisp-mode)
+    (insert "(list 1 2 3)")
+    (set-mark (point))
+    (goto-char (point-min))
+    (tempo-insert-template 'tempo-template-test t)
+    ;; Tempo should have inserted two spaces before (list 1 2 3)
+    (should (equal (buffer-string) "(progn\n  (list 1 2 3))"))))
+
+(ert-deftest tempo-r>-element-test ()
+  "Testing template containing an `r>' (with prompt) element."
+  (tempo-define-template "test" '("(progn" n (r> ":") ")"))
+  (with-temp-buffer
+    ;; Test on-region use
+    (emacs-lisp-mode)
+    (insert "(list 1 2 3)")
+    (set-mark (point))
+    (goto-char (point-min))
+    (tempo-insert-template 'tempo-template-test t)
+    (should (equal (buffer-string) "(progn\n  (list 1 2 3))")))
+  (with-temp-buffer
+    ;; Test interactive use
+    (emacs-lisp-mode)
+    (let ((tempo-interactive t))
+      (cl-letf (((symbol-function 'read-string) (lambda (&rest _) "  (list 1 2 
3)")))
+        (tempo-insert-template 'tempo-template-test nil))
+      (should (equal (buffer-string) "(progn\n  (list 1 2 3))")))))
+
+(ert-deftest tempo-o-element-test ()
+  "Testing template containing an `o' element."
+  (with-temp-buffer
+    (tempo-define-template "test" '("test" o))
+    (insert "hello")
+    (goto-char (point-min))
+    (tempo-insert-template 'tempo-template-test nil)
+    (should (equal (buffer-string) "test\nhello"))
+    (should (equal (point) 5))))
+
+(ert-deftest tempo-nil-element-test ()
+  "Testing template with nil elements."
+  (with-temp-buffer
+    (tempo-define-template "test" '("Hello," nil " World!"))
+    (tempo-insert-template 'tempo-template-test nil)
+    (should (equal (buffer-string) "Hello, World!"))))
+
+(ert-deftest tempo-eval-element-test ()
+  "Testing template with Emacs Lisp expressions."
+  (with-temp-buffer
+    (tempo-define-template "test" '((int-to-string (+ 1 1)) "=" (concat "1" 
"+1")))
+    (tempo-insert-template 'tempo-template-test nil)
+    (should (equal (buffer-string) "2=1+1"))))
+
+(ert-deftest tempo-l-element-test ()
+  "Testing template containing an `l' element."
+  (with-temp-buffer
+    (tempo-define-template "test" '("list: " (l "1, " "2, " (int-to-string (+ 
1 2)))))
+    (tempo-insert-template 'tempo-template-test nil)
+    (should (equal (buffer-string) "list: 1, 2, 3"))))
+
+(ert-deftest tempo-tempo-user-elements-test ()
+  "Testing a template with elements for `tempo-user-elements'."
+  (with-temp-buffer
+    (make-local-variable 'tempo-user-elements)
+    (add-to-list 'tempo-user-elements (lambda (x) (int-to-string (* x x))))
+    (tempo-define-template "test" '(1 " " 2 " " 3 " " 4))
+    (tempo-insert-template 'tempo-template-test nil)
+    (should (equal (buffer-string) "1 4 9 16"))))
+
+(ert-deftest tempo-expand-tag-test ()
+  "Testing expansion of a template with a tag."
+  (with-temp-buffer
+    (tempo-define-template "test" '("Hello, World!") "hello")
+    (insert "hello")
+    (tempo-complete-tag)
+    (should (equal (buffer-string) "Hello, World!"))))
+
+(ert-deftest tempo-expand-partial-tag-test ()
+  "Testing expansion of a template with a tag, with a partial match."
+  (with-temp-buffer
+    (tempo-define-template "test" '("Hello, World!") "hello")
+    (insert "hel")
+    (tempo-complete-tag)
+    (should (equal (buffer-string) "Hello, World!"))))
+
+(provide 'tempo-tests)
+;;; tempo-tests.el ends here
diff --git a/test/lisp/textmodes/sgml-mode-tests.el 
b/test/lisp/textmodes/sgml-mode-tests.el
index a900e8d..1b8965e 100644
--- a/test/lisp/textmodes/sgml-mode-tests.el
+++ b/test/lisp/textmodes/sgml-mode-tests.el
@@ -165,6 +165,10 @@ The point is set to the beginning of the buffer."
     (sgml-mode)
     (insert "a\"b <tag>c'd</tag>")
     (should (= 1 (car (syntax-ppss (1- (point-max))))))
+    (should (= 0 (car (syntax-ppss (point-max)))))
+    (erase-buffer)
+    (insert "<tag>c>d</tag>")
+    (should (= 1 (car (syntax-ppss (1- (point-max))))))
     (should (= 0 (car (syntax-ppss (point-max)))))))
 
 (provide 'sgml-mode-tests)
diff --git a/test/lisp/vc/diff-mode-tests.el b/test/lisp/vc/diff-mode-tests.el
index 676d461..d809b64 100644
--- a/test/lisp/vc/diff-mode-tests.el
+++ b/test/lisp/vc/diff-mode-tests.el
@@ -1,7 +1,6 @@
 ;; Copyright (C) 2017-2019 Free Software Foundation, Inc.
 
 ;; Author: Dima Kogan <address@hidden>
-;; Maintainer: address@hidden
 
 ;; This file is part of GNU Emacs.
 
diff --git a/test/lisp/vc/smerge-mode-tests.el 
b/test/lisp/vc/smerge-mode-tests.el
index 032afa9..67f6468 100644
--- a/test/lisp/vc/smerge-mode-tests.el
+++ b/test/lisp/vc/smerge-mode-tests.el
@@ -1,7 +1,5 @@
 ;; Copyright (C) 2017-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
-
 ;; This file is part of GNU Emacs.
 
 ;; GNU Emacs is free software: you can redistribute it and/or modify
diff --git a/test/lisp/vc/vc-bzr-tests.el b/test/lisp/vc/vc-bzr-tests.el
index 8fa16cd..04c869e 100644
--- a/test/lisp/vc/vc-bzr-tests.el
+++ b/test/lisp/vc/vc-bzr-tests.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2011-2019 Free Software Foundation, Inc.
 
 ;; Author: Glenn Morris <address@hidden>
-;; Maintainer: address@hidden
 
 ;; This file is part of GNU Emacs.
 
diff --git a/test/lisp/vc/vc-hg-tests.el b/test/lisp/vc/vc-hg-tests.el
index 1bdc320..7fc8461 100644
--- a/test/lisp/vc/vc-hg-tests.el
+++ b/test/lisp/vc/vc-hg-tests.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2016-2019 Free Software Foundation, Inc.
 
 ;; Author: Dmitry Gutov <address@hidden>
-;; Maintainer: address@hidden
 
 ;; This file is part of GNU Emacs.
 
diff --git a/test/lisp/xdg-tests.el b/test/lisp/xdg-tests.el
index 9c81506..b8bd606 100644
--- a/test/lisp/xdg-tests.el
+++ b/test/lisp/xdg-tests.el
@@ -2,7 +2,6 @@
 
 ;; Copyright (C) 2017-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
 ;; Author: Mark Oteiza <address@hidden>
 
 ;; This file is part of GNU Emacs.
diff --git a/test/manual/biditest.el b/test/manual/biditest.el
index d813642..f257910 100644
--- a/test/manual/biditest.el
+++ b/test/manual/biditest.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2013-2019 Free Software Foundation, Inc.
 
 ;; Author: Eli Zaretskii
-;; Maintainer: address@hidden
 ;; Package: emacs
 
 ;; This program is free software: you can redistribute it and/or modify
diff --git a/test/manual/etags/el-src/emacs/lisp/progmodes/etags.el 
b/test/manual/etags/el-src/emacs/lisp/progmodes/etags.el
index 250aeb1..30ad340 100644
--- a/test/manual/etags/el-src/emacs/lisp/progmodes/etags.el
+++ b/test/manual/etags/el-src/emacs/lisp/progmodes/etags.el
@@ -4,7 +4,6 @@
 ;; Software Foundation, Inc.
 
 ;; Author: Roland McGrath <address@hidden>
-;; Maintainer: address@hidden
 ;; Keywords: tools
 
 ;; This file is part of GNU Emacs.
diff --git a/test/src/lcms-tests.el b/test/src/lcms-tests.el
index f1d1110..d92ebcb 100644
--- a/test/src/lcms-tests.el
+++ b/test/src/lcms-tests.el
@@ -2,8 +2,6 @@
 
 ;; Copyright (C) 2017-2019 Free Software Foundation, Inc.
 
-;; Maintainer: address@hidden
-
 ;; This file is part of GNU Emacs.
 
 ;; GNU Emacs is free software: you can redistribute it and/or modify



reply via email to

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