1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-11 14:01:43 -08:00
Commit graph

180558 commits

Author SHA1 Message Date
Rudolf Adamkovič
985e942d1c hi-lock: Use active region for default values in more places
* lisp/hi-lock.el (hi-lock-line-face-buffer, hi-lock-face-buffer)
(hi-lock-face-phrase-buffer): Use the new function
`hi-lock-read-regexp' to read font-lock patterns, mirroring
`hi-lock-read-face-name' used to read face names.  For end users,
all three functions now get the default value from the active
region, rather than just `hi-lock-face-buffer'.
(hi-lock-read-regexp): Extract font-lock pattern reading
functionality from `hi-lock-face-buffer' into this function, to
mirror how faces are read with `hi-lock-read-face-name' and to
promote reuse.  (Bug#79976)
2025-12-20 14:21:42 +02:00
Michael Albinus
9e16010686 Fix problem in Tramp completion
* lisp/net/tramp.el (tramp-completion-handle-expand-file-name):
Expand FILENAME also when it is absolute.  (Bug#80031)
2025-12-20 08:58:26 +01:00
Eli Zaretskii
54eae320f5 ; * lisp/vc/vc-git.el (vc-git-registered): Fix remote files (bug#80035). 2025-12-20 09:47:39 +02:00
Paul Eggert
4d11449c96 Revert to simpler (and we hope faster) TAGGEDP
Suggested by Mattias Engdegård (bug#80021#17).
* src/lisp.h (lisp_h_FIXNUMP, lisp_h_TAGGEDP):
Go back to the simpler (X&7) == TAG approach for checking object tags.
This reverses my commit ccdb08ef4e
“Improve performance of CONSP, FIXNUMP, etc.”
dated 2018-08-25 13:39:18 -0700,
though it keeps the TAGGEDP function the older commit introduced.
Although the older commit improved performance on its circa 2010
platform, when I ran today’s ‘make -C lisp compile-always’
benchmark on Ubuntu 25.10 which uses gcc (Ubuntu 15.2.0-4ubuntu4)
on an circa-2021 Intel Xeon W-1350, this patch makes the
‘make -C lisp compile-always’ benchmark 3.1% faster.  Although the
patch unfortunately also makes the Emacs text segment 0.6% larger,
in this case speed and simplicity beat text size in importance.
2025-12-19 09:10:31 -08:00
Gerd Möllmann
a6c2ae3a3f Don't make tty child frames visible when selected (bug#80020)
* src/frame.c (do_switch_frame): Don't change visibility of tty
child frames.
(Fraise_frame): Doc string fix.
2025-12-19 14:12:33 +01:00
João Távora
cfb4bace26 ; Eglot: mention relativePatternSupport in /etc/EGLOT-NEWS
* etc/EGLOT-NEWS (Changes to upcoming Eglot): Mention
relativePatternSupport.
2025-12-19 09:43:53 +00:00
Eli Zaretskii
4fe28df3cd ; * lisp/progmodes/project.el (vc-git-project-list-files): Fix a typo. 2025-12-19 09:56:58 +02:00
Paul Eggert
5e6df127a9 Fix ‘make compile-always’ with native compilation
Without the fix, ‘make compile-always’ failed nearly immediately
in a native compilation build, with ‘ELC+ELN
emacs-lisp/loaddefs-gen.elc’ outputting “Error: file-missing
("Cannot open load file" "No such file or directory" "comp")...”.
* lisp/Makefile.in (compile-always):
Build ../src first, since the ‘find ... -delete’ removes files
needed by ‘make compile’.
2025-12-18 22:17:45 -08:00
Paul Eggert
f6f85dd3be Remove stray references to $(LOADDEFS)
They became obsolete some time ago.
* lisp/Makefile.in (compile, compile-one-process):
Don’t depend on $(LOADDEFS).
2025-12-18 22:17:45 -08:00
Dmitry Gutov
976e3d3d51 Merge remote-tracking branch 'origin/master' 2025-12-19 02:52:29 +02:00
João Távora
4cc4c9cffc ; Eglot: fix oversight and add back essential delete-dups
Else will make a number of file-notify descriptors proportional to
the number of files in a directory (though this doesn't apply to
out-of-root watchers).

* lisp/progmodes/eglot.el (eglot--watch-globs): Tweak.
2025-12-19 00:48:38 +00:00
João Távora
ee481d30f9 Eglot: remove "face" suffix for semtok-specific faces
* lisp/progmodes/eglot.el (eglot--semtok-define-things)
(eglot--semtok-decode-token): Remove "face" suffix for semtok faces.
2025-12-19 00:48:38 +00:00
Dmitry Gutov
500f1478f7 Re-introduce fallback to 'find' for extra ignores with older Git
* lisp/progmodes/project.el (vc-git-project-list-files):
Fall back to 'find' when Git is older than 1.13 and EXTRA-IGNORES
is non-nil (bug#79809).
2025-12-19 02:47:36 +02:00
Dmitry Gutov
de5b8c70fb Revert "vc-git-project-list-files: Restore support for Git < 2.13"
This reverts commit 821c0d36df.

Despite re-enacting what the modern Git versions seem to do under the
covers, the effect is not the same: filtering works differently.
2025-12-19 02:26:59 +02:00
Sean Whitton
83e8acf19a ; * etc/NEWS: Fix last change. 2025-12-18 21:51:15 +00:00
Sean Whitton
f9172be29a Make VC-Dir's 'd' able to delete unregistered files
* lisp/vc/vc.el (vc-delete-file): Simplify.
* lisp/vc/vc-dir.el (vc-dir-delete-file): Handle deleting
unregistered files, too.
(vc-dir-menu-map, vc-dir-mode-map): Replace bindings for
vc-dir-clean-files with ones for vc-dir-delete-file.
* doc/emacs/maintaining.texi (VC Directory Commands):
* etc/NEWS: Document the bindings change.
2025-12-18 21:46:49 +00:00
Sean Whitton
1cd6428bce ; * lisp/vc/vc-dir.el (vc-dir-menu-map): Delete obsolete comment. 2025-12-18 21:43:57 +00:00
João Távora
998584eaad Eglot: fallback to project-files if no 'find' available (bug#79809)
When find-based directory listing fails, fallback to project-files
strategy for robustness.

* lisp/progmodes/eglot.el (eglot--watch-globs): Inline directory
listing and add error handling with fallback.  Rename BASE-PATH to DIR,
add IN-ROOT parameter.
(eglot--list-directories): Delete
(eglot-register-capability): Adjust caller, group by both DIR and
IN-ROOT.
2025-12-18 17:04:01 +00:00
Sean Whitton
bd6bb96220 vc-diff-internal: Call into backend with old current buffer
* lisp/vc/vc.el (vc-diff-internal): Call into the backend with
the original current buffer, not BUFFER (see bug#80005).
2025-12-18 17:01:57 +00:00
Sean Whitton
94aab3b602 ; * lisp/vc/vc-git.el (vc-git-region-history): Fix backend name. 2025-12-18 13:06:19 +00:00
Sean Whitton
495843d9eb ; cond* docs: Update match* operator name to cdr-ignore (bug#79998). 2025-12-18 10:48:12 +00:00
Dmitry Gutov
75a1403ff3 Fix "No such file or directory" "vc-nil" in project-files
* lisp/progmodes/project.el (project-files):
Fix vc-nil backend error (bug#80013).
2025-12-18 03:48:58 +02:00
F. Jason Park
22719d64e9 ; Tweak failing autojoin display-context test for ERC
* test/lisp/erc/erc-scenarios-join-display-context.el
(erc-scenarios-join-display-context--errors): Attempt to indirectly fix
a reoccurring failure on EMBA.  Instead of asserting the membership of
`erc-join--requested-channels', have the client attempt to manually join
an autojoined channel previously denied by an error response.  But this
time assert that the display context for the now successfully joined
channel doesn't indicate it originated from the autojoin module.
* test/lisp/erc/resources/base/gapless-connect/barnet.eld: Increase
timeout.
* test/lisp/erc/resources/join/buffer-display/mode-context.eld: Update
accordingly.
2025-12-17 17:36:42 -08:00
Dmitry Gutov
821c0d36df vc-git-project-list-files: Restore support for Git < 2.13
* lisp/progmodes/project.el (vc-git-project-list-files):
Restore support for Git < 2.13 (discussed in bug#79809).
2025-12-18 01:43:28 +02:00
Sean Whitton
7425e33287 New M-RET, M-p, M-n commands in Log View mode
* lisp/vc/log-view.el (log-view-msg-and-diff-next)
(log-view-msg-and-diff-prev, log-view-display-entry-and-diff):
New commands.
(log-view-mode-map): Bind them.
* doc/emacs/maintaining.texi (VC Change Log):
* etc/NEWS: Document them.
2025-12-17 13:22:39 +00:00
Sean Whitton
7844710e87 log-view-toggle-entry-display: Don't deactivate the mark
* lisp/vc/log-view.el (log-view-toggle-entry-display): Bind
inhibit-read-only instead of buffer-read-only.  Bind
deactivate-mark to nil.
2025-12-17 13:21:37 +00:00
Sean Whitton
6d7ff7478f ; Log View beg and end of defun functions: Style improvements. 2025-12-17 13:20:50 +00:00
Eli Zaretskii
b7601bfb70 Fix 'mode-line-format-right-align' in Olivetti mode
* lisp/bindings.el (mode--line-format-right-align): Account for
the left fringe.  (Bug#80019)
2025-12-17 15:14:25 +02:00
Sean Whitton
0c7420fe38 ; * lisp/bookmark.el (bookmark-after-load-file-hook): Fix quotation. 2025-12-17 12:43:00 +00:00
Liu Hui
f26068dac7 calendar-mode-line-format: Fix regexp
* lisp/calendar/calendar.el (calendar-mode-line-format): Replace
'*' with '\\*'.
(calendar-get-buffer, calendar-exit):
* lisp/calendar/diary-lib.el (diary-mark-entries): Improve
comment and doc string.
2025-12-17 12:43:00 +00:00
João Távora
f0912d5cb0 Eglot: speed up file watching outside project (bug#79809)
Use find-based directory listing when watching outside project root,
avoiding the expensive delete-dups/file-name-directory/project-files
combo.

* lisp/progmodes/eglot.el (eglot--list-directories): New helper.
(eglot--watch-globs): Use it for directories outside project root.
2025-12-17 12:06:07 +00:00
Sean Whitton
a8b9f2daf1 ; * etc/NEWS: Elisp -> Lisp. 2025-12-17 12:02:33 +00:00
Stéphane Marks
d76e61d218 New bookmark-after-load-file-hook (bug#80003)
* lisp/bookmark.el (bookmark-after-load-file-hook): New
defcustom (bug#80003).
(bookmark-load): Call the new hook.
* etc/NEWS: Announce the new hook.
2025-12-17 12:01:29 +00:00
Stéphane Marks
91d4120289 ; lisp/saveplace.el, etc/NEWS: Refinements to bug#75837. 2025-12-17 11:58:05 +00:00
Stéphane Marks
2b1440946e New optional recentf autosave timer (bug#80002)
* etc/NEWS: Announce the new user option.
* lisp/recentf.el (recentf-auto-cleanup): When canceling the
auto-cleanup timer, set recentf-auto-cleanup-timer to nil to
avoid false positive timerp.
(recentf-autosave-interval): New defcustom.
(recentf--autosave-timer, recentf--cancel-autosave-timer)
(recentf--manage-autosave-timer): New defun.
(recentf-mode): Call recentf--manage-autosave-timer.
2025-12-17 11:57:26 +00:00
Christoph Wedler
14f16535ed Fix init of auto/not-auto buffer-local vars in antlr-mode
* progmodes/antlr-mode.el (antlr-mode): Fix initialization of
variables, some are actually auto buffer-local and others not.
Patch by Arash Esbati <arash@gnu.org>.
2025-12-17 12:27:46 +01:00
João Távora
118b88dd22 Eglot: fix thinko, group file watchers by base URI (bug#79809)
It's fairly important to do this to reduce both the number of
file-notify watches and the number of expensive project-files among
"watcher" items pertaining to the same baseUri.

* lisp/progmodes/eglot.el (eglot--watch-globs): Rename from
eglot--watch-glob.  Accept list of compiled glob/kind pairs.
(eglot-register-capability): Group watchers by base-path before
setting up watches.
2025-12-17 10:01:00 +00:00
Michael Albinus
57f66bfa6c ; Fix last change in tramp-tests.el
* test/lisp/net/tramp-tests.el (tramp-test29-start-file-process)
(tramp-test30-make-process): Adapt tests.
2025-12-17 07:36:49 +01:00
Sean Whitton
26dcbd06ed Fix outgoing diff commands including uncommitted changes
* lisp/vc/vc-hooks.el (vc-symbolic-working-revision): Don't
return nil when passed a directory if also passed a backend.
* lisp/vc/vc.el (vc-diff-outgoing): Pass backend to
vc-symbolic-working-revision.
2025-12-16 21:52:05 +00:00
João Távora
2b942c929e Eglot: fix last change about relativePatternSupport (bug#79809)
According to the spec, glob patterns are matched against relative paths
when server provides a RelativePattern baseUri.  Else match the glob
against the absolute path as usual.

* lisp/progmodes/eglot.el (eglot--watch-glob): Tweak
2025-12-16 21:20:06 +00:00
João Távora
06f31dc2d6 Eglot: support relativePatternSupport for file watching (bug#79809)
Announce relativePatternSupport capability.  Parse RelativePattern
objects with baseUri and pattern fields.  Add defvar
eglot-watch-files-outside-project-root to control filtering.

Rewrote file watching implementation.  Key by registration ID instead of
directory.  Each LSP watchers item spawns directory watchers
indenpendently that will look for the associated pattern only.

This change needs (or at least is known to work more efficiently) with
the latest project.el, so we should bump it.

* lisp/progmodes/eglot.el (eglot-client-capabilities): Announce
relativePatternSupport for didChangeWatchedFiles.
(eglot-lsp-server): Change file-watches slot to ID-keyed structure.
(eglot-watch-files-outside-project-root): New defvar.
(eglot--watch-glob): New function.
(eglot-register-capability): Rewrite.
(eglot-unregister-capability): Simplified for ID-keyed structure.
(eglot--on-shutdown): Update watch cleanup.
2025-12-16 17:58:32 +00:00
Michael Albinus
645a6ba081 Document and test process filters in tramp-smb.el
* doc/misc/tramp.texi (Remote processes): Provide more details in
"Running remote processes on MS Windows hosts".

* test/lisp/net/tramp-tests.el (tramp-test29-start-file-process)
(tramp-test30-make-process): Adapt tests.
2025-12-16 18:33:56 +01:00
Przemysław Kryger
62ce890c9f Mark less important package-vc-tests as expensive
* test/lisp/emacs-lisp/package-vc-tests.el
(package-vc-test-deftest): Add support for `:tags' keyword.
(upgrade, upgrade-all, upgrade-all-after-require, rebuild)
(prepare-patch, log-incoming, pkg-spec-info-manual): Mark as
`:expensive-test'.
2025-12-16 17:38:53 +01:00
Przemysław Kryger
60c8f3e8ad Fix package-vc-tests failing when no install-info is available
* test/lisp/emacs-lisp/package-vc-tests.el
(pkg-spec-make-shell-command): Rename from
`pkg-spec-doc-make-shell-command'.  Remove assertions related to
info manual installation.
(pkg-spec-info-manual): Add tests for info manual installation.
2025-12-16 17:38:23 +01:00
Liu Hui
d22dd26fc7 Improve support for non-default calendar buffer (bug#79994)
* lisp/calendar/calendar.el (calendar-get-buffer): New function.
(calendar-mode-line-format): Support displaying non-default
calendar buffer name.
(calendar-exit): Handle non-default calendar buffer separately.
(calendar-generate-window): Update mode-line after cursor
motion (bug#79994).
(calendar-redraw, calendar-update-mode-line, calendar-unmark)
(calendar-mark-visible-date):
* lisp/calendar/cal-hebrew.el (calendar-hebrew-mark-date-pattern)
(calendar-hebrew-list-yahrzeits):
* lisp/calendar/diary-lib.el (diary-mark-sexp-entries)
(calendar-mark-days-named, calendar-mark-date-pattern)
(calendar-mark-1): Replace 'calendar-buffer' with the new
function or current calendar buffer.
(diary-mark-entries): Record current calendar buffer (bug#79994).
2025-12-16 11:58:29 +00:00
Stefan Monnier
0eec0d5174 (cconv-make-interpreted-closure): Be more conservative
We can't use `cconv-make-interpreted-closure` until it's
compiled because it would get called in an infinite recursion.
The same holds for a lof of the code needed to compute the interpreted
closures used during the computation of `cconv-make-interpreted-closure`.
We used to work around this inf-loop in `loadup.el` with a hack
that checks if two specific functions have been compiled.

In practice that worked well enough in normal use, but was brittle
if you ever tried to load `cconv.el`, or Edebug or `M-C-x` that code
for whatever reason.  So we replace it with a more conservative
approach which just short-circuits any recursive invocation.
It makes it conservative in that it will sometimes redirect the call
to the "dumb" `make-interpreted-closure` even though it would be able
to complete the call properly, but it should be infrequent
enough to be worth the added reliability.

* lisp/loadup.el: Simplify setting of
`internal-make-interpreted-closure-function`.

* lisp/emacs-lisp/cconv.el (cconv-make-interpreted-closure):
Avoid recursive invocations.
2025-12-15 22:04:50 -05:00
João Távora
4aff16bf9e Eglot: improve pull diagnostics support
* lisp/progmodes/eglot.el (eglot--diagnostics): Move up here.
(eglot--managed-mode): Use eglot--flymake-push.
(eglot-handle-notification): Simplify.
(eglot-flymake-backend): Simplify.
(eglot--flymake-pull): Rewrite.
(eglot--flymake-push): Tweak.

* etc/EGLOT-NEWS: Improve slightly.
2025-12-15 21:00:54 +00:00
Eli Zaretskii
45285a41d4 ; * lisp/simple.el (kill-visual-line): Fix a thinko in last change. 2025-12-15 18:23:53 +02:00
Michael Albinus
1b31023dab Finish process error buffer support in tramp-smb.el
* doc/misc/tramp.texi (Remote processes): Provide more details in
"Running remote processes on MS Windows hosts".

* lisp/net/tramp-smb.el (tramp-smb-handle-make-process):
Suppress lock files.

* test/lisp/net/tramp-tests.el (auto-revert-notify-watch-descriptor)
(auto-revert-remote-files, auto-revert-use-notify): Declare.  Set
proper values.
(tramp-test30-make-process): Adapt test.
2025-12-15 15:20:29 +01:00
Juri Linkov
1e9dca9ba2 * lisp/vc/vc.el (vc-diff-internal): Reuse the buffer object (bug#80005).
Instead of delaying hooks, set the variable 'buffer' to the buffer object
returned by 'get-buffer-create'.  This allows renaming the diff buffer
via 'diff-mode-hook'.
2025-12-15 09:22:33 +02:00