emacs-diffs
[Top][All Lists]
Advanced

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

master 804415b8cc 5/5: Merge remote-tracking branch 'refs/remotes/origin


From: Stefan Monnier
Subject: master 804415b8cc 5/5: Merge remote-tracking branch 'refs/remotes/origin/master'
Date: Wed, 1 Jun 2022 22:34:11 -0400 (EDT)

branch: master
commit 804415b8cc1dab0f2f49ad05bb5f47431fcc9e57
Merge: 5255fa452f d9e106c72e
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    Merge remote-tracking branch 'refs/remotes/origin/master'
---
 admin/MAINTAINERS                  |   4 +-
 doc/emacs/mark.texi                |  13 +-
 doc/lispref/frames.texi            |  69 +++--
 doc/misc/modus-themes.org          | 294 +++++++++++++------
 etc/HELLO                          |   1 +
 etc/NEWS                           |  11 +
 etc/publicsuffix.txt               |  24 +-
 etc/themes/modus-operandi-theme.el |   4 +-
 etc/themes/modus-themes.el         | 579 +++++++++++++------------------------
 etc/themes/modus-vivendi-theme.el  |   4 +-
 leim/Makefile.in                   |   4 +-
 lisp/Makefile.in                   |  27 +-
 lisp/bookmark.el                   |   9 +-
 lisp/delsel.el                     |  21 +-
 lisp/dired.el                      |  10 +-
 lisp/emacs-lisp/loaddefs-gen.el    |  11 +-
 lisp/international/fontset.el      |   3 +-
 lisp/language/misc-lang.el         |  22 ++
 lisp/leim/quail/misc-lang.el       | 101 +++++++
 lisp/play/gamegrid.el              |  10 +-
 lisp/select.el                     |  40 +--
 lisp/simple.el                     |   2 +-
 lisp/term/haiku-win.el             |  27 +-
 lisp/term/ns-win.el                |   4 +-
 src/emacs.c                        |   5 +
 src/haiku_support.cc               |   3 +-
 src/nsselect.m                     |  14 +-
 src/nsterm.h                       |   5 +-
 src/nsterm.m                       |  68 +++--
 src/xselect.c                      |  19 +-
 src/xterm.c                        | 140 ++++++---
 test/lisp/files-tests.el           |  16 +-
 32 files changed, 950 insertions(+), 614 deletions(-)

diff --git a/admin/MAINTAINERS b/admin/MAINTAINERS
index 2760a9a42b..f0239db008 100644
--- a/admin/MAINTAINERS
+++ b/admin/MAINTAINERS
@@ -305,7 +305,9 @@ Tramp
 
 Modus themes
         Maintainer: Protesilaos Stavrou
-        Repository and issue tracker: 
https://gitlab.com/protesilaos/modus-themes
+        Repository:  https://git.sr.ht/~protesilaos
+        Mailing list: https://lists.sr.ht/~protesilaos/modus-themes
+        Bug Reports: M-x modus-themes-report-bug
 
         doc/misc/modus-themes.org
         etc/themes/modus*.el
diff --git a/doc/emacs/mark.texi b/doc/emacs/mark.texi
index 91c44d527b..ad25ed6a8a 100644
--- a/doc/emacs/mark.texi
+++ b/doc/emacs/mark.texi
@@ -291,12 +291,23 @@ instead signal an error if the mark is inactive.
 @cindex Delete Selection mode
 @cindex mode, Delete Selection
 @findex delete-selection-mode
+@vindex delete-selection-temporary-region
   By default, text insertion occurs normally even if the mark is
 active---for example, typing @kbd{a} inserts the character @samp{a},
 then deactivates the mark.  Delete Selection mode, a minor mode,
 modifies this behavior: if you enable that mode, then inserting text
 while the mark is active causes the text in the region to be deleted
-first.  To toggle Delete Selection mode on or off, type @kbd{M-x
+first.  However, you can tune this behavior by customizing the
+@code{delete-selection-temporary-region} option.  Its default value is
+@code{nil}, but you can set it to @code{t}, in which case only
+temporarily-active regions will be replaced: those which are set by
+dragging the mouse (@pxref{Setting Mark}) or by shift-selection
+(@pxref{Shift Selection}), as well as by @kbd{C-u C-x C-x} when
+Transient Mark Mode is disabled.  You can further tune the behavior by
+setting @code{delete-selection-temporary-region} to @code{selection}:
+then temporary regions by @kbd{C-u C-x C-x} won't be replaced, only
+the ones activated by dragging the mouse or shift-selection.  To
+toggle Delete Selection mode on or off, type @kbd{M-x
 delete-selection-mode}.
 
 @node Mark Ring
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi
index 20e9c17f1f..a2a74f8148 100644
--- a/doc/lispref/frames.texi
+++ b/doc/lispref/frames.texi
@@ -3943,6 +3943,13 @@ overlay or a pair of markers stands for text in the 
overlay or between
 the markers.  The argument @var{data} may also be a vector of valid
 non-vector selection values.
 
+If @var{data} is a string, then its text properties can specify values
+used for individual data types.  For example, if @var{data} has a
+property named @code{text/uri-list}, then a call to
+@code{gui-get-selection} with the data type @code{text/uri-list} will
+result in the value of that property being used instead of @var{data}
+itself.
+
 This function returns @var{data}.
 @end deffn
 
@@ -4029,16 +4036,46 @@ amount of different data types on the clipboard.
 @section Drag and Drop
 @cindex drag and drop
 
+  When the user drops something from another application over Emacs,
+Emacs will try to insert any text and open any URL that was dropped.
+If text was dropped, then it will always be inserted at the location
+of the mouse pointer when the drop happened, or saved in the kill ring
+if insertion failed (which can happen if the buffer is read-only).  If
+it was an URL, then Emacs tries to call an appropriate handler
+function by first matching the URL against regexps defined in
+@code{dnd-protocol-alist}, and then against @code{browse-url-handlers}
+and @code{browse-url-default-handlers}, and failing that, inserting
+the URL as plain text.
+
+@defvar dnd-protocol-alist
+  This variable is a list of cons cells of the form
+@w{@code{(@var{pattern} . @var{action})}}.  @var{pattern} is a regexp
+that URLs are matched against after being dropped.  @var{action} is a
+function that is called with two arguments should a URL being dropped
+match @var{pattern}: the URL being dropped, and the action being
+performed for the drop (one of the symbols @code{copy}, @code{move},
+@code{link}, @code{private} or @code{ask}).
+@end defvar
+
+@cindex drag and drop, X
+@cindex drag and drop, other formats
+  Emacs implements drag-and-drop for text and URLs individually for
+each window system, and does not by default support the dropping of
+anything else.  Code that wishes to support the dropping of content
+types not supported by Emacs can utilize the X-specific interface
+described below:
+
 @vindex x-dnd-test-function
 @vindex x-dnd-known-types
-  When a user drags something from another application over Emacs, that other
-application expects Emacs to tell it if Emacs can handle the data that is
-dragged.  The variable @code{x-dnd-test-function} is used by Emacs to determine
-what to reply.  The default value is @code{x-dnd-default-test-function}
-which accepts drops if the type of the data to be dropped is present in
-@code{x-dnd-known-types}.  You can customize @code{x-dnd-test-function} and/or
-@code{x-dnd-known-types} if you want Emacs to accept or reject drops based
-on some other criteria.
+  When a user drags something from another application over Emacs on
+the X Window System, that other application expects Emacs to tell it
+if Emacs can handle the data that was dragged.  The variable
+@code{x-dnd-test-function} is used by Emacs to determine what to
+reply.  The default value is @code{x-dnd-default-test-function} which
+accepts drops if the type of the data to be dropped is present in
+@code{x-dnd-known-types}.  You can customize
+@code{x-dnd-test-function} and/or @code{x-dnd-known-types} if you want
+Emacs to accept or reject drops based on some other criteria.
 
 @vindex x-dnd-types-alist
   If you want to change the way Emacs handles drop of different types
@@ -4046,16 +4083,12 @@ or add a new type, customize @code{x-dnd-types-alist}.  
This requires
 detailed knowledge of what types other applications use for drag and
 drop.
 
-@vindex dnd-protocol-alist
-@vindex browse-url-handlers
-@vindex browse-url-default-handlers
-  When an URL is dropped on Emacs it may be a file, but it may also be
-another URL type (https, etc.).  Emacs first checks
-@code{dnd-protocol-alist} to determine what to do with the URL@.  If
-there is no match there, Emacs looks for a match in
-@code{browse-url-handlers} and @code{browse-url-default-handlers}.  If
-still no match has been found, the text for the URL is inserted.  If
-you want to alter Emacs behavior, you can customize these variables.
+  Those data types are typically implemented as special data types an
+X selection provided by the other application can be converted to.
+They can either be the same data types that are typically accepted by
+@code{gui-set-selection}, or they can be MIME types, depending on the
+specific drag-n-drop protocol being used.  Plain text may be
+@code{"STRING"} or @code{"text/plain"}, for example.
 
 @cindex initiating drag-and-drop
   On capable window systems, Emacs also supports dragging contents
diff --git a/doc/misc/modus-themes.org b/doc/misc/modus-themes.org
index 42ad3ee35f..7b566f51c2 100644
--- a/doc/misc/modus-themes.org
+++ b/doc/misc/modus-themes.org
@@ -5,9 +5,9 @@
 #+options: ':t toc:nil author:t email:t num:t
 #+startup: content
 
-#+macro: stable-version 2.3.0
-#+macro: release-date 2022-04-01
-#+macro: development-version 2.4.0-dev
+#+macro: stable-version 2.4.0
+#+macro: release-date 2022-06-01
+#+macro: development-version 2.5.0-dev
 #+macro: file @@texinfo:@file{@@$1@@texinfo:}@@
 #+macro: space @@texinfo:@: @@
 #+macro: kbd @@texinfo:@kbd{@@$1@@texinfo:}@@
@@ -34,6 +34,10 @@ explicitly marked as such.
 
 Current development target is {{{development-version}}}.
 
++ Homepage: https://protesilaos.com/emacs/modus-themes.
++ Git repository: https://git.sr.ht/~protesilaos/modus-themes.
++ Mailing list: https://lists.sr.ht/~protesilaos/modus-themes.
+
 #+toc: headlines 8 insert TOC here, with eight headline levels
 
 * COPYING
@@ -165,14 +169,10 @@ The themes are now ready to be used: 
[[#h:3f3c3728-1b34-437d-9d0c-b110f5b161a9][
 The ~modus-themes~ package is available from the GNU ELPA archive, which
 is configured by default.
 
-Prior to querying any package archive, make sure to have updated the
-index, with {{{kbd(M-x package-refresh-contents)}}}.  Then all you need to do
+Prior to querying any package archive, make sure to update the index,
+with {{{kbd(M-x package-refresh-contents)}}}.  Then all you need to do
 is type {{{kbd(M-x package-install)}}} and specify the ~modus-themes~.
 
-Note that older versions of the themes used to be distributed as
-standalone packages.  This practice has been discontinued starting with
-version 1.0.0 of this project.
-
 Once installed, the themes are ready to be used: 
[[#h:3f3c3728-1b34-437d-9d0c-b110f5b161a9][Enable and load]].
 
 ** Install on GNU/Linux
@@ -211,6 +211,34 @@ guix package -i emacs-modus-themes
 
 They are now ready to be used: 
[[#h:3f3c3728-1b34-437d-9d0c-b110f5b161a9][Enable and load]].
 
+** Dealing with byte compilation errors
+:properties:
+:custom_id: h:e6268471-e847-4c9d-998f-49a83257b7f1
+:end:
+
+From time to time, we receive bug reports pertaining to errors with byte
+compilation.  These seldom have to do with faulty code in the themes: it
+might be a shortcoming of =package.el=, some regression in the current
+development target of Emacs, a misconfiguration in an otherwise exotic
+setup, and the like.
+
+The common solution with a stable version of Emacs is to:
+
+1. Delete the =modus-themes= package.
+2. Close the current Emacs session.
+3. Install the =modus-themes= again.
+
+For those building Emacs directly from source, the solution may involve
+reverting to an earlier commit in emacs.git.
+
+At any rate, if you encounter such an issue please report it: we will
+either fix the bug on our end if it is truly ours, or help forward it to
+the relevant upstream maintainer.  Whatever you do, please understand
+that a build failure does not mean we are necessarily doing something
+wrong.
+
+[[#h:6536c8d5-3f98-43ab-a787-b94120e735e8][Issues you can help with]].
+
 * Enable and load
 :properties:
 :custom_id: h:3f3c3728-1b34-437d-9d0c-b110f5b161a9
@@ -4053,6 +4081,44 @@ comments are gray.  Regexp constructs are adapted 
accordingly.
     (set-face-attribute 'font-lock-warning-face nil :inherit 
'modus-themes-bold :foreground red-nuanced-fg)))
 #+end_src
 
+** Custom hl-todo colors
+:PROPERTIES:
+:CUSTOM_ID: h:2ef83a21-2f0a-441e-9634-473feb940743
+:END:
+
+The =hl-todo= package provides the user option ~hl-todo-keyword-faces~:
+it specifies a pair of keyword and corresponding color value.  The Modus
+themes configure that option in the interest of legibility.  While this
+works for our purposes, users may still prefer to apply their custom
+values, in which case the following approach is necessary:
+
+#+begin_src emacs-lisp
+(defun my-modus-themes-hl-todo-faces ()
+  (setq hl-todo-keyword-faces '(("TODO" . "#ff0000")
+                                ("HACK" . "#ffff00")
+                                ("XXX" . "#00ffff")
+                                ("NOTE" . "#ff00ff"))))
+
+(add-hook 'modus-themes-after-load-theme-hook #'my-modus-themes-hl-todo-faces)
+#+end_src
+
+Or include a ~let~ form, if needed:
+
+#+begin_src emacs-lisp
+(defun my-modus-themes-hl-todo-faces ()
+  (let ((red "#ff0000")
+        (blue "#0000ff"))
+    (setq hl-todo-keyword-faces `(("TODO" . ,blue)
+                                  ("HACK" . ,red)
+                                  ("XXX" . ,red)
+                                  ("NOTE" . ,blue)))))
+
+(add-hook 'modus-themes-after-load-theme-hook #'my-modus-themes-hl-todo-faces)
+#+end_src
+
+Normally, we do not touch user options, though this is an exception:
+otherwise the defaults are not always legible.
+
 * Face coverage
 :properties:
 :custom_id: h:a9c8f29d-7f72-4b54-b74b-ddefe15d6a19
@@ -4098,6 +4164,7 @@ have lots of extensions, so the "full support" may not be 
100% true…
 + breakpoint (provided by the built-in {{{file(gdb-mi.el)}}} library)
 + calendar and diary
 + calfw
++ calibredb
 + centaur-tabs
 + cfrs
 + change-log and log-view (such as ~vc-print-log~, ~vc-print-root-log~)
@@ -4112,6 +4179,7 @@ have lots of extensions, so the "full support" may not be 
100% true…
 + completions
 + consult
 + corfu
++ corfu-quick
 + counsel*
 + counsel-css
 + cov
@@ -4146,6 +4214,7 @@ have lots of extensions, so the "full support" may not be 
100% true…
 + easy-jekyll
 + ebdb
 + ediff
++ ein (Emacs IPython Notebook)
 + eglot
 + el-search
 + eldoc-box
@@ -4344,6 +4413,7 @@ have lots of extensions, so the "full support" may not be 
100% true…
 + tomatinho
 + transient (pop-up windows such as Magit's)
 + trashed
++ tree-sitter
 + treemacs
 + tty-menu
 + tuareg
@@ -4357,6 +4427,7 @@ have lots of extensions, so the "full support" may not be 
100% true…
 + visible-mark
 + visual-regexp
 + vterm
++ vundo
 + wcheck-mode
 + web-mode
 + wgrep
@@ -4398,6 +4469,7 @@ supported by the themes.
 + dtache
 + easy-kill
 + edit-indirect
++ egerrit
 + elfeed-summary
 + evil-owl
 + flyspell-correct
@@ -4432,40 +4504,6 @@ supported by the themes.
 This section covers information that may be of interest to users of
 individual packages.
 
-** Note on avy hints
-:properties:
-:custom_id: h:2fdce705-6de7-44e6-ab7f-18f59af99e01
-:end:
-
-Hints can appear everywhere, in wildly varying contexts, hence, their
-appearance, by necessity, is a compromise.  However, there are various
-options for making them stand out. First is dimming the surroundings:
-
-#+begin_src emacs-lisp
-(setq avy-background t)
-#+end_src
-
-Dimming works well when you find it difficult to spot hints, any hint.
-Second is limiting the number of faces used by hints:
-
-#+begin_src emacs-lisp
-(setq avy-lead-faces
-      '(avy-lead-face
-        avy-lead-face-1
-        avy-lead-face-1
-        avy-lead-face-1
-        avy-lead-face-1))
-#+end_src
-
-Limiting the number of faces works well with longer hints when you find
-it difficult to identify individual hints, especially with hints
-touching each other.  The first character of the hint will have an
-intense color, the remaining ones the same neutral color.
-
-Third is preferring commands that produce fewer candidates.  Fewer hints
-is less noise: ~avy-goto-char-timer~ is an excellent alternative to
-~avy-goto-char~.
-
 ** Note on calendar.el weekday and weekend colors
 :properties:
 :custom_id: h:b2db46fb-32f4-44fd-8e11-d2b261cf51ae
@@ -4495,6 +4533,72 @@ weekends uniformly.
 For changes to take effect, the Calendar buffer needs to be generated
 anew.
 
+** Note on git-gutter in Doom Emacs
+:PROPERTIES:
+:CUSTOM_ID: h:a195e37c-e58c-4148-b254-8ba1ed8a731a
+:END:
+
+The =git-gutter= and =git-gutter-fr= packages default to drawing bitmaps
+for the indicators they display (e.g. bitmap of a plus sign for added
+lines).  In Doom Emacs, these bitmaps are replaced with contiguous lines
+which may look nicer, but require a change to the foreground of the
+relevant faces to yield the desired colour combinations.
+
+Since this is Doom-specific, we urge users to apply changes in their
+local setup.  Below is some sample code, based on what we cover at
+length elsewhere in this manual:
+
+[[#h:f4651d55-8c07-46aa-b52b-bed1e53463bb][Advanced customization]].
+
+[[#h:51ba3547-b8c8-40d6-ba5a-4586477fd4ae][Face specs at scale using the 
themes' palette]].
+
+#+begin_src emacs-lisp
+(defun my-modus-themes-custom-faces ()
+  (modus-themes-with-colors
+    (custom-set-faces
+     ;; Replace green with blue if you use `modus-themes-deuteranopia'.
+     `(git-gutter-fr:added ((,class :foreground ,green-fringe-bg)))
+     `(git-gutter-fr:deleted ((,class :foreground ,red-fringe-bg)))
+     `(git-gutter-fr:modified ((,class :foreground ,yellow-fringe-bg))))))
+
+(add-hook 'modus-themes-after-load-theme-hook #'my-modus-themes-custom-faces)
+#+end_src
+
+If the above does not work, try this instead:
+
+#+begin_src emacs-lisp
+(after! modus-themes
+  (modus-themes-with-colors
+    (custom-set-faces
+     ;; Replace green with blue if you use `modus-themes-deuteranopia'.
+     `(git-gutter-fr:added ((,class :foreground ,green-fringe-bg)))
+     `(git-gutter-fr:deleted ((,class :foreground ,red-fringe-bg)))
+     `(git-gutter-fr:modified ((,class :foreground ,yellow-fringe-bg))))))
+#+end_src
+
+Replace ~green-fringe-bg~ with ~blue-fringe-bg~ if you want to optimize
+for red-green color deficiency.
+
+[[#h:3ed03a48-20d8-4ce7-b214-0eb7e4c79abe][Option for red-green color 
deficiency or deuteranopia]].
+
+** Note on php-mode multiline comments
+:PROPERTIES:
+:CUSTOM_ID: h:d0a3157b-9c04-46e8-8742-5fb2a7ae8798
+:END:
+
+Depending on your build of Emacs and/or the environment it runs in,
+multiline comments in PHP with the =php-mode= package use the
+~font-lock-doc-face~ instead of ~font-lock-comment-face~.
+
+This seems to make all comments use the appropriate face:
+
+#+begin_src emacs-lisp
+(defun my-multine-comments ()
+  (setq-local c-doc-face-name 'font-lock-comment-face))
+
+(add-hook 'php-mode-hook #'my-multine-comments)
+#+end_src
+
 ** Note on underlines in compilation buffers
 :properties:
 :custom_id: h:420f5a33-c7a9-4112-9b04-eaf2cbad96bd
@@ -4594,6 +4698,17 @@ elsewhere in this document.  For example:
 
 [[#h:51ba3547-b8c8-40d6-ba5a-4586477fd4ae][Face specs at scale using the 
themes' palette]].
 
+To make the line thicker, set the height to be equal to the base font
+size instead of the one pixel we use.  This is done by specifying a rate
+instead of an absolute number, as in =:height 1.0= versus =:height 1=.
+For example:
+
+#+begin_src emacs-lisp
+(modus-themes-with-colors
+  (custom-set-faces
+   `(fill-column-indicator ((,class :height 1.0 :background ,bg-inactive 
:foreground ,bg-inactive)))))
+#+end_src
+
 ** Note on highlight-parentheses.el
 :PROPERTIES:
 :CUSTOM_ID: h:24bab397-dcb2-421d-aa6e-ec5bd622b913
@@ -5271,8 +5386,8 @@ and hints of green give us suitable shades of purple.
 
 Due to the need of maintaining some difference in hueness between
 adjacent colors, it is not possible to make red, green, and yellow the
-primary colors, because blue could not be used to control their
-luminance and, thus the relevant space would shrink considerably.
+main colors, because blue cannot be used to control their luminance and,
+thus the relevant space will shrink considerably.
 
 [[#h:5ce7ae2e-9348-4e55-b4cf-9302345b1826][Is the contrast ratio about 
adjacent colors?]]
 
@@ -5508,8 +5623,8 @@ in which you can contribute to their ongoing development.
 
 The ~modus-operandi~ and ~modus-vivendi~ themes are built into Emacs 28.
 
-The source code of the themes is 
[[https://gitlab.com/protesilaos/modus-themes/][available on GitLab]], for the 
time
-being.  A [[https://github.com/protesilaos/modus-themes/][mirror on GitHub]] 
is also on offer.
+The source code of the themes is 
[[https://git.sr.ht/~protesilaos/modus-themes][available on SourceHut]].  Or 
check the
+[[https://gitlab.com/protesilaos/modus-themes/][GitLab mirror (former main 
source)]] and the [[https://github.com/protesilaos/modus-themes/][GitHub 
mirror]].
 
 An HTML version of this manual is provided as an extension of the
 [[https://protesilaos.com/emacs/modus-themes/][author's personal website]] 
(does not rely on any non-free code).
@@ -5520,7 +5635,10 @@ An HTML version of this manual is provided as an 
extension of the
 :end:
 #+cindex: Contributing
 
-A few tasks you can help with:
+#+findex: modus-themes-report-bug
+A few tasks you can help with by sending an email to the general
+[[https://lists.sr.ht/~protesilaos/modus-themes][modus-themes public mailing 
list]] (or use the command
+~modus-themes-report-bug~).
 
 + Suggest refinements to packages that are covered.
 + Report packages not covered thus far.
@@ -5528,7 +5646,8 @@ A few tasks you can help with:
 + Help expand the documentation of covered-but-not-styled packages.
 + Suggest refinements to the color palette.
 + Help expand this document or any other piece of documentation.
-+ Merge requests for code refinements.
++ Send patches for code refinements (if you need, ask me for help with
+  Git---we all start out as beginners).
 
 [[#h:111773e2-f26f-4b68-8c4f-9794ca6b9633][Patches require copyright 
assignment to the FSF]].
 
@@ -5536,6 +5655,10 @@ It is preferable that your feedback includes some 
screenshots, GIFs, or
 short videos, as well as further instructions to reproduce a given
 setup.  Though this is not a requirement.
 
+#+findex: modus-themes-version
+Also consider mentioning the version of the themes you are using, such
+as by invoking the command ~modus-themes-version~.
+
 Whatever you do, bear in mind the overarching objective of the Modus
 themes: to keep a contrast ratio that is greater or equal to 7:1 between
 background and foreground colors.  If a compromise is ever necessary
@@ -5567,7 +5690,7 @@ will send you the assignment form for your past and 
future changes.
 
 Please use your full legal name (in ASCII characters) as the subject
 line of the message.
-----------------------------------------------------------------------
+
 REQUEST: SEND FORM FOR PAST AND FUTURE CHANGES
 
 [What is the name of the program or package you're contributing to?]
@@ -5619,41 +5742,44 @@ The Modus themes are a collective effort.  Every bit of 
work matters.
   Johansson, Basil L.{{{space()}}} Contovounesios, Björn Lindström,
   Carlo Zancanaro, Christian Tietze, Daniel Mendler, Eli Zaretskii,
   Fritz Grabo, Illia Ostapyshyn, Kévin Le Gouguec, Kostadin Ninev,
-  Madhavan Krishnan, Markus Beppler, Matthew Stevenson, Mauro Aranda,
-  Nicolas De Jaeghere, Philip Kaludercic, Pierre Téchoueyres, Rudolf
-  Adamkovič, Stephen Gildea, Shreyas Ragavan, Stefan Kangas, Utkarsh
-  Singh, Vincent Murphy, Xinglu Chen, Yuanchen Xie.
+  Madhavan Krishnan, Manuel Giraud, Markus Beppler, Matthew Stevenson,
+  Mauro Aranda, Nicolas De Jaeghere, Philip Kaludercic, Pierre
+  Téchoueyres, Rudolf Adamkovič, Stephen Gildea, Shreyas Ragavan, Stefan
+  Kangas, Utkarsh Singh, Vincent Murphy, Xinglu Chen, Yuanchen Xie.
 
 + Ideas and user feedback :: Aaron Jensen, Adam Porter, Adam Spiers,
   Adrian Manea, Alex Griffin, Alex Koen, Alex Peitsinis, Alexey Shmalko,
-  Alok Singh, Anders Johansson, André Alexandre Gomes, Antonio Hernández
-  Blas, Arif Rezai, Augusto Stoffel, Basil L.{{{space()}}}
-  Contovounesios, Burgess Chang, Christian Tietze, Christopher Dimech,
-  Damien Cassou, Daniel Mendler, Dario Gjorgjevski, David Edmondson,
-  Davor Rotim, Divan Santana, Eliraz Kedmi, Emanuele Michele Alberto
-  Monterosso, Farasha Euker, Feng Shu, Gautier Ponsinet, Gerry Agbobada,
-  Gianluca Recchia, Guilherme Semente, Gustavo Barros, Hörmetjan Yiltiz,
-  Ilja Kocken, Iris Garcia, Jeremy Friesen, Jerry Zhang, Johannes
-  Grødem, John Haman, Jorge Morais, Joshua O'Connor, Julio
-  C. Villasante, Kenta Usami, Kevin Fleming, Kévin Le Gouguec, Kostadin
-  Ninev, Len Trigg, Lennart C. Karssen, Magne Hov, Manuel Uberti, Mark
-  Bestley, Mark Burton, Markus Beppler, Mauro Aranda, Michael
+  Alok Singh, Anders Johansson, André Alexandre Gomes, Andrew Tropin,
+  Antonio Hernández Blas, Arif Rezai, Augusto Stoffel, Basil
+  L.{{{space()}}} Contovounesios, Burgess Chang, Christian Tietze,
+  Christopher Dimech, Christopher League, Damien Cassou, Daniel Mendler,
+  Dario Gjorgjevski, David Edmondson, Davor Rotim, Divan Santana, Eliraz
+  Kedmi, Emanuele Michele Alberto Monterosso, Farasha Euker, Feng Shu,
+  Gautier Ponsinet, Gerry Agbobada, Gianluca Recchia, Gonçalo Marrafa,
+  Guilherme Semente, Gustavo Barros, Hörmetjan Yiltiz, Ilja Kocken, Iris
+  Garcia, Ivan Popovych, Jeremy Friesen, Jerry Zhang, Johannes Grødem,
+  John Haman, Jorge Morais, Joshua O'Connor, Julio C. Villasante, Kenta
+  Usami, Kevin Fleming, Kévin Le Gouguec, Kostadin Ninev, Len Trigg,
+  Lennart C. Karssen, Magne Hov, Manuel Uberti, Mark Bestley, Mark
+  Burton, Markus Beppler, Mauro Aranda, Maxime Tréca, Michael
   Goldenberg, Morgan Smith, Morgan Willcock, Murilo Pereira, Nicky van
   Foreest, Nicolas De Jaeghere, Paul Poloskov, Pengji Zhang, Pete
-  Kazmier, Peter Wu, Philip Kaludercic, Pierre Téchoueyres, Robert
-  Hepple, Roman Rudakov, Ryan Phillips, Rytis Paškauskas, Rudolf
-  Adamkovič, Sam Kleinman, Samuel Culpepper, Saša Janiška, Shreyas
-  Ragavan, Simon Pugnet, Tassilo Horn, Thibaut Verron, Thomas Heartman,
-  Togan Muftuoglu, Tony Zorman, Trey Merkley, Tomasz Hołubowicz, Toon
-  Claes, Uri Sharf, Utkarsh Singh, Vincent Foley.  As well as users:
-  Ben, CsBigDataHub1, Emacs Contrib, Eugene, Fourchaux, Fredrik,
-  Moesasji, Nick, TheBlob42, Trey, bepolymathe, bit9tream, derek-upham,
-  doolio, fleimgruber, gitrj95, iSeeU, jixiuf, okamsn, pRot0ta1p.
-
-+ Packaging :: Basil L.{{{space()}}} Contovounesios, Eli Zaretskii, Glenn
-  Morris, Mauro Aranda, Richard Stallman, Stefan Kangas (core Emacs),
-  Stefan Monnier (GNU Elpa), André Alexandre Gomes, Dimakakos Dimos,
-  Morgan Smith, Nicolas Goaziou (Guix), Dhavan Vaidya (Debian).
+  Kazmier, Peter Wu, Philip Kaludercic, Pierre Téchoueyres, Przemysław
+  Kryger, Robert Hepple, Roman Rudakov, Ryan Phillips, Rytis Paškauskas,
+  Rudolf Adamkovič, Sam Kleinman, Samuel Culpepper, Saša Janiška,
+  Shreyas Ragavan, Simon Pugnet, Tassilo Horn, Thibaut Verron, Thomas
+  Heartman, Togan Muftuoglu, Tony Zorman, Trey Merkley, Tomasz
+  Hołubowicz, Toon Claes, Uri Sharf, Utkarsh Singh, Vincent Foley.  As
+  well as users: Ben, CsBigDataHub1, Emacs Contrib, Eugene, Fourchaux,
+  Fredrik, Moesasji, Nick, TheBlob42, Trey, bepolymathe, bit9tream,
+  derek-upham, doolio, fleimgruber, gitrj95, iSeeU, jixiuf, okamsn,
+  pRot0ta1p.
+
++ Packaging :: Basil L.{{{space()}}} Contovounesios, Eli Zaretskii,
+  Glenn Morris, Mauro Aranda, Richard Stallman, Stefan Kangas (core
+  Emacs), Stefan Monnier (GNU Elpa), André Alexandre Gomes, Andrew
+  Tropin, Dimakakos Dimos, Morgan Smith, Nicolas Goaziou (Guix), Dhavan
+  Vaidya (Debian).
 
 + Inspiration for certain features :: Bozhidar Batsov (zenburn-theme),
   Fabrice Niessen (leuven-theme).
@@ -5663,7 +5789,7 @@ Jaeghere, and Omar Antolín Camarena for their long time 
contributions
 and insightful commentary on key aspects of the themes' design and/or
 aspects of their functionality.
 
-* Meta
+* Other notes about the project
 :properties:
 :custom_id: h:13752581-4378-478c-af17-165b6e76bc1b
 :end:
@@ -5688,12 +5814,16 @@ of this sort):
 + 
[[https://protesilaos.com/codelog/2021-06-02-modus-themes-org-agenda/][Introducing
 the variable modus-themes-org-agenda]] (2021-06-02)
 + 
[[https://protesilaos.com/codelog/2022-01-02-review-modus-themes-org-habit-colours/][Modus
 themes: review of the org-habit graph colours]] (2022-01-02)
 + [[https://protesilaos.com/codelog/2022-01-03-modus-themes-port-faq/][Re: 
VSCode or Vim ports of the Emacs modus-themes?]] (2022-01-03)
++ 
[[https://protesilaos.com/codelog/2022-04-20-modus-themes-case-study-avy/][Modus
 themes: case study on Avy faces and colour combinations]] (2022-04-20)
++ 
[[https://protesilaos.com/codelog/2022-04-21-modus-themes-colour-theory/][Emacs:
 colour theory and techniques used in the Modus themes]] (2022-04-21)
 
-And here are the canonical sources of this project's documentation:
+And here are the canonical sources of this project:
 
 + Manual :: <https://protesilaos.com/emacs/modus-themes>
 + Change Log :: <https://protesilaos.com/emacs/modus-themes-changelog>
 + Screenshots :: <https://protesilaos.com/emacs/modus-themes-pictures>
++ Git repository :: https://git.sr.ht/~protesilaos/modus-themes
++ Mailing list :: https://lists.sr.ht/~protesilaos/modus-themes
 
 * GNU Free Documentation License
 :properties:
diff --git a/etc/HELLO b/etc/HELLO
index f63f65ff7d..4148183949 100644
--- a/etc/HELLO
+++ b/etc/HELLO
@@ -60,6 +60,7 @@ Greek (ελληνικά)      Γειά σας
 Greek, ancient (ἑλληνική)      Οὖλέ τε καὶ μέγα χαῖρε
 Gujarati (ગુજરાતી)     નમસ્તે
 Gurmukhi (ਗੁਰਮੁਖੀ)     ਸਤ ਸ੍ਰੀ ਅਕਾਲ
+Hanifi Rohingya (𐴌𐴟𐴇𐴥𐴝𐴚𐴒𐴙𐴝 𐴇𐴝𐴕𐴞𐴉𐴞 𐴓𐴠𐴑𐴤𐴝)       𐴀𐴝𐴏𐴓𐴝𐴀𐴡𐴤𐴛𐴝𐴓𐴝𐴙𐴑𐴟𐴔
 Hanunoo (ᜱᜨᜳᜨᜳᜢ)       ᜫᜬᜧ᜴ ᜣᜭᜯᜥ᜴ ᜰᜲᜭᜥ᜴
 Hebrew (עִבְרִית)      שָׁלוֹם
 Hindi (हिन्दी) प्रणाम / पाय लागू
diff --git a/etc/NEWS b/etc/NEWS
index 87cd41ec01..71c19c06b4 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -271,6 +271,11 @@ startup.  Previously, these functions ignored
 
 * Changes in Emacs 29.1
 
++++
+** New user option 'delete-selection-temporary-region'.
+When non-nil, 'delete-selection-mode' will only delete the temporary
+regions (usually set by mouse-dragging or shift-selection).
+
 +++
 ** New user option 'switch-to-prev-buffer-skip-regexp'.
 This should be a regexp or a list of regexps; buffers whose names
@@ -840,6 +845,7 @@ corresponding language environments are:
 **** Rejang script and language environment
 **** Makasar script and language environment
 **** Lontara script and language environment
+**** Hanifi Rohingya script and language environment
 
 ---
 *** The "Oriya" language environment was renamed to "Odia".
@@ -1909,6 +1915,11 @@ functions.
 
 * Lisp Changes in Emacs 29.1
 
++++
+** 'gui-set-selection' can now specify different values for different data 
types.
+If DATA is a string, then its text properties are searched for values
+for each specific data type while the selection is being converted.
+
 ---
 ** New eldoc function: 'elisp-eldoc-var-docstring-with-value'.
 This function includes the current value of the variable in eldoc display
diff --git a/etc/publicsuffix.txt b/etc/publicsuffix.txt
index 220ad30e48..f52169116e 100644
--- a/etc/publicsuffix.txt
+++ b/etc/publicsuffix.txt
@@ -7130,7 +7130,7 @@ org.zw
 
 // newGTLDs
 
-// List of new gTLDs imported from 
https://www.icann.org/resources/registries/gtlds/v2/gtlds.json on 
2022-04-30T15:14:46Z
+// List of new gTLDs imported from 
https://www.icann.org/resources/registries/gtlds/v2/gtlds.json on 
2022-05-18T15:16:02Z
 // This list is auto-generated, don't edit it manually.
 // aaa : 2015-02-26 American Automobile Association, Inc.
 aaa
@@ -8851,7 +8851,7 @@ lincoln
 // linde : 2014-12-04 Linde Aktiengesellschaft
 linde
 
-// link : 2013-11-14 UNR Corp.
+// link : 2013-11-14 Nova Registry Ltd
 link
 
 // lipsy : 2015-06-25 Lipsy Ltd
@@ -12281,6 +12281,10 @@ blogspot.vn
 // Submitted by Niels Martignene <hello@goupile.fr>
 goupile.fr
 
+// Government of the Netherlands: https://www.government.nl
+// Submitted by <domeinnaam@minaz.nl>
+gov.nl
+
 // Group 53, LLC : https://www.group53.com
 // Submitted by Tyler Todd <noc@nova53.net>
 awsmppl.com
@@ -12357,7 +12361,6 @@ ltd.ng
 ngo.ng
 edu.scot
 sch.so
-org.yt
 
 // HostyHosting (hostyhosting.com)
 hostyhosting.io
@@ -13389,6 +13392,12 @@ rocky.page
 спб.рус
 я.рус
 
+// Salesforce.com, Inc. https://salesforce.com/
+// Submitted by Michael Biven <mbiven@salesforce.com>
+builder.code.com
+dev-builder.code.com
+stg-builder.code.com
+
 // Sandstorm Development Group, Inc. : https://sandcats.io/
 // Submitted by Asheesh Laroia <asheesh@sandstorm.io>
 sandcats.io
@@ -13812,6 +13821,15 @@ hk.org
 ltd.hk
 inc.hk
 
+// UNIVERSAL DOMAIN REGISTRY : https://www.udr.org.yt/
+// see also: whois -h whois.udr.org.yt help
+// Submitted by Atanunu Igbunuroghene <publicsuffixlist@udr.org.yt>
+name.pm
+sch.tf
+biz.wf
+sch.wf
+org.yt
+
 // United Gameserver GmbH : https://united-gameserver.de
 // Submitted by Stefan Schwarz <sysadm@united-gameserver.de>
 virtualuser.de
diff --git a/etc/themes/modus-operandi-theme.el 
b/etc/themes/modus-operandi-theme.el
index be80b39410..646504636f 100644
--- a/etc/themes/modus-operandi-theme.el
+++ b/etc/themes/modus-operandi-theme.el
@@ -3,8 +3,8 @@
 ;; Copyright (C) 2019-2022  Free Software Foundation, Inc.
 
 ;; Author: Protesilaos Stavrou <info@protesilaos.com>
-;; URL: https://gitlab.com/protesilaos/modus-themes
-;; Version: 2.3.0
+;; URL: https://git.sr.ht/~protesilaos/modus-themes
+;; Version: 2.4.1
 ;; Package-Requires: ((emacs "27.1"))
 ;; Keywords: faces, theme, accessibility
 
diff --git a/etc/themes/modus-themes.el b/etc/themes/modus-themes.el
index 1c52223950..f068e4a214 100644
--- a/etc/themes/modus-themes.el
+++ b/etc/themes/modus-themes.el
@@ -3,9 +3,9 @@
 ;; Copyright (C) 2019-2022  Free Software Foundation, Inc.
 
 ;; Author: Protesilaos Stavrou <info@protesilaos.com>
-;; URL: https://gitlab.com/protesilaos/modus-themes
-;; Version: 2.3.0
-;; Last-Modified: <2022-04-01 12:33:34 +0300>
+;; URL: https://git.sr.ht/~protesilaos/modus-themes
+;; Mailing list: https://lists.sr.ht/~protesilaos/modus-themes
+;; Version: 2.4.1
 ;; Package-Requires: ((emacs "27.1"))
 ;; Keywords: faces, theme, accessibility
 
@@ -68,306 +68,8 @@
 ;;     modus-themes-operandi-color-overrides       (alist)
 ;;     modus-themes-vivendi-color-overrides        (alist)
 ;;
-;; Below is the list of explicitly supported packages or face groups
-;; (there are implicitly supported packages as well, which inherit from
-;; font-lock or some basic group).  You are encouraged to report any
-;; missing package or change you would like to see.
-;;
-;;     ace-window
-;;     alert
-;;     all-the-icons
-;;     all-the-icons-dired
-;;     all-the-icons-ibuffer
-;;     annotate
-;;     ansi-color
-;;     anzu
-;;     apropos
-;;     artbollocks-mode
-;;     auctex and TeX
-;;     auto-dim-other-buffers
-;;     avy
-;;     awesome-tray
-;;     bbdb
-;;     binder
-;;     bm
-;;     bongo
-;;     boon
-;;     bookmark
-;;     breakpoint (provided by built-in gdb-mi.el)
-;;     calendar and diary
-;;     calfw
-;;     centaur-tabs
-;;     cfrs
-;;     change-log and log-view (`vc-print-log' and `vc-print-root-log')
-;;     cider
-;;     circe
-;;     citar
-;;     color-rg
-;;     column-enforce-mode
-;;     company-mode
-;;     company-posframe
-;;     compilation-mode
-;;     completions
-;;     consult
-;;     corfu
-;;     counsel
-;;     counsel-css
-;;     cov
-;;     cperl-mode
-;;     css-mode
-;;     csv-mode
-;;     ctrlf
-;;     cursor-flash
-;;     custom (M-x customize)
-;;     dap-mode
-;;     dashboard (emacs-dashboard)
-;;     deadgrep
-;;     debbugs
-;;     deft
-;;     devdocs
-;;     dictionary
-;;     diff-hl
-;;     diff-mode
-;;     dim-autoload
-;;     dir-treeview
-;;     Dired
-;;     dired-async
-;;     dired-git
-;;     dired-git-info
-;;     dired-narrow
-;;     dired-subtree
-;;     diredfl
-;;     diredp (dired+)
-;;     display-fill-column-indicator-mode
-;;     doom-modeline
-;;     dynamic-ruler
-;;     easy-jekyll
-;;     ebdb
-;;     ediff
-;;     eglot
-;;     el-search
-;;     eldoc
-;;     eldoc-box
-;;     elfeed
-;;     elfeed-score
-;;     elpher
-;;     embark
-;;     ement (ement.el)
-;;     emms
-;;     enh-ruby-mode (enhanced-ruby-mode)
-;;     epa
-;;     equake
-;;     erc
-;;     eros
-;;     ert
-;;     eshell
-;;     eshell-fringe-status
-;;     eshell-git-prompt
-;;     eshell-prompt-extras (epe)
-;;     eshell-syntax-highlighting
-;;     evil (evil-mode)
-;;     evil-goggles
-;;     evil-snipe
-;;     evil-visual-mark-mode
-;;     eww
-;;     exwm
-;;     eyebrowse
-;;     fancy-dabbrev
-;;     flycheck
-;;     flycheck-color-mode-line
-;;     flycheck-indicator
-;;     flycheck-posframe
-;;     flymake
-;;     flyspell
-;;     flx
-;;     freeze-it
-;;     frog-menu
-;;     focus
-;;     fold-this
-;;     font-lock (generic syntax highlighting)
-;;     forge
-;;     fountain (fountain-mode)
-;;     geiser
-;;     git-commit
-;;     git-gutter (and variants)
-;;     git-rebase
-;;     git-timemachine
-;;     gnus
-;;     gotest
-;;     golden-ratio-scroll-screen
-;;     helm
-;;     helm-ls-git
-;;     helm-switch-shell
-;;     helm-xref
-;;     helpful
-;;     highlight-indentation
-;;     highlight-numbers
-;;     highlight-thing
-;;     hl-defined
-;;     hl-fill-column
-;;     hl-line-mode
-;;     hl-todo
-;;     hydra
-;;     ibuffer
-;;     icomplete
-;;     ido-mode
-;;     iedit
-;;     iflipb
-;;     image-dired
-;;     imenu-list
-;;     indium
-;;     info
-;;     info-colors
-;;     interaction-log
-;;     ioccur
-;;     isearch, occur, etc.
-;;     ivy
-;;     ivy-posframe
-;;     jira (org-jira)
-;;     journalctl-mode
-;;     js2-mode
-;;     julia
-;;     jupyter
-;;     kaocha-runner
-;;     keycast
-;;     ledger-mode
-;;     line numbers (`display-line-numbers-mode' and global variant)
-;;     lsp-mode
-;;     lsp-ui
-;;     macrostep
-;;     magit
-;;     magit-imerge
-;;     make-mode
-;;     man
-;;     marginalia
-;;     markdown-mode
-;;     markup-faces (`adoc-mode')
-;;     mct
-;;     mentor
-;;     messages
-;;     mini-modeline
-;;     minimap
-;;     mmm-mode
-;;     mode-line
-;;     mood-line
-;;     mpdel
-;;     mu4e
-;;     multiple-cursors
-;;     nano-modeline
-;;     neotree
-;;     notmuch
-;;     num3-mode
-;;     nxml-mode
-;;     orderless
-;;     org
-;;     org-journal
-;;     org-noter
-;;     org-pomodoro
-;;     org-recur
-;;     org-roam
-;;     org-superstar
-;;     org-table-sticky-header
-;;     org-tree-slide
-;;     org-treescope
-;;     origami
-;;     outline-mode
-;;     outline-minor-faces
-;;     package (M-x list-packages)
-;;     page-break-lines
-;;     pandoc-mode
-;;     paradox
-;;     paren-face
-;;     pass
-;;     pdf-tools
-;;     persp-mode
-;;     perspective
-;;     phi-grep
-;;     pomidor
-;;     popup
-;;     powerline
-;;     powerline-evil
-;;     prism (see "Note for prism.el" in the manual)
-;;     proced
-;;     prodigy
-;;     pulse
-;;     pyim
-;;     quick-peek
-;;     racket-mode
-;;     rainbow-blocks
-;;     rainbow-delimiters
-;;     rcirc
-;;     recursion-indicator
-;;     regexp-builder (also known as `re-builder')
-;;     rg
-;;     ripgrep
-;;     rmail
-;;     ruler-mode
-;;     selectrum
-;;     selectrum-prescient
-;;     semantic
-;;     sesman
-;;     shell-script-mode
-;;     shortdoc
-;;     show-paren-mode
-;;     shr
-;;     side-notes
-;;     sieve-mode
-;;     skewer-mode
-;;     slime (sldb)
-;;     sly
-;;     smart-mode-line
-;;     smartparens
-;;     smerge
-;;     spaceline
-;;     speedbar
-;;     stripes
-;;     suggest
-;;     switch-window
-;;     swiper
-;;     sx
-;;     symbol-overlay
-;;     syslog-mode
-;;     tab-bar-groups
-;;     tab-bar-mode
-;;     tab-line-mode
-;;     table (built-in table.el)
-;;     telega
-;;     telephone-line
-;;     terraform-mode
-;;     term
-;;     textsec
-;;     tomatinho
-;;     transient (pop-up windows like Magit's)
-;;     trashed
-;;     treemacs
-;;     tty-menu
-;;     tuareg
-;;     typescript
-;;     undo-tree
-;;     vc (vc-dir.el, vc-hooks.el)
-;;     vc-annotate (C-x v g)
-;;     vertico
-;;     vertico-quick
-;;     vimish-fold
-;;     visible-mark
-;;     visual-regexp
-;;     vterm
-;;     wcheck-mode
-;;     web-mode
-;;     wgrep
-;;     which-function-mode
-;;     which-key
-;;     whitespace-mode
-;;     window-divider-mode
-;;     winum
-;;     writegood-mode
-;;     woman
-;;     xah-elisp-mode
-;;     xref
-;;     xterm-color (and ansi-colors)
-;;     yaml-mode
-;;     yasnippet
-;;     ztree
+;; Check the manual for all supported packages (there are hundreds of
+;; them).
 ;;
 ;; For a complete view of the project, also refer to the following files
 ;; (should be distributed in the same repository/directory as the
@@ -383,7 +85,6 @@
 (eval-when-compile
   (require 'cl-lib)
   (require 'subr-x))
-(require 'seq)
 
 (defgroup modus-themes ()
   "Options for `modus-operandi', `modus-vivendi'.
@@ -407,6 +108,36 @@ cover the blue-cyan-magenta side of the spectrum."
   :prefix "modus-themes-"
   :tag "Modus Themes Faces")
 
+(defvar modus-themes--version "2.5.0-dev"
+  "Current version of the Modus themes.
+
+The version either is the last tagged release, such as '2.4.0',
+or an in-development version like '2.5.0-dev'.  As we use
+semantic versioning, tags of the '2.4.1' sort are not reported:
+those would count as part of '2.5.0-dev'.")
+
+;;;###autoload
+(defun modus-themes-version (&optional insert)
+  "Print `modus-themes--version' in the echo area.
+If optional INSERT argument is provided from Lisp or as a prefix
+argument, insert the `modus-themes--version' at point."
+  (interactive "P")
+  (if-let ((version modus-themes--version)
+           ((or insert current-prefix-arg)))
+      (insert version)
+    (message version)))
+
+;;;###autoload
+(defun modus-themes-report-bug ()
+  "Submit a bug report or issue to the Modus themes developers."
+  (interactive)
+  (reporter-submit-bug-report
+   "~protesilaos/modus-themes@lists.sr.ht"
+   (format "modus-themes (%s)\n" modus-themes--version)
+   ;; I am just getting started with this.  Let's first see what people
+   ;; think about it.
+   nil nil nil nil))
+
 ;;; Variables for each theme variant
 
 ;;;; Modus Operandi
@@ -561,7 +292,8 @@ cover the blue-cyan-magenta side of the spectrum."
     ;; while bg-tab-inactive should be combined with fg-dim, whereas
     ;; bg-tab-inactive-alt goes together with fg-main
     ;;
-    ;; bg-completion-* variants are meant to be combined with fg-main
+    ;; bg-completion-* and bg-char-* variants are meant to be combined
+    ;; with fg-main
     ;;
     ;; fg-escape-char-construct and fg-escape-char-backslash can
     ;; be combined bg-main, bg-dim, bg-alt
@@ -595,6 +327,10 @@ cover the blue-cyan-magenta side of the spectrum."
     (bg-completion . "#b7dbff")
     (bg-completion-subtle . "#def3ff")
 
+    (bg-char-0 . "#7feaff")
+    (bg-char-1 . "#ffaaff")
+    (bg-char-2 . "#dff000")
+
     (bg-tab-active . "#f6f6f6")
     (bg-tab-inactive . "#b7b7b7")
     (bg-tab-inactive-accent . "#a9b4f6")
@@ -807,7 +543,8 @@ symbol and the latter as a string.")
     ;; while bg-tab-inactive should be combined with fg-dim, whereas
     ;; bg-tab-inactive-alt goes together with fg-main
     ;;
-    ;; bg-completion-* variants are meant to be combined with fg-main
+    ;; bg-completion-* and bg-char-* variants are meant to be combined
+    ;; with fg-main
     ;;
     ;; fg-escape-char-construct and fg-escape-char-backslash can
     ;; be combined bg-main, bg-dim, bg-alt
@@ -841,6 +578,10 @@ symbol and the latter as a string.")
     (bg-completion . "#142f69")
     (bg-completion-subtle . "#0e194b")
 
+    (bg-char-0 . "#0050af")
+    (bg-char-1 . "#7f1f7f")
+    (bg-char-2 . "#625a00")
+
     (bg-tab-active . "#0e0e0e")
     (bg-tab-inactive . "#424242")
     (bg-tab-inactive-accent . "#35398f")
@@ -1449,9 +1190,8 @@ The actual styling of the face is done by 
`modus-themes-faces'."
 
 (defface modus-themes-variable-pitch nil
   "Generic face for applying a conditional `variable-pitch'.
-This behaves in accordance with `modus-themes-mixed-fonts',
-`modus-themes-variable-pitch-headings' for all heading levels,
-and `modus-themes-variable-pitch-ui'.
+This behaves in accordance with `modus-themes-mixed-fonts' and/or
+`modus-themes-variable-pitch-ui'.
 
 The actual styling of the face is done by `modus-themes-faces'."
   :group 'modus-themes-faces)
@@ -3142,13 +2882,15 @@ In user configuration files the form may look like this:
         value
       (modus-themes--warn option))))
 
-(defun modus-themes--alist-or-seq (properties alist-key seq-pred seq-default)
-  "Return value from alist or sequence.
+(defun modus-themes--property-lookup (properties alist-key list-pred default)
+  "Return value from property alist or list.
 Check PROPERTIES for an alist value that corresponds to
 ALIST-KEY.  If no alist is present, search the PROPERTIES
-sequence given SEQ-PRED, using SEQ-DEFAULT as a fallback."
+list given LIST-PRED, using DEFAULT as a fallback."
   (if-let* ((val (or (alist-get alist-key properties)
-                     (seq-find seq-pred properties seq-default)))
+                     (cl-loop for x in properties
+                              if (funcall list-pred x) return x)
+                     default))
             ((listp val)))
       (car val)
     val))
@@ -3192,8 +2934,11 @@ Those are stored in `modus-themes-faces' and
 
 (defun modus-themes--current-theme ()
   "Return current modus theme."
-  (car (seq-filter (lambda (arg) (string-match-p "^modus" (symbol-name arg)))
-                   custom-enabled-themes)))
+  (car
+   (seq-filter
+    (lambda (theme)
+      (string-match-p "^modus" (symbol-name theme)))
+    custom-enabled-themes)))
 
 ;; Helper functions that are meant to ease the implementation of the
 ;; above customization variables.
@@ -3245,11 +2990,11 @@ foreground.  INTENSEFG is an alternative to the 
default."
      (cond
       ((and (memq 'bold properties)
             (memq 'italic properties))
-       (list 'modus-themes-fixed-pitch 'bold-italic))
+       (list 'bold-italic 'modus-themes-fixed-pitch))
       ((memq 'italic properties)
-       (list 'modus-themes-fixed-pitch 'italic))
+       (list 'italic 'modus-themes-fixed-pitch))
       ((memq 'bold properties)
-       (list 'modus-themes-fixed-pitch 'bold))
+       (list 'bold 'modus-themes-fixed-pitch))
       (t 'modus-themes-fixed-pitch))
      :background
      (cond
@@ -3368,10 +3113,10 @@ theme's fallback text color."
 
 (defun modus-themes--paren (normalbg intensebg)
   "Conditional use of intense colors for matching parentheses.
-NORMALBG should be the special palette color `bg-paren-match' or
+NORMALBG should be the special palette color 'bg-paren-match' or
 something similar.  INTENSEBG must be easier to discern next to
 other backgrounds, such as the special palette color
-`bg-paren-match-intense'."
+'bg-paren-match-intense'."
   (let ((properties (modus-themes--list-or-warn 'modus-themes-paren-match)))
     (list :inherit
           (if (memq 'bold properties)
@@ -3521,7 +3266,7 @@ that combines well with the background and foreground."
             fg-alt)
            (fg))
           :height
-          (modus-themes--alist-or-seq properties 'height #'floatp 'unspecified)
+          (modus-themes--property-lookup properties 'height #'floatp 
'unspecified)
           :weight
           (or weight 'unspecified)
           :overline
@@ -3546,7 +3291,7 @@ FG is the foreground color to use."
           (or weight 'unspecified)
           :height
           (cond ((memq 'no-scale properties) 'unspecified)
-                ((modus-themes--alist-or-seq properties 'height #'floatp 
1.15)))
+                ((modus-themes--property-lookup properties 'height #'floatp 
1.15)))
           :foreground fg)))
 
 (defun modus-themes--agenda-date (defaultfg grayscalefg &optional workaholicfg 
grayscaleworkaholicfg bg bold ul)
@@ -3581,7 +3326,7 @@ weight.  Optional UL applies an underline."
            (t
             defaultfg))
           :height
-          (modus-themes--alist-or-seq properties 'height #'floatp 'unspecified)
+          (modus-themes--property-lookup properties 'height #'floatp 
'unspecified)
           :underline
           (if (and ul (memq 'underline-today properties))
               t
@@ -3637,8 +3382,8 @@ clearly distinguishes past, present, future tasks."
 (defun modus-themes--agenda-habit (default traffic simple &optional default-d 
traffic-d simple-d)
   "Specify background values for `modus-themes-org-agenda' habits.
 DEFAULT is the original foregrounc color.  TRAFFIC is to be used
-when the `traffic-light' style is applied, while SIMPLE
-corresponds to the \"simplified style\".
+when the 'traffic-light' style is applied, while SIMPLE
+corresponds to the 'simplified style'.
 
 Optional DEFAULT-D, TRAFFIC-D, SIMPLE-D are alternatives to the
 main colors, meant for dopia when `modus-themes-deuteranopia' is
@@ -3712,8 +3457,8 @@ Optional FG-DISTANT should be close to the main background
 values.  It is intended to be used as a distant-foreground
 property."
   (let* ((properties (modus-themes--list-or-warn 'modus-themes-mode-line))
-         (padding (modus-themes--alist-or-seq properties 'padding #'natnump 1))
-         (height (modus-themes--alist-or-seq properties 'height #'floatp 
'unspecified))
+         (padding (modus-themes--property-lookup properties 'padding #'natnump 
1))
+         (height (modus-themes--property-lookup properties 'height #'floatp 
'unspecified))
          (padded (> padding 1))
          (base (cond ((memq 'accented properties)
                       (cons fg-accent bg-accent))
@@ -3778,10 +3523,14 @@ property."
 ;; Basically this is just for the keycast key indicator.
 (defun modus-themes--mode-line-padded-box (color)
   "Set padding of mode line box attribute with given COLOR."
-  (let ((padding (seq-find #'natnump modus-themes-mode-line 1)))
-    (list :box (list :line-width padding :color color))))
-
-(defun modus-themes--diff (mainbg mainfg altbg altfg &optional deuteranbg 
deuteranfg  bg-only-fg)
+  (list :box (list :color color
+                   :line-width
+                   (or (cl-loop
+                        for x in modus-themes-mode-line
+                        if (natnump x) return x)
+                       1))))
+
+(defun modus-themes--diff (mainbg mainfg altbg altfg &optional deubg deufg 
deualtbg deualtfg bg-only-fg)
   "Color combinations for `modus-themes-diffs'.
 
 MAINBG must be one of the dedicated backgrounds for diffs while
@@ -3791,13 +3540,20 @@ ALTBG needs to be a slightly accented background that 
is meant to
 be combined with ALTFG.  Both must be less intense than MAINBG
 and MAINFG respectively.
 
-DEUTERANBG and DEUTERANFG must be combinations of colors that account
-for red-green color defficiency (deuteranopia).
+DEUBG and DEUFG must be combinations of colors that account for
+red-green color defficiency (deuteranopia).  They are the
+equivalent of MAINBG and MAINFG.
+
+DEUALTBG and DEUALTFG are the equivalent of ALTBG and ALTFG for
+deuteranopia.
 
-Optional BG-ONLY-FG applies ALTFG else leaves the foreground
-unspecified."
+Optional non-nil BG-ONLY-FG applies ALTFG else leaves the
+foreground unspecified."
   (if modus-themes-deuteranopia
-      (list :background (or deuteranbg mainbg) :foreground (or deuteranfg 
mainfg))
+      (pcase modus-themes-diffs
+        ('desaturated (list :background (or deualtbg altbg) :foreground (or 
deualtfg altfg)))
+        ('bg-only (list :background (or deualtbg altbg) :foreground (if 
bg-only-fg (or deualtfg altfg) 'unspecified)))
+        (_ (list :background (or deubg mainbg) :foreground (or deufg mainfg))))
     (pcase modus-themes-diffs
       ('desaturated (list :background altbg :foreground altfg))
       ('bg-only (list :background altbg :foreground (if bg-only-fg altfg 
'unspecified)))
@@ -4114,7 +3870,7 @@ pressed button style, else the released button."
            (weight weight)
            ('unspecified))
           :height
-          (modus-themes--alist-or-seq properties 'height #'floatp 'unspecified)
+          (modus-themes--property-lookup properties 'height #'floatp 
'unspecified)
           :underline
           (if (memq 'underline properties)
               t
@@ -4379,7 +4135,8 @@ by virtue of calling either of 
`modus-themes-load-operandi' and
       ((,class ,@(modus-themes--diff
                   bg-diff-focus-added fg-diff-focus-added
                   green-nuanced-bg fg-diff-added
-                  bg-diff-focus-added-deuteran fg-diff-focus-added-deuteran))))
+                  bg-diff-focus-added-deuteran fg-diff-focus-added-deuteran
+                  blue-nuanced-bg fg-diff-added-deuteran))))
     `(modus-themes-diff-changed
       ((,class ,@(modus-themes--diff
                   bg-diff-focus-changed fg-diff-focus-changed
@@ -4392,7 +4149,8 @@ by virtue of calling either of 
`modus-themes-load-operandi' and
       ((,class ,@(modus-themes--diff
                   bg-diff-refine-added fg-diff-refine-added
                   bg-diff-focus-added fg-diff-focus-added
-                  bg-diff-refine-added-deuteran 
fg-diff-refine-added-deuteran))))
+                  bg-diff-refine-added-deuteran fg-diff-refine-added-deuteran
+                  bg-diff-focus-added-deuteran fg-diff-focus-added-deuteran))))
     `(modus-themes-diff-refine-changed
       ((,class ,@(modus-themes--diff
                   bg-diff-refine-changed fg-diff-refine-changed
@@ -4405,7 +4163,8 @@ by virtue of calling either of 
`modus-themes-load-operandi' and
       ((,class ,@(modus-themes--diff
                   bg-diff-focus-added fg-diff-focus-added
                   bg-diff-added fg-diff-added
-                  bg-diff-focus-added-deuteran fg-diff-focus-added-deuteran))))
+                  bg-diff-focus-added-deuteran fg-diff-focus-added-deuteran
+                  bg-diff-added-deuteran fg-diff-added-deuteran))))
     `(modus-themes-diff-focus-changed
       ((,class ,@(modus-themes--diff
                   bg-diff-focus-changed fg-diff-focus-changed
@@ -4419,6 +4178,7 @@ by virtue of calling either of 
`modus-themes-load-operandi' and
                   bg-diff-heading fg-diff-heading
                   cyan-nuanced-bg cyan-nuanced-fg
                   bg-header fg-main
+                  bg-header fg-main
                   t))))
 ;;;;; deuteranopia-specific
     `(modus-themes-grue ((,class :foreground ,@(modus-themes--deuteran blue 
green))))
@@ -4564,7 +4324,8 @@ by virtue of calling either of 
`modus-themes-load-operandi' and
                                        bg-region blue-intense-bg
                                        fg-alt blue-intense)
                                     :extend t)))
-    `(modus-themes-key-binding ((,class :inherit bold :foreground 
,blue-alt-other)))
+    `(modus-themes-key-binding ((,class :inherit (bold 
modus-themes-fixed-pitch)
+                                        :foreground ,blue-alt-other)))
     `(modus-themes-prompt ((,class ,@(modus-themes--prompt
                                       cyan-alt-other blue-alt-other fg-alt
                                       cyan-nuanced-bg blue-refine-bg fg-main
@@ -4592,7 +4353,7 @@ by virtue of calling either of 
`modus-themes-load-operandi' and
     `(elisp-shorthand-font-lock-face ((,class :inherit 
font-lock-variable-name-face)))
     `(error ((,class :inherit bold :foreground ,red)))
     `(escape-glyph ((,class :foreground ,fg-escape-char-construct)))
-    `(file-name-shadow ((,class :inherit (shadow italic))))
+    `(file-name-shadow ((,class :inherit shadow)))
     `(header-line ((,class :inherit modus-themes-ui-variable-pitch
                            :background ,bg-header :foreground ,fg-header)))
     `(header-line-highlight ((,class :inherit highlight)))
@@ -4759,10 +4520,10 @@ by virtue of calling either of 
`modus-themes-load-operandi' and
 ;;;;; avy
     `(avy-background-face ((,class :background ,bg-dim :foreground ,fg-dim 
:extend t)))
     `(avy-goto-char-timer-face ((,class :inherit (modus-themes-intense-neutral 
bold))))
-    `(avy-lead-face ((,class :inherit (modus-themes-intense-blue bold 
modus-themes-reset-soft))))
-    `(avy-lead-face-0 ((,class :inherit (modus-themes-refine-magenta bold 
modus-themes-reset-soft))))
+    `(avy-lead-face ((,class :inherit (bold modus-themes-reset-soft) 
:background ,bg-char-0)))
+    `(avy-lead-face-0 ((,class :inherit (bold modus-themes-reset-soft) 
:background ,bg-char-1)))
     `(avy-lead-face-1 ((,class :inherit (modus-themes-special-warm 
modus-themes-reset-soft))))
-    `(avy-lead-face-2 ((,class :inherit (modus-themes-refine-green bold 
modus-themes-reset-soft))))
+    `(avy-lead-face-2 ((,class :inherit (bold modus-themes-reset-soft) 
:background ,bg-char-2)))
 ;;;;; aw (ace-window)
     `(aw-background-face ((,class :foreground ,fg-unfocused)))
     `(aw-key-face ((,class :inherit modus-themes-key-binding)))
@@ -4849,6 +4610,27 @@ by virtue of calling either of 
`modus-themes-load-operandi' and
     `(cfw:face-toolbar-button-off ((,class :inherit shadow)))
     `(cfw:face-toolbar-button-on ((,class :inherit bold :background 
,blue-nuanced-bg
                                           :foreground ,blue-alt)))
+;;;;; calibredb
+    `(calibredb-archive-face ((,class :foreground ,magenta-alt-faint)))
+    `(calibredb-author-face ((,class :foreground ,blue-faint)))
+    `(calibredb-comment-face ((,class :inherit shadow)))
+    `(calibredb-date-face ((,class :foreground ,cyan)))
+    `(calibredb-edit-annotation-header-title-face ((,class :inherit bold)))
+    `(calibredb-favorite-face ((,class :foreground ,red-alt)))
+    `(calibredb-file-face (( )))
+    `(calibredb-format-face ((,class :foreground ,cyan-faint)))
+    `(calibredb-highlight-face ((,class :inherit success)))
+    `(calibredb-id-face (( )))
+    `(calibredb-ids-face (( )))
+    `(calibredb-search-header-highlight-face ((,class :inherit 
modus-themes-hl-line)))
+    `(calibredb-search-header-library-name-face ((,class :foreground 
,blue-active)))
+    `(calibredb-search-header-library-path-face ((,class :inherit bold)))
+    `(calibredb-search-header-sort-face ((,class :inherit bold :foreground 
,magenta-active)))
+    `(calibredb-search-header-total-face ((,class :inherit bold :foreground 
,cyan-active)))
+    `(calibredb-search-header-filter-face ((,class :inherit bold)))
+    `(calibredb-mark-face ((,class :inherit modus-themes-mark-sel)))
+    `(calibredb-size-face (( )))
+    `(calibredb-tag-face ((,class :foreground ,magenta-alt-faint)))
 ;;;;; centaur-tabs
     `(centaur-tabs-active-bar-face ((,class :background ,blue-active)))
     `(centaur-tabs-close-mouse-face ((,class :inherit bold :foreground 
,red-active :underline t)))
@@ -4992,6 +4774,9 @@ by virtue of calling either of 
`modus-themes-load-operandi' and
     `(corfu-bar ((,class :background ,fg-alt)))
     `(corfu-border ((,class :background ,bg-active)))
     `(corfu-default ((,class :background ,bg-alt)))
+;;;;; corfu-quick
+    `(corfu-quick1 ((,class :inherit bold :background ,bg-char-0)))
+    `(corfu-quick2 ((,class :inherit bold :background ,bg-char-1)))
 ;;;;; counsel
     `(counsel-active-mode ((,class :foreground ,magenta-alt-other)))
     `(counsel-application-name ((,class :foreground ,red-alt-other)))
@@ -5323,6 +5108,13 @@ by virtue of calling either of 
`modus-themes-load-operandi' and
     `(ediff-odd-diff-Ancestor ((,class :inherit ediff-even-diff-Ancestor)))
     `(ediff-odd-diff-B ((,class :inherit ediff-even-diff-B)))
     `(ediff-odd-diff-C ((,class :inherit ediff-even-diff-C)))
+;;;;; ein (Emacs IPython Notebook)
+    `(ein:basecell-input-area-face ((,class :background ,bg-dim :extend t)))
+    `(ein:cell-output-area (( )))
+    `(ein:cell-output-area-error ((,class :background ,red-nuanced-bg :extend 
t)))
+    `(ein:cell-output-stderr ((,class :background ,red-nuanced-bg :extend t)))
+    `(ein:markdowncell-input-area-face (( )))
+    `(ein:notification-tab-normal ((,class :underline t)))
 ;;;;; eglot
     `(eglot-mode-line ((,class :inherit modus-themes-bold :foreground 
,magenta-active)))
 ;;;;; el-search
@@ -5637,7 +5429,7 @@ by virtue of calling either of 
`modus-themes-load-operandi' and
     `(font-lock-doc-face ((,class :inherit modus-themes-slant
                                   ,@(modus-themes--syntax-string
                                      fg-docstring fg-special-cold
-                                     fg-special-mild magenta-nuanced-fg
+                                     fg-special-mild fg-special-calm
                                      fg-special-mild magenta-nuanced-fg))))
     `(font-lock-function-name-face ((,class ,@(modus-themes--syntax-extra
                                                magenta magenta-faint
@@ -5651,30 +5443,31 @@ by virtue of calling either of 
`modus-themes-load-operandi' and
                                                yellow yellow-faint))))
     `(font-lock-preprocessor-face ((,class ,@(modus-themes--syntax-extra
                                               red-alt-other red-alt-other-faint
-                                              blue-alt blue-alt-faint))))
-    `(font-lock-regexp-grouping-backslash ((,class :inherit bold
+                                              cyan-alt-other cyan-alt-faint))))
+    `(font-lock-regexp-grouping-backslash ((,class :inherit modus-themes-bold
                                                    
,@(modus-themes--syntax-string
                                                       fg-escape-char-backslash 
yellow-alt-faint
                                                       yellow-alt magenta-alt
                                                       red-faint 
green-alt-other-faint))))
-    `(font-lock-regexp-grouping-construct ((,class :inherit bold
+    `(font-lock-regexp-grouping-construct ((,class :inherit modus-themes-bold
                                                    
,@(modus-themes--syntax-string
                                                       fg-escape-char-construct 
red-alt-other-faint
                                                       red-alt-other 
blue-alt-other
                                                       blue-faint 
blue-alt-other-faint))))
     `(font-lock-string-face ((,class ,@(modus-themes--syntax-string
                                         blue-alt blue-alt-faint
-                                        green-alt-other red-alt
+                                        green-alt-other red-alt-other
                                         green-alt-faint red-alt-faint))))
     `(font-lock-type-face ((,class :inherit modus-themes-bold
-                                   ,@(modus-themes--syntax-foreground
-                                      cyan-alt-other cyan-alt-faint))))
+                                   ,@(modus-themes--syntax-extra
+                                      cyan-alt-other cyan-alt-faint
+                                      magenta-alt-other 
magenta-alt-other-faint))))
     `(font-lock-variable-name-face ((,class ,@(modus-themes--syntax-extra
                                                cyan cyan-faint
-                                               blue-alt-other 
blue-alt-other-faint))))
+                                               blue-alt blue-alt-faint))))
     `(font-lock-warning-face ((,class :inherit modus-themes-bold
-                                      ,@(modus-themes--syntax-comment
-                                         yellow-active red-active red-faint 
yellow-faint))))
+                                      ,@(modus-themes--syntax-foreground
+                                         yellow-active yellow-alt-faint))))
 ;;;;; forge
     `(forge-post-author ((,class :inherit bold :foreground ,fg-main)))
     `(forge-post-date ((,class :foreground ,fg-special-cold)))
@@ -5685,7 +5478,7 @@ by virtue of calling either of 
`modus-themes-load-operandi' and
     `(forge-topic-unread ((,class :inherit bold :foreground ,fg-main)))
 ;;;;; fountain-mode
     `(fountain-character ((,class :foreground ,blue-alt-other)))
-    `(fountain-comment ((,class :inherit modus-themes-slant :foreground 
,fg-alt)))
+    `(fountain-comment ((,class :inherit font-lock-comment-face)))
     `(fountain-dialog ((,class :foreground ,blue-alt)))
     `(fountain-metadata-key ((,class :foreground ,green-alt-other)))
     `(fountain-metadata-value ((,class :foreground ,blue)))
@@ -5719,11 +5512,11 @@ by virtue of calling either of 
`modus-themes-load-operandi' and
     `(geiser-font-lock-xref-link ((,class :inherit button)))
 ;;;;; git-commit
     `(git-commit-comment-action ((,class :inherit font-lock-comment-face)))
-    `(git-commit-comment-branch-local ((,class :inherit modus-themes-slant 
:foreground ,blue-alt)))
-    `(git-commit-comment-branch-remote ((,class :inherit modus-themes-slant 
:foreground ,magenta-alt)))
-    `(git-commit-comment-detached ((,class :inherit modus-themes-slant 
:foreground ,cyan-alt)))
-    `(git-commit-comment-file ((,class :inherit modus-themes-slant :foreground 
,cyan)))
-    `(git-commit-comment-heading ((,class :inherit (bold modus-themes-slant))))
+    `(git-commit-comment-branch-local ((,class :inherit font-lock-comment-face 
:foreground ,blue-alt)))
+    `(git-commit-comment-branch-remote ((,class :inherit 
font-lock-comment-face :foreground ,magenta-alt)))
+    `(git-commit-comment-detached ((,class :inherit font-lock-comment-face 
:foreground ,cyan-alt)))
+    `(git-commit-comment-file ((,class :inherit font-lock-comment-face 
:foreground ,cyan)))
+    `(git-commit-comment-heading ((,class :inherit (bold 
font-lock-comment-face))))
     `(git-commit-keyword ((,class :foreground ,magenta)))
     `(git-commit-known-pseudo-header ((,class :foreground ,cyan-alt-other)))
     `(git-commit-nonempty-second-line ((,class :inherit error)))
@@ -5741,8 +5534,8 @@ by virtue of calling either of 
`modus-themes-load-operandi' and
     `(git-gutter-fr:deleted ((,class :inherit modus-themes-fringe-red)))
     `(git-gutter-fr:modified ((,class :inherit modus-themes-fringe-yellow)))
 ;;;;; git-rebase
-    `(git-rebase-comment-hash ((,class :inherit modus-themes-slant :foreground 
,cyan)))
-    `(git-rebase-comment-heading  ((,class :inherit (bold 
modus-themes-slant))))
+    `(git-rebase-comment-hash ((,class :inherit font-lock-comment-face 
:foreground ,cyan)))
+    `(git-rebase-comment-heading  ((,class :inherit (bold 
font-lock-comment-face))))
     `(git-rebase-description ((,class :foreground ,fg-main)))
     `(git-rebase-hash ((,class :foreground ,cyan-alt-other)))
 ;;;;; git-timemachine
@@ -6114,7 +5907,8 @@ by virtue of calling either of 
`modus-themes-load-operandi' and
     `(kaocha-runner-warning-face ((,class :inherit warning)))
 ;;;;; keycast
     `(keycast-command ((,class :inherit bold :foreground ,blue-active)))
-    `(keycast-key ((,class ,@(modus-themes--mode-line-padded-box blue-active)
+    ;; FIXME 2022-05-03: The padding breaks `keycast-tab-bar-mode'
+    `(keycast-key ((,class ;; ,@(modus-themes--mode-line-padded-box 
blue-active)
                            :background ,blue-active :foreground ,bg-main)))
 ;;;;; ledger-mode
     `(ledger-font-auto-xact-face ((,class :foreground ,magenta)))
@@ -6128,23 +5922,26 @@ by virtue of calling either of 
`modus-themes-load-operandi' and
     `(ledger-font-payee-uncleared-face ((,class :foreground ,red-alt-other)))
     `(ledger-font-xact-highlight-face ((,class :background ,bg-hl-alt)))
 ;;;;; line numbers (display-line-numbers-mode and global variant)
+    ;; Here we cannot inherit `modus-themes-fixed-pitch'.  We need to
+    ;; fall back to `default' otherwise line numbers do not scale when
+    ;; using `text-scale-adjust'.
     `(line-number
-      ((,class :inherit default
+      ((,class :inherit ,(if modus-themes-mixed-fonts 'fixed-pitch 'default)
                ,@(modus-themes--line-numbers
                   fg-alt bg-dim
                   fg-unfocused))))
     `(line-number-current-line
-      ((,class :inherit (bold default)
+      ((,class :inherit (bold line-number)
                ,@(modus-themes--line-numbers
                   fg-main bg-active
                   blue-alt-other))))
     `(line-number-major-tick
-      ((,class :inherit (bold default)
+      ((,class :inherit (bold line-number)
                ,@(modus-themes--line-numbers
                   yellow-nuanced-fg yellow-nuanced-bg
                   red-alt))))
     `(line-number-minor-tick
-      ((,class :inherit (bold default)
+      ((,class :inherit (bold line-number)
                ,@(modus-themes--line-numbers
                   fg-alt bg-inactive
                   fg-inactive))))
@@ -6228,7 +6025,8 @@ by virtue of calling either of 
`modus-themes-load-operandi' and
     `(magit-diff-added ((,class ,@(modus-themes--diff
                                    bg-diff-added fg-diff-added
                                    green-nuanced-bg fg-diff-added
-                                   bg-diff-added-deuteran 
fg-diff-added-deuteran))))
+                                   bg-diff-added-deuteran 
fg-diff-added-deuteran
+                                   blue-nuanced-bg fg-diff-added-deuteran))))
     `(magit-diff-added-highlight ((,class :inherit 
modus-themes-diff-focus-added)))
     `(magit-diff-base ((,class ,@(modus-themes--diff
                                   bg-diff-changed fg-diff-changed
@@ -6249,6 +6047,7 @@ by virtue of calling either of 
`modus-themes-load-operandi' and
                                           bg-active fg-inactive
                                           bg-inactive fg-inactive
                                           bg-inactive fg-inactive
+                                          nil nil
                                           t))))
     ;; NOTE: we do not follow the pattern of inheriting from
     ;; modus-themes-grue-* faces, as this is a special case.
@@ -6687,9 +6486,7 @@ by virtue of calling either of 
`modus-themes-load-operandi' and
                           :background ,bg-alt)))
     `(org-column-title ((,class :inherit (bold modus-themes-fixed-pitch 
default)
                                 :underline t :background ,bg-alt)))
-    `(org-date ((,class :inherit ,(if modus-themes-mixed-fonts
-                                      '(fixed-pitch modus-themes-link-symlink)
-                                    'modus-themes-link-symlink))))
+    `(org-date ((,class :inherit (modus-themes-link-symlink 
modus-themes-fixed-pitch))))
     `(org-date-selected ((,class :foreground ,blue-alt :inverse-video t)))
     `(org-dispatcher-highlight ((,class :inherit (bold 
modus-themes-mark-alt))))
     `(org-document-info ((,class :foreground ,fg-special-cold)))
@@ -6906,7 +6703,7 @@ by virtue of calling either of 
`modus-themes-load-operandi' and
     `(popup-summary-face ((,class :background ,bg-active :foreground 
,fg-inactive)))
     `(popup-tip-face ((,class :inherit modus-themes-refine-yellow)))
 ;;;;; powerline
-    `(powerline-active0 ((,class :background ,bg-main :foreground ,blue-faint 
:inverse-video t)))
+    `(powerline-active0 ((,class :background ,blue-faint :foreground 
,bg-main)))
     `(powerline-active1 ((,class :background ,blue-nuanced-bg :foreground 
,blue-nuanced-fg)))
     `(powerline-active2 ((,class :background ,bg-active :foreground 
,fg-active)))
     `(powerline-inactive0 ((,class :background ,bg-special-cold :foreground 
,fg-special-cold)))
@@ -7355,7 +7152,9 @@ by virtue of calling either of 
`modus-themes-load-operandi' and
 ;;;;; transient
     `(transient-active-infix ((,class :inherit modus-themes-special-mild)))
     `(transient-amaranth ((,class :inherit bold :foreground ,yellow-alt)))
-    `(transient-argument ((,class :inherit bold :background ,cyan-nuanced-bg 
:foreground ,cyan)))
+    ;; Placate the compiler for what is a spurious warning.  We also
+    ;; have to do this with `eldoc-highlight-function-argument'.
+    (list 'transient-argument `((,class :inherit bold :background 
,cyan-nuanced-bg :foreground ,cyan)))
     `(transient-blue ((,class :inherit bold :foreground ,blue)))
     `(transient-disabled-suffix ((,class :inherit modus-themes-intense-red)))
     `(transient-enabled-suffix ((,class :inherit 
modus-themes-grue-background-subtle)))
@@ -7379,6 +7178,24 @@ by virtue of calling either of 
`modus-themes-load-operandi' and
     `(trashed-marked ((,class :inherit modus-themes-mark-alt)))
     `(trashed-restored ((,class :inherit modus-themes-mark-sel)))
     `(trashed-symlink ((,class :inherit modus-themes-link-symlink)))
+;;;;; tree-sitter
+    `(tree-sitter-hl-face:attribute ((,class :inherit 
font-lock-variable-name-face)))
+    `(tree-sitter-hl-face:constant.builtin ((,class :inherit 
tree-sitter-hl-face:constant)))
+    `(tree-sitter-hl-face:escape ((,class :inherit 
font-lock-regexp-grouping-backslash)))
+    `(tree-sitter-hl-face:function ((,class :inherit 
font-lock-function-name-face)))
+    `(tree-sitter-hl-face:function.call ((,class :inherit 
tree-sitter-hl-face:function)))
+    `(tree-sitter-hl-face:label (( )))
+    `(tree-sitter-hl-face:method.call (( )))
+    `(tree-sitter-hl-face:operator ((,class :inherit modus-themes-bold)))
+    `(tree-sitter-hl-face:property (( )))
+    `(tree-sitter-hl-face:property.definition ((,class :inherit 
font-lock-variable-name-face)))
+    `(tree-sitter-hl-face:punctuation (( )))
+    `(tree-sitter-hl-face:punctuation.bracket (( )))
+    `(tree-sitter-hl-face:punctuation.delimiter (( )))
+    `(tree-sitter-hl-face:punctuation.special ((,class :inherit 
font-lock-regexp-grouping-construct)))
+    `(tree-sitter-hl-face:string.special ((,class :inherit 
tree-sitter-hl-face:string)))
+    `(tree-sitter-hl-face:tag ((,class :inherit font-lock-function-name-face)))
+    `(tree-sitter-hl-face:type.argument (( )))
 ;;;;; treemacs
     `(treemacs-directory-collapsed-face ((,class :foreground ,magenta-alt)))
     `(treemacs-directory-face ((,class :inherit dired-directory)))
@@ -7460,8 +7277,8 @@ by virtue of calling either of 
`modus-themes-load-operandi' and
 ;;;;; vertico
     `(vertico-current ((,class :inherit modus-themes-completion-selected)))
 ;;;;; vertico-quick
-    `(vertico-quick1 ((,class :inherit (modus-themes-intense-blue bold))))
-    `(vertico-quick2 ((,class :inherit (modus-themes-refine-magenta bold))))
+    `(vertico-quick1 ((,class :inherit bold :background ,bg-char-0)))
+    `(vertico-quick2 ((,class :inherit bold :background ,bg-char-1)))
 ;;;;; vimish-fold
     `(vimish-fold-fringe ((,class :foreground ,cyan-active)))
     `(vimish-fold-mouse-face ((,class :inherit modus-themes-intense-blue)))
@@ -7491,6 +7308,8 @@ by virtue of calling either of 
`modus-themes-load-operandi' and
     `(vterm-color-underline ((,class :foreground ,fg-special-warm :underline 
t)))
     `(vterm-color-white ((,class :background "gray65" :foreground "gray65")))
     `(vterm-color-yellow ((,class :background ,yellow :foreground ,yellow)))
+;;;;; vundo
+    `(vundo-highlight ((,class :inherit (bold vundo-node) :foreground 
,red-intense)))
 ;;;;; wcheck-mode
     `(wcheck-default-face ((,class :foreground ,red :underline t)))
 ;;;;; web-mode
@@ -7652,6 +7471,9 @@ by virtue of calling either of 
`modus-themes-load-operandi' and
     `(flymake-error-bitmap '(flymake-double-exclamation-mark 
modus-themes-fringe-red))
     `(flymake-warning-bitmap '(exclamation-mark modus-themes-fringe-yellow))
     `(flymake-note-bitmap '(exclamation-mark modus-themes-fringe-cyan))
+;;;; highlight-changes
+    `(highlight-changes-colors nil)
+    `(highlight-changes-face-list '(success warning error bold bold-italic))
 ;;;; ibuffer
     `(ibuffer-deletion-face 'modus-themes-mark-del)
     `(ibuffer-filter-group-name-face 'modus-themes-pseudo-header)
@@ -7753,9 +7575,4 @@ by virtue of calling either of 
`modus-themes-load-operandi' and
       (add-to-list 'custom-theme-load-path dir))))
 
 (provide 'modus-themes)
-
-;; Local Variables:
-;; time-stamp-pattern: "Last-Modified: <%Y-%02m-%02d %02H:%02M:%02S %5z>"
-;; End:
-
 ;;; modus-themes.el ends here
diff --git a/etc/themes/modus-vivendi-theme.el 
b/etc/themes/modus-vivendi-theme.el
index fb95772654..fe52aefc84 100644
--- a/etc/themes/modus-vivendi-theme.el
+++ b/etc/themes/modus-vivendi-theme.el
@@ -3,8 +3,8 @@
 ;; Copyright (C) 2019-2022  Free Software Foundation, Inc.
 
 ;; Author: Protesilaos Stavrou <info@protesilaos.com>
-;; URL: https://gitlab.com/protesilaos/modus-themes
-;; Version: 2.3.0
+;; URL: https://git.sr.ht/~protesilaos/modus-themes
+;; Version: 2.4.1
 ;; Package-Requires: ((emacs "27.1"))
 ;; Keywords: faces, theme, accessibility
 
diff --git a/leim/Makefile.in b/leim/Makefile.in
index 4e70e8b7e9..3b4216c0b8 100644
--- a/leim/Makefile.in
+++ b/leim/Makefile.in
@@ -80,7 +80,7 @@ MISC= \
 TIT_MISC = ${TIT_GB} ${TIT_BIG5} ${MISC}
 
 
-all: ${leimdir}/leim-list.el ${leimdir}/ja-dic/ja-dic.el
+all: ${leimdir}/leim-list.el
 .PHONY: all
 
 
@@ -129,6 +129,8 @@ ${leimdir}/leim-list.el: ${srcdir}/leim-ext.el ${TIT_MISC}
 
 ${leimdir}/ja-dic/ja-dic.el: | $(leimdir)/ja-dic
 
+.PHONY: generate-ja-dic
+generate-ja-dic: ${leimdir}/ja-dic/ja-dic.el
 ${leimdir}/ja-dic/ja-dic.el: $(srcdir)/SKK-DIC/SKK-JISYO.L
        $(AM_V_GEN)$(RUN_EMACS) -batch -l ja-dic-cnv \
          --eval "(setq max-specpdl-size 5000)" \
diff --git a/lisp/Makefile.in b/lisp/Makefile.in
index e3e6c41fec..040b9a4ca3 100644
--- a/lisp/Makefile.in
+++ b/lisp/Makefile.in
@@ -94,8 +94,14 @@ COMPILE_FIRST += $(lisp)/emacs-lisp/loaddefs-gen.elc
 COMPILE_FIRST += $(lisp)/emacs-lisp/radix-tree.elc
 
 # Files to compile early in compile-main.  Works around bug#25556.
+# Also compile the ja-dic file used to convert the Japanese dictionary
+# to speed things up.  The org files are used to convert org files to
+# texi files.
 MAIN_FIRST = ./emacs-lisp/eieio.el ./emacs-lisp/eieio-base.el \
-  ./cedet/semantic/db.el ./emacs-lisp/cconv.el
+  ./cedet/semantic/db.el ./emacs-lisp/cconv.el \
+  ./international/ja-dic-cnv.el \
+  ./org/ox.el ./org/ox-texinfo.el ./org/org-macro.el ./org/org-element.el \
+  ./org/oc.el ./org/ol.el ./emacs-lisp/cl-lib.el
 
 # Prevent any settings in the user environment causing problems.
 unexport EMACSDATA EMACSDOC EMACSLOADPATH EMACSPATH
@@ -118,10 +124,12 @@ SUBDIRS_SUBDIRS = $(filter-out ${srcdir}/cedet% 
${srcdir}/leim%,${SUBDIRS})
 
 # cus-load and finder-inf are not explicitly requested by anything, so
 # we add them here to make sure they get built.
-all: compile-main $(lisp)/cus-load.el $(lisp)/finder-inf.el
+all: compile-main $(lisp)/cus-load.el $(lisp)/finder-inf.el generate-ja-dic \
+       org-manuals
 
 PHONY_EXTRAS =
-.PHONY: all custom-deps finder-data autoloads update-subdirs $(PHONY_EXTRAS)
+.PHONY: all custom-deps finder-data autoloads update-subdirs $(PHONY_EXTRAS) \
+       generate-ja-dic org-manuals
 
 # custom-deps and finder-data both used to scan _all_ the *.el files.
 # This could lead to problems in parallel builds if automatically
@@ -152,6 +160,14 @@ $(lisp)/finder-inf.el:
          --eval '(setq generated-finder-keywords-file (unmsys--file-name 
"$(srcdir)/finder-inf.el"))' \
          -f finder-compile-keywords-make-dist ${SUBDIRS_FINDER}
 
+# This is the OKURO-NASI compilation trigger.
+generate-ja-dic: main-first
+       $(AM_V_at)$(MAKE) -C ../leim generate-ja-dic EMACS="$(EMACS)"
+       $(AM_V_at)$(MAKE) compile-targets TARGETS="./leim/ja-dic/ja-dic.elc"
+
+org-manuals: main-first
+       $(AM_V_at)$(MAKE) -C ../doc/misc org.texi modus-themes.texi
+
 ## Comments on loaddefs generation:
 
 # loaddefs depends on gen-lisp for two reasons:
@@ -160,6 +176,9 @@ $(lisp)/finder-inf.el:
 # gets created before the final emacs is dumped.  Having leim
 # dependencies in ../src as well would create a parallel race condition.
 #
+# FIXME: 2) is no longer correct, so perhaps we could add unidata to
+# gen-lisp now?
+#
 # 2) Files that are marked no-update-autoloads still get recorded in loaddefs.
 # So those files should be generated before we make autoloads, if we
 # don't want a successive make autoloads to change the output file.
@@ -182,7 +201,7 @@ $(lisp)/finder-inf.el:
 # loaddefs-generate-batch.
 
 autoloads .PHONY: $(lisp)/loaddefs.el
-$(lisp)/loaddefs.el: gen-lisp $(LOADDEFS)
+$(lisp)/loaddefs.el: gen-lisp $(LOADDEFS) $(lisp)/emacs-lisp/loaddefs-gen.elc
        $(AM_V_GEN)$(emacs) \
             -l $(lisp)/emacs-lisp/loaddefs-gen.elc \
            -f loaddefs-generate-batch $(lisp)/loaddefs.el ${SUBDIRS_ALMOST}
diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index 8e251e9de8..849303fac7 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -120,7 +120,7 @@ nil means they will be displayed in LIFO order (that is, 
most
 recently created ones come first, oldest ones come last).
 
 `last-modified' means that bookmarks will be displayed sorted
-from most recently set to last recently set.
+from most recently set to least recently set.
 
 Other values means that bookmarks will be displayed sorted by
 bookmark name."
@@ -520,8 +520,11 @@ is ordered from most recently created to least recently 
created bookmark."
            (sort copy (lambda (x y) (string-lessp (car x) (car y)))))
           ((eq bookmark-sort-flag 'last-modified)
            (sort copy (lambda (x y)
-                        (time-less-p (bookmark-get-last-modified y)
-                                     (bookmark-get-last-modified x)))))
+                        (let ((tx (bookmark-get-last-modified x))
+                              (ty (bookmark-get-last-modified y)))
+                          (cond ((null tx) nil)
+                                ((null ty) t)
+                                (t (time-less-p ty tx)))))))
           (t copy))))
 
 (defun bookmark-completing-read (prompt &optional default)
diff --git a/lisp/delsel.el b/lisp/delsel.el
index f5fe7cf793..c9d3cf269b 100644
--- a/lisp/delsel.el
+++ b/lisp/delsel.el
@@ -64,6 +64,19 @@
   "If non-nil, deleted region text is stored in this register.
 Value must be the register (key) to use.")
 
+(defcustom delete-selection-temporary-region nil
+  "Whether to delete only temporary regions.
+When non-nil, typed text replaces only the regions set by
+mouse-dragging, shift-selection, and \"\\[universal-argument] 
\\[exchange-point-and-mark]\" when
+`transient-mark-mode' is turned off.  If the value is the symbol
+`selection', then replace only the regions set by mouse-dragging
+and shift-selection."
+  :version "29.1"
+  :group 'editing-basics
+  :type '(choice (const :tag "Replace all regions" nil)
+                 (const :tag "Replace region from mouse, shift-selection, and 
\"C-u C-x C-x\"" t)
+                 (const :tag "Replace region from mouse and shift-selection" 
selection)))
+
 ;;;###autoload
 (defalias 'pending-delete-mode 'delete-selection-mode)
 
@@ -251,7 +264,13 @@ property on their symbol; commands which insert text but 
don't
 have this property won't delete the selection.
 See `delete-selection-helper'."
   (when (and delete-selection-mode (use-region-p)
-            (not buffer-read-only))
+            (not buffer-read-only)
+             (or (null delete-selection-temporary-region)
+                 (and delete-selection-temporary-region
+                      (consp transient-mark-mode)
+                      (eq (car transient-mark-mode) 'only))
+                 (and (not (eq delete-selection-temporary-region 'selection))
+                      (eq transient-mark-mode 'lambda))))
     (delete-selection-helper (and (symbolp this-command)
                                   (get this-command 'delete-selection)))))
 
diff --git a/lisp/dired.el b/lisp/dired.el
index 3f2e52e629..5a1fce860e 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -1764,7 +1764,15 @@ when Emacs exits or the user drags another file.")
                       (setq dired-last-dragged-remote-file filename)
                       (add-hook 'kill-emacs-hook
                                 #'dired-remove-last-dragged-local-file))
-                    (gui-backend-set-selection 'XdndSelection filename)
+                    (gui-backend-set-selection
+                     ;; FIXME: this seems arbitrarily confusing.
+                     ;; Should drag-and-drop for common items (such as
+                     ;; files and text) should be abstracted into
+                     ;; dnd.el?
+                     'XdndSelection
+                     (propertize filename 'text/uri-list
+                                 (concat "file://"
+                                         (expand-file-name filename))))
                     (x-begin-drag '("text/uri-list" "text/x-dnd-username"
                                     "FILE_NAME" "FILE" "HOST_NAME" 
"_DT_NETFILE")
                                   (if (eq 'dired-mouse-drag-files 'link)
diff --git a/lisp/emacs-lisp/loaddefs-gen.el b/lisp/emacs-lisp/loaddefs-gen.el
index 02f584d0af..e5a5c21d23 100644
--- a/lisp/emacs-lisp/loaddefs-gen.el
+++ b/lisp/emacs-lisp/loaddefs-gen.el
@@ -508,6 +508,13 @@ If INCLUDE-PACKAGE-VERSION, include package version data."
                                 (directory-files (expand-file-name d)
                                                   t files-re))
                               (if (consp dir) dir (list dir)))))
+         (updating (and (file-exists-p output-file)
+                        ;; Always do a complete update if loaddefs-gen.el
+                        ;; has been updated and we're doing a base build.
+                        include-package-version
+                        (file-newer-than-file-p
+                         output-file
+                         (expand-file-name "emacs-lisp/loaddefs-gen.el"))))
          (defs nil))
 
     ;; Collect all the autoload data.
@@ -518,7 +525,7 @@ If INCLUDE-PACKAGE-VERSION, include package version data."
           (file-count 0))
       (dolist (file files)
         (progress-reporter-update progress (setq file-count (1+ file-count)))
-        (when (or (not (file-exists-p output-file))
+        (when (or (not updating)
                   (file-newer-than-file-p file output-file))
           (setq defs (nconc
                      (loaddefs-generate--parse-file
@@ -536,7 +543,7 @@ If INCLUDE-PACKAGE-VERSION, include package version data."
     (dolist (fdefs (seq-group-by #'car defs))
       (let ((loaddefs-file (car fdefs)))
         (with-temp-buffer
-          (if (file-exists-p loaddefs-file)
+          (if (and updating (file-exists-p loaddefs-file))
               (insert-file-contents loaddefs-file)
             (insert (loaddefs-generate--rubric loaddefs-file nil t))
             (search-backward "\f")
diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el
index 425e9dcb41..2c54c86ab7 100644
--- a/lisp/international/fontset.el
+++ b/lisp/international/fontset.el
@@ -237,7 +237,7 @@
        (lydian #x10920)
        (kharoshthi #x10A00)
        (manichaean #x10AC0)
-       (hanifi-rohingya #x10D00)
+       (hanifi-rohingya #x10D00 #x10D24 #x10D39)
        (yezidi #x10E80)
        (old-sogdian #x10F00)
        (sogdian #x10F30)
@@ -791,6 +791,7 @@
                    cypriot-syllabary
                    phoenician
                    lydian
+                    hanifi-rohingya
                     yezidi
                    kharoshthi
                    manichaean
diff --git a/lisp/language/misc-lang.el b/lisp/language/misc-lang.el
index c8a4821abf..46429a4380 100644
--- a/lisp/language/misc-lang.el
+++ b/lisp/language/misc-lang.el
@@ -212,6 +212,28 @@ thin (i.e. 1-dot width) space."
    (list (vector "[\U00013000-\U0001342E]+"
                  0 #'font-shape-gstring))))
 
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Hanifi Rohingya
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(set-language-info-alist
+ "Hanifi Rohingya" '((charset unicode)
+                     (coding-system utf-8)
+                     (coding-priority utf-8)
+                     (input-method . "hanifi-rohingya")
+                     (sample-text . "Hanifi Rohingya (𐴌𐴟𐴇𐴥𐴝𐴚𐴒𐴙𐴝 𐴇𐴝𐴕𐴞𐴉𐴞 𐴓𐴠𐴑𐴤𐴝)  
𐴀𐴝𐴏𐴓𐴝𐴀𐴡𐴤𐴛𐴝𐴓𐴝𐴙𐴑𐴟𐴔")
+                     (documentation . "\
+Rohingya language and its script Hanifi Rohingya are supported
+in this language environment.")))
+
+;; Hanifi Rohingya composition rules
+(set-char-table-range
+ composition-function-table
+ '(#x10D1D . #x10D27)
+ (list (vector
+        "[\x10D00-\x10D27]+"
+        1 'font-shape-gstring)))
+
 (provide 'misc-lang)
 
 ;;; misc-lang.el ends here
diff --git a/lisp/leim/quail/misc-lang.el b/lisp/leim/quail/misc-lang.el
new file mode 100644
index 0000000000..bdb86ab528
--- /dev/null
+++ b/lisp/leim/quail/misc-lang.el
@@ -0,0 +1,101 @@
+;;; misc-lang.el --- Quail package for inputting Miscellaneous characters  -*- 
lexical-binding: t; -*-
+
+;; Copyright (C) 2022 Free Software Foundation, Inc.
+
+;; Author: समीर सिंह Sameer Singh <lumarzeli30@gmail.com>
+;; Keywords: multilingual, input method, i18n, Miscellaneous
+
+;; 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:
+
+;; Input methods for Miscellaneous languages.
+
+;;; Code:
+
+(require 'quail)
+
+(quail-define-package
+ "hanifi-rohingya" "Hanifi Rohingya" "𐴌𐴟" t "Hanifi Rohingya phonetic input 
method.
+
+ `\\=`' is used to switch levels instead of Alt-Gr.
+" nil t t t t nil nil nil nil nil t)
+
+(quail-define-rules
+ ("1"  ?𐴱)
+ ("`1" ?1)
+ ("2"  ?𐴲)
+ ("`2" ?2)
+ ("3"  ?𐴳)
+ ("`3" ?3)
+ ("4"  ?𐴴)
+ ("`4" ?4)
+ ("5"  ?𐴵)
+ ("`5" ?5)
+ ("6"  ?𐴶)
+ ("`6" ?6)
+ ("7"  ?𐴷)
+ ("`7" ?7)
+ ("8"  ?𐴸)
+ ("`8" ?8)
+ ("9"  ?𐴹)
+ ("`9" ?9)
+ ("0"  ?𐴰)
+ ("`0" ?0)
+ ("q"  ?𐴄)
+ ("w"  ?𐴋)
+ ("W"  ?𐴍)
+ ("e"  ?𐴠)
+ ("E"  ?𐴤)
+ ("r"  ?𐴌)
+ ("R"  ?𐴥)
+ ("t"  ?𐴃)
+ ("T"  ?𐴦)
+ ("y"  ?𐴘)
+ ("Y"  ?𐴙)
+ ("u"  ?𐴟)
+ ("U"  ?𐴧)
+ ("i"  ?𐴞)
+ ("o"  ?𐴡)
+ ("p"  ?𐴂)
+ ("a"  ?𐴀)
+ ("A"  ?𐴝)
+ ("s"  ?𐴏)
+ ("S"  ?𐴐)
+ ("d"  ?𐴊)
+ ("f"  ?𐴉)
+ ("F"  ?𐴢)
+ ("g"  ?𐴒)
+ ("h"  ?𐴇)
+ ("j"  ?𐴅)
+ ("k"  ?𐴑)
+ ("K"  ?𐴈)
+ ("l"  ?𐴓)
+ ("z"  ?𐴎)
+ ("c"  ?𐴆)
+ ("C"  #x200C) ; ZWNJ
+ ("v"  ?𐴖)
+ ("V"  ?𐴗)
+ ("`v" ?𐴜)
+ ("b"  ?𐴁)
+ ("n"  ?𐴕)
+ ("N"  ?𐴚)
+ ("`n" ?𐴛)
+ ("`N" ?𐴣)
+ ("m"  ?𐴔))
+
+(provide 'misc-lang)
+;;; misc-lang.el ends here
diff --git a/lisp/play/gamegrid.el b/lisp/play/gamegrid.el
index 256b4e19ce..55c9244f2e 100644
--- a/lisp/play/gamegrid.el
+++ b/lisp/play/gamegrid.el
@@ -343,11 +343,17 @@ format."
           (gamegrid-colorize-glyph color))
          ((listp data)
           (find-image data)) ;untested!
-         ((vectorp data)
-          (gamegrid-make-image-from-vector data)))))
+          ;; Remove when `gamegrid-make-image-from-vector' is removed:
+          ((vectorp data)
+           (lwarn 'gamegrid :warning
+                  "Using obsolete XEmacs style \"glyph\"; \
+convert to an Emacs image-spec instead")
+           (with-suppressed-warnings ((obsolete 
gamegrid-make-image-from-vector))
+             (gamegrid-make-image-from-vector data))))))
 
 (defun gamegrid-make-image-from-vector (vect)
   "Convert an XEmacs style \"glyph\" to an image-spec."
+  (declare (obsolete nil "29.1"))
   (let ((l (list 'image :type)))
     (dotimes (n (length vect))
       (setf l (nconc l (list (aref vect n)))))
diff --git a/lisp/select.el b/lisp/select.el
index dbe9633517..01e002db70 100644
--- a/lisp/select.el
+++ b/lisp/select.el
@@ -401,11 +401,16 @@ also be a string, which stands for the symbol with that 
name, but
 this is considered obsolete.)  DATA may be a string, a symbol, or
 an integer.
 
-The selection may also be a cons of two markers pointing to the same buffer,
-or an overlay.  In these cases, the selection is considered to be the text
-between the markers *at whatever time the selection is examined*.
-Thus, editing done in the buffer after you specify the selection
-can alter the effective value of the selection.
+The selection may also be a cons of two markers pointing to the
+same buffer, or an overlay.  In these cases, the selection is
+considered to be the text between the markers *at whatever time
+the selection is examined*.  Thus, editing done in the buffer
+after you specify the selection can alter the effective value of
+the selection.  If DATA is a string, then its text properties can
+specify alternative values for different data types.  For
+example, the value of any property named `text/uri-list' will be
+used instead of DATA itself when another program converts TYPE to
+the target `text/uri-list'.
 
 The data may also be a vector of valid non-vector selection values.
 
@@ -692,18 +697,15 @@ This function returns the string \"emacs\"."
   (user-real-login-name))
 
 (defun xselect-convert-to-text-uri-list (_selection _type value)
-  (when (and (stringp value)
-             (file-exists-p value))
-    (concat (url-encode-url
-             ;; Uncomment the following code code in a better world where
-             ;; people write correct code that adds the hostname to the URI.
-             ;; Since most programs don't implement this properly, we omit the
-             ;; hostname so that copying files actually works.  Most properly
-             ;; written programs will look at WM_CLIENT_MACHINE to determine
-             ;; the hostname anyway.  (format "file://%s%s\n" (system-name)
-             ;; (expand-file-name value))
-             (concat "file://" (expand-file-name value)))
-            "\n")))
+  (if (stringp value)
+      (concat (url-encode-url value) "\n")
+    (when (vectorp value)
+      (with-temp-buffer
+        (cl-loop for tem across value
+                 do (progn
+                      (insert (url-encode-url tem))
+                      (insert "\n")))
+        (buffer-string)))))
 
 (defun xselect-convert-to-xm-file (selection _type value)
   (when (and (stringp value)
@@ -716,8 +718,8 @@ This function returns the string \"emacs\"."
   "Return whether or not `text/uri-list' is a valid target for SELECTION.
 VALUE is the local selection value of SELECTION."
   (and (eq selection 'XdndSelection)
-       (stringp value)
-       (file-exists-p value)))
+       (or (stringp value)
+           (vectorp value))))
 
 (defun xselect-convert-xm-special (_selection _type _value)
   "")
diff --git a/lisp/simple.el b/lisp/simple.el
index 24c61b5bee..a22df8025b 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -9802,7 +9802,7 @@ Called from `temp-buffer-show-hook'."
           ;; - With fancy completion styles, the code below will not always
           ;;   find the right base directory.
           (if minibuffer-completing-file-name
-              (file-name-as-directory
+              (file-name-directory
                (expand-file-name
                 (buffer-substring (minibuffer-prompt-end) (point)))))))
     (with-current-buffer standard-output
diff --git a/lisp/term/haiku-win.el b/lisp/term/haiku-win.el
index a8cc1da731..2a31dd38c8 100644
--- a/lisp/term/haiku-win.el
+++ b/lisp/term/haiku-win.el
@@ -52,7 +52,8 @@
   "The local value of the special `XdndSelection' selection.")
 
 (defvar haiku-dnd-selection-converters '((STRING . haiku-dnd-convert-string)
-                                         (FILE_NAME . 
haiku-dnd-convert-file-name))
+                                         (FILE_NAME . 
haiku-dnd-convert-file-name)
+                                         (text/uri-list . 
haiku-dnd-convert-text-uri-list))
   "Alist of X selection types to functions that act as selection converters.
 The functions should accept a single argument VALUE, describing
 the value of the drag-and-drop selection, and return a list of
@@ -148,6 +149,19 @@ VALUE as a unibyte string, or nil if VALUE was not a 
string."
              (file-exists-p value))
     (list "refs" (propertize (expand-file-name value) 'type 'ref))))
 
+(defun haiku-dnd-convert-text-uri-list (value)
+  "Convert VALUE to a list of URLs."
+  (cond
+   ((stringp value) (list "text/uri-list"
+                          (concat (url-encode-url value) "\n")))
+   ((vectorp value) (list "text/uri-list"
+                          (with-temp-buffer
+                            (cl-loop for tem across value
+                                     do (progn
+                                          (insert (url-encode-url tem))
+                                          (insert "\n")))
+                            (buffer-string))))))
+
 (declare-function x-open-connection "haikufns.c")
 (declare-function x-handle-args "common-win")
 (declare-function haiku-selection-data "haikuselect.c")
@@ -341,12 +355,17 @@ take effect on menu items until the menu bar is updated 
again."
         (mouse-highlight nil)
         (haiku-signal-invalid-refs nil))
     (dolist (target targets)
-      (let ((selection-converter (cdr (assoc (intern target)
-                                             haiku-dnd-selection-converters))))
+      (let* ((target-atom (intern target))
+             (selection-converter (cdr (assoc target-atom
+                                              
haiku-dnd-selection-converters))))
         (when selection-converter
           (let ((selection-result
                  (funcall selection-converter
-                          haiku-dnd-selection-value)))
+                          (if (stringp haiku-dnd-selection-value)
+                              (or (get-text-property 0 target-atom
+                                                     haiku-dnd-selection-value)
+                                  haiku-dnd-selection-value)
+                            haiku-dnd-selection-value))))
             (when selection-result
               (let ((field (cdr (assoc (car selection-result) message))))
                 (unless (cadr field)
diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el
index 65abdcf0fb..a36d5d11e7 100644
--- a/lisp/term/ns-win.el
+++ b/lisp/term/ns-win.el
@@ -895,7 +895,7 @@ See the documentation of `create-fontset-from-fontset-spec' 
for the format.")
                                          &context (window-system ns))
   (ns-get-selection selection-symbol target-type))
 
-(defun x-begin-drag (targets &optional action frame return-frame 
_allow-current-frame)
+(defun x-begin-drag (targets &optional action frame return-frame 
allow-current-frame)
   "SKIP: real doc in xfns.c."
   (unless ns-dnd-selection-value
     (error "No local value for XdndSelection"))
@@ -910,7 +910,7 @@ See the documentation of `create-fontset-from-fontset-spec' 
for the format.")
                                           (expand-file-name
                                            ns-dnd-selection-value))))
             pasteboard))
-    (ns-begin-drag frame pasteboard action return-frame)))
+    (ns-begin-drag frame pasteboard action return-frame allow-current-frame)))
 
 (defun ns-handle-drag-motion (frame x y)
   "Handle mouse movement on FRAME at X and Y during drag-and-drop.
diff --git a/src/emacs.c b/src/emacs.c
index 9197a19f36..e4257a66b4 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -1428,6 +1428,11 @@ main (int argc, char **argv)
       if (initialized)
        {
          Lisp_Object tem, tem2;
+
+         /* Fformat_time_string below manipulates bignums, so we need
+            this initialization.  */
+         init_bignum ();
+
          tem = Fsymbol_value (intern_c_string ("emacs-version"));
          tem2 = Fsymbol_value (intern_c_string ("emacs-copyright"));
          if (!STRINGP (tem))
diff --git a/src/haiku_support.cc b/src/haiku_support.cc
index 2411a7b539..3b1a2cfcb3 100644
--- a/src/haiku_support.cc
+++ b/src/haiku_support.cc
@@ -2403,7 +2403,8 @@ public:
     if (key_label)
       key = strdup (key_label);
 
-    this->help = strdup (help);
+    if (help)
+      this->help = strdup (help);
   }
 
   ~EmacsMenuItem ()
diff --git a/src/nsselect.m b/src/nsselect.m
index 63cea365e2..a4129b12f0 100644
--- a/src/nsselect.m
+++ b/src/nsselect.m
@@ -662,7 +662,7 @@ ns_dnd_action_from_operation (NSDragOperation operation)
     }
 }
 
-DEFUN ("ns-begin-drag", Fns_begin_drag, Sns_begin_drag, 3, 4, 0,
+DEFUN ("ns-begin-drag", Fns_begin_drag, Sns_begin_drag, 3, 5, 0,
        doc: /* Begin a drag-and-drop operation on FRAME.
 
 FRAME must be a window system frame.  PBOARD is an alist of (TYPE
@@ -680,13 +680,16 @@ data inside PBOARD.
 
 Return the action that the drop target actually chose to perform, or
 nil if no action was performed (either because there was no drop
-target, or the drop was rejected).  If RETURN_FRAME is the symbol
+target, or the drop was rejected).  If RETURN-FRAME is the symbol
 `now', also return any frame that mouse moves into during the
 drag-and-drop operation, whilst simultaneously cancelling it.  Any
 other non-nil value means to do the same, but to wait for the mouse to
-leave FRAME first.  */)
+leave FRAME first.
+
+If ALLOW-SAME-FRAME is nil, dropping on FRAME will result in the drop
+being ignored.  */)
   (Lisp_Object frame, Lisp_Object pboard, Lisp_Object action,
-   Lisp_Object return_frame)
+   Lisp_Object return_frame, Lisp_Object allow_same_frame)
 {
   struct frame *f, *return_to;
   NSPasteboard *pasteboard;
@@ -715,7 +718,8 @@ leave FRAME first.  */)
   operation = [window beginDrag: operation
                  forPasteboard: pasteboard
                       withMode: mode
-                 returnFrameTo: &return_to];
+                 returnFrameTo: &return_to
+                  prohibitSame: (BOOL) NILP (allow_same_frame)];
 
   if (return_to)
     {
diff --git a/src/nsterm.h b/src/nsterm.h
index c39b66534f..37bff6260a 100644
--- a/src/nsterm.h
+++ b/src/nsterm.h
@@ -425,6 +425,7 @@ enum ns_return_frame_mode
 
   struct frame *dnd_return_frame;
   enum ns_return_frame_mode dnd_mode;
+  BOOL dnd_allow_same_frame;
 }
 
 #ifdef NS_IMPL_GNUSTEP
@@ -444,7 +445,9 @@ enum ns_return_frame_mode
 - (NSDragOperation) beginDrag: (NSDragOperation) op
                forPasteboard: (NSPasteboard *) pasteboard
                     withMode: (enum ns_return_frame_mode) mode
-               returnFrameTo: (struct frame **) frame_return;
+               returnFrameTo: (struct frame **) frame_return
+           prohibitSame: (BOOL) prohibit_same_frame;
+- (BOOL) mustNotDropOn: (NSView *) receiver;
 @end
 
 
diff --git a/src/nsterm.m b/src/nsterm.m
index f4fde9bd12..46ce2cc5e4 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -8608,13 +8608,30 @@ ns_create_font_panel_buttons (id target, SEL select, 
SEL cancel_action)
 
 -(NSDragOperation) draggingEntered: (id <NSDraggingInfo>) sender
 {
+  id source;
+
   NSTRACE ("[EmacsView draggingEntered:]");
+
+  source = [sender draggingSource];
+
+  if (source && [source respondsToSelector: @selector(mustNotDropOn:)]
+      && [source mustNotDropOn: self])
+    return NSDragOperationNone;
+
   return NSDragOperationGeneric;
 }
 
 
--(BOOL)prepareForDragOperation: (id <NSDraggingInfo>) sender
+-(BOOL) prepareForDragOperation: (id <NSDraggingInfo>) sender
 {
+  id source;
+
+  source = [sender draggingSource];
+
+  if (source && [source respondsToSelector: @selector(mustNotDropOn:)]
+      && [source mustNotDropOn: self])
+    return NO;
+
   return YES;
 }
 
@@ -8675,25 +8692,29 @@ ns_create_font_panel_buttons (id target, SEL select, 
SEL cancel_action)
   return NSDragOperationGeneric;
 }
 
--(BOOL)performDragOperation: (id <NSDraggingInfo>) sender
+- (BOOL) performDragOperation: (id <NSDraggingInfo>) sender
 {
-  id pb;
+  id pb, source;
   int x, y;
   NSString *type;
-  NSEvent *theEvent = [[self window] currentEvent];
   NSPoint position;
   NSDragOperation op = [sender draggingSourceOperationMask];
   Lisp_Object operations = Qnil;
   Lisp_Object strings = Qnil;
   Lisp_Object type_sym;
+  struct input_event ie;
 
   NSTRACE ("[EmacsView performDragOperation:]");
 
-  if (!emacs_event)
+  source = [sender draggingSource];
+
+  if (source && [source respondsToSelector: @selector(mustNotDropOn:)]
+      && [source mustNotDropOn: self])
     return NO;
 
   position = [self convertPoint: [sender draggingLocation] fromView: nil];
-  x = lrint (position.x);  y = lrint (position.y);
+  x = lrint (position.x);
+  y = lrint (position.y);
 
   pb = [sender draggingPasteboard];
   type = [pb availableTypeFromArray: ns_drag_types];
@@ -8709,10 +8730,8 @@ ns_create_font_panel_buttons (id target, SEL select, SEL 
cancel_action)
   if (op & NSDragOperationGeneric || NILP (operations))
     operations = Fcons (Qns_drag_operation_generic, operations);
 
-  if (type == 0)
-    {
-      return NO;
-    }
+  if (!type)
+    return NO;
 #if NS_USE_NSPasteboardTypeFileURL != 0
   else if ([type isEqualToString: NSPasteboardTypeFileURL])
     {
@@ -8764,21 +8783,16 @@ ns_create_font_panel_buttons (id target, SEL select, 
SEL cancel_action)
       strings = list1 ([data lispString]);
     }
   else
-    {
-      fputs ("Invalid data type in dragging pasteboard\n", stderr);
-      return NO;
-    }
-
-  emacs_event->kind = DRAG_N_DROP_EVENT;
-  XSETINT (emacs_event->x, x);
-  XSETINT (emacs_event->y, y);
-  emacs_event->modifiers = 0;
+    return NO;
 
-  emacs_event->arg = Fcons (type_sym,
-                            Fcons (operations,
-                                   strings));
-  EV_TRAILER (theEvent);
+  EVENT_INIT (ie);
+  ie.kind = DRAG_N_DROP_EVENT;
+  ie.arg = Fcons (type_sym, Fcons (operations, strings));
+  XSETINT (ie.x, x);
+  XSETINT (ie.y, y);
+  XSETFRAME (ie.frame_or_window, emacsframe);
 
+  kbd_buffer_store_event (&ie);
   return YES;
 }
 
@@ -9611,10 +9625,17 @@ nswindow_orderedIndex_sort (id w1, id w2, void *c)
 }
 #endif
 
+- (BOOL) mustNotDropOn: (NSView *) receiver
+{
+  return ([receiver window] == self
+         ? !dnd_allow_same_frame : NO);
+}
+
 - (NSDragOperation) beginDrag: (NSDragOperation) op
                forPasteboard: (NSPasteboard *) pasteboard
                     withMode: (enum ns_return_frame_mode) mode
                returnFrameTo: (struct frame **) frame_return
+                prohibitSame: (BOOL) prohibit_same_frame
 {
   NSImage *image;
 #ifdef NS_IMPL_COCOA
@@ -9627,6 +9648,7 @@ nswindow_orderedIndex_sort (id w1, id w2, void *c)
   image = [[NSImage alloc] initWithSize: NSMakeSize (1.0, 1.0)];
   dnd_mode = mode;
   dnd_return_frame = NULL;
+  dnd_allow_same_frame = !prohibit_same_frame;
 
   /* Now draw transparency onto the image.  */
   [image lockFocus];
diff --git a/src/xselect.c b/src/xselect.c
index a414873594..5f2a0cf56d 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -399,7 +399,7 @@ static Lisp_Object
 x_get_local_selection (Lisp_Object selection_symbol, Lisp_Object target_type,
                       bool local_request, struct x_display_info *dpyinfo)
 {
-  Lisp_Object local_value;
+  Lisp_Object local_value, tem;
   Lisp_Object handler_fn, value, check;
 
   local_value = LOCAL_SELECTION (selection_symbol, dpyinfo);
@@ -426,10 +426,21 @@ x_get_local_selection (Lisp_Object selection_symbol, 
Lisp_Object target_type,
       if (CONSP (handler_fn))
        handler_fn = XCDR (handler_fn);
 
+      tem = XCAR (XCDR (local_value));
+
+      if (STRINGP (tem))
+       {
+         local_value = Fget_text_property (make_fixnum (0),
+                                           target_type, tem);
+
+         if (!NILP (local_value))
+           tem = local_value;
+       }
+
       if (!NILP (handler_fn))
-       value = call3 (handler_fn,
-                      selection_symbol, (local_request ? Qnil : target_type),
-                      XCAR (XCDR (local_value)));
+       value = call3 (handler_fn, selection_symbol,
+                      (local_request ? Qnil : target_type),
+                      tem);
       else
        value = Qnil;
       value = unbind_to (count, value);
diff --git a/src/xterm.c b/src/xterm.c
index f062e6485d..f6b99e7f40 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -550,6 +550,7 @@ along with GNU Emacs.  If not, see 
<https://www.gnu.org/licenses/>.  */
 #include <config.h>
 #include <stdlib.h>
 #include <math.h>
+#include <signal.h>
 
 #include "lisp.h"
 #include "blockinput.h"
@@ -1366,34 +1367,50 @@ typedef struct xm_top_level_leave_message
 /* #define XM_DRAG_SIDE_EFFECT_OPERATIONS(effect)      (((effect) & 0xf00) >> 
8) */
 #define XM_DRAG_SIDE_EFFECT_DROP_ACTION(effect)        (((effect) & 0xf000) >> 
12)
 
-#define XM_DRAG_NOOP 0
-#define XM_DRAG_MOVE (1L << 0)
-#define XM_DRAG_COPY (1L << 1)
-#define XM_DRAG_LINK (1L << 2)
+enum xm_drag_operation
+  {
+    XM_DRAG_NOOP = 0,
+    XM_DRAG_MOVE = (1L << 0),
+    XM_DRAG_COPY = (1L << 1),
+    XM_DRAG_LINK = (1L << 2),
+  };
 
-#define XM_DROP_ACTION_DROP            0
-#define XM_DROP_ACTION_DROP_HELP       1
-#define XM_DROP_ACTION_DROP_CANCEL     2
+enum xm_drag_action
+  {
+    XM_DROP_ACTION_DROP               = 0,
+    XM_DROP_ACTION_DROP_HELP   = 1,
+    XM_DROP_ACTION_DROP_CANCEL = 2,
+  };
 
 #define XM_DRAG_REASON(originator, code)       ((code) | ((originator) << 7))
 #define XM_DRAG_REASON_ORIGINATOR(reason)      (((reason) & 0x80) ? 1 : 0)
 #define XM_DRAG_REASON_CODE(reason)            ((reason) & 0x7f)
 
-#define XM_DRAG_REASON_DROP_START      5
-#define XM_DRAG_REASON_TOP_LEVEL_ENTER 0
-#define XM_DRAG_REASON_TOP_LEVEL_LEAVE 1
-#define XM_DRAG_REASON_DRAG_MOTION     2
-#define XM_DRAG_ORIGINATOR_INITIATOR   0
-#define XM_DRAG_ORIGINATOR_RECEIVER    1
-
-#define XM_DRAG_STYLE_NONE             0
+enum xm_drag_reason
+  {
+    XM_DRAG_REASON_DROP_START     = 5,
+    XM_DRAG_REASON_TOP_LEVEL_ENTER = 0,
+    XM_DRAG_REASON_TOP_LEVEL_LEAVE = 1,
+    XM_DRAG_REASON_DRAG_MOTION    = 2,
+  };
 
-#define XM_DRAG_STYLE_DROP_ONLY                1
-#define XM_DRAG_STYLE_DROP_ONLY_REC    3
+enum xm_drag_originator
+  {
+    XM_DRAG_ORIGINATOR_INITIATOR = 0,
+    XM_DRAG_ORIGINATOR_RECEIVER         = 1,
+  };
 
-#define XM_DRAG_STYLE_DYNAMIC          5
-#define XM_DRAG_STYLE_DYNAMIC_REC      2
-#define XM_DRAG_STYLE_DYNAMIC_REC1     4
+enum xm_drag_style
+  {
+    /* The values ending with _REC should be treated as equivalent to
+       the ones without in messages from the receiver.  */
+    XM_DRAG_STYLE_NONE         = 0,
+    XM_DRAG_STYLE_DROP_ONLY    = 1,
+    XM_DRAG_STYLE_DROP_ONLY_REC = 3,
+    XM_DRAG_STYLE_DYNAMIC      = 5,
+    XM_DRAG_STYLE_DYNAMIC_REC  = 2,
+    XM_DRAG_STYLE_DYNAMIC_REC1 = 4,
+  };
 
 #define XM_DRAG_STYLE_IS_DROP_ONLY(n)  ((n) == XM_DRAG_STYLE_DROP_ONLY \
                                         || (n) == XM_DRAG_STYLE_DROP_ONLY_REC)
@@ -1401,9 +1418,12 @@ typedef struct xm_top_level_leave_message
                                         || (n) == XM_DRAG_STYLE_DYNAMIC_REC \
                                         || (n) == XM_DRAG_STYLE_DYNAMIC_REC1)
 
-#define XM_DROP_SITE_VALID     3
-/* #define XM_DROP_SITE_INVALID        2 */
-#define XM_DROP_SITE_NONE      1
+enum xm_drop_site_status
+  {
+    XM_DROP_SITE_VALID  = 3,
+    XM_DROP_SITE_INVALID = 2,
+    XM_DROP_SITE_NONE   = 1,
+  };
 
 /* The version of the Motif drag-and-drop protocols that Emacs
    supports.  */
@@ -10291,8 +10311,11 @@ static void
 x_next_event_from_any_display (XEvent *event)
 {
   struct x_display_info *dpyinfo;
-  fd_set fds;
-  int fd, maxfd;
+  fd_set fds, rfds;
+  int fd, maxfd, rc;
+
+  rc = -1;
+  FD_ZERO (&rfds);
 
   while (true)
     {
@@ -10302,27 +10325,31 @@ x_next_event_from_any_display (XEvent *event)
       for (dpyinfo = x_display_list; dpyinfo;
           dpyinfo = dpyinfo->next)
        {
-         if (XPending (dpyinfo->display))
+         fd = ConnectionNumber (dpyinfo->display);
+
+         if ((rc < 0 || FD_ISSET (fd, &rfds))
+             && XPending (dpyinfo->display))
            {
              XNextEvent (dpyinfo->display, event);
              return;
            }
 
-         fd = XConnectionNumber (dpyinfo->display);
-
          if (fd > maxfd)
            maxfd = fd;
 
          eassert (fd < FD_SETSIZE);
-         FD_SET (XConnectionNumber (dpyinfo->display), &fds);
+         FD_SET (fd, &fds);
        }
 
       eassert (maxfd >= 0);
 
-      /* We don't have to check the return of pselect, because if an
+      /* Continue to read input even if pselect fails, because if an
         error occurs XPending will call the IO error handler, which
         then brings us out of this loop.  */
-      pselect (maxfd, &fds, NULL, NULL, NULL, NULL);
+      rc = pselect (maxfd + 1, &fds, NULL, NULL, NULL, NULL);
+
+      if (rc >= 0)
+       rfds = fds;
     }
 }
 
@@ -14904,7 +14931,7 @@ x_wait_for_cell_change (Lisp_Object cell, struct 
timespec timeout)
            maxfd = fd;
 
          eassert (fd < FD_SETSIZE);
-         FD_SET (XConnectionNumber (dpyinfo->display), &fds);
+         FD_SET (fd, &fds);
        }
 
       /* Prevent events from being lost (from GTK's point of view) by
@@ -14945,12 +14972,12 @@ x_wait_for_cell_change (Lisp_Object cell, struct 
timespec timeout)
       timeout = timespec_sub (at, current);
 
 #ifndef USE_GTK
-      rc = pselect (maxfd, &fds, NULL, NULL, &timeout, NULL);
+      rc = pselect (maxfd + 1, &fds, NULL, NULL, &timeout, NULL);
 
-      if (rc > 0)
+      if (rc >= 0)
        rfds = fds;
 #else
-      pselect (maxfd, &fds, NULL, NULL, &timeout, NULL);
+      pselect (maxfd + 1, &fds, NULL, NULL, &timeout, NULL);
 #endif
     }
 }
@@ -15069,6 +15096,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
            && event->xclient.message_type == dpyinfo->Xatom_XdndStatus)
          {
            Window target;
+           unsigned long r1, r2;
 
            target = event->xclient.data.l[0];
 
@@ -15076,11 +15104,14 @@ handle_one_xevent (struct x_display_info *dpyinfo,
                && target == x_dnd_last_seen_window
                && event->xclient.data.l[1] & 2)
              {
+               r1 = event->xclient.data.l[2];
+               r2 = event->xclient.data.l[2];
+
                x_dnd_mouse_rect_target = target;
-               x_dnd_mouse_rect.x = (event->xclient.data.l[2] & 0xffff0000) >> 
16;
-               x_dnd_mouse_rect.y = (event->xclient.data.l[2] & 0xffff);
-               x_dnd_mouse_rect.width = (event->xclient.data.l[3] & 
0xffff0000) >> 16;
-               x_dnd_mouse_rect.height = (event->xclient.data.l[3] & 0xffff);
+               x_dnd_mouse_rect.x = (r1 & 0xffff0000) >> 16;
+               x_dnd_mouse_rect.y = (r1 & 0xffff);
+               x_dnd_mouse_rect.width = (r2 & 0xffff0000) >> 16;
+               x_dnd_mouse_rect.height = (r2 & 0xffff);
              }
            else
              x_dnd_mouse_rect_target = None;
@@ -15501,7 +15532,14 @@ handle_one_xevent (struct x_display_info *dpyinfo,
            && eventp->selection == dpyinfo->Xatom_XdndSelection
            && (eventp->target == dpyinfo->Xatom_XmTRANSFER_SUCCESS
                || eventp->target == dpyinfo->Xatom_XmTRANSFER_FAILURE))
-         x_dnd_waiting_for_finish = false;
+         {
+           x_dnd_waiting_for_finish = false;
+
+           /* If the transfer failed, then return nil from
+              `x-begin-drag'.  */
+           if (eventp->target == dpyinfo->Xatom_XmTRANSFER_FAILURE)
+             x_dnd_action = None;
+         }
       }
       break;
 
@@ -22851,7 +22889,7 @@ x_check_expected_move (struct frame *f, int 
expected_left, int expected_top)
       int adjusted_left;
       int adjusted_top;
 
-        FRAME_DISPLAY_INFO (f)->wm_type = X_WMTYPE_A;
+      FRAME_DISPLAY_INFO (f)->wm_type = X_WMTYPE_A;
       FRAME_X_OUTPUT (f)->move_offset_left = expected_left - current_left;
       FRAME_X_OUTPUT (f)->move_offset_top = expected_top - current_top;
 
@@ -22868,7 +22906,6 @@ x_check_expected_move (struct frame *f, int 
expected_left, int expected_top)
   else
     /* It's a "Type B" window manager.  We don't have to adjust the
        frame's position. */
-
       FRAME_DISPLAY_INFO (f)->wm_type = X_WMTYPE_B;
 }
 
@@ -22882,11 +22919,17 @@ x_check_expected_move (struct frame *f, int 
expected_left, int expected_top)
 static void
 x_sync_with_move (struct frame *f, int left, int top, bool fuzzy)
 {
-  int count = 0;
+  sigset_t emptyset;
+  int count, current_left, current_top;
+  struct timespec fallback;
+
+  sigemptyset (&emptyset);
+  count = 0;
 
   while (count++ < 50)
     {
-      int current_left = 0, current_top = 0;
+      current_left = 0;
+      current_top = 0;
 
       /* In theory, this call to XSync only needs to happen once, but in
          practice, it doesn't seem to work, hence the need for the surrounding
@@ -22911,7 +22954,14 @@ x_sync_with_move (struct frame *f, int left, int top, 
bool fuzzy)
   /* As a last resort, just wait 0.5 seconds and hope that XGetGeometry
      will then return up-to-date position info. */
 
-  wait_reading_process_output (0, 500000000, 0, false, Qnil, NULL, 0);
+  fallback = dtotimespec (0.5);
+
+  /* This will hang if input is blocked, so use pselect to wait
+     instead.  */
+  if (input_blocked_p ())
+    pselect (0, NULL, NULL, NULL, &fallback, &emptyset);
+  else
+    wait_reading_process_output (0, 500000000, 0, false, Qnil, NULL, 0);
 }
 
 
diff --git a/test/lisp/files-tests.el b/test/lisp/files-tests.el
index 978f96912f..c7ce03cc9b 100644
--- a/test/lisp/files-tests.el
+++ b/test/lisp/files-tests.el
@@ -393,6 +393,8 @@ After evaluating BODY, the temporary file or directory is 
deleted."
   (cl-check-type name symbol)
   (cl-check-type non-special-name symbol)
   `(let* ((temporary-file-directory (file-truename temporary-file-directory))
+          (temporary-file-directory
+           (file-name-as-directory (make-temp-file "files-tests" t)))
           (,name (make-temp-file "files-tests" ,dir-flag))
           (,non-special-name (file-name-quote ,name)))
      (unwind-protect
@@ -402,7 +404,9 @@ After evaluating BODY, the temporary file or directory is 
deleted."
            (delete-file ,name)))
        (when (file-exists-p ,non-special-name)
          (if ,dir-flag (delete-directory ,non-special-name t)
-           (delete-file ,non-special-name))))))
+           (delete-file ,non-special-name)))
+       (when (file-exists-p temporary-file-directory)
+         (delete-directory temporary-file-directory t)))))
 
 (defconst files-tests--special-file-name-extension ".special"
   "Trailing string for test file name handler.")
@@ -444,14 +448,16 @@ unquoted file names."
   (cl-check-type name symbol)
   (cl-check-type non-special-name symbol)
   `(let* ((temporary-file-directory (file-truename temporary-file-directory))
+          (temporary-file-directory
+           (file-name-as-directory (make-temp-file "files-tests" t)))
           (file-name-handler-alist
            `((,files-tests--special-file-name-regexp
               . files-tests--special-file-name-handler)
              . ,file-name-handler-alist))
-           (,name (concat
+          (,name (concat
                   (make-temp-file "files-tests" ,dir-flag)
                   files-tests--special-file-name-extension))
-           (,non-special-name (file-name-quote ,name)))
+          (,non-special-name (file-name-quote ,name)))
      (unwind-protect
          (progn ,@body)
        (when (file-exists-p ,name)
@@ -459,7 +465,9 @@ unquoted file names."
            (delete-file ,name)))
        (when (file-exists-p ,non-special-name)
          (if ,dir-flag (delete-directory ,non-special-name t)
-           (delete-file ,non-special-name))))))
+           (delete-file ,non-special-name)))
+       (when (file-exists-p temporary-file-directory)
+         (delete-directory temporary-file-directory t)))))
 
 (defun files-tests--new-name (name part)
   (let (file-name-handler-alist)



reply via email to

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