1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-01 05:10:54 -08:00
Commit graph

175689 commits

Author SHA1 Message Date
Eli Zaretskii
0ece0e68ee ; Merge from origin/emacs-30
The following commit was skipped:

84fc77f34f Remove unnecessary function call from 'php-ts-mode'
2024-12-07 09:16:18 -05:00
Eli Zaretskii
284b6647d2 Merge from origin/emacs-30
3cf177442c ; * lisp/help-at-pt.el (display-local-help): Fix last cha...
02c53b9aab ; * lisp/help-at-pt.el (display-local-help): Doc fix.
130c2a13dc ; * doc/emacs/building.texi (Compilation Mode): Fix last ...
df7f02a795 Add tags to 'compilation-transform-file-match-alist' cust...
7c50e4cc8c Improve 'compilation-transform-file-match-alist' document...
a73d08bb67 Improve 'compilation-hidden-output' docstring
d50293b0f1 ; Improve documentation of 'epa-mail-verify'
2024-12-07 09:16:18 -05:00
Eli Zaretskii
be5218138f ; Merge from origin/emacs-30
The following commit was skipped:

c7d9ffcf82 Improve docstrings of functions for moving to message hea...
2024-12-07 09:16:18 -05:00
Eli Zaretskii
66263417b7 Merge from origin/emacs-30
7b8d12e95d Fix the latest dabbrev-expand test fix
2024-12-07 09:16:18 -05:00
Eli Zaretskii
15a4022e05 ; Merge from origin/emacs-30
The following commit was skipped:

e618d5ae94 Fix password prompt in comint (don't merge)
2024-12-07 09:16:18 -05:00
Eli Zaretskii
3993dcca82 Merge from origin/emacs-30
f65de1019d Fix the version of librsvg API change
43c4a06ffc ; Fix grammar in Emacs user manual
6bca138d60 Fix latest test for dabbrev-expand
2024-12-07 09:16:18 -05:00
Michael Albinus
69191aeefd * test/lisp/wdired-tests.el (wdired-test-bug34915): Fix for *BSD.
(Bug#74721)
2024-12-07 15:14:00 +01:00
Vincenzo Pupillo
84fc77f34f Remove unnecessary function call from 'php-ts-mode'
* lisp/progmodes/php-ts-mode.el (php-ts-mode): Remove
unnecessary function call 'treesit-font-lock-recompute-features'.
(Bug#74688)

(cherry picked from commit c87c5b95e1)
2024-12-07 15:17:35 +02:00
Vincenzo Pupillo
c87c5b95e1 Remove unnecessary function call from 'php-ts-mode'
* lisp/progmodes/php-ts-mode.el (php-ts-mode): Remove
unnecessary function call 'treesit-font-lock-recompute-features'.
(Bug#74688)
2024-12-07 15:15:41 +02:00
Daniel Mendler
e7fdf6b68c progmodes/js: Use 'completing-read' instead of 'ido-completing-read'
* lisp/progmodes/js.el (js--read-symbol): Don't use Ido.
(Bug#74615)
2024-12-07 14:51:36 +02:00
Eli Zaretskii
8c3e10b575 ; Fix last change
* lisp/progmodes/flymake-cc.el (flymake-cc-command): Fix doc
string and customization tags.  (Bug#74378)
2024-12-07 14:43:34 +02:00
Pengji Zhang
bf976ca743 Allow lambdas for 'flymake-cc-command'
* lisp/progmodes/flymake-cc.el (flymake-cc-command): Use
customization type 'function' instead of 'symbol' to allow
other callable objects in addition to named functions, and
update the doc string accordingly.
(flymake-cc): Use 'functionp' to check if 'flymake-cc-command'
is callable.  (Bug#74378)
2024-12-07 14:37:36 +02:00
Eli Zaretskii
d84c5c24b5 ; * lisp/dired-aux.el (shell-command-guess-open): Fix :type (bug#74720). 2024-12-07 06:50:27 -05:00
Eli Zaretskii
d185d90190 Update info-lookup's support for 'latex-mode'
* lisp/info-look.el (latex-mode): Update URLs of LaTeX manuals and
the corresponding names of the index nodes.
2024-12-07 11:04:44 +02:00
Michael Albinus
9ddec89e42 Better handling of "%" in Tramp user or host names
* lisp/net/tramp.el (tramp-format-spec): New defun.
(tramp-dissect-file-name, tramp-compute-multi-hops)
(tramp-expand-args):
* lisp/net/tramp-cmds.el (tramp-default-rename-file): Use it.
2024-12-06 11:56:05 +01:00
Juri Linkov
61d0676297 * lisp/emacs-lisp/lisp-mode.el (lisp-fdefs): Fix font-lock (bug#74307).
Move '(not "\\")' inside the group to not exclude the last character
for "\\<>" and similar constructs.
2024-12-05 20:15:12 +02:00
Robert Pluim
3cf177442c ; * lisp/help-at-pt.el (display-local-help): Fix last change. 2024-12-05 11:21:51 +01:00
Yuan Fu
ed9eaaa996
Validate font-lock rules when setting up tree-sitter major mode
When tree-sitter grammar make breaking changes, major modes
breaks completely: no highlighting is shown.  This new function
will run in treesit-major-mode-setup, validate each
font-lock features, and disable the ones that are not compatible
with the new grammar, so that the rest of the features still
work.  It also displays a warning explaining the situation,
which looks like this:

    Warning (treesit-font-lock-rules-mismatch): Emacs cannot
    compile every font-lock rules because a mismatch between the
    grammar and the rules.  This is most likely due to a
    mismatch between the font-lock rules defined by the major
    mode and the tree-sitter grammar.

    This error can be fixed by either downgrading the
    grammar (tree-sitter-c) on your system, or upgrading the
    major mode package.  The following are the temporarily
    disabled features:

    - `preprocessor' for c.

* lisp/treesit.el (treesit-validate-font-lock-rules): New function.
(treesit-major-mode-setup): Validate font-lock rules.
2024-12-04 22:39:28 -08:00
Yuan Fu
4ecd1639b1
Make treesit-query-compile compile compiled-query eagerly
* src/treesit.c (treesit_ensure_query_compiled_signal): Extrat
out into a function.
(Ftreesit_query_compile): If EAGER is non-nil and QUERY is a
lazily compiled query, compile it eagerily.
2024-12-04 22:39:28 -08:00
Yuan Fu
5d535334f3
; Use cpp instead of c++ for c-ts-mode--simple-indent-rules
* lisp/progmodes/c-ts-mode.el (c-ts-mode--simple-indent-rules):
Use cpp to be more inline with other functions in c-ts-mode.el.
2024-12-04 22:39:28 -08:00
Yuan Fu
10b4d3045e
Make tree-sitter-explorer support selecting local parser
Now treesit-explore-mode will prompt the user to select a parser
to explore, rather than a language.  It'll also include the
local parsers at point for selection.

* lisp/treesit.el (treesit--explorer-language): Change to
treesit--explorer-parser.
(treesit--explorer--nodes-to-highlight):
(treesit--explorer-refresh): Change to use parser.
(treesit--explorer-generate-parser-alist): New function.
(treesit-explorer-switch-parser): New command.
(treesit-explore-mode): Use switch-parser to setup.
* doc/lispref/parsing.texi (Language Grammar): Mention
treesit-explorer-switch-parser.
2024-12-04 22:39:28 -08:00
Juri Linkov
25b4bf7fcd * lisp/tab-line.el (tab-line-tabs-fixed-window-buffers): More optimizations.
Use :size arg of 'make-hash-table' as a hint how many buffers
the table will have.  Add ':in-place t' to 'sort'.
2024-12-04 20:38:41 +02:00
Eli Zaretskii
02c53b9aab ; * lisp/help-at-pt.el (display-local-help): Doc fix. 2024-12-04 19:51:31 +02:00
Eli Zaretskii
130c2a13dc ; * doc/emacs/building.texi (Compilation Mode): Fix last change. 2024-12-04 18:21:19 +02:00
Robert Pluim
df7f02a795 Add tags to 'compilation-transform-file-match-alist' custom type
* lisp/progmodes/compile.el (compilation-filter-start): Add some
more meaningful tags, and switch to using 'radio' instead of
'choice'.
2024-12-04 17:00:16 +01:00
Robert Pluim
7c50e4cc8c Improve 'compilation-transform-file-match-alist' documentation
* doc/emacs/building.texi (Compilation Mode): Document
'compilation-transform-file-match-alist'.
* lisp/progmodes/compile.el
(compilation-transform-file-match-alist):
Expand docstring and add some examples.
2024-12-04 14:55:27 +01:00
Robert Pluim
a73d08bb67 Improve 'compilation-hidden-output' docstring
* lisp/progmodes/compile.el (compilation-hidden-output): Escape
the newline so the example value is more suitable for copying.
2024-12-04 14:50:41 +01:00
Eli Zaretskii
d50293b0f1 ; Improve documentation of 'epa-mail-verify'
* doc/misc/epa.texi (Mail-mode integration):
* lisp/epa-mail.el (epa-mail-verify): Improve documentation of
'epa-mail-verify'.  (Bug#74630)
2024-12-04 15:21:13 +02:00
Robert Pluim
c7d9ffcf82 Improve docstrings of functions for moving to message headers
* lisp/gnus/message.el (message-goto-to, message-goto-from,
message-goto-subject, message-goto-cc, message-goto-bcc,
message-goto-fcc, message-goto-reply-to,
message-goto-newsgroups, message-goto-distribution,
message-goto-followup-to, message-goto-mail-followup-to,
message-goto-keywords, message-goto-summary): Mention that these
will insert an empty header if the header is not found.
(message-position-on-field): Explain that this inserts an empty
header if the header is missing, and that insertion is done
after the headers mentioned in AFTERS.

(cherry picked from commit 9f266e2d7c)
2024-12-04 14:10:21 +02:00
Juri Linkov
d706be4b34 Remove obsolete 'display-comint-buffer-action' (bug#74361)
* lisp/window.el (display-comint-buffer-action):
(display-tex-shell-buffer-action):
Remove obsolete defcustoms.

* lisp/cmuscheme.el (run-scheme, switch-to-scheme):
* lisp/shell.el (shell):
* lisp/eshell/eshell.el (eshell):
* lisp/progmodes/inf-lisp.el (inferior-lisp):
* lisp/progmodes/project.el (project-shell, project-eshell):
* lisp/progmodes/sh-script.el (sh-show-shell):
Replace 'display-comint-buffer-action' with a list of
'display-buffer--same-window-action' and '(category . comint)'.

* lisp/org/ol-eshell.el (org-eshell-open): Add '(category . comint)'.

* lisp/textmodes/tex-mode.el (tex-display-shell)
(tex-recenter-output-buffer):
Replace 'display-tex-shell-buffer-action' with a list of
'display-buffer-in-previous-window' and '(category . tex-shell)'.
2024-12-04 09:40:33 +02:00
Juri Linkov
69e1f78752 Add new keyword :continue-only to defvar-keymap for repeat-mode (bug#74140)
* doc/lispref/keymaps.texi (Creating Keymaps): Add :continue-only
to :repeat part of defvar-keymap.

* lisp/keymap.el (defvar-keymap): Add support for new :repeat
keyword :continue-only.

* lisp/repeat.el (repeat-post-hook): The property 'repeat-continue-only'
is handled as a list of repeat-maps.

* test/lisp/repeat-tests.el (repeat-tests-repeat-map): Use new
:repeat keyword :continue-only.
2024-12-03 20:12:03 +02:00
Robert Pluim
9f266e2d7c Improve docstrings of functions for moving to message headers
* lisp/gnus/message.el (message-goto-to, message-goto-from,
message-goto-subject, message-goto-cc, message-goto-bcc,
message-goto-fcc, message-goto-reply-to,
message-goto-newsgroups, message-goto-distribution,
message-goto-followup-to, message-goto-mail-followup-to,
message-goto-keywords, message-goto-summary): Mention that these
will insert an empty header if the header is not found.
(message-position-on-field): Explain that this inserts an empty
header if the header is missing, and that insertion is done
after the headers mentioned in AFTERS.
2024-12-03 15:48:25 +01:00
Tomas Volf
0033ce9ef8 Actually remove the Mail-Followup-To header iff empty
* lisp/gnus/message.el (message-send-mail): Pass a fixed string
instead of regexp to 'message-remove-header' (Bug#74658).

Copyright-paperwork-exempt: yes
2024-12-03 15:48:25 +01:00
Michael Albinus
fef05ba8f4 ; Minor fixes in tramp-tests.el
* test/lisp/net/tramp-tests.el (ert-batch-backtrace-right-margin):
Set it to nil.
(tramp--test-enabled): Fix regexps.
2024-12-03 13:23:28 +01:00
Stephen Berman
7b8d12e95d Fix the latest dabbrev-expand test fix
* test/lisp/dabbrev-tests.el (dabbrev-expand-after-killing-buffer):
In batch runs of this file, the user-error message contains curved
quotes, but grave quotes when running `make check' (so here was
evidently not passed to `substitute-command-keys'), so use grave
quotes so the test succeeds in both modes of execution.
2024-12-03 10:38:26 +01:00
Andrea Corallo
04d035acd7 * lisp/progmodes/c-ts-mode.el (treesit-node-match-p): Declare. 2024-12-03 09:25:51 +01:00
Dmitry Gutov
8534bb2d6b project-try-vc--search: Fix inside recursive submodule setup
* lisp/progmodes/project.el (project-try-vc--search): Loop when
looking for submodule parent repository (bug#74614).
2024-12-03 04:31:25 +02:00
Andrea Corallo
f9e7f57f57 * Declare few treesit-* function to clean-up wanrnings
* lisp/progmodes/c-ts-common.el (treesit-parser-language)
(treesit-node-match-p, treesit-node-child, treesit-node-eq)
(treesit-parser-root-node, treesit-node-parser): Declare.
2024-12-02 21:53:47 +01:00
Michael Albinus
a582034dc5 Fix password prompt in comint
* lisp/comint.el (comint-password-prompt-regexp): Don't use "'s"
as keyword.  Add default OpenSSH format.  Adapt :version.
(comint-watch-for-password-prompt): Adapt prompt composition.
(Bug#74626)
2024-12-02 19:26:06 +01:00
Michael Albinus
e618d5ae94 Fix password prompt in comint (don't merge)
* lisp/comint.el (comint-watch-for-password-prompt): Use whole
string for setting the prompt.  (Bug#74626)
2024-12-02 19:21:54 +01:00
Manuel Giraud
f65de1019d Fix the version of librsvg API change
* src/image.c (init_svg_functions, svg_load_image): The first
official version that introduces
'rsvg_handle_get_pixbuf_and_error' is 2.59.0 not 2.58.0.
(Bug#74606)
2024-12-02 18:23:28 +02:00
Eli Zaretskii
43c4a06ffc ; Fix grammar in Emacs user manual
* doc/emacs/trouble.texi (Sending Patches): Fix wording.  Reported
by Daniel Martín <mardani29@yahoo.es>.  (Bug#74638)
2024-12-02 14:33:52 +02:00
Stephen Berman
6bca138d60 Fix latest test for dabbrev-expand
* test/lisp/dabbrev-tests.el (dabbrev-expand-after-killing-buffer):
Fix typo in a 'should' test, use part of return value of 'should-error'
test, and remove mistaken and unfounded FIXME comment.
2024-12-02 13:13:39 +01:00
Eli Zaretskii
a79c300a88 ; Fix recently-updated documentation
* doc/lispref/modes.texi (Parser-based Indentation): Fix markup,
typos and wording.
2024-12-02 14:11:00 +02:00
Manuel Giraud
8cd4ab7abd Do not use libjpeg quantization (bug#74476)
* src/image.c (jpeg_load_body): Remove libjpeg quantization.
2024-12-02 10:43:35 +00:00
Yuan Fu
de98b5a24f
; Indent by 8 in BSD indent tests for c-ts-mode
* test/lisp/progmodes/c-ts-mode-resources/indent-bsd.erts: Set
indent offset to 8.
2024-12-01 17:53:23 -08:00
Yuan Fu
9acf6eff01
Standardize and promote c-ts-mode's custom matcher and anchor
Specifically, standalone-parent and prev-sibling.  The c-ts-mode
custom version skips labels and proproc directives.

* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--standalone-parent-skip-preproc): Rename to
c-ts-mode--standalone-parent, and make it skip labels too.
(c-ts-mode--preproc-indent-rules): Rename standalone-parent and
prev-sibling.
(c-ts-mode--label-indent-rules): Use custom standalone-parent
and prev-sibling.
2024-12-01 17:53:23 -08:00
Yuan Fu
994258f556
Remove unused functions in c-ts-mode
Remove functions that became unused due to the previous change.

* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--standalone-grandparent):
(c-ts-mode--else-heuristic):
(c-ts-mode--first-sibling):
(c-ts-mode--parent-is-not-top-compound):
(c-ts-mode--indent-styles):
(c-ts-mode--top-level-label-matcher): Remove functions.
(c-ts-mode--simple-indent-rules): Move two label rules into
c-ts-mode--label-indent-rules.
(c-ts-mode--label-indent-rules): Add rules
2024-12-01 17:53:23 -08:00
Yuan Fu
44fcd37a48
Add more c-ts-mode indent tests
* test/lisp/progmodes/c-ts-mode-resources/indent-bsd.erts: Fix
label test.
* test/lisp/progmodes/c-ts-mode-resources/indent.erts: Add some
test, make other tests harder.
2024-12-01 17:53:23 -08:00
Yuan Fu
63d69bd154
Use new baseline indent rule in c-ts-mode
Rework the indent rules in c-ts-mode using
c-ts-common-baseline-indent-rule.  Also reworked internal
functions for setting indent styles to make it simpler and (more
importantly) more readable.  Now there's a single function,
c-ts-mode--simple-indent-rules, that returns a value that can go
straight to treesit-simple-indent-rules.

* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--indent-style-setter): Simplify.
(c-ts-mode--get-indent-style): Remove function.
(c-ts-mode--prompt-for-style): Use a hard-coded list of styles.
This is a tiny downgrade from the computed lists but is
acceptable.
(c-ts-mode-set-style): Use c-ts-mode--simple-indent-rules.
(c-ts-mode--standalone-grandparent): Docstring change.
(c-ts-mode--for-loop-indent-rule): New function.
(c-ts-mode--preproc-indent-rules): New variable.  Copied from
old indent rules and added some new rule.
(c-ts-mode--macro-heuristic-rules):
(c-ts-mode--simple-indent-rules):
(c-ts-mode--parenthesized-expression-indent-rule):
(c-ts-mode--label-indent-rules): New functions.
(c-ts-mode):
(c++-ts-mode): Use c-ts-mode--simple-indent-rules.
2024-12-01 17:53:22 -08:00