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

175717 commits

Author SHA1 Message Date
Pengji Zhang
3959ea6644 Rework history Isearch for Eshell
This is to make history Isearch for Eshell similar to that of
'comint-mode', by hooking into Isearch properly instead of
defining new commands to emulate Isearch (bug#74287).

* lisp/eshell/em-hist.el (eshell-history-isearch): New user
option.
(eshell-goto-history, eshell--isearch-setup)
(eshell-history-isearch-end, eshell-history-isearch-search)
(eshell-history-isearch-message, eshell-history-isearch-wrap)
(eshell-history-isearch-push-state): New functions.
(eshell-isearch-backward-regexp, eshell-isearch-forward-regexp):
New commands.
(eshell--history-isearch-message-overlay)
(eshell--stored-incomplete-input, eshell--force-history-isearch):
New internal variables.
(eshell-hist-mode-map): Bind 'M-r' to
'eshell-isearch-backward-regexp' and free 'M-s' binding for
normal in-buffer search commands.
(eshell-isearch-backward, eshell-isearch-forward): Use the new
way to start searching.
(eshell-hist-initialize): Use the new Isearch setup function.
(eshell-previous-matching-input): Use 'eshell-goto-history'.
Also inhibit messages when searching.
(eshell-isearch-map, eshell-isearch-repeat-backward)
(eshell-isearch-abort, eshell-isearch-delete-char)
(eshell-isearch-return, eshell-isearch-cancel)
(eshell-isearch-repeat-forward, eshell-test-imatch)
(eshell-return-to-prompt, eshell-prepare-for-search): Remove.
These are for the old history Isearch implementation.

* doc/misc/eshell.texi (History): Document changes.

* etc/NEWS: Annouce changes.
2024-12-11 11:56:45 -08:00
Michael Albinus
6a07dc19ac Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2024-12-11 09:19:10 +01:00
Michael Albinus
c0e1ff6b6b * test/infra/Dockerfile.emba (emacs-tree-sitter): Add jsdoc grammar. 2024-12-11 09:15:47 +01:00
Robert Pluim
f70b486759 Fix browse-url-kde :version tags
* lisp/net/browse-url.el (browse-url-kde-program,
browse-url-kde-args): Update :version to 31.1.  (Bug#74775)
2024-12-11 09:14:58 +01:00
Pengji Zhang
5db9471453 Do not call custom-reevaluate-setting in comint.el (bug#74287)
* lisp/comint.el (comint--force-history-isearch): New internal variable.
(comint-history-isearch-backward, comint-history-isearch-backward-regexp):
Set comint--force-history-isearch to t.
(comint-history-isearch-setup): Check comint--force-history-isearch.
(comint-history-isearch-end): Set comint--force-history-isearch back to nil
instead of calling custom-reevaluate-setting.
2024-12-11 09:05:09 +02:00
Yuan Fu
10e49d7fae
Make c-ts-mode tests pass even for older tree-sitter libraries
* lisp/progmodes/c-ts-mode.el (c-ts-mode--for-loop-indent-rule):
Use child index instead of field name.
2024-12-10 22:10:41 -08:00
Björn Bidar
63b9ddda8f Update browse-url-kde variables
* lisp/net/browse-url.el (browse-url-kde-program, browse-url-kde-args):
Update defaults to more modern alternative to kfmclient.  Kfmclient is
only installed when Konqueror is installed, which isn't the default
file-manager since KDE4.  In contrast, it is more likely that kde-open
is installed as it is required by Plasma, and it exists since
KDE4.  (Bug#74775)
2024-12-11 02:21:35 +01:00
Stefan Kangas
2412b9d763 ; * lisp/loadup.el: Silence checkdoc. 2024-12-11 01:06:48 +01:00
Daniel Mendler
d657a38fd1 Update project-recompile's docstring
* lisp/progmodes/project.el (project-recompile):
Update the docstring accordingly (bug#74631).
2024-12-11 01:29:15 +02:00
Paul Eggert
1012e2a43b Use builtin-expect directly
* admin/merge-gnulib (GNULIB_MODULES): Add builtin-expect,
since src/lisp.h now uses __builtin_expect directly,
which we should no longer rely on it being pulled in as
a dependency of some other Gnulib module that we use.
2024-12-10 12:16:14 -08:00
Stephen Gildea
7665ec8df8 time-stamp: properly abbreviate instead of truncating names
* lisp/time-stamp (time-stamp-string-preprocess): Stop truncating month
and weekday name strings; it didn't internationalize well.
Some historical conversions, previously accepted quietly, now warn.
(time-stamp-format): Recommend the simpler formats implemented in 2019.
* test/lisp/time-stamp-tests.el: Update tests and comments to match.
Revert commit 83e4559664 (2022-07-01), which was working around the
former confusion between truncation and abbreviation.
2024-12-10 09:11:55 -08:00
Robert Pluim
ebd8feef14 Move ns-specific event setup to term/ns-win.el (Bug#74619)
* lisp/term/ns-win.el (ns-setup-special-keys): New function,
contains event setup code previously in term/common-win.el.
Call it at top-level.
* lisp/term/common-win.el (x-setup-function-keys): Call
'ns-setup-special-keys'.
2024-12-10 16:03:39 +01:00
Daniel Mendler
be51f13491 project-recompile: Autoload and run in project root
* lisp/progmodes/project.el (project-recompile): Autoload and
use project root as `default-directory' (bug#74631).
2024-12-10 03:54:09 +02:00
Dmitry Gutov
4eea545bbc apropos-library: Don't list generic functions as features
* lisp/apropos.el (apropos-library):
Remove the separate 'cl-defmethod' case (bug#74727).
2024-12-10 03:40:14 +02:00
F. Jason Park
b25fba0ef8 ; Mark failing tests in erc-scenarios-match.el as :unstable
* test/lisp/erc/erc-scenarios-match.el
(erc-scenarios-match--stamp-both-invisible-fill-static)
(erc-scenarios-match--stamp-both-invisible-fill-static--nooffset):
Tag as :unstable for a `system-type' of `berkeley-unix'.
(Bug#74722)
2024-12-09 11:45:05 -08:00
F. Jason Park
dc7c38ed9e ; Slightly improve test case for erc-parse-modes
* lisp/erc/erc.el (erc--merge-local-modes): Look for a symbol's
`erc-module' property before examining its name.
* test/lisp/erc/erc-tests.el (erc-parse-modes): Expand case to cover
alternating plus and minus mode changes.
2024-12-09 11:42:45 -08:00
Gerd Möllmann
d719a81409 Support menu separator types in tty menus (bug#74740)
* src/xdisp.c (display_tty_menu_item): Display "--" for all menu
separator types.
2024-12-09 15:17:40 +01:00
Gerd Möllmann
b8ee67b696 ; Add an autoload cookie for native-compile-prune-cache
* lisp/emacs-lisp/comp.el (native-compile-prune-cache): Make it
autoload.
2024-12-09 15:17:40 +01:00
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