]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 months agoImprove logic of tab handling when quitting windows (bug#71386)
Juri Linkov [Mon, 31 Mar 2025 17:40:17 +0000 (20:40 +0300)]
Improve logic of tab handling when quitting windows (bug#71386)

* lisp/window.el (window-deletable-p): Add tab logic that returns
the symbol 'tab' for a set of predefined conditions.
(window--delete): Call 'tab-bar-close-tab' when 'window-deletable-p'
returns the symbol 'tab'.
(quit-restore-window): Remove tab logic and merge it with frame logic.

* test/lisp/tab-bar-tests.el (tab-bar-tests-close-other-tabs-default)
(tab-bar-tests-close-other-tabs-with-arg): Clean up tabs afterwards.
(tab-bar-tests-quit-restore-window): New test.

(cherry picked from commit a97a61b630624f5a6ec917db92e2985c56b20aa0)

2 months ago(insert-kbd-macro): Polish
Stefan Monnier [Mon, 31 Mar 2025 16:01:18 +0000 (12:01 -0400)]
(insert-kbd-macro): Polish

* lisp/macros.el (insert-kbd-macro): Straighten control flow, use `pp`
and `keymap-global-set`.

(cherry picked from commit 513a05dd8761aebc14ffe4ee0a8a6e96feb10531)

2 months agolisp/macros.el (insert-kbd-macro): Fix anonymous case (bug#77317)
Stefan Monnier [Mon, 31 Mar 2025 15:36:20 +0000 (11:36 -0400)]
lisp/macros.el (insert-kbd-macro): Fix anonymous case (bug#77317)

(cherry picked from commit 10eb57169da01f3f96a5954aa42673d10086824f)

2 months agojapan-util.el: Cosmetic changes
Stefan Monnier [Mon, 31 Mar 2025 14:21:58 +0000 (10:21 -0400)]
japan-util.el: Cosmetic changes

* lisp/language/japan-util.el (<toplevel>): Use `pcase-dolist` and `when`.
(japanese-string-conversion): Use `point-min`.

(cherry picked from commit b148e98de37e43dd28207b696994e72808683291)

2 months agoFix replace-region in japan-util.el
Eli Zaretskii [Mon, 31 Mar 2025 13:55:49 +0000 (16:55 +0300)]
Fix replace-region in japan-util.el

* lisp/language/japan-util.el (japanese-replace-region): Allow
STRING to be a character in addition  to a string.  Un-obsolete
it.
(japanese-katakana-region, japanese-hiragana-region)
(japanese-hankaku-region, japanese-zenkaku-region): Call
'japanese-replace-region' instead of 'replace-region-contents'.
(Bug#77397)

(cherry picked from commit fa5cd6b4d917ea6468a4950bff5b8b122468c7ec)

2 months ago; Twice mention 'tab' value in buffer display doc-strings (Bug#71386)
Martin Rudalics [Mon, 31 Mar 2025 07:46:17 +0000 (09:46 +0200)]
; Twice mention 'tab' value in buffer display doc-strings (Bug#71386)

* lisp/window.el (display-buffer-record-window)
(window--display-buffer): Mention value 'tab' for TYPE argument
(Bug#71386).

(cherry picked from commit 1ed1cc83491311517ba46dff73fdc4383ffd4102)

2 months ago; Skip commit 10991877c8d6e47837b8a8d25c44dab7803b9030
Eshel Yaron [Mon, 31 Mar 2025 08:55:59 +0000 (10:55 +0200)]
; Skip commit 10991877c8d6e47837b8a8d25c44dab7803b9030

2 months agoRespect narrowed buffers when parsing JSON (bug#77325)
Pip Cet [Fri, 28 Mar 2025 02:33:19 +0000 (02:33 +0000)]
Respect narrowed buffers when parsing JSON (bug#77325)

* src/json.c (Fjson_insert): Simplify 'memcpy' argument.
(Fjson_parse_buffer): Only read to ZV, not all the way to Z.
* test/src/json-tests.el (with-all-gap-positions-in-temp-buffer):
New macro.
(json-parse-buffer/restricted): New test.

(cherry picked from commit 67e34f0ed8f6d3bbc78187a18f71010c70e10426)

2 months agoFix display of overlay arrow immediately after invisible text
Eli Zaretskii [Sun, 30 Mar 2025 07:29:57 +0000 (10:29 +0300)]
Fix display of overlay arrow immediately after invisible text

* src/xdisp.c (overlay_arrow_at_row): Allow the overlay arrow's
marker position to be anywhere between the row's start and end
charpos.  This keeps the overlay arrow on display even when the
preceding text is invisible.  (Bug#54843)

(cherry picked from commit 209b7e7444df5cb164679c0e55f46cba424ad13c)

2 months agolisp/emacs-lisp/cl-macs.el (cl-labels): Fix docstring (bug#77348)
Stefan Monnier [Sun, 30 Mar 2025 04:44:50 +0000 (00:44 -0400)]
lisp/emacs-lisp/cl-macs.el (cl-labels): Fix docstring (bug#77348)

(cherry picked from commit e6b4c0bcebf4376f60e7801be5f998b42c1e6b06)

2 months agoTighten the criteria for a defun in typescript-ts-mode (bug#77369)
Yuan Fu [Sun, 30 Mar 2025 04:15:02 +0000 (21:15 -0700)]
Tighten the criteria for a defun in typescript-ts-mode (bug#77369)

* lisp/progmodes/typescript-ts-mode.el:
(typescript-ts-mode--defun-predicate): New function.
(typescript-ts-base-mode): Use new predicate.

(cherry picked from commit 651418895d507001f161e2e22ca9b85647bca19b)

2 months agosrc/insdel.c (replace_range): Remove comment
Stefan Monnier [Sun, 30 Mar 2025 04:10:12 +0000 (00:10 -0400)]
src/insdel.c (replace_range): Remove comment

It should have been removed in commit b16afa45bb6a.

(cherry picked from commit e1b15d58b508da279162c585b6b3783f9e267427)

2 months agoDon't obsolete the _command_ replace-buffer-contents
Po Lu [Sun, 30 Mar 2025 02:24:45 +0000 (10:24 +0800)]
Don't obsolete the _command_ replace-buffer-contents

* lisp/subr.el (replace-buffer-contents): Don't obsolete
function.  Its purpose is to serve as a command and such
obsoletion was unnecessary to begin with.

(cherry picked from commit 468778f390fa521773634094845749ab766fdcfd)

2 months agotime-stamp source commentary: point to manual section
Stephen Gildea [Sat, 29 Mar 2025 23:48:58 +0000 (16:48 -0700)]
time-stamp source commentary: point to manual section

* lisp/time-stamp.el: Add an Info link in the commentary,
now that the manual has more to say.
* doc/emacs/files.texi (Time Stamps for One File): Expand one
consistent example.

(cherry picked from commit 5d620aefae267a12b4046606f85e6f2865d729da)

2 months agoOrg: Use new `replace-region-contents`
Stefan Monnier [Fri, 28 Mar 2025 04:49:33 +0000 (00:49 -0400)]
Org: Use new `replace-region-contents`

* lisp/org/org-compat.el (org-replace-buffer-contents): Delete function.
(org-replace-region-contents): New function.
* lisp/org/org-src.el (org-edit-src-save, org-edit-src-exit): Use it.

(cherry picked from commit 6bcf41c311b220e84f4eb423700f36ac1ddfffa7)

2 months agoUse `replace-region-contents` to replace insert+delete
Stefan Monnier [Fri, 28 Mar 2025 05:01:17 +0000 (01:01 -0400)]
Use `replace-region-contents` to replace insert+delete

* lisp/minibuffer.el (completion--replace):
* lisp/emacs-lisp/cl-lib.el (cl--set-buffer-substring):
* lisp/subr.el (replace-string-in-region):
Use `replace-region-contents` instead of insert+delete.

* lisp/help-fns.el (help-fns--signature):
Use `replace-region-contents` instead of `cl--set-buffer-substring`.

* lisp/language/japan-util.el (japanese-replace-region):
Rewrite using `replace-region-contents` and mark obsolete.
(japanese-katakana-region, japanese-hankaku-region):
Use `replace-region-contents` instead.

* lisp/progmodes/flymake-proc.el (flymake-proc--replace-region):
Rewrite using `replace-region-contents` and mark obsolete.
(flymake-proc--check-patch-master-file-buffer):
Use `replace-region-contents` instead.

(cherry picked from commit 1d07a6d7e34677be1653b1d4d464ff00cabfa102)

2 months agoReplace uses of `replace-buffer-contents`
Stefan Monnier [Fri, 28 Mar 2025 04:48:28 +0000 (00:48 -0400)]
Replace uses of `replace-buffer-contents`

* lisp/vc/vc.el (vc-diff-restore-buffer):
* lisp/progmodes/python.el (python--do-isort):
* lisp/progmodes/eglot.el (eglot--apply-text-edits):
* lisp/files.el (revert-buffer-insert-file-contents-delicately):
* lisp/json.el (json-pretty-print): Use `replace-region-contents`.

(cherry picked from commit 468c2aebae0ee13273f4b06e92f4188c4c46d2b3)

2 months agosrc/insdel.c (adjust_markers_for_replace): Fix insertion case
Stefan Monnier [Sat, 29 Mar 2025 20:40:19 +0000 (16:40 -0400)]
src/insdel.c (adjust_markers_for_replace): Fix insertion case

test/src/editfns-tests.el (editfns-tests--insert-via-replace): New test

(cherry picked from commit 57da44fa702782e19cd9d60ea63ec2fd9ca48521)

2 months ago(replace-region-contents): Improve and promote (bug#76313)
Stefan Monnier [Fri, 28 Mar 2025 04:46:53 +0000 (00:46 -0400)]
(replace-region-contents): Improve and promote (bug#76313)

Swap the role of `replace-region-contents` and `replace-buffer-contents`,
so `replace-region-contents` is the main function, implemented in C,
and `replace-buffer-contents` is a mere wrapper (marked as obsolete).
Also remove the need to rely on narrowing and on describing the
new text as a function.
Finally, allow MAX-SECS==0 to require a cheap replacement, and
add an INHERIT argument.

* src/editfns.c: Include `coding.h`.
(Freplace_region_contents): Rename from `Freplace_buffer_contents`.
Change calling convention to that of `replace-region-contents`.
Add more options for the SOURCE argument.  Add INHERIT argument.
Skip the costly algorithm if MAX-SECS is 0.
* src/insdel.c (replace_range): Allow NEW to be a buffer.

* lisp/subr.el (replace-buffer-contents): New implementation.
* lisp/emacs-lisp/subr-x.el (replace-region-contents): Delete.

* doc/lispref/text.texi (Replacing): Document new API for
`replace-region-contents`.  Remove documentation of
`replace-buffer-contents`.

* test/src/editfns-tests.el (replace-buffer-contents-1)
(replace-buffer-contents-2, replace-buffer-contents-bug31837):
Use `replace-region-contents`.
(editfns--replace-region): Delete.
(editfns-tests--replace-region): Use `replace-region-contents`.
Adds tests for new types of SOURCE args.

(cherry picked from commit 7c82cc8b975175aebbad1c43ec1cd98b3232f482)

2 months ago; Skip commit b98fe25c2ee2ac2d82b337c49d1aa1dfed2417eb
Eshel Yaron [Mon, 31 Mar 2025 08:38:44 +0000 (10:38 +0200)]
; Skip commit b98fe25c2ee2ac2d82b337c49d1aa1dfed2417eb

2 months ago; * admin/notes/java: Document substitutes for `goto' in Java.
Po Lu [Sat, 29 Mar 2025 14:37:39 +0000 (22:37 +0800)]
; * admin/notes/java: Document substitutes for `goto' in Java.

(cherry picked from commit 04bd6497300789cd90b365299885517d92292648)

2 months agoFix minor issues in documentation of `use-package'
Dominik Schrempf [Thu, 27 Mar 2025 14:54:52 +0000 (15:54 +0100)]
Fix minor issues in documentation of `use-package'

(Bug#77311)

Copyright-paperwork-exempt: yes
(cherry picked from commit 7a976d1aaf7f555146ea890cc086edefe3f8ef58)

2 months agoUse 'hash-table-contains-p' in a few places
Stefan Kangas [Sat, 29 Mar 2025 12:50:21 +0000 (13:50 +0100)]
Use 'hash-table-contains-p' in a few places

This replaces open coded versions of the common idiom
    (not (eq (gethash key table 'missing) 'missing))
with
    (hash-table-contains-p key table)
in files where we can rely on features in Emacs 31.

* lisp/emacs-lisp/map.el (map-contains-key):
* lisp/external-completion.el (external-completion-table):
* lisp/mh-e/mh-utils.el (mh-sub-folders)
(mh-remove-from-sub-folders-cache):
* lisp/net/ange-ftp.el (ange-ftp-hash-entry-exists-p):
* lisp/password-cache.el (password-in-cache-p, password-cache-add):
* lisp/pcmpl-x.el (pcmpl-x-tlmgr-action-options):
* lisp/xdg.el (xdg-mime-apps): Use 'hash-table-contains-p'.

(cherry picked from commit f60fc1287d499e8c93857b1b96e8bd2467b22c8d)

2 months agoNew function 'hash-table-contains-p'
Stefan Kangas [Sat, 29 Mar 2025 13:59:26 +0000 (14:59 +0100)]
New function 'hash-table-contains-p'

This function tests whether a given key is present in a hash table.
Emacs Lisp has long lacked a standard way to do this, leading users to
write one of:

    (not (eq (gethash key table 'missing) 'missing))
or
    (gethash key table)

This idiom is error-prone (when 'missing' or 'nil' are valid values),
and it obscures intent.  The new function avoids such pitfalls,
improves readability, and makes the intent explicit:

    (hash-table-contains-p key table)

The name 'hash-table-contains-p' exists in other Lisp dialects (e.g.,
SRFI-125), and follows the precedent of 'seq-contains-p'.  Other
alternatives considered include `hash-table-has-key-p` and
`hash-table-key-exists-p`, but none were clearly better.

This was previously discussed in 2018, and all comments were positive,
but the proposed patch (implementing it in C) was never pushed:
https://lists.gnu.org/r/emacs-devel/2018-02/msg00424.html

* lisp/subr.el (hash-table-contains-p): New function.
* lisp/emacs-lisp/shortdoc.el (hash-table):
* doc/lispref/hash.texi (Other Hash): Document the new function.
* test/lisp/subr-tests.el (hash-table-contains-p): New test.

(cherry picked from commit dd0dd87e3aaf3116c400fba858cbe35ced15f04e)

2 months agoRemove redundant constant nil argument to gethash
Stefan Kangas [Sat, 29 Mar 2025 11:34:37 +0000 (12:34 +0100)]
Remove redundant constant nil argument to gethash

* lisp/cedet/ede/files.el (ede--directory-project-from-hash):
* lisp/emacs-lisp/edebug.el (edebug-unwrap*):
* lisp/emacs-lisp/testcover.el (testcover--copy-object1):
* lisp/net/zeroconf.el (zeroconf-get-service, zeroconf-resolve-service)
(zeroconf-register-service-browser, zeroconf-service-browser-handler)
(zeroconf-register-service-resolver):
* lisp/url/url-history.el (url-have-visited-url): Remove redundant
constant nil argument to gethash.

(cherry picked from commit 14cf4d538350fd2b1eda35101f5bb585f55e4659)

2 months ago; * lisp/treesit-x.el : Call 'treesit-declare-unavailable-functions'.
Eli Zaretskii [Sat, 29 Mar 2025 13:16:51 +0000 (09:16 -0400)]
; * lisp/treesit-x.el : Call 'treesit-declare-unavailable-functions'.

(cherry picked from commit bfabae993113aa0a35298950355333497bc0d485)

2 months ago; Fix a merge snafu.
Eli Zaretskii [Sat, 29 Mar 2025 12:54:30 +0000 (08:54 -0400)]
; Fix a merge snafu.

(cherry picked from commit 988111937b44433490d20593c2a1e543575ae940)

2 months ago'uniquify' user option setters and automatic buffer refresh (bug#77157)
shipmints [Fri, 21 Mar 2025 17:59:03 +0000 (13:59 -0400)]
'uniquify' user option setters and automatic buffer refresh (bug#77157)

Use 'customize', 'setopt', or 'uniquify--set-option' instead of
'setq' to benefit.

* lisp/uniquify.el (uniquify--buffer-refresh): New function.
(uniquify--set-option): New function.
(uniquify-buffer-name-style): Add :initialize and :set forms.
(uniquify-ignore-buffers-re): Add :initialize and :set forms.
(uniquify-min-dir-content): Add :initialize and :set forms.
(uniquify-separator): Add :initialize and :set forms.
(uniquify-strip-common-suffix): Add :initialize and :set forms.
(uniquify-dirname-transform): Add :initialize and :set forms.

(cherry picked from commit 3e228c9eea56cf25234b99e1411114baa732f53f)

2 months agoFix compiler warnings in mhtml-ts-mode.el (bug#77017).
Vincenzo Pupillo [Sat, 22 Mar 2025 11:30:30 +0000 (12:30 +0100)]
Fix compiler warnings in mhtml-ts-mode.el (bug#77017).

* lisp/textmodes/mhtml-ts-mode.el:
Added variable and function declarations to prevent compiler
warnings.
(mhtml-ts-mode): Require 'html-ts-mode' after checking that
the html parser is available.

(cherry picked from commit 7a8e2e572902094ec7f7e3839d0224a3408e196a)

2 months agoPHP should be in the PATH, either locally or remotely. (bug#76242).
Vincenzo Pupillo [Fri, 14 Mar 2025 20:11:22 +0000 (21:11 +0100)]
PHP should be in the PATH, either locally or remotely. (bug#76242).

* lisp/progmodes/php-ts-mode.el
(php-ts-mode-php-default-executable): Renamed from
'php-ts-mode-php-executable'.
(php-ts-mode--executable): New function that returns the absolute
filename of the PHP executable, local or remote, based on
'default-directory'.
(php-ts-mode--anchor-prev-sibling): Replaced 'when-let' with
“when-let*.”
(php-ts-mode--indent-defun): Replaced 'when-let' with
'when-let*'.
(php-ts-mode-run-php-webserver): Use the new function
(php-ts-mode-php-default-executable).
(run-php): Use the new function (php-ts-mode-php-default-executable).

(cherry picked from commit 99ff59bd66cc07df40b14cb0a8acf22d440581e5)

2 months ago; Skip commit d94d6c0f02f90ad099b926ecccfea2fe1d23659e
Eshel Yaron [Mon, 31 Mar 2025 08:33:47 +0000 (10:33 +0200)]
; Skip commit d94d6c0f02f90ad099b926ecccfea2fe1d23659e

2 months ago; Fix last change (bug#77081)
Eli Zaretskii [Sat, 29 Mar 2025 11:01:35 +0000 (14:01 +0300)]
; Fix last change (bug#77081)

* lisp/electric.el (electric-block-comment-mode): Fix whitespace.

* etc/NEWS: Move entry to its proper place; fix punctuation.

(cherry picked from commit e9a07417ab280ea627594fa4328c5a0b2de6fd7c)

2 months agoNew minor mode: `electric-block-comment-mode'
Elías Gabriel Pérez [Mon, 17 Mar 2025 18:56:52 +0000 (12:56 -0600)]
New minor mode: `electric-block-comment-mode'

This minor lets you automatically closing block comments after
typing `block-comment-start'.  Thus, typing "/*" in c-mode and
its derivatives automatically inserts "*/".  (Bug#77081)

* etc/NEWS: Add minor-mode item.
* lisp/electric.el
(electric-block-comment-post-self-insert-function): New function.
(electric-block-comment-mode): New minor mode definition.

(cherry picked from commit 989f9f01f731c0dd0382bad50f1c45894d69c3ea)

2 months ago; * lisp/emacs-lisp/eldoc.el (eldoc-help-at-pt): Add :version tag (bug#77227).
Eli Zaretskii [Sat, 29 Mar 2025 10:52:31 +0000 (13:52 +0300)]
; * lisp/emacs-lisp/eldoc.el (eldoc-help-at-pt): Add :version tag (bug#77227).

(cherry picked from commit 2dd871a358e5aeea7ea343e06497760ac36464cc)

2 months agoNew Eldoc function `eldoc-show-help-at-pt'
Daniel Mendler [Sat, 22 Mar 2025 09:29:45 +0000 (10:29 +0100)]
New Eldoc function `eldoc-show-help-at-pt'

Show `help-at-pt' string via Eldoc as an alternative to the
`help-at-pt-display-when-idle' timer.  The help-at-pt timer
competes with Eldoc for the echo area, such that the two
mechanisms do not work well together.  Therefore when using
Eldoc, the setting `eldoc-help-at-pt' may be preferable.
* lisp/emacs-lisp/eldoc.el (eldoc-help-at-pt): New customization option.
(eldoc-show-help-at-pt): New Eldoc function.
(eldoc-documentation-functions): Register the new function.
* lisp/help-at-pt.el (help-at-pt-display-when-idle): Mention
`eldoc-help-at-pt' in the docstring.
* doc/emacs/help.texi: Document `eldoc-help-at-pt'.
* etc/NEWS: Announce the change.  (Bug#77169)

(cherry picked from commit ab71699e5f2502aff6c65dd195611cfbbe2f2255)

2 months agoImprove message handling on server stop
Jens Schmidt [Sat, 8 Mar 2025 17:13:54 +0000 (18:13 +0100)]
Improve message handling on server stop

* lisp/server.el (server-stop): Use a clearer signal message if there is
an existing, external Emacs server.
(server-start): Use a different warning if one attempts to only
stop (and not restart) an external server.
(server-unload-function): Silently stop the server if unloading its
library.  (Bug#76870)

(cherry picked from commit b832d37410c955b30adfb89e17339e406eeefa01)

2 months agoAvoid warning when loading 'go-ts-mode'
Eli Zaretskii [Sat, 29 Mar 2025 10:36:02 +0000 (13:36 +0300)]
Avoid warning when loading 'go-ts-mode'

* lisp/progmodes/go-ts-mode.el (treesit-ready-p): Silence the
warning if the gomod language library is not installed.
(Bug#77213)

(cherry picked from commit 26873d5028ed8aa0e2fc56c7d6ed3b43ff976d3c)

2 months ago; Skip commit 0b2e3db910987f31175698b1728f41988d83e5ec
Eshel Yaron [Mon, 31 Mar 2025 08:32:28 +0000 (10:32 +0200)]
; Skip commit 0b2e3db910987f31175698b1728f41988d83e5ec

2 months ago; Fix last change
Eli Zaretskii [Sat, 29 Mar 2025 10:22:11 +0000 (13:22 +0300)]
; Fix last change

* lisp/files.el (auto-mode-alist):
* etc/NEWS: Fix last change.  (Bug#77138)

(cherry picked from commit cedefabfcfbe283fd539d8d290db550069807126)

2 months agoAdd major mode for highlighting npmrc files (Bug#77138)
Konstantin Kharlamov [Thu, 20 Mar 2025 16:17:32 +0000 (19:17 +0300)]
Add major mode for highlighting npmrc files (Bug#77138)

* etc/NEWS: mention the new mode.
* lisp/textmodes/conf-mode.el (conf-npmrc-mode-syntax-table): New
variable.
* lisp/textmodes/conf-mode.el (conf-npmrc-mode): New major mode
derived from conf-mode for highlighting .npmrc files.
* lisp/files.el (auto-mode-alist): Associate the new mode with .npmrc
files.

(cherry picked from commit 891f51fe118597ffe58d5d817fff693db3188639)

2 months agoDo not redundantly dump constant forwarding objects
Po Lu [Sat, 29 Mar 2025 06:45:38 +0000 (14:45 +0800)]
Do not redundantly dump constant forwarding objects

* src/pdumper.c (dump_fwd_int, dump_fwd_bool, dump_fwd_obj): Do
not redundantly dump constant forwarding descriptors; restrict
to dumping the objects being forwarded to.
(dump_fwd_buffer_obj): Copy from the dump file into bss rather
than load buffer forwarding descriptors from the dump file
itself.
(dump_fwd_kboard_obj): Delete function.
(dump_fwd): Don't return offset of dumped objects.
(dump_blv): Adjust correspondingly.
(dump_pre_dump_symbol): Improve documentation.  Record offset of
forwarding objects in relation to `emacs_basis' rather than the
dump file.
(dump_symbol): Restore forwarding descriptors to their original
values as static variables in Emacs.  This reduces the size of
dump files by an insignificant 2kb but facilitates certain kinds
of watchpoints on platforms where ASLR cannot be disabled, e.g.,
Android.

(cherry picked from commit 2b7a72b1177a057813f40aacc24fd0cd71f5903a)

2 months ago; Skip commit 8a986e7075dc83c0b87f0928ba767215c3c6a377
Eshel Yaron [Mon, 31 Mar 2025 08:31:29 +0000 (10:31 +0200)]
; Skip commit 8a986e7075dc83c0b87f0928ba767215c3c6a377

2 months ago; Skip commit 8acbde02a03b4cdf8dcfba0472e9eb4a440028f6
Eshel Yaron [Mon, 31 Mar 2025 08:31:13 +0000 (10:31 +0200)]
; Skip commit 8acbde02a03b4cdf8dcfba0472e9eb4a440028f6

2 months ago; Fix package-version values
Eli Zaretskii [Thu, 27 Mar 2025 11:52:22 +0000 (13:52 +0200)]
; Fix package-version values

* lisp/textmodes/rst.el (rst-compile-toolsets):
* lisp/which-key.el (which-key-idle-delay): Fix package-version.

(cherry picked from commit a702f29a00b0362b6060bbf4c83edcdc61b5fe32)

2 months ago; * lisp/which-key.el (which-key-idle-delay): Fix package-version.
Eli Zaretskii [Thu, 27 Mar 2025 11:49:10 +0000 (13:49 +0200)]
; * lisp/which-key.el (which-key-idle-delay): Fix package-version.

(cherry picked from commit a1fbc51dc715bf9eaa89b165f902eef9dd819077)

2 months ago; Skip commit 9a07d64f5c734f08baa741d763640943a7b407e7
Eshel Yaron [Mon, 31 Mar 2025 08:29:27 +0000 (10:29 +0200)]
; Skip commit 9a07d64f5c734f08baa741d763640943a7b407e7

2 months ago; Improve type specifier documentation
Stefan Kangas [Tue, 25 Mar 2025 22:16:11 +0000 (23:16 +0100)]
; Improve type specifier documentation

* doc/lispref/functions.texi (Declare Form): Clarify wording for
precision and consistency; note consequences of incorrect declarations.
* doc/lispref/objects.texi (Type Specifiers): Mention use by the native
compiler; tighten wording.

(cherry picked from commit b3881ac443f2ab279aba3d9687792c71d97554d0)

2 months ago; Improve documentation of "function types"
Eli Zaretskii [Tue, 25 Mar 2025 12:37:17 +0000 (14:37 +0200)]
; Improve documentation of "function types"

* doc/lispref/functions.texi (Declare Form):
* doc/lispref/objects.texi (Type Specifiers): Improve wording and
indexing.

(cherry picked from commit 6a3e2b88d26db4f703c566cf9b508f8c83ea8850)

2 months agoFlymake: remove unneeded 'require'
Eshel Yaron [Mon, 31 Mar 2025 08:23:04 +0000 (10:23 +0200)]
Flymake: remove unneeded 'require'

2 months agoRemove 'checkdoc-minor-mode'
Eshel Yaron [Mon, 31 Mar 2025 08:22:51 +0000 (10:22 +0200)]
Remove 'checkdoc-minor-mode'

2 months ago; Fix build
Eshel Yaron [Sun, 30 Mar 2025 15:24:53 +0000 (17:24 +0200)]
; Fix build

2 months agoscope.el: 'nnoo-define-basics' is unsafe.
Eshel Yaron [Sun, 30 Mar 2025 15:17:18 +0000 (17:17 +0200)]
scope.el: 'nnoo-define-basics' is unsafe.

2 months agoelisp-mode.el: Improve xref-backend-references impl.
Eshel Yaron [Sat, 29 Mar 2025 20:49:00 +0000 (21:49 +0100)]
elisp-mode.el: Improve xref-backend-references impl.

2 months agoscope.el: Fix some errors
Eshel Yaron [Sat, 29 Mar 2025 20:48:32 +0000 (21:48 +0100)]
scope.el: Fix some errors

2 months ago(minibuffer-add-completion-predicate): Evaluate non-symbols.
Eshel Yaron [Sat, 29 Mar 2025 20:45:24 +0000 (21:45 +0100)]
(minibuffer-add-completion-predicate): Evaluate non-symbols.

2 months ago(macroexp-quote): Add optional argument Q.
Eshel Yaron [Sat, 29 Mar 2025 20:44:38 +0000 (21:44 +0100)]
(macroexp-quote): Add optional argument Q.

2 months ago* lisp/help.el (where-is): Remove prefix arg, clean up.
Eshel Yaron [Sat, 29 Mar 2025 20:42:15 +0000 (21:42 +0100)]
* lisp/help.el (where-is): Remove prefix arg, clean up.

2 months ago; (find-function-search-for-symbol): Be cautious with macros.
Eshel Yaron [Fri, 28 Mar 2025 16:57:35 +0000 (17:57 +0100)]
; (find-function-search-for-symbol): Be cautious with macros.

2 months ago; Time Stamps doc: expand the explanation of the examples
Stephen Gildea [Fri, 28 Mar 2025 14:04:03 +0000 (07:04 -0700)]
; Time Stamps doc: expand the explanation of the examples

* doc/emacs/files.texi (Time Stamps): Divide into three sections.
* doc/emacs/emacs.texi: Add new nodes to menu.
* lisp/time-stamp.el: Change reference to new node.

(cherry picked from commit 7527e395499e7ef24249b286dda87d7feb04fb8e)

2 months agoRemove a use of a PUA Unicode character (bug#77328)
Gerd Möllmann [Fri, 28 Mar 2025 13:44:35 +0000 (14:44 +0100)]
Remove a use of a PUA Unicode character (bug#77328)

* lisp/progmodes/eglot.el (eglot-code-action-indicator): Use
U+1F4A1 ELECTRIC LIGHT BULB instead of a PUA character.

(cherry picked from commit 638ec3cd66e51f9287dbea8e8c9d037bfa28ad0e)

2 months ago; Skip commit da9a3f558d1f9cbe44e5e791028234c5a593d945
Eshel Yaron [Fri, 28 Mar 2025 16:57:17 +0000 (17:57 +0100)]
; Skip commit da9a3f558d1f9cbe44e5e791028234c5a593d945

2 months agoMiscellaneous corrections
Po Lu [Fri, 28 Mar 2025 08:10:12 +0000 (16:10 +0800)]
Miscellaneous corrections

* src/buffer.h (BUF_PTR_BYTE_POS): Fix comment.

* src/profiler.c (add_sample): Use BASE_EQ.

(cherry picked from commit ed3d8bb298bf4c7ef39a08392ace3271686cd5c0)

2 months ago; Skip commit 9720e1a96ed78fb86b24787f9986f14bad108c96
Eshel Yaron [Fri, 28 Mar 2025 16:57:10 +0000 (17:57 +0100)]
; Skip commit 9720e1a96ed78fb86b24787f9986f14bad108c96

2 months ago; Skip commit 01f4a0cb6cb15fbbc28e64abd94cb38604a24672
Eshel Yaron [Fri, 28 Mar 2025 16:56:49 +0000 (17:56 +0100)]
; Skip commit 01f4a0cb6cb15fbbc28e64abd94cb38604a24672

2 months ago; Skip commit 364c3dbc12e7b6d41ab449dd495c96d08874310e
Eshel Yaron [Fri, 28 Mar 2025 16:56:42 +0000 (17:56 +0100)]
; Skip commit 364c3dbc12e7b6d41ab449dd495c96d08874310e

2 months ago; Skip commit 59fd8c26be2f7724a5c8cb583383f2025171c660
Eshel Yaron [Fri, 28 Mar 2025 16:30:26 +0000 (17:30 +0100)]
; Skip commit 59fd8c26be2f7724a5c8cb583383f2025171c660

2 months ago; Silence compilation warning
Eshel Yaron [Fri, 28 Mar 2025 16:30:11 +0000 (17:30 +0100)]
; Silence compilation warning

2 months agoHandle better changed default-directory in shell-command
Michael Albinus [Thu, 27 Mar 2025 16:48:20 +0000 (17:48 +0100)]
Handle better changed default-directory in shell-command

* lisp/simple.el (shell-command): Kill buffer-local values of
`shell-file-name' and `shell-command-switch', there could be left
connection-local values.  (Bug#76888)

(cherry picked from commit 37b8acf3781a65d397a946f621893b07a0960de0)

2 months ago; Reorder initialization of module environment functions.
Philipp Stephani [Thu, 27 Mar 2025 13:07:39 +0000 (14:07 +0100)]
; Reorder initialization of module environment functions.

* src/emacs-module.c (initialize_environment): Reorder assignments to
match declaration order in emacs-module.h.

(cherry picked from commit f22af15aef96c95de35a37ee72d2055579d5b297)

2 months agow32: fail gracefully when using invalid glyphs on DWrite
Cecilio Pardo [Thu, 27 Mar 2025 12:26:00 +0000 (13:26 +0100)]
w32: fail gracefully when using invalid glyphs on DWrite

* src/w32dwrite.c (text_extents_internal): Return false instead
of crashing with bad glyph indexes.  (Bug#77196)

(cherry picked from commit 33a46ff565296b491e808aa63d1dbaa2d994bbb5)

2 months agolisp/help-fns.el (help-fns--signature): Pretty print type
Stefan Monnier [Thu, 27 Mar 2025 12:59:06 +0000 (08:59 -0400)]
lisp/help-fns.el (help-fns--signature): Pretty print type

(cherry picked from commit 0cbe17cdb6b44606cfb831358ed83cdbf22a01e3)

2 months agopeg.texi: Fix bug#76555 even a bit more
Yue Yi [Wed, 26 Mar 2025 02:22:08 +0000 (22:22 -0400)]
peg.texi: Fix bug#76555 even a bit more

* doc/lispref/peg.texi (Parsing Expression Grammars):
Fix other part of the grammar of `define-peg-ruleset` example.

(cherry picked from commit ba409f37125a4cf8b99718f9252f7804229663a2)

2 months agopeg.texi: Fix bug#76555 even a bit more
Yue Yi [Wed, 26 Mar 2025 02:20:50 +0000 (22:20 -0400)]
peg.texi: Fix bug#76555 even a bit more

* doc/lispref/peg.texi (Parsing Expression Grammars):
Fix grammar of `define-peg-ruleset` example.

(cherry picked from commit 1d7fe589fad13595a0923bbd23939166f0ad639c)

2 months agoPEG: Fix bug#76555
Stefan Monnier [Wed, 26 Mar 2025 02:17:05 +0000 (22:17 -0400)]
PEG: Fix bug#76555

* doc/lispref/peg.texi (Parsing Expression Grammars):
Fix `define-peg-ruleset` example.

* lisp/progmodes/peg.el (define-peg-rule): Fix indent rule.

(cherry picked from commit 1db7aaceb9fe9b78838ad06199e3fbba830737e9)

2 months agoC++ Mode: Fix some indentation bugs. FIxes bug#19867
Alan Mackenzie [Thu, 27 Mar 2025 10:24:48 +0000 (10:24 +0000)]
C++ Mode: Fix some indentation bugs.  FIxes bug#19867

1. Fix closing paren aligning with trailing comment on line
with matching open paren.
2. Fix indentation of first identifier inside a comma separated
list aligning with the type rather than the subsequent
identifiers.
3. Fix lambda expressions inside a brace list aligning like a
single statement.

* lisp/progmodes/cc-align.el (c-lineup-arglist): Take into
account any preceding comments when lining up the arguments in
the arglist.
(c-lineup-arglist-intro-after-paren): Handle comments properly,
and don't line up the closing parenthesis with a trailing
comment on the first line.
(c-lineup-item-after-paren-at-boi): Also allow a paren to count
as being at BOI when it is preceded only by open parens on that
line.
(c-lineup-runin-statements, c-lineup-ObjC-method-call): Hanle
comments better.

* lisp/progmodes/cc-engine.el (c-forward-comments) Introduce an
optional limit parameter.  Use this limit in calls from
cc-align.el and cc-mode.el.
(c-just-after-func-arglist-p): Handle the presence of a
protection keyword such as "public".
(c-at-bracelist-p): Renamed from c-inside-bracelist-p, after
dropping the accept-in-paren parameter, having removed its
functionality.
(c-looking-at-statement-block-1): New function, based on the
old c-looking-at-statement-block.  Enhanced to handle C++
lambda expressions, and to return the symbol `maybe' when the
contents of a brace delimited block fail to determine whether
it is a statement block.
(c-looking-at-statement-block): Enhanced to examine the context
of a brace delimited block when the contents are ambiguous.
(c-looking-at-c++-lambda-expression): Check the character after
point is a < before calling c-forward-<>-arglist.
(c-add-stmt-syntax): Make the context more accurate by calling
c-looking-at-statement-block.
(c-guess-basic-syntax, CASE 5D.5): Replace the syntactic symbol
topmost-intro-cont with the new symbol class-field-cont,
additionally determining the position of the enclosing brace as
an extra anchor point.
(c-guess-basic-syntax, CASE 5V): New case for an identifier
following a type inside class braces.
(c-guess-basic-syntax, CASE 9): Use
c-looking-at-statement-block to detect a brace list more
accurately.

* lisp/progmodes/cc-fonts.el (c-get-fontification-context):
Rename the call to c-inside-bracelist-p to c-at-bracelist-p.

* lisp/progmodes/cc-langs.el (c-protection-kwds): Add an entry
for java-mode.
(c-stmt-block-only-keywords-regexp): Prevent this regexp also
matching a character preceding the keyword.

* /lisp/progmodes/cc-mode.el (c-before-change-include-<>)
(c-after-change-include-<>): Use the new limit argument to
c-forward-comments.

* lisp/progmodes/cc-styles.el (c-style-alist, "gnu" and "java"
styles): Change the offset for arglist-close to
c-lineup-arglist-close-under-paren.

* lisp/progmodes/cc-vars.el (c-offsets-alist): Introduce the
new syntactic symbol class-field-cont, giving it default
offset +.

* doc/misc/cc-mode.texi (Syntactic Symbols, Class Symbols):
Document the new syntactic symbol class-field-cont.

(cherry picked from commit 555ec43a32ea8f3675c5a9d73ca30609eeaa9013)

2 months ago* lisp/treesit-x.el: Remove unnecessary treesit-generic-mode.
Juri Linkov [Thu, 27 Mar 2025 07:33:45 +0000 (09:33 +0200)]
* lisp/treesit-x.el: Remove unnecessary treesit-generic-mode.

(treesit-generic-mode-list): Remove variable.
(define-treesit-generic-mode): Remove docstring text about hook
that is already added by 'define-derived-mode'.
(treesit-generic-mode): Remove command.

(cherry picked from commit 27c41d026f79ebc46fc8fe202836be0fd375bc1b)

2 months agoDon't write to bottom-right cell on ttys with AutoWrap (bug#77233)
Gerd Möllmann [Thu, 27 Mar 2025 05:10:46 +0000 (06:10 +0100)]
Don't write to bottom-right cell on ttys with AutoWrap (bug#77233)

* src/term.c (tty_write_glyphs): Handle case of writing only one
character in the last column.

(cherry picked from commit 1883a5c7174eeede8fe307e73014628edca6b614)

2 months agoSignal user-error in info--ensure-not-in-directory-node
Stefan Kangas [Wed, 26 Mar 2025 20:39:18 +0000 (21:39 +0100)]
Signal user-error in info--ensure-not-in-directory-node

* lisp/info.el (info--ensure-not-in-directory-node): Change from 'error'
to 'user-error' to reduce 'debug-on-error' frustration.

(cherry picked from commit c00170e92c5c3f68734e0e2d632d6efdcbb9c969)

2 months agoFix vertical cursor motion with wide images and line numbers
Eli Zaretskii [Wed, 26 Mar 2025 17:04:16 +0000 (19:04 +0200)]
Fix vertical cursor motion with wide images and line numbers

* src/xdisp.c (produce_image_glyph): When cropping an image that
exceeds the window's right edge, account for the screen estate
taken by line-number display.  (Bug#77217)

(cherry picked from commit 1e68351d56918cd4d7883bcff629f794660a3134)

2 months ago; Remove obsolete file `java/incrementing-version-code'.
Po Lu [Wed, 26 Mar 2025 12:46:54 +0000 (20:46 +0800)]
; Remove obsolete file `java/incrementing-version-code'.

(cherry picked from commit 8f7790a95ecd88efec97417f1a3b51ba9da5e287)

2 months ago; Fix OOM kill in ert-tests
Eli Zaretskii [Wed, 26 Mar 2025 12:31:41 +0000 (14:31 +0200)]
; Fix OOM kill in ert-tests

* test/lisp/emacs-lisp/ert-tests.el
(ert-test-run-tests-batch-expensive): Mark it 'unstable', as it
might run out of memory on GNU/Linux and on Windows.

(cherry picked from commit 3d5def2677c62aa017b675ced18c9bac2697c439)

2 months ago; Fix 'ert-tests' on MS-Windows
Eli Zaretskii [Wed, 26 Mar 2025 12:22:30 +0000 (14:22 +0200)]
; Fix 'ert-tests' on MS-Windows

* test/lisp/emacs-lisp/ert-tests.el
(ert-test-run-tests-batch-expensive): Skip the test on MS-Windows.

(cherry picked from commit f1715f6411d665442397835ab792ef39051f859a)

2 months agoFurther amendments of child frame handling and documentation
Martin Rudalics [Wed, 26 Mar 2025 08:04:49 +0000 (09:04 +0100)]
Further amendments of child frame handling and documentation

* src/frame.c (frame_subsumes_p): New static function
(delete_frame): On ttys refuse to delete a frame that could be
used as surrogate minibuffer frame by surviving frames.
(store_frame_param): Make sure 'minibuffer' parameter does not
reference a deleted window.  If on a tty it references a live
window, make sure its frame has the same root frame as the frame
where the parameter shall be installed.  Also on ttys make sure
that storing the 'parent-frame' parameter does not assign a
surrogate minibuffer frame a different root frame than that of
any of its client frames.  Further on ttys assert that making a
child a new root frame gives it the dimensions of the terminal.
(Fmouse_position_in_root_frame): Don't use XFRAME before
it's clear that FRAME is a frame.
* doc/lispref/elisp.texi (Top): Add menu for Child Frames section.
* doc/lispref/frames.texi (Buffer Parameters): Mention that
value 'child-frame' is not special for 'minibuffer' parameter on
text terminals.
(Visibility of Frames): Fix description of 'iconify-frame'.
(Raising and Lowering): 'minibuffer-auto-raise' is an option.
(Child Frames): Major rewrite using subsections.  Explain new
and deviant features on text terminals - menu bar access,
reparenting, deleting, visibility and minibuffer-only child
frames.
* etc/NEWS: Remove remark that child frames cannot be
arbitrarily reparented on ttys.

(cherry picked from commit 001359ce7650c1ec110b4c38b6f67274d2d29ad1)

2 months agoUse numeric time zone suffix in ERT explainer.
Philipp Stephani [Wed, 26 Mar 2025 02:32:46 +0000 (03:32 +0100)]
Use numeric time zone suffix in ERT explainer.

This is more robust since the time zone name is system-dependent.

* lisp/emacs-lisp/ert.el (ert--explain-time-equal-p): Use numeric time
zone suffix.

* test/lisp/emacs-lisp/ert-tests.el (ert-test-explain-time-equal-p):
Adapt test.

(cherry picked from commit 2d278a0f2e945eef30752550f900c1c88367fb6b)

2 months ago* test/lisp/gnus/message-tests.el (message-default-buffer-type): New test.
Michael Albinus [Tue, 25 Mar 2025 18:48:06 +0000 (19:48 +0100)]
* test/lisp/gnus/message-tests.el (message-default-buffer-type): New test.

(cherry picked from commit 56248fad53cb1476b9f460044c0c73f986a0bbac)

2 months agobacktrace.el: Remove redundant `put` and `:group`
Stefan Monnier [Tue, 25 Mar 2025 18:16:03 +0000 (14:16 -0400)]
backtrace.el: Remove redundant `put` and `:group`

* lisp/emacs-lisp/backtrace.el: Remove redundant `:group` args.
Prefer # to quote function arguments.
(backtrace-mode): Remove redundant `put`.

(cherry picked from commit ce0c1f44429bc7e9757f6e81019d8c8c12ba5e55)

2 months agobs.el: Janitorial work; most importantly use `special-mode`
Stefan Monnier [Tue, 25 Mar 2025 18:06:32 +0000 (14:06 -0400)]
bs.el: Janitorial work; most importantly use `special-mode`

* lisp/bs.el: Prefer # to quote function arguments.
(bs-mode-font-lock-keywords): Use backquote; quote face names; and use
a list of faces instead of two applications at the same spot.
(bs-sort-buffer-interns-are-last, bs-config--files-and-scratch)
(bs-configurations, bs--intern-show-never): Fix ^$-vs-\`\' confusion.
(bs-mode-map): Remove bindings made redundant by inheritance.
(bs--redisplay): Use `line-number-at-pos`.
(bs--goto-current-buffer): Use `regexp-opt`.
(bs-mode): Inherit from `special-mode`.
(bs--current-buffer, bs--up): Use `point-min`.
(bs--create-header-line): Remove redundant arg.

(cherry picked from commit bb62e435637c7422741189384fa89e2272caec5b)

2 months agobookmark.el: Cosmetic changes
Stefan Monnier [Tue, 25 Mar 2025 17:43:53 +0000 (13:43 -0400)]
bookmark.el: Cosmetic changes

* lisp/bookmark.el: Prefer # to quote function arguments.
(bookmark-watch-bookmark-file): Remove redundant `:group`.
(bookmark-bmenu-mode): Let `define-derived-mode` take care of
`mode-class` property.

(cherry picked from commit bc2b815f098751be700243cd0c47806a0d08dc68)

2 months ago* lisp/treesit-x.el: New file.
Juri Linkov [Tue, 25 Mar 2025 17:41:33 +0000 (19:41 +0200)]
* lisp/treesit-x.el: New file.

* lisp/treesit.el (treesit--copy-queries): New function.
(treesit--install-language-grammar-1): Use it.

https://lists.gnu.org/archive/html/emacs-devel/2025-03/msg01312.html
(cherry picked from commit 050325da303996cf5be7bd13d0a13e0bd12fa25e)

2 months agolisp/gnus/mm-encode.el (mm-default-buffer-type): Obey the mode hierarchy
Stefan Monnier [Tue, 25 Mar 2025 15:23:48 +0000 (11:23 -0400)]
lisp/gnus/mm-encode.el (mm-default-buffer-type): Obey the mode hierarchy

(cherry picked from commit e67f03bf35b97d2898b64281215be6717b659839)

2 months ago* lisp/gnus/mm-encode.el (mm-default-buffer-type): Check `major-mode'.
Michael Albinus [Tue, 25 Mar 2025 14:13:16 +0000 (15:13 +0100)]
* lisp/gnus/mm-encode.el (mm-default-buffer-type): Check `major-mode'.

(cherry picked from commit a15534f32e1a978dee6ec96d6b60b5e755666e70)

2 months agoRename 'buffer-too-small' to 'memory-buffer-too-small'.
Philipp Stephani [Tue, 25 Mar 2025 13:24:04 +0000 (14:24 +0100)]
Rename 'buffer-too-small' to 'memory-buffer-too-small'.

This clarifies that the error isn't talking about an editing buffer.

* src/emacs-module.c (module_memory_buffer_too_small): Rename from
'module_buffer_too_small'.
(module_copy_string_contents, module_extract_big_integer): Adapt
callers.
(syms_of_module): Rename symbol 'buffer-too-small' to
'memory-buffer-too-small'.

(cherry picked from commit 0b1102a70413dabba082d822c200b014464de667)

2 months agoUse better attachment defaults for *diff* buffers
Michael Albinus [Tue, 25 Mar 2025 10:45:29 +0000 (11:45 +0100)]
Use better attachment defaults for *diff* buffers

* lisp/gnus/mm-encode.el (mm-default-buffer-type): New defun.

* lisp/gnus/mml.el (mml-attach-buffer): Use it.

(cherry picked from commit 2adc912d0ec277d9ffe6485e7d81849fab98a2ea)

2 months ago* test/infra/Dockerfile.emba (emacs-tree-sitter): Add gowork grammar.
Michael Albinus [Tue, 25 Mar 2025 08:28:43 +0000 (09:28 +0100)]
* test/infra/Dockerfile.emba (emacs-tree-sitter): Add gowork grammar.

(cherry picked from commit d6c7a77465203bfc277ff489be0f4f4d476615c7)

2 months agooutline-move-subtree-down/up: Fix for non-nil outline-blank-line
James Cherti [Thu, 20 Mar 2025 13:01:36 +0000 (09:01 -0400)]
outline-move-subtree-down/up: Fix for non-nil outline-blank-line

* lisp/outline.el (outline-move-subtree-down):
Include blank line when outline-blank-line is t
(bug#77238).

Copyright-paperwork-exempt: yes
(cherry picked from commit 40bf281c644e3323f010b007c9bfc730e92896aa)

2 months ago(built-in-class--make): Take list of types rather than classes
Stefan Monnier [Tue, 25 Mar 2025 06:09:48 +0000 (02:09 -0400)]
(built-in-class--make): Take list of types rather than classes

Consolidate the conversion from types to classes into
`built-in-class--make` instead of duplicating it in ever caller.

* lisp/emacs-lisp/cl-preloaded.el (built-in-class--make): Take list of
types rather than classes.
(cl--define-built-in-type): Simplify accordingly.

(cherry picked from commit 7ec0ee742da17864b554e2cf4384d2a12baaf1e8)

2 months ago; * msdos/emacs.djl: Don't interfere with the order of other symbols.
Po Lu [Tue, 25 Mar 2025 02:37:09 +0000 (10:37 +0800)]
; * msdos/emacs.djl: Don't interfere with the order of other symbols.

(cherry picked from commit c3492b969da3b117904a070a2617b31dd965f109)

2 months agoFix the DJGPP build
Po Lu [Tue, 25 Mar 2025 02:34:40 +0000 (10:34 +0800)]
Fix the DJGPP build

* msdos/emacs.djl (.bss): Guarantee that lread.o is 8-byte
aligned.

* msdos/sed2v2.inp (ALIGNOF_INT, ALIGNOF_LONG)
(ALIGNOF_LONG_LONG): Correct typos.

* src/term.c (tty_free_frame_resources): Synchronize with
non-DOS variant.

(cherry picked from commit 49eab999f13fede351ab7700c1469ba6cbf3d6b8)

2 months agoMimic behavior of 'aref' when signalling out-of-range errors.
Philipp Stephani [Tue, 25 Mar 2025 01:56:01 +0000 (02:56 +0100)]
Mimic behavior of 'aref' when signalling out-of-range errors.

The convention used by 'aref' and friends is that for
'args-out-of-range', the error data is a list (SEQ INDEX).  Use the same
convention for the vector-related module functions.

* src/emacs-module.c (check_vec_index): Use vector and index as error
data.

(cherry picked from commit 8efcdcab8658ff9537fe483e0a12875cca90a527)

2 months agoDon't use 'args-out-of-range' error for too-small buffers.
Philipp Stephani [Tue, 25 Mar 2025 01:50:37 +0000 (02:50 +0100)]
Don't use 'args-out-of-range' error for too-small buffers.

'args-out-of-range' means that some index argument isn't valid for a
given sequence/range, which isn't the case here.  Instead, define a new
error symbol to mean "user-supplied buffer is too small."  Since we
never specified nor tested which error symbol was signalled in this
case, changing it shouldn't cause severe breakages.

* src/emacs-module.c (module_buffer_too_small): New helper function.
(module_copy_string_contents, module_extract_big_integer): Use it.
(syms_of_module): Define 'buffer-too-small' error symbol.

(cherry picked from commit 96a1a07fb1f9d8f3f41f3893ed1b624246a76c43)