commit 97d9f7df2473a6a4b80975c86d82ac11477e8137
Author: Michael Heerdegen <michael_heerdegen@web.de>
Date:   Sat Jun 13 03:00:10 2026 +0200

    ; Fix defcustom of byte-compile-warnings
    
    * lisp/emacs-lisp/bytecomp.el (byte-compile-warnings):
    Fix :type.  (Bug#81226)

diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index b1875dc2bcf..e3d8862727b 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -358,7 +358,11 @@ A value of `all' really means all."
                  (const :tag "All" all)
 		 (set :menu-tag "Some"
                       ,@(mapcar (lambda (x) `(const ,x))
-                                byte-compile-warning-types))))
+                                byte-compile-warning-types))
+                 (cons :tag "All Except"
+                       (const :tag "Not" not)
+                       (set ,@(mapcar (lambda (x) `(const ,x))
+                                      byte-compile-warning-types)))))
 
 (defconst byte-compile--emacs-build-warning-types
   '(docstrings-non-ascii-quotes)

commit b8b52458c0067859ee324cbfc4dfa3780cfaf03d
Author: Sean Whitton <spwhitton@spwhitton.name>
Date:   Tue Jun 23 15:17:49 2026 +0100

    ; markdown-ts--table-delimiter-cell-subtypes: Fix long line.

diff --git a/lisp/textmodes/markdown-ts-mode.el b/lisp/textmodes/markdown-ts-mode.el
index c44bc9161a3..5b9e7eb1ed6 100644
--- a/lisp/textmodes/markdown-ts-mode.el
+++ b/lisp/textmodes/markdown-ts-mode.el
@@ -3354,10 +3354,10 @@ With the prefix argument ARG, remain within the current code block."
 
 (defun markdown-ts--table-abutting-pos (pos)
   "Adjust POS to abut its closest text.
-If POS is already in a table, return POS.
-If not, adjust POS to the nearest non-blank character, looking first
-forward and then backward adjusting, if it is in a table, return the adjusted POS.
-Otherwise, return nil, for example, if the line is empty."
+If POS is already in a table, return POS.  If not, adjust POS to the
+nearest non-blank character, looking first forward and then backward
+adjusting, if it is in a table, return the adjusted POS.  Otherwise
+return nil, for example, if the line is empty."
   (save-excursion
     (goto-char pos)
     (if (markdown-ts--table-node-row nil pos)

commit e84f48e5e405140fde91a57cbd9dbe2ccdd169e8
Author: Stéphane Marks <shipmints@gmail.com>
Date:   Sun Jun 7 10:19:28 2026 -0400

    markdown-ts-mode: Fix abutting table detection (bug#81199)
    
    Correct for navigating between empty table cells which should be
    respected rather than treated as blanks to skip.
    
    * lisp/textmodes/markdown-ts-mode.el (markdown-ts--table-abutting-pos):
    Fix to directly detect being in a table rather than inferring it.

diff --git a/lisp/textmodes/markdown-ts-mode.el b/lisp/textmodes/markdown-ts-mode.el
index 0056d14f889..c44bc9161a3 100644
--- a/lisp/textmodes/markdown-ts-mode.el
+++ b/lisp/textmodes/markdown-ts-mode.el
@@ -3354,18 +3354,22 @@ With the prefix argument ARG, remain within the current code block."
 
 (defun markdown-ts--table-abutting-pos (pos)
   "Adjust POS to abut its closest text.
-Return pos adjusted to the position of the nearest non-blank character.
+If POS is already in a table, return POS.
+If not, adjust POS to the nearest non-blank character, looking first
+forward and then backward adjusting, if it is in a table, return the adjusted POS.
 Otherwise, return nil, for example, if the line is empty."
   (save-excursion
     (goto-char pos)
-    (skip-chars-forward "[[:blank:]]" (pos-eol))
-    (if (eq pos (pos-eol))
-        (progn
-          (goto-char pos)
-          (skip-chars-backward "[[:blank:]]" (pos-bol))
-          (unless (eq pos (pos-bol))
-            (max (point-min) (1- (point)))))
-      (min (point-max) (1+ (point))))))
+    (if (markdown-ts--table-node-row nil pos)
+        pos
+      (skip-chars-forward "[[:blank:]]" (pos-eol))
+      (if (markdown-ts--table-node-row)
+          (point)
+        (goto-char pos)
+        (skip-chars-backward "[[:blank:]]" (pos-bol))
+        (unless (eq (point) (pos-bol))
+          (if (markdown-ts--table-node-row nil (1- (point)))
+              (1- (point))))))))
 
 (defun markdown-ts--table-node-cell (&optional node pos abutting)
   "Compute table cell from named NODE at POS.

commit 4b61c48986dd2a4c703addb5c46d05179f4ae4e8
Author: Joshua Murphy <joshuamurphy@posteo.net>
Date:   Mon Jun 22 14:20:11 2026 -0400

    with-output-to-temp-buffer: Call delete-all-overlays.
    
    * lisp/subr.el (with-output-to-temp-buffer): Call
    delete-all-overlays (bug#81284).
    
    Copyright-paperwork-exempt: yes

diff --git a/lisp/subr.el b/lisp/subr.el
index 2f8870506bf..03fcd1927c2 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -5415,7 +5415,7 @@ See the related form `with-temp-buffer-window'."
              (with-current-buffer (get-buffer-create ,bufname)
                (prog1 (current-buffer)
                  (kill-all-local-variables)
-                 ;; FIXME: delete_all_overlays
+                 (delete-all-overlays)
                  (setq default-directory ,old-dir)
                  (setq buffer-read-only nil)
                  (setq buffer-file-name nil)

commit 3ca168b80ae6d7b25fe55784dde3ad24faff7be2
Merge: eba26e9489f eb814fbb5cf
Author: Sean Whitton <spwhitton@spwhitton.name>
Date:   Tue Jun 23 11:54:46 2026 +0100

    Merge from origin/emacs-31
    
    eb814fbb5cf vc-hg-state-slow: Run from the repository root
    3660bd3eb4f vc-dir-delete-file: Call vc-delete-file on FILESET-ONLY-F...
    a3a72ae355b Fix 'truncate-string-pixelwise' to restore the window buffer
    b6849229003 Restore progress-reporter suffix as update-text (bug#81134)
    e182c704c7f Rename recently added after-delete-frame-select-mru-frame
    e47bd3070aa Eglot: decode unhexed file URI paths as UTF-8 (bug#79897)
    e9403262500 ; * etc/NEWS: Mention limitation of diff-apply-buffer.
    25084664ba0 Sync with Tramp 2.8.2
    7be92efa5e1 Rename variable to macroexp-enable-preserve-posification
    2066a0c9e86 New variable 'macroexp-enable-pos-preservation' (bug#79599)
    00c290be853 Avoid infinite loop in some Dired marking commands
    
    # Conflicts:
    #       etc/NEWS

commit eb814fbb5cf27498d07c19852320ab24a427b242
Author: Sean Whitton <spwhitton@spwhitton.name>
Date:   Tue Jun 23 11:28:19 2026 +0100

    vc-hg-state-slow: Run from the repository root
    
    * lisp/vc/vc-hg.el (vc-hg-state-slow): Run command from the
    repository root.  This fixes cases where a whole subdirectory no
    longer exists.  We should return 'missing' for any files within
    it.

diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el
index a45279a574c..c0d92533241 100644
--- a/lisp/vc/vc-hg.el
+++ b/lisp/vc/vc-hg.el
@@ -236,7 +236,9 @@ A value of `default' means to use the value of `vc-resolve-conflicts'."
   (setq file (expand-file-name file))
   (let*
       ((status nil)
-       (default-directory (file-name-directory file))
+       (root (vc-hg-root file))
+       (file (file-relative-name file root))
+       (default-directory root)
        (out
         (with-output-to-string
           (with-current-buffer

commit 3660bd3eb4f1e0d3865c35f4b4f0b9b57f9c8f16
Author: Sean Whitton <spwhitton@spwhitton.name>
Date:   Tue Jun 23 11:08:16 2026 +0100

    vc-dir-delete-file: Call vc-delete-file on FILESET-ONLY-FILES
    
    * lisp/vc/vc-dir.el (vc-dir-delete-file): Call vc-delete-file on
    FILESET-ONLY-FILES.  See bug#80998.

diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el
index 5d5aafac389..5408a89799e 100644
--- a/lisp/vc/vc-dir.el
+++ b/lisp/vc/vc-dir.el
@@ -1100,7 +1100,10 @@ tracked by a VCS."
 The files will also be marked as deleted in the version control
 system."
   (interactive)
-  (vc-delete-file (or (vc-dir-marked-files) (vc-dir-current-file))))
+  (if-let* ((fileset-only-files
+             (nth 2 (vc-dir-deduce-fileset 'state-model-only-files))))
+      (vc-delete-file fileset-only-files)
+    (user-error "Nothing to delete here")))
 
 (defun vc-dir-find-file ()
   "Find the file on the current line."

commit a3a72ae355b0459a88328ed6a86c00c4519d99ac
Author: Stéphane Marks <shipmints@gmail.com>
Date:   Thu Jun 18 18:30:40 2026 -0400

    Fix 'truncate-string-pixelwise' to restore the window buffer
    
    * lisp/emacs-lisp/subr-x.el (truncate-string-pixelwise): Safely
    save/restore the selected window's buffer, and not the reference
    or current buffers.  Guard dedicated windows.  Remove the work
    buffer from the window's buffer list.  Bind
    'buffer-list-update-hook' 'window-scroll-functions'
    'window-configuration-change-hook' to nil around the window
    buffer swap.  (Bug#81262; see also bug#80244.)

diff --git a/lisp/emacs-lisp/subr-x.el b/lisp/emacs-lisp/subr-x.el
index d5a39b77c2e..ebc330fea80 100644
--- a/lisp/emacs-lisp/subr-x.el
+++ b/lisp/emacs-lisp/subr-x.el
@@ -426,42 +426,51 @@ this function using the same ELLIPSIS."
       string
     ;; Keeping a work buffer around is more efficient than creating a
     ;; new temporary buffer.
-    (let ((original-buffer (or buffer (current-buffer))))
+    (let* ((window (selected-window))
+           (original-buffer (window-buffer window))
+           (window-dedication (window-dedicated-p window))
+           (buffer-list-update-hook)
+           (window-scroll-functions)
+           (window-configuration-change-hook))
       (with-work-buffer
-       (work-buffer--prepare-pixelwise string buffer)
-       (set-window-buffer nil (current-buffer) 'keep-margins)
-       ;; Use a binary search to prune the number of calls to
-       ;; `window-text-pixel-size'.
-       ;; These are 1-based buffer indexes.
-       (let* ((low 1)
-              (high (1+ (length string)))
-              mid)
-         (when (> (car (window-text-pixel-size nil 1 high)) max-pixels)
-           (when (and ellipsis (not (stringp ellipsis)))
-             (setq ellipsis (truncate-string-ellipsis)))
-           (setq ellipsis-pixels (if ellipsis
-                                     (if ellipsis-pixels
-                                         ellipsis-pixels
-                                       (string-pixel-width ellipsis buffer))
-                                   0))
-           (let ((adjusted-pixels
-                  (if (> max-pixels ellipsis-pixels)
-                      (- max-pixels ellipsis-pixels)
-                    max-pixels)))
-             (while (<= low high)
-               (setq mid (floor (+ low high) 2))
-               (if (<= (car (window-text-pixel-size nil 1 mid))
-                       adjusted-pixels)
-                   (setq low (1+ mid))
-                 (setq high (1- mid))))))
-         (set-window-buffer nil original-buffer 'keep-margins)
-         (if mid
-             ;; Binary search ran.
-             (if (and ellipsis (> max-pixels ellipsis-pixels))
-                 (concat (substring string 0 (1- high)) ellipsis)
-               (substring string 0 (1- high)))
-           ;; Fast path.
-           string))))))
+        ;; Use a binary search to prune the number of calls to
+        ;; `window-text-pixel-size'.
+        ;; These are 1-based buffer indexes.
+        (unwind-protect
+            (let* ((low 1)
+                   (high (1+ (length string)))
+                   mid)
+              (work-buffer--prepare-pixelwise string buffer)
+              (set-window-dedicated-p window nil)
+              (set-window-buffer window (current-buffer) 'keep-margins)
+              (when (> (car (window-text-pixel-size nil 1 high)) max-pixels)
+                (when (and ellipsis (not (stringp ellipsis)))
+                  (setq ellipsis (truncate-string-ellipsis)))
+                (setq ellipsis-pixels (if ellipsis
+                                          (if ellipsis-pixels
+                                              ellipsis-pixels
+                                            (string-pixel-width ellipsis buffer))
+                                        0))
+                (let ((adjusted-pixels
+                       (if (> max-pixels ellipsis-pixels)
+                           (- max-pixels ellipsis-pixels)
+                         max-pixels)))
+                  (while (<= low high)
+                    (setq mid (floor (+ low high) 2))
+                    (if (<= (car (window-text-pixel-size nil 1 mid))
+                            adjusted-pixels)
+                        (setq low (1+ mid))
+                      (setq high (1- mid))))))
+              (if mid
+                  ;; Binary search ran.
+                  (if (and ellipsis (> max-pixels ellipsis-pixels))
+                      (concat (substring string 0 (1- high)) ellipsis)
+                    (substring string 0 (1- high)))
+                ;; Fast path.
+                string))
+          (set-window-buffer window original-buffer 'keep-margins)
+          (set-window-dedicated-p window window-dedication)
+          (unrecord-window-buffer window (current-buffer) t))))))
 
 ;;;###autoload
 (defun string-glyph-split (string)

commit b6849229003f214570acedfa7e2755051c0e4305
Author: Stéphane Marks <shipmints@gmail.com>
Date:   Sat Jun 6 06:55:58 2026 -0400

    Restore progress-reporter suffix as update-text (bug#81134)
    
    * lisp/subr.el (progress-reporter-update-functions): Update
    docstring.
    (progress-reporter-update): New UPDATE-TEXT argument replacing
    previously deleted SUFFIX.
    (make-progress-reporter): Document suffix slot available for
    reuse.
    (progress-reporter-force-update): Update function signature.
    (progress-reporter-echo-area): Restore the text argument and
    echo it.
    (progress-reporter-do-update): Update function signature.  Treat
    UPDATE-TEXT as ephemeral and do not persist it in the reporter
    instance.  Update the hook.
    (progress-reporter-done): Update the hook.
    * lisp/system-taskbar.el
    (system-taskbar--progress-reporter-update): Update function
    signature.
    * lisp/net/tramp.el (tramp-progress-reporter-update): Update
    function signature.
    * doc/lispref/display.texi (Progress): Update documentation.

diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 49b09f6583d..e1b46d51489 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -531,7 +531,7 @@ This function calls @code{progress-reporter-update}, so the first
 message is printed immediately.
 @end defun
 
-@defun progress-reporter-update reporter &optional value suffix
+@defun progress-reporter-update reporter &optional value update-text
 This function does the main work of reporting progress of your
 operation.  It displays the message of @var{reporter}, followed by
 progress percentage determined by @var{value}.  If percentage is zero,
@@ -545,10 +545,11 @@ state of your operation and must be between @var{min-value} and
 @code{make-progress-reporter}.  For instance, if you scan a buffer,
 then @var{value} should be the result of a call to @code{point}.
 
-Optional argument @var{suffix} is a string to be displayed after
-@var{reporter}'s main message and progress text.  If @var{reporter} is
-a non-numerical reporter, then @var{value} should be @code{nil}, or a
-string to use instead of @var{suffix}.
+Optional argument @var{update-text} is a string to be displayed after
+@var{reporter}'s main message and progress text.  One typical use is as
+the ``step'' of a long-running process so the user knows where it is.
+If @var{reporter} is a non-numerical reporter, then @var{value} should
+be @code{nil}, or a string to use instead of @var{update-text}.
 
 This function respects @var{min-change} and @var{min-time} as passed
 to @code{make-progress-reporter} and so does not output new messages
@@ -557,11 +558,11 @@ try to reduce the number of calls to it: resulting overhead will most
 likely negate your effort.
 @end defun
 
-@defun progress-reporter-force-update reporter &optional value new-message suffix
+@defun progress-reporter-force-update reporter &optional value new-message update-text
 This function is similar to @code{progress-reporter-update} except
 that it prints a message in the echo area unconditionally.
 
-@var{reporter}, @var{value}, and @var{suffix} have the same meaning as for
+@var{reporter}, @var{value}, and @var{update-text} have the same meaning as for
 @code{progress-reporter-update}.  Optional @var{new-message} allows
 you to change the message of the @var{reporter}.  Since this function
 always updates the echo area, such a change will be immediately
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 1a10b8042a5..c5ecbdd9675 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -2215,12 +2215,12 @@ If VAR is nil, then we bind `v' to the structure and `method', `user',
        (ignore ,@(mapcar #'car bindings))
        ,@body)))
 
-(defun tramp-progress-reporter-update (reporter &optional value suffix)
+(defun tramp-progress-reporter-update (reporter &optional value update-text)
   "Report progress of an operation for Tramp."
   (let* ((parameters (cdr reporter))
 	 (message (aref parameters 3)))
     (when (string-search message (or (current-message) ""))
-      (progress-reporter-update reporter value suffix))))
+      (progress-reporter-update reporter value update-text))))
 
 ;;;###tramp-autoload
 (defvar tramp-inhibit-progress-reporter nil
diff --git a/lisp/subr.el b/lisp/subr.el
index 16234d313a7..58f388c146d 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -7097,7 +7097,8 @@ to deactivate this transient map, regardless of KEEP-PRED."
 ;;			      MESSAGE
 ;;			      MIN-CHANGE
 ;;                            MIN-TIME
-;;                            MESSAGE-SUFFIX])
+;;                            UNUSED (formerly SUFFIX)
+;;                            CONTEXT])
 ;;
 ;; This weirdness is for optimization reasons: we want
 ;; `progress-reporter-update' to be as fast as possible, so
@@ -7109,15 +7110,18 @@ to deactivate this transient map, regardless of KEEP-PRED."
 
 (defvar progress-reporter-update-functions (list #'progress-reporter-echo-area)
   "Special hook run on progress-reporter updates.
-Each function is called with two arguments:
+Each function is called with three arguments:
 REPORTER is the result of a call to `make-progress-reporter'.
 STATE can be one of:
 - A float representing the percentage complete in the range 0.0-1.0
 for a numeric reporter.
 - A monotonically increasing integer for a pulsing reporter.
-- The symbol `done' to indicate that the progress reporter is complete.")
+- The symbol `done' to indicate that the progress reporter is complete.
+UPDATE-TEXT is a string that a progress-reporter back-end might display
+as a result of this update.  A typical use is as the \"step\" of the
+progress reporting process.")
 
-(defsubst progress-reporter-update (reporter &optional value suffix)
+(defsubst progress-reporter-update (reporter &optional value update-text)
   "Report progress of an operation, by default, in the echo area.
 REPORTER should be the result of a call to `make-progress-reporter'.
 
@@ -7126,10 +7130,11 @@ made using non-nil MIN-VALUE and MAX-VALUE arguments to
 `make-progress-reporter'---then VALUE should be a number between
 MIN-VALUE and MAX-VALUE.
 
-Optional argument SUFFIX is a string to be displayed after REPORTER's
-main message and progress text.  If REPORTER is a non-numerical
-reporter, then VALUE should be nil, or a string to use instead of
-SUFFIX.
+Optional argument UPDATE-TEXT is a string that a progress-reporter
+back-end might display as a result of this update.  A typical use is as
+the \"step\" of the progress reporting process.  If REPORTER is a
+non-numerical reporter, then VALUE should be nil, or a string to use
+instead of UPDATE-TEXT.
 
 See `progress-reporter-update-functions' for the list of functions
 called on each update.
@@ -7139,7 +7144,7 @@ last update is too small or insufficient time has passed, it does
 nothing."
   (when (or (not (numberp value))      ; For pulsing reporter
 	    (>= value (car reporter))) ; For numerical reporter
-    (progress-reporter-do-update reporter value suffix)))
+    (progress-reporter-do-update reporter value update-text)))
 
 (defun make-progress-reporter (message &optional min-value max-value
 				       current-value min-change min-time
@@ -7189,7 +7194,7 @@ the echo area progress reports may be muted if the echo area is busy."
 		       message
 		       (if min-change (max (min min-change 50) 1) 1)
                        min-time
-                       ;; SUFFIX
+                       ;; Unused (formerly SUFFIX).
                        nil
                        ;;
                        context))))
@@ -7207,24 +7212,26 @@ the echo area progress reports may be muted if the echo area is busy."
   "Return REPORTER's context."
   (aref (cdr reporter) 7))
 
-(defun progress-reporter-force-update (reporter &optional value new-message suffix)
+(defun progress-reporter-force-update (reporter &optional
+                                                value new-message update-text)
   "Report progress of an operation in the echo area unconditionally.
 
-REPORTER, VALUE, and SUFFIX are the same as in `progress-reporter-update'.
+REPORTER, VALUE, and UPDATE-TEXT are the same as in
+`progress-reporter-update'.
 NEW-MESSAGE, if non-nil, sets a new message for the reporter."
   (let ((parameters (cdr reporter)))
     (when new-message
       (aset parameters 3 new-message))
     (when (aref parameters 0)
       (aset parameters 0 (float-time)))
-    (progress-reporter-do-update reporter value suffix)))
+    (progress-reporter-do-update reporter value update-text)))
 
 (defvar progress-reporter--pulse-characters ["-" "\\" "|" "/"]
   "Characters to use for pulsing progress reporters.")
 
-(defun progress-reporter-echo-area (reporter state)
+(defun progress-reporter-echo-area (reporter state update-text)
   "Progress reporter echo area update function.
-REPORTER and STATE are the same as in
+REPORTER, STATE, and UPDATE-TEXT are the same as in
 `progress-reporter-update-functions'.
 
 Do not emit a message if the reporter context is `async' and the echo
@@ -7233,21 +7240,22 @@ area is busy with something else."
     (unless (and (eq (progress-reporter-context reporter) 'async)
                  (current-message)
                  (not (string-prefix-p text (current-message))))
+      (setq update-text (concat (if update-text " " "") update-text))
       (pcase state
         ((pred floatp)
          (if (plusp state)
-             (message "%s%d%%" text (* state 100.0))
-           (message "%s" text)))
+             (message "%s%d%%%s" text (* state 100.0) update-text)
+           (message "%s%s" text update-text)))
         ((pred integerp)
          (let ((message-log-max nil)
                (pulse-char
                 (aref progress-reporter--pulse-characters
                       (mod state (length progress-reporter--pulse-characters)))))
-           (message "%s %s" text pulse-char)))
+           (message "%s %s%s" text pulse-char update-text)))
         ('done
          (message "%sdone" text))))))
 
-(defun progress-reporter-do-update (reporter value &optional suffix)
+(defun progress-reporter-do-update (reporter value &optional update-text)
   (let* ((parameters      (cdr reporter))
 	 (update-time     (aref parameters 0))
 	 (min-value       (aref parameters 1))
@@ -7281,31 +7289,26 @@ area is busy with something else."
 	       (setcar reporter (ceiling (car reporter))))
 	     ;; Print message only if enough time has passed
 	     (when enough-time-passed
-               (if suffix
-                   (aset parameters 6 suffix)
-                 (setq suffix (or (aref parameters 6) "")))
                (run-hook-with-args 'progress-reporter-update-functions
                                    reporter
-                                   (/ percentage 100.0)))))
+                                   (/ percentage 100.0)
+                                   update-text))))
 	  ;; Pulsing indicator
 	  (enough-time-passed
-           (when (and value (not suffix))
-             (setq suffix value))
-           (if suffix
-               (aset parameters 6 suffix)
-             (setq suffix (or (aref parameters 6) "")))
            (let ((index (1+ (car reporter))))
 	     (setcar reporter index)
              (run-hook-with-args 'progress-reporter-update-functions
                                  reporter
-                                 index))))))
+                                 index
+                                 (or update-text value)))))))
 
 (defun progress-reporter-done (reporter)
   "Print reporter's message followed by word \"done\" in echo area.
 Call the functions on `progress-reporter-update-functions`."
   (run-hook-with-args 'progress-reporter-update-functions
                       reporter
-                      'done))
+                      'done
+                      nil))
 
 (defmacro dotimes-with-progress-reporter (spec reporter-or-message &rest body)
   "Loop a certain number of times and report progress in the echo area.
diff --git a/lisp/system-taskbar.el b/lisp/system-taskbar.el
index 973b426e026..d1fe276844d 100644
--- a/lisp/system-taskbar.el
+++ b/lisp/system-taskbar.el
@@ -273,9 +273,9 @@ If PROGRESS is nil, remove the progress indicator.")
 
 ;; `progress-reporter' support.
 
-(defun system-taskbar--progress-reporter-update (_reporter state)
+(defun system-taskbar--progress-reporter-update (_reporter state _update-text)
   "Progress reporter system taskbar update function.
-REPORTER and STATE are the same as in
+REPORTER, STATE, and UPDATE-TEXT are the same as in
 `progress-reporter-update-functions'."
   (when system-taskbar-mode
     (pcase state

commit eba26e9489faf8b0716401a27e3b8d60bfa4120a
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Date:   Mon Jun 22 12:46:28 2026 -0400

    buffer.c: Don't involve the redisplay if the overlay has no proprties
    
    * src/buffer.c (drop_overlay, Fmove_overlay): Test overlay's
    plist before calling `modify_overlay`.

diff --git a/src/buffer.c b/src/buffer.c
index bafe86263ae..812c82f43bd 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -980,7 +980,8 @@ drop_overlay (struct Lisp_Overlay *ov)
   if (! ov->buffer)
     return;
 
-  modify_overlay (ov->buffer, overlay_start (ov), overlay_end (ov));
+  if (!NILP (ov->plist))
+    modify_overlay (ov->buffer, overlay_start (ov), overlay_end (ov));
   remove_buffer_overlay (ov->buffer, ov);
 }
 
@@ -3763,7 +3764,9 @@ buffer.  */)
                               n_beg, n_end);
 
   /* If the overlay has changed buffers, do a thorough redisplay.  */
-  if (!BASE_EQ (buffer, obuffer))
+  if (NILP (OVERLAY_PLIST (overlay)))
+    ; /* No props so the overlay doesn't affect the display.  */
+  else if (!BASE_EQ (buffer, obuffer))
     {
       /* Redisplay where the overlay was.  */
       if (ob)

commit dcdd76f89e77421bf8be4ae0c2324b3029a23f1a
Author: Michael Albinus <michael.albinus@gmx.de>
Date:   Mon Jun 22 18:30:53 2026 +0200

    Use default exec-suffixes when needed (bug#81280)
    
    * lisp/files.el (executable-find): Use (default-value 'exec-suffixes).
    
    * src/callproc.c (Qexec_suffixes): Declare.
    (call_process):
    * src/process.c (Fmake_process): Use Fdefault_value (Qexec_suffixes).
    
    * test/lisp/files-x-tests.el (files-x-test--variables6):
    New defconst.
    (files-x-test-connection-local-special-variables): New test.

diff --git a/lisp/files.el b/lisp/files.el
index 5aaa0d44a04..97144fef78f 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -1331,7 +1331,7 @@ remote, otherwise search locally."
     ;; Use 1 rather than file-executable-p to better match the
     ;; behavior of call-process.
     (let ((default-directory (file-name-quote default-directory 'top)))
-      (locate-file command exec-path exec-suffixes 1))))
+      (locate-file command exec-path (default-value 'exec-suffixes) 1))))
 
 (declare-function read-library-name "find-func" nil)
 
diff --git a/src/callproc.c b/src/callproc.c
index 52977b29f30..7eb245f915c 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -520,7 +520,7 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd,
   {
     int ok;
 
-    ok = openp (Vexec_path, args[0], Vexec_suffixes, &path,
+    ok = openp (Vexec_path, args[0], Fdefault_value (Qexec_suffixes), &path,
 		make_fixnum (X_OK), false, false, NULL);
     if (ok < 0)
       report_file_error ("Searching for program", args[0]);
@@ -2258,4 +2258,5 @@ multiple times on subsequent partitions of the list of arguments.
   DEFSYM (Qafter_insert_file_set_buffer_file_coding_system,
 	  "after-insert-file-set-buffer-file-coding-system");
   DEFSYM (Qcoding_system_for_write, "coding-system-for-write");
+  DEFSYM (Qexec_suffixes, "exec-suffixes");
 }
diff --git a/src/process.c b/src/process.c
index 1ad9cb5fc04..67b39f6586c 100644
--- a/src/process.c
+++ b/src/process.c
@@ -2073,7 +2073,7 @@ usage: (make-process &rest ARGS)  */)
 	       && IS_DEVICE_SEP (SREF (program, 1))))
 	{
 	  tem = Qnil;
-	  openp (Vexec_path, program, Vexec_suffixes, &tem,
+	  openp (Vexec_path, program, Fdefault_value (Qexec_suffixes), &tem,
 		 make_fixnum (X_OK), false, false, NULL);
 	  if (NILP (tem))
 	    report_file_error ("Searching for program", program);
diff --git a/test/lisp/files-x-tests.el b/test/lisp/files-x-tests.el
index 88e02ba143c..31633df073e 100644
--- a/test/lisp/files-x-tests.el
+++ b/test/lisp/files-x-tests.el
@@ -39,6 +39,9 @@
 (defconst files-x-test--variables5
   '((remote-lazy-var . nil)
     (remote-null-device . "/dev/null")))
+(defconst files-x-test--variables6
+  '((exec-suffixes . ("foo"))
+    (path-separator . "foo")))
 (defvar remote-shell-file-name)
 (defvar remote-null-device)
 (defvar remote-lazy-var nil)
@@ -601,5 +604,39 @@ If it's not initialized yet, initialize it."
      `(connection-local-profile-alist ',clpa now)
      `(connection-local-criteria-alist ',clca now))))
 
+(ert-deftest files-x-test-connection-local-special-variables ()
+  "Test special local variables.
+The connection-local variables `exec-suffixes' and `path-separator' are
+used for remote processes.  When calling `call-process', `make-process'
+or `executable-find', their default value must be used nonetheless."
+
+  (let ((clpa connection-local-profile-alist)
+	(clca connection-local-criteria-alist)
+        (program (file-name-sans-extension
+                  (file-name-concat invocation-directory invocation-name)))
+        proc)
+    (connection-local-set-profile-variables
+     'special-variables files-x-test--variables6)
+    (connection-local-set-profiles
+     nil 'special-variables)
+
+    (unwind-protect
+        (with-temp-buffer
+          (let ((enable-connection-local-variables t))
+            (hack-connection-local-variables-apply nil)
+            (should (zerop (call-process program nil nil nil "--help")))
+            (should
+             (processp
+              (setq proc
+                    (make-process
+                     :name invocation-name :command `(,program "--help")))))
+            (should (executable-find program))))
+
+      ;; Cleanup.
+      (when (processp proc) (kill-process proc))
+      (custom-set-variables
+       `(connection-local-profile-alist ',clpa now)
+       `(connection-local-criteria-alist ',clca now)))))
+
 (provide 'files-x-tests)
 ;;; files-x-tests.el ends here

commit 51c21cb729f704084dfb86b27b3e586377bf49f6
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Date:   Mon Jun 22 12:18:34 2026 -0400

    keyboard.c (Finsert_special_event): Remove redundant test
    
    * src/keyboard.c (Finsert_special_event): Remove redundant test.
    (kbd_buffer_get_event): Simplify.

diff --git a/src/keyboard.c b/src/keyboard.c
index 4becc5cfd7a..3d18d20b56e 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -2909,8 +2909,12 @@ read_char (int commandflag, Lisp_Object map,
      because the recursive call of read_char in read_char_minibuf_menu_prompt
      does not pass on any keymaps.  */
 
+  /* FIXME: If the keymap is *not* a menu, this fails miserably,
+     signaling (error "Empty menu") instead!  */
   if (KEYMAPP (map) && INTERACTIVE
       && !NILP (prev_event)
+      /* FIXME: These conditions are re-tested redundantly inside
+         read_char_x_menu_prompt!  */
       && EVENT_HAS_PARAMETERS (prev_event)
       && !EQ (XCAR (prev_event), Qmenu_bar)
       && !EQ (XCAR (prev_event), Qtab_bar)
@@ -2919,6 +2923,9 @@ read_char (int commandflag, Lisp_Object map,
       && !CONSP (Vunread_command_events))
     {
       c = read_char_x_menu_prompt (map, prev_event, used_mouse_menu);
+      /* FIXME: read_char_x_menu_prompt can sometimes do nothing and just
+         return nil, should we really stop the idle timer and jump to `exit`
+         in that case?  */
 
       /* Now that we have read an event, Emacs is not idle.  */
       if (!end_time)
@@ -4029,14 +4036,10 @@ kbd_buffer_get_event (KBOARD **kbp,
 {
   Lisp_Object obj, str;
 #ifdef HAVE_X_WINDOWS
-  bool had_pending_selection_requests;
-
-  had_pending_selection_requests = false;
+  bool had_pending_selection_requests = false;
 #endif
 #ifdef HAVE_TEXT_CONVERSION
-  bool had_pending_conversion_events;
-
-  had_pending_conversion_events = false;
+  bool had_pending_conversion_events = false;
 #endif
 
   *event_frame = NULL;
@@ -12098,14 +12101,6 @@ Only 'input_event' slots KIND and ARG are set.  */)
 {
   /* Check, that it is a special event.  */
   CHECK_CONS (event);
-  if (NILP (access_keymap
-	    (get_keymap (Vspecial_event_map, 0, 1), event, 0, 0, 1)))
-    /* FIXME: Remove this check.  Since 'special-event-map' may change
-       between now and the moment we process the event, this check is
-       unreliable, and it's redundant anyway since we check below
-       if EVENT is one of the supported ones.  */
-    signal_error ("Invalid special event kind", XCAR (event));
-
   /* Construct an input event.  */
   struct input_event ie;
   EVENT_INIT (ie);

commit c7b156dce38a51aff3096fb34a8fbfccfb6c077c
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Date:   Fri Jun 19 16:06:16 2026 -0400

    gv.el: Allow use of `ignore` as a place (bug#81217)
    
    * lisp/emacs-lisp/gv.el (error): Delete redundant `gv-expander` definition.
    (ignore): Add a setter.
    * doc/lispref/functions.texi (Calling Functions): Document `ignore`
    as a place.
    * lisp/xdg.el (xdg-mime-collect-associations): Silence compiler warning.

diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi
index 53597236da8..876cb702e3b 100644
--- a/doc/lispref/functions.texi
+++ b/doc/lispref/functions.texi
@@ -1131,6 +1131,8 @@ This function returns @var{argument} and has no side effects.
 
 @defun ignore &rest arguments
 This function ignores any @var{arguments} and returns @code{nil}.
+When used as a place (@pxref{Generalized Variables}), the assignment has
+simply no effect.
 @end defun
 
 @defun always &rest arguments
diff --git a/etc/NEWS b/etc/NEWS
index a13e556fa47..c4e02890bbb 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -171,6 +171,10 @@ To install the grammars, use 'M-x markdown-ts-mode-install-parsers'.
 
 * Lisp Changes in Emacs 32.1
 
++++
+** 'ignore' is now also a place, acting as a "blackhole" like /dev/null.
+E.g. (push (new-elem) (pcase (foo) (0 var1) (1 var2) (_ (ignore))))
+
 +++
 ** 'kill-all-local-variables' can kill locals silently and reset the buffer.
 This function's KILL-PERMANENT argument now accepts the value
diff --git a/lisp/emacs-lisp/gv.el b/lisp/emacs-lisp/gv.el
index 74bafc6a294..4633461a5dc 100644
--- a/lisp/emacs-lisp/gv.el
+++ b/lisp/emacs-lisp/gv.el
@@ -576,11 +576,6 @@ See also `incf'."
         (funcall do `(funcall (car ,gv))
                  (lambda (v) `(funcall (cdr ,gv) ,v)))))))
 
-(put 'error 'gv-expander
-     (lambda (do &rest args)
-       (funcall do `(error . ,args)
-                (lambda (v) `(progn ,v (error . ,args))))))
-
 (defun gv-synthetic-place (getter setter)
   "Special place described by its setter and getter.
 GETTER and SETTER (typically obtained via `gv-letplace') get and
@@ -683,11 +678,9 @@ REF must have been previously obtained with `gv-ref'."
 
 ;;; Generalized variables.
 
-;; You'd think no one would write `(setf (error ...) ..)' but it
-;; appears naturally as the result of macroexpansion of things like
-;; (setf (pcase-exhaustive ...)).
-;; We could generalize this to `throw' and `signal', but it seems
-;; preferable to wait until there's a concrete need.
+;; `error' and `ignore' places come in handy in the default branch
+;; of `cond/pcase' places.
+(gv-define-setter ignore (store &rest _args) store) ;; A kind of >/dev/null
 (gv-define-expander error (lambda (_do &rest args) `(error . ,args)))
 
 ;; Some Emacs-related place types.
diff --git a/lisp/xdg.el b/lisp/xdg.el
index ccdaa50477a..736afae4eb4 100644
--- a/lisp/xdg.el
+++ b/lisp/xdg.el
@@ -346,10 +346,11 @@ which is expected to be ordered by priority as in
                     (forward-line)
                   (dolist (str (xdg-desktop-strings (match-string 1)))
                     (cl-pushnew str
-                                (cond ((eq sec ?D) defaults)
-                                      ((eq sec ?A) added)
-                                      ((eq sec ?R) removed)
-                                      ((eq sec ?M) cached))
+                                (pcase-exhaustive sec
+                                  (?D defaults)
+                                  (?A added)
+                                  (?R removed)
+                                  (?M cached))
                                 :test #'equal))
                   (while (and (zerop (forward-line))
                               (/= (following-char) ?\[)))))))

commit e182c704c7f9743997026e42f9cda04d6e7f7e68
Author: Juri Linkov <juri@linkov.net>
Date:   Mon Jun 22 18:57:52 2026 +0300

    Rename recently added after-delete-frame-select-mru-frame
    
    Rename 'after-delete-frame-select-mru-frame' to
    'delete-frame-choose-selected' for symmetry with
    'delete-window-choose-selected' with the same
    default value 'mru' (bug#80397).
    
    * lisp/cus-start.el: Add a choice like in
    'delete-window-choose-selected'.
    
    * src/frame.c (delete_frame): Compare delete_frame_choose_selected
    with Qmru.
    (syms_of_frame): Define symbol Qmru.
    Use DEFVAR_LISP for 'delete-frame-choose-selected'
    and set the default value to Qmru.

diff --git a/etc/NEWS b/etc/NEWS
index 8892c43d60b..6b2abe30aaa 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -523,7 +523,7 @@ single frame can be excluded, for example, the selected frame.
 *** After deleting, 'delete-frame' now selects the most recently used frame.
 Previously, after deleting a specified frame, 'delete-frame' would
 select the oldest visible frame on the same terminal.  To revert to the
-old behavior, set the new user option 'after-delete-frame-select-mru-frame'
+old behavior, set the new user option 'delete-frame-choose-selected'
 to nil.
 
 +++
diff --git a/lisp/cus-start.el b/lisp/cus-start.el
index 0ba77b197cc..bf5b331a30f 100644
--- a/lisp/cus-start.el
+++ b/lisp/cus-start.el
@@ -378,7 +378,11 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
 				  "26.1")
 	     (tooltip-reuse-hidden-frame tooltip boolean "26.1")
              (use-system-tooltips tooltip boolean "29.1")
-             (after-delete-frame-select-mru-frame frames boolean "31.1")
+             (delete-frame-choose-selected
+              frames
+              (choice (const :tag "Most recently used" mru)
+                      (const :tag "Oldest visible " nil))
+              "31.1")
 	     ;; fringe.c
 	     (overflow-newline-into-fringe fringe boolean)
 	     ;; image.c
diff --git a/src/frame.c b/src/frame.c
index 2c0a27cf47c..e6321268e2f 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -2745,7 +2745,7 @@ delete_frame (Lisp_Object frame, Lisp_Object force)
 	{
 	  frame1 = Qnil;
 
-	  if (after_delete_frame_select_mru_frame
+	  if (EQ (delete_frame_choose_selected, Qmru)
 	      && !EQ (force, Qnoelisp))
 	    {
 	      /* Find the most recently used visible frame among all
@@ -7220,6 +7220,7 @@ syms_of_frame (void)
   DEFSYM (Qframe_monitor_attributes, "frame-monitor-attributes");
   DEFSYM (Qwindow__pixel_to_total, "window--pixel-to-total");
   DEFSYM (Qmake_initial_minibuffer_frame, "make-initial-minibuffer-frame");
+  DEFSYM (Qmru, "mru");
   DEFSYM (Qget_mru_frame, "get-mru-frame");
   DEFSYM (Qexplicit_name, "explicit-name");
   DEFSYM (Qheight, "height");
@@ -7793,12 +7794,13 @@ The default is \\+`inhibit' in NS builds and nil everywhere else.  */);
   alter_fullscreen_frames = Qnil;
 #endif
 
-  DEFVAR_BOOL ("after-delete-frame-select-mru-frame",
-	       after_delete_frame_select_mru_frame,
-	       doc: /* Non-nil means `delete-frame' selects most recently used frame.
+  DEFVAR_LISP ("delete-frame-choose-selected",
+	       delete_frame_choose_selected,
+	       doc: /* What frame to select after frame deletion.
+The value `mru' means `delete-frame' selects most recently used frame.
 If this is nil, `delete-frame' will select the oldest visible frame on
 the same terminal.  */);
-  after_delete_frame_select_mru_frame = true;
+  delete_frame_choose_selected = Qmru;
 
   defsubr (&Sframe_id);
   defsubr (&Sframep);

commit e47bd3070aa39edb5eb654529f899b494cc6307e
Author: duli <duli4868@gmail.com>
Date:   Mon Jun 22 16:20:27 2026 +0100

    Eglot: decode unhexed file URI paths as UTF-8 (bug#79897)
    
    'url-unhex-string' only decodes %XX sequences and returns a
    unibyte string; it does not interpret the resulting octets as
    UTF-8.  Its docstring says that the resulting string generally
    requires decoding with an appropriate coding system.
    
    LSP messages are UTF-8, and document URIs are transferred as URI
    strings.  When recovering the file path from the URI, decode the
    unhexed octets as UTF-8 instead of using them directly as an
    Emacs string.  This should fix bug#79897.
    
    Copyright-paperwork-exempt: yes
    
    * lisp/progmodes/eglot.el (eglot-uri-to-path): Decode the
      result of 'url-unhex-string' with 'utf-8-unix'.

diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index 457391572a0..2afb2b40094 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -1264,7 +1264,8 @@ object."
     ;; `file-name-handler-alist' should know how to handle them
     ;; (bug#58790).
     (if (string= "file" (url-type url))
-        (let* ((unhexed (url-unhex-string (url-filename url)))
+        (let* ((unhexed (decode-coding-string
+                         (url-unhex-string (url-filename url)) 'utf-8-unix))
                ;; Remove the leading "/" for local MS Windows-style paths.
                (norm (if (and (not remote-prefix)
                                     (eq system-type 'windows-nt)

commit 4797eef57a93dc670dd98cb0d47c5eb8c87c5a3a
Author: Sean Whitton <spwhitton@spwhitton.name>
Date:   Mon Jun 22 15:14:18 2026 +0100

    vc-dir--count-outgoing: Bind default-directory to correct value
    
    * lisp/vc/vc-dir.el (vc-dir--count-outgoing): Bind
    default-directory to the correct value in the idle callback, so
    that we know we count the outgoing revisions for the correct
    repo.

diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el
index a1e3ace6dfc..8bf33836d3e 100644
--- a/lisp/vc/vc-dir.el
+++ b/lisp/vc/vc-dir.el
@@ -1447,11 +1447,14 @@ uses OVERLAY."
    (run-with-idle-timer
     0.2 nil
     (lambda ()
-      (let ((display-buffer-overriding-action
-             '(display-buffer-no-window (allow-no-window . t)))
-            (unknown (propertize "<<unknown>>" 'face 'vc-dir-header-value))
-            (buf (generate-new-buffer " *temp*" t))
-            proc)
+      (let* ((default-directory
+	      (buffer-local-value 'default-directory
+				  (overlay-buffer overlay)))
+	     (display-buffer-overriding-action
+              '(display-buffer-no-window (allow-no-window . t)))
+             (unknown (propertize "<<unknown>>" 'face 'vc-dir-header-value))
+             (buf (generate-new-buffer " *temp*" t))
+             proc)
         (with-current-buffer buf
           (condition-case _
               (progn

commit e9403262500ca3d04eaed615340821014f1051d6
Author: Sean Whitton <spwhitton@spwhitton.name>
Date:   Mon Jun 22 13:40:50 2026 +0100

    ; * etc/NEWS: Mention limitation of diff-apply-buffer.

diff --git a/etc/NEWS b/etc/NEWS
index f5011312e03..8892c43d60b 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -2587,6 +2587,7 @@ one as before.  This makes them different from 'vc-diff' and
 'vc-root-diff' when those are called without a prefix argument.
 
 *** 'diff-apply-hunk' now supports creating and deleting files.
+diff-apply-buffer supports creating files but not deleting them, yet.
 
 +++
 *** Diff mode's application and killing commands now consider the region.

commit ced965f7c48384ab1872b755c27d6abb415ac191
Author: Sean Whitton <spwhitton@spwhitton.name>
Date:   Mon Jun 22 13:27:31 2026 +0100

    vc-dir--count-outgoing: Use run-with-idle-timer
    
    * lisp/vc/vc-dir.el (vc-dir--count-outgoing): Wrap calling
    vc-incoming-outgoing-internal in a run-with-idle-timer, and put
    the timer in the 'timer' overlay property.
    (vc-dir-async-header-values): Document 'timer' overlay property.
    (vc-dir--set-header): Cancel timers in the 'timer' overlay
    property.

diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el
index 151cb676838..a1e3ace6dfc 100644
--- a/lisp/vc/vc-dir.el
+++ b/lisp/vc/vc-dir.el
@@ -1439,44 +1439,52 @@ See `vc-dir-async-header-values' for an explanation of how this function
 uses OVERLAY."
   (overlay-put overlay 'after-string
                (propertize "[counting ...]" 'face 'vc-dir-header-value))
-  (let ((display-buffer-overriding-action
-         '(display-buffer-no-window (allow-no-window . t)))
-        (unknown (propertize "<<unknown>>" 'face 'vc-dir-header-value))
-        (buf (generate-new-buffer " *temp*" t))
-        proc)
-    (with-current-buffer buf
-      (condition-case _
-          (progn
-            (vc-incoming-outgoing-internal backend nil
-                                           (current-buffer)
-                                           '(log-outgoing short))
-            (overlay-put overlay 'proc (get-buffer-process (current-buffer)))
-            (setq proc (get-buffer-process (current-buffer)))
-            (vc-run-delayed
-              (unwind-protect
-                  (overlay-put
-                   overlay 'after-string
-                   (if (or (not (eq (process-status proc) 'exit))
-                           (plusp (process-exit-status proc)))
-                       unknown
-                     (goto-char (point-min))
-                     (let ((count (how-many log-view-message-re)))
-                       (if (zerop count)
-                           (propertize "No unpushed revisions"
-                                       'face 'vc-dir-header-value)
-                         (propertize
-                          (format (ngettext "%d unpushed revision"
-                                            "%d unpushed revisions"
-                                            count)
-                                  count)
-                          'face 'vc-dir-header-urgent-value
-                          'mouse-face 'highlight
-                          'keymap vc-dir-outgoing-revisions-map
-                          'help-echo "\\<vc-dir-outgoing-revisions-map>\
+  ;; `vc-incoming-outgoing-internal' invokes external processes
+  ;; synchronously before we can get to the `vc-run-delayed', so
+  ;; postpone running it a little.
+  (overlay-put
+   overlay 'timer
+   (run-with-idle-timer
+    0.2 nil
+    (lambda ()
+      (let ((display-buffer-overriding-action
+             '(display-buffer-no-window (allow-no-window . t)))
+            (unknown (propertize "<<unknown>>" 'face 'vc-dir-header-value))
+            (buf (generate-new-buffer " *temp*" t))
+            proc)
+        (with-current-buffer buf
+          (condition-case _
+              (progn
+                (vc-incoming-outgoing-internal backend nil
+                                               (current-buffer)
+                                               '(log-outgoing short))
+                (setq proc (get-buffer-process (current-buffer)))
+                (overlay-put overlay 'proc proc)
+                (vc-run-delayed
+                  (unwind-protect
+                      (overlay-put
+                       overlay 'after-string
+                       (if (or (not (eq (process-status proc) 'exit))
+                               (plusp (process-exit-status proc)))
+                           unknown
+                         (goto-char (point-min))
+                         (let ((count (how-many log-view-message-re)))
+                           (if (zerop count)
+                               (propertize "No unpushed revisions"
+                                           'face 'vc-dir-header-value)
+                             (propertize
+                              (format (ngettext "%d unpushed revision"
+                                                "%d unpushed revisions"
+                                                count)
+                                      count)
+                              'face 'vc-dir-header-urgent-value
+                              'mouse-face 'highlight
+                              'keymap vc-dir-outgoing-revisions-map
+                              'help-echo "\\<vc-dir-outgoing-revisions-map>\
 \\[vc-root-log-outgoing]: List outgoing revisions")))))
-                (kill-buffer))))
-        (error (overlay-put overlay 'after-string unknown)
-               (kill-buffer buf))))))
+                    (kill-buffer))))
+            (error (overlay-put overlay 'after-string unknown)
+                   (kill-buffer buf)))))))))
 
 (defvar-local vc-dir-async-header-values
   '(("Outgoing" . vc-dir--count-outgoing))
@@ -1490,6 +1498,7 @@ Each element is a pair (HEADER . FUN) where
   - the `after-string' property of the overlay to a temporary value
     indicating that an async computation is in progress, conventionally
     of the form \"[%s ...]\";
+  - the `timer' property of the overlay to any idle timer it schedules
   - the `proc' property of the overlay to the asynchronous process it starts;
   - the `after-string' property of the overlay to the computed header
     value after the asychronous computation completes, \"<<unknown>>\"
@@ -1560,6 +1569,8 @@ specific headers."
     (when-let* ((proc (overlay-get overlay 'proc))
                 (_ (eq 'run (process-status proc))))
       (kill-process proc))
+    (when-let* ((timer (overlay-get overlay 'timer)))
+      (cancel-timer timer))
     (delete-overlay overlay))
   ;; Set up new async header overlays.
   (save-excursion

commit 25084664ba0d99bd334845a1a04e3edb7f96db59
Author: Michael Albinus <michael.albinus@gmx.de>
Date:   Mon Jun 22 14:17:18 2026 +0200

    Sync with Tramp 2.8.2
    
    * lisp/net/tramp-message.el (tramp-trace-add-package): New defun.
    
    * lisp/net/tramp-smb.el (tramp-smb-maybe-open-connection):
    Remove superfluous comment.
    
    * lisp/net/tramp.el (tramp-restricted-shell-hosts-alist):
    Use `file-name-sans-extension'.
    (tramp-completion-handle-expand-file-name):
    Apply `tramp-drop-volume-letter' consequently.
    
    * test/lisp/net/tramp-tests.el
    (tramp--test-ignore-make-symbolic-link-error): Use `file-error'
    instead of `remote-file-error'
    (tramp--test-instrument-test-case-p): Fix doxstring.
    (tramp-test10-write-region-other-file-name-handler)
    (tramp-test49-external-backend-function): Adapt tests.

diff --git a/lisp/net/tramp-cmds.el b/lisp/net/tramp-cmds.el
index 1fc77f0e80d..e6ab0630d7a 100644
--- a/lisp/net/tramp-cmds.el
+++ b/lisp/net/tramp-cmds.el
@@ -794,9 +794,8 @@ This is needed if there are compatibility problems."
   (interactive)
   ;; We expect just one Tramp package is installed.
   (when-let*
-      ((dir (tramp-compat-funcall
-	     'package-desc-dir
-	     (car (alist-get 'tramp (bound-and-true-p package-alist))))))
+      ((dir (tramp-compat-funcall 'package-desc-dir
+	      (car (alist-get 'tramp (bound-and-true-p package-alist))))))
     (dolist (elc (directory-files dir 'full (rx ".elc" eos)))
       (delete-file elc))
     (with-current-buffer (get-buffer-create byte-compile-log-buffer)
diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el
index 3f947ef1b2c..cd6cfdfe949 100644
--- a/lisp/net/tramp-compat.el
+++ b/lisp/net/tramp-compat.el
@@ -103,7 +103,7 @@ Add the extension of F, if existing."
    dir-flag (file-name-extension f t)))
 
 (defalias 'tramp-compat-error-type-p
-  (if (fboundp 'error-type-p)           ;Emacs-31
+  (if (fboundp 'error-type-p)           ; Emacs-31
       #'error-type-p
     (lambda (symbol) (get symbol 'error-conditions))))
 
@@ -264,10 +264,20 @@ value is the default binding of the variable."
 ;;   kept, for example when the HANDLER propagates the error with
 ;;   `(signal (car err) (cdr err)'.
 ;;
-;; * Starting with Emacs 31.1, use `(signal err)' instead of `(signal
-;;   (car err) (cdr err)'.
-;;
 ;; * Starting with Emacs 30.1, use '(_ VALUEFORM)' instead of
 ;;   '(VALUEFORM)' in 'if-let*/when-let*/and-let*'.
+;;
+;; * Starting with Emacs 30, use `static-if'.  Starting with Emacs 31,
+;;   use `static-when' and `static-unless'.
+;;
+;; * Starting with Emacs 31.1, use `(signal err)' instead of `(signal
+;;   (car err) (cdr err)'.  Use also the functions `error-type-p', `error-type',
+;;   `error-has-type-p', and `error-slot-value'.
+;;
+;; * Starting with Emacs 31.1, use `set-local' and `setopt-local'.
+;;
+;; * Starting with Emacs 31.1, use `plusp', `minusp', `oddp' and `evenp'.
+;;
+;; * Starting with Emacs 31.1, use `hash-table-contains-p'.
 
 ;;; tramp-compat.el ends here
diff --git a/lisp/net/tramp-message.el b/lisp/net/tramp-message.el
index 37628e2f001..7ae7408b745 100644
--- a/lisp/net/tramp-message.el
+++ b/lisp/net/tramp-message.el
@@ -211,6 +211,13 @@ They are completed by `M-x TAB' only in Tramp debug buffers."
 (defvar tramp-trace-functions nil
   "A list of non-Tramp functions to be traced with `tramp-verbose' > 10.")
 
+(defun tramp-trace-add-package (package)
+  "Add all functions of PACKAGE to `tramp-trace-functions'."
+  (when (and (symbolp package) (require package nil 'noerror))
+    (dolist (elt (apropos-internal
+		  (rx bos (literal (symbol-name package))) #'functionp))
+      (add-to-list 'tramp-trace-functions elt))))
+
 (defun tramp-debug-message (vec fmt-string &rest arguments)
   "Append message to debug buffer of VEC.
 Message is formatted with FMT-STRING as control string and the remaining
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el
index 8eec0e1bd08..ac54e47e376 100644
--- a/lisp/net/tramp-smb.el
+++ b/lisp/net/tramp-smb.el
@@ -2053,11 +2053,6 @@ If ARGUMENT is non-nil, use it as argument for
 
 	      (let* (coding-system-for-read
 		     (process-connection-type tramp-process-connection-type)
-		     ;; There might be some unfortunate values of
-                     ;; `tramp-smb-connection-local-default-system-variables'.
-                     ;(path-separator (default-value 'path-separator))
-                     ;(null-device (default-value 'null-device))
-                     ;(exec-suffixes (default-value 'exec-suffixes))
 		     (p (apply #'tramp-start-process vec
 			       (tramp-get-connection-name vec)
 			       (tramp-get-connection-buffer vec)
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 87ec55def37..1a10b8042a5 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -571,7 +571,9 @@ interpreted as a regular expression which always matches."
 ;; <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=38079#20>.
 (defcustom tramp-restricted-shell-hosts-alist
   (when (and (eq system-type 'windows-nt)
-             (not (string-match-p (rx "sh" eol) tramp-encoding-shell)))
+             (not (string-match-p
+		   (rx "sh" eol)
+		   (file-name-sans-extension tramp-encoding-shell))))
     (list (rx
 	   bos (| (literal (downcase tramp-system-name))
 		  (literal (upcase tramp-system-name)))
@@ -3006,24 +3008,26 @@ not in completion mode."
   "Like `expand-file-name' for partial Tramp files."
   ;; We need special handling only when a method is needed.  Then we
   ;; check, whether DIRECTORY is "/method:" or "/[method/".
-  (let ((dir (or directory default-directory "/")))
-    (cond
-     ((file-name-absolute-p filename)
-      ;; FILENAME could be like "~/".  We must expand this.
-      (tramp-run-real-handler #'expand-file-name (list filename directory)))
-     ((and (eq tramp-syntax 'simplified)
-           (string-match-p (rx (regexp tramp-postfix-host-regexp) eos) dir))
-      (concat dir filename))
-     ((string-match-p
-       (rx (regexp tramp-prefix-regexp)
-	   (* (regexp tramp-remote-file-name-spec-regexp)
-	      (regexp tramp-postfix-hop-regexp))
-	   (? (regexp tramp-method-regexp) (regexp tramp-postfix-method-regexp)
-	      (? (regexp tramp-user-regexp) (regexp tramp-postfix-user-regexp)))
-	   eos)
-       dir)
-      (concat dir filename))
-     (t (tramp-run-real-handler #'expand-file-name (list filename directory))))))
+  (tramp-drop-volume-letter
+   (let ((dir (or directory default-directory "/")))
+     (cond
+      ((file-name-absolute-p filename)
+       ;; FILENAME could be like "~/".  We must expand this.
+       (tramp-run-real-handler #'expand-file-name (list filename directory)))
+      ((and (eq tramp-syntax 'simplified)
+            (string-match-p (rx (regexp tramp-postfix-host-regexp) eos) dir))
+       (concat dir filename))
+      ((string-match-p
+	(rx (regexp tramp-prefix-regexp)
+	    (* (regexp tramp-remote-file-name-spec-regexp)
+	       (regexp tramp-postfix-hop-regexp))
+	    (? (regexp tramp-method-regexp) (regexp tramp-postfix-method-regexp)
+	       (? (regexp tramp-user-regexp) (regexp tramp-postfix-user-regexp)))
+	    eos)
+	dir)
+       (concat dir filename))
+      (t (tramp-run-real-handler
+	  #'expand-file-name (list filename directory)))))))
 
 ;; This is needed in pcomplete.el.
 (defun tramp-completion-handle-file-directory-p (filename)
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index 8edbb4ffe23..b622a08dce3 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -263,15 +263,17 @@ If QUOTED is non-nil, the local part of the file name is quoted.
 The temporary file is not created."
   (make-temp-name (tramp--test-make-temp-prefix local quoted)))
 
-;; Method "smb" supports `make-symbolic-link' only if the remote host
-;; has CIFS capabilities.  tramp-adb.el, tramp-gvfs.el, tramp-rclone.el
-;; and tramp-sshfs.el do not support symbolic links at all.
+;; If `system-type' is `windows-nt', making symbolic links is not
+;; supported.  Method "smb" supports `make-symbolic-link' only if the
+;; remote host has CIFS capabilities.  tramp-adb.el, tramp-gvfs.el,
+;; tramp-rclone.el and tramp-sshfs.el do not support symbolic links at
+;; all.
 (defmacro tramp--test-ignore-make-symbolic-link-error (&rest body)
   "Run BODY, ignoring \"make-symbolic-link not supported\" file error."
   (declare (indent defun) (debug (body)))
   `(condition-case err
        (progn ,@body)
-     (remote-file-error
+     (file-error
       (unless (string-match-p
 	       (rx bol (| "make-symbolic-link not supported"
 			  (: "Making symbolic link"
@@ -282,7 +284,7 @@ The temporary file is not created."
 ;; Don't print messages in nested `tramp--test-instrument-test-case' calls.
 (defvar tramp--test-instrument-test-case-p nil
   "Whether `tramp--test-instrument-test-case' run.
-This shall used dynamically bound only.")
+This shall be used dynamically bound only.")
 
 ;; When `tramp-verbose' is greater than 10, and you want to trace
 ;; other functions as well, do something like
@@ -2980,8 +2982,14 @@ This checks also `file-name-as-directory', `file-name-directory',
 	      (should (string-equal (buffer-string) "foo\nbar\n")))))
 
       ;; Cleanup.
-      (ignore-errors (kill-buffer buffer1))
-      (ignore-errors (kill-buffer buffer2))
+      ;; Modifying `read-from-minibuffer' doesn't work on MS Windows.
+      ;; `kill-buffer--possibly-save' exists since Emacs 29.1.
+      (if (fboundp 'kill-buffer--possibly-save)
+	  (cl-letf (((symbol-function #'kill-buffer--possibly-save) #'always))
+	    (ignore-errors (kill-buffer buffer1))
+	    (ignore-errors (kill-buffer buffer2)))
+	(ignore-errors (kill-buffer buffer1))
+	(ignore-errors (kill-buffer buffer2)))
       (ignore-errors (delete-file tmp-file)))))
 
 (ert-deftest tramp-test11-copy-file ()
@@ -9081,8 +9089,12 @@ process sentinels.  They shall not disturb each other."
     (should
      (string-equal (tramp--test-operation tramp-test-vec)
 		   (tramp--handle-test-operation tramp-test-vec)))
-    (let ((vec (copy-tramp-file-name tramp-test-vec)))
-      (setf (tramp-file-name-method vec) (if (tramp--test-sh-p) "rclone" "sudo"))
+    (let ((vec (copy-tramp-file-name tramp-test-vec))
+	  ;; This is needed for the `simplified' syntax.
+	  (tramp-default-method (if (tramp--test-sh-p) "rclone" "sudo"))
+	  ;; "rclone" is not multi-hop capable.
+	  (tramp-multi-hop-p-hook #'always))
+      (setf (tramp-file-name-method vec) tramp-default-method)
       (should-not
        (string-equal (tramp--test-operation vec)
 		     (tramp--handle-test-operation vec))))

commit 7be92efa5e1ab3e6662f5fbbbb100e245c7c8b00
Author: Sean Whitton <spwhitton@spwhitton.name>
Date:   Mon Jun 22 10:45:27 2026 +0100

    Rename variable to macroexp-enable-preserve-posification
    
    * lisp/emacs-lisp/macroexp.el
    (macroexp-enable-pos-preservation): Rename ...
    (macroexp-enable-preserve-posification): ... to this.  All uses
    changes.

diff --git a/lisp/emacs-lisp/elisp-scope.el b/lisp/emacs-lisp/elisp-scope.el
index 4d1b7c69f15..55e82001df9 100644
--- a/lisp/emacs-lisp/elisp-scope.el
+++ b/lisp/emacs-lisp/elisp-scope.el
@@ -2794,7 +2794,7 @@ are analyzed."
                    (symbols-with-pos-enabled t)
                    (message-log-max nil)
                    (inhibit-message t)
-                   (macroexp-enable-pos-preservation nil)
+                   (macroexp-enable-preserve-posification nil)
                    (macroexpand-all-environment
                     (append (mapcar #'list elisp-scope-unsafe-macros) macroexpand-all-environment)))
                (ignore-errors (macroexpand-1 form macroexpand-all-environment)))
diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el
index 49b8b022780..1d40e30bb08 100644
--- a/lisp/emacs-lisp/macroexp.el
+++ b/lisp/emacs-lisp/macroexp.el
@@ -304,7 +304,7 @@ modified FORM."
   (let ((new-form (macroexp--posify-form-1 form call-pos 10)))
     (or new-form form)))
 
-(defvar macroexp-enable-pos-preservation t
+(defvar macroexp-enable-preserve-posification t
   "Whether to attach position of a macro call to the expanded form.")
 
 (defmacro macroexp-preserve-posification (pos-form &rest body)
@@ -319,7 +319,7 @@ change this."
                     ((symbol-with-pos-p ,pos-form)
                      (symbol-with-pos-pos ,pos-form))))
          (new-value (progn ,@body)))
-     (if (and macroexp-enable-pos-preservation call-pos
+     (if (and macroexp-enable-preserve-posification call-pos
               (not (or (and (consp new-value)
                             (symbol-with-pos-p (car new-value)))
                        (and (symbol-with-pos-p new-value)))))
diff --git a/test/lisp/emacs-lisp/macroexp-tests.el b/test/lisp/emacs-lisp/macroexp-tests.el
index a8deb79dfb6..cad3ed84a07 100644
--- a/test/lisp/emacs-lisp/macroexp-tests.el
+++ b/test/lisp/emacs-lisp/macroexp-tests.el
@@ -186,13 +186,13 @@
   "Eagerly macro-expand BODY."
   (macroexpand-all `(progn . ,body) macroexpand-all-environment))
 
-(ert-deftest macroexp--test-macroexp-enable-pos-preservation ()
+(ert-deftest macroexp--test-macroexp-enable-preserve-posification ()
   (let* ((symbols-with-pos-enabled t)
          (form (read-positioning-symbols
                 "(macroexp--test-with-foo (pop command-history))"))
          (pop-pos (symbol-with-pos-pos (caadr form)))
          (exp1 (macroexpand-1 form))
-         (macroexp-enable-pos-preservation nil)
+         (macroexp-enable-preserve-posification nil)
          (exp2 (macroexpand-1 form)))
     ;; Position of `pop' preserved in EXP1.  There's no way to tell that
     ;; the position information in EXP1 is synthetic, which may confuse

commit 2066a0c9e865f7673a0e8fec8ac2de40abe5e862
Author: Eshel Yaron <me@eshelyaron.com>
Date:   Sat Jun 20 17:35:09 2026 +0200

    New variable 'macroexp-enable-pos-preservation' (bug#79599)
    
    * lisp/emacs-lisp/macroexp.el
    (macroexp-enable-pos-preservation): New variable.
    (macroexp-preserve-posification): Respect it.
    * lisp/emacs-lisp/elisp-scope.el (elisp-scope-1): Use it.
    * test/lisp/emacs-lisp/macroexp-tests.el
    (macroexp--test-macroexp-enable-pos-preservation): New test.

diff --git a/lisp/emacs-lisp/elisp-scope.el b/lisp/emacs-lisp/elisp-scope.el
index f95ea41e496..4d1b7c69f15 100644
--- a/lisp/emacs-lisp/elisp-scope.el
+++ b/lisp/emacs-lisp/elisp-scope.el
@@ -2794,6 +2794,7 @@ are analyzed."
                    (symbols-with-pos-enabled t)
                    (message-log-max nil)
                    (inhibit-message t)
+                   (macroexp-enable-pos-preservation nil)
                    (macroexpand-all-environment
                     (append (mapcar #'list elisp-scope-unsafe-macros) macroexpand-all-environment)))
                (ignore-errors (macroexpand-1 form macroexpand-all-environment)))
diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el
index 6a16ebb0fd2..49b8b022780 100644
--- a/lisp/emacs-lisp/macroexp.el
+++ b/lisp/emacs-lisp/macroexp.el
@@ -304,6 +304,9 @@ modified FORM."
   (let ((new-form (macroexp--posify-form-1 form call-pos 10)))
     (or new-form form)))
 
+(defvar macroexp-enable-pos-preservation t
+  "Whether to attach position of a macro call to the expanded form.")
+
 (defmacro macroexp-preserve-posification (pos-form &rest body)
   "Evaluate BODY..., posifying the result with POS-FORM's position, if any.
 If the result of body happens to have a position already, we do not
@@ -316,7 +319,7 @@ change this."
                     ((symbol-with-pos-p ,pos-form)
                      (symbol-with-pos-pos ,pos-form))))
          (new-value (progn ,@body)))
-     (if (and call-pos
+     (if (and macroexp-enable-pos-preservation call-pos
               (not (or (and (consp new-value)
                             (symbol-with-pos-p (car new-value)))
                        (and (symbol-with-pos-p new-value)))))
diff --git a/test/lisp/emacs-lisp/macroexp-tests.el b/test/lisp/emacs-lisp/macroexp-tests.el
index 94bd1e98920..a8deb79dfb6 100644
--- a/test/lisp/emacs-lisp/macroexp-tests.el
+++ b/test/lisp/emacs-lisp/macroexp-tests.el
@@ -182,4 +182,25 @@
               (user-error (error-message-string err))))))
      (should (and (stringp res) (string-match "new-replacement" res))))))
 
+(defmacro macroexp--test-with-foo (&rest body)
+  "Eagerly macro-expand BODY."
+  (macroexpand-all `(progn . ,body) macroexpand-all-environment))
+
+(ert-deftest macroexp--test-macroexp-enable-pos-preservation ()
+  (let* ((symbols-with-pos-enabled t)
+         (form (read-positioning-symbols
+                "(macroexp--test-with-foo (pop command-history))"))
+         (pop-pos (symbol-with-pos-pos (caadr form)))
+         (exp1 (macroexpand-1 form))
+         (macroexp-enable-pos-preservation nil)
+         (exp2 (macroexpand-1 form)))
+    ;; Position of `pop' preserved in EXP1.  There's no way to tell that
+    ;; the position information in EXP1 is synthetic, which may confuse
+    ;; consumers such as semantic highlighting.
+    (should (symbol-with-pos-p (caadr exp1)))
+    (should (= (symbol-with-pos-pos (caadr exp1)) pop-pos))
+    ;; Position preservation was disabled, so EXP2 is clean of synthetic
+    ;; position information.
+    (should-not (symbol-with-pos-p (caadr exp2)))))
+
 ;;; macroexp-tests.el ends here

commit 00c290be85313f0c75c742896833e65a07033108
Author: milkvetch <xuhi@distruzione.org>
Date:   Sun Jun 21 20:19:19 2026 +0200

    Avoid infinite loop in some Dired marking commands
    
    These commands use dired-get-filename inside a dired-mark-if form;
    when the bottom subdirectory is hidden, dired-get-filename makes
    it so the dired-mark-if loop never reaches the end of the buffer.
    This is fixed by skipping hidden subdirectories (bug#80964).
    
    * lisp/dired.el (dired-mark-files-regexp)
    (dired-mark-files-containing-regexp):
    * lisp/dired-x.el (dired-mark-unmarked-files):
    * lisp/dired-aux.el (dired-compare-directories): Skip hidden subdirectories.

diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index a870f610094..50287a67129 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -361,12 +361,16 @@ only in the active region if `dired-mark-region' is non-nil."
      dir1 nil
      (lambda ()
        (dired-mark-if
-        (member (dired-get-filename nil t) file-list1) nil)))
+        (and (not (dired--hidden-p))
+             (member (dired-get-filename nil t) file-list1))
+        nil)))
     (dired-fun-in-all-buffers
      dir2 nil
      (lambda ()
        (dired-mark-if
-        (member (dired-get-filename nil t) file-list2) nil)))
+        (and (not (dired--hidden-p))
+             (member (dired-get-filename nil t) file-list2))
+        nil)))
     (message "Marked in dir1: %s, in dir2: %s"
              (format-message (ngettext "%d file" "%d files" (length file-list1))
                              (length file-list1))
diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index ecd7c83e42a..128332bb0cf 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -552,6 +552,7 @@ files in the active region if `dired-mark-region' is non-nil."
   (let ((dired-marker-char (if unflag-p ?\s dired-marker-char)))
     (dired-mark-if
      (and
+      (not (dired--hidden-p))
       (if unflag-p
           ;; Already marked.
           (not (= (following-char) ?\s))
diff --git a/lisp/dired.el b/lisp/dired.el
index 26e698341d8..53ec6779061 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -4766,6 +4766,7 @@ object files--just `.o' will mark more than you might think."
     (dired-mark-if
      (and (not (looking-at-p dired-re-dot))
 	  (not (eolp))			; empty line
+	  (not (dired--hidden-p))
 	  (let ((fn (dired-get-filename t t)))
 	    (and fn (string-match-p regexp fn))))
      "matching file")))
@@ -4817,6 +4818,7 @@ since it was last visited."
     (dired-mark-if
      (and (not (looking-at-p dired-re-dot))
 	  (not (eolp))			; empty line
+	  (not (dired--hidden-p))
 	  (let ((fn (dired-get-filename nil t)))
 	    (when (and fn (file-readable-p fn)
 		       (not (file-directory-p fn)))
