commit 6a12fe3d797deb118d1328f04c0ed9a81d7eb0a6 (HEAD, refs/remotes/origin/master) Author: Stefan Monnier Date: Fri Oct 3 17:17:02 2025 -0400 (editorconfig-indentation-alist): Pare down * lisp/editorconfig.el (editorconfig-indentation-alist): Remove entries of the form `(MODE-mode MODE-basic-offset)`, `(MODE-mode MODE-indent-level)`, or `(MODE-mode MODE-indent-offset)` since they are covered by the fallback guessing code. (editorconfig--default-indent-size-function): Remove "-block-offset" from the guessing code since it's used only by `octave-mode`. diff --git a/lisp/editorconfig.el b/lisp/editorconfig.el index d9e3899ec3a..b0888c4377b 100644 --- a/lisp/editorconfig.el +++ b/lisp/editorconfig.el @@ -127,32 +127,25 @@ This hook will be run even when there are no matching sections in "0.5") (defcustom editorconfig-indentation-alist ;; For contributors: Sort modes in alphabetical order - '((apache-mode apache-indent-level) - (awk-mode c-basic-offset) + '((awk-mode c-basic-offset) (bash-ts-mode sh-basic-offset) (bpftrace-mode c-basic-offset) (c++-mode c-basic-offset) (c++-ts-mode c-basic-offset c-ts-mode-indent-offset) - (c-mode c-basic-offset) (c-ts-mode c-basic-offset c-ts-mode-indent-offset) (cmake-mode cmake-tab-width) (cmake-ts-mode cmake-tab-width cmake-ts-mode-indent-offset) (coffee-mode coffee-tab-width) - (cperl-mode cperl-indent-level) - (crystal-mode crystal-indent-level) (csharp-mode c-basic-offset) (csharp-ts-mode c-basic-offset csharp-ts-mode-indent-offset) - (css-mode css-indent-offset) (css-ts-mode css-indent-offset) (d-mode c-basic-offset) (elixir-ts-mode elixir-ts-indent-offset) (emacs-lisp-mode . editorconfig--get-indentation-lisp-mode) - (enh-ruby-mode enh-ruby-indent-level) - (erlang-mode erlang-indent-level) (ess-mode ess-indent-offset) (f90-mode f90-associate-indent f90-continuation-indent @@ -166,10 +159,7 @@ This hook will be run even when there are no matching sections in (fsharp-mode fsharp-continuation-offset fsharp-indent-level fsharp-indent-offset) - (gdscript-mode gdscript-indent-offset) (go-ts-mode go-ts-mode-indent-offset) - (graphql-mode graphql-indent-level) - (groovy-mode groovy-indent-offset) (haskell-mode haskell-indent-spaces haskell-indent-offset haskell-indentation-layout-offset @@ -179,42 +169,29 @@ This hook will be run even when there are no matching sections in haskell-indentation-where-pre-offset shm-indent-spaces) (haxor-mode haxor-tab-width) - (hcl-mode hcl-indent-level) (html-ts-mode html-ts-mode-indent-offset) (idl-mode c-basic-offset) (jade-mode jade-tab-width) (java-mode c-basic-offset) (java-ts-mode c-basic-offset java-ts-mode-indent-offset) - (js-mode js-indent-level) (js-ts-mode js-indent-level) (js-jsx-mode js-indent-level sgml-basic-offset) - (js2-mode js2-basic-offset) (js2-jsx-mode js2-basic-offset sgml-basic-offset) - (js3-mode js3-indent-level) (json-mode js-indent-level) (json-ts-mode json-ts-mode-indent-offset) (jsonian-mode jsonian-default-indentation) - (julia-mode julia-indent-offset) (kotlin-mode kotlin-tab-width) (kotlin-ts-mode kotlin-ts-mode-indent-offset) (latex-mode . editorconfig--get-indentation-latex-mode) (lisp-mode . editorconfig--get-indentation-lisp-mode) (livescript-mode livescript-tab-width) - (lua-mode lua-indent-level) - (lua-ts-mode lua-ts-indent-offset) - (magik-mode magik-indent-level) (magik-ts-mode magik-indent-level) - (matlab-mode matlab-indent-level) (meson-mode meson-indent-basic) (mips-mode mips-tab-width) - (mustache-mode mustache-basic-offset) - (nasm-mode nasm-basic-offset) - (nginx-mode nginx-indent-level) (nxml-mode . editorconfig--get-indentation-nxml-mode) (objc-mode c-basic-offset) (octave-mode octave-block-offset) - (perl-mode perl-indent-level) ;; No need to change `php-mode-coding-style' value for php-mode ;; since we run editorconfig later than it resets `c-basic-offset'. ;; See https://github.com/editorconfig/editorconfig-emacs/issues/116 @@ -225,29 +202,19 @@ This hook will be run even when there are no matching sections in (protobuf-mode c-basic-offset) (ps-mode ps-mode-tab) (pug-mode pug-tab-width) - (puppet-mode puppet-indent-level) (python-mode . editorconfig--get-indentation-python-mode) (python-ts-mode . editorconfig--get-indentation-python-mode) (rjsx-mode js-indent-level sgml-basic-offset) - (ruby-mode ruby-indent-level) (ruby-ts-mode ruby-indent-level) - (rust-mode rust-indent-offset) (rust-ts-mode rust-indent-offset rust-ts-mode-indent-offset) - (rustic-mode rustic-indent-offset) (scala-mode scala-indent:step) (scss-mode css-indent-offset) - (sgml-mode sgml-basic-offset) - (sh-mode sh-basic-offset) - (slim-mode slim-indent-offset) - (sml-mode sml-indent-level) - (svelte-mode svelte-basic-offset) (swift-mode swift-mode:basic-offset) (terra-mode terra-indent-level) (tcl-mode tcl-indent-level tcl-continued-indent-level) (toml-ts-mode toml-ts-mode-indent-offset) - (typescript-mode typescript-indent-level) (typescript-ts-base-mode typescript-ts-mode-indent-offset) (verilog-mode verilog-indent-level verilog-indent-level-behavioral @@ -256,9 +223,7 @@ This hook will be run even when there are no matching sections in verilog-cexp-indent verilog-case-indent) (web-mode . editorconfig--get-indentation-web-mode) - (yaml-mode yaml-indent-offset) (yaml-ts-mode yaml-indent-offset) - (zig-mode zig-indent-offset) ) "Alist of indentation setting methods by modes. @@ -415,8 +380,7 @@ heuristic for those modes not found there." (funcall rule size) (mapcar (lambda (elem) `(,elem . ,size)) rule)))))) ;; Fallback, let's try and guess. - (let ((suffixes '("-indent-level" "-basic-offset" "-indent-offset" - "-block-offset")) + (let ((suffixes '("-indent-level" "-basic-offset" "-indent-offset")) (guess ())) (while (and parents (not guess)) (let* ((mode (pop parents)) commit 9deff2926b9c82f2d0fddc980f92225172c6a6a3 Author: Sean Whitton Date: Fri Oct 3 20:54:25 2025 +0100 New command log-view-unmark-all-entries * lisp/vc/log-view.el (log-view-unmark-all-entries): New command. (log-view-mode-map): Bind it. * doc/emacs/maintaining.texi (VC Change Log): * etc/NEWS: Document it. diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index adb47e00658..27ed511adb9 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -1248,6 +1248,15 @@ changes to all files made in that revision. In a compact-style log buffer (e.g., the one created by @kbd{C-x v L}), toggle between showing and hiding the full log entry for the revision at point (@code{log-view-toggle-entry-display}). + +@item m +Mark the entry at point (@code{log-view-mark-entry}). + +@item u +Unmark the entry at point (@code{log-view-unmark-entry}). + +@item U +Unmark all marked entries (@code{log-view-unmark-all-entries}). @end table @vindex vc-log-show-limit diff --git a/etc/NEWS b/etc/NEWS index bb411631cfa..d44a46a9c86 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2391,6 +2391,8 @@ You can get back the old behavior with something like this: (with-eval-after-load 'log-view (keymap-set log-view-mode-map "m" #'log-view-toggle-mark-entry)) +In addition, a new command 'U' removes all marks. + ** Diff mode +++ diff --git a/lisp/vc/log-view.el b/lisp/vc/log-view.el index 35ee9188c23..863f0ddcce3 100644 --- a/lisp/vc/log-view.el +++ b/lisp/vc/log-view.el @@ -127,6 +127,7 @@ "RET" #'log-view-toggle-entry-display "m" #'log-view-mark-entry "u" #'log-view-unmark-entry + "U" #'log-view-unmark-all-entries "e" #'log-view-modify-change-comment "d" #'log-view-diff "=" #'log-view-diff @@ -439,6 +440,12 @@ See `log-view-mark-entry'." (delete-overlay found)) (log-view-msg-next 1))) +(defun log-view-unmark-all-entries () + "Unmark all marked log entries in this buffer." + (interactive) + (log-view--mark-unmark #'log-view--unmark-entry + nil (point-min) (point-max))) + ;;;###autoload (defun log-view-get-marked () "Return the list of tags for the marked log entries." commit 70a24e3bb50dae49345a0e1f7a551227c570526f Merge: 2a63811b304 0aa44112b68 Author: Sean Whitton Date: Fri Oct 3 20:51:18 2025 +0100 Merge from origin/emacs-30 0aa44112b68 ; * doc/emacs/maintaining.texi (VC Change Log): Missing a... commit 2a63811b30481c9d36c9412e6fbaeabec8bbf771 Merge: d5faebe8db4 b0e4e53b9ad Author: Sean Whitton Date: Fri Oct 3 20:51:18 2025 +0100 ; Merge from origin/emacs-30 The following commit was skipped: b0e4e53b9ad * lisp/term/w32-win.el (dynamic-library-alist): Add libxm... commit d5faebe8db47a65f9a46fa41b7f89e1a0ca12a86 Merge: a7bb2fa62af 6a8fda1f339 Author: Sean Whitton Date: Fri Oct 3 20:51:18 2025 +0100 Merge from origin/emacs-30 6a8fda1f339 Fix process name matching in 'tramp-process-running-p' 217fd4f09ea ; * doc/lispref/modes.texi (Defining Minor Modes): Fix la... commit a7bb2fa62af839c2293dd69100a9fcd82cb79f65 Author: Sean Whitton Date: Fri Oct 3 20:24:59 2025 +0100 ; TRAMP docs: "cherry pick"->"cherry-pick" (see bug#79408). diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index c57db56f866..5ce41091048 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -4832,7 +4832,7 @@ for which no associated buffers exist (except for Tramp internal buffers). This command is helpful to prune connections after you close remote-file -buffers without having to either cherry pick via +buffers without having to either cherry-pick via @code{tramp-cleanup-connection} or clear them all via @code{tramp-cleanup-all-connections}. @end deffn diff --git a/etc/NEWS b/etc/NEWS index 6f193752a3e..bb411631cfa 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1841,7 +1841,7 @@ To unconditionally enable 'flyspell-mode' from a hook, use this instead: Connection-related objects for which no associated buffers exist, except for Tramp internal buffers, are flushed. This is helpful to prune connections after you close remote-file buffers without having to either -cherry pick via 'tramp-cleanup-connection' or clear them all via +cherry-pick via 'tramp-cleanup-connection' or clear them all via 'tramp-cleanup-all-connections'. +++ commit 0aa44112b68fe672a86673e38292eeee0eabf74c Author: Sean Whitton Date: Fri Oct 3 16:01:26 2025 +0100 ; * doc/emacs/maintaining.texi (VC Change Log): Missing annotations. diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index d5e42db00e6..c6eeab770fe 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -1144,38 +1144,41 @@ compare past revisions (@pxref{Old Revisions}): @table @kbd @item p -Move to the previous revision entry. (Revision entries in the log -buffer are usually in reverse-chronological order, so the previous -revision-item usually corresponds to a newer revision.) A numeric -prefix argument is a repeat count. +Move to the previous revision entry (@code{log-view-msg-prev}). +(Revision entries in the log buffer are usually in reverse-chronological +order, so the previous revision-item usually corresponds to a newer +revision.) A numeric prefix argument is a repeat count. @item n -Move to the next revision entry. A numeric prefix argument is a -repeat count. +Move to the next revision entry (@code{log-view-msg-next}). A numeric +prefix argument is a repeat count. @item a -Annotate the revision on the current line (@pxref{Old Revisions}). +Annotate the revision on the current line +(@code{log-view-annotate-version}; @pxref{Old Revisions}). @item e -Modify the change comment displayed at point. Note that not all VC -systems support modifying change comments. +Modify the change comment displayed at point +(@code{log-view-modify-change-comment}). Note that not all VC systems +support modifying change comments. @item f -Visit the revision indicated at the current line. +Visit the revision indicated at the current line +(@code{log-view-find-revision}). @item d Display a diff between the revision at point and the next earlier -revision, for the specific file. +revision, for the specific file (@code{log-view-diff}). @item D Display the changeset diff between the revision at point and the next -earlier revision. This shows the changes to all files made in that -revision. +earlier revision (@code{log-view-diff-changeset}). This shows the +changes to all files made in that revision. @item @key{RET} -In a compact-style log buffer (e.g., the one created by @kbd{C-x v -L}), toggle between showing and hiding the full log entry for the -revision at point. +In a compact-style log buffer (e.g., the one created by @kbd{C-x v L}), +toggle between showing and hiding the full log entry for the revision at +point (@code{log-view-toggle-entry-display}). @end table @vindex vc-log-show-limit commit 0134d4c4fdd04ee7ca47e7c9d50d76ed1c6c99a6 Author: Sean Whitton Date: Fri Oct 3 15:32:44 2025 +0100 vc--prompt-other-working-tree: Better handle no other working trees * lisp/vc/vc.el (vc--prompt-other-working-tree): If there are no other working trees but ALLOW-EMPTY is non-nil, it is not an error. diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 344fc0c70b6..55606f29bea 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -4581,26 +4581,41 @@ When called from Lisp, BACKEND is the VC backend." "Invoke `project-prompter' to choose another working tree. BACKEND is the VC backend. PROMPT is the prompt string for `project-prompter'. -If ALLOW-EMPTY is non-nil, empty input means the current working tree." - (if-let* ((trees (vc-call-backend backend 'known-other-working-trees))) - (let (res) - (require 'project) - (dolist (tree trees) - (when-let* ((p (project-current nil tree))) - (project-remember-project p nil t))) - (setq res - (funcall project-prompter - (if allow-empty - (format "%s (empty for this working tree)" - prompt) - prompt) +If ALLOW-EMPTY is non-nil, empty input means the current working tree. +In typical usage ALLOW-EMPTY non-nil means that it makes sense to apply +the caller's operation to the current working tree." + ;; If there are no other working trees and ALLOW-EMPTY is non-nil, we + ;; still invoke the `project-prompter' and require the user to type + ;; \\`RET', even though it's redundant. Doing it this way means that + ;; invoking the command on the current working tree works the same + ;; whether or not there exist any other working trees. In particular, + ;; the number of keys you have to type is always the same. It's more + ;; ergonomic not to require the user to think about whether there are + ;; other working trees when what they care about is doing something + ;; with the current working tree: they can just type \\`RET' without + ;; stopping to look at the echo area. + (let ((trees (vc-call-backend backend 'known-other-working-trees)) + res) + (unless (or trees allow-empty) + (user-error + (substitute-command-keys + "No other working trees. Use \\[vc-add-working-tree] to add one"))) + (require 'project) + (dolist (tree trees) + (when-let* ((p (project-current nil tree))) + (project-remember-project p nil t))) + (setq res + (funcall project-prompter + (if allow-empty + (format "%s (empty for this working tree)" + prompt) + prompt) + (if trees (lambda (k &optional _v) (member (or (car-safe k) k) trees)) - t allow-empty)) - (if (string-empty-p res) (vc-root-dir) res)) - (user-error - (substitute-command-keys - "No other working trees. Use \\[vc-add-working-tree] to add one")))) + #'ignore) + t allow-empty)) + (if (string-empty-p res) (vc-root-dir) res))) (defvar project-current-directory-override) commit 3ec87212a4227e08ffa46ccbf2f0eb198f99c1aa Author: Spencer Baugh Date: Wed Oct 1 17:28:47 2025 -0400 Eglot: make markup invisible instead of deleting it (bug#79552) We use gfm-view-mode to render Markdown before we hand over the string to ElDoc (which usually put it in a 'special' mode "*eldoc*" buffer). 'gfm-view-mode' adds keymap text properties to make links clickable. It also makes some of the markup invisible with a special 'invisible' property value which is specific to 'gfm-view-mode'. We used to delete the latter, therefore breaking the link-clicking. Simply resetting the regions with non-nil 'invisible' to 't' instead of deleting them fixes this. See also https://github.com/joaotavora/eglot/discussions/1238 * lisp/progmodes/eglot.el: Make invisible markup invisible instead of deleting it. * etc/EGLOT-NEWS: Mention bugfix. Co-authored-by: João Távora diff --git a/etc/EGLOT-NEWS b/etc/EGLOT-NEWS index 6505a6d8567..23104edd5d6 100644 --- a/etc/EGLOT-NEWS +++ b/etc/EGLOT-NEWS @@ -54,6 +54,12 @@ by the LSP server pertain. This helps in skipping useless or harmful updates, avoiding flakiness with code actions and flickering overlays when the buffer is changed. +** Markdown links migrating to *eldoc* buffer now clickable (bug#79552) + +Eglot now preserves crucial properties in the Markdown documentation +provided by the LSP server, fixing a longstanding bug with clickable +hyperlinks. See also github#1238. + * Changes in Eglot 1.18 (20/1/2025) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index b35d5e15e6c..6a7edef08b3 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -2018,7 +2018,7 @@ Doubles as an indicator of snippet support." (unless (bound-and-true-p yas-minor-mode) (yas-minor-mode 1)) (apply #'yas-expand-snippet args))))) - (defun eglot--format-markup (markup &optional mode) +(defun eglot--format-markup (markup &optional mode) "Format MARKUP according to LSP's spec. MARKUP is either an LSP MarkedString or MarkupContent object." (let (string render-mode language) @@ -2050,9 +2050,14 @@ MARKUP is either an LSP MarkedString or MarkupContent object." (goto-char (point-min)) (let ((inhibit-read-only t)) (when (fboundp 'text-property-search-forward) + ;; If `render-mode' is `gfm-view-mode', the `invisible' + ;; regions are set to `markdown-markup'. Set them to 't' + ;; instead, since this has actual meaning in the "*eldoc*" + ;; buffer where we're taking this string (#bug79552). (while (setq match (text-property-search-forward 'invisible)) - (delete-region (prop-match-beginning match) - (prop-match-end match))))) + (put-text-property (prop-match-beginning match) + (prop-match-end match) + 'invisible t)))) (string-trim (buffer-string)))))) (defun eglot--read-server (prompt &optional dont-if-just-the-one) commit 72f3f48d3676f7a31d4eb3f3bfc394ef58827d12 Author: Sean Whitton Date: Thu Oct 2 21:18:51 2025 +0100 Log View marking: Fix lambda lists * lisp/vc/log-view.el (log-view-mark-entry) (log-view-unmark-entry): Mark ARG as a required argument, as it in fact is. (log-view-toggle-mark-entry): Call them properly. diff --git a/lisp/vc/log-view.el b/lisp/vc/log-view.el index 3d04676b419..35ee9188c23 100644 --- a/lisp/vc/log-view.el +++ b/lisp/vc/log-view.el @@ -345,8 +345,8 @@ See `log-view-mark-entry'." (save-excursion (when-let* ((entry (log-view-current-entry))) (if (get-char-property (car entry) 'log-view-self) - (log-view-unmark-entry) - (log-view-mark-entry))))) + (log-view-unmark-entry 1) + (log-view-mark-entry 1))))) (defun log-view--mark-unmark (mark-unmark-function arg beg end) "Call MARK-UNMARK-FUNCTION on each line of an active region or ARG times. @@ -383,12 +383,12 @@ characters." (dotimes (_ arg) (funcall mark-unmark-function)))) -(defun log-view-mark-entry (&optional arg beg end) +(defun log-view-mark-entry (arg &optional beg end) "Mark the log entry at point. If the region is active in Transient Mark mode, mark all entries. When called with a prefix argument, mark that many log entries. -When called from Lisp, mark ARG entries or all entries between lying -between BEG and END. If BEG and END are supplied, ARG is ignored. +When called from Lisp, mark ARG entries or all entries lying between BEG +and END. If BEG and END are supplied, ARG is ignored. When entries are marked, some commands that usually operate on the entry at point will instead operate on all marked entries. @@ -419,12 +419,12 @@ marked revisions." (overlay-put ov 'log-view-marked (nth 1 entry))))) (log-view-msg-next 1))) -(defun log-view-unmark-entry (&optional arg beg end) +(defun log-view-unmark-entry (arg &optional beg end) "Unmark the log entry at point. If the region is active in Transient Mark mode, unmark all entries. When called with a prefix argument, unmark that many log entries. -When called from Lisp, mark ARG entries or all entries between lying -between BEG and END. If BEG and END are supplied, ARG is ignored. +When called from Lisp, mark ARG entries or all entries lying between BEG +and END. If BEG and END are supplied, ARG is ignored. See `log-view-mark-entry'." (interactive (list (prefix-numeric-value current-prefix-arg) commit b38e54b667c2c60d833c5c9c35b060c48a35bc08 Author: Sean Whitton Date: Thu Oct 2 20:20:14 2025 +0100 ; * lisp/vc/vc.el (vc-print-root-log): Use plusp. diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 9ae64d08742..344fc0c70b6 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -3567,10 +3567,9 @@ with its diffs (if the underlying VCS backend supports that)." "Limit display (unlimited: 0): " (format "%s" vc-log-show-limit) nil nil nil)))) - (when (<= lim 0) (setq lim nil)) - (list lim))) + (list (and (plusp lim) lim)))) (t - (list (when (> vc-log-show-limit 0) vc-log-show-limit))))) + (list (and (plusp vc-log-show-limit) vc-log-show-limit))))) (vc--with-backend-in-rootdir "VC revision log" (let* ((with-diff (and (eq limit 1) revision)) (vc-log-short-style (and (not with-diff) vc-log-short-style))) commit cf68270b8917d4b452aefc270dba7b3bb3bea9a3 Author: Eli Zaretskii Date: Thu Oct 2 15:38:06 2025 +0300 * lisp/term/w32-nt.el (dynamic-library-alist): Add libxml2-16.dll. Reported by Andy Moreton . diff --git a/lisp/term/w32-nt.el b/lisp/term/w32-nt.el index 7ff9472839d..e40afcb7c94 100644 --- a/lisp/term/w32-nt.el +++ b/lisp/term/w32-nt.el @@ -101,7 +101,7 @@ (if (>= libgnutls-version 30400) '(gnutls "libgnutls-30.dll") '(gnutls "libgnutls-28.dll" "libgnutls-26.dll")) - '(libxml2 "libxml2-2.dll" "libxml2.dll") + '(libxml2 "libxml2-16.dll" "libxml2-2.dll" "libxml2.dll") '(zlib "zlib1.dll" "libz-1.dll") '(lcms2 "liblcms2-2.dll") '(gccjit "libgccjit-0.dll") commit b0e4e53b9ad10a4ebb7c2c9fd54033536e98c913 Author: Eli Zaretskii Date: Thu Oct 2 15:34:02 2025 +0300 * lisp/term/w32-win.el (dynamic-library-alist): Add libxml2-16.dll. Do not merge to master. diff --git a/lisp/term/w32-win.el b/lisp/term/w32-win.el index b290888f557..f5c6eea9208 100644 --- a/lisp/term/w32-win.el +++ b/lisp/term/w32-win.el @@ -287,7 +287,7 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.") (if (>= libgnutls-version 30400) '(gnutls "libgnutls-30.dll") '(gnutls "libgnutls-28.dll" "libgnutls-26.dll")) - '(libxml2 "libxml2-2.dll" "libxml2.dll") + '(libxml2 "libxml2-16.dll" "libxml2-2.dll" "libxml2.dll") '(zlib "zlib1.dll" "libz-1.dll") '(lcms2 "liblcms2-2.dll") '(gccjit "libgccjit-0.dll") commit 2c0cf894f430943c3ea36ca89f2f7ebe8e68a2c6 Author: Eli Zaretskii Date: Thu Oct 2 10:22:37 2025 +0300 Fix 'restart-emacs' on MS-Windows * src/w32.c (w32_reexec_emacs): Reset undocumented bits in STARTUPINFO flags. Suggested by yhr0x43 . (Bug#79554) diff --git a/src/w32.c b/src/w32.c index 7182bee0ab7..d9fee5b6f03 100644 --- a/src/w32.c +++ b/src/w32.c @@ -10939,6 +10939,9 @@ w32_reexec_emacs (char *cmd_line, const char *wdir) DWORD dwCreationFlags = NORMAL_PRIORITY_CLASS; GetStartupInfo (&si); /* Use the same startup info as the caller. */ + /* Reset undocumented bits in STARTUPINFO flags, as they could cause a + crash in the re-exec'ed Emacs. */ + si.dwFlags &= 0xbbff; /* reset the 0x4000 and 0x0400 bits */ if (inhibit_window_system) { HANDLE screen_handle; commit 17ef2d64e4a61f86bff695e0a28ded92c27f86e6 Author: Sean Whitton Date: Wed Oct 1 21:06:10 2025 +0100 ; * doc/emacs/vc1-xtra.texi (Other Working Trees): Better example. diff --git a/doc/emacs/vc1-xtra.texi b/doc/emacs/vc1-xtra.texi index 70a60202ff5..98af4a6f6c5 100644 --- a/doc/emacs/vc1-xtra.texi +++ b/doc/emacs/vc1-xtra.texi @@ -482,20 +482,17 @@ do and do not exist. In other words, the file or directory the current buffer visits probably exists in other working trees too, and this command lets you switch to those versions of the file. -@c FIXME: It would be better to use @kbd{=} from a *vc-change-log* -@c buffer as the example here, because 'C-x v =' and 'C-x v D' are more -@c likely to be uncommitted changes on which you'd use 'C-x v w a'. -@c That requires a new node for bindings available in *vc-change-log*s. @kbd{C-x v w w} also works in Diff mode (@pxref{Diff Mode}) and Log View -mode (@pxref{Old Revisions}). Instead of switching to a different +mode (@pxref{VC Change Log}). Instead of switching to a different buffer, the command changes the default directory of the buffer to the corresponding directory under another working tree. This is -particularly useful with Diff mode buffers generated by VC commands, -such as @kbd{C-x v =} and @kbd{C-x v D} (@pxref{Old Revisions}). You -can use @kbd{C-x v w w} and then standard Diff mode commands like -@w{@kbd{C-c C-a}} (@code{diff-apply-hunk}) and @kbd{C-c RET C-a} -(@code{diff-apply-buffer}) to apply hunks from one working tree to -another. +particularly useful from Log View mode buffers generated by commands +like @kbd{C-x v L} (@pxref{VC Change Log}). After using @kbd{C-x v w w} +to change the default directory of the Log View buffer, you can move +point to a revision of interest and type @kbd{=} (@code{log-view-diff}) +to open a Diff mode buffer with that revision's changes. Then you can +use standard Diff mode commands like @w{@kbd{C-c C-a}} +(@code{diff-apply-hunk}) to apply hunks to the other working tree. @kindex C-x v w k @findex vc-kill-other-working-tree-buffers commit b5cf0786a2fe4b31e2528bc14c5f1252662fc768 Author: Sean Whitton Date: Wed Oct 1 20:51:57 2025 +0100 New command vc-kill-other-working-tree-buffers * lisp/vc/vc.el (vc-kill-other-working-tree-buffers): New command. * lisp/vc/vc-hooks.el (vc-prefix-map): Bind it. * doc/emacs/vc1-xtra.texi (Other Working Trees): * etc/NEWS: Document it. diff --git a/doc/emacs/vc1-xtra.texi b/doc/emacs/vc1-xtra.texi index 1a7d65937c0..70a60202ff5 100644 --- a/doc/emacs/vc1-xtra.texi +++ b/doc/emacs/vc1-xtra.texi @@ -436,6 +436,9 @@ Add a new working tree. @item C-x v w w Visit this file or directory in another working tree. +@item C-x v w k +Kill buffers visiting this file in other working trees. + @item C-x v w s Invoke @kbd{C-x p p} (@code{project-switch-project}) but limited to other working trees. @@ -494,6 +497,16 @@ can use @kbd{C-x v w w} and then standard Diff mode commands like (@code{diff-apply-buffer}) to apply hunks from one working tree to another. +@kindex C-x v w k +@findex vc-kill-other-working-tree-buffers +After using @kbd{C-x v w w} in file-visiting buffers you will have +multiple buffers visiting identically named files (@pxref{Uniquify}). +You can kill all but one of these buffers by typing @kbd{C-x v w k} +(@code{vc-kill-other-working-tree-buffers}). This command kills buffers +visiting versions of the current buffer's file in other working trees, +preserving the current buffer. It does not work in non-file-visiting +buffers. + @kindex C-x v w s @findex vc-working-tree-switch-project An alternative way to switch between working trees is @kbd{C-x v w s} diff --git a/etc/NEWS b/etc/NEWS index 7f342bb7e48..6f193752a3e 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2178,6 +2178,7 @@ other working trees: - 'C-x v w c': Add a new working tree. - 'C-x v w w': Visit this file in another working tree. +- 'C-x v w k': Kill buffers visiting this file in other working trees. - 'C-x v w s': Like 'C-x p p' but limited to other working trees. - 'C-x v w a': Copy or move fileset changes to another working tree. - 'C-x v w A': Copy or move all changes to another working tree. diff --git a/lisp/files.el b/lisp/files.el index 8cfbdc79bf0..98e723aa2e1 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -5110,8 +5110,8 @@ However, the mode will not be changed if This also renames the buffer to correspond to the new file. The next time the buffer is saved it will go in the newly specified file. FILENAME nil or an empty string means mark buffer as not visiting any file. -Remember to delete the initial contents of the minibuffer -if you wish to pass an empty string as the argument. +When calling interactively, remember to delete the initial contents of +the minibuffer if you wish to pass an empty string as the argument. The optional second argument NO-QUERY, if non-nil, inhibits asking for confirmation in the case where another buffer is already visiting FILENAME. diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el index da67f7f1815..2972f139d06 100644 --- a/lisp/vc/vc-hooks.el +++ b/lisp/vc/vc-hooks.el @@ -968,6 +968,7 @@ In the latter case, VC mode is deactivated for this buffer." "!" #'vc-edit-next-command "w c" #'vc-add-working-tree "w w" #'vc-switch-working-tree + "w k" #'vc-kill-other-working-tree-buffers "w s" #'vc-working-tree-switch-project "w x" #'vc-delete-working-tree "w R" #'vc-move-working-tree diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index f85289ef90a..9ae64d08742 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -4886,6 +4886,24 @@ MOVE non-nil means to move instead of copy." (message "Changes %s to `%s'" (if move "moved" "applied") directory))) +;;;###autoload +(defun vc-kill-other-working-tree-buffers (backend) + "Kill buffers visiting versions of this file in other working trees. +BACKEND is the VC backend. + +This command kills the buffers that \\[vc-switch-working-tree] switches to, +except that this command works only in file-visiting buffers." + (interactive (list (vc-responsible-backend default-directory))) + (when (cdr uniquify-managed) + (cl-loop with trees = (vc-call-backend backend + 'known-other-working-trees) + for item in uniquify-managed + for buf = (uniquify-item-buffer item) + when (and (not (eq buf (current-buffer))) + (cl-find (uniquify-item-dirname item) trees + :test #'file-in-directory-p)) + do (kill-buffer buf)))) + (defun vc-default-cherry-pick-comment (files rev reverse) (if reverse (format "Summary: Reverse-apply changes from revision %s\n\n" rev) commit 6a8fda1f3396da8340430609ae687abf85765c8b Author: Renato Ferreira Date: Wed Oct 1 12:44:33 2025 +0200 Fix process name matching in 'tramp-process-running-p' * lisp/net/tramp.el (tramp-process-running-p): Use 'compare-strings' for matching PROCESS-NAME with process command. (Bug#79545) Copyright-paperwork-exempt: yes diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index c72ccc1738f..c752c24db09 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -6901,7 +6901,7 @@ verbosity of 6." ;; The returned command name could be truncated ;; to 15 characters. Therefore, we cannot check ;; for `string-equal'. - ((string-prefix-p comm process-name)) + ((eq t (compare-strings comm 0 15 process-name 0 15))) ((throw 'result t))))))))) ;; When calling "emacs -Q", `auth-source-search' won't be called. If commit 889ae269b0c3bd91d5af34bbc417f91815cd8137 Author: Sean Whitton Date: Wed Oct 1 11:27:25 2025 +0100 ; project-prompt-project-name: Fix pcase usage. diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index e4e17e6a4c4..43274e01845 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -2272,8 +2272,8 @@ If ALLOW-EMPTY is non-nil, it is possible to exit with no input." while (and (not allow-empty) (equal pr-name ""))) (pcase pr-name ("" "") - (dir-choice (read-directory-name "Select directory: " - default-directory nil t)) + ('dir-choice (read-directory-name "Select directory: " + default-directory nil t)) (_ (let ((proj (assoc pr-name choices))) (if (stringp proj) proj (project-root (cdr proj)))))))) commit c24e173c9cb464e675200e75d4be25ece1d1cc41 Author: Sean Whitton Date: Wed Oct 1 11:26:18 2025 +0100 vc-add-working-tree: Finish by starting Dired There won't be any uncommitted changes in the new working tree yet, so vc-dir is unlikely to be useful. * lisp/vc/vc.el (vc-add-working-tree): Finish by calling 'dired' not 'vc-dir'. * test/lisp/vc/vc-tests/vc-tests.el (vc-test--other-working-trees): Delete stubbing out 'vc-dir'. diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 821be767f81..f85289ef90a 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -4574,7 +4574,7 @@ When called from Lisp, BACKEND is the VC backend." (when-let* ((p (project-current nil directory))) (project-remember-project p)) - (vc-dir directory backend)) + (dired directory)) (defvar project-prompter) diff --git a/test/lisp/vc/vc-tests/vc-tests.el b/test/lisp/vc/vc-tests/vc-tests.el index e49b4edf122..f61de1ac5d1 100644 --- a/test/lisp/vc/vc-tests/vc-tests.el +++ b/test/lisp/vc/vc-tests/vc-tests.el @@ -724,18 +724,14 @@ This checks also `vc-backend' and `vc-responsible-backend'." (log-edit-done)) ;; Set up the second working tree. - ;; Stub out `vc-dir' so that it doesn't start a - ;; background update process which won't like it when we - ;; start moving directories around. ;; For the backends which do additional prompting (as ;; specified in the API for this backend function) we ;; need to stub that out. - (cl-letf (((symbol-function 'vc-dir) #'ignore)) - (cl-ecase backend - (Git (cl-letf (((symbol-function 'completing-read) - (lambda (&rest _ignore) ""))) - (vc-add-working-tree backend second))) - (Hg (vc-add-working-tree backend second))))) + (cl-ecase backend + (Git (cl-letf (((symbol-function 'completing-read) + (lambda (&rest _ignore) ""))) + (vc-add-working-tree backend second))) + (Hg (vc-add-working-tree backend second)))) ;; Test `known-other-working-trees'. (with-current-buffer (find-file-noselect tmp-name) commit 217fd4f09ea7786b205c4766e750f7011242e479 Author: Eli Zaretskii Date: Sat Sep 27 17:09:44 2025 +0300 ; * doc/lispref/modes.texi (Defining Minor Modes): Fix last change. diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index c5c6c10a6fa..28941647487 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi @@ -1861,9 +1861,10 @@ marking the @code{define-minor-mode} form as autoloaded. @item :init-value @var{init-value} This is the value to which the @var{mode} variable is initialized. Except in unusual circumstances (see below), this value must be -@code{nil}. If the mode is global (see below), and the initial value is -@code{t}, i.e., the mode is turned on by default, you should consider -forcing Emacs to run the mode function at startup, like this: +@code{nil}. If the mode is global (see below) and preloaded, and the +initial value is @code{t}, i.e., the mode is turned on by default, you +should consider forcing Emacs to run the mode function at startup, like +this: @lisp :initialize #'custom-initialize-delay