1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00
Commit graph

98574 commits

Author SHA1 Message Date
Gerd Möllmann
f782dd29fb ; * lisp/emacs-lisp/igc.el (igc-start-idle-timer): Add autoload cookie. 2025-09-07 17:17:48 +02:00
Helmut Eller
ff16f07274 Call mps_arena_step from a Lisp idle timer
* src/igc.c (Figc__arena_step): New defun.
(syms_of_igc): Register Sigc__arena_step.
* lisp/emacs-lisp/igc.el (igc-start-idle-timer): New.
(igc--idle-timer, igc--idle-delay, igc--step-interval)
(igc--predict-idle-time, igc--on-idle): New code for opportunistic Gc.
2025-09-06 20:15:56 +02:00
Gerd Möllmann
fa71ca0e22 Merge branch 'master' into feature/igc 2025-09-04 05:18:12 +02:00
Stefan Monnier
d314971e04 lisp/eshell/em-glob.el (eshell-glob-translate-alist): Don't quote lambda 2025-09-03 16:54:39 -04:00
Eshel Yaron
60a22185b7
Support completion category inheritance
* lisp/minibuffer.el (define-completion-category): New function.
(completion-category-get): New function, implements completion
category property lookup with (multiple) inheritance.
(completion-metadata-get, completion--styles)
(completion--cycle-threshold): Use it.
(completion-category-defaults): Mention it in docstring.
Remove entry for 'project-buffer' category, and instead...
* lisp/progmodes/project.el: ...have 'project-buffer' inherit
from 'buffer'.
* test/lisp/minibuffer-tests.el
(completion-category-inheritance): New test.
* etc/NEWS: Announce support for category inheritance.
2025-09-03 21:01:43 +02:00
Jonas Bernoulli
5f70ff65a7
Update to Transient v0.10.0-8-g5efa5c6e 2025-09-03 17:11:44 +02:00
João Távora
5db70442e5 Eglot: really fix bug#79259
The previous change actually introduced a bug in a closely
related but distinct place.  We need to address the off-by-one
in the 'substring' call, not the 'add-face-text-property'.

* lisp/progmodes/eglot.el (eglot--sig-info): Fixup.
2025-09-03 08:16:15 +01:00
Juri Linkov
2b9c7f9508 Make 'isearch-mode' more idempotent (bug#79368).
* lisp/isearch.el (isearch-mode): Don't override
'isearch--saved-local-map' when 'overriding-terminal-local-map'
was already set to 'isearch-mode-map' in a previous call.
(with-isearch-suspended): Don't call the function 'isearch-mode'
when the variable 'isearch-mode' is already non-nil.
2025-09-03 09:45:34 +03:00
Stefan Monnier
f97abe6200 (macroexp--obsolete-warning): Prefer %s
* lisp/emacs-lisp/macroexp.el (macroexp--obsolete-warning): `instead`
can be a list.
* lisp/dom.el (dom-text, dom-texts): Fix obsolescence declaration.
2025-09-02 15:10:25 -04:00
Spencer Baugh
f1a18e8411 Allow any thread to run native compilations
* lisp/emacs-lisp/comp-run.el (comp--run-async-workers): Don't
lock the native compilation process to a thread (bug#79228).
2025-09-02 18:06:37 +03:00
Eli Zaretskii
90350729be ; Improve error message in elisp-mode.el
* lisp/progmodes/elisp-mode.el
(elisp-flymake-byte-compile--executable): Improve the error message.
2025-09-02 17:45:46 +03:00
Sean Whitton
077a2e8f3b fileloop-next-file: Convert file-error to warnings
* lisp/fileloop.el (fileloop-next-file): Catch file-error and
convert to a delayed warning (bug#79356).
2025-09-02 15:44:00 +01:00
Eli Zaretskii
a6dd36e9b1 ; Fix last change
* lisp/progmodes/elisp-mode.el
(elisp-flymake-byte-compile-executable): Doc fix.
2025-09-02 14:05:14 +03:00
Spencer Baugh
45c5b636ce Add 'elisp-flymake-byte-compile-executable' defcustom
The correct Emacs executable to use for
'elisp-flymake-byte-compile' is not necessarily the running
Emacs.  For example, when editing trunk with Emacs 30,
various Lisp changes will cause spurious flymake warnings.
Add 'elisp-flymake-byte-compile-executable' to allow
customizing this.
* lisp/progmodes/elisp-mode.el
(elisp-flymake-byte-compile-executable)
(elisp-flymake-byte-compile--executable): Add.  (Bug#79342)
(elisp-flymake-byte-compile): Invoke
'elisp-flymake-byte-compile--executable'.

* etc/NEWS: Announce the change.
2025-09-02 13:58:46 +03:00
Michael Albinus
6ad8745833 Extend tramp-test26-interactive-file-name-completion
* lisp/net/tramp.el (tramp-get-completion-methods):
Use `tramp-compat-seq-keep'.

* test/lisp/net/tramp-tests.el (completions-max-height): Declare.
(tramp-test26-interactive-file-name-completion): Extend test.
2025-09-02 12:09:17 +02:00
Spencer Baugh
b953dc679c Revert "Avoid duplicating strings in pcm--merge-completions"
Revert "Avoid duplicating strings in pcm--merge-completions",
commit b511c38bba.  It broke
existing behavior, now covered by tests adding in this commit.

* lisp/minibuffer.el (completion-pcm--merge-completions):
* test/lisp/minibuffer-tests.el (completion-pcm-test-anydelim):
(completion-pcm-bug4219):
2025-09-01 17:12:42 -04:00
Philip Kaludercic
d2532a4ef0
Add new library 'timeout'
* lisp/emacs-lisp/timeout.el: Add the file.
* etc/NEWS: Mention the library.

See https://mail.gnu.org/archive/html/emacs-devel/2025-07/msg00520.html.
2025-09-01 22:31:01 +02:00
Mattias Engdegård
b52ccb997d ; * lisp/emacs-lisp/bytecomp.el (featurep): mistake in last change 2025-09-01 16:50:10 +02:00
Eli Zaretskii
9c21c11277 ; Improve documentation of 'treesit-enabled-modes'
* lisp/treesit.el (treesit-enabled-modes): Doc fix.

* doc/emacs/modes.texi (Choosing Modes): Extend and improve
wording of a recently-added text.
2025-09-01 17:35:38 +03:00
Sean Whitton
838e8e4140 New project-find-matching-buffer-function for diff-mode
* lisp/vc/diff-mode.el (project-root): Declare.
(diff-find-matching-buffer): New function.
(diff-mode): Use it.
* doc/emacs/vc1-xtra.texi (Other Working Trees): Document
'C-x v w w' in diff-mode buffers.
2025-09-01 15:27:57 +01:00
Mattias Engdegård
7c6de4fe73 * lisp/emacs-lisp/bytecomp.el (featurep): Safer comp-time evaluation 2025-09-01 12:09:50 +02:00
Sean Whitton
66ef930ebe Rename arg REMOTE-LOCATION -> UPSTREAM-LOCATION
* lisp/vc/vc-bzr.el (vc-bzr-log-incoming)
(vc-bzr-incoming-revision, vc-bzr-log-outgoing):
* lisp/vc/vc-git.el (vc-git-incoming-revision):
* lisp/vc/vc-hg.el (vc-hg-incoming-revision):
* lisp/vc/vc.el (vc-root-diff-incoming, vc-diff-incoming)
(vc-root-diff-outgoing, vc-diff-outgoing)
(vc-root-diff-outgoing-base, vc-diff-outgoing-base)
(vc-incoming-outgoing-internal, vc-remote-location-history)
(vc--incoming-revision, vc-log-incoming, vc-default-log-incoming)
(vc-log-outgoing, vc-default-log-outgoing): Rename arguments
REMOTE-LOCATION -> UPSTREAM-LOCATION.  Adjust strings.
(vc--maybe-read-remote-location): Rename ...
(vc--maybe-read-upstream-location): ... to this.
2025-09-01 09:41:40 +01:00
Sean Whitton
fa256f11ed VC outgoing commands for Git: Don't unconditionally fetch
* lisp/vc/vc-bzr.el (vc-bzr-incoming-revision):
* lisp/vc/vc-hg.el (vc-hg-incoming-revision):
* lisp/vc/vc.el (vc-diff-incoming, vc--incoming-revision): New
REFRESH optional argument.
(vc-default-log-incoming): Pass it.
* lisp/vc/vc-git.el (vc-git-incoming-revision): New REFRESH
optional argument.  When nil, use cached info (bug#62940).
2025-09-01 09:32:40 +01:00
Stefan Monnier
3c94ae5a37 (completion-file-name-table): Refine last fix
* lisp/minibuffer.el (completion-file-name-table): Don't
hardcode Tramp knowledge here.
2025-09-01 00:57:44 -04:00
Juri Linkov
1ba75cc6fc New user option 'tab-line-define-keys'
* lisp/tab-line.el (tab-line-define-keys): New defcustom.
(tab-line--define-keys, tab-line--undefine-keys):
New functions that explicitly bind commands from
'tab-line-mode-map' to 'ctl-x-map'.
(tab-line-mode-map): Leave this keymap empty by default
to avoid breaking 'ctl-x-map' (bug#79323).
(global-tab-line-mode): Call either 'tab-line--define-keys'
or 'tab-line--undefine-keys'.
2025-08-31 21:23:05 +03:00
Sean Whitton
0cd0aaa14f vc-revert: Fix calling vc-buffer-sync (bug#79319)
* lisp/vc/vc.el (vc-revert): Don't call vc-buffer-sync on a
non-file-visiting buffer (bug#79319).  Don't try to use memq to
compare strings.
2025-08-31 16:37:11 +01:00
Sean Whitton
11dc1420e4 * lisp/vc/vc.el (vc-revert): Tighten up save-some-buffers predicate. 2025-08-31 16:32:48 +01:00
Spencer Baugh
98fbaacac2 Allow entering the debugger on error in emacsclient connections
* lisp/server.el (server--process-filter-1): Use
'condition-case-unless-debug'.  (Bug#65897)
2025-08-31 09:44:53 +03:00
Eli Zaretskii
32d3c859f0 Fix EOL decoding in files extracted from ZIP archives
* lisp/arc-mode.el (archive-set-buffer-as-visiting-file): Don't
lose EOL conversion determined by 'decode-coding-region' from the
extracted file's data.  (Bug#79316)
2025-08-30 19:50:22 +03:00
Jeremy Bryant
b73d92c8b1 * lisp/saveplace.el (save-places-to-alist): Add doc string.
Replace previous comment and simplify wording by refering to
the function 'save-place-to-alist' being called on all
buffers.  (Bug#79340)
2025-08-30 19:14:58 +03:00
Eli Zaretskii
7efaa4657a Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2025-08-30 13:46:34 +03:00
Eli Zaretskii
73aac05cfd Fix "C-u C-h C-n"
* lisp/help.el (view-emacs-news): Widen the buffer before
re-narrowing it again to a different version.  (Bug#79324)
2025-08-30 13:45:07 +03:00
Sean Whitton
29e673a77b New commands for outgoing diffs including uncommitted changes
* lisp/vc/vc.el (vc-root-diff-outgoing-base)
(vc-diff-outgoing-base): New commands (bug#62940).
* lisp/vc/vc-hooks.el (vc-prefix-map): Bind them.
* doc/emacs/vc1-xtra.texi (Outgoing Base Diffs):
* etc/NEWS: Document them.
* doc/emacs/emacs.texi (Outgoing Base Diffs): New node.
2025-08-30 11:44:53 +01:00
João Távora
53f5a07beb Eglot: fix likely off-by-1 in LabelOffsetSupport feature (bug#79259)
This feature was tweaked and last tested with a 2019 edition of
the 'ccls' LSP.  The spec does not clearly specify this number
to be 0-indexed, but it would make sense that it would be so.
So there's not need to 1+ - correct the numbers at all before
using them in substring.  This would fix the Haskell server use
of this feature (which is bug#79259)

* lisp/progmodes/eglot.el (eglot--sig-info): Fix likely off-by-1.
2025-08-30 11:44:56 +01:00
Eli Zaretskii
467c75893c ; Fix defcustom type
* lisp/files.el (lock-file-name-transforms): Fix the 'defcustom'
type.  (Bug#79322)
2025-08-30 13:22:05 +03:00
Steven Allen
4ab16d701e Eglot: escape literal % characters in URIs
Escape literal % characters in Eglot URIs

Otherwise, a literal % in a file-name will be interpreted (by the
language server) as if it were a part of a percent-encoded sequence.

See Bug#78984 for context on why `url-path-allowed-chars' cannot be
changed to escape literal % characters.

* lisp/progmodes/eglot.el (eglot--uri-path-allowed-chars): Escape %,
remove the redundant variable definition.
* test/lisp/progmodes/eglot-tests.el (eglot-test-path-to-uri-escape):
test it.
2025-08-30 11:19:19 +01:00
Jens Schmidt
fdc6bb2caf Add edebug-bounce-to-previous-value
Command edebug-bounce-to-previous-value uses the previous value
observed while single-stepping or evaluating an expression to
bounce point in the outside current buffer to the buffer
position corresponding to that value.

* lisp/emacs-lisp/edebug.el (edebug-previous-value): Add
variable.
(edebug-compute-previous-result, edebug-eval-expression): Update
it.
(edebug-bounce-to-previous-value): Add command.
(edebug-mode-map): Add keybinding for the new command, replacing
the binding of "P" to edebug-view-outside.
(edebug-mode-menus): Add menu entry for the new command.
* doc/lispref/edebug.texi (Edebug Views): Add documentation.
* test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el
(edebug-test-code-bounce-point): Add test code.
* test/lisp/emacs-lisp/edebug-tests.el
(edebug-tests-bounce-outside-buffer)
(edebug-tests-bounce-outside-point)
(edebug-tests-bounce-outside-mark)
(edebug-tests-bounce-record-outside-environment)
(edebug-tests-should-have-bounced-to): Add infrastructure to
test bounces.
(edebug-tests-check-keymap): Update tests to new key bindings.
(edebug-tests-bounce-point)
(edebug-tests-bounce-to-previous-value)
(edebug-tests-bounce-to-previous-non-position): Add tests.
(edebug-tests-evaluation-of-current-buffer-bug-19611): Clean up
side effects.  (Bug#79288)
2025-08-30 12:30:21 +03:00
john muhl
34f3ac6c5b Fontify all comment delimiters in 'lua-ts-mode'
* lisp/progmodes/lua-ts-mode.el (lua-ts--comment-font-lock):
Apply 'font-lock-comment-delimiter-face' to the entire span of
initial dashes.  In particular, this improves the appearance of
LuaCATS and EmmyLua style annotations which use "---".
* test/lisp/progmodes/lua-ts-mode-resources/font-lock.lua:
Add tests.  (Bug#79258)
2025-08-30 11:31:34 +03:00
Eli Zaretskii
b0efe06551 ; * lisp/ehelp.el (ehelp-command): Fix the autoload form (bug#79289). 2025-08-30 11:24:51 +03:00
Sean Devlin
b85f9d6a97 Fix recursive load when 'calc-always-load-extensions' is set
* lisp/calc/calc.el (calc-create-buffer): Call 'calc-load-everything'.
(calc-always-load-extensions): Delete erroneous stanza.  (Bug#79157)
2025-08-30 10:26:20 +03:00
Sean Devlin
aa60f16e66 Add user option to inhibit Calc startup message (bug#79143)
* doc/misc/calc.texi (Customizing Calc): Document the new option.
* etc/NEWS: Document the new option.
* lisp/calc/calc.el (calc-inhibit-startup-message): New option to
inhibit Calc’s startup message.
(calc): Respect the option in Calc’s startup code.
* test/lisp/calc/calc-tests.el (ert): Require ert-x for
'ert-with-message-capture'.
(calc-inhibit-startup-message): Test the new user option.
2025-08-30 10:22:06 +03:00
Mattias Engdegård
8c71ef0f8e ; use modern sort calls in more places
* lisp/emacs-lisp/regexp-opt.el (regexp-opt, regexp-opt-group):
* lisp/emacs-lisp/rx.el (rx--parse-any): New-style calls, also faster.
2025-08-29 19:24:50 +02:00
Juri Linkov
8d3554683f * lisp/treesit-x.el (treesit-generic-mode-font-lock-map): Extend.
Add more font-lock mappings based on existing settings in ts-modes.
2025-08-29 19:35:58 +03:00
Juri Linkov
35f8ce7835 * lisp/textmodes/markdown-ts-mode.el: Fix embed settings.
(markdown-ts--range-settings): Move embed settings
for html/toml/yaml to 'markdown-ts-setup'.
(markdown-ts-setup): Append range rules to 'treesit-range-settings'
only when grammars for html/toml/yaml are installed.
2025-08-29 19:32:22 +03:00
Juri Linkov
b8ad7c38ae * lisp/progmodes/python.el: Use 'treesit-major-mode-remap-alist'.
(python-ts-mode): Don't duplicate 'auto-mode-alist' and
'interpreter-mode-alist' settings in Emacs 31 (bug#79180).
Add ts-mode mapping to 'treesit-major-mode-remap-alist'.
2025-08-29 19:27:32 +03:00
Michael Albinus
f7188ed77f ; Fix last commit
* lisp/net/tramp.el (tramp-parse-default-user-host): Fix thinko.
(tramp-handle-file-directory-p): Extend simple check.
2025-08-29 17:29:54 +02:00
Michael Albinus
4e44c149a6 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2025-08-29 13:48:10 +02:00
Michael Albinus
95232f556e `Fix read-directory-name' for Tramp files
* lisp/minibuffer.el (completion-file-name-table): Improve bypass
for directory checking.  (Bug#79236)

* lisp/net/tramp.el (tramp-user-regexp): Exclude "[" and "]".
(tramp-completion-make-tramp-file-name): Handle port for IPv6 hosts.
(tramp-completion-handle-file-directory-p)
(tramp-completion-handle-file-exists-p): Simplify.
(tramp-completion-handle-file-name-completion): Ignore PREDICATE.
(tramp-completion-dissect-file-name): Handle ports.
(tramp-parse-default-user-host): Suppress '(nil nil) result.
(tramp-parse-file): Delete duplicates.
(tramp-parse-shosts-group): Accept also IPv6 addresses.
(tramp-handle-file-directory-p): Return t for filenames
"/method:foo:".
(tramp-parse-auth-sources, tramp-parse-netrc):
* lisp/net/tramp-cache.el (tramp-parse-connection-properties):
* lisp/net/tramp-gvfs.el (tramp-gvfs-parse-device-names):
Use `tramp-compat-seq-keep'.

* test/lisp/net/tramp-tests.el (edebug-mode): Declare.
(tramp--test-message): Write also trace value.
(tramp-test26-file-name-completion):
(tramp-test26-interactive-file-name-completion): Extend tests.
2025-08-29 13:47:51 +02:00
Mattias Engdegård
bebba6be3d Fix org-habit bug related to string mutation
* lisp/org/org-habit.el (org-habit-build-graph): Rewrite without using
string mutation (using vectors instead), fixing a bug where
org-habit-completed-glyph and org-habit-today-glyph wouldn't display
properly if in the U+0080..00FF range, discovered by the more restricted
string mutation.

Reported by Daniel Mendler in
 https://lists.gnu.org/archive/html/emacs-orgmode/2025-08/msg00224.html
2025-08-29 10:55:21 +02:00
john muhl
bba28b744c Make 'lua-prefix-key' option a 'key-sequence'
This fixes a failure in 'test-custom-opts' caused by both strings
and integers being used for 'lua-prefix-key'.

* lisp/progmodes/lua-mode.el (lua-prefix-key): Convert option to
'key-sequence' type.
(lua-mode-map, lua-prefix-key-update-bindings, lua-set-prefix-key)
(lua--customize-set-prefix-key): Adjust to the change of type for
'lua-prefix-key'.
(lua-prefix-mode-map): Use 'defvar-keymap'.  (Bug#79335)
2025-08-29 09:47:24 +02:00