Commit graph

182150 commits

Author SHA1 Message Date
F. Jason Park
ba2a150740 Restore erc-last-saved-position from previous session
* lisp/erc/erc-log.el (erc-log-setup-logging): Restore
`erc-last-saved-position' from previous session.  By default, a
non-/QUIT disconnect does not write out any remaining buffer text to
logs, instead leaving it until the buffer or Emacs is killed.  But if a
successful reconnect occurs beforehand, the uncommitted portion must be
seen to somehow.  Before this change, it would be lost because the
function `erc-initialize-log-marker' remakes the marker at the prompt
instead of recovering the previous value as now done here.  Moreover,
the traditional workaround of customizing `erc-log-write-after-insert'
and `erc-log-write-after-send' to t should not be required to prevent
gaps in any decent IRC client.
* test/lisp/erc/erc-scenarios-log.el (erc-scenarios-log--reconnect): New
function.
(erc-scenarios-log--reconnect/auto, erc-scenarios-log--reconnect/manual):
New tests.
;; * test/lisp/erc/resources/join/reconnect/foonet-again.eld: Add QUIT.
2026-04-30 15:46:38 -07:00
F. Jason Park
c7bca9f340 Define variable alias for erc-completion-mode
* lisp/erc/erc-pcomplete.el (erc-completion-mode): New alias for the
variable `erc-pcomplete-mode' to complement the function alias of the
corresponding minor-mode command.  Given that user code operating on the
value of `erc-modules' needs to detect whether members are active, it
only makes sense to address this specially.  Before this change,
applying `bound-and-true-p' to `erc-completion-mode' would always return
nil, even when the module was active.  For normal aliases, that's indeed
expected because `define-erc-module' doesn't automatically define a mode
variable for a non-nil ALIAS argument.  Although in the long term it
probably should, while also obsoleting the "new" alias simultaneously,
that would likely break some user code and doubtless complicate things
majorly for `pcomplete', the one in-tree outlier.  The latter module
would then require changing either its preferred name, the one
advertised by `erc-modules' in its Custom definition, to `pcomplete' or
its primary name to `completion'.  Both are quite churn-inducing.
2026-04-30 15:46:34 -07:00
F. Jason Park
40b6f0180b ; Tweak some ERC tests and related utilities
* test/lisp/erc/erc-scenarios-keep-place-indicator.el
(erc-scenarios-keep-place-indicator--follow): Intersperse more
`redisplay' calls to update the indicator's overlay.
* test/lisp/erc/erc-tests.el (erc-tests--assert-printed-in-subprocess):
Wrap CODE form in keyword sentinel.
(erc--find-mode, erc--essential-hook-ordering): Use modified interface.
(erc--find-group--real, erc--find-group/realistic): Rename former to
latter and run in subprocess.
(erc--update-modules/realistic): Redo to run in subprocess instead of
mocking.
* test/lisp/erc/resources/erc-d/erc-d-t.el
(erc-d-t-kill-related-buffers): Don't bother canceling
`erc-server-flood-timer', even in an actual ERC buffer, since
`erc-server-send-queue' first checks whether its BUFFER argument is
still live before sending anything to the process.  Also, don't bother
collecting buffers only to immediately kill them.
* test/lisp/erc/resources/erc-d/erc-d.el (erc-d--filter): Always clear
remainder.  Otherwise, partial emissions from the peer that aren't
terminated by a newline will confuse subsequent processing.
* test/lisp/erc/resources/erc-scenarios-common.el
(erc-scenarios-common--run-in-term): Look for a library called
`erc-tests-compat', which ERC uses in its external CI to provide
compatibility shims of definitions too obscure or unfit for inclusion in
the Compat package on ELPA.
* test/lisp/erc/resources/erc-tests-common.el
(erc-tests-common-kill-buffers): Also kill non-`erc-mode' buffers whose
names match a scheme used by ERC for work buffers.  Allow for the
EXTRA-BUFFERS argument to possibly contain killed and null buffers.
2026-04-30 15:46:29 -07:00
Eshel Yaron
a24ff52a79
New variable 'completion-preview-is-calling'
* lisp/completion-preview.el (completion-preview-is-calling):
New variable.
(completion-preview--capf-wrapper): Bind it to t when calling
the CAPF.
* etc/NEWS: Announce it.
2026-04-30 21:19:19 +02:00
Michael Albinus
f6d404145e Precise quoting of file names with a leading tilde
* doc/emacs/files.texi (File Names, Quoted File Names):
Precise quoting of file names with a leading tilde.
2026-04-30 18:51:00 +02:00
Eli Zaretskii
b54cde9119 Fix value of 'default-line-height'
* lisp/simple.el (default-line-height): Fix use of buffer-local
value of 'line-spacing'.  (Bug#80929)
2026-04-30 19:39:42 +03:00
Randy Taylor
edc19c3536 Always compile w32image.c on MinGW (Bug#80924)
This enables features unrelated to native image APIs, such as
'w32-export-frame' and 'yank-media', which need to call GDI+
functions.
* configure.ac (HAVE_W32) [!CYGWIN]: Always include w32image.o in
W32_OBJ.
* etc/NEWS: Drop 'yank-media' '--without-native-image-api' caveat.
* src/emacs.c (main):
* src/w32select.c (convert_dibv5_to_png):
* src/w32term.c (w32_draw_image_foreground): Replace
HAVE_NATIVE_IMAGE_API with WINDOWSNT.
* src/w32.c (term_ntproc): Remove redundant HAVE_NATIVE_IMAGE_API guard.
* src/w32fns.c (Fw32_export_frame) [!WINDOWSNT]: Return nil on Cygwin.
2026-04-30 18:52:22 +03:00
Eshel Yaron
b4e128b0cb
; * lisp/emacs-lisp/let-alist.el (let-alist): Fix typo. 2026-04-30 16:54:19 +02:00
Stefan Monnier
2db707cfd2 (seq-concatenate): Fix docstring (bug#80810)
* lisp/emacs-lisp/seq.el (seq-concatenate): Remove confusing
`(fn TYPE SEQUENCE...)` which made `help-function-arglist`
return less informative results and wasn't even consistent with
the rest of the docstring.

* lisp/emacs-lisp/shortdoc-doc.el (sequence): Revert last
change, since it's now redundant.
2026-04-30 10:24:36 -04:00
Sean Whitton
978c14b131 cl-lambda-list, cl-lambda-list1: Fix &key spec
* lisp/emacs-lisp/cl-macs.el (cl-lambda-list, cl-lambda-list1):
Fix &key specification to support empty lists of keyword
arguments (bug#80878).  Fix due to Thuna <thuna.cing@gmail.com>.
2026-04-30 12:41:33 +01:00
Timon Reinold
a0b7ae5abf eww-handle-link: Split HTML rel on spaces
* lisp/net/eww.el (eww-handle-link): The HTML rel attribute's
value is a space-separated set of keywords, so split it before
matching against known keywords (bug#80816).

Copyright-paperwork-exempt: yes
2026-04-30 11:56:29 +01:00
Sean Whitton
17f755366e ; Fix shortdoc for seq-concatenate (bug#80810). 2026-04-30 11:41:46 +01:00
Eli Zaretskii
6731146e44 ; * doc/misc/calc.texi (Top): Improve menu item description (bug#80923). 2026-04-30 09:32:59 +03:00
Collin Funk
51ae6e12b9 Pacify -Wunused-but-set-variable from gcc 16 and clang 13
* src/coding.c: Remove file wide ignore pragma for
-Wunused-but-set-variable.
(detect_coding_XXX) <consumed_chars>: Mention that this variable might
need to be declared with the MAYBE_UNUSED attribute.
(detect_coding_utf_8, detect_coding_emacs_mule, detect_coding_iso_2022)
(encode_designation_at_bol, detect_coding_sjis, detect_coding_big5)
(detect_coding_ccl, detect_coding_charset) <consumed_chars>: Use the
MAYBE_UNUSED attribute.
2026-04-29 22:45:52 -07:00
Paul Eggert
4fcc8a473a ; Spelling fixes. 2026-04-29 22:45:51 -07:00
Eli Zaretskii
3ce42ffd60 ; * src/treesit.c (treesit_pred_with_guard): Fix style conventions. 2026-04-30 07:47:02 +03:00
Vladimir Kazanov
27a18cfd7e Add ERT coverage for read_key_sequence behaviour
* test/src/keyboard-tests.el
(keyboard-tests--rks-fake-posn)
(keyboard-tests--rks-observe)
(keyboard-tests--rks-execute)
(keyboard-tests--rks-with-function-key-bindings)
(keyboard-tests--rks-with-event-kinds)
(keyboard-tests--rks-call-with-live-window-maps): Test helpers.
(keyboard-tests-rks-prefix-then-key)
(keyboard-tests-rks-unbound-returns-sequence)
(keyboard-tests-rks-bound-sequence-ends-read)
(keyboard-tests-rks-decode-fires-without-binding)
(keyboard-tests-rks-input-decode-map)
(keyboard-tests-rks-function-key-map)
(keyboard-tests-rks-function-key-map-on-undefined)
(keyboard-tests-rks-key-translation-before-function-key)
(keyboard-tests-rks-function-key-skipped-when-bound)
(keyboard-tests-rks-input-decode-after-function-key)
(keyboard-tests-rks-key-translation-overrides-bound-sequence)
(keyboard-tests-rks-upcase-fallback)
(keyboard-tests-rks-no-upcase-fallback)
(keyboard-tests-rks-dont-downcase-last)
(keyboard-tests-rks-shifted-function-key-fallback)
(keyboard-tests-rks-switch-frame-delayed)
(keyboard-tests-rks-unbound-down-mouse-dropped)
(keyboard-tests-rks-mode-line-fake-prefix)
(keyboard-tests-rks-mode-line-fake-prefix-continued)
(keyboard-tests-rks-clicked-buffer-switch)
(keyboard-tests-rks-help-char): Tests covering for read_key_sequence.
2026-04-29 23:31:29 -04:00
Yuan Fu
d2d49057eb
; * lisp/treesit.el (treesit-ready-p): Fix docstring. 2026-04-29 19:59:02 -07:00
Yuan Fu
4e420d0b20
In tree-sitter, signal if predicate function causes reparse
A reparse will make the TSTreeCursor or TSNode to possibly point
to freed memory (because the TSTree they point to is freed.)

* src/treesit.c (treesit_pred_with_guard): New function.
(treesit_predicate_pred):
(treesit_eval_predicates):
(Ftreesit_query_capture):
(treesit_traverse_match_predicate):
(treesit_build_sparse_tree): Add guard that signals if buffer is
changed when calling predicate function.
(Qtreesit_buffer_changed): New symbol.
2026-04-29 16:36:48 -07:00
Stefan Monnier
d278e51f43 (loaddefs-generate--make-autoload): Fix autoload for emoji-insert
To decide if a `defalias` will define a command, we need to look inside
the `lambda` and search for an interactive spec.  Until now we assumed
`defalias`s argument would take the shape of `(function (lambda ...))`,
which failed miserably for `transient-define-prefix` which
macroexpands to `(defalias 'foo (lambda ...))` instead.
So make sure we macroexpand the arg to turn the `(lambda ...)` into
`(function (lambda ...))` before we try to dig into it.

* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--make-autoload):
Macroexpand the `defalias` argument before checking if it's an
interactive function.
2026-04-29 15:06:17 -04:00
Daniel Colascione
f06786499e Make TS query cache work, grow less
We were using the wrong key when inserting entries into
treesit--query-cache, making the cache both ineffective and
liable to grow without bound.  On very long sessions, the cache
could end up using hundreds.

* lisp/treesit.el (treesit--compile-query-with-cache): Use
correct cache key.
2026-04-29 14:48:01 -04:00
Roi Martin
8c8a43bc54 Fix warning when building Calc manual
These warnings are emitted at least by Texinfo 7.2.
* doc/misc/calc.texi (Introduction): Conditionally set prev node to
avoid warning.
(Interactive Tutorial): Update chapter title to match node name and
menu entry.
(Top): Add description to `Interactive Tutorial' menu entry.
(Bug#80923)
2026-04-29 19:22:59 +03:00
Eli Zaretskii
7017fcc4c5 ; Add new test to files-tests
* test/lisp/files-tests.el
(files-tests-directory-files-recursively-w32): New test.
2026-04-29 18:04:48 +03:00
Sean Whitton
e452c4a59f ; Update ldefs-boot.el. 2026-04-29 14:55:23 +01:00
Sean Whitton
7d9dad4241 New VC commands for remote unintegrated changes
* lisp/vc/vc.el (vc--outgoing-base, vc--outgoing-base-mergebase):
New FORCE-TOPIC parameter.
(vc--maybe-read-outgoing-base): New NO-DOUBLE parameter.
(vc-root-diff-remote-unintegrated, vc-diff-remote-unintegrated)
(vc-log-remote-unintegrated, vc-root-log-remote-unintegrated):
New commands (bug#80434).
* lisp/vc/vc-dir.el (vc-dir-mode-map):
* lisp/vc/vc-hooks.el (vc-prefix-map): Bind them.
* doc/emacs/vc1-xtra.texi (Unintegrated Changes):
* etc/NEWS: Document them.
2026-04-29 14:54:40 +01:00
Sean Whitton
ae40c3a438 New commands to report diffs of all local changes
* lisp/vc/vc.el (vc-root-diff-outgoing-and-edited)
(vc-diff-outgoing-and-edited): New commands (bug#80434).
* lisp/vc/vc-dir.el (vc-dir-mode-map):
* lisp/vc/vc-hooks.el (vc-prefix-map): Bind them.
* doc/emacs/maintaining.texi (VC Change Log):
* etc/NEWS: Document them.
2026-04-29 14:46:37 +01:00
Basil L. Contovounesios
dee5ca5acd ; Avoid mutation in string-collate-lessp example. 2026-04-29 14:42:39 +02:00
João Távora
7de1d99d3a In fido-vertical-mode, let C-s and C-r recover their original use
Fido-mode is meant for ido-mode emulation, so it makes some
sense C-r and C-s moves forward and backward in the list as
ido-mode once did.  The price to pay is losing easy access to
isearch-backward/forward in completions.  In fido-vertical-mode,
this price is unreasonably high given C-p and C-n are the
natural bindings for moving about in the vertical list.

* lisp/icomplete.el (icomplete-fido-mode-map): Disable C-s and C-r
in fido-vertical-mode.
2026-04-29 10:12:41 +01:00
Stefan Monnier
4477ade0fa lisp/emacs-lisp/crm.el (crm-complete-and-exit): Simplify docstring 2026-04-28 16:21:47 -04:00
Eric S. Raymond
3897a808d9 ; Fix an inconsistency in C symbol naming
This is the one case out of 1902 where the C name didn't match the subr
name.

* src/xfns.c (Fx_display_last_user_time): renamed to Fx_display_set_last_user_time
2026-04-28 13:34:26 -04:00
Eli Zaretskii
071fdf2751 ; Avoid byte-compilation warnings in transient.el. 2026-04-28 15:13:50 +03:00
Yuan Fu
d969185878
Use treesit-language-available-p for language check (bug#80909)
* lisp/treesit.el (treesit-ensure-installed): Use
treesit-language-available-p for checking if a language is
installed.  treesit-ready-p also checks for buffer size, etc, so
it's not the right check.
2026-04-27 22:40:08 -07:00
Yuan Fu
09f8ce0f52
Better heuristic in treesit-font-lock-fontify-region in multi-parser
* lisp/treesit.el (treesit-font-lock-fontify-region): Use
primary parser.
2026-04-27 19:41:05 -07:00
Yuan Fu
8b41b66e6f
; * lisp/treesit.el (treesit-buffer-root-node): Fix docstring. 2026-04-27 19:41:05 -07:00
Jonas Bernoulli
977a7607b6
Use plain autoload cookie with transient-define-prefix
; * lisp/international/emoji.el (emoji-insert, emoji-recent):
(emoji-search, emoji-list-select): Use plain autoload cookie with
transient-define-prefix
2026-04-27 21:58:39 +02:00
Jonas Bernoulli
42f6459bad
Set indent property for with-connection-local-variables
* lisp/files-x.el (with-connection-local-variables): Set indent
property.
2026-04-27 21:38:00 +02:00
Jonas Bernoulli
800a272b62
Fix defining a few faces as empty
e72afa9dbf replaced nil, which is invalid as a face definition,
with ((t (:inherit default))), but that does not actually result in
an "empty" face, which doesn't set any attributes.  Instead it doubles
down on all attributes set for the default face.  Replace that with
((t)), which accomplishes what appears to have been the intention.

* lisp/net/shr.el (shr-h4, shr-h5, shr-h6):
* lisp/nxml/nxml-mode.el (nxml-text):
* lisp/progmodes/make-mode.el (makefile-shell): Use empty face
definition ((t)), instead of ((t (:inherit default))).
2026-04-27 21:35:44 +02:00
Jonas Bernoulli
046db64044
Call format-spec substitution functions in current buffer
* lisp/format-spec.el (format-spec): Call format-spec substitution
functions in current buffer.  I.e., in the same buffer in which
substitution expressions are evaluated.  Previously functions were
instead called in the temporary buffer used to deal with FORMAT.
2026-04-27 21:11:52 +02:00
Stefan Monnier
1538090889 (completion--file-name-table): Improve completion of /a/~b/c
The solution used is far from perfect, but hopefully it helps more
often than it hurts.  And since it affects only completion, we hope
the cases where it hurts won't be too serious.  (bug#32215)

* lisp/minibuffer.el (completion--sifn-regardless-of-system-users):
New function.
(completion--file-name-table): Use it.
2026-04-27 15:03:19 -04:00
Eli Zaretskii
08a22b8965 ; Don't skip 'vc-test-src-version-diff' test
* test/lisp/vc/vc-tests/vc-tests.el (vc-test-src-version-diff):
Don't skip, it passes.
2026-04-27 15:47:57 +03:00
Eli Zaretskii
fb559a8507 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2026-04-27 15:42:45 +03:00
Eli Zaretskii
8d4c47c880 Fix vc-tests for SRC
* lisp/vc/vc-src.el (vc-src-register): Support "registering"
directories in FILES.
(vc-src-rename-file): Fix implementation and support renaming
directories.

* test/lisp/vc/vc-tests/vc-tests.el (vc-test--rename-file)
(vc-test-src-version-diff): Skip parts that don't work with SRC.
(Bug#80862)
2026-04-27 15:41:27 +03:00
Sean Whitton
09c5fb7631 ; Regenerate ldefs-boot.el. 2026-04-27 13:36:12 +01:00
Sean Whitton
525b7b1424 Rename outstanding changes commands to "unintegrated changes"
* doc/emacs/vc1-xtra.texi (Outstanding Changes): Rename node
from this ...
(Unintegrated Changes): ... to this (bug#80434).  References
changed.
* etc/NEWS: Document the change.
* lisp/vc/vc-git.el (vc-git-topic-outgoing-base)
(vc-git-log-view-mode):
* lisp/vc/vc-hg.el (vc-hg-print-log, vc-hg-log-view-mode):
* lisp/vc/vc.el (vc-root-diff-outstanding, vc-diff-outstanding)
(vc-log-outstanding, vc-root-log-outstanding):
Rename from these ...
(vc-root-diff-unintegrated, vc-diff-unintegrated)
(vc-log-unintegrated, vc-root-log-unintegrated):
... to these (bug#80434).  All uses changed.
(vc-log-view-type): Rename 'log-outstanding' type to
'log-unintegrated'.  All uses changed.
2026-04-27 13:35:31 +01:00
Sean Whitton
91db34868a VC Annotate for Mercurial repositories shows changeset hashes
* lisp/vc/vc-hg.el (vc-hg-annotate-show-revision-numbers): New
option.
(vc-hg-annotate-command): If it's nil, show changeset hashes not
revision numbers by passing "-c" not "-n" to 'hg annotate'.
(vc-hg-annotate-re): Update.
* etc/NEWS: Document the change.
2026-04-27 13:23:30 +01:00
Eli Zaretskii
f293becdd6 ; Fix minor issues in SQLite docs
* doc/lispref/text.texi (Database): Update description of
'sqlite-close'.  (Bug#80908)
* etc/NEWS: Fix SQLite entries.
2026-04-27 13:57:06 +03:00
Eli Zaretskii
5cee4fa0ff ; Fix last change
* etc/NEWS: Announce the change in 'sqlite-close'.
* src/sqlite.c (Fsqlite_close): Fix commentary.
(Bug#80908).
2026-04-27 13:47:17 +03:00
Chris Roberts
09a90f0e90 sqlite-close: no-op for already closed connections
This behavior is more expected than throwing an error,
as passing NULL (closed db connection) to 'sqlite3_close'
is a "harmless no-op" according to the documentation.
* src/sqlite.c (sqlite-close): Ignore already closed connections.
(Bug#80908)

Copyright-paperwork-exempt: yes
2026-04-27 13:42:47 +03:00
Philip Kaludercic
e83052c095
Add lexical-binding cookies to multi-file-0.2.3.tar
* test/lisp/emacs-lisp/package-resources/multi-file-0.2.3.tar:
Update multi-file.el and multi-file-sub.el files.
2026-04-27 11:48:58 +02:00
Philip Kaludercic
52769368d7
Do not warn about 'lexical-binding' if buffer is not compiled
* lisp/emacs-lisp/bytecomp.el (byte-compile-file): Check
'no-byte-compile' before issuing a warning.  This prevents
false-positives when running into .dir-locals.el or -pkg.el
files.  (Bug#80352)
2026-04-27 11:48:58 +02:00