Commit graph

175699 commits

Author SHA1 Message Date
Pip Cet
cb288fbcd9 Fix occasional crash in lwlib due to uninitialized data
Crash observed on cfarm's cfarm210 machine, which is a Solaris 10 zone
on an M3000 server.

* lwlib/xlwmenu.c (XlwMenuInitialize): Initialize menu.font.
2024-12-09 13:06:40 +00:00
Jim Porter
6df535788a Fix usage reporting for Eshell commands
* lisp/eshell/esh-cmd.el (eshell-exec-lisp): Call
'elisp-get-fnsym-args-string'; the old function was renamed to this.
2024-12-08 20:23:46 -08:00
Jim Porter
b6c91cdf54 Return non-zero exit status when Eshell's "which" fails to find a command
* lisp/eshell/esh-cmd.el (eshell/which): Set exit status to 1 if we
couldn't find any of the commands (bug#74739).
2024-12-08 20:21:31 -08:00
Stefan Kangas
1098ae2896 ; * etc/symbol-releases.eld: Add and-let*.
(Bug#74712)
2024-12-09 04:25:04 +01:00
Stefan Kangas
9b4af418dd Make setting tex-dvi-view-command to an sexp obsolete
This is more in line with how we generally handle user options for
commands to call.  Later, we can get rid of the 'eval' call.

* lisp/textmodes/tex-mode.el (tex-view): Warn if tex-dvi-view-command is
set to an sexp instead of a string; say that this use is obsolete.
(tex-dvi-view-command): Change the default value to a string.  Update
docstring to reflect the above obsoletion.
2024-12-09 04:25:04 +01:00
Michael Albinus
4960af1c96 Fix calling processes inside ffap
* lisp/ffap.el (ffap--url-file-handler): Handle also
`unhandled-file-name-directory'.  (Bug#74208)
2024-12-08 18:22:17 +01:00
Eli Zaretskii
9a0e26b886 ; * doc/lispref/modes.texi (Parser-based Font Lock): Fix markup. 2024-12-08 14:10:33 +02:00
Yuan Fu
b953bcb170
Allow treesit--font-lock-level-setter to be an alist
* lisp/treesit.el (treesit-font-lock-level): Allow the
value to be an alist mapping major modes to font lock levels.
(treesit--font-lock-level-setter): Rewrite.
(treesit--compute-font-lock-level): New function.
(treesit-font-lock-recompute-features): Use new function.

* doc/lispref/modes.texi (Parser-based Font Lock): Minor fix.
2024-12-07 23:36:02 -08:00
Eli Zaretskii
6f6b641975 Merge from origin/emacs-30
4f2a21cc2a Don't restrict 'lua-ts-send-file' to 'lua-ts-mode'
2024-12-07 09:16:18 -05:00
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
john muhl
4f2a21cc2a Don't restrict 'lua-ts-send-file' to 'lua-ts-mode'
* lisp/progmodes/lua-ts-mode.el (lua-ts-send-file): Remove
restriction on interactive use.  Unlike related send-* commands
it can be useful to send a file to the Lua interpreter outside of
a 'lua-ts-mode' buffer.  (Bug#74705)
2024-12-07 15:28:14 +02: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