Commit graph

182004 commits

Author SHA1 Message Date
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
Philip Kaludercic
475bb02345
Do not regard selected packages as removable
* lisp/emacs-lisp/package.el (package--removable-packages):
Handle the fact that 'package--dependencies' doesn't return the
package itself as a dependency, so we have to check
'package-selected-packages' separately.  Also fix the way we
check the return value of 'package--dependencies', keeping in
mind that the value is an alist.  (Bug#80907)
2026-04-27 11:48:58 +02:00
Philip Kaludercic
89c6b632c4
Ensure that 'package--builtin-alist' can be populated
This is a partial reversion of 931e04a34b.

* lisp/emacs-lisp/package.el (package--builtin-alist): Add a
function that loads 'finder-inf', which in turn will populate
'package--builtins', if necessary, caching the result.
(package--upgradeable-packages, describe-package-1)
(package-menu--refresh, package--mapc, package-get-descriptor):
Use the function instead of the variable.
2026-04-27 11:48:58 +02:00
Jonas Bernoulli
705152bb7b
(transient--suspend-text-conversion-style): Avoid static-if
; * lisp/transient.el (transient--suspend-text-conversion-style): Use
safer version/platform conditional.
2026-04-27 11:38:56 +02:00
Eli Zaretskii
99b0199253 diff-kill-creations-deletions: Look for /dev/null on all platforms
* lisp/vc/diff-mode.el (diff-kill-creations-deletions): Look for
/dev/null on platforms when null-device is something else.
2026-04-27 10:25:48 +01:00
Yuan Fu
eda3e9eb07
; * lisp/treesit.el (treesit-font-lock-rules): Fix typo. 2026-04-27 02:14:49 -07:00
Yuan Fu
9e70acea67
Fix tree-sitter embedded parser range
If a host parser has some ranges, and an embedded parser also
has some ranges, the final range used by the embedded parser
should be an intersection of the two.  This patch adds this
logic.

* lisp/treesit.el (treesit--range-verbose): New variable.
(treesit--intersect-ranges):
(treesit--set-embed-ranges): New function.
(treesit--update-ranges-non-local):
(treesit--update-ranges-local): Use the new functions.
* test/src/treesit-tests.el:
(treesit-intersect-ranges): New test.
2026-04-27 02:14:49 -07:00
Yuan Fu
241481cf1e
Add treesit-query-with-fallback
* lisp/treesit.el (treesit-font-lock-rules): Handle
treesit-query-with-fallback.
(treesit-query-with-fallback): New function.
* doc/lispref/modes.texi (Parser-based Font Lock): Mention
treesit-query-with-fallback.
2026-04-27 02:14:49 -07:00
Yuan Fu
d19c511425
; Add heuristic for treesit--update-ranges-non-local
* lisp/treesit.el (treesit--update-ranges-non-local): Treat
language symbols that happens to be a command as just language
symbol, not function.
2026-04-27 02:14:49 -07:00
Yuan Fu
ee021b0ec1
Fix treesit-range-fn-exclude-children
* lisp/treesit.el (treesit-range-fn-exclude-children): Exclude
0-length ranges.
2026-04-27 02:14:49 -07:00
Bastien Guerry
20b6edf167 ; * etc/tutorials/TUTORIAL.fr: fix translation 2026-04-26 20:50:45 +02:00
Eli Zaretskii
1a1f83c730 ; * lisp/treesit.el (treesit-ready-p): Doc fix (bug#80909). 2026-04-26 21:01:45 +03:00
Stefan Monnier
4bd5608513 (register--get-method-type): Fix one more case (bug#80894)
* lisp/register.el (register--get-method-type): Refine the cl-generic hack
yet a but further.
* test/lisp/register-tests.el (register--jumpable-p): Fix the test.
2026-04-26 12:18:44 -04:00
Eli Zaretskii
c6608ea050 ; Avoid warnings when generating info.info
* doc/misc/info.texi (Help-], Help-FOO): Make these @subheading's
instead of @section/@subsection, to avoid warnings from 'makeinfo'.
Suggested by Gavin Smith <gavinsmith0123@gmail.com> in
https://lists.gnu.org/archive/html/bug-texinfo/2026-04/msg00103.html
(Bug#80736)
2026-04-26 15:20:57 +03:00
Aaron L. Zeng
e4633e657a Support Elisp debugging and backtraces in code called by modules
* src/lisp.h (handlertype) <CATCHER_ALL_DEBUGGABLE>: New enumeration
value.
* src/emacs-module.c (MODULE_HANDLE_NONLOCAL_EXIT):
* src/eval.c (Fthrow, signal_or_quit): Use it.

* test/src/emacs-module-tests.el
(mod-test-non-local-exit-funcall-debug-on-error): New test.

Bug#80714

Copyright-paperwork-exempt: yes.
2026-04-26 15:20:28 +03:00
Eli Zaretskii
1cfbad0188 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2026-04-26 14:23:57 +03:00
Sean Whitton
df6fb6fafb ; Fix & improve last change. 2026-04-26 12:21:05 +01:00
Kai Ma
9a7bc6b930 New user option compilation-search-extra-path
* lisp/progmodes/compile.el (compilation-search-extra-path): New
option (bug#80279).
(compilation-start): Use it.
(compilation-search-path):
* doc/emacs/building.texi:
* etc/NEWS: Document it, and also compilation-search-path.
2026-04-26 12:20:58 +01:00
Eli Zaretskii
bbdab523b4 Fix renaming files and directories under RCS
* lisp/vc/vc-rcs.el (vc-rcs-register): Filter out directories from
FILES.
(vc-rcs-rename-file): Support OLD being a directory.

* test/lisp/vc/vc-tests/vc-tests.el (vc-test--rename-file)
(vc-test--rename-directory): Re-enable these tests for RCS.
(vc-test--rename-directory): Disable 'yes-or-no-p' questions that
RCS asks when it needs to create the RCS/ subdirectory: this lets
the test run without user interaction.
2026-04-26 14:20:56 +03:00
Sean Whitton
5147a78dd1 ; * admin/authors.el (authors-aliases): Add Aaron L. Zeng. 2026-04-26 11:19:30 +01:00
Sean Whitton
cdaf550bb3 vc-delete-file: Narrow binding of default-directory
* lisp/vc/vc.el (vc-delete-file): In the delete-file branch,
narrow the binding of default-directory to cover only the call
into the backend.
Suggested by Aaron L. Zeng <azeng@janestreet.com> in bug#80875.
2026-04-26 11:13:11 +01:00
Sean Whitton
3f06d73a49 VC: Support deleting directories
* lisp/vc/vc.el (delete-files): Specify that implementations of
this should handle deleting directories.
* lisp/vc/vc-git.el (vc-git-delete-files):
* lisp/vc/vc-hg.el (vc-hg-delete-files):
* lisp/vc/vc.el (vc-delete-file): Handle deleting directories.
2026-04-26 10:53:46 +01:00
Eli Zaretskii
6a39de6ee5 ; Add more register tests
* test/lisp/register-tests.el (register--jumpable-p): Add tests
for more register types.  (Bug#80894)
2026-04-26 11:34:39 +03:00
Sean Whitton
fa3a81adcb ; Document getting a persistent *scratch* buffer in the manual. 2026-04-26 09:22:48 +01:00
Bastien Guerry
f749b4b978 ; * etc/tutorials/TUTORIAL.fr: fix missing word, rephrase paragraph
Reported-by: Sébastien Hinderer <sebastien.hinderer@ens-lyon.org>
2026-04-26 10:07:37 +02:00
Philip Kaludercic
ec70112ac5
Use 'package-get-descriptor' in 'package--query-desc'
* lisp/emacs-lisp/package.el (package--query-desc): Replace
manual 'assoc' call.
2026-04-25 20:31:08 +02:00
Philip Kaludercic
ca2c477d01
Improve 'package-get-descriptor' performance
* lisp/emacs-lisp/package.el (package-get-descriptor): Use
'assq' to look up element in package alists instead of iterative
over them manually.  This was initially not possible, since we
merged all alists into one, which would require using a consing
function like 'map-merge-with' to look up all package descriptor
objects we want to consider in a single 'assq' call.  As we
ended up not merging lists, we can assume that there are no
duplicate keys in the alists, making the efficient 'assq'
viable.
2026-04-25 20:31:08 +02:00
Philip Kaludercic
d378e4355f
Prevent force reloading of package archive contents
* lisp/emacs-lisp/package.el (package--compatible-packages):
Drop 'package-read-all-archive-contents' call, as
'package--build-compatibility-table' will load the archive
contents on demand via 'package--mapc' anyway.  (Bug#80902)
2026-04-25 20:31:08 +02:00
Philip Kaludercic
931e04a34b
Replace 'package--builtin-alist' function with constant
* lisp/emacs-lisp/package.el (package--builtin-alist):
(package--upgradeable-packages, package--mapc)
(package-get-descriptor):
* lisp/emacs-lisp/package.el (package--builtin-alist): Replace
function with constant, as the result of the function is always
the same within an Emacs session, since the set of built-in
packages don't change during execution.
(package--upgradeable-packages, package--mapc)
(package-get-descriptor): Use variable instead of function.
(package-menu--refresh, describe-package-1): Lookup desc in
alist instead of calling 'package--from-builtin'.

(Bug#80902)
2026-04-25 20:31:08 +02:00
Philip Kaludercic
4acb0f775d
Restore previous 'package-get-descriptor' signature
* lisp/emacs-lisp/package.el (package-get-descriptor): Allow
SOURCES to not be specified for the sake of backwards
compatibility.
2026-04-25 20:29:53 +02:00
Philip Kaludercic
4b06317163
Adjust default value of 'user-lisp-ignored-directories'
* lisp/startup.el (user-lisp-ignored-directories): Ignore all
directories that VC would also exclude.  (Bug#80853)
2026-04-25 20:29:53 +02:00
Philip Kaludercic
ba4561c79d
Clarify how to customize 'user-lisp-ignored-directories'
* lisp/startup.el (user-lisp-ignored-directories): Update docstring.

(Bug#80853)
2026-04-25 20:29:53 +02:00
Yuan Fu
ddbd311d37
; Move treesit-languages-require-line-column-tracking to treesit.c.
* lisp/treesit.el: Remove it.
* src/treesit.c (syms_of_treesit): Add it.
2026-04-25 10:49:26 -07:00
Yuan Fu
d3debef28d
Make :range-fn in treesit-range-rules actually work
* lisp/treesit.el (treesit--range-start):
(treesit--range-end):
(treesit--flatten-ranges): New helpers.
(treesit-query-range):
(treesit-query-range-by-language): Don't flatten the ranges
returned by each range-fn.
(treesit--update-ranges-non-local):
(treesit--update-ranges-local): Handle the case where the range
is a complicated ((START . END)...).
* test/src/treesit-tests.el (treesit-range-helper): New test.
2026-04-25 10:49:26 -07:00
Stefan Monnier
28f828e8a6 register.el: Allow jumping to kmacros again (bug#80894)
* lisp/register.el (register--get-method-type): Fix handling for
OClosure args.
* test/lisp/register-tests.el (register--jumpable-p): New test.
2026-04-25 10:41:16 -04:00
Stefan Monnier
5a9cfbd7fd (Info-documentlanguage): Keep Info-related code in info.el
* lisp/simple.el (Info-documentlanguage): Move from here...
* lisp/info.el (Info-documentlanguage): ...to here.
2026-04-25 09:56:25 -04:00
Eli Zaretskii
700768cd1d Fix line-truncation on horizontally-split TTY frames
* src/term.c (append_glyph, append_composite_glyph)
(append_glyphless_glyph): Account for the right-border glyph
when computing the end glyph of TEXT_AREA.  (Bug#80900)
2026-04-25 14:39:53 +03:00
Michael Albinus
aa067441d6 Some minor Tramp fixes
* doc/misc/tramp.texi (Customizing Methods): Add comment.

* lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
Comment out setting `command-line-max-length', it doesn't work reliably.

* test/lisp/net/tramp-tests.el (tramp-test03-file-error)
(tramp-test26-file-name-completion-boundaries): Adapt tests.
2026-04-25 10:01:37 +02:00
Eli Zaretskii
faa7fa0501 ; * lisp/simple.el (Info-documentlanguage): Add a local safe variable. 2026-04-25 10:36:29 +03:00
Eli Zaretskii
6425df6a80 ; * doc/lispref/text.texi (Undo): Advice about restoring point. 2026-04-25 10:04:47 +03:00
Eli Zaretskii
e077bd21ad ; Improve documentation of Proced
* lisp/proced.el (proced-grammar-alist)
(proced-process-attributes, proced, proced-mode)
(proced-format-alist, proced-format): Doc fixes.
2026-04-25 09:01:48 +03:00
Eli Zaretskii
52c4ef1109 ; * src/process.c (Fprocess_attributes): Doc fix. 2026-04-25 08:48:51 +03:00
Pip Cet
6a19ab9cce Don't modify kbd_fetch_ptr in x_delete_selection_requests (bug#80863)
This code may be called from within the loop in process_special_events
which assumed kbd_fetch_ptr remains unchanged.  This caused a buffer
underflow which resulted in the entire kbd buffer being replayed.

* src/xterm.c (x_delete_selection_requests): Simply clear deleted
events rather than rotating the kbd buffer.
2026-04-24 19:11:16 +00:00
Vincent Belaïche
19d1834ce0 ; doc/translations/fr/misc/ses-fr.texi: Typo. 2026-04-24 13:38:22 +02:00
Vincent Belaïche
44a6a8b754 ; doc/translations/fr/misc/ses-fr.texi: Typo. 2026-04-24 12:39:49 +02:00
Martin Rudalics
f9f6f1210c ;; Clarify doc on 'dedicated' 'display-buffer' action alist entry
* doc/lispref/windows.texi (Buffer Display Action Alists):
Clarify that only new windows can be marked as dedicated via the
action alist entry.
2026-04-24 09:42:58 +02:00
Stefan Monnier
7ac1d0742e (work-buffer--release): Fix bug#80813
* lisp/emacs-lisp/subr-x.el (work-buffer--release): Make sure the
buffer is not left read-only.  Clarify potential limitations to
the cleanup performed, especially w.r.t indirect buffers.
Don't bother binding `deactivate-mark` since that variable is buffer-local
nowadays anyway.
2026-04-23 15:58:40 -04:00