* doc/emacs/maintaining.texi (VC With A Merging VCS)
(VC With A Locking VCS): Update text about 'C-x v v' with mixed
file statuses.
* etc/NEWS: Announce the recent improvements.
Sean Whitton [Sun, 8 Jun 2025 10:25:17 +0000 (11:25 +0100)]
vc-next-action: On mixed state sets, treat missing files as removed
* lisp/vc/vc.el (vc-only-files-state-and-model, vc-next-action):
Add the 'missing' state to the set of compatible states for
mixed state actions. This means you can commit removals of
files without first moving them to the 'removed' state.
* lisp/whitespace.el (whitespace-display-char-on): Copy from
'standard-display-table' if 'buffer-display-table' is nil. This
avoids overwriting display-table customizations by features that
modify 'standard-display-table' for global effects. (Bug#78522)
Sean Whitton [Fri, 6 Jun 2025 10:52:32 +0000 (11:52 +0100)]
New revert-files VC backend function for faster mass reverts
* lisp/vc/vc-git.el (vc-git-revert-files):
* lisp/vc/vc-hg.el (vc-hg-revert-files):
* lisp/vc/vc.el (vc-revert-files): New functions.
(vc-revert-files): Incorporate vc-revert's calls to message here
so that the messages are displayed more consistently.
(vc-next-action, vc-default-checkin-patch, vc-revert): Use
vc-revert-files instead of vc-revert-file.
Dmitry Gutov [Fri, 6 Jun 2025 02:38:55 +0000 (05:38 +0300)]
project-switch-to-buffer: Don't disambiguate too much
* lisp/progmodes/project.el (project--read-project-buffer):
Use the new function from 'uniquify' to generate buffer names that
are just unique to the current project, not globally (bug#77312).
Spencer Baugh [Thu, 27 Mar 2025 13:32:47 +0000 (09:32 -0400)]
Add uniquify-get-unique-names (bug#77312)
This new function provides an interface to uniquify.el which doesn't
change the actual names of the buffers. This is useful for any commands
which deal with a subset of all buffers; for example, project.el.
Fix function arity check for noncompiled callees (bug#78685)
This is a regression from Emacs 29.
* lisp/emacs-lisp/bytecomp.el (byte-compile-fdefinition):
Make it work for functions that aren't compiled.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--f):
(bytecomp-tests--warn-arity-noncompiled-callee): Add test.
Sean Whitton [Fri, 30 May 2025 12:32:00 +0000 (13:32 +0100)]
Delay running vc-checkin-hook for an async checkin
* lisp/vc/vc-git.el (vc-git-checkin):
* lisp/vc/vc-hg.el (vc-hg-checkin, vc-hg-checkin-patch): Run
vc-checkin-hook using vc-run-delayed.
* lisp/vc/vc.el (vc-checkin): Don't pass vc-checkin-hook to
vc-start-logentry when doing an async checkin. That runs the
hook too early.
* lisp/outline.el: Prefer #' to quote function names.
(outline--end-of-previous): New function, extracted from
`outline-end-of-subtree`.
(outline-end-of-subtree): Use it.
(outline--hidden-headings-paths): Distinguish headings where just the
entry is hidden from those where a whole subtree is hidden (bug#78673).
(outline--hidden-headings-restore-paths): Adjust accordingly and don't
delegate to functions like `outline-hide-subtree` so as to avoid
an O(N²) behavior.
Sean Whitton [Wed, 4 Jun 2025 12:11:14 +0000 (13:11 +0100)]
Factor out vc--with-backend-in-rootdir
* lisp/vc/vc.el (vc--with-backend-in-rootdir): New macro.
(vc-root-version-diff, vc-diff-mergebase, vc-root-diff)
(vc-print-root-log, vc-log-mergebase): Use it.
(vc-log-incoming, vc-log-outgoing): Use it here too in order to
prompt for a directory if current buffer is not VCS-controlled.
Juri Linkov [Wed, 4 Jun 2025 06:49:01 +0000 (09:49 +0300)]
* lisp/tab-line.el: Remove unnecessary checks for nil event.
(tab-line-hscroll-right, tab-line-hscroll-left)
(tab-line-switch-to-prev-tab, tab-line-switch-to-next-tab)
(tab-line-close-tab, tab-line-close-other-tabs):
Remove '(consp event)' to use the window returned by
'(posn-window (tab-line-event-start event))' even in case
when 'event' is nil.
Juri Linkov [Tue, 3 Jun 2025 15:41:01 +0000 (18:41 +0300)]
Restore c-ts-common-comment-setup in js-ts-mode and typescript-ts-mode.
* lisp/progmodes/js.el (js-ts-mode):
* lisp/progmodes/typescript-ts-mode.el (typescript-ts-base-mode):
Add 'c-ts-common-comment-setup' back removed in 8bccccedb65a
since it does more than setting comment variables (bug#78680).
shipmints [Tue, 4 Mar 2025 14:56:56 +0000 (09:56 -0500)]
Fix ns_make_monitor_attribute_list (bug#76691)
This is the NS implementation for 'display-monitor-attributes-list'.
Change implementation from IORegistry to direct introspection
of NSScreen.
* src/nsfns.m (ns_make_monitor_attribute_list): Use localizedName
selector on NSScreen. For anonymous displays, synthesize names
of the form ("%dx%d@%d,%d" width height x y).
(ns_get_name_from_ioreg) (ns_screen_name): Removed.
Michael Albinus [Mon, 2 Jun 2025 09:44:43 +0000 (11:44 +0200)]
Tramp: Do not raise an error when not connected (Bug#78572)
* lisp/net/tramp-cmds.el (tramp-cleanup-connection):
Use read syntax #' for `tramp-timeout-session',
* lisp/net/tramp.el (tramp-barf-if-file-missing): Do not raise an error
when not connected. (Bug#78572)
(tramp-file-name-handler): Do not force the backtrace.
(tramp-connectable-p): Check also, whether initial handshake is finished.
(tramp-skeleton-directory-files)
(tramp-skeleton-directory-files-and-attributes)
(tramp-skeleton-set-file-modes-times-uid-gid): Rearrange sending
`file-missing' error.
(tramp-handle-access-file, tramp-handle-unlock-file):
Use `tramp-connectable-p'.
Fontificatiomn improvements for typescrip-ts-mode.el (bug#78594)
- Fontify type-names for static function calls directly on types.
- Special-case "document" and "console" and constants/builtins.
- Fontify variable-use in string-interpolation expressions.
- Fontify variable-use in function-calls.
- Fontify variable-use in member-access expressions.
- Fontify variable-use in JSX-expressions.
- Fontify variable-use when using explicit nullability override.
Sean Whitton [Sun, 1 Jun 2025 10:55:27 +0000 (11:55 +0100)]
New incoming-revision VC backend action
* lisp/vc/vc.el: New incoming-revision backend action (bug#62940).
* lisp/vc/vc-git.el (vc-git--fetch-incoming): New function,
factored out of vc-git-log-incoming.
(vc-git-log-incoming): Use it.
(vc-git-incoming-revision):
* lisp/vc/vc-hg.el (vc-hg-incoming-revision): New functions.
Stefan Monnier [Sat, 31 May 2025 17:29:05 +0000 (13:29 -0400)]
(load-path-filter-cache-directory-files): Filter only for `must-suffix`
Most loads set the `must-suffix` (e.g. `require and
`autoload-do-load`), but some don't (e.g. `load-library`).
This results in two separate entries in
`load-path-filter--cache` with two hash-tables. The entry for
`must-suffix=nil` is larger and much less often used than the
other, so just skip filtering when `must-suffix=nil`.
Reduces the memory size of the cache from ~1MB to ~400kB in my
test case.
* lisp/startup.el (load-path-filter-cache-directory-files):
Don't use a filtering cache when `must-suffix` is nil.
* lisp/net/tramp-smb.el (tramp-smb-errors): Add string.
(tramp-smb-winexe-program): Adapt docstring.
(tramp-smb-handle-copy-directory, tramp-smb-handle-file-acl)
(tramp-smb-handle-set-file-acl, tramp-smb-maybe-open-connection):
Simplify argument handling.
(tramp-smb-handle-process-file): Flush " process-exit-status" property.
(tramp-smb-call-winexe): Set $winsize.Width to 102 only.
* lisp/net/tramp.el (tramp-process-sentinel): Adapt docstring.
Set " process-exit-status" property.
* test/lisp/net/tramp-tests.el (tramp--test-enabled):
Make it more robust.
(tramp-test18-file-attributes)
(tramp-test26-interactive-file-name-completion)
(tramp-test26-file-name-completion-boundaries)
(tramp-test35-remote-path): Adapt tests.
Eli Zaretskii [Sat, 31 May 2025 12:09:42 +0000 (15:09 +0300)]
Remove unused user options in sh-script.el
* lisp/progmodes/sh-script.el (sh-indent-comment)
(sh-first-lines-indent, sh-indent-for-else): Remove variables that
are no longer obeyed.
(sh-var-list): Likewise. (Bug#78592)