emacs-diffs
[Top][All Lists]
Advanced

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

feature/pgtk 0b6a632 3/3: Merge branch 'feature/pgtk' of git.sv.gnu.org:


From: Yuuki Harano
Subject: feature/pgtk 0b6a632 3/3: Merge branch 'feature/pgtk' of git.sv.gnu.org:/srv/git/emacs into feature/pgtk
Date: Mon, 6 Dec 2021 10:47:43 -0500 (EST)

branch: feature/pgtk
commit 0b6a632f99214e2d1e9e1d72b8f8b3a7f054d552
Merge: f68a031 9eba6b9
Author: Yuuki Harano <masm+github@masm11.me>
Commit: Yuuki Harano <masm+github@masm11.me>

    Merge branch 'feature/pgtk' of git.sv.gnu.org:/srv/git/emacs into 
feature/pgtk
---
 doc/lispref/frames.texi               |  9 +++--
 doc/lispref/text.texi                 | 41 +++++++++++--------
 doc/misc/eieio.texi                   |  9 +++--
 doc/misc/erc.texi                     | 76 +++++++++++++++++------------------
 doc/misc/gnus.texi                    |  6 +--
 etc/NEWS                              |  4 ++
 etc/themes/manoj-dark-theme.el        |  1 -
 lisp/calendar/time-date.el            |  2 +-
 lisp/dired-aux.el                     | 42 ++++++++++++++++++-
 lisp/emacs-lisp/eieio-opt.el          |  1 +
 lisp/emacs-lisp/eieio.el              |  5 ---
 lisp/emacs-lisp/timer.el              |  4 +-
 lisp/emacs-lisp/warnings.el           |  4 +-
 lisp/frame.el                         | 11 +----
 lisp/gnus/gnus-score.el               |  4 +-
 lisp/gnus/gnus-search.el              |  7 +---
 lisp/gnus/gnus-sum.el                 |  6 +--
 lisp/gnus/gnus.el                     |  6 +--
 lisp/gnus/mail-source.el              | 19 ++++-----
 lisp/gnus/message.el                  | 31 +++++++-------
 lisp/gnus/mm-util.el                  |  2 +-
 lisp/image-dired.el                   |  9 +----
 lisp/image.el                         |  6 +--
 lisp/image/gravatar.el                |  4 +-
 lisp/info.el                          |  4 +-
 lisp/language/hanja-util.el           |  4 +-
 lisp/leim/quail/hangul.el             |  4 +-
 lisp/mail/feedmail.el                 | 18 +++------
 lisp/mail/mail-utils.el               | 15 ++-----
 lisp/mail/sendmail.el                 | 14 +++----
 lisp/mh-e/mh-alias.el                 |  3 +-
 lisp/midnight.el                      |  2 +-
 lisp/mouse.el                         |  3 +-
 lisp/net/dbus.el                      |  2 +-
 lisp/net/rcirc.el                     |  2 +-
 lisp/net/sasl.el                      | 23 ++++++-----
 lisp/net/shr.el                       | 18 ++++-----
 lisp/net/tramp-gvfs.el                |  2 +-
 lisp/net/tramp-sh.el                  |  2 +-
 lisp/net/tramp-sudoedit.el            |  2 +-
 lisp/net/tramp.el                     |  4 +-
 lisp/nxml/rng-cmpct.el                |  2 +-
 lisp/nxml/xmltok.el                   | 10 ++---
 lisp/nxml/xsd-regexp.el               |  6 +--
 lisp/org/org-compat.el                |  3 +-
 lisp/pixel-scroll.el                  | 17 ++++----
 lisp/progmodes/vhdl-mode.el           |  5 ++-
 lisp/startup.el                       |  3 +-
 lisp/subr.el                          |  3 +-
 lisp/timezone.el                      |  5 +--
 lisp/vc/vc-dir.el                     |  7 +++-
 lisp/vc/vc-git.el                     | 24 ++++++++---
 lisp/xml.el                           | 10 ++---
 src/gtkutil.c                         |  5 +++
 src/image.c                           |  6 +--
 src/pgtkfns.c                         | 28 ++++++++-----
 src/pgtkterm.c                        | 43 +++++++++++++-------
 src/xdisp.c                           |  6 ++-
 test/Makefile.in                      |  2 +-
 test/lisp/autorevert-tests.el         |  6 +--
 test/lisp/calendar/time-date-tests.el | 17 ++++----
 test/lisp/net/tramp-tests.el          |  2 +-
 test/lisp/vc/vc-git-tests.el          | 67 ++++++++++++++++++++++++++++++
 test/manual/cedet/cedet-utests.el     |  4 +-
 test/src/timefns-tests.el             | 12 ++++++
 65 files changed, 423 insertions(+), 301 deletions(-)

diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi
index 3c0bf64..1dfd0d4 100644
--- a/doc/lispref/frames.texi
+++ b/doc/lispref/frames.texi
@@ -167,10 +167,11 @@ argument, the frame just created.
 @end defvar
 
 Note that any functions added to these hooks by your initial file are
-usually not run for the initial frame.  However, if the initial frame
-is specified to use a separate minibuffer frame (@pxref{Minibuffers
-and Frames}), the functions will be run for both, the minibuffer-less
-and the minibuffer frame.
+usually not run for the initial frame, since Emacs reads the initial
+file only after creating that frame.  However, if the initial frame is
+specified to use a separate minibuffer frame (@pxref{Minibuffers and
+Frames}), the functions will be run for both, the minibuffer-less and
+the minibuffer frame.
 
 @defvar frame-inherited-parameters
 This variable specifies the list of frame parameters that a newly
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index b49a998..03adb54 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -3722,14 +3722,14 @@ Consecutive characters with the same @code{field} 
property constitute a
 @kindex cursor @r{(text property)}
 Normally, the cursor is displayed at the beginning or the end of any
 overlay and text property strings present at the current buffer
-position.  You can place the cursor on any desired character of these
-strings by giving that character a non-@code{nil} @code{cursor} text
-property.  In addition, if the value of the @code{cursor} property is
-an integer, it specifies the number of buffer's character
-positions, starting with the position where the overlay or the
-@code{display} property begins, for which the cursor should be
-displayed on that character.  Specifically, if the value of the
-@code{cursor} property of a character is the number @var{n}, the
+position.  You can instead tell Emacs to place the cursor on any
+desired character of these strings by giving that character a
+non-@code{nil} @code{cursor} text property.  In addition, if the value
+of the @code{cursor} property is an integer, it specifies the number
+of buffer's character positions, starting with the position where the
+overlay or the @code{display} property begins, for which the cursor
+should be displayed on that character.  Specifically, if the value of
+the @code{cursor} property of a character is the number @var{n}, the
 cursor will be displayed on this character for any buffer position in
 the range @code{[@var{ovpos}..@var{ovpos}+@var{n})}, where @var{ovpos}
 is the overlay's starting position given by @code{overlay-start}
@@ -3738,14 +3738,23 @@ text property begins in the buffer.
 
 In other words, the string character with the @code{cursor} property
 of any non-@code{nil} value is the character where to display the
-cursor.  The value of the property says for which buffer positions to
-display the cursor there.  If the value is an integer @var{n},
-the cursor is displayed there when point is anywhere between the
-beginning of the overlay or @code{display} property and @var{n}
-positions after that.  If the value is anything else and
-non-@code{nil}, the cursor is displayed there only when point is at
-the beginning of the @code{display} property or at
-@code{overlay-start}.
+cursor when the overlay or display string make point not visible on
+display.  The value of the property says for which buffer positions to
+display the cursor there.  If the value is an integer @var{n}, the
+cursor is displayed there when point is anywhere between the beginning
+of the overlay or @code{display} property and @var{n} positions after
+that.  If the value is anything else and non-@code{nil}, the cursor is
+displayed there only when point is at the buffer position that is the
+beginning of the @code{display} property, or at @code{overlay-start}
+if that position is not visible on display.  Note that an integer
+value of the @code{cursor} property could mean that the cursor is
+displayed on that character even when point is visible on display.
+
+One subtlety of this property is that it doesn't work to put this
+property on a newline character that is part of a display or overlay
+string.  That's because the newline doesn't have a graphic
+representation on the screen for Emacs to find when it looks for a
+character on display with that @code{cursor} property.
 
 @cindex cursor position for @code{display} properties and overlays
 When the buffer has many overlay strings (e.g., @pxref{Overlay
diff --git a/doc/misc/eieio.texi b/doc/misc/eieio.texi
index 8a4b914..c8d488d 100644
--- a/doc/misc/eieio.texi
+++ b/doc/misc/eieio.texi
@@ -856,11 +856,12 @@ You can also create a generic method with 
@code{cl-defmethod}
 (@pxref{Methods}).  When a method is created and there is no generic
 method in place with that name, then a new generic will be created,
 and the new method will use it.
-@end defmac
 
-In CLOS, a generic call also be used to provide an argument list and
-dispatch precedence for all the arguments.  In @eieio{}, dispatching
-only occurs for the first argument, so the @var{arglist} is not used.
+In CLOS, a generic method can also be used to provide an argument list
+and dispatch precedence for all the arguments.  In @eieio{},
+dispatching only occurs for the first argument, so the @var{arglist}
+is not used.
+@end defmac
 
 @node Methods
 @section Methods
diff --git a/doc/misc/erc.texi b/doc/misc/erc.texi
index 6631d84..e7286d2 100644
--- a/doc/misc/erc.texi
+++ b/doc/misc/erc.texi
@@ -72,7 +72,7 @@ and modified without restriction.
 
 Getting Started
 
-* Sample Session::              Example of connecting to the #emacs channel
+* Sample Session::              Example of connecting to the @samp{#emacs} 
channel
 * Special Features::            Differences from standalone IRC clients
 
 Advanced Usage
@@ -87,32 +87,31 @@ Advanced Usage
 @node Introduction
 @chapter Introduction
 
+ERC is a powerful, modular, and extensible IRC client for Emacs.
+It is distributed with Emacs since version 22.1.
+
 IRC is short for Internet Relay Chat.  When using IRC, you can
-communicate with other users on the same IRC network.  There are
-several of these networks available---if you search for ``IRC
-networks'' in your favorite search engine, you are likely to find
-up-to-date lists of IRC networks catering to various interests and
-topics.
-
-In order to use IRC, you need an IRC client such as ERC.  Using the
-client, you connect to an IRC server.  Once you've done that, you will
-have access to all available channels on that server's network.  A
-channel is basically a chat room, and what you type in a channel will
-be shown to all other users in that channel, and you can be in several
-channels at the same time---most clients will show each channel in its
-own window.  IRC channel names always begin with a @samp{#} character.
-For example, the Emacs channel on Libera.Chat is @samp{#emacs}, and
-the ERC channel is @samp{#erc}.  Do not confuse them with the hashtags
+communicate with other users on the same IRC network.  There are many
+different networks---if you search for ``IRC networks'' in your
+favorite search engine, you will find up-to-date lists of IRC networks
+catering to various interests and topics.
+
+To use IRC, you need an IRC client such as ERC.  Using the client, you
+connect to an IRC server.  Once you've done that, you will have access
+to all available channels on that server's network.  A channel is
+basically a chat room, and what you type in a channel will be shown to
+all other users in that channel.  You can be in several channels at
+the same time---ERC will show each channel in its own buffer.
+
+IRC channel names always begin with a @samp{#} character.  For
+example, the Emacs channel on Libera.Chat is @samp{#emacs}, and the
+ERC channel is @samp{#erc}.  Do not confuse them with the hashtags
 used on many social media platforms.
 
-It is also possible to send private messages to other IRC
-users on the same network, regardless of whether or not they are in
-the same channel as you.
-
-ERC is a powerful, modular, and extensible IRC client for Emacs.
-It is distributed with Emacs since version 22.1.
+You can also send private messages to other IRC users on the same
+network, even if they are not in the same channels as you.
 
-It comes with the following capabilities enabled by default.
+ERC comes with the following capabilities enabled by default.
 
 @itemize @bullet
 @item Flood control
@@ -137,10 +136,10 @@ It comes with the following capabilities enabled by 
default.
 
 The command @kbd{M-x erc} will start ERC and prompt for the server to
 connect to.  If you're unsure of which server or network to connect
-to, we suggest you start with ``irc.libera.chat''.  There you will
-find the @samp{#emacs} channels where you can chat with other Emacs
-and users, and if you're having trouble with ERC, you can join the
-@samp{#erc} channel and ask for help there.
+to, we suggest starting with ``irc.libera.chat''.  There you will find
+the @samp{#emacs} channels where you can chat with other Emacs users,
+and if you're having trouble with ERC, you can join the @samp{#erc}
+channel and ask for help there.
 
 If you want to place ERC settings in their own file, you can place them
 in @file{~/.emacs.d/.ercrc.el}, creating it if necessary.
@@ -160,14 +159,15 @@ customize-variable @key{RET} erc-modules @key{RET}}.
 @section Sample Session
 
 This is an example ERC session which shows how to connect to the
-#emacs channel on Libera.Chat.  Another IRC channel on Libera.Chat
-that may be of interest is #erc, which is a channel where ERC users
-and developers hang out.  These channels used to live on the Freenode
-IRC network until June 2021, when they---along with the official IRC
-channels of the GNU Project, the Free Software Foundation, and many
-other free software communities---relocated to the Libera.Chat network
-in the aftermath of changes in governance and policies of Freenode in
-May and June 2021.  GNU and FSF's announcements about this are at
+@samp{#emacs} channel on Libera.Chat.  Another IRC channel on
+Libera.Chat that may be of interest is @samp{#erc}, which is a channel
+where ERC users and developers hang out.  These channels used to live
+on the Freenode IRC network until June 2021, when they---along with
+the official IRC channels of the GNU Project, the Free Software
+Foundation, and many other free software communities---relocated to
+the Libera.Chat network in the aftermath of changes in governance and
+policies of Freenode in May and June 2021.  GNU and FSF's
+announcements about this are at
 @uref{https://lists.gnu.org/archive/html/info-gnu/2021-06/msg00005.html},
 @uref{https://lists.gnu.org/archive/html/info-gnu/2021-06/msg00007.html},
 and
@@ -177,7 +177,7 @@ and
 
 @item Connect to Libera.Chat
 
-Run @kbd{M-x erc}.  Use ``irc.libera.chat as the IRC server, ``6667''
+Run @kbd{M-x erc}.  Use ``irc.libera.chat'' as the IRC server, ``6667''
 as the port, and choose a nickname.
 
 @item Get used to the interface
@@ -292,7 +292,7 @@ new command in capital letters.
 If the connection goes away at some point, ERC will try to reconnect
 automatically.  If it fails to reconnect, and you want to try to
 manually reestablish the connection at some later point, switch to an
-ERC  buffer and run the @code{/RECONNECT} command.
+ERC buffer and run the @code{/RECONNECT} command.
 
 @end itemize
 
@@ -959,7 +959,7 @@ over the project entirely.''
 So we happily hacked away on ERC, and soon after (September 2001)
 released the next "stable" version, 2.1.
 
-Most of the development of the new ERC happened on #emacs on
+Most of the development of the new ERC happened on @samp{#emacs} on
 irc.openprojects.net.  Over time, many people contributed code, ideas,
 bugfixes, and a lot of alpha/beta/gamma testing.
 
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
index a18afec..74b5fb4 100644
--- a/doc/misc/gnus.texi
+++ b/doc/misc/gnus.texi
@@ -15447,10 +15447,6 @@ If non-@code{nil}, ask for confirmation before 
deleting old incoming
 files.  This variable only applies when
 @code{mail-source-delete-incoming} is a positive number.
 
-@item mail-source-ignore-errors
-@vindex mail-source-ignore-errors
-If non-@code{nil}, ignore errors when reading mail from a mail source.
-
 @item mail-source-directory
 @vindex mail-source-directory
 Directory where incoming mail source files (if any) will be stored.  The
@@ -18052,7 +18048,7 @@ find all messages that have been received recently from 
certain groups:
          (list
           (cons 'query
                 (format-time-string "SENTSINCE %d-%b-%Y"
-                                    (time-subtract (current-time)
+                                    (time-subtract nil
                                                    (days-to-time (car args)))))
           (cons 'criteria "")))
         (group-spec (cadr args)))
diff --git a/etc/NEWS b/etc/NEWS
index df5e6ef..a8b7dc5 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -693,6 +693,10 @@ Emacs buffers, like indentation and the like.  The new ert 
function
 
 * Incompatible Lisp Changes in Emacs 29.1
 
+** User option 'mail-source-ignore-errors' is now obsolete
+The whole mechanism for prompting users to continue in case of
+mail-source errors has been removed, so this option is no longer
+needed.
 ** Fonts
 
 ---
diff --git a/etc/themes/manoj-dark-theme.el b/etc/themes/manoj-dark-theme.el
index f10b885..e80403f 100644
--- a/etc/themes/manoj-dark-theme.el
+++ b/etc/themes/manoj-dark-theme.el
@@ -541,7 +541,6 @@ jarring angry fruit salad look to reduce eye fatigue.")
  '(ido-indicator ((t (:background "red1" :foreground "yellow1" :width 
condensed))))
  '(ido-only-match ((t (:foreground "ForestGreen"))))
  '(ido-subdir ((t (:foreground "red1"))))
- '(info-menu-5 ((t (:underline t))))
  '(info-menu-header ((t (:bold t :weight bold))))
  '(info-node ((t (:bold t :italic t :foreground "yellow"))))
  '(info-node ((t (:italic t :bold t :foreground "white" :slant italic :weight 
bold))))
diff --git a/lisp/calendar/time-date.el b/lisp/calendar/time-date.el
index 37a16d3..b361712 100644
--- a/lisp/calendar/time-date.el
+++ b/lisp/calendar/time-date.el
@@ -69,7 +69,7 @@ list (HIGH LOW MICRO PICO)."
                     (pop elt)))
             (time-value (car elt))
             (gensym (make-symbol "time")))
-       `(let* ,(append `((,gensym (or ,time-value (current-time)))
+       `(let* ,(append `((,gensym (or ,time-value (time-convert nil 'list)))
                          (,gensym
                           (cond
                            ((integerp ,gensym)
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 588551a..af7b160 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -1787,13 +1787,46 @@ Special value `always' suppresses confirmation."
   "Whether Dired should create destination dirs when copying/removing files.
 If nil, don't create them.
 If `always', create them without asking.
-If `ask', ask for user confirmation."
+If `ask', ask for user confirmation.
+
+Also see `dired-create-destination-dirs-on-trailing-dirsep'."
   :type '(choice (const :tag "Never create non-existent dirs" nil)
                 (const :tag "Always create non-existent dirs" always)
                 (const :tag "Ask for user confirmation" ask))
   :group 'dired
   :version "27.1")
 
+(defcustom dired-create-destination-dirs-on-trailing-dirsep nil
+  "If non-nil, treat a trailing slash at queried destination dir specially.
+
+If this variable is non-nil and a single destination filename is
+queried which ends in a directory separator (/), it will be
+treated as a non-existent directory and acted on according to
+`dired-create-destination-dirs'.
+
+This option is only relevant if `dired-create-destination-dirs'
+is non-nil, too.
+
+For example, if both `dired-create-destination-dirs' and this
+option are non-nil, renaming a directory named `old_name' to
+`new_name/' (note the trailing directory separator) where
+`new_name' does not exists already, it will be created and
+`old_name' be moved into it.  If only `new_name' (without the
+trailing /) is given or this option or
+`dired-create-destination-dirs' is `nil', `old_name' will be
+renamed to `new_name'."
+  :type '(choice
+          (const :tag
+                 (concat "Do not treat destination dirs with a "
+                         "trailing directory separator specially")
+                 nil)
+          (const :tag
+                 (concat "Treat destination dirs with trailing "
+                         "directory separator specially")
+                 t))
+  :group 'dired
+  :version "29.1")
+
 (defun dired-maybe-create-dirs (dir)
   "Create DIR if doesn't exist according to `dired-create-destination-dirs'."
   (when (and dired-create-destination-dirs (not (file-exists-p dir)))
@@ -2163,7 +2196,12 @@ Optional arg HOW-TO determines how to treat the target.
                     target-dir op-symbol arg rfn-list default))))
         (into-dir
           (progn
-            (unless dired-one-file (dired-maybe-create-dirs target))
+            (when
+                (or
+                 (not dired-one-file)
+                 (and dired-create-destination-dirs-on-trailing-dirsep
+                      (directory-name-p target)))
+              (dired-maybe-create-dirs target))
             (cond ((null how-to)
                   ;; Allow users to change the letter case of
                   ;; a directory on a case-insensitive
diff --git a/lisp/emacs-lisp/eieio-opt.el b/lisp/emacs-lisp/eieio-opt.el
index 9c842f4..6803953 100644
--- a/lisp/emacs-lisp/eieio-opt.el
+++ b/lisp/emacs-lisp/eieio-opt.el
@@ -130,6 +130,7 @@ are not abstract."
 ;;;###autoload
 (defun eieio-help-constructor (ctr)
   "Describe CTR if it is a class constructor."
+  (declare (obsolete "use `describe-function' or `cl--describe-class'." 
"29.1"))
   (when (class-p ctr)
     (erase-buffer)
     (let ((location (find-lisp-object-file-name ctr 'define-type))
diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el
index 3fbfe01..2850c91 100644
--- a/lisp/emacs-lisp/eieio.el
+++ b/lisp/emacs-lisp/eieio.el
@@ -992,11 +992,6 @@ of `eq'."
   (error "EIEIO: `change-class' is unimplemented"))
 (define-obsolete-function-alias 'change-class #'eieio-change-class "26.1")
 
-;; Hook ourselves into help system for describing classes and methods.
-;; FIXME: This is not actually needed any more since we can click on the
-;; hyperlink from the constructor's docstring to see the type definition.
-(add-hook 'help-fns-describe-function-functions #'eieio-help-constructor)
-
 (provide 'eieio)
 
 ;;; eieio.el ends here
diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el
index 2ac2c99..c7d02cc 100644
--- a/lisp/emacs-lisp/timer.el
+++ b/lisp/emacs-lisp/timer.el
@@ -314,7 +314,7 @@ This function is called, by name, directly by the C code."
                          (not (timer--idle-delay timer)))
                 (setf (timer--time timer)
                       (timer-next-integral-multiple-of-time
-                       (current-time) (timer--repeat-delay timer))))
+                      nil (timer--repeat-delay timer))))
               ;; Place it back on the timer-list before running
               ;; timer--function, so it can cancel-timer itself.
               (timer-activate timer t cell)
@@ -391,7 +391,7 @@ This function returns a timer object which you can use in
 
     ;; Special case: t means the next integral multiple of REPEAT.
     (when (and (eq time t) repeat)
-      (setq time (timer-next-integral-multiple-of-time (current-time) repeat))
+      (setq time (timer-next-integral-multiple-of-time nil repeat))
       (setf (timer--integral-multiple timer) t))
 
     ;; Handle numbers as relative times in seconds.
diff --git a/lisp/emacs-lisp/warnings.el b/lisp/emacs-lisp/warnings.el
index 36b275e..1d06136 100644
--- a/lisp/emacs-lisp/warnings.el
+++ b/lisp/emacs-lisp/warnings.el
@@ -307,7 +307,9 @@ entirely by setting `warning-suppress-types' or
                                'type 'warning-suppress-log-warning
                                'warning-type type))
               (funcall newline)
-             (when (and warning-fill-prefix (not (string-search "\n" message)))
+             (when (and warning-fill-prefix
+                         (not (string-search "\n" message))
+                         (not noninteractive))
                (let ((fill-prefix warning-fill-prefix)
                      (fill-column warning-fill-column))
                  (fill-region start (point))))
diff --git a/lisp/frame.el b/lisp/frame.el
index 00a60e5..f790fa1 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -808,19 +808,12 @@ also select the new frame."
     new-frame))
 
 (defvar before-make-frame-hook nil
-  "Functions to run before `make-frame' creates a new frame.
-Note that these functions are usually not run for the initial
-frame, except when the initial frame is created from an Emacs
-daemon.")
+  "Functions to run before `make-frame' creates a new frame.")
 
 (defvar after-make-frame-functions nil
   "Functions to run after `make-frame' created a new frame.
 The functions are run with one argument, the newly created
-frame.
-
-Note that these functions are usually not run for the initial
-frame, except when the initial frame is created from an Emacs
-daemon.")
+frame.")
 
 (defvar after-setting-font-hook nil
   "Functions to run after a frame's font has been changed.")
diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el
index d031047..a25673a 100644
--- a/lisp/gnus/gnus-score.el
+++ b/lisp/gnus/gnus-score.el
@@ -1749,7 +1749,7 @@ score in `gnus-newsgroup-scored' by SCORE."
            (setq type 'after
                  match-func 'string<
                  match (gnus-time-iso8601
-                        (time-subtract (current-time)
+                        (time-subtract nil
                                        (* 86400 (nth 0 kill))))))
           ((eq type 'before)
            (setq match-func 'gnus-string>
@@ -1758,7 +1758,7 @@ score in `gnus-newsgroup-scored' by SCORE."
            (setq type 'before
                  match-func 'gnus-string>
                  match (gnus-time-iso8601
-                        (time-subtract (current-time)
+                        (time-subtract nil
                                        (* 86400 (nth 0 kill))))))
           ((eq type 'at)
            (setq match-func 'string=
diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el
index c77de68..a79c106 100644
--- a/lisp/gnus/gnus-search.el
+++ b/lisp/gnus/gnus-search.el
@@ -572,9 +572,7 @@ REL-DATE, or (current-time) if REL-DATE is nil."
   ;; Time parsing doesn't seem to work with slashes.
   (let ((value (string-replace "/" "-" value))
        (now (append '(0 0 0)
-                    (seq-subseq (decode-time (or rel-date
-                                                 (current-time)))
-                                3))))
+                    (seq-subseq (decode-time rel-date) 3))))
     ;; Check for relative time parsing.
     (if (string-match "\\([[:digit:]]+\\)\\([dwmy]\\)" value)
        (seq-subseq
@@ -1239,8 +1237,7 @@ nil (except that (dd nil yyyy) is not allowed).  Massage 
those
 numbers into the most recent past occurrence of whichever date
 elements are present."
   (pcase-let ((`(,nday ,nmonth ,nyear)
-              (seq-subseq (decode-time (current-time))
-                          3 6))
+              (seq-subseq (decode-time) 3 6))
              (`(,dday ,dmonth ,dyear) date))
     (unless (and dday dmonth dyear)
       (unless dday (setq dday 1))
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index dcdf3d9..ba61658 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -3968,10 +3968,9 @@ Returns \"  ?  \" if there's bad input or if another 
error occurs.
 Input should look like this: \"Sun, 14 Oct 2001 13:34:39 +0200\"."
   (condition-case ()
       (let* ((messy-date (gnus-date-get-time messy-date))
-            (now (current-time))
             ;;If we don't find something suitable we'll use this one
             (my-format "%b %d '%y"))
-       (let* ((difference (time-subtract now messy-date))
+       (let* ((difference (time-subtract nil messy-date))
               (templist gnus-user-date-format-alist)
               (top (eval (caar templist) t)))
          (while (if (numberp top) (time-less-p top difference) (not top))
@@ -10496,7 +10495,6 @@ latter case, they will be copied into the relevant 
groups."
   "Create an article in a mail newsgroup."
   (interactive nil gnus-summary-mode)
   (let ((group gnus-newsgroup-name)
-       (now (current-time))
        group-art)
     (unless (gnus-check-backend-function 'request-accept-article group)
       (error "%s does not support article importing" group))
@@ -10506,7 +10504,7 @@ latter case, they will be copied into the relevant 
groups."
       ;; This doesn't look like an article, so we fudge some headers.
       (insert "From: " (read-string "From: ") "\n"
              "Subject: " (read-string "Subject: ") "\n"
-             "Date: " (message-make-date now) "\n"
+             "Date: " (message-make-date) "\n"
              "Message-ID: " (message-make-message-id) "\n")
       (setq group-art (gnus-request-accept-article group nil t))
       (kill-buffer (current-buffer)))
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el
index 56934df..afe07ee 100644
--- a/lisp/gnus/gnus.el
+++ b/lisp/gnus/gnus.el
@@ -3150,9 +3150,9 @@ g -- Group name."
   "Check whether GROUP supports function FUNC.
 GROUP can either be a string (a group name) or a select method."
   (ignore-errors
-    (let ((method (if (stringp group)
-                     (car (gnus-find-method-for-group group))
-                   group)))
+    (when-let ((method (if (stringp group)
+                          (car (gnus-find-method-for-group group))
+                        group)))
       (unless (featurep method)
        (require method))
       (fboundp (intern (format "%s-%s" method func))))))
diff --git a/lisp/gnus/mail-source.el b/lisp/gnus/mail-source.el
index af0a198..efdddea 100644
--- a/lisp/gnus/mail-source.el
+++ b/lisp/gnus/mail-source.el
@@ -224,12 +224,9 @@ Leave mails for this many days" :value 14)))))
                                           (const :format "" :value :plugged)
                                           (boolean :tag "Plugged"))))))))
 
-(defcustom mail-source-ignore-errors nil
-  "Ignore errors when querying mail sources.
-If nil, the user will be prompted when an error occurs.  If non-nil,
-the error will be ignored."
-  :version "22.1"
-  :type 'boolean)
+(make-obsolete-variable 'mail-source-ignore-errors
+                        "configure `gnus-verbose' instead"
+                        "29.1")
 
 (defcustom mail-source-primary-source nil
   "Primary source for incoming mail.
@@ -554,18 +551,16 @@ Return the number of files that were found."
                 (condition-case err
                     (funcall function source callback)
                   (error
-                   (if (and (not mail-source-ignore-errors)
-                            (not
-                             (yes-or-no-p
-                              (format "Mail source %s error (%s).  Continue? "
+                    (gnus-error
+                     5
+                     (format "Mail source %s error (%s)"
                                       (if (memq ':password source)
                                           (let ((s (copy-sequence source)))
                                             (setcar (cdr (memq ':password s))
                                                     "********")
                                             s)
                                         source)
-                                      (cadr err)))))
-                     (error "Cannot get new mail"))
+                                      (cadr err)))
                    0)))))))))
 
 (declare-function gnus-message "gnus-util" (level &rest args))
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 562bc64..c2d1429 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -5828,15 +5828,15 @@ In posting styles use `(\"Expires\" (make-expires-date 
30))'."
 ;; You might for example insert a "." somewhere (not next to another dot
 ;; or string boundary), or modify the "fsf" string.
 (defun message-unique-id ()
-  ;; Don't use microseconds from (current-time), they may be unsupported.
+  ;; Don't use fractional seconds from timestamp; they may be unsupported.
   ;; Instead we use this randomly inited counter.
   (setq message-unique-id-char
-       (% (1+ (or message-unique-id-char
-                  (random (ash 1 20))))
-          ;; (current-time) returns 16-bit ints,
-          ;; and 2^16*25 just fits into 4 digits i base 36.
-          (* 25 25)))
-  (let ((tm (current-time)))
+       ;; 2^16 * 25 just fits into 4 digits i base 36.
+       (let ((base (* 25 25)))
+         (if message-unique-id-char
+             (% (1+ message-unique-id-char) base)
+           (random base))))
+  (let ((tm (time-convert nil 'integer)))
     (concat
      (if (or (eq system-type 'ms-dos)
             ;; message-number-base36 doesn't handle bigints.
@@ -5846,10 +5846,12 @@ In posting styles use `(\"Expires\" (make-expires-date 
30))'."
             (aset user (match-beginning 0) ?_))
           user)
        (message-number-base36 (user-uid) -1))
-     (message-number-base36 (+ (car tm)
-                              (ash (% message-unique-id-char 25) 16)) 4)
-     (message-number-base36 (+ (nth 1 tm)
-                              (ash (/ message-unique-id-char 25) 16)) 4)
+     (message-number-base36 (+ (ash tm -16)
+                              (ash (% message-unique-id-char 25) 16))
+                           4)
+     (message-number-base36 (+ (logand tm #xffff)
+                              (ash (/ message-unique-id-char 25) 16))
+                           4)
      ;; Append a given name, because while the generated ID is unique
      ;; to this newsreader, other newsreaders might otherwise generate
      ;; the same ID via another algorithm.
@@ -5946,12 +5948,9 @@ In posting styles use `(\"Expires\" (make-expires-date 
30))'."
 
 (defun message-make-expires ()
   "Return an Expires header based on `message-expires'."
-  (let ((current (current-time))
-       (future (* 1.0 message-expires 60 60 24)))
+  (let ((future (* 60 60 24 message-expires)))
     ;; Add the future to current.
-    (setcar current (+ (car current) (round (/ future (expt 2 16)))))
-    (setcar (cdr current) (+ (nth 1 current) (% (round future) (expt 2 16))))
-    (message-make-date current)))
+    (message-make-date (time-add nil future))))
 
 (defun message-make-path ()
   "Return uucp path."
diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el
index 92e04f9..ddc228e 100644
--- a/lisp/gnus/mm-util.el
+++ b/lisp/gnus/mm-util.el
@@ -31,7 +31,7 @@
 
 (defun mm-ucs-to-char (codepoint)
   "Convert Unicode codepoint to character."
-  (or (decode-char 'ucs codepoint) ?#))
+  (or codepoint ?#))
 
 (defvar mm-coding-system-list nil)
 (defun mm-get-coding-system-list ()
diff --git a/lisp/image-dired.el b/lisp/image-dired.el
index 47a44a4..fe0c3b7 100644
--- a/lisp/image-dired.el
+++ b/lisp/image-dired.el
@@ -540,7 +540,7 @@ Create the thumbnail directory if it does not exist."
 
 (defun image-dired-get-thumbnail-image (file)
   "Return the image descriptor for a thumbnail of image file FILE."
-  (unless (string-match (image-file-name-regexp) file)
+  (unless (string-match-p (image-file-name-regexp) file)
     (error "%s is not a valid image file" file))
   (let* ((thumb-file (image-dired-thumb-name file))
         (thumb-attr (file-attributes thumb-file)))
@@ -768,7 +768,7 @@ and remove the cached thumbnail files between each trial 
run.")
               (image-dired-debug-message
                (format-time-string
                 "Generated thumbnails in %s.%3N seconds"
-                (time-subtract (current-time)
+               (time-subtract nil
                                image-dired--generate-thumbs-start))))
             (if (not (and (eq (process-status process) 'exit)
                           (zerop (process-exit-status process))))
@@ -1593,11 +1593,6 @@ You probably want to use this together with
     (define-key map [down-mouse-1] #'image-dired-mouse-select-thumbnail)
     (define-key map [down-mouse-2] #'image-dired-mouse-select-thumbnail)
     (define-key map [down-mouse-3] #'image-dired-mouse-select-thumbnail)
-    ;; Let's disable mouse dragging, as it currently doesn't do
-    ;; anything useful.
-    (define-key map [drag-mouse-1] #'ignore)
-    (define-key map [drag-mouse-2] #'ignore)
-    (define-key map [drag-mouse-3] #'ignore)
     ;; Seems I must first set C-down-mouse-1 to undefined, or else it
     ;; will trigger the buffer menu. If I try to instead bind
     ;; C-down-mouse-1 to `image-dired-mouse-toggle-mark', I get a message
diff --git a/lisp/image.el b/lisp/image.el
index 87fab80..cedefc0 100644
--- a/lisp/image.el
+++ b/lisp/image.el
@@ -953,9 +953,9 @@ for the animation speed.  A negative value means to animate 
in reverse."
                   (progn
                     (message "Stopping animation; animation possibly too big")
                     nil)))
-      (image-show-frame image n t)
-      (let* ((speed (image-animate-get-speed image))
-            (time (current-time))
+      (let* ((time (prog1 (current-time)
+                    (image-show-frame image n t)))
+            (speed (image-animate-get-speed image))
             (time-to-load-image (time-since time))
             (stated-delay-time
               (/ (or (cdr (plist-get (cdr image) :animate-multi-frame-data))
diff --git a/lisp/image/gravatar.el b/lisp/image/gravatar.el
index f6f056a..87726a9 100644
--- a/lisp/image/gravatar.el
+++ b/lisp/image/gravatar.el
@@ -277,7 +277,7 @@ where GRAVATAR is either an image descriptor, or the symbol
               ;; Store the image in the cache.
               (when image
                 (setf (gethash mail-address gravatar--cache)
-                      (cons (time-convert (current-time) 'integer)
+                     (cons (time-convert nil 'integer)
                             image)))
               (prog1
                   (apply callback (if data image 'error) cbargs)
@@ -286,7 +286,7 @@ where GRAVATAR is either an image descriptor, or the symbol
 
 (defun gravatar--prune-cache ()
   (let ((expired nil)
-        (time (- (time-convert (current-time) 'integer)
+       (time (- (time-convert nil 'integer)
                  ;; Twelve hours.
                  (* 12 60 60))))
     (maphash (lambda (key val)
diff --git a/lisp/info.el b/lisp/info.el
index 94537c2..559460e 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -115,7 +115,9 @@ The Lisp code is executed when the node is selected.")
 (defface info-menu-star
   '((((class color)) :foreground "red1")
     (t :underline t))
-  "Face for every third `*' in an Info menu.")
+  "Face used to emphasize `*' in an Info menu.
+The face is assigned to the third, sixth, and ninth `*' for easier
+orientation.  See `Info-nth-menu-item'.")
 
 (defface info-xref
   '((t :inherit link))
diff --git a/lisp/language/hanja-util.el b/lisp/language/hanja-util.el
index 9e92135..fe6323d 100644
--- a/lisp/language/hanja-util.el
+++ b/lisp/language/hanja-util.el
@@ -6573,8 +6573,8 @@ The value is a hanja character that is selected 
interactively."
            (hanja-filter (lambda (x) (car x))
                          (mapcar (lambda (c)
                                    (if (listp c)
-                                       (cons (decode-char 'ucs (car c)) (cdr 
c))
-                                    (list (decode-char 'ucs c))))
+                                       (cons (car c) (cdr c))
+                                     (list c)))
                                  (aref hanja-table char)))))
     (unwind-protect
        (when (aref hanja-conversions 2)
diff --git a/lisp/leim/quail/hangul.el b/lisp/leim/quail/hangul.el
index c03e86b..d069b5b 100644
--- a/lisp/leim/quail/hangul.el
+++ b/lisp/leim/quail/hangul.el
@@ -429,7 +429,7 @@ When a Korean input method is off, convert the following 
hangul character."
            (hangul3-input-method-jong char))
           (t
            (setq hangul-queue (make-vector 6 0))
-           (insert (decode-char 'ucs char))
+           (insert char)
            (move-overlay quail-overlay (point) (point))))))
 
 (defun hangul3-input-method (key)
@@ -476,7 +476,7 @@ When a Korean input method is off, convert the following 
hangul character."
            (hangul3-input-method-jong char))
           (t
            (setq hangul-queue (make-vector 6 0))
-           (insert (decode-char 'ucs char))
+           (insert char)
            (move-overlay quail-overlay (point) (point))))))
 
 (defun hangul390-input-method (key)
diff --git a/lisp/mail/feedmail.el b/lisp/mail/feedmail.el
index fe686cb..32edc29 100644
--- a/lisp/mail/feedmail.el
+++ b/lisp/mail/feedmail.el
@@ -2336,19 +2336,14 @@ mapped to mostly alphanumerics for safety."
 
 ;; from a similar function in mail-utils.el
 (defun feedmail-rfc822-time-zone (time)
+  (declare (obsolete format-time-string "29.1"))
   (feedmail-say-debug ">in-> feedmail-rfc822-time-zone %s" time)
-  (let* ((sec (or (car (current-time-zone time)) 0))
-        (absmin (/ (abs sec) 60)))
-    (format "%c%02d%02d" (if (< sec 0) ?- ?+) (/ absmin 60) (% absmin 60))))
+  (format-time-string "%z" time))
 
 (defun feedmail-rfc822-date (arg-time)
   (feedmail-say-debug ">in-> feedmail-rfc822-date %s" arg-time)
-  (let ((time (or arg-time (current-time)))
-       (system-time-locale "C"))
-    (concat
-     (format-time-string "%a, %e %b %Y %T " time)
-     (feedmail-rfc822-time-zone time)
-     )))
+  (let ((system-time-locale "C"))
+    (format-time-string "%a, %e %b %Y %T %z" arg-time)))
 
 (defun feedmail-send-it-immediately-wrapper ()
   "Wrapper to catch skip-me-i."
@@ -2847,10 +2842,9 @@ probably not appropriate for you."
     (if (and (not feedmail-queue-use-send-time-for-message-id) maybe-file)
        (setq date-time (file-attribute-modification-time
                         (file-attributes maybe-file))))
-    (format "<%d-%s%s%s>"
+    (format "<%d-%s%s>"
            (mod (random) 10000)
-           (format-time-string "%a%d%b%Y%H%M%S" date-time)
-           (feedmail-rfc822-time-zone date-time)
+           (format-time-string "%a%d%b%Y%H%M%S%z" date-time)
            end-stuff))
   )
 
diff --git a/lisp/mail/mail-utils.el b/lisp/mail/mail-utils.el
index 3eb3ccb..f1b0590 100644
--- a/lisp/mail/mail-utils.el
+++ b/lisp/mail/mail-utils.el
@@ -368,19 +368,12 @@ matches may be returned from the message body."
   labels)
 
 (defun mail-rfc822-time-zone (time)
-  (let* ((sec (or (car (current-time-zone time)) 0))
-        (absmin (/ (abs sec) 60)))
-    (format "%c%02d%02d" (if (< sec 0) ?- ?+) (/ absmin 60) (% absmin 60))))
+  (declare (obsolete format-time-string "29.1"))
+  (format-time-string "%z" time))
 
 (defun mail-rfc822-date ()
-  (let* ((time (current-time))
-        (s (current-time-string time)))
-    (string-match "[^ ]+ +\\([^ ]+\\) +\\([^ ]+\\) \\([^ ]+\\) \\([^ ]+\\)" s)
-    (concat (substring s (match-beginning 2) (match-end 2)) " "
-           (substring s (match-beginning 1) (match-end 1)) " "
-           (substring s (match-beginning 4) (match-end 4)) " "
-           (substring s (match-beginning 3) (match-end 3)) " "
-           (mail-rfc822-time-zone time))))
+  (let ((system-time-locale "C"))
+    (format-time-string "%-d %b %Y %T %z")))
 
 (defun mail-mbox-from ()
   "Return an mbox \"From \" line for the current message.
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index d0aff09..d1e8a2f 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -1391,8 +1391,7 @@ just append to the file, in Babyl format if necessary."
   (unless (markerp header-end)
     (error "Value of `header-end' must be a marker"))
   (let (fcc-list
-       (mailbuf (current-buffer))
-       (time (current-time)))
+       (mailbuf (current-buffer)))
     (save-excursion
       (goto-char (point-min))
       (let ((case-fold-search t))
@@ -1408,14 +1407,11 @@ just append to the file, in Babyl format if necessary."
       (with-temp-buffer
        ;; This initial newline is not written out if we create a new
        ;; file (see below).
-       (insert "\nFrom " (user-login-name) " " (current-time-string time) "\n")
-       ;; Insert the time zone before the year.
-       (forward-char -1)
-       (forward-word-strictly -1)
        (require 'mail-utils)
-       (insert (mail-rfc822-time-zone time) " ")
-       (goto-char (point-max))
-       (insert "Date: " (message-make-date) "\n")
+       (insert "\nFrom " (user-login-name) " "
+               (let ((system-time-locale "C"))
+                 (format-time-string "%a %b %e %T %z %Y"))
+               "\nDate: " (message-make-date) "\n")
        (insert-buffer-substring mailbuf)
        ;; Make sure messages are separated.
        (goto-char (point-max))
diff --git a/lisp/mh-e/mh-alias.el b/lisp/mh-e/mh-alias.el
index 8087df9..d266621 100644
--- a/lisp/mh-e/mh-alias.el
+++ b/lisp/mh-e/mh-alias.el
@@ -67,8 +67,7 @@ Return t if any file listed in the Aliasfile MH profile 
component has
 been modified since the timestamp.
 If ARG is non-nil, set timestamp with the current time."
   (if arg
-      (let ((time (current-time)))
-        (setq mh-alias-tstamp (list (nth 0 time) (nth 1 time))))
+      (setq mh-alias-tstamp (current-time))
     (let ((stamp))
       (car (memq t (mapcar
                     (lambda (file)
diff --git a/lisp/midnight.el b/lisp/midnight.el
index b3adbf0..51173e7 100644
--- a/lisp/midnight.el
+++ b/lisp/midnight.el
@@ -159,7 +159,7 @@ the current date/time, buffer name, how many seconds ago it 
was
 displayed (can be nil if the buffer was never displayed) and its
 lifetime, i.e., its \"age\" when it will be purged."
   (interactive)
-  (let ((tm (current-time)) bts (ts (format-time-string "%Y-%m-%d %T"))
+  (let* ((tm (current-time)) bts (ts (format-time-string "%Y-%m-%d %T" tm))
         delay cbld bn)
     (dolist (buf (buffer-list))
       (when (buffer-live-p buf)
diff --git a/lisp/mouse.el b/lisp/mouse.el
index b5ca80a..af1eca1 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -330,7 +330,8 @@ the function `context-menu-filter-function'."
     ;; Remove duplicate separators as well as ones at the beginning or
     ;; end of the menu.
     (let ((l menu) saw-first-item)
-      (while (consp (cdr l))
+      (while (and (consp l)
+                  (consp (cdr l)))
         ;; If the next item is a separator, remove it if 1) we haven't
         ;; seen any other items yet, or 2) it's followed by either
         ;; another separator or the end of the list.
diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el
index 3fff539..4112497 100644
--- a/lisp/net/dbus.el
+++ b/lisp/net/dbus.el
@@ -2102,7 +2102,7 @@ has been handled by this function."
           (interface (dbus-event-interface-name event))
           (member (dbus-event-member-name event))
            (arguments (dbus-event-arguments event))
-           (time (time-to-seconds (current-time))))
+          (time (float-time)))
       (save-excursion
         ;; Check for matching method-call.
         (goto-char (point-max))
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index b4e9031..2375b14 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -716,8 +716,8 @@ that are joined after authentication."
         (setq rcirc-nick-table (make-hash-table :test 'equal))
         (setq rcirc-nick nick)
         (setq rcirc-startup-channels startup-channels)
-        (setq rcirc-last-server-message-time (current-time))
         (setq rcirc-last-connect-time (current-time))
+       (setq rcirc-last-server-message-time rcirc-last-connect-time)
 
         ;; Check if the immediate process state
         (sit-for .1)
diff --git a/lisp/net/sasl.el b/lisp/net/sasl.el
index b7f814f..0a3ecf9 100644
--- a/lisp/net/sasl.el
+++ b/lisp/net/sasl.el
@@ -174,21 +174,24 @@ It contain at least 64 bits of entropy."
 
 ;; stolen (and renamed) from message.el
 (defun sasl-unique-id-function ()
-  ;; Don't use microseconds from (current-time), they may be unsupported.
+  ;; Don't use fractional seconds from timestamp; they may be unsupported.
   ;; Instead we use this randomly inited counter.
   (setq sasl-unique-id-char
-       (% (1+ (or sasl-unique-id-char (logand (random) (1- (ash 1 20)))))
-          ;; (current-time) returns 16-bit ints,
-          ;; and 2^16*25 just fits into 4 digits i base 36.
-          (* 25 25)))
-  (let ((tm (current-time)))
+       ;; 2^16 * 25 just fits into 4 digits i base 36.
+       (let ((base (* 25 25)))
+         (if sasl-unique-id-char
+             (% (1+ sasl-unique-id-char) base)
+           (random base))))
+  (let ((tm (time-convert nil 'integer)))
     (concat
      (sasl-unique-id-number-base36
-      (+ (car   tm)
-        (ash (% sasl-unique-id-char 25) 16)) 4)
+      (+ (ash tm -16)
+        (ash (% sasl-unique-id-char 25) 16))
+      4)
      (sasl-unique-id-number-base36
-      (+ (nth 1 tm)
-        (ash (/ sasl-unique-id-char 25) 16)) 4))))
+      (+ (logand tm #xffff)
+        (ash (/ sasl-unique-id-char 25) 16))
+      4))))
 
 (defun sasl-unique-id-number-base36 (num len)
   (if (if (< len 0)
diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index ee0e824..63522b0 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -582,7 +582,7 @@ size, and full-buffer size."
         (setq shr-warning
               "Not rendering the complete page because of too-deep nesting")
       (when style
-       (if (string-match "color\\|display\\|border-collapse" style)
+       (if (string-match-p "color\\|display\\|border-collapse" style)
            (setq shr-stylesheet (nconc (shr-parse-style style)
                                        shr-stylesheet))
          (setq style nil)))
@@ -685,7 +685,7 @@ size, and full-buffer size."
        (goto-char (point-max)))))
    (t
     (let ((font-start (point)))
-      (when (and (string-match "\\`[ \t\n\r]" text)
+      (when (and (string-match-p "\\`[ \t\n\r]" text)
                 (not (bolp))
                 (not (eq (char-after (1- (point))) ? )))
        (insert " "))
@@ -843,7 +843,7 @@ size, and full-buffer size."
   (cond ((zerop (length url))
          (nth 3 base))
         ((or (not base)
-            (string-match "\\`[a-z]*:" url))
+            (string-match-p "\\`[a-z]*:" url))
         ;; Absolute or empty URI
         url)
        ((eq (aref url 0) ?/)
@@ -1028,7 +1028,7 @@ the mouse click event."
     (let ((param (match-string 4 data))
          (payload (url-unhex-string (match-string 5 data))))
       (when (and param
-                 (string-match "^.*\\(;[ \t]*base64\\)$" param))
+                 (string-match-p "^.*\\(;[ \t]*base64\\)$" param))
        (setq payload (ignore-errors
                         (base64-decode-string payload))))
       payload)))
@@ -1345,7 +1345,7 @@ ones, in case fg and bg are nil."
            ;; Filter out blocked elements inside the SVG image.
            (not (setq url (dom-attr elem ':xlink:href)))
            (not shr-blocked-images)
-           (not (string-match shr-blocked-images url)))
+           (not (string-match-p shr-blocked-images url)))
        (insert " ")
        (shr-dom-print elem)))))
   (insert (format "</%s>" (dom-tag dom))))
@@ -1432,7 +1432,7 @@ ones, in case fg and bg are nil."
 (defun shr-parse-style (style)
   (when style
     (save-match-data
-      (when (string-match "\n" style)
+      (when (string-search "\n" style)
         (setq style (replace-match " " t t style))))
     (let ((plist nil))
       (dolist (elem (split-string style ";"))
@@ -1491,7 +1491,7 @@ ones, in case fg and bg are nil."
     (let ((start (point))
          url multimedia image)
       (when-let* ((type (dom-attr dom 'type)))
-       (when (string-match "\\`image/svg" type)
+       (when (string-match-p "\\`image/svg" type)
          (setq url (dom-attr dom 'data)
                image t)))
       (dolist (child (dom-non-text-children dom))
@@ -1654,7 +1654,7 @@ The preference is a float determined from 
`shr-prefer-media-type'."
                        (list :width width :height height)))))
         ((or shr-inhibit-images
              (and shr-blocked-images
-                  (string-match shr-blocked-images url)))
+                  (string-match-p shr-blocked-images url)))
          (setq shr-start (point))
           (shr-insert alt))
         ((and (not shr-ignore-cache)
@@ -2463,7 +2463,7 @@ flags that control whether to collect or render objects."
          (max-width 0)
          natural-width)
       (when style
-       (setq style (and (string-match "color" style)
+       (setq style (and (string-search "color" style)
                         (shr-parse-style style))))
       (when bgcolor
        (setq style (nconc (list (cons 'background-color bgcolor))
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el
index 22e3142..6d83ae5 100644
--- a/lisp/net/tramp-gvfs.el
+++ b/lisp/net/tramp-gvfs.el
@@ -1595,7 +1595,7 @@ If FILE-SYSTEM is non-nil, return file system attributes."
       "%s" (if (or (null time)
                   (tramp-compat-time-equal-p time tramp-time-doesnt-exist)
                   (tramp-compat-time-equal-p time tramp-time-dont-know))
-              (current-time)
+              nil
             time)))))
 
 (defun tramp-gvfs-handle-get-remote-uid (vec id-format)
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 8d10659..8e66363 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -1429,7 +1429,7 @@ of."
             (if (or (null time)
                     (tramp-compat-time-equal-p time tramp-time-doesnt-exist)
                     (tramp-compat-time-equal-p time tramp-time-dont-know))
-                (current-time)
+                nil
               time)))
        (tramp-send-command-and-check
         v (format
diff --git a/lisp/net/tramp-sudoedit.el b/lisp/net/tramp-sudoedit.el
index c91bced..6da00f8 100644
--- a/lisp/net/tramp-sudoedit.el
+++ b/lisp/net/tramp-sudoedit.el
@@ -534,7 +534,7 @@ the result will be a local, non-Tramp, file name."
           (if (or (null time)
                   (tramp-compat-time-equal-p time tramp-time-doesnt-exist)
                   (tramp-compat-time-equal-p time tramp-time-dont-know))
-              (current-time)
+              nil
             time)))
       (tramp-sudoedit-send-command
        v "env" "TZ=UTC" "touch" "-t"
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index f43c1d8..552788b 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -2014,9 +2014,7 @@ ARGUMENTS to actually emit the message (if applicable)."
        (unless (bolp)
          (insert "\n"))
        ;; Timestamp.
-       (let ((now (current-time)))
-         (insert (format-time-string "%T." now))
-         (insert (format "%06d " (nth 2 now))))
+       (insert (format-time-string "%T.%6N "))
        ;; Calling Tramp function.  We suppress compat and trace
        ;; functions from being displayed.
        (let ((btn 1) btf fn)
diff --git a/lisp/nxml/rng-cmpct.el b/lisp/nxml/rng-cmpct.el
index dd30007..1476aa0 100644
--- a/lisp/nxml/rng-cmpct.el
+++ b/lisp/nxml/rng-cmpct.el
@@ -369,7 +369,7 @@ OVERRIDE is either nil, require or t."
     (while (re-search-forward "\\\\x+{\\([[:xdigit:]]+\\)}"
                              (point-max)
                              t)
-      (let* ((ch (decode-char 'ucs (string-to-number (match-string 1) 16))))
+      (let* ((ch (string-to-number (match-string 1) 16)))
        (if (and ch (> ch 0))
            (let ((begin (match-beginning 0))
                  (end (match-end 0)))
diff --git a/lisp/nxml/xmltok.el b/lisp/nxml/xmltok.el
index 6159e00..ecad501 100644
--- a/lisp/nxml/xmltok.el
+++ b/lisp/nxml/xmltok.el
@@ -943,7 +943,6 @@ and VALUE-END, otherwise a STRING giving the value."
        (let ((n (string-to-number (buffer-substring-no-properties start end)
                                base)))
          (cond ((and (integerp n) (xmltok-valid-char-p n))
-                (setq n (xmltok-unicode-to-char n))
                 (and n (string n)))
                (t
                 (xmltok-add-error "Invalid character code" start end)
@@ -971,11 +970,6 @@ and VALUE-END, otherwise a STRING giving the value."
        (t (and (> n #xFFFF)
                (< n #x110000)))))
 
-(defun xmltok-unicode-to-char (n)
-  "Return the character corresponding to Unicode scalar value N.
-Return nil if unsupported in Emacs."
-  (decode-char 'ucs n))
-
 ;;; Prolog parsing
 
 (defvar xmltok-contains-doctype nil)
@@ -1766,6 +1760,10 @@ and `xmltok-namespace-attributes'."
                 xmltok-type))
     (message "Scanned end of file")))
 
+;;; Obsolete
+
+(define-obsolete-function-alias 'xmltok-unicode-to-char #'identity "29.1")
+
 (provide 'xmltok)
 
 ;;; xmltok.el ends here
diff --git a/lisp/nxml/xsd-regexp.el b/lisp/nxml/xsd-regexp.el
index 3c29803..d6eaf7c 100644
--- a/lisp/nxml/xsd-regexp.el
+++ b/lisp/nxml/xsd-regexp.el
@@ -287,7 +287,7 @@ and whose tail is ACCUM."
 (defun xsdre-compile-single-char (ch)
   (if (memq ch '(?. ?* ?+ ?? ?\[ ?\] ?^ ?$ ?\\))
       (string ?\\ ch)
-    (string (decode-char 'ucs ch))))
+    (string ch)))
 
 (defun xsdre-char-class-to-range-list (cc)
   "Return a range-list for a symbolic char-class CC."
@@ -404,10 +404,6 @@ consisting of a single char alternative delimited with []."
                    (cons last chars)
                  (cons last (cons ?- chars))))))
       (setq range-list (cdr range-list)))
-    (setq chars
-         (mapcar (lambda (c)
-                   (decode-char 'ucs c))
-                 chars))
     (when caret
       (setq chars (cons ?^ chars)))
     (when hyphen
diff --git a/lisp/org/org-compat.el b/lisp/org/org-compat.el
index d230ee2..b140df7 100644
--- a/lisp/org/org-compat.el
+++ b/lisp/org/org-compat.el
@@ -170,8 +170,7 @@ extension beyond end of line was not controllable."
   (defsubst file-attribute-modification-time (attributes)
     "The modification time in ATTRIBUTES returned by `file-attributes'.
 This is the time of the last change to the file's contents, and
-is a list of integers (HIGH LOW USEC PSEC) in the same style
-as (current-time)."
+is a Lisp timestamp in the same style as `current-time'."
     (nth 5 attributes)))
 
 (unless (fboundp 'file-attribute-size)
diff --git a/lisp/pixel-scroll.el b/lisp/pixel-scroll.el
index 7722984..2e09f9a 100644
--- a/lisp/pixel-scroll.el
+++ b/lisp/pixel-scroll.el
@@ -133,7 +133,7 @@ This is only effective if supported by your mouse or 
touchpad."
   :type 'float
   :version "29.1")
 
-(defcustom pixel-scroll-precision-large-scroll-height 70
+(defcustom pixel-scroll-precision-large-scroll-height nil
   "Pixels that must be scrolled before an animation is performed.
 Nil means to not interpolate such scrolls."
   :group 'mouse
@@ -441,14 +441,13 @@ the height of the current window."
         (set-window-vscroll nil (+ (window-vscroll nil t)
                                    delta)
                             t)
-      (unless (eq (window-start) desired-start)
-        (set-window-start nil (if (zerop (window-hscroll))
-                                  desired-start
-                                (save-excursion
-                                  (goto-char desired-start)
-                                  (beginning-of-visual-line)
-                                  (point)))
-                          t))
+      (set-window-start nil (if (zerop (window-hscroll))
+                                desired-start
+                              (save-excursion
+                                (goto-char desired-start)
+                                (beginning-of-visual-line)
+                                (point)))
+                        t)
       (set-window-vscroll nil desired-vscroll t))
     (if (and (or (< (point) next-pos))
              (let ((pos-visibility (pos-visible-in-window-p next-pos nil t)))
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el
index 3a9185b..f3a7d96 100644
--- a/lisp/progmodes/vhdl-mode.el
+++ b/lisp/progmodes/vhdl-mode.el
@@ -10683,8 +10683,9 @@ Include a library specification, if not already there."
         (replace-match "" t t)
         (vhdl-template-insert-date))
        (goto-char beg)
-       (while (search-forward "<year>" end t)
-        (replace-match (format-time-string "%Y" nil) t t))
+       (let ((year (format-time-string "%Y")))
+        (while (search-forward "<year>" end t)
+          (replace-match year t t)))
        (goto-char beg)
        (when file-title
         (while (search-forward "<title string>" end t)
diff --git a/lisp/startup.el b/lisp/startup.el
index ab40d02..0065bf8 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -1989,8 +1989,9 @@ splash screen in another window."
       (setq-local browse-url-browser-function 'eww-browse-url)
       (setq tab-width 22)
       (setq buffer-read-only t)
+      ;; Place point somewhere it doesn't cover a character.
       (goto-char (point-min))
-      (forward-line 3))))
+      (re-search-forward "\n$" nil nil 2))))
 
 (defun fancy-splash-frame ()
   "Return the frame to use for the fancy splash screen.
diff --git a/lisp/subr.el b/lisp/subr.el
index 78c7283..d224f76 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -61,7 +61,8 @@ must be the first non-whitespace on a line.
 For more information, see Info node `(elisp)Declaring Functions'."
   (declare (advertised-calling-convention
            (fn file &optional arglist fileonly) nil))
-  ;; Does nothing - byte-compile-declare-function does the work.
+  ;; Does nothing - `byte-compile-macroexpand-declare-function' does
+  ;; the work.
   nil)
 
 
diff --git a/lisp/timezone.el b/lisp/timezone.el
index 2c96343..0fcdbdb 100644
--- a/lisp/timezone.el
+++ b/lisp/timezone.el
@@ -95,10 +95,7 @@ if nil, the local time zone is assumed."
 Optional argument TIMEZONE specifies a time zone."
   (let ((zone
         (if (listp timezone)
-            (let* ((m (timezone-zone-to-minute timezone))
-                   (absm (if (< m 0) (- m) m)))
-              (format "%c%02d%02d"
-                      (if (< m 0) ?- ?+) (/ absm 60) (% absm 60)))
+            (format-time-string "%z" 0 (or timezone 0))
           timezone)))
     (format "%02d %s %04d %s %s"
            day
diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el
index 8165d5e..32e4921 100644
--- a/lisp/vc/vc-dir.el
+++ b/lisp/vc/vc-dir.el
@@ -1427,7 +1427,12 @@ These are the commands available for use in the file 
status buffer:
       (vc-dir-refresh)
     ;; FIXME: find a better way to pass the backend to `vc-dir-mode'.
     (let ((use-vc-backend backend))
-      (vc-dir-mode))))
+      (vc-dir-mode)
+      ;; Activate the backend-specific minor mode, if any.
+      (when-let ((minor-mode
+                  (intern-soft (format "vc-dir-%s-mode"
+                                       (downcase (symbol-name backend))))))
+        (funcall minor-mode 1)))))
 
 (defun vc-default-dir-extra-headers (_backend _dir)
   ;; Be loud by default to remind people to add code to display
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index 4b6cd93..3ceed36 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -298,12 +298,14 @@ included in the completions."
              (vc-git--run-command-string nil "version")))
         (setq vc-git--program-version
               (if (and version-string
-                       ;; Git for Windows appends ".windows.N" to the
-                       ;; numerical version reported by Git.
-                       (string-match
-                        "git version \\([0-9.]+\\)\\(\\.windows\\.[0-9]+\\)?$"
-                        version-string))
-                  (match-string 1 version-string)
+                       ;; Some Git versions append additional strings
+                       ;; to the numerical version string. E.g., Git
+                       ;; for Windows appends ".windows.N", while Git
+                       ;; for Mac appends " (Apple Git-N)". Capture
+                       ;; numerical version and ignore the rest.
+                       (string-match "git version \\([0-9][0-9.]+\\)"
+                                     version-string))
+                  (string-trim-right (match-string 1 version-string) "\\.")
                 "0")))))
 
 (defun vc-git--git-status-to-vc-state (code-list)
@@ -1870,6 +1872,16 @@ Returns nil if not possible."
                                                       (1- (point-max)))))))
          (and name (not (string= name "undefined")) name))))
 
+(defvar-keymap vc-dir-git-mode-map
+  "z c" #'vc-git-stash
+  "z s" #'vc-git-stash-snapshot)
+
+(define-minor-mode vc-dir-git-mode
+  "A minor mode for git-specific commands in `vc-dir-mode' buffers.
+Also note that there are git stash commands available in the
+\"Stash\" section at the head of the buffer."
+  :lighter " Git")
+
 (provide 'vc-git)
 
 ;;; vc-git.el ends here
diff --git a/lisp/xml.el b/lisp/xml.el
index 0282e37..e2ba02e 100644
--- a/lisp/xml.el
+++ b/lisp/xml.el
@@ -612,8 +612,8 @@ references."
        (if (setq ref (match-string 2))
            (progn  ; Numeric char reference
              (setq val (save-match-data
-                         (decode-char 'ucs (string-to-number
-                                            ref (if (match-string 1) 16)))))
+                          (string-to-number
+                           ref (if (match-string 1) 16))))
              (and (null val)
                   xml-validating-parser
                   (error "XML: (Validity) Invalid character reference `%s'"
@@ -898,11 +898,11 @@ references and parameter-entity references."
            ref val)
        (cond ((setq ref (match-string 1 string))
               ;; Decimal character reference
-              (setq val (decode-char 'ucs (string-to-number ref)))
+               (setq val (string-to-number ref))
               (if val (push (string val) children)))
              ;; Hexadecimal character reference
              ((setq ref (match-string 2 string))
-              (setq val (decode-char 'ucs (string-to-number ref 16)))
+               (setq val (string-to-number ref 16))
               (if val (push (string val) children)))
              ;; Parameter entity reference
              ((setq ref (match-string 3 string))
@@ -962,7 +962,7 @@ STRING is assumed to occur in an XML attribute value."
        (if ref
            ;; [4.6] Character references are included as
            ;; character data.
-           (let ((val (decode-char 'ucs (string-to-number ref (if is-hex 
16)))))
+            (let ((val (string-to-number ref (if is-hex 16))))
              (push (cond (val (string val))
                          (xml-validating-parser
                           (error "XML: (Validity) Undefined character `x%s'" 
ref))
diff --git a/src/gtkutil.c b/src/gtkutil.c
index d872d39..225984a 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -684,8 +684,13 @@ xg_check_special_colors (struct frame *f,
   block_input ();
   {
 #ifdef HAVE_GTK3
+#ifndef HAVE_PGTK
     GtkStyleContext *gsty
       = gtk_widget_get_style_context (FRAME_GTK_OUTER_WIDGET (f));
+#else
+    GtkStyleContext *gsty
+      = gtk_widget_get_style_context (FRAME_WIDGET (f));
+#endif
     GdkRGBA col;
     char buf[sizeof "rgb://rrrr/gggg/bbbb"];
     int state = GTK_STATE_FLAG_SELECTED|GTK_STATE_FLAG_FOCUSED;
diff --git a/src/image.c b/src/image.c
index 3ba3d57..f818829 100644
--- a/src/image.c
+++ b/src/image.c
@@ -9101,7 +9101,7 @@ webp_load (struct frame *f, struct image *img)
 {
   ptrdiff_t size = 0;
   uint8_t *contents;
-  Lisp_Object file;
+  Lisp_Object file = Qnil;
 
   /* Open the WebP file.  */
   Lisp_Object specified_file = image_spec_value (img->spec, QCfile, NULL);
@@ -9138,7 +9138,7 @@ webp_load (struct frame *f, struct image *img)
   /* Validate the WebP image header.  */
   if (!WebPGetInfo (contents, size, NULL, NULL))
     {
-      if (NILP (specified_data))
+      if (!NILP (file))
        image_error ("Not a WebP file: `%s'", file);
       else
        image_error ("Invalid header in WebP image data");
@@ -9161,7 +9161,7 @@ webp_load (struct frame *f, struct image *img)
     case VP8_STATUS_USER_ABORT:
     default:
       /* Error out in all other cases.  */
-      if (NILP (specified_data))
+      if (!NILP (file))
        image_error ("Error when interpreting WebP image data: `%s'", file);
       else
        image_error ("Error when interpreting WebP image data");
diff --git a/src/pgtkfns.c b/src/pgtkfns.c
index 7459145..5fc5bb4 100644
--- a/src/pgtkfns.c
+++ b/src/pgtkfns.c
@@ -3551,17 +3551,23 @@ frame_geometry (Lisp_Object frame, Lisp_Object 
attribute)
 
   /* Get these here because they can't be got in configure_event(). */
   int left_pos, top_pos;
-  if (FRAME_GTK_OUTER_WIDGET (f)) {
-    gtk_window_get_position (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
-                            &left_pos, &top_pos);
-  } else {
-    if (FRAME_GTK_WIDGET (f) == NULL)
-      return Qnil;    /* This can occur while creating a frame. */
-    GtkAllocation alloc;
-    gtk_widget_get_allocation (FRAME_GTK_WIDGET (f), &alloc);
-    left_pos = alloc.x;
-    top_pos = alloc.y;
-  }
+
+  if (FRAME_GTK_OUTER_WIDGET (f))
+    {
+      gtk_window_get_position (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
+                              &left_pos, &top_pos);
+    }
+  else
+    {
+      GtkAllocation alloc;
+
+      if (FRAME_GTK_WIDGET (f) == NULL)
+       return Qnil;    /* This can occur while creating a frame.  */
+
+      gtk_widget_get_allocation (FRAME_GTK_WIDGET (f), &alloc);
+      left_pos = alloc.x;
+      top_pos = alloc.y;
+    }
 
   int native_left = left_pos + border;
   int native_top = top_pos + border + title_height;
diff --git a/src/pgtkterm.c b/src/pgtkterm.c
index 4bfe2ef..1e8d49c 100644
--- a/src/pgtkterm.c
+++ b/src/pgtkterm.c
@@ -803,7 +803,8 @@ x_set_parent_frame (struct frame *f, Lisp_Object new_value,
       FRAME_X_OUTPUT (f)->border_color_css_provider = NULL;
       {
        GtkStyleContext *ctxt = gtk_widget_get_style_context (FRAME_WIDGET (f));
-       gtk_style_context_remove_provider (ctxt, GTK_STYLE_PROVIDER (provider));
+       if (provider != NULL)
+         gtk_style_context_remove_provider (ctxt, GTK_STYLE_PROVIDER 
(provider));
       }
 
       {
@@ -850,8 +851,11 @@ x_set_parent_frame (struct frame *f, Lisp_Object new_value,
       GtkStyleContext *ctxt = gtk_widget_get_style_context (FRAME_WIDGET (f));
       GtkCssProvider *old = FRAME_X_OUTPUT (f)->border_color_css_provider;
       FRAME_X_OUTPUT (f)->border_color_css_provider = provider;
-      gtk_style_context_add_provider (ctxt, GTK_STYLE_PROVIDER (provider),
-                                     GTK_STYLE_PROVIDER_PRIORITY_USER);
+      if (provider != NULL)
+       {
+         gtk_style_context_add_provider (ctxt, GTK_STYLE_PROVIDER (provider),
+                                         GTK_STYLE_PROVIDER_PRIORITY_USER);
+       }
       if (old != NULL)
        {
          gtk_style_context_remove_provider (ctxt, GTK_STYLE_PROVIDER (old));
@@ -3050,10 +3054,11 @@ pgtk_bitmap_icon (struct frame *f, Lisp_Object file)
 bool
 pgtk_text_icon (struct frame *f, const char *icon_name)
 {
-  if (FRAME_GTK_OUTER_WIDGET (f)) {
-    gtk_window_set_icon (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)), NULL);
-    gtk_window_set_title (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)), icon_name);
-  }
+  if (FRAME_GTK_OUTER_WIDGET (f))
+    {
+      gtk_window_set_icon (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)), NULL);
+      gtk_window_set_title (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)), 
icon_name);
+    }
 
   return false;
 }
@@ -5379,13 +5384,17 @@ done:
 }
 
 static gboolean
-key_release_event (GtkWidget * widget, GdkEvent * event, gpointer * user_data)
+key_release_event (GtkWidget *widget,
+                  GdkEvent *event,
+                  gpointer *user_data)
 {
   return TRUE;
 }
 
 static gboolean
-configure_event (GtkWidget * widget, GdkEvent * event, gpointer * user_data)
+configure_event (GtkWidget *widget,
+                GdkEvent *event,
+                gpointer *user_data)
 {
   struct frame *f = pgtk_any_window_to_frame (event->configure.window);
   if (f && widget == FRAME_GTK_OUTER_WIDGET (f))
@@ -5405,7 +5414,9 @@ configure_event (GtkWidget * widget, GdkEvent * event, 
gpointer * user_data)
 }
 
 static gboolean
-map_event (GtkWidget * widget, GdkEvent * event, gpointer * user_data)
+map_event (GtkWidget *widget,
+          GdkEvent *event,
+          gpointer *user_data)
 {
   struct frame *f = pgtk_any_window_to_frame (event->any.window);
   union buffered_input_event inev;
@@ -5452,8 +5463,9 @@ map_event (GtkWidget * widget, GdkEvent * event, gpointer 
* user_data)
 }
 
 static gboolean
-window_state_event (GtkWidget * widget, GdkEvent * event,
-                   gpointer * user_data)
+window_state_event (GtkWidget *widget,
+                   GdkEvent *event,
+                   gpointer *user_data)
 {
   struct frame *f = pgtk_any_window_to_frame (event->window_state.window);
   union buffered_input_event inev;
@@ -5486,7 +5498,8 @@ window_state_event (GtkWidget * widget, GdkEvent * event,
 }
 
 static gboolean
-delete_event (GtkWidget * widget, GdkEvent * event, gpointer * user_data)
+delete_event (GtkWidget *widget,
+             GdkEvent *event, gpointer *user_data)
 {
   struct frame *f = pgtk_any_window_to_frame (event->any.window);
   union buffered_input_event inev;
@@ -5561,8 +5574,8 @@ x_focus_changed (gboolean is_enter, int state,
 }
 
 static gboolean
-enter_notify_event (GtkWidget * widget, GdkEvent * event,
-                   gpointer * user_data)
+enter_notify_event (GtkWidget *widget, GdkEvent *event,
+                   gpointer *user_data)
 {
   union buffered_input_event inev;
   struct frame *frame =
diff --git a/src/xdisp.c b/src/xdisp.c
index 080c906..971015e 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -30294,7 +30294,8 @@ produce_stretch_glyph (struct it *it)
         Compute the width of the characters having this `display'
         property.  */
       struct it it2;
-      Lisp_Object object = it->stack[it->sp - 1].string;
+      Lisp_Object object =
+       it->sp > 0 ? it->stack[it->sp - 1].string : it->string;
       unsigned char *p = (STRINGP (object)
                          ? SDATA (object) + IT_STRING_BYTEPOS (*it)
                          : BYTE_POS_ADDR (IT_BYTEPOS (*it)));
@@ -30396,7 +30397,8 @@ produce_stretch_glyph (struct it *it)
   if (width > 0 && height > 0 && it->glyph_row)
     {
       Lisp_Object o_object = it->object;
-      Lisp_Object object = it->stack[it->sp - 1].string;
+      Lisp_Object object =
+       it->sp > 0 ? it->stack[it->sp - 1].string : it->string;
       int n = width;
 
       if (!STRINGP (object))
diff --git a/test/Makefile.in b/test/Makefile.in
index 51696d7..f2c4958 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -368,7 +368,7 @@ maintainer-clean: distclean bootstrap-clean
 .PHONY: check-declare
 
 check-declare:
-       $(emacs) -l check-declare \
+       $(emacs) --batch -l check-declare \
          --eval '(check-declare-directory "$(srcdir)")'
 
 .PHONY: subdirs subdir-targets generate-test-jobs
diff --git a/test/lisp/autorevert-tests.el b/test/lisp/autorevert-tests.el
index b9d4532..b31f0a9 100644
--- a/test/lisp/autorevert-tests.el
+++ b/test/lisp/autorevert-tests.el
@@ -127,7 +127,7 @@ This expects `auto-revert--messages' to be bound by
 `ert-with-message-capture' before calling."
   ;; Remote files do not cooperate well with timers.  So we count ourselves.
   (let ((ct (current-time)))
-    (while (and (< (float-time (time-subtract (current-time) ct))
+    (while (and (< (float-time (time-subtract nil ct))
                    (auto-revert--timeout))
                 (null (string-match
                        (format-message
@@ -167,7 +167,7 @@ This expects `auto-revert--messages' to be bound by
 
 (defun auto-revert-tests--write-file (text file time-delta &optional append)
   (write-region text nil file append 'no-message)
-  (set-file-times file (time-subtract (current-time) time-delta)))
+  (set-file-times file (time-subtract nil time-delta)))
 
 (ert-deftest auto-revert-test00-auto-revert-mode ()
   "Check autorevert for a file."
@@ -453,7 +453,7 @@ This expects `auto-revert--messages' to be bound by
 (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)
+    (while (and (< (float-time (time-subtract nil ct)) max-wait)
                 (not (funcall pred)))
       (read-event nil nil 0.1))))
 
diff --git a/test/lisp/calendar/time-date-tests.el 
b/test/lisp/calendar/time-date-tests.el
index d526980..ed842e3 100644
--- a/test/lisp/calendar/time-date-tests.el
+++ b/test/lisp/calendar/time-date-tests.el
@@ -55,13 +55,13 @@
   (should (date-leap-year-p 2004)))
 
 (ert-deftest test-days-to-time ()
-  (should (equal (days-to-time 0) '(0 0)))
-  (should (equal (days-to-time 1) '(1 20864)))
-  (should (equal (days-to-time 999) '(1317 2688)))
-  (should (equal (days-to-time 0.0) '(0 0 0 0)))
-  (should (equal (days-to-time 0.5) '(0 43200 0 0)))
-  (should (equal (days-to-time 1.0) '(1 20864 0 0)))
-  (should (equal (days-to-time 999.0) '(1317 2688 0 0))))
+  (should (time-equal-p (days-to-time 0) '(0 0)))
+  (should (time-equal-p (days-to-time 1) '(1 20864)))
+  (should (time-equal-p (days-to-time 999) '(1317 2688)))
+  (should (time-equal-p (days-to-time 0.0) '(0 0 0 0)))
+  (should (time-equal-p (days-to-time 0.5) '(0 43200 0 0)))
+  (should (time-equal-p (days-to-time 1.0) '(1 20864 0 0)))
+  (should (time-equal-p (days-to-time 999.0) '(1317 2688 0 0))))
 
 (ert-deftest test-seconds-to-string ()
   (should (equal (seconds-to-string 0) "0s"))
@@ -170,7 +170,8 @@
 
 (ert-deftest test-time-since ()
   (should (time-equal-p 0 (time-since nil)))
-  (should (= (cadr (time-since (time-subtract (current-time) 1))) 1)))
+  (should (time-equal-p 1 (time-convert (time-since (time-subtract nil 1))
+                                        'integer))))
 
 (ert-deftest test-time-decoded-period ()
   (should (equal (decoded-time-period '(nil nil 1 nil nil nil nil nil nil))
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index 47fa18e..c047f66 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -241,7 +241,7 @@ is greater than 10.
         (progn ,@body)
        (tramp--test-message
        "%s %f sec"
-       ,message (float-time (time-subtract (current-time) start))))))
+       ,message (float-time (time-subtract nil start))))))
 
 ;; `always' is introduced with Emacs 28.1.
 (defalias 'tramp--test-always
diff --git a/test/lisp/vc/vc-git-tests.el b/test/lisp/vc/vc-git-tests.el
new file mode 100644
index 0000000..997ab3c
--- /dev/null
+++ b/test/lisp/vc/vc-git-tests.el
@@ -0,0 +1,67 @@
+;;; vc-git-tests.el --- tests for vc/vc-git.el  -*- lexical-binding:t -*-
+
+;; Copyright (C) 2016-2021 Free Software Foundation, Inc.
+
+;; Author: Justin Schell <justinmschell@gmail.com>
+;; Maintainer: emacs-devel@gnu.org
+
+;; 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 'vc-git)
+
+(ert-deftest vc-git-test-program-version-general ()
+  (vc-git-test--run-program-version-test
+   "git version 2.30.1.0"
+   "2.30.1.0"))
+
+(ert-deftest vc-git-test-program-version-windows ()
+  (vc-git-test--run-program-version-test
+   "git version 2.30.1.1.windows.1"
+   "2.30.1.1"))
+
+(ert-deftest vc-git-test-program-version-apple ()
+  (vc-git-test--run-program-version-test
+   "git version 2.30.1.2 (Apple Git-130)"
+   "2.30.1.2"))
+
+(ert-deftest vc-git-test-program-version-other ()
+  (vc-git-test--run-program-version-test
+   "git version 2.30.1.3.foo.bar"
+   "2.30.1.3"))
+
+(ert-deftest vc-git-test-program-version-invalid-leading-string ()
+  (vc-git-test--run-program-version-test
+   "git version foo.bar.2.30.1.4"
+   "0"))
+
+(ert-deftest vc-git-test-program-version-invalid-leading-dot ()
+  (vc-git-test--run-program-version-test
+   "git version .2.30.1.5"
+   "0"))
+
+(defun vc-git-test--run-program-version-test
+    (mock-version-string expected-output)
+  (cl-letf* (((symbol-function 'vc-git--run-command-string)
+              (lambda (_file _args) mock-version-string))
+             (vc-git--program-version nil)
+             (actual-output (vc-git--program-version)))
+    (should (equal actual-output expected-output))))
+
+;;; vc-git-tests.el ends here
diff --git a/test/manual/cedet/cedet-utests.el 
b/test/manual/cedet/cedet-utests.el
index d68b5b8..af6b4de 100644
--- a/test/manual/cedet/cedet-utests.el
+++ b/test/manual/cedet/cedet-utests.el
@@ -252,9 +252,7 @@ Optional argument TITLE is the title of this testing 
session."
 (defun cedet-utest-elapsed-time (start end)
   "Copied from elp.el.  Was elp-elapsed-time.
 Argument START and END bound the time being calculated."
-  (+ (* (- (car end) (car start)) 65536.0)
-     (- (car (cdr end)) (car (cdr start)))
-     (/ (- (car (cdr (cdr end))) (car (cdr (cdr start)))) 1000000.0)))
+  (float-time (time-subtract start end)))
 
 (defun cedet-utest-log-shutdown (title &optional _errorcondition)
   "Shut-down a larger test suite.
diff --git a/test/src/timefns-tests.el b/test/src/timefns-tests.el
index bba9b3f..f801478 100644
--- a/test/src/timefns-tests.el
+++ b/test/src/timefns-tests.el
@@ -242,4 +242,16 @@ a fixed place on the right and are padded on the left."
           (should (= xdiv (float-time (time-convert xdiv t))))))
       (setq x (* x 2)))))
 
+(ert-deftest time-convert-forms ()
+  ;; These computations involve numbers that should have exact
+  ;; representations on any Emacs platform.
+  (dolist (time '(-86400 -1 0 1 86400))
+    (dolist (delta '(0 0.0 0.25 3.25 1000 1000.25))
+      (let ((time+ (+ time delta))
+           (time- (- time delta)))
+       (dolist (form '(nil t list 4 1000 1000000 1000000000))
+         (should (time-equal-p time (time-convert time form)))
+         (should (time-equal-p time- (time-convert time- form)))
+         (should (time-equal-p time+ (time-convert time+ form))))))))
+
 ;;; timefns-tests.el ends here



reply via email to

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