Commit graph

100584 commits

Author SHA1 Message Date
Helmut Eller
c09d1f61c9 Change the format for adjust-marker entries in the undo-list
The format is now:
(apply 0 BEG END undo--adjust-weak-markers ({TPOS {(ID . OFFSET)}*}*))

This no longer exposes the hash table and creates fewer entries.  The
marker for an id can be obtained with the new function
undo--lookup-marker.

The TPOS argument is new; it's needed to test the expected marker
position.  Previously this was implicitly given by the preceding
(TEXT . POSITION) deletion entry.  As undo--adjust-weak-markers is now a
proper function this was necessary.

* lisp/simple.el (undo--adjust-weak-markers): New function.
(primitive-undo): Move the adjust-weak-marker code to
undo--adjust-weak-markers.
* src/undo.c (Qundo__adjust_weak_markers): Renamed
from Qundo__adjust_weak_marker.
(Fundo__lookup_marker): New defun.
(scrub_id_object_pairs): New helper.
(scrub_undo_list, record_marker_adjustments): Adjust for the new format.
(syms_of_undo): Register Fundo__lookup_marker.
* test/src/editfns-tests.el (delete-region-undo-markers-1)
(delete-region-undo-markers-2): Adjust form the new format.
* test/lisp/erc/erc-tests.el (erc-update-undo-list): Adjust for the new
format.
2026-06-12 17:02:40 +02:00
Helmut Eller
2a5adbb807 Allow the GC to collect markers in the undo-list
* src/undo.c (struct weak_marker_table): New struct.
(weak_marker_table): New variable.
(alloc_weak_marker_id, scrub_undo_lists, scrub_undo_list): New
functions.
(record_marker_adjustments)[MPS]: Instead of (MARKER . DISTANCE)
entries, create entries of the form (apply undo--adjust-weak-marker HTAB
ID DISTANCE).  This avoids direct references to markers and hence allows
the GC to collect markers.
(Qundo__adjust_weak_marker): New symbol.
(syms_of_undo): Initialize Qundo__adjust_weak_marker and
weak_marker_table.
* src/lisp.h (scrub_undo_lists): New prototype.
* src/igc.c (process_one_message): Call scrub_undo_lists when a
collection cycle has ended.
* lisp/simple.el (primitive-undo): Handle the new entries.
* test/src/editfns-tests.el (delete-region-undo-markers-1,
delete-region-undo-markers-2): Adjust for new entries.
* test/lisp/erc/erc-tests.el (erc-update-undo-list): Adjust for new
entries.
2026-06-10 11:04:38 +02:00
Pip Cet
540dbab6b1 Merge branch 'savannah/master' into feature/igc3 2026-06-06 14:34:54 +00:00
Eli Zaretskii
4d8fb1623c Merge from origin/emacs-31
a24b081602 ; Fix last change
e33e9f7e85 Document 'margin' face as base for margin display strings...
cff9c8bc00 Improve prompting for mail sending by by 'report-emacs-bug'

# Conflicts:
#	etc/NEWS
2026-06-06 06:19:09 -04:00
Augusto Stoffel
cff9c8bc00 Improve prompting for mail sending by by 'report-emacs-bug'
* lisp/mail/emacsbug.el (report-emacs-bug-hook): Don't ask about
mail sending options if 'message-server-alist' is set.  (Bug#81176)
2026-06-06 11:40:53 +03:00
Po Lu
7ffbf45886 Merge from savannah/emacs-31
916572f6e0 Fix the Android build
3801c09ae2 Don't resurrect invisible child frames when rebuilding pa...
e4350c538f Improve progress-reporter state to remove hard coded leng...
30df8657fb (tex-main-file): Add forgotten safety predicate (bug#81099)
35a82765bf Fix bug in latexenc when AUCTeX is loaded
e9d1367a32 paren.el: Fix part of bug#81035
fd1b5cd890 ; * test/lisp/files-tests.el (w32-downcase-file-names): D...
79391d3e19 ; * lisp/mouse.el (send-to--resolve-handler): Fix last ch...
eb1de3f585 ; Avoid rebuilding Emacs Lisp Intro when building release...
f26f2a832c ; Avoid byte-compilation warning in mouse.el
cf325876fa Adapt Tramp version
84556123eb ; * admin/make-tarball.txt: Update.
8f5b786cac Check buffer-local value in tramp-local-environment-varia...
2026-06-06 11:39:01 +08:00
Paul Eggert
2f69971714 mpc-last-seek-time and mpc--faster are no longer used
* lisp/mpc.el (mpc-last-seek-time, mpc--faster):
Add a FIXME; should they be removed?
2026-06-05 19:16:29 -07:00
Paul Eggert
4fd59d0eba Omit a ‘/’ from org-clock-resolve
* lisp/org/org-clock.el (org-clock-resolve): Replace (floor (/ X
60)) with (floor X 60).
2026-06-05 19:16:29 -07:00
Paul Eggert
5eee9e239b Simplify gnus-backend-trace time calc
* lisp/gnus/gnus-int.el (gnus-backend-trace):
Simplify, since (float-time (time-since nil)) returns 0.0.
2026-06-05 19:16:29 -07:00
Paul Eggert
56b93016fc Simplify epa-ks--display-keys time calc
* lisp/epa-ks.el (epa-ks--display-keys):
Simplify by using time-less-p.  This also avoids a rounding error.
2026-06-05 19:16:29 -07: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
Stéphane Marks
e4350c538f Improve progress-reporter state to remove hard coded length (bug#80988)
Remove hard-coded state range, now a monotonically increasing
integer.

* lisp/subr.el (progress-reporter-update-functions): Update
docstring.
(progress-reporter-echo-area): Use
'progress-reporter--pulse-characters' length.
(progress-reporter-do-update): Increase 'state' by 1 each pass.
*
lisp/system-taskbar.el (system-taskbar--progress-reporter-update):
Make steps independent of 'progress-reporter-echo-area' steps.
2026-06-05 12:55:08 -04:00
Arash Esbati
30df8657fb (tex-main-file): Add forgotten safety predicate (bug#81099)
That variable is commonly set file-locally.

* lisp/textmodes/tex-mode.el (tex-main-file): Add safety predicate.
2026-06-05 12:52:00 -04:00
Al Haji-Ali
35a82765bf Fix bug in latexenc when AUCTeX is loaded
* lisp/international/latexenc.el
(latexenc-find-file-coding-system): Set file name correctly when
`TeX-master' is a string.  (Bug#81099)
2026-06-05 12:44:25 -04:00
Stefan Monnier
e9d1367a32 paren.el: Fix part of bug#81035
* lisp/paren.el (show-paren--default): Syntax-propertize before narrowing.
2026-06-05 12:43:43 -04:00
Eli Zaretskii
79391d3e19 ; * lisp/mouse.el (send-to--resolve-handler): Fix last change. 2026-06-05 15:05:19 +03:00
Eli Zaretskii
f26f2a832c ; Avoid byte-compilation warning in mouse.el
* lisp/mouse.el (send-to): Require, not only when compiling, as
'send-to--resolve-handler' is used at run time.
2026-06-05 14:35:34 +03:00
Michael Albinus
cf325876fa Adapt Tramp version
* lisp/net/trampver.el (customize-package-emacs-version-alist):
Add Tramp version integrated in Emacs 31.1.

* doc/misc/trampver.texi:
* lisp/net/trampver.el (tramp-version): Adapt Tramp versions.
2026-06-05 13:21:15 +02:00
Augusto Stoffel
8f5b786cac Check buffer-local value in tramp-local-environment-variable-p
* lisp/net/tramp.el (tramp-local-environment-variable-p): Do it.
2026-06-05 12:40:08 +02: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
0ee48ac4df ; Update ldefs-boot.el. 2026-06-05 10:57:06 +01:00
Sean Whitton
5e3e1a5bb2 ; Tweak some package short descriptions. 2026-06-05 10:17:27 +01:00
Stefan Monnier
bbe805e4b1 message.el: Fix part of bug#81035
* lisp/gnus/message.el (message-narrow-to-field)
(message-hide-headers): Syntax-propertize before narrowing.
2026-06-04 14:20:06 -04:00
Michael Albinus
621239ae6a Fix prompt in remote shell
* lisp/net/tramp-sh.el (tramp-sh-handle-make-process): Do not use a
hard-coded directory in PS1.  (Bug#81177)
2026-06-04 19:44:07 +02:00
Eli Zaretskii
35f69be393 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2026-06-04 14:48:05 +03:00
Eli Zaretskii
8a00733af5 ; Fix last change
* lisp/plstore.el (plstore--decode, plstore--encode)
(plstore-get, plstore-find): Fix last change.  (Bug#81061)
2026-06-04 14:47:13 +03:00
Sean Whitton
0a8a5d4fad Don't query on exit for dir-status-files VC backend processes
* lisp/vc/vc-bzr.el (vc-bzr-dir-status-files):
* lisp/vc/vc-cvs.el (vc-cvs-dir-status-files):
* lisp/vc/vc-git.el (vc-git-dir-status-goto-stage):
* lisp/vc/vc-hg.el (vc-hg-dir-status-files):
* lisp/vc/vc-svn.el (vc-svn-dir-status-files): Set the
query-on-exit flag for the processes populating VC-Dir buffers
to nil.
2026-06-04 12:04:13 +01:00
Sean Whitton
7226082f46 vc-dir-refresh: Respect non-essential wrt saving buffers
* lisp/vc/vc-dir.el (vc-dir-refresh): If non-essential is
non-nil, don't call vc-buffer-sync-fileset.
2026-06-04 10:49:23 +01:00
Xiyue Deng
aa6acc69ed plstore: use 'plstore--has-secret-keys'
* lisp/plstore.el (plstore-find, plstore-get, plstore--encode)
(plstore--decode): Use 'plstore--has-secret-keys' to replace
manual check for existence of secret keys.  (Bug#81061)
2026-06-04 11:52:14 +03:00
Eli Zaretskii
95ac082d5b Merge branch 'emacs-31' of git.savannah.gnu.org:/srv/git/emacs into emacs-31 2026-06-04 09:37:22 +03:00
Alan Mackenzie
3d9d9be3a1 CC Mode: Fontify a cast type preceding a brace initialization
This fixes bug#81084.
* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1):
In the test for a cast near the end of the function, add a test
for a {...} block which isn't a statement block, allowing such
blocks to be recognized as operands of casts.
2026-06-04 09:34:58 +03:00
Michael Albinus
fe1c02d849 Fix Tramp distrobox integration
* lisp/net/tramp.el (tramp-yesno-prompt-regexp): Fix docstring.
(tramp-yn-prompt-regexp): Fix docstring.  Extend.  Add :version.

* test/lisp/net/tramp-tests.el (tramp-test03-file-error): Adapt test.
2026-06-04 08:34:48 +02:00
David Ponce
e6e79b1e09 Don't unconditionally append the :ascent property in wid-edit
* lisp/wid-edit.el (widget-toggle-value-create): Don't
duplicate the :ascent property if already set.  (Bug#81167)
2026-06-04 09:06:52 +03:00
Rahul Martim Juliato
0989625d36 markdown-ts-mode: fix first-item indent (bug#81118)
* lisp/textmodes/markdown-ts-mode.el
(markdown-ts--fontify-unordered-list-marker): Skip leading
whitespace in the node range before applying the display bullet,
since the tree-sitter grammar bundles indent into the first
list_marker_* node.
2026-06-04 08:41:27 +03:00
Xiyue Deng
d852d36c77 Decrypt plstore when needed in 'plstore-delete'
When a plstore has entries with secret keys, processing the plstore
file would require decryption first.  However, unlike other functions
like 'plstore-get', 'plstore-put', etc., 'plstore-delete' does not
check for secret keys and decrypt the file, which would corrupt the
file when deleting any entries with secret keys.
This patch adds checking for secret keys and decrypt the file when
needed before removing the entry with name.
* lisp/plstore.el (plstore--has-secret-keys): New.
* lisp/plstore.el (plstore-delete): Check for secret keys of the entry
and decrypt plstore before performing the deletion.  (Bug#81061)
2026-06-04 08:37:25 +03:00
Pip Cet
08336b9a55 Always return a list from send-to--collect-items
* lisp/send-to.el (send-to--collect-items): Return singleton list, not
a string directly.
2026-06-03 18:15:22 +00:00
Pip Cet
44fa1595ce * lisp/send-to.el (send-to--resolve-handler): Add autoload. 2026-06-03 18:15:22 +00:00
Michael Albinus
2db5a145ac Support Ansible messages in compilation-mode
* etc/NEWS: Mention Ansible integration in compilation mode.

* etc/compilation.txt: Add examples of Ansible error, warning and
note messages.  Fix typos.

* lisp/progmodes/compile.el
(compilation-error-regexp-alist-alist): Add Ansible regexps for
error, warning and note messages.

* test/lisp/progmodes/compile-tests.el
(compile-tests--test-regexps-data): Add new test cases.
(compile-test-error-regexps): Increase expected infos.
2026-06-02 12:43:08 +02:00
Alexander Adolf
2d915236dc vc--subject-to-file-name: Fix over-greedy regex (bug#81017)
* lisp/vc/vc.el (vc--subject-to-file-name): Make the prefix
regex less greedy, ensure the result has no text properties,
improve the docstring (bug#81017).
2026-06-02 10:55:13 +01:00
F. Jason Park
05f89d711d Fix more missing faces on ERC margin strings
* lisp/erc/erc-goodies.el (keep-place-indicator): Add
`erc-keep-place-indicator-arrow' face to overlay arrow.
* lisp/erc/erc-stamp.el (erc-stamp--display-prompt-in-left-margin)
(erc--conceal-prompt): Add `erc-prompt-face' to entire `left-margin'
string.  See also 9ba65aa9 "Fix missing margin face on display prop in
erc-stamp".
* test/lisp/erc/erc-fill-tests.el (erc-fill--left-hand-stamps): Update
expected text properties on prompt.  (Bug#80693)
2026-06-01 23:09:55 -07:00
João Távora
3229d6f0e3 Eglot: Simplify markdown rendering support (bug#81150)
Now that markdown-ts-view-mode is demoted to "experimental" in emacs-31,
simplify bits of eglot.el and rewrite docs to be more neutral.  In
practice 'gfm-view-mode' is still used if found, just like before, but
intrepid users can still try the "experimental" modes.

* lisp/progmodes/eglot.el (eglot-documentation-renderer): Rewrite
doc string.
(eglot--accepted-formats): Rewrite.
(eglot--builtin-mdown-p): Remove.

* doc/misc/eglot.texi (Customization Variables): Rewrite entry.

* etc/EGLOT-NEWS: Tweak.
2026-06-01 19:57:30 +01:00
João Távora
bfa4d6dd40 Disable markdown-ts-mode & markdown-ts-view-mode for Emacs 31
Ported from emacs-31 release branch:

   commit 984932d4dc
   Author: Sean Whitton <spwhitton@spwhitton.name>
   Date:   Mon Jun 1 11:48:42 2026 +0100

       Disable markdown-ts-mode & markdown-ts-view-mode for Emacs 31

This synchronizes master's Eglot with emacs-31.  The goal of that commit
is to demote those markdown-ts-mode.el modes to "experimental" status in
emacs-31, but Eglot was already relying on them and changes were needed.

984932d4dc is not the commit that best
does those changes, but since that commit was marked "do not merge" on
emacs-31, I thought it best to bring it here manually so any further
work -- which doesn't contradict the overarching intention -- can
continue in emacs-31 with clean merges to master (where the GNU-devel
core Elpa package is pulled from).

* lisp/progmodes/eglot.el (eglot-documentation-renderer)
(eglot--format-markup): Don't call eglot--builtin-mdown-p.
* doc/misc/eglot.texi (Customization Variables):
* etc/EGLOT-NEWS: Don't mention markdown-ts-mode

Co-authored-by: Sean Whitton <spwhitton@spwhitton.name>
2026-06-01 19:11:46 +01:00
Eli Zaretskii
8855e88d74 ; Improve doc strings of brows-url commands
* lisp/net/browse-url.el (browse-url-firefox, browse-url-chromium)
(browse-url-chrome, browse-url-epiphany, browse-url-qutebrowser):
Doc fixes.
2026-06-01 17:57:45 +03:00
Eli Zaretskii
933d35ef10 ; * lisp/net/browse-url.el (browse-url-firefox-program): Add :version. 2026-06-01 17:03:27 +03:00
Sean Whitton
b64d163979 Merge from origin/emacs-31
2c2f1c00ac ; * lisp/vc/vc-dir.el (vc-dir-update): Add an assertion.
51f823a3af ; * etc/NEWS: Fix annotation.
271cc5c76c More tests for fill-paragraph-handle-comment.erts
cc9f35c54b ; * etc/PROBLEMS: Minor fixes of last change.
2727a6f4e8 ; Document problems caused by validation of *.eln files o...
f1dd84bec9 ; * lisp/play/doctor.el (doctor-death): Fix Samaritans UR...
0bfbe06090 Update to Org 9.8.5
aac5e0457a Eglot: replace eglot-prefer-plaintext with eglot-document...
ec3d662de0 Make HTML button elements tab-stoppable in eww (bug#81107)

# Conflicts:
#	etc/NEWS
2026-06-01 11:52:53 +01:00
Sean Whitton
984932d4dc Disable markdown-ts-mode & markdown-ts-view-mode for Emacs 31
Do not merge to master.

* lisp/progmodes/eglot.el (eglot-documentation-renderer)
(eglot--format-markup): Don't call eglot--builtin-mdown-p.
* lisp/textmodes/markdown-ts-mode.el (markdown-ts-mode)
(markdown-ts-view-mode): Mark as experimental.
(auto-mode-alist, treesit-major-mode-remap-alist): Don't add
anything.
* doc/misc/eglot.texi (Customization Variables):
* etc/EGLOT-NEWS:
* etc/NEWS: Don't mention markdown-ts-mode or
markdown-ts-view-mode.
2026-06-01 11:48:42 +01:00
Sean Whitton
2c2f1c00ac ; * lisp/vc/vc-dir.el (vc-dir-update): Add an assertion. 2026-06-01 09:51:08 +01:00
Eli Zaretskii
f1dd84bec9 ; * lisp/play/doctor.el (doctor-death): Fix Samaritans URL (bug#81155). 2026-05-31 12:29:50 +03:00
Kyle Meyer
0bfbe06090 Update to Org 9.8.5 2026-05-31 01:42:27 -04:00
João Távora
aac5e0457a Eglot: replace eglot-prefer-plaintext with eglot-documentation-renderer
The old boolean 'eglot-prefer-plaintext' is replaced by the more
expressive 'eglot-documentation-renderer', which can hold a major-mode
symbol, t (plain text), or nil (auto-detect each time).  By selecting a
renderer once at startup the repeated per-request lookups are avoided,
which helps with the slowness reported in bug#81150.

* lisp/progmodes/eglot.el (eglot-prefer-plaintext): Declare obsolete
alias to 'eglot-documentation-renderer'.
(eglot-documentation-renderer): New defcustom, reworked from from
eglot-prefer-plaintext.
(eglot--accepted-formats): Use new variable.
(eglot--format-markup): Use new variable.

* etc/EGLOT-NEWS: Announce change.

* doc/misc/eglot.texi (Customization Variables): Document
  eglot-documentation-renderer.
2026-05-30 18:22:54 +01:00