Commit graph

178060 commits

Author SHA1 Message Date
Paul Eggert
589f596c96 Use -Wtrailing-whitespace when warning
* configure.ac: When enabling GCC warnings, enable GCC 15’s new
-Wtrailing-whitespace option if available, as that’s the Emacs style.
2025-04-19 19:31:27 -07:00
Paul Eggert
e2fb12a40c Pacify GCC 15 -Wunterminated-string-initialization
* src/fns.c (hexbuf_digest):
* src/json.c (json_out_string):
Add ATTRIBUTE_NONSTRING to character arrays that are not strings.
2025-04-19 19:31:26 -07:00
Paul Eggert
67ae179008 Pacify GCC 15 -Wanalyzer-null-dereference
* src/emacs.c (find_emacs_executable): Add an eassume.
This pacifies -Wanalyzer-null-dereference with gcc (GCC) 15.0.1
20250329 (Red Hat 15.0.1-0).
2025-04-19 19:31:26 -07:00
Paul Eggert
c8eed90eb4 Avoid name clashes with static GnuTLS
Work around a bug in GnuTLS 3.7.11 and earlier: when built
statically, its mistakenly exports symbols hash_lookup and
hash_string, which collide with Emacs symbols of the same name,
preventing temacs from linking statically.  Problem reported by
Greg A. Woods (Bug#77476).

Because GnuTLS never uses hash_lookup or hash_string this issue
ordinarily doesn’t seem to prevent temacs from linking to GnuTLS
on GNU/Linux, as it’s linked dynamically and the dynamic linker
never needs to resolve references to either symbol.  However, I
suppose a clash or bug could occur even with dynamic linking if
Emacs later loads a module that uses either symbol.

Although GnuTLS should be fixed, Emacs should link statically to
current and older GnuTLS versions in the meantime, and it should
avoid potential problems with dynamic linking.  Renaming the two
clashing names is an easy way to do this.  For consistency with
the new name for hash_lookup, also rename hash_lookup_with_hash
and hash_lookup_get_hash.

* src/fns.c (hash_find_with_hash): Rename from hash_lookup_with_hash.
(hash_find): Rename from hash_lookup.
(hash_find_get_hash): Rename from hash_lookup_get_hash.
(hash_char_array): Rename from hash_string.
All uses changed.
2025-04-19 19:31:26 -07:00
Paul Eggert
71ee484cac Update from Gnulib by running admin/merge-gnulib 2025-04-19 19:31:25 -07:00
Paul Eggert
30335bb734 Don’t use Gnulib’s locale-h module
* admin/merge-gnulib (AVOIDED_MODULES):
Add locale-h, as Emacs should’t need this Gnulib module.
This change is needed for when we next run admin/merge-gnulib,
as some Gnulib dependencies changed recently.
2025-04-19 19:31:25 -07:00
Paul Eggert
4fa10b5760 Pacify "statement not reached" in value_cmp
Problem found by Oracle Developer Studio 12.6.
* src/fns.c (value_cmp): Omit unnecessary goto.
2025-04-19 19:31:24 -07:00
Paul Eggert
03a1df3799 Fix libsrc assumption in src/Makefile.in
* src/Makefile.in (ETAGS): Don’t assume $(libsrc) = ../lib-src.
2025-04-19 19:31:24 -07:00
Sean Whitton
45232485ae vc-user-edit-command: Add trailing space to initial input
* lisp/vc/vc-dispatcher.el (vc-user-edit-command): Add trailing
space to initial input to ease adding additional flags.
2025-04-20 09:40:36 +08:00
Werner Fink
8abd2ee052 Fix seccomp-filter for newer Linux kernels
* lib-src/seccomp-filter.c (MAP_DROPPABLE): Define if undefined.
(main): Use MAP_DROPPABLE flag.  Allow `tcgetattr' call of glibc
on physical terminal devices.  (Bug#77232)
2025-04-19 18:07:19 +03:00
Kazuhiro Ito
2cf545f47d Fix 'rfc6068-parse-mailto-url' with 'inhibit-eol-conversion'
* lisp/mail/rfc6068.el (rfc6068-parse-mailto-url): Fix EOL type to
CRLF and never inhibit EOL conversion in decoding.  (Bug#77776)
2025-04-19 17:20:27 +03:00
shipmints
6b901a8e85 Strip text properties on recentf entries, when saved (bug#77140)
Text properties are added by common completion frameworks, and
serve no purpose when stored in 'recentf-save-file', waste
space, and slow loading the file.

* lisp/recentf.el (recentf-dump-variable): Process string values
through 'substring-no-properties'.
2025-04-19 17:09:04 +03:00
Peter Oliver
fe8e88a1df Provide Open Age Ratings Service metadata
* etc/emacs.metainfo.xml: Add a <content_rating/> section.
(Bug#77492), this and the preceding 2 commits.
2025-04-19 16:43:23 +03:00
Peter Oliver
b3fb93e0e8 Tweak AppStream metadata to satisfy `appstream-util validate'
* etc/emacs.metainfo.xml: `appstream-util validate' suggests that
screenshot height and width attributes should match the actual size of
the image, and that captions be no longer than 50 chars and do not end
in `.'.  Follow those rules.
2025-04-19 16:42:32 +03:00
Peter Oliver
4f3188a88c Add AppStream metadata about supported and recommended hardware
* etc/emacs.metainfo.xml: Note that Emacs is best with a keyboard, but
other forms of input are possible.  Also note that Emacs can access the
Internet.  A modestly sized display is sufficient.
2025-04-19 16:42:18 +03:00
Stefan Kangas
87d615e26c ; Fix failing diff-mode tests
* test/lisp/vc/diff-mode-resources/git.patch: Delete file, moving
its contents to...
* test/lisp/vc/diff-mode-tests.el (diff-mode-tests--git-patch):
...this new variable.  Git merges kept deleting a trailing
whitespace in the patch signature, so let's do this instead.
(diff-mode-test-git-patch)
(diff-mode-test-git-patch/before-first-hunk)
(diff-mode-test-git-patch/signature): Use above new variable.
2025-04-19 10:39:05 +02:00
Stefan Kangas
fa4e686148 ; Delete superfluous comments explaining config.h
* src/pgtkfns.c:
* src/pgtkim.c:
* src/pgtkmenu.c:
* src/pgtkselect.c:
* src/pgtkterm.c:
* src/termcap.c:
* src/tparam.c: Delete superfluous comments explaining config.h.
2025-04-19 10:39:05 +02:00
Stefan Kangas
177accc53d xterm.c: Move GTK3-specific variables into narrower scopes
Avoid declaring GTK3-specific variables in larger-than-necessary scopes,
especially under #ifdefs.  Instead, declare them where used.  This improves
readability and reduces #ifdef clutter without changing behavior.

* src/xterm.c: [HAVE_GTK3] (x_update_opaque_region):
(XTframe_up_to_date, x_new_focus_frame, handle_one_xevent)
(x_ignore_errors_for_next_request, x_stop_ignoring_errors): Clean up
variable declarations.
2025-04-19 10:39:05 +02:00
Michael Albinus
9ea9c5a73e Merge from origin/emacs-30
2a45f0bceb * lisp/progmodes/heex-ts-mode.el (heex-ts): Fix :group name.
9750333dde Fix typescript-ts-mode indentation (bug#77803)
2025-04-19 10:00:04 +02:00
Michael Albinus
2a45f0bceb * lisp/progmodes/heex-ts-mode.el (heex-ts): Fix :group name. 2025-04-19 09:41:58 +02:00
Eli Zaretskii
37b2c2fcdd ; Improve the documentation of a recent commit
* etc/NEWS:
* doc/lispref/frames.texi (Deleting Frames): Improve documentation
of 'frame-deletable-p'.
2025-04-19 09:11:57 +03:00
Eli Zaretskii
f200b3c910 ; Fix typos in last change. 2025-04-19 08:59:06 +03:00
Eli Zaretskii
5ec6613f13 Rename 'treesit-auto-install' to 'treesit-auto-install-grammar'
* etc/NEWS:
* lisp/treesit.el (treesit-auto-install-grammar): Rename from
'treesit-auto-install'; all users changed.  Doc fix.
(treesit-ensure-installed): Doc fix.
2025-04-19 08:56:21 +03:00
Konstantin Kharlamov
9750333dde
Fix typescript-ts-mode indentation (bug#77803)
Don't align variable names to their declaratory expression.

Before this commit in code like:

    const a = 1,
          b = 2;

the b would get indented to `const'.  Similarly for `var' and
`let'. The expected behavior instead is getting indented to
`typescript-ts-mode-indent-offset'.

* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--indent-rules): Indent identifiers declarations to
`typescript-ts-mode-indent-offset'.
* test/lisp/progmodes/typescript-ts-mode-resources/indent.erts
(Lexical and variable declarations): Update test accordingly.
2025-04-18 16:40:06 -07:00
Yuan Fu
6430654b4d
Merge from savannah/emacs-30
ef8bfe90b7 Handle offset in treesit--update-ranges-local (bug#77848)

# Conflicts:
#	lisp/treesit.el
2025-04-18 16:31:22 -07:00
Yuan Fu
40f71d7070
; Merge from savannah/emacs-30
The following commit was skipped:

4dcd66abd5 Disable echo back instead of setting tty to raw in Inferi...
2025-04-18 16:30:41 -07:00
Yuan Fu
e7ca83a2f4
Merge from savannah/emacs-30
01d4eb3dd4 ; Improve doc string of 'insert-char'
93ad8407ed * admin/notes/emba: Fix docker build instruction.
b901290ae7 * doc/lispref/text.texi (Margins): Grammar fix.
16855c89dd Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/...
8792d3431b Backport: Fix tree-sitter tests on Emba

# Conflicts:
#	test/infra/Dockerfile.emba
2025-04-18 16:30:39 -07:00
Yuan Fu
630a3a35f8
; Merge from savannah/emacs-30
The following commits were skipped:

275712a18c ; Improve documentation of 'help-fns-edit-variable'
2025-04-18 16:26:23 -07:00
Yuan Fu
e09b59790e
Merge from savannah/emacs-30
2b535a9c77 ; Improve documentation of some functions in files-x.el
45cf832ac7 Fix deleting the first line of calc trail
2025-04-18 16:26:23 -07:00
Yuan Fu
f965b0d756
; Merge from savannah/emacs-30
The following commits were skipped:

74e25c9413 Fix file descriptor leaks on arm Android
22b646efe3 ; Fix a typo in proced.el
2025-04-18 16:26:23 -07:00
Yuan Fu
7f6524f584
Merge from savannah/emacs-30
1741812535 lisp/help.el (help-form-show): Improve last change (bug#7...
2025-04-18 16:26:22 -07:00
Yuan Fu
ef8bfe90b7
Handle offset in treesit--update-ranges-local (bug#77848)
* lisp/treesit.el:
(treesit--update-ranges-local): Add OFFSET parameter.
(treesit-update-ranges): Pass offset to
treesit--update-ranges-local.
2025-04-18 16:24:11 -07:00
Juri Linkov
80e74dc832 Fix parens inside links in markdown-ts--treesit-settings.
* lisp/textmodes/markdown-ts-mode.el (markdown-ts--treesit-settings):
Override paren delimiter inside inline link.
https://lists.gnu.org/archive/html/emacs-devel/2025-04/msg00655.html
2025-04-18 20:15:40 +03:00
Juri Linkov
d56e37c83c Embed elixir in heex as well as elixir->heex->elixir (bug#76788).
* lisp/progmodes/elixir-ts-mode.el (elixir-ts--range-rules):
Rename to a shorter name from 'elixir-ts--treesit-range-rules'.
(elixir-ts--font-lock-feature-list, elixir-ts--thing-settings)
(elixir-ts--range-rules): New variables with default values
extracted from 'elixir-ts-mode'.
(elixir-ts-mode): Use 'elixir-ts--font-lock-feature-list',
'elixir-ts--thing-settings', 'elixir-ts--range-rules'
and 'heex-ts--range-rules'.
Use 'treesit-merge-font-lock-feature-list' to merge
'heex-ts--font-lock-feature-list'.

* lisp/progmodes/heex-ts-mode.el
(heex-ts--font-lock-feature-list, heex-ts--range-rules):
New variables.
(heex-ts-mode): Use 'heex-ts--font-lock-feature-list',
'heex-ts--range-rules'.  Merge 'elixir-ts--font-lock-settings',
'elixir-ts--font-lock-feature-list', 'elixir-ts--thing-settings'
for embedding elixir in heex.  Enable the 'sexp' navigation
by default with 'treesit-cycle-sexp-type'.

* lisp/progmodes/c-ts-mode.el (c-ts-mode): Append
'treesit-range-rules' to possibly already existing list in
'treesit-range-settings'.

* lisp/treesit.el (treesit-language-at-point-default):
Optimize to use 'when-let*'.
2025-04-18 19:52:19 +03:00
Juri Linkov
3d3be6dd0e Lock tree-sitter language grammars to verified versions.
* admin/notes/tree-sitter/build-module/build.sh:
Update org for toml/yaml.

* admin/tree-sitter/treesit-admin.el
(treesit-admin--builtin-language-sources):
Add verified versions.

* lisp/progmodes/c-ts-mode.el:
Append language source to treesit-language-source-alist.
(c-ts-mode, c++-ts-mode): Use treesit-ensure-installed.

* lisp/progmodes/cmake-ts-mode.el:
Append language source to treesit-language-source-alist.
(cmake-ts-mode): Use treesit-ensure-installed.

* lisp/progmodes/csharp-mode.el:
Append language source to treesit-language-source-alist.
(csharp-ts-mode): Use treesit-ensure-installed.

* lisp/progmodes/dockerfile-ts-mode.el:
Append language source to treesit-language-source-alist.
(dockerfile-ts-mode): Use treesit-ensure-installed.

* lisp/progmodes/elixir-ts-mode.el:
Append language source to treesit-language-source-alist.
(elixir-ts-mode): Use treesit-ensure-installed.

* lisp/progmodes/go-ts-mode.el:
Append language source to treesit-language-source-alist.
(go-ts-mode, go-mod-ts-mode, go-work-ts-mode):
Use treesit-ensure-installed.

* lisp/progmodes/heex-ts-mode.el:
Append language source to treesit-language-source-alist.
(heex-ts-mode): Use treesit-ensure-installed.

* lisp/progmodes/java-ts-mode.el:
Append language source to treesit-language-source-alist.
(java-ts-mode): Use treesit-ensure-installed.

* lisp/progmodes/js.el:
Append language source to treesit-language-source-alist.
(js-ts-mode): Use treesit-ensure-installed.

* lisp/progmodes/json-ts-mode.el:
Append language source to treesit-language-source-alist.
(json-ts-mode): Use treesit-ensure-installed.

* lisp/progmodes/lua-ts-mode.el:
Append language source to treesit-language-source-alist.
(lua-ts-mode): Use treesit-ensure-installed.

* lisp/progmodes/php-ts-mode.el
(php-ts-mode--language-source-alist):
Update versions from comments in ts-modes.
Append to treesit-language-source-alist.
(php-ts-mode-install-parsers):
Use treesit-language-source-alist directly.
(php-ts-mode): Use treesit-ensure-installed.

* lisp/progmodes/ruby-ts-mode.el:
Append language source to treesit-language-source-alist.
(ruby-ts-mode): Use treesit-ensure-installed.

* lisp/progmodes/rust-ts-mode.el:
Append language source to treesit-language-source-alist.
(rust-ts-mode): Use treesit-ensure-installed.

* lisp/progmodes/sh-script.el:
Append language source to treesit-language-source-alist.
(bash-ts-mode): Use treesit-ensure-installed.

* lisp/progmodes/typescript-ts-mode.el:
Append language source to treesit-language-source-alist.
(typescript-ts-mode, tsx-ts-mode): Use treesit-ensure-installed.

* lisp/textmodes/css-mode.el:
Append language source to treesit-language-source-alist.
(css-ts-mode): Use treesit-ensure-installed.

* lisp/textmodes/html-ts-mode.el:
Append language source to treesit-language-source-alist.
(html-ts-mode): Use treesit-ensure-installed.

* lisp/textmodes/markdown-ts-mode.el:
Append language source to treesit-language-source-alist.
(markdown-ts-mode): Use treesit-ensure-installed.

* lisp/textmodes/mhtml-ts-mode.el
(mhtml-ts-mode--language-source-alist):
Append to treesit-language-source-alist.
(mhtml-ts-mode-install-parsers):
Use treesit-language-source-alist directly.
(mhtml-ts-mode): Use treesit-ensure-installed.

* lisp/textmodes/toml-ts-mode.el:
Append language source to treesit-language-source-alist.
(toml-ts-mode): Use treesit-ensure-installed.

* lisp/textmodes/yaml-ts-mode.el:
Append language source to treesit-language-source-alist.
(yaml-ts-mode): Use treesit-ensure-installed.

* test/infra/Dockerfile.emba: Add verified versions
to treesit-language-source-alist.
2025-04-18 19:22:50 +03:00
Juri Linkov
c9b6be7d27 * lisp/treesit.el (treesit-auto-install): New defcustom.
(treesit-ensure-installed): New function.
2025-04-18 19:17:39 +03:00
Robert Pluim
7d886f214e Match mail headers case-insensitively when encoding
* lisp/mail/rfc2047.el (rfc2047-encode-message-header): Bind
'case-fold-search' to t when looking up the encoding method,
otherwise a header spelled "CC" is encoded using the wrong
method.  (Bug#77866)
2025-04-18 15:53:13 +02:00
Stefan Monnier
f5e6f284e9 (tab-bar-tests-quit-restore-window): Try and clarify the skip
* test/lisp/tab-bar-tests.el (tab-bar-tests-quit-restore-window):
Rewrite the `skip-unless` based on the code's history because
I found the current code quite confusing.
2025-04-18 09:35:14 -04:00
kobarity
4dcd66abd5 Disable echo back instead of setting tty to raw in Inferior Python
* lisp/progmodes/python.el (python-shell-setup-code): Change the
Python setup code.  (Bug#76943)

(cherry picked from commit 4c5c20ddc2)
2025-04-18 14:53:20 +02:00
Eli Zaretskii
01d4eb3dd4 ; Improve doc string of 'insert-char'
* src/editfns.c (Finsert_char): Doc fix.  Suggested by Lactose ‎
<lactose@allthingslinux.org> (bug#77889).
2025-04-18 14:10:19 +03:00
Sean Whitton
9f0c43a3d1 ; * etc/NEWS: Copyediting. 2025-04-18 18:27:11 +08:00
Sean Whitton
20b919cfb1 Bind new window layout commands under C-x w
* lisp/window.el (rotate-windows-repeat-map)
(window-layout-rotate-repeat-map, window-layout-flip-repeat-map):
New keymaps.
(window-prefix-map): Bind new window layout commands.
* etc/NEWS: Rewrite entry for the new commands.
2025-04-18 18:25:16 +08:00
Michael Albinus
93ad8407ed * admin/notes/emba: Fix docker build instruction. 2025-04-18 09:31:54 +02:00
Juri Linkov
a731dd63fb ; * test/lisp/tab-bar-tests.el (tab-bar-tests-quit-restore-window): Comment. 2025-04-18 09:44:13 +03:00
Sean Whitton
b901290ae7 * doc/lispref/text.texi (Margins): Grammar fix.
Author:
2025-04-18 14:31:50 +08:00
Eshel Yaron
2f67352d7a
; Fix warnings in 'auth-source-search' (bug#77612)
* lisp/auth-source.el (auth-source-search): When calling
'slot-value', specify slots by name, not by ':initarg'.
2025-04-18 08:30:53 +02:00
Eli Zaretskii
58ff101380 ; Allow a tab-bar test on MS-Windows
* test/lisp/tab-bar-tests.el (tab-bar-tests-quit-restore-window):
Allow this test on MS-Windows in interactive sessions.
2025-04-18 08:11:47 +03:00
Eli Zaretskii
16855c89dd Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/emacs into emacs-30 2025-04-18 08:03:48 +03:00
Yuan Fu
f728aa72c0
Add guard in treesit-language-at-point-default (bug#77870)
* lisp/treesit.el (treesit-language-at-point-default): Return
nil if there's no parser in the buffer.
(treesit-parsers-at): Add docstring for parser order.
2025-04-17 16:56:07 -07:00
Yuan Fu
4f80a116f5
Add missing OFFSET arg to treesit--update-ranges-local (bug#77848)
* lisp/treesit.el (treesit--update-ranges-local):
(treesit--update-range-1): Add missing OFFSET arg.
2025-04-17 16:42:07 -07:00