Commit graph

99478 commits

Author SHA1 Message Date
Sean Whitton
f41a594bf3 ; Improve docs for last change. 2026-01-15 11:12:12 +00:00
Jared Finder
6d0d71de68 New IELM option to insert newline when inside sexp (bug#80123)
* lisp/ielm.el (ielm-dynamic-return): Add new value `point' to
user option.
(ielm-return): Implement it (bug#80123).
2026-01-15 11:09:39 +00:00
Rudolf Adamkovič
c86067778b Update SQLite font-lock rules
* lisp/progmodes/sql.el (sql-mode-sqlite-font-lock-keywords):
Synchronize all SQLite keywords with the official documentation.
2026-01-15 10:56:45 +00:00
Andrea Corallo
a44c736c26 * Fix 'message' function signature
* lisp/emacs-lisp/comp-common.el(comp-primitive-type-specifiers): Fix
'message' entry.
2026-01-15 11:08:20 +01:00
Eli Zaretskii
18f9f0bdc9 ; Update Project documentation due to recent changes
* etc/NEWS:
* doc/emacs/maintaining.texi (Projects):
* lisp/progmodes/project.el (project-mode-line): Update
documentation due to changes in bug#78545.
2026-01-15 08:52:20 +02:00
Eli Zaretskii
cd9ff47ba8 ; Update documentation due to a recent change
* etc/NEWS:
* doc/emacs/mini.texi (Completion Commands):
* lisp/minibuffer.el (minibuffer-visible-completions): Update doc
string, user manual, and NEWS to reflect changes for bug#80024.
2026-01-15 08:36:46 +02:00
Stefan Monnier
4d9abf0bdf (define-ibuffer-column): Fix corner case miscompilations (bug#80180)
* lisp/ibuf-macs.el (define-ibuffer-column): Don't quote the
SUMMARIZER functions as data.
2026-01-14 16:52:09 -05:00
Stefan Monnier
c6b62b42e0 (make-progress-reporter): Tweak wording of CONTEXT doc 2026-01-14 16:25:57 -05:00
Stéphane Marks
9c1da99a85 Optionally inhibit echo area progress reporting (bug#80198)
Add an optional 'context' argument to 'make-progress-reporter'
which 'progress-reporter-echo-area' consults to inhibit updates
if the context is 'async' and the echo area is busy.

* lisp/subr.el (make-progress-reporter): Add the optional
'context' argument.
(progress-reporter-context): New defun accessor.
(progress-reporter-echo-area): Consult
'progress-reporter-context'.
* doc/lispref/display.texi: Document context.
* etc/NEWS: Announce context.
2026-01-14 16:14:08 -05:00
Stefan Monnier
4af7b4ce04 (package-install): Fix accidental regression
* lisp/emacs-lisp/package.el (package-install): Remove code re-added
probably by erroneous merge.
2026-01-14 15:27:51 -05:00
Mattias Engdegård
e7c5ab2015 ; * lisp/emacs-lisp/regexp-opt.el (regexp-opt-group): Clarify intent. 2026-01-14 19:53:23 +01:00
Sean Whitton
02966c8db5 ; Improve docs for last change. 2026-01-14 18:48:56 +00:00
Paul Nelson
ea5d079e26 Allow Ispell to save corrections as abbrevs
* lisp/textmodes/ispell.el (ispell-save-corrections-as-abbrevs):
New user option.
(ispell--abbrev-saving-allowed)
(ispell--save-correction-as-abbrev): New variables.
(ispell--maybe-save-correction-abbrev): New function.
(ispell-word, ispell-process-line): Use them to save corrections
as abbrevs when appropriate (bug#79985).
(ispell-command-loop): Add C-u as command character to toggle
abbrev saving for an immediately following replacement command.
(ispell-help): Document C-u binding.

* doc/emacs/fixit.texi (Spelling): Document new feature.
2026-01-14 18:48:56 +00:00
Spencer Baugh
72cd956564 Add new up-down option for minibuffer-visible-completions
* lisp/emacs-lisp/crm.el (completing-read-multiple): Call
'minibuffer-visible-completions--maybe-compose-map'.
* lisp/minibuffer.el (completion-in-region-mode): Call
'minibuffer-visible-completions--maybe-compose-map'.
(minibuffer-visible-completions): Add new value 'up-down' (bug#80024).
(minibuffer-visible-completions-up-down-map): Add.
(minibuffer-visible-completions--maybe-compose-map): Add helper
function.
(completing-read-default): Call
'minibuffer-visible-completions--maybe-compose-map'.
* lisp/simple.el (completion-setup-function): Check
'minibuffer-visible-completions' is t, not just non-nil.
2026-01-14 20:47:07 +02:00
Juri Linkov
1e6d8e6750 * lisp/progmodes/project.el: Improve performance of 'project-mode-line'.
(project-name-cache-timeout): New variable.
(project-name-cached): New function (bug#78545).
(project-mode-line): New value 'non-remote'.
(project-mode-line-format): Don't show the remote project's name
when 'project-mode-line' is 'non-remote'.  Use 'project-name-cached'.
2026-01-14 20:07:23 +02:00
Sean Whitton
aa6e42f18b Rename VC outgoing and incoming log commands to include "-root-"
* lisp/vc/vc.el (vc-log-incoming, vc-log-outgoing): Rename ...
(vc-root-log-incoming, vc-root-log-outgoing): ... to these.  All
uses changed.  Leave behind obsolete function aliases.
* lisp/emacs-lisp/package-vc.el (package-vc-log-incoming):
Rename ...
(package-vc-root-log-incoming): ... to this.  All uses changed.
Leave behind obsolete function alias.
2026-01-14 12:48:02 +00:00
Sean Whitton
65655ccfae ; * lisp/vc/vc.el (vc-diff-outgoing-base): Document FILESET param. 2026-01-14 12:18:41 +00:00
Jared Finder
9618ac339d Reset Xterm cursor color to default when face is unspecified
* lisp/term/xterm.el (xterm-update-cursor): Mention OSC 112 in
doc string.
(xterm--reset-cursor-color-escape-sequence): New constant.
(xterm--init-update-cursor, xterm--update-cursor-color): Use it
(bug#80091).
2026-01-14 11:35:36 +00:00
Stefan Monnier
986aaf06cd (loaddefs-generate--make-autoload): Fix bug#80180
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--make-autoload):
Avoid accidentally loading the `.elc` file.
2026-01-13 16:54:40 -05:00
Jonas Bernoulli
ab8b052888
* lisp/icomplete.el (icomplete--render-vertical): Avoid trailing whitespace
When a completion candidate has no suffix, then there is no need to
add whitespace "between" the candidate and suffix, since there is no
need to align suffixes if there are none.  In this case the trailing
whitespace only serves to needlessly make all candidates the same
length, with the result that if one candidate does not fit one a
single line, then all other candidates are made to not fit either.
2026-01-13 22:19:51 +01:00
Stefan Monnier
a9bf57155b package.el: Fix bug#80172
* lisp/emacs-lisp/package-activate.el: Move defvar of
`Info-directory-list` to when we know it should exist.

* lisp/emacs-lisp/package.el (Info-directory-list): Defvar before we
`let-bind it.
2026-01-13 15:23:31 -05:00
Manuel Giraud
66ff6064f5 Fix buffer menu unmark (bug#80082)
Now when calling 'Buffer-menu-unmark-all-buffers', only the
selected mark is removed.

* lisp/buff-menu.el (Buffer-menu--unmark): Add a mark parameter
to correctly select it in the entry.
(Buffer-menu-unmark, Buffer-menu-unmark-all-buffers)
(Buffer-menu-backup-unmark): Usage.
2026-01-13 20:49:03 +02:00
Stefan Monnier
3e2ee9869d sgml-mode.el: Prefer forward-sexp over forward-list
They're always called immediately before a `<` char, in which case
they do the same anyway.  This saves us from having to touch
 `forward-list-function` in addition to `forward-exp-function`.

While at it, change `sgml-tags-invisible` to use `define-minor-mode`.

* lisp/textmodes/sgml-mode.el (sgml-delete-tag)
(sgml-electric-tag-pair-before-change-function): Prefer `forward-sexp`
over `forward-list`.
(sgml-tags-invisible): Define with `define-minor-mode`.  Don't disable
`cursor-sensor-mode` when we don't need it any more, since some other
package may be using it.  Remove redundant binding of `inhibit-read-only`.
2026-01-13 10:18:46 -05:00
Stefan Monnier
cffc4278eb (forward-sexp-function): Give it a default value
* lisp/emacs-lisp/lisp.el (forward-sexp-function): Give it a default value.
(forward-sexp): Simplify a bit.
(up-list-default-function): Fix for `forward-sexp-default-function`.
2026-01-13 09:26:20 -05:00
Stefan Monnier
b456ffc994 (forward-list-function): Give it a default value
* lisp/emacs-lisp/lisp.el (forward-list-function): Give it a default value.
(forward-list): Simplify.
2026-01-13 09:11:40 -05:00
Stéphane Marks
785059a1f7 Add frame identifiers (bug#80138)
A unique frame id is assigned to a new or cloned frame, and
reused on an undeleted frame.

The id facilitates unambiguous identification among frames that
share identical names or titles, deleted frames where a live
frame object no longer exists that we can resurrect by id, for
example via 'tab-bar-undo-close-tab'.  It also aids debugging at
the C level using the frame struct member id.

Rewrite 'clone-frame' and 'undelete-frame' to not let bind
variables that 'make-frame' uses to avoid conflicts with nested
'make-frame' calls, for example via
'after-make-frame-functions'.

* lisp/frame.el (clone-frame, undelete-frame): Use
'frame--purify-parameters' to supply parameters explicitly.
(undelete-frame--save-deleted-frame): Save frame id for
restoration.
(undelete-frame): Restore frame id.
(frame--purify-parameters): New defun.
(make-frame): Assign a new id for a new or cloned frame, reuse
for undeleted frame.
* src/frame.h (struct frame): Add id member.
(frame_next_id): New extern.
* src/frame.c (frame_next_id): New global counter.
(frame_set_id, frame_set_id_from_params): New function.
(Fframe_id): New DEFUN.
(syms_of_frame <Sframe_id>): New defsubr.
(syms_of_frame <Qinternal_id>): New DEFSYM.
(syms_of_frame <frame_internal_parameters>): Add 'Qinternal_id'.
* src/androidfns.c (Fx_create_frame):
* src/haikufns.c (Fx_create_frame):
* src/nsfns.m (Fx_create_frame):
* src/pgtkfns.c (Fx_create_frame):
* src/w32fns.c (Fx_create_frame):
* src/xfns.c (Fx_create_frame): Call 'frame_set_id_from_params'.
* doc/lispref/frames.texi: Add documentation.
* etc/NEWS: Announce frame id.
2026-01-13 09:29:44 +01:00
Juri Linkov
52875b51bf * lisp/textmodes/html-ts-mode.el: Special handling of 'show-paren-mode'.
(html-ts-mode--show-paren-data): New function to exclude
unbalanced tags when the closing tag is missing.
(html-ts-mode): Set 'show-paren-data-function' to
'html-ts-mode--show-paren-data' (bug#80151).
2026-01-13 09:54:55 +02:00
Juri Linkov
578750c7c8 * lisp/textmodes/sgml-mode.el: Fix for html-ts-mode.
(sgml-electric-tag-pair-before-change-function):
Let-bind 'forward-list-function' to nil.
(sgml-delete-tag): Let-bind 'forward-sexp-function'
and 'forward-list-function' to nil.
(sgml-tags-invisible): Let-bind 'forward-list-function' to nil.

All this is required to use the default definitions of sexp/list
that significantly differ from treesit definitions (bug#80151).
2026-01-13 09:50:17 +02:00
Eli Zaretskii
ec3ade22fc ; Fix a recent change of tab-bar/line faces
* lisp/tab-line.el (tab-line-tab, tab-line-tab-inactive)
(tab-line-highlight, tab-line-tab-current):
* lisp/tab-bar.el (tab-bar-tab, tab-bar-tab-inactive):
* lisp/faces.el (tab-line, tab-bar): Update :version of modified
faces.
2026-01-12 15:10:59 +02:00
Sean Whitton
eb4c5f0095 vc--read-branch-to-log: Pass BACKEND to vc-read-revision
* lisp/vc/vc.el (vc--read-branch-to-log): When passing FILES to
vc-read-revision, also pass BACKEND.  Necessary in some cases.
2026-01-12 10:39:28 +00:00
Sean Whitton
fb09c11482 ; whitespace-global-modes: Replace "automagically". 2026-01-12 10:38:29 +00:00
Sean Whitton
c270402f71 save-place-alist-to-file: Use prin1, not pp (bug#80183)
* lisp/saveplace.el (save-place-alist-to-file): Use 'prin1', not
'pp' (bug#80183).  Suggested by Daniel Mendler
<mail@daniel-mendler.de>.
2026-01-12 09:59:40 +00:00
Stefan Monnier
9dcf0bc428 Fix recent test suite regression (bug#80177)
* lisp/emacs-lisp/cl-generic.el (cl--generic-make-function):
Preserve advertised-calling-convention info.

* test/lisp/emacs-lisp/pcase-tests.el (pcase-tests-quote-optimization):
Require `byte-opt` to fix the test when the compiler is not loaded yet.

* lisp/progmodes/elisp-mode.el: Fix some >80column problems.
(elisp--xref-format-extra)
(elisp--xref-format): Make them constant, now that we don't have
the purespace.  Also, use %S since some of the elements
don't necessarily have names and even if they do, we'd want to
escape any funny characters in them to avoid ambiguities.
(elisp--xref-find-definitions): Fix uses of
`elisp--xref-format-extra` accordingly.
Improve heuristic to distinguish proper `cl-defgeneric` from
implicit ones.
(elisp-eldoc-docstring-length-limit)
(elisp-eldoc-funcall-with-docstring-length): Remove redundant `:group`.
* lisp/cedet/mode-local.el (xref-mode-local-overload): Pass the
override symbol rather than its name through `elisp--xref-format-extra`.
* test/lisp/progmodes/elisp-mode-tests.el (find-defs-constructor):
Adjust test to new text.
2026-01-11 18:26:53 -05:00
Juri Linkov
762902c2c6 Adapt tab-bar/tab-line faces to dark background mode (bug#80135)
* lisp/faces.el (tab-bar, tab-line): Adapt to dark background.
Suggested by Philip Kaludercic <philipk@posteo.net>.

* lisp/tab-bar.el (tab-bar-tab, tab-bar-tab-inactive, tab-bar-tab-highlight):
* lisp/tab-line.el (tab-line-tab, tab-line-tab-inactive)
(tab-line-tab-current, tab-line-highlight): Adapt faces to dark background.
2026-01-11 20:58:28 +02:00
João Távora
990ef36510 Eglot: support textDocument/prepareRename for more accurate eglot-rename
See https://github.com/joaotavora/eglot/issues/1554.

* lisp/progmodes/eglot.el (eglot--rename-interactive): New helper.
(eglot-rename): Use it.
2026-01-11 18:28:25 +00:00
Eli Zaretskii
588d95e91d Fix Emacs responsiveness when debugging many thread-exit events
* lisp/progmodes/gdb-mi.el (gdb-start-wait-for-pending): New
function.
(gdb-thread-exited): Call 'gdb-start-wait-for-pending' to make
sure the timer which waits for pending GDB commands is launched
just once, even if many =thread-exited notifications are received
at a high rate.  Suggested by Neil Roberts <bpeeluk@yahoo.co.uk>.
(Bug#80157)
2026-01-11 17:19:49 +02:00
F. Jason Park
c84aea1c1b Use seq-doseq for iterating over strings in ERC
* lisp/erc/erc-common.el (erc--doarray): Remove unused function.
* lisp/erc/erc.el (erc--channel-mode-types, erc--process-channel-modes)
(erc--parse-user-modes): Replace `erc--doarray' with `seq-doseq'.
* test/lisp/erc/erc-tests.el (erc--doarray): Remove test.
2026-01-11 05:25:03 -08:00
João Távora
12730179ac Eglot: release version 1.21
* lisp/progmodes/eglot.el (Version): Bump to 1.21.

* etc/EGLOT-NEWS: Announce new version.
2026-01-11 13:15:27 +00:00
João Távora
d33ef0c5ca Eglot: properly announce semantic tokens support to servers
* lisp/progmodes/eglot.el (eglot-client-capabilities): Property
annouce semantic tokens.
2026-01-11 13:15:27 +00:00
João Távora
67dd97a4f7 Eglot: solve misc Elisp compatibility problems on Emacs 26.3
* lisp/progmodes/eglot.el (eglot--semtok-request)
(eglot--semtok-after-send-changes): Unbreak for 26.3.

* test/lisp/progmodes/eglot-tests.el (eglot--tests-connect): Use
  split-string.
  (eglot-test-rust-completion-exit-function): Use skip-unless.
2026-01-11 13:15:27 +00:00
João Távora
a59fafde75 Eglot: don't use text-property-search-forward unavailable on 26.3
* lisp/progmodes/eglot.el (eglot--format-markup)
(eglot--semtok-font-lock-2): Rewrite.

* test/lisp/progmodes/eglot-tests.el (eglot--semtok-wait): Rewrite.
2026-01-11 13:15:27 +00:00
Phil Sainty
4484a9f875 Avoid byte-compiled code in `ibuffer-maybe-show-predicates' value (bug#80117)
* lisp/ibuffer.el (ibuffer-hidden-buffer-p): New function.
(ibuffer-maybe-show-predicates): Use it.
(ibuffer-fontification-alist): Use it (for consistency).

This prevents byte-compiled code appearing in the *Help* buffer
and in the customize UI for `ibuffer-maybe-show-predicates'.
2026-01-11 22:31:49 +13:00
Stefan Monnier
0e4a8ae1fa lisp/subr.el (insert-for-yank-1): Use with-silent-modifications 2026-01-10 23:51:46 -05:00
João Távora
25a6f28ad5 Eglot: release version 1.20
* lisp/progmodes/eglot.el (Version): Bump to 1.20.

* etc/EGLOT-NEWS: Announce new version.
2026-01-11 03:42:01 +00:00
João Távora
4e6a81da6c Eglot: add new command 'eglot-momentary-inlay-hints'
* doc/misc/eglot.texi (Eglot Commands)
(Customization Variables): Advertise eglot-momentary-inlay-hints.

* etc/EGLOT-NEWS: Advertise new command.

* lisp/progmodes/eglot.el (eglot--momentary-hints-data): New variable.
(eglot-momentary-inlay-hints): New command.
2026-01-11 03:42:01 +00:00
João Távora
fde1a5ebeb Eglot: de-spam eglot-mode-line-progress
Too spammy when many progress reporters are created by servers
such as rust-analyzer.

* lisp/progmodes/eglot.el (eglot-mode-line-progress): Tweak.
2026-01-11 03:42:01 +00:00
João Távora
fefd6526e2 Eglot: enhance eglot-list-connections-mode
* lisp/progmodes/eglot.el (eglot-list-connections-mode)
(eglot-list-connections): Tweak.
2026-01-11 03:42:01 +00:00
João Távora
7e13073c3c Eglot: don't notify server of in-disk changes for managed files
Not only is this notification strictly redundant for files
managed by Eglot (since didSave, didClose and didChange are
scrupulously sent), but it also confuses some serers which end
up posting a bunch of useless textDocument/publishDiagnostics,
for example.
2026-01-11 03:42:01 +00:00
João Távora
236647ab58 Eglot: spectacular optimization in files with many diagnostics
In a large (or simply long) file with many diagnostics, calling
eglot-range-region repeteadly constantly throws Emacs for a spin
around the buffer, since each diagnostics comes annotated with a
(line/col): LSP range spec that is reasonably expensive to
translate into Elisp point positions.

A much faster approach for such large lists is to first sort all the
objects containing ranges by their start lines and then do a
single pass of the buffer, moving lines by delta.

By much faster, I do mean spectacularly (100x) faster. A long python
with 7000 "ruff" diagnostics, before the change, typical editor
operations (add/delete words) are impossible.

       14053  84%    - jsonrpc-connection-receive
       14052  84%     - #<byte-code-function B94>
       14052  84%      - apply
       14052  84%       - eglot-handle-notification
       14052  84%        - applyn
       14052  84%         - #<byte-code-function 6DB>
       14052  84%          - eglot--flymake-handle-push
       12295  74%           - eglot--flymake-make-diag
       12218  73%            + eglot-range-region
          50   0%            + eglot--check-object
          12   0%              plist-member
           3   0%              flymake-make-diagnostic

After the change:

          99   1%    - jsonrpc-connection-receive
          99   1%     - #<byte-code-function 0EE>
          99   1%      - apply
          99   1%       - eglot-handle-notification
          99   1%        - apply
          99   1%         - #<byte-code-function E84>
          99   1%          - eglot--flymake-handle-push
          99   1%           - eglot--call-with-ranged
          99   1%            - #<byte-code-function 2C6>
          99   1%             - eglot-move-to-utf-16-linepos
          99   1%                line-end-position

* lisp/progmodes/eglot.el (eglot-move-to-linepos-function):
Forward declare.
(eglot--call-with-ranged, eglot--collecting-ranged): New helpers.
(eglot--flymake-report-1)
(eglot--imenu-SymbolInformation): Use eglot--collecting-ranged.
(eglot--imenu-DocumentSymbol): Could use eglot--collecting-ranged.

* etc/EGLOT-NEWS: Mention it
2026-01-11 03:42:01 +00:00
João Távora
fa5a656292 Eglot: add support for experimental $/streamingDiagnosticsProvider
* lisp/progmodes/eglot.el
(eglot-client-capabilities): Advertise $streamingDiagnostics
(eglot--streamed-diagnostics): New variable.
(eglot-handle-notification<$/streamDiagnostics>): New method.
(eglot--flymake-make-diag): Tweak docstring.
(eglot-flymake-backend): Rework.
(eglot--flymake-reset): Set eglot--streamed-diagnostics.
2026-01-11 03:42:01 +00:00