Commit graph

176569 commits

Author SHA1 Message Date
Eli Zaretskii
3a5aba81ca ; Fix last change
* etc/NEWS: Announce the change in 'ispell-help-timeout'.
* lisp/textmodes/ispell.el (ispell-help-timeout): Change :version.
(Bug#75804)
2025-02-01 13:26:06 +02:00
Rudolf Adamkovič
89eac993c7 Ispell: Increase help timeout
* lisp/textmodes/ispell.el (ispell-help-timeout): Increase the timeout
from 5 to 30 seconds to allow users, especially new users, read the
Ispell help menu comfortably and act confidently (bug#75804).
2025-02-01 13:22:02 +02:00
Stefan Monnier
4aa53f2934 (defcustom): Improve doc of :group
* lisp/custom.el (defcustom): Mention the use of a default group and
the fact that `:group` can be repeated.
2025-02-01 06:08:19 -05:00
Pengji Zhang
f40aff4c5d New user option 'Buffer-menu-human-readable-sizes'
* lisp/buff-menu.el (Buffer-menu-human-readable-sizes): New user
option.
(list-buffers--refresh): Use it.
* etc/NEWS: Announce the new user option.  (Bug#75825)
2025-02-01 12:37:37 +02:00
Eli Zaretskii
ed0ca7c23e * etc/NEWS: Fix punctuation. 2025-02-01 12:34:26 +02:00
shipmints
004600e014 Add new user option bookmark-bmenu-type-column-width
* lisp/bookmark.el (bookmark-bmenu-mode):
Add new user option bookmark-bmenu-type-column-width, defaulting to 8
for backwards compatibility, and use it when creating the tabulated
bookmark list.  (Bug#75826)
2025-02-01 12:33:48 +02:00
Eli Zaretskii
e067f2763f Rename a recently-added variable (bug#56197)
* lisp/emacs-lisp/lisp-mode.el
(lisp-fill-paragraphs-as-doc-string): Renamed from
'lisp-fill-paragraph-as-displayed' and default value reversed.
(lisp-fill-paragraph): Adjust to the change.
* test/lisp/emacs-lisp/lisp-mode-tests.el
(lisp-fill-paragraph-as-displayed): Likewise.
2025-02-01 12:22:13 +02:00
Eli Zaretskii
22ab03e155 ; Avoid compiler warnings in the MS-Windows build
* src/w32heap.c: Remove unused variables, to avoid compilation
warnings.  This removes variables that were used only in the
unexec build.
2025-02-01 12:21:51 +02:00
Stefan Kangas
a001202b99 Revert "Don't use obsolete face variables in lisp-mode.el"
This reverts commit ba60fa3dea.
2025-02-01 05:02:41 +01:00
Stefan Kangas
bf97946d7d Merge branch 'scratch/no-purespace' into 'master' 2025-02-01 04:56:52 +01:00
Jostein Kjønigsen
a4a0957b6b
Improve typescript-ts-mode fontification (bug#75824)
* lisp/progmodes/typescript-ts-mode.el:
(typescript-ts-mode--operators): Add syntax-highlighting ??
operator.
(typescript-ts-mode--font-lock-settings): Add "undefined" as
recognized constant.
2025-01-31 18:54:20 -08:00
Paul Eggert
3a7809f9cc Don’t use garbage after tty_frame_at returns nil
* src/term.c (handle_one_term_event): Don’t access possibly
uninitialized storage if frame is nil.  This fixes an issue introduced
in commit 5eae7f5227 dated 2025-01-26
14:43:51 -0800. Issue caught by --enable-gcc-warnings, which enables
-Wanalyzer-use-of-uninitialized-value with gcc (GCC) 14.2.1 20250110
(Red Hat 14.2.1-7).
2025-01-31 15:01:34 -08:00
Pip Cet
e8ae77e939 Revert "Prefer static switch-case checking in pdumper"
This reverts commit 6e2e7265a0.
2025-01-31 15:01:34 -08:00
Pip Cet
6cfac8e3a3 Revert "Pacify -Wanalyzer-use-of-uninitialized-value"
This reverts commit 1ed769a3cb.
2025-01-31 15:01:34 -08:00
Pip Cet
fa6eb08dc0 Revert "; * src/pdumper.c (dump_do_fixup): Pacify GCC.
This reverts commit a99ba59aa0.
2025-01-31 15:01:34 -08:00
Paul Eggert
c100656518 Port dest-mountpoint test to suspicious bwrap
* test/lisp/emacs-lisp/bytecomp-tests.el:
(bytecomp-tests--dest-mountpoint): Skip test if bwrap prohibits
even ‘true’, which it does on my Ubuntu 24.10 platform.
2025-01-31 15:01:34 -08:00
João Távora
bd39ec062d Eglot: add server menu into main menu
* lisp/progmodes/eglot.el (eglot-menu): Add separator at end
and add in eglot-server menu at load-time.
(eglot-server-menu): Rework menu title and description.
2025-01-31 10:31:44 +00:00
Eli Zaretskii
c2822650a2 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2025-01-31 10:43:35 +02:00
Eli Zaretskii
f54f798588 Avoid stack overflow on MS-Windows due to 'make-temp-name'
* src/fileio.c (Fexpand_file_name) [DOS_NT]: Use 'SAFE_ALLOCA'
instead of 'alloca'.  (Bug#75938)
2025-01-31 10:41:28 +02:00
Martin Rudalics
4354cf73d7 In 'replace-buffer-in-windows' try to preserve current buffer (Bug#75949)
* lisp/window.el (replace-buffer-in-windows): Preserve current
buffer when 'kill-buffer-quit-windows' is non-nil and a window
showing BUFFER shall be quit.  Running 'kill-buffer-hook' relies
on it (Bug#75949).
2025-01-31 09:31:05 +01:00
shipmints
f45a776fe3 Add new variable tab-bar-format-tab-help-text-function
* lisp/tab-bar.el (tab-bar--format-tab):
Add new variable 'tab-bar-format-tab-help-text-function' and a default
function 'tab-bar-format-tab-help-text-default'.  'tab-bar--format-tab'
respects this new variable when producing a tab's help text, normally
shown in the echo area or via tooltips (bug#75950).
2025-01-31 09:09:50 +02:00
Yuan Fu
3479d42406
Add treesit-simple-indent-override-rules
* lisp/treesit.el:
(treesit-simple-indent-override-rules): New variable.
(treesit-simple-indent): Try
treesit-simple-indent-override-rules first.
(treesit-add-simple-indent-rules): Mention the new variable.
* etc/NEWS: Update news.
2025-01-30 21:34:32 -08:00
Yuan Fu
ef28af35bb
Add treesit-add-simple-indent-rules
* lisp/treesit.el:
(treesit-add-simple-indent-rules): New function.
* etc/NEWS: Update NEWS.
*
test/src/treesit-tests.el:
(treesit-test-add-simple-indent-rules): Add a test for the new
function.
2025-01-30 21:34:31 -08:00
shipmints
a5965217fc * lisp/tab-bar.el (tab-bar-select-tab): Fix wc-bl/wc-bbl when nil
Remove the nil-check conditionals around 'wc-bl' and 'wc-bbl' that reset
frame parameters 'buffer-list' and 'buried-buffer-list'. This ensures
originating nil values correctly propagate (bug#75935).
2025-01-30 20:35:09 +02:00
shipmints
6c46e2a363 Add new user option tab-bar-define-keys
* lisp/tab-bar.el (tab-bar-define-keys):
Add new defcustom tab-bar-define-keys.  Reorganize key binding functions
to accommodate.  Also remove checks for tab-bar-mode enabled in
'tab-bar-select-tab-modifiers', as unnecessary and which prevented user
changes from being accepted in cases where the user defers enabling
tab-bar-mode (bug#75918).
2025-01-30 20:33:17 +02:00
shipmints
815c4dc0e0 Add abnormal hook tab-bar-post-undo-close-tab-functions
* lisp/tab-bar.el (tab-bar-undo-close-tab):
Add new abnormal hook tab-bar-post-undo-close-tab-functions (bug#75919).
2025-01-30 20:29:52 +02:00
Eli Zaretskii
f2e97338eb ; * lisp/progmodes/python.el (treesit-node-prev-sibling): Declare. 2025-01-30 14:03:20 +02:00
Eli Zaretskii
a99ba59aa0 ; * src/pdumper.c (dump_do_fixup): Pacify GCC. 2025-01-30 11:02:47 +02:00
Michael Albinus
6b3d69b16e Tramp cleanup
* doc/misc/tramp.texi (Predefined connection information):
Mention also "androidsu" as special case of "tmpdir".
(Remote processes): Signals are not delivered to remote direct
async processes.  Say, that there are restrictions for transfer of
binary data to remote direct async processes.

* lisp/net/tramp-compat.el (tramp-compat-temporary-file-directory):
Simplify.
2025-01-30 08:40:34 +01:00
Yuan Fu
3be04f3dab
Fix tree-sitter language remapping
* src/treesit.c (resolve_language_symbol): Move forward.
(treesit_ensure_query_compiled): Resolve language remapping
here.
(Ftreesit_parser_list): Don't resolve language remaping here,
because there's no need: parsers now carries the remapped
language.
(Ftreesit_query_compile): Don't resolve language remapping here,
because we resolve language remapping when actually compiling
the query.  Also we want the query to carry the unmapped
language.
2025-01-29 23:20:38 -08:00
Yuan Fu
c81b50aaf5
Add back tree-sitter declare-function for python.el (bug#75526)
treesit-declare-unavailable-functions is not available for old
emacs versions, but python.el is a core package available on
ELPA.

Remove the treesit-declare-unavailable-functions until compat.el
releases a new version that contains it.

* lisp/progmodes/python.el: Remove
treesit-declare-unavailable-functions and add back
declare-function forms.
2025-01-29 21:25:32 -08:00
Gerd Möllmann
782be196e5 Further fixes for cursor positioning (bug#75056)
* src/dispnew.c (write_matrix): Don't set the cursor here. Parameter to
set the cursor or not removed.
(combine_updates_for_frame): Call tty_set_cursor here, depending on
whether or not the selected frame is related to the updated frame.
(update_frame_with_menu): Adapt to change of write_matrix.
2025-01-30 05:41:12 +01:00
Gerd Möllmann
7aacefba6b Replace two macros with functions in dispnew.c (bug#75056)
* src/dispnew.c (WINDOW_TO_FRAME_VPOS, WINDOW_TO_FRAME_VPOS): Macros
removed.
(window_to_frame_vpos, window_to_frame_vpos): Always define, and use
them instead of the removed macros.
2025-01-30 05:41:12 +01:00
Gerd Möllmann
6cf479931d Don't use selected frame in tty_set_cursor (bug#75056)
* src/dispnew.c (tty_set_cursor): Add frmae parameter.
(write_matrix): Pass to the updated frame to tty_set_cursor.
2025-01-30 05:41:12 +01:00
Alan Mackenzie
b34c069d82 CC Mode: Don't propertize parens in macros incorrectly
Parentheses in macros were getting incorrectly propertized with
the '(1) (punctuation) syntax-table text property.  This was
due to a typo in the patch "CC Mode: Rationalize and optimize
cache invalidation (1)" from 2024-10-06.  Correct this.

* lisp/progmodes/cc-mode.el (c-depropertize-CPP): Move the
first c-clear-syntax-table-with-value-trim-caches invocation
from inside the enclosing `when' form to after it.
2025-01-29 18:35:31 +00:00
Juri Linkov
6a92f674fe Fix args in treesit-beginning-of-defun and treesit-end-of-defun
* lisp/treesit.el (treesit-beginning-of-defun): Set arg to 1 when nil.
(treesit-end-of-defun): Fix arg names in docstring.
2025-01-29 19:58:10 +02:00
Basil L. Contovounesios
25c254aa41
; Remove duplicate defvar in comp-run.el.
* lisp/emacs-lisp/comp-run.el (comp-async-compilations): Remove
duplicate definition (bug#75925).
2025-01-29 18:13:41 +01:00
Eli Zaretskii
cb62a47896 ; Fix Cygw32 build 2025-01-29 17:55:58 +02:00
João Távora
142fe5ace4 Eglot: don't auto-shutdown when reverting of single managed buffer
When eglot-autoshutdown is t and the only reason we're
considering it is because of a revert (which tears down Eglot's
minor mode as if by killing), detect that situation and
purposedly cancel the shutdown.

* lisp/progmodes/eglot.el (eglot--managed-mode): Tweak.
2025-01-29 08:59:07 +00:00
João Távora
e2ff77052d Eglot: in eglot-code-action-indications, make 'margin' interactive
Didn't know it was possible, thanks to Ergus <spacibba@aol.com> for the
tip about binding [left-margin mouse-2] in the keymap.

The technique adopted in 'eglot-mouse-call' possibly still doesn't work
very well if the margin thing we're clicking on is not on the line point
is currently on.  But we don't have that problem (yet?) because LSP
action suggestions function mostly on a "at point" basis.

* lisp/progmodes/eglot.el (eglot-code-action-indications): Adjust docstring.
(eglot--mouse-call): Don't go anywhere except in text area.
(eglot-diagnostics-map): Bind eglot-mouse-actions to left-margin.
2025-01-29 08:56:02 +00:00
Juri Linkov
2e3b085d44 Hideshow support for tree-sitter in hs-minor-mode (bug#75609)
* lisp/progmodes/hideshow.el (hs-inside-comment-p-func):
New buffer-local variable.
(hs-hide-block-at-point): Check if 'hs-block-end-regexp' is
a string or a function.
(hs-inside-comment-p): Move body to 'hs-inside-comment-p--default'.
Call 'hs-inside-comment-p-func' if it's a function.
(hs-inside-comment-p--default): New function with body from
'hs-inside-comment-p'.
(hs-hide-all): Don't use 'hs-block-start-regexp' when it's not a string.
(hs-minor-mode): Don't call 'hs-grok-mode-type' when
'hs-inside-comment-p-func' already has a buffer-local value.

* lisp/treesit.el (treesit-hs-block-end)
(treesit-hs-find-block-beginning, treesit-hs-find-next-block)
(treesit-hs-looking-at-block-start-p)
(treesit-hs-inside-comment-p): New functions.
(treesit-major-mode-setup): Set hs-minor-mode buffer-local variables.
2025-01-28 21:07:16 +02:00
Juri Linkov
cd6aed5c9e * lisp/treesit.el: Use default display behavior for treesit-explore.
(treesit-explorer-switch-parser, treesit-explore):
Revert to previous behavior (bug#75079).
2025-01-28 20:49:52 +02:00
Martin Rudalics
af033548aa Fix two more drawings in windows.texi
* doc/lispref/windows.texi (Changing Window Layouts): Fix two more
drawings.
2025-01-28 18:46:31 +01:00
Eli Zaretskii
8c4a4b4eab ; Fix last change
* src/buffer.c (Fother_buffer):
* lisp/frame.el (make-frame):
* doc/lispref/frames.texi (Creating Frames): Fix em-dash.
2025-01-28 18:18:24 +02:00
Martin Rudalics
7f01dd8906 New variable 'expose-hidden-buffer' (Bug#75828)
* src/frame.c (make_frame): Handle 'expose-hidden-buffer'.
(expose-hidden-buffer): New variable to handle hidden buffers.
* src/buffer.c (Fother_buffer): Mention that it does not return
a hidden buffer.
* lisp/frame.el (make-frame): In doc-string describe handling
of hidden buffers.
* doc/lispref/frames.texi (Creating Frames): Explain handling
of hidden buffers in description of 'make-frame'.
2025-01-28 16:59:45 +01:00
Bastien Guerry
c400ac680f ; * admin/MAINTAINERS: Remove Bastien Guerry. 2025-01-28 14:25:22 +01:00
João Távora
b4e9115f4f Eglot: allow customizing the mode line (bug#71823)
* lisp/progmodes/eglot.el (eglot-code-action-indications): Adjust docstring.
(eglot--mode-line-props): Tweak.
(eglot--mode-line-format): Delete.
(eglot-mode-line-format): New defcustom.
(eglot-mode-line-menu, eglot-mode-line-session)
(eglot-mode-line-error, eglot-mode-line-pending-requests)
(eglot-mode-line-progress, eglot-mode-line-action-suggestion): New
constants.
(mode-line-misc-info): Adjust setting

* etc/EGLOT-NEWS: Mention new feature.

* doc/misc/eglot.texi (Customization Variables): Mention new variable.
2025-01-28 11:04:21 +00:00
João Távora
d6a502fc7a Eglot: suggest code actions at point
* lisp/progmodes/eglot.el (eglot-code-action-indicator-face): New face.
(eglot-code-action-indications, eglot-code-action-indicator): New defcustoms.
(eglot--highlights): Move up here.
(eglot--managed-mode): Rework.
(eglot--server-menu-map, eglot--main-menu-map): Extract maps into
variables (avoids odd mode-line bug).
(eglot--mode-line-format): Rework.
(eglot--code-action-params): New helper.
(eglot-code-actions): Rework.
(eglot--read-execute-code-action): Tweak.
(eglot-code-action-suggestion): New function.

* etc/EGLOT-NEWS: Mention new feature.

* doc/misc/eglot.texi (Eglot Features): Mention new feature.
(Customization Variables): Mention new variables.
2025-01-28 11:04:21 +00:00
João Távora
7f0ef9655c Eglot: introduce eglot-advertise-cancellation
Setting this variable to true causes Eglot to send special
cancellation notification for certain stale client request.

This may help some LSP servers avoid doing costly but ultimately useless
work on behalf of the client, improving overall performance.

Request cancellation is described in

   https://microsoft.github.io/language-server-protocol/
      specifications/lsp/3.17/specification/#cancelRequest

* lisp/jsonrpc.el (jsonrpc-request): Accept function as value for
CANCEL-ON-INPUT.

* lisp/progmodes/eglot.el (eglot--request): Rework.

* doc/misc/eglot.texi (Customizing Eglot): Mention
eglot-advertise-cancellation.
2025-01-28 11:04:21 +00:00
João Távora
9e4b626f7e Eglot: restructure and overhaul documentation
* doc/misc/eglot.texi (Starting Eglot): Tweak.
(Using Eglot): Remove link to 'Eglot Variables'.
(Eglot Features): Rework.
(Eglot and Buffers): Rework.
(Eglot Commands): Rework.
(Customizing Eglot): New chapter.
(Customization Variables): Now contains what 'Eglot Variables'
used to contain.
(Other Variables): New section.
(More Customization): New section.
(...elsewhere...): Apply 'fill-paragraph'.
2025-01-28 11:04:19 +00:00