Commit graph

10767 commits

Author SHA1 Message Date
Manuel Giraud
ca44dce1ec In Edebug, don't setup a margin for fringe users
* lisp/emacs-lisp/edebug.el (edebug--display-1): Prevent setting
up a left margin when the user already has a left fringe.
(Bug#81109)
2026-06-14 12:38:58 +03:00
Eli Zaretskii
4a86a530de Merge from origin/emacs-31
498eafb4f1 ; * lisp/help.el (temp-buffer-resize-mode): Doc fix (bug#...
19a7d4ce7c Fix behavior of 'temp-buffer-resize-mode' (Bug#81207)
927a7fff5e Restore public interfaces for accessing built-in package ...
ea3d78898a Allow uninstalling dependency with multiple installations
4a3d5b110e Fix memcpy size in 'merge_faces'
2026-06-13 06:16:54 -04:00
Manuel Giraud
15e5f404f0 Optional display of overlay-arrow in margin (bug#81109)
* lisp/emacs-lisp/edebug.el (edebug-prepare-margin): New
function to set up left margin for Edebug.
(edebug--display-1): Use it.
* src/xdisp.c (display_line): Try to use left margin to display
overlay arrow and fallback to the text area otherwise.
* doc/lispref/display.texi (Overlay Arrow):
* doc/lispref/edebug.texi (Using Edebug):
* doc/emacs/building.texi (Debugger Operation): Document the
change.
* etc/NEWS: Announce the change.
2026-06-13 11:51:27 +03:00
Xiyue Deng
927a7fff5e
Restore public interfaces for accessing built-in package info
These functions were removed in ab36f58922
during the reorganization of package.el as part of Bug#80079.

Also add a simple test for these functions to avoid future regressions.

See also discussion at
https://lists.gnu.org/archive/html/emacs-devel/2026-06/msg00149.html.

* lisp/emacs-lisp/package.el (package-versioned-builtin-packages,
package-builtin-package-version): Restore.
* lisp/emacs-lisp/package-activate.el: Remove lingering comments.
* test/lisp/emacs-lisp/package-tests.el
(package-test-builtin-package-info): Add.
2026-06-11 22:47:33 +02:00
Philip Kaludercic
ea3d78898a
Allow uninstalling dependency with multiple installations
* lisp/emacs-lisp/package.el (package--dependency-p): Add new
function to check if a package is a dependency.
(package-delete): Prompt user if it is OK to uninstall a package
that serves as a dependency, but where the package has multiple
installations.  This also means that we don't de-select a
selected dependency if there are multiple installations.

(Bug#81082)
2026-06-11 22:47:33 +02:00
Stéphane Marks
c6c4888ced 'work-buffer--release' kill locals silently and reset the buffer (bug#81111)
This change helps ensure that work buffers are "clean" for reuse
by arbitrary callers.

* lisp/emacs-lisp/subr-x.el (work-buffer--release): Call
'kill-all-local-variables' with KILL-PERMANENT 'reset.
* src/buffer.c (Fkill_all_local_variables): If KILL-PERMANENT is
'permanent-local, kill all locals without prejudice.  If
KILL-PERMANENT is 'reset, also call 'reset_buffer'.
* test/lisp/emacs-lisp/subr-x-tests.el
(subr-x-with-work-buffer-locals-killed): New test.
* doc/lispref/variables.texi: Update 'kill-all-local-variables'
documentation.
* etc/NEWS: Announce the change to 'kill-all-local-variables'.
2026-06-11 10:34:44 +03:00
Tomas Nordin
02f22865f6 Partially revert changes from bug#6157 (bug#81170, bug#45226)
* lisp/emacs-lisp/lisp.el (narrow-to-defun): Partially revert
changes from bug#6157 (bug#81170, bug#45226)
2026-06-09 22:07:05 +03:00
Paul Eggert
669ca4df18 Default to quoting `like this' in Elisp strings
Problem reported by Matthew Batson in:
https://lists.gnu.org/r/emacs-devel/2026-06/msg00172.html
* lisp/emacs-lisp/lisp-mode.el (lisp-data-mode):
Don’t set electric-quote-string to t.
2026-06-09 08:46:13 -07:00
Sean Whitton
0fac164893 Merge from origin/emacs-31
fff343c332 ; Fix typos in iCalendar macro and recurrence docstrings
912c8e3691 Ensure Tramp backward compatibility
df9b97e516 ; update README for windows binaries
9e37c94079 Read a key sequence instead of a single key in 'map-y-or-...
2755f171fc ; Document new features and update NEWS
13842157d2 ; * etc/NEWS: Presentational fixes and improvements.

# Conflicts:
#	etc/NEWS
2026-06-08 15:36:26 +01:00
Juri Linkov
9e37c94079 Read a key sequence instead of a single key in 'map-y-or-n-p'
This is necessary to correctly read keys like 'M-~'
used by 'save-some-buffers' that is two keys 'ESC ~'
on a tty.

* doc/lispref/minibuf.texi (Multiple Queries):
Index 'y-or-n-p-use-read-key' for 'map-y-or-n-p'.
Mention using a key sequence instead of single keys.

* lisp/emacs-lisp/map-ynp.el (map-y-or-n-p):
In the 'y-or-n-p-use-read-key' cond-branch,
use 'read-key-sequence-vector' instead of 'read-key'.
In the default cond-branch, use 'this-command-keys-vector'
instead of 'last-command-event'.  In both cond-branches
use 'key-description' instead of 'single-key-description'
(bug#81168).
Instead of '(eq def nil)' check if chars are either nil
or an empty vector in noninteractive mode (bug#67836).

* test/lisp/emacs-lisp/map-ynp-tests.el (test-map-ynp-kmacro):
Test separately nil/non-nil 'y-or-n-p-use-read-key'.
(test-map-ynp-keys): New test for complete coverage of
'map-y-or-n-p'.
2026-06-07 21:56:47 +03:00
Eli Zaretskii
f653fd9f10 Avoid recursive error in debug-early in batch mode
* lisp/emacs-lisp/debug-early.el (cl--generic-compiler): Defvar it.
(debug-early-backtrace): Bind it so as to avoid loading
byte-compiler; see the value of the variable in cl-generic.el.
Do not merge to master.  (Bug#80916)
2026-06-07 13:31:45 +03:00
Stefan Monnier
fa528b4e5c lisp/emacs-lisp/debug-early.el (debug-early--handler): Fix bug#80916 2026-06-07 00:20:40 -04:00
Paul Eggert
2dc98b69e0 format-seconds takes time values, not just numbers
* lisp/calendar/time-date.el (format-seconds): Document that the arg
can be any time value, and need not be a number.
This has been true for some time, but has not been documented.
Avoid some (but not all) rounding errors internally, and add a
comment about the remaining rounding error.
* lisp/emacs-lisp/timer-list.el (list-timers):
* lisp/org/org-timer.el (org-timer-show-remaining-time):
* lisp/org/ox.el (org-export--stack-generate):
* lisp/time.el (emacs-uptime): Omit unnecessary conversion of time
value that can increase rounding error.
* test/lisp/calendar/time-date-tests.el (test-format-seconds):
Test that format-seconds works on time values that are not numbers.
2026-06-05 19:16:29 -07:00
Sean Whitton
5e160e2784 Merge from origin/emacs-31
b8133a416d ; Update exported ChangeLog files and etc/AUTHORS
5e3e1a5bb2 ; Tweak some package short descriptions.
bbe805e4b1 message.el: Fix part of bug#81035
621239ae6a Fix prompt in remote shell
6df1d33b6c Fmake_xwidget: Use about:blank workaround only when needed
f3b17c4969 Allow brew/macports libgccjit for default native compilation
7226082f46 vc-dir-refresh: Respect non-essential wrt saving buffers
438af2764d ; * doc/lispref/text.texi (Mode-Specific Indent): Fix mar...
6b39919408 ; Fix typo in prog-indentation-context documentation (bug...
95ac082d5b Merge branch 'emacs-31' of git.savannah.gnu.org:/srv/git/...
3d9d9be3a1 CC Mode: Fontify a cast type preceding a brace initializa...
fe1c02d849 Fix Tramp distrobox integration
108710992d ; * doc/misc/ert.texi (erts files): Improve example (bug#...
0989625d36 markdown-ts-mode: fix first-item indent (bug#81118)
07e02917ee [GTK3] Re-fix the stored values for width and height
776ee085ff Eglot: mentions markdown-ts-view-mode less (bug#81150)
2d915236dc vc--subject-to-file-name: Fix over-greedy regex (bug#81017)
05f89d711d Fix more missing faces on ERC margin strings
3229d6f0e3 Eglot: Simplify markdown rendering support (bug#81150)
8855e88d74 ; Improve doc strings of brows-url commands
933d35ef10 ; * lisp/net/browse-url.el (browse-url-firefox-program): ...
2026-06-05 11:19:07 +01:00
Sean Whitton
5e3e1a5bb2 ; Tweak some package short descriptions. 2026-06-05 10:17:27 +01:00
Sean Whitton
c7167f2a1e Merge from origin/emacs-31
c3babe4b89 Fix lax whitespace highlight during query-replace
2e70b88623 Fix fill-paragraph combining text with preceding comment
ea54c33950 ; * etc/PROBLEMS: Link to bug#81124.
02897e208d emacsclient quote_argument is void
c618178066 ; Mark process-test-stderr-buffer as :unstable when runni...
2c1b45f5c5 ; Improve documentation of 'vc-dir-auto-hide-up-to-date'
768c8bf004 Revert "* admin/notes/documentation: Recommend not using ...
a7414f1859 native--compile-skip-on-battery-p: Try to fix ?b, ?B cond...
7cee526a8c Save and restore original local keymap in grep-edit-mode
4d87d203cf Fix display of inline SVG images in Rmail
4c55d04ebe Add treesit-ready-p check back to tree-sitter major modes...
7892ae5eaf Fix pathological slowness in flex completion
12eec781ed No longer raise error on HTTP 402 (Payment Required) (bug...
1800350b18 Avoid compilation-mode matching rust as gnu
2026-05-29 11:01:25 +01:00
Stefan Monnier
72b50901ef lisp/emacs-lisp/package.el (package-quickstart-refresh): Delete stale elc 2026-05-25 17:01:07 -04:00
Sean Whitton
a7414f1859 native--compile-skip-on-battery-p: Try to fix ?b, ?B conditions
* lisp/emacs-lisp/comp-run.el
(native--compile-skip-on-battery-p): Don't skip charging because
the battery is charging, and don't look for "discharging", at
least for now (bug#80922).  Thanks to David Koppelman
<koppel@ece.lsu.edu> for the report.
2026-05-24 11:46:47 +01:00
Sean Whitton
7fe595465b vc-refresh-state: Use cond*
This is okay with regard to bootstrapping because vc-hooks.el is
loaded after loaddefs.el in loadup.el.

* lisp/emacs-lisp/cond-star.el (cl-lib): Don't require, so we
can use cond* in preloaded files.
(cond*-convert-condition): Replace calls to cl-assert.
* lisp/vc/vc-hooks.el (vc-refresh-state): Use cond*.
2026-05-23 12:47:24 +01:00
Eli Zaretskii
ccc94458fb Merge from origin/emacs-31
7a17f97baa Prettify special glyphs
f13287fde0 Revert "sh-script: Mark + and * as punctuation rather tha...
70b79b3ed8 Rename `icalendar-recur' type and related functions
3d2bb233f2 ; Minor Tramp changes
f6281d757d ; * etc/NEWS: Tell how to disable 'markdown-ts-mode'.
142b1e0d4c Fix Lisp injection via X-Draft-From in Gnus
d6f7b2d99b Save/restore old_buffer slot via window configurations (B...
e0fbecaf65 Adapt ert-remote-temporary-file-directory settings
3de7f0ce5e Fix warning message in 'markdown-ts-mode--initialize'
7df8604ea6 ; Improve documentation of lazy-highlight in search and r...
2936b36164 Fix "assertion 'GTK_IS_WINDOW (window)' failed"
98348a0bdc [Xt] Fix child frame resizing glitch
13b29eebc1 Eglot: use standard face for completion annotations (bug#...

# Conflicts:
#	etc/NEWS
2026-05-23 07:23:33 -04:00
Augusto Stoffel
646702f70b let-alist.el: Use 'elt' instead of 'nth'
The advantage is that this works also for mixtures of alists and
vectors, as one obtains, e.g., from 'json-parse-buffer' and
'json-parse-string'.
* lisp/emacs-lisp/let-alist.el (let-alist--list-to-sexp): Use
'elt' instead of 'nth'.
(let-alist): Adapt doc string.  (Bug#80992)
2026-05-23 12:37:34 +03:00
Michael Albinus
e0fbecaf65 Adapt ert-remote-temporary-file-directory settings
* lisp/emacs-lisp/ert-x.el (tramp-default-remote-shell)
(tramp-encoding-shell): Declare.
(tramp-methods) <mock>: Add `tramp-tmpdir'.  Adapt
`tramp-login-program' and `tramp-remote-shell'.
2026-05-22 18:37:36 +02:00
Philip Kaludercic
b13450973a
Copy changes from tarballs when installing VC packages
* etc/NEWS: Document change.
* lisp/emacs-lisp/package-vc.el (package-vc--clone): Implement
logic to find and copy files from a previous installation.
(package-vc-install): Indicate the effect of the prefix argument
in the prompt.
2026-05-16 16:31:48 +02:00
João Távora
2a166c2dbd Eldoc: display documentation in visual-line-mode
Documentation is overwhelmingly prose and intended to be viewed,
not edited.  Using visual-line-mode allows members of
'eldoc-doc-functions' to provide long lines that correctly fill
to the window width.

* lisp/emacs-lisp/eldoc.el (eldoc--format-doc-buffer): Use
visual-line-mode.
2026-05-14 11:05:30 +01:00
Philip Kaludercic
e613e38021
Update "timeout" to 2.1.6
See https://lists.gnu.org/archive/html/emacs-devel/2026-05/msg00033.html.
2026-05-11 15:31:06 +02:00
Sean Whitton
69c50dcb47 ; package-activate-all: Drop requiring package now not preloaded. 2026-05-08 12:27:24 +01:00
Sean Whitton
0c51be894f Unpreload package-activate-all
See <https://debbugs.gnu.org/80079#49> for my reasoning.

* lisp/emacs-lisp/package-activate.el (package-activate-all):
Unpreload.
2026-05-07 14:12:25 +01:00
Eli Zaretskii
187efe4e31 ; * lisp/emacs-lisp/elisp-scope.el (elisp-scope-analyze-form): Doc fix. 2026-05-06 18:54:09 +03:00
Eshel Yaron
39e1505683
; Expand 'elisp-fontify-symbol' and 'elisp-scope-analyze-form' docs
See discussion at
https://yhetil.org/emacs/868q9wag3h.fsf@gnu.org/

* lisp/progmodes/elisp-mode.el (elisp-fontify-symbol):
* lisp/emacs-lisp/elisp-scope.el (elisp-scope-analyze-form):
Expand docstring.
2026-05-06 16:10:33 +02:00
Eshel Yaron
b57124b747
; More 'elisp-scope' and 'elisp-fontify-semantically' doc improvements
See discussion at
https://yhetil.org/emacs/86y0hy9e6g.fsf@gnu.org/

* lisp/emacs-lisp/elisp-scope.el (elisp-scope-analyze-form):
Add example in docstring.
* lisp/progmodes/elisp-mode.el (elisp-fontify-semantically):
Clarify use of 'cursor-sensor-mode'.
2026-05-05 19:10:45 +02:00
Eshel Yaron
0649c501ad
; (elisp-scope-analyze-form): Improve docstring. 2026-05-05 14:30:59 +02:00
Eli Zaretskii
b20307c4c7 ; Fix doc strings of timer-set-* functions
* lisp/emacs-lisp/timer.el (timer-set-time, timer-set-idle-time):
Doc fix.
2026-05-05 07:59:08 +03:00
Stefan Monnier
ed1fe2ca95 nadvice.el: Make it easier to find how to change an interactive-form
* lisp/emacs-lisp/nadvice.el (advice--how-alist): Add ':interactive-only'.
* doc/lispref/functions.texi (Advice Combinators): Document it.
(Core Advising Primitives): Use it.
2026-05-04 20:21:51 -04:00
Stefan Monnier
bc4a4500fc lisp/emacs-lisp/lisp-mode.el (lisp-fdefs): Avoid obsolete "face vars" 2026-05-04 19:37:02 -04:00
Philip Kaludercic
9be140466a
Ensure package archives are loaded for 'package-isolate'
* lisp/emacs-lisp/package.el (package-isolate): Use
'package--archive-contents' instead of the actual variable, to
ensure that we load the archive contents if missing.  This is
likely the case if 'package-isolate' is the first package
function invoked during a session.
2026-05-03 20:25:53 +02:00
Stefan Monnier
e682959b6b (package--builtin-alist): Don't use defconst since we later change it
* lisp/emacs-lisp/package.el (package--builtin-alist): Use `defvar`.
2026-05-03 13:32:51 -04:00
Eli Zaretskii
e420725935 ; * lisp/emacs-lisp/subr-x.el (work-buffer--release): Autoload (bug#80947). 2026-05-02 14:34:59 +03:00
Eli Zaretskii
25659d5a75 ; * lisp/emacs-lisp/pcase.el (pcase-exhaustive): Doc fix. 2026-05-02 13:10:33 +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
Sean Whitton
17f755366e ; Fix shortdoc for seq-concatenate (bug#80810). 2026-04-30 11:41:46 +01:00
Paul Eggert
4fcc8a473a ; Spelling fixes. 2026-04-29 22:45:51 -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
Stefan Monnier
4477ade0fa lisp/emacs-lisp/crm.el (crm-complete-and-exit): Simplify docstring 2026-04-28 16:21:47 -04: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
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