1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-30 04:10:54 -08:00
Commit graph

177006 commits

Author SHA1 Message Date
Gerd Möllmann
c19d702b3b Merge branch 'master' into feature/igc 2025-01-19 15:52:10 +01:00
Stefan Kangas
6a0db0d80d Delete unused aliases for calln
* src/lisp.h (call1, call2, call3, call4)
(call5, call6, call7, call8): Delete unused aliases for calln.
2025-01-19 14:29:41 +01:00
Stefan Kangas
251e3d2654 Replace call[1-8] with calln
Since the introduction of the 'calln' macro, the 'call1', 'call2', ...,
'call8' macros are just aliases for the former.  This is slightly
misleading and potentially unhelpful.  The number of arguments N can
also easily go out-of-synch with the used alias callN.  There is no
reason not to replace these aliases with using 'calln' directly.

To reduce the risk for mistakes, the tool Coccinelle was used to make
these changes.  See <https://coccinelle.gitlabpages.inria.fr/website/>.

* src/alloc.c, src/androidvfs.c, src/androidfns.c, src/buffer.c:
* src/callint.c, src/callproc.c, src/casefiddle.c, src/charset.c:
* src/chartab.c, src/cmds.c, src/coding.c, src/composite.c:
* src/data.c, src/dbusbind.c, src/dired.c, src/doc.c:
* src/emacs.c, src/eval.c, src/fileio.c, src/filelock.c:
* src/fns.c, src/frame.c, src/gtkutil.c, src/haikufns.c:
* src/haikumenu.c, src/image.c, src/insdel.c, src/intervals.c:
* src/keyboard.c, src/keymap.c, src/lisp.h, src/lread.c:
* src/minibuf.c, src/nsfns.m, src/nsselect.m, src/pgtkfns.c:
* src/pgtkselect.c, src/print.c, src/process.c, src/sort.c:
* src/syntax.c, src/textconv.c, src/textprop.c, src/undo.c:
* src/w32fns.c, src/window.c, src/xfaces.c, src/xfns.c:
* src/xmenu.c, src/xselect.c, src/xterm.c:
Replace all uses of 'call1', 'call2', ..., 'call8' with 'calln'.
2025-01-19 14:29:41 +01:00
Stefan Kangas
7362f9f75d Document use of calln in C code in internals.texi
* doc/lispref/internals.texi
(Writing Emacs Primitives): Don't recommend `call0`, `call1`, etc.
Instead recommend `calln`, which covers all of those use cases.
2025-01-19 14:29:41 +01:00
Peter Seibel
2fd72a6ed3 Improved git-add completion
* lisp/pcmpl-git.el (pcomplete/git)): Complete untracked files.
(Bug#75336)

Copyright-paperwork-exempt: yes
2025-01-19 14:56:17 +02:00
Manuel Giraud
ba5360f700 Fix keybinding alignment in `tmm-menubar'
* lisp/tmm.el (tmm--shorten-space-width): New function that
reduces the space between the text menu entry and its keybinding
to avoid a misalignement.
(tmm-add-one-shortcut): Use it.  (Bug#75500)
2025-01-19 14:53:31 +02:00
Eli Zaretskii
be786ab3bb ; Fix autorevert-tests on MS-Windows
* test/lisp/autorevert-tests.el
(auto-revert-test04-auto-revert-mode-dired): Fix test on
MS-Windows.
2025-01-19 14:42:46 +02:00
Eli Zaretskii
f367b01f12 * src/fileio.c (Finsert_file_contents): Fix last change. 2025-01-19 14:20:18 +02:00
Eli Zaretskii
26c9fbc94d Fix visiting files in /proc/ directory
* src/fileio.c (Finsert_file_contents): Treat regular files whose
size is reported as zero as if they were special files.  (Bug#75569)
2025-01-19 12:51:18 +02:00
Michael Albinus
40a8d0ebf0 Fix Tramp error handling process buffer
* lisp/net/tramp-cache.el (tramp-list-connections):
* lisp/net/tramp-cmds.el (tramp-cleanup-connection): Use connection
property " connected" for a check of active connections.

* lisp/net/tramp.el (tramp-get-buffer): Set connection property
" connected".
2025-01-19 11:30:10 +01:00
Jakub Ječmínek
cce6a57af7 Align files after dired revert (Bug#17219)
* lisp/dired.el (dired-revert): Add 'dired--align-all-files'
function call, to re-align files after reverting.
2025-01-19 12:21:22 +02:00
Paul Eggert
7809086b3b Prefer EMACS_INT_MAX to TYPE_MAXIMUM (EMACS_INT)
* src/dispextern.h (GLYPH_CODE_P):
Use EMACS_INT_MAX instead of TYPE_MAXIMUM (EMACS_INT),
as it’s shorter and is what all the other code uses
in this situation.
2025-01-19 00:20:04 -08:00
Paul Eggert
f9be225501 Port recently-added bitfields back to GCC
* src/lisp.h (hash_table_std_test_t, hash_table_weakness_t):
Name these as enum tags as well as typedefs,
so that ENUM_BF works for them.
2025-01-19 00:17:05 -08:00
Paul Eggert
fb434b8516 Always define image_compute_scale
* src/image.c (image_compute_scale): Define even if
! (defined HAVE_IMAGEMAGICK || defined HAVE_NATIVE_TRANSFORMS),
because it is always used.  Needed in platforms that lack all
those image libraries.
2025-01-18 23:28:11 -08:00
Paul Eggert
abf2e097b2 Port recently-added bitfields to IBM XL C 16.1
* src/lisp.h (struct Lisp_Hash_Table):
Use ENUM_BF for members weakness and frozen_test,
since they are enum bitfields.
2025-01-18 23:28:10 -08:00
Paul Eggert
866cb87185 Update from Gnulib by running admin/merge-gnulib 2025-01-18 23:28:10 -08:00
Paul Eggert
d65f727ab4 Port to AIX 7.3 ‘find’
* configure.ac (FIND_DELETE): Port to AIX 7.3 ‘find’,
which exits with nonzero status if ‘-exec rm -f {} +’
is never invoked.
2025-01-18 23:28:10 -08:00
Paul Eggert
421d307733 Simplify cross cleaning
* cross/Makefile.in (clean, maintainer-clean):
Prefer a single ‘find’ to doing ‘find’ in a shell loop.
2025-01-18 23:28:10 -08:00
Eli Zaretskii
0f75a01acd ; Fix cross-references in Texinfo manuals 2025-01-19 08:23:23 +02:00
Eli Zaretskii
2a314666e4 Revert "Revert "Use @xref more consistently; "See @ref" -> "@xref"""
This reverts commit 59167e2de8.
TRT to use reference in Texinfo is to place some punctuation
character after a reference.  This is common both to @ref and
to @xref.  So this is what should be done to fix the changeset,
not to revert it.
2025-01-19 08:06:48 +02:00
Stefan Kangas
20c282ae33 Prefer 'list (...)' to 'listn (N, ...)'
* src/androidfns.c (Fandroid_query_battery):
* src/buffer.c (make_lispy_itree_node):
* src/keyboard.c (init_while_no_input_ignore_events):
* src/window.c (Fset_window_configuration):
* src/xterm.c (x_dnd_send_unsupported_drop): Prefer 'list (...)' to
'listn (N, ...)'.
* admin/coccinelle/listn.cocci: New file.
2025-01-19 04:42:37 +01:00
Pip Cet
d5f99f4431 Fix a GTK memory leak (Bug#75636)
* src/gtkutil.c (xg_create_frame_widgets): Don't call g_object_ref.
2025-01-19 03:27:34 +00:00
Po Lu
59167e2de8 Revert "Use @xref more consistently; "See @ref" -> "@xref""
This reverts commit e54b94c28c,
which prevented building Emacs on a number of my machine(s).
2025-01-19 08:59:28 +08:00
Stefan Kangas
e54b94c28c Use @xref more consistently; "See @ref" -> "@xref"
* doc/lispref/commands.texi (Using Interactive):
* doc/lispref/customize.texi (Type Keywords):
* doc/lispref/edebug.texi (Using Edebug, Specification List):
* doc/lispref/frames.texi (Frame Layout):
* doc/lispref/functions.texi (What Is a Function, Related Topics):
* doc/lispref/keymaps.texi (Controlling Active Maps, Key Lookup):
* doc/lispref/minibuf.texi (Completion Variables):
* doc/lispref/os.texi (Terminal Input):
* doc/lispref/text.texi (JSONRPC Overview):
* doc/misc/calc.texi (More About Embedded Mode, Customizing Calc):
* doc/misc/cc-mode.texi (Movement Commands, Auto-newlines)
(Config Basics, Custom Auto-newlines):
* doc/misc/gnus.texi (Email Based Diary):
* doc/misc/htmlfontify.texi (Interactive, Non-interactive):
(Variables):
* doc/misc/idlwave.texi (Using the Shell):
* doc/misc/srecode.texi (Quick Start, User Templates)
(Parts of SRecode, Compound Variable Values, Template Macros):
* doc/misc/tramp.texi (Inline methods, FUSE-based methods)
(Predefined connection information, Remote shell setup)
(Frequently Asked Questions):
* doc/misc/transient.texi (Configuration, Technical Introduction):
(Binding Suffix and Infix Commands, Transient State):
(Prefix Slots, Predicate Slots):
* doc/misc/wisent.texi (Example, Compiling a grammar, Conflicts):
(Grammar Debugging, Error recovery):
2025-01-19 01:34:44 +01:00
Stefan Kangas
2c7b08c60a Initialize full range in parse_menu_item
* src/keyboard.c (parse_menu_item): Initialize the full range of item,
in case future changes makes ITEM_PROPERTY_ENABLE != ITEM_PROPERTY_MAX.
Problem reported by Pip Cet <pipcet@protonmail.com>.
Ref: https://mail.gnu.org/r/emacs-devel/2025-01/msg00680.html
2025-01-19 00:49:30 +01:00
Paul Eggert
8661f40ce4 Remove unnecessary stdalign.in.h
* lib/stdalign.in.h: Remove.  This file was already removed in
commit b429274c5b (2023-02-04)
but was brought back mistakenly by a merge from emacs-29 in
commit ecf08f0621 (2024-01-02).
* nt/inc/stdalign.h: Don’t mention removed file in comment.
2025-01-18 11:27:48 -08:00
Arsen Arsenović
311b3f70f5 ruler-mode: Improve compatibility with text-scale (bug#75168)
* lisp/ruler-mode.el (ruler-mode-ruler): Use pixelwise line-number
display width for alignment with line numbers.
2025-01-18 17:53:17 +02:00
Eli Zaretskii
63a322b616 ; * lisp/repeat.el (cl-extra): Require, to shut up byte-compiler. 2025-01-18 15:17:28 +02:00
Eli Zaretskii
dcfc31dabd Merge from origin/emacs-30
853719c4c2 ; * lisp/net/eww.el (eww-download): Doc fix (bug#75585)
45ec5865aa ; * etc/NEWS: Tweak wording of NSM items.
b981889e9e ; cperl-mode-tests.el: Don't run the newest test in perl-...
6a864ef8f3 Add smtpmail cross-reference to 'auth-sources'.
1fd7957bc7 ; cperl-mode.el: Add a test for Bug#74245
8d289670d6 Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/...
b74ac4af94 ; cperl-mode.el: Allow bare $ in a signature (Bug#74245)
30e84fc653 Emphasize the use of :tag for new customization types

# Conflicts:
#	etc/NEWS
2025-01-18 07:46:34 -05:00
Eli Zaretskii
fae75737c8 ; Merge from origin/emacs-30
The following commit was skipped:

30e84fc653 Emphasize the use of :tag for new customization types
2025-01-18 07:46:31 -05:00
Eli Zaretskii
840057bb1b ; Fix last change by using 'cl-oddp' and 'cl-evenp' (bug#75633). 2025-01-18 13:08:45 +02:00
Ahmed Khanzada
103ae72ee9 New unit-tests for cl-lib (bug#75633). 2025-01-18 13:03:19 +02:00
Eli Zaretskii
853719c4c2 ; * lisp/net/eww.el (eww-download): Doc fix (bug#75585) 2025-01-18 12:56:48 +02:00
Michael Albinus
ef194a1e0e * test/infra/Dockerfile.emba (emacs-igc): Build libmps from git sources. 2025-01-18 09:29:10 +01:00
Eli Zaretskii
43c2e49d19 ; * nt/gnulib-cfg.mk: Remove unused modules. (Bug#75551) 2025-01-18 09:44:26 +02:00
Eli Zaretskii
17d9c22b80 ; * doc/lispref/parsing.texi (Pattern Matching): Fix markup in @example. 2025-01-18 09:22:39 +02:00
Eli Zaretskii
d6151e9da5 ; * doc/lispref/parsing.texi (Pattern Matching): Fix punctuation. 2025-01-18 09:18:09 +02:00
Gerd Möllmann
bee2f814f2 ; Fix a declare-function for reconsider-frame-fonts
* lisp/dynamic-setting.el (reconsider-frame-fonts): Declare.
2025-01-18 08:09:17 +01:00
Yuan Fu
fae424aba9
Fix treesit.el tests
* lisp/treesit.el (treesit--imenu-merge-entries):
(Ftreesit_parser_set_included_ranges): Warn in the docstring
that the function is destructive/owns the argument.
* test/src/treesit-tests.el (treesit-range-fixup-after-edit):
(treesit-imenu): Fix tests.
2025-01-17 18:24:45 -08:00
Yuan Fu
f7e41ba3d0
Make sure treesit.el doesn't create parsers by itself (bug#75456)
Up to this point, functions in
treesit.el (font-lock/indentation/etc) creates a parser if one
doesn't exist.  This doesn't work well with local parsers,
because local parsers are not visible at global level and
font-lock or indentation functions might accidentally create a
global parser for an embedded language.

The solution is to not create parsers automatically.  This has
the potential of breaking things, but I don't expect any actual
breakage: all the major modes create parsers they need in the
major mode body, even though previously it isn't technically
necessary.

* lisp/treesit.el (treesit-buffer-root-node):
(treesit--update-ranges-local):
(treesit-update-ranges):
(treesit--guess-primary-parser): Use treesit-parser-list instead
of treesit-parser-create.
2025-01-17 17:40:04 -08:00
Yuan Fu
197d09a5fa
Remap language symbol in treesit-query-compile (bug#72388)
* src/treesit.c (Ftreesit_query_compile): Use remapped language.
2025-01-17 17:27:23 -08:00
Yuan Fu
e3b9de03e6
Use treesit-query-first-valid in c-ts-mode
* lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings):
Use treesit-query-first-valid.  Use :default-language keyword.
(c-ts-mode--test-virtual-named-p): Remove function.
2025-01-17 17:27:23 -08:00
Yuan Fu
814b45775f
Add treesit-query-first-valid
This should help major modes to support grammar versions.

* doc/lispref/parsing.texi (Pattern Matching): Mention new function.
* lisp/treesit.el (treesit-query-first-valid): New function.
(treesit-query-valid-p): New function.
2025-01-17 17:27:23 -08:00
Paul Eggert
d3a2ec5210 Simplify alloc by assuming MALLOC_IS_LISP_ALIGNED
Problem reported by Hong Xu <https://bugs.gnu.org/75551#14>.
* src/alloc.c (MALLOC_IS_LISP_ALIGNED): static_assert it,
since it is true on all current Emacs platforms.
All uses simplified to assume it is true.
(xmalloc, xzalloc, xrealloc, lisp_malloc): Just use
malloc/calloc/realloc.  Since we are using the malloc-gnu
and realloc-posix modules, we need not worry about whether
these functions return a null pointer for zero-size requests.
(xrealloc): Stop worrying about no-longer-existing platforms
where realloc (nullptr, ...) did not work.
(laligned, lmalloc, lrealloc): Remove.  All uses removed.
2025-01-17 15:56:30 -08:00
Paul Eggert
29794c7145 Let Gnulib deal with malloc/realloc 0
Instead of worrying about whether malloc and realloc yield a
non-null pointer when given size 0 (the traditional behavior
recommended by Doug McIlroy, and the only behavior that makes
sense for Emacs), let Gnulib arrange for the traditional behavior.
* admin/merge-gnulib (GNULIB_MODULES): Add malloc-gnu (which we
were already depending on indirectly) and realloc-posix.
* lib/gnulib.mk.in, m4/gnulib-comp.m4:
Regenerate by running admin/merge-gnulib.
2025-01-17 15:56:30 -08:00
Paul Eggert
9eefe7ccda Update from Gnulib by running admin/merge-gnulib 2025-01-17 15:56:30 -08:00
Pip Cet
c311c4158b ; * src/keyboard.c (syms_of_keyboard): Initialize GC header. 2025-01-17 20:39:55 +00:00
Pip Cet
2a00bedeae Fix build on Solaris 10 (bug#75451)
* autogen.sh: Avoid bashism.
* configure.ac (AC_PROG_AWK): Use.
* src/Makefile.in (AWK): Set.
(dmpstruct.h): Use "$(AWK)", not "awk".
* src/dired.c (DT_UNKNOWN, DT_DIR, DT_LNK): Define all three constants
or none of them.
2025-01-17 17:22:45 +00:00
Stefan Kangas
91b2b3654f Turn macros into enums in keyboard.h
* src/keyboard.h (item_property_idx, menu_item_pane_idx): Turn macros
into enums.
(ITEM_PROPERTY_MAX): New constant.
* src/keyboard.c (parse_menu_item): Use above new constant.
2025-01-17 18:17:35 +01:00
Stefan Kangas
45ec5865aa ; * etc/NEWS: Tweak wording of NSM items. 2025-01-17 17:28:24 +01:00