]> git.eshelyaron.com Git - emacs.git/log
emacs.git
4 weeks agoFix ```elisp code``` handling in mails
Eshel Yaron [Mon, 20 Jan 2025 18:51:48 +0000 (19:51 +0100)]
Fix ```elisp code``` handling in mails

4 weeks agoUse 'max' macro in clip_to_bounds
Stefan Kangas [Mon, 20 Jan 2025 13:05:37 +0000 (14:05 +0100)]
Use 'max' macro in clip_to_bounds

* src/lisp.h (clip_to_bounds): Use 'max' macro.

(cherry picked from commit b568ff418ce7147c27d7f82fe4a8eef325b9de2c)

4 weeks ago; Fix last change
Eli Zaretskii [Mon, 20 Jan 2025 12:39:20 +0000 (14:39 +0200)]
; Fix last change

* src/treesit.c (Ftreesit_parser_create): Fix comment wording.

* doc/lispref/parsing.texi (Using Parser): Fix wording and markup.

(cherry picked from commit ad51b3b3911bcca1dba5a5b3e5581465d2277d64)

4 weeks agoMake treesit-language-remap-alist completely transparent (bug#72388)
Yuan Fu [Mon, 20 Jan 2025 06:34:11 +0000 (22:34 -0800)]
Make treesit-language-remap-alist completely transparent (bug#72388)

* doc/lispref/parsing.texi (Using Parser): Update manual.
* src/treesit.c (Ftreesit_parser_create): Use the LANGUAGE
argument given as the language for the parser, not the actual
language.

(cherry picked from commit 458135155675a29a2c064998afc0cb416cd38b52)

4 weeks agopdumper: Add static_assert for EMACS_RELOC_TYPE_BITS
Stefan Kangas [Mon, 20 Jan 2025 02:10:34 +0000 (03:10 +0100)]
pdumper: Add static_assert for EMACS_RELOC_TYPE_BITS

* src/pdumper.c: Add static_assert for EMACS_RELOC_TYPE_BITS.

(cherry picked from commit 9093a0f824d709af15a29da528259dbca30f5c29)

4 weeks agoRemove redundant case_Lisp_Int macro
Stefan Kangas [Mon, 20 Jan 2025 00:55:19 +0000 (01:55 +0100)]
Remove redundant case_Lisp_Int macro

The case_Lisp_Int macro was originally introduced with different
definitions depending on USE_2_TAGS_FOR_INTS.  However, since commit
2b5701247845, we have assumed that USE_2_TAGS_FOR_INTS is always
defined, and the macro has only a single definition.  As a result, the
macro is now unnecessary, and replacing it with standard C case labels
improves readability and understanding.

* src/lisp.h (case_Lisp_Int): Delete macro.
* src/alloc.c (process_mark_stack, survives_gc_p):
* src/data.c (Fcl_type_of):
* src/fns.c (value_cmp, sxhash_obj):
* src/pdumper.c (dump_object):
* src/print.c (print_object):
* src/xfaces.c (face_attr_equal_p): Remove uses of above macro.

(cherry picked from commit 278d1994af4c52a5590c793d27d8fd2867fe7a66)

4 weeks agoPort better to AIX 7.3 with -lsqlite3 but not sqlite3.h
Paul Eggert [Mon, 20 Jan 2025 00:23:06 +0000 (16:23 -0800)]
Port better to AIX 7.3 with -lsqlite3 but not sqlite3.h

* configure.ac (HAVE_SQLITE): Yes only if sqlite3.h can be
included (Bug#75667).

(cherry picked from commit dcccb9256262f8e992b75602dd4e861371b97361)

4 weeks agoPort better to AIX 7.3 with -lz but not zlib.h
Paul Eggert [Sun, 19 Jan 2025 19:29:59 +0000 (11:29 -0800)]
Port better to AIX 7.3 with -lz but not zlib.h

* configure.ac (HAVE_ZLIB, LIBZ):
Define only if zlib.h can be included (Bug#75667).

(cherry picked from commit a94988c01d45e4e494789d8715eed7ff7b383341)

4 weeks agoRemove workaround for AIX 3.2 crashes
Stefan Kangas [Sun, 19 Jan 2025 17:09:36 +0000 (18:09 +0100)]
Remove workaround for AIX 3.2 crashes

Emacs does not support AIX 3.2 since 2008.

This workaround for AIX 3.2.3 and 3.2.4 (released in 1992) was
introduced in 1999 and was only active with #ifdef AIX3_2.  In 2008, the
condition was changed to #ifdef AIX when support for these older AIX
versions was dropped. I couldn't find any justification for why this
workaround was retained (instead of being removed) in the commit message
or mailing list archives.

Given that users of AIX 4.0 (released in 1995) or later have not had
this workaround for over a decade (1999-2008), it seems safe to assume
that it is no longer necessary.  Removing it will also prevent the
incorrect overriding of the LANG variable on those systems.

* src/emacs.c [AIX] (main): Remove workaround for AIX 3.2.  (Bug#75153)

(cherry picked from commit 4021b92403ca184bc0cd52f33ed5c6e27780cede)

4 weeks agoPrefer the 'min'/'max' macros where possible
Stefan Kangas [Sun, 19 Jan 2025 16:04:12 +0000 (17:04 +0100)]
Prefer the 'min'/'max' macros where possible

* src/composite.c (find_automatic_composition):
* src/lisp.h (clip_to_bounds):
* src/pgtkfns.c (PATH_MAX_LEN):
* src/profiler.c (approximate_median):
* src/unexmacosx.c (unexec_write_zero, unexec_copy, unexec_realloc):
* src/xdisp.c (get_nearby_bol_pos): Prefer the 'min' and 'max' macros.

(cherry picked from commit c37aa3df9d84325924a7a163271154447dfc0cfd)

4 weeks agoDelete duplicate 'min' macro
Stefan Kangas [Sun, 19 Jan 2025 16:15:20 +0000 (17:15 +0100)]
Delete duplicate 'min' macro

* src/gmalloc.c (min): Delete duplicate macro.  We import lisp.h
unconditionally, so it is always defined here.

(cherry picked from commit f3b57fa519797df13f2e0ed9ebb097c37f5d71ce)

4 weeks agoMake NSM warn for RSA key exchange on medium severity
Stefan Kangas [Sun, 19 Jan 2025 14:10:45 +0000 (15:10 +0100)]
Make NSM warn for RSA key exchange on medium severity

* lisp/net/nsm.el (network-security-protocol-checks): Bump rsa-kx
severity to medium.
(nsm-protocol-check--dhe-kx): Update docstring to describe several more
recent attacks, and its removal in TLS 1.3.

(cherry picked from commit 4106fd28c7719d363395438400530752fb86f57c)

4 weeks agoDelete unused aliases for calln
Stefan Kangas [Sun, 19 Jan 2025 04:29:27 +0000 (05:29 +0100)]
Delete unused aliases for calln

* src/lisp.h (call1, call2, call3, call4)
(call5, call6, call7, call8): Delete unused aliases for calln.

(cherry picked from commit 6a0db0d80d538978f4e681b5947d60b7fb93cf9e)

4 weeks agoReplace call[1-8] with calln
Stefan Kangas [Sun, 19 Jan 2025 03:59:22 +0000 (04:59 +0100)]
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'.

(cherry picked from commit 251e3d2654ae8e5fdee4624d9af93fb9c0e1b698)

4 weeks agoDocument use of calln in C code in internals.texi
Stefan Kangas [Sun, 19 Jan 2025 11:44:05 +0000 (12:44 +0100)]
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.

(cherry picked from commit 7362f9f75d5aca1c97f920531dd62763918ba5fe)

4 weeks agoImproved git-add completion
Peter Seibel [Sat, 18 Jan 2025 15:54:51 +0000 (07:54 -0800)]
Improved git-add completion

* lisp/pcmpl-git.el (pcomplete/git)): Complete untracked files.
(Bug#75336)

Copyright-paperwork-exempt: yes
(cherry picked from commit 2fd72a6ed3f6ea2937b38a4d74d93e8cfa1a54fb)

4 weeks ago; Skip commit ba5360f700b1cbdd16e13a83f622e5c2d29c9439
Eshel Yaron [Mon, 20 Jan 2025 15:58:51 +0000 (16:58 +0100)]
; Skip commit ba5360f700b1cbdd16e13a83f622e5c2d29c9439

4 weeks ago; Fix autorevert-tests on MS-Windows
Eli Zaretskii [Sun, 19 Jan 2025 12:42:46 +0000 (14:42 +0200)]
; Fix autorevert-tests on MS-Windows

* test/lisp/autorevert-tests.el
(auto-revert-test04-auto-revert-mode-dired): Fix test on
MS-Windows.

(cherry picked from commit be786ab3bb263cb88e548f439562cbdf93587a3f)

4 weeks ago* src/fileio.c (Finsert_file_contents): Fix last change.
Eli Zaretskii [Sun, 19 Jan 2025 12:20:18 +0000 (14:20 +0200)]
* src/fileio.c (Finsert_file_contents): Fix last change.

(cherry picked from commit f367b01f128223d3fc7c34985eccce744333fa8f)

4 weeks agoFix visiting files in /proc/ directory
Eli Zaretskii [Sun, 19 Jan 2025 10:51:18 +0000 (12:51 +0200)]
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)

(cherry picked from commit 26c9fbc94dae34fc119828661c71242d80bb33c5)

4 weeks agoFix Tramp error handling process buffer
Michael Albinus [Sun, 19 Jan 2025 10:30:10 +0000 (11:30 +0100)]
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".

(cherry picked from commit 40a8d0ebf0ca6199697c95a308201e739dd9540d)

4 weeks agoAlign files after dired revert (Bug#17219)
Jakub Ječmínek [Sun, 22 Dec 2024 20:53:53 +0000 (21:53 +0100)]
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.

(cherry picked from commit cce6a57af7cff36936340a6a43be73ccfcadea5f)

4 weeks agoPrefer EMACS_INT_MAX to TYPE_MAXIMUM (EMACS_INT)
Paul Eggert [Sun, 19 Jan 2025 08:19:50 +0000 (00:19 -0800)]
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.

(cherry picked from commit 7809086b3bd4f7e7257b42955e3e9eccefb289c3)

4 weeks agoPort recently-added bitfields back to GCC
Paul Eggert [Sun, 19 Jan 2025 08:16:28 +0000 (00:16 -0800)]
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.

(cherry picked from commit f9be225501ce1ae53ec78136679de14ff093f46d)

4 weeks agoAlways define image_compute_scale
Paul Eggert [Sun, 19 Jan 2025 07:26:02 +0000 (23:26 -0800)]
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.

(cherry picked from commit fb434b85167d28e6739c8fc6fa80970011b79a0d)

4 weeks agoPort recently-added bitfields to IBM XL C 16.1
Paul Eggert [Sun, 19 Jan 2025 07:10:53 +0000 (23:10 -0800)]
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.

(cherry picked from commit abf2e097b281c92a7bc2776a967893b248a68384)

4 weeks agoUpdate from Gnulib by running admin/merge-gnulib
Paul Eggert [Sun, 19 Jan 2025 06:33:25 +0000 (22:33 -0800)]
Update from Gnulib by running admin/merge-gnulib

(cherry picked from commit 866cb87185d9096b248f42c11ee03c19ed7c7598)

4 weeks agoPort to AIX 7.3 ‘find’
Paul Eggert [Sun, 19 Jan 2025 04:01:16 +0000 (20:01 -0800)]
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.

(cherry picked from commit d65f727ab401a8dfe11de7837ecee6661a113fea)

4 weeks agoSimplify cross cleaning
Paul Eggert [Sun, 19 Jan 2025 04:01:16 +0000 (20:01 -0800)]
Simplify cross cleaning

* cross/Makefile.in (clean, maintainer-clean):
Prefer a single ‘find’ to doing ‘find’ in a shell loop.

(cherry picked from commit 421d30773372b650a00fe250442f6db2bcc71270)

4 weeks ago; Fix cross-references in Texinfo manuals
Eli Zaretskii [Sun, 19 Jan 2025 06:23:23 +0000 (08:23 +0200)]
; Fix cross-references in Texinfo manuals

(cherry picked from commit 0f75a01acd3fe880da6884018565870ba800f30e)

4 weeks agoRevert "Revert "Use @xref more consistently; "See @ref" -> "@xref"""
Eli Zaretskii [Sun, 19 Jan 2025 06:06:48 +0000 (08:06 +0200)]
Revert "Revert "Use @xref more consistently; "See @ref" -> "@xref"""

This reverts commit 59167e2de8a93341cd235d83e034c00be32403f6.
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.

(cherry picked from commit 2a314666e4800639a81ff6562395c3d38cb97e7b)

4 weeks agoPrefer 'list (...)' to 'listn (N, ...)'
Stefan Kangas [Sun, 19 Jan 2025 03:25:52 +0000 (04:25 +0100)]
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.

(cherry picked from commit 20c282ae331a5b71d7bae258ccdaa1e54490c3ef)

4 weeks agoFix a GTK memory leak (Bug#75636)
Pip Cet [Sun, 19 Jan 2025 03:27:34 +0000 (03:27 +0000)]
Fix a GTK memory leak (Bug#75636)

* src/gtkutil.c (xg_create_frame_widgets): Don't call g_object_ref.

(cherry picked from commit d5f99f4431551865ff547ff2ecb7f10844ce881a)

4 weeks agoRevert "Use @xref more consistently; "See @ref" -> "@xref""
Po Lu [Sun, 19 Jan 2025 00:58:45 +0000 (08:58 +0800)]
Revert "Use @xref more consistently; "See @ref" -> "@xref""

This reverts commit e54b94c28cdf9699009e7691f7c8ffa5b2c7b741,
which prevented building Emacs on a number of my machine(s).

(cherry picked from commit 59167e2de8a93341cd235d83e034c00be32403f6)

4 weeks agoUse @xref more consistently; "See @ref" -> "@xref"
Stefan Kangas [Sun, 19 Jan 2025 00:34:44 +0000 (01:34 +0100)]
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):

(cherry picked from commit e54b94c28cdf9699009e7691f7c8ffa5b2c7b741)

4 weeks agoInitialize full range in parse_menu_item
Stefan Kangas [Sat, 18 Jan 2025 23:48:08 +0000 (00:48 +0100)]
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

(cherry picked from commit 2c7b08c60a20268b3f55c95699542c9df95fc786)

4 weeks agoscope.el,elisp-mode.el: Recognize 'declare' specs
Eshel Yaron [Mon, 20 Jan 2025 15:48:05 +0000 (16:48 +0100)]
scope.el,elisp-mode.el: Recognize 'declare' specs

4 weeks agoscope.el: Handle 'cl-defmethod' and 'cl-defun'
Eshel Yaron [Mon, 20 Jan 2025 07:58:20 +0000 (08:58 +0100)]
scope.el: Handle 'cl-defmethod' and 'cl-defun'

4 weeks ago* lisp/emacs-lisp/scope.el: Analyze type argument of cl-typep
Eshel Yaron [Mon, 20 Jan 2025 07:57:16 +0000 (08:57 +0100)]
* lisp/emacs-lisp/scope.el: Analyze type argument of cl-typep

4 weeks ago(elisp-create-defun): New command
Eshel Yaron [Mon, 20 Jan 2025 07:56:46 +0000 (08:56 +0100)]
(elisp-create-defun): New command

4 weeks agoscope.el,elisp-mode.el: Recognize warning types
Eshel Yaron [Mon, 20 Jan 2025 07:56:06 +0000 (08:56 +0100)]
scope.el,elisp-mode.el: Recognize warning types

4 weeks ago* lisp/loadhist.el (file-set-intersect): Drop it.
Eshel Yaron [Mon, 20 Jan 2025 07:55:12 +0000 (08:55 +0100)]
* lisp/loadhist.el (file-set-intersect): Drop it.

4 weeks ago(loadhist-unload-element): Implement also for 'define-widget'
Eshel Yaron [Mon, 20 Jan 2025 07:54:46 +0000 (08:54 +0100)]
(loadhist-unload-element): Implement also for 'define-widget'

4 weeks agoscope.el: Recognize a few more widgets
Eshel Yaron [Mon, 20 Jan 2025 07:54:05 +0000 (08:54 +0100)]
scope.el: Recognize a few more widgets

4 weeks agoRemove unnecessary stdalign.in.h
Paul Eggert [Sat, 18 Jan 2025 19:22:22 +0000 (11:22 -0800)]
Remove unnecessary stdalign.in.h

* lib/stdalign.in.h: Remove.  This file was already removed in
commit b429274c5b4b2b511d2d351111dea2d354498e0f (2023-02-04)
but was brought back mistakenly by a merge from emacs-29 in
commit ecf08f0621c25ad1dfadd96399e204c389ab1695 (2024-01-02).
* nt/inc/stdalign.h: Don’t mention removed file in comment.

(cherry picked from commit 8661f40ce4d6bce649cb2a564f7c4e766318476c)

4 weeks agoruler-mode: Improve compatibility with text-scale (bug#75168)
Arsen Arsenović [Sat, 18 Jan 2025 15:40:29 +0000 (16:40 +0100)]
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.

(cherry picked from commit 311b3f70f543a106bc9ebc369b69432a106b0e38)

4 weeks ago; Skip commit 63a322b616b8e2d1edd2b3dd9217ff595eaaec6e
Eshel Yaron [Sat, 18 Jan 2025 22:05:00 +0000 (23:05 +0100)]
; Skip commit 63a322b616b8e2d1edd2b3dd9217ff595eaaec6e

4 weeks ago; Fix last change by using 'cl-oddp' and 'cl-evenp' (bug#75633).
Eli Zaretskii [Sat, 18 Jan 2025 11:08:45 +0000 (13:08 +0200)]
; Fix last change by using 'cl-oddp' and 'cl-evenp' (bug#75633).

(cherry picked from commit 840057bb1bfc05a52519793c620d729688ea1d8f)

4 weeks agoNew unit-tests for cl-lib (bug#75633).
Ahmed Khanzada [Fri, 17 Jan 2025 14:48:57 +0000 (09:48 -0500)]
New unit-tests for cl-lib (bug#75633).

(cherry picked from commit 103ae72ee9f197943265b76590cbad1d6e08a9b5)

4 weeks ago; * lisp/net/eww.el (eww-download): Doc fix (bug#75585)
Eli Zaretskii [Sat, 18 Jan 2025 10:56:48 +0000 (12:56 +0200)]
; * lisp/net/eww.el (eww-download): Doc fix (bug#75585)

(cherry picked from commit 853719c4c23a4ae0802a6eed3f855dc88381997f)

4 weeks ago; * nt/gnulib-cfg.mk: Remove unused modules. (Bug#75551)
Eli Zaretskii [Sat, 18 Jan 2025 07:44:26 +0000 (09:44 +0200)]
; * nt/gnulib-cfg.mk: Remove unused modules.  (Bug#75551)

(cherry picked from commit 43c2e49d19f2e7a840507ae9e728b623fcb7c341)

4 weeks ago; * doc/lispref/parsing.texi (Pattern Matching): Fix markup in @example.
Eli Zaretskii [Sat, 18 Jan 2025 07:22:39 +0000 (09:22 +0200)]
; * doc/lispref/parsing.texi (Pattern Matching): Fix markup in @example.

(cherry picked from commit 17d9c22b801783ed02e60c297d4af7abdd031c74)

4 weeks ago; * doc/lispref/parsing.texi (Pattern Matching): Fix punctuation.
Eli Zaretskii [Sat, 18 Jan 2025 07:18:09 +0000 (09:18 +0200)]
; * doc/lispref/parsing.texi (Pattern Matching): Fix punctuation.

(cherry picked from commit d6151e9da5459c316b2f2e0407ecbf4f20c9a66c)

4 weeks ago; Fix a declare-function for reconsider-frame-fonts
Gerd Möllmann [Sat, 18 Jan 2025 07:06:48 +0000 (08:06 +0100)]
; Fix a declare-function for reconsider-frame-fonts

* lisp/dynamic-setting.el (reconsider-frame-fonts): Declare.

(cherry picked from commit bee2f814f266290ce94ebb88281db356735e3356)

4 weeks agoFix treesit.el tests
Yuan Fu [Sat, 18 Jan 2025 02:24:45 +0000 (18:24 -0800)]
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.

(cherry picked from commit fae424aba97163738f6666ebec1351ceff4b5b2b)

4 weeks agoMake sure treesit.el doesn't create parsers by itself (bug#75456)
Yuan Fu [Sat, 18 Jan 2025 01:40:04 +0000 (17:40 -0800)]
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.

(cherry picked from commit f7e41ba3d0fb5f89b1d2712b699b526ef7d7b82c)

4 weeks agoRemap language symbol in treesit-query-compile (bug#72388)
Yuan Fu [Sat, 18 Jan 2025 01:26:23 +0000 (17:26 -0800)]
Remap language symbol in treesit-query-compile (bug#72388)

* src/treesit.c (Ftreesit_query_compile): Use remapped language.

(cherry picked from commit 197d09a5fa9e94a09b7569a42480253138a5b2fd)

4 weeks agoUse treesit-query-first-valid in c-ts-mode
Yuan Fu [Wed, 15 Jan 2025 07:52:37 +0000 (23:52 -0800)]
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.

(cherry picked from commit e3b9de03e641cef5daeada4912fa711470697ba3)

4 weeks agoAdd treesit-query-first-valid
Yuan Fu [Wed, 15 Jan 2025 07:32:48 +0000 (23:32 -0800)]
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.

(cherry picked from commit 814b45775ffcfa91c03fb54b78611eb97973c387)

4 weeks agoSimplify alloc by assuming MALLOC_IS_LISP_ALIGNED
Paul Eggert [Thu, 16 Jan 2025 07:32:43 +0000 (23:32 -0800)]
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.

(cherry picked from commit d3a2ec5210746a942263d5e18ee3b8190b9698e1)

4 weeks agoLet Gnulib deal with malloc/realloc 0
Paul Eggert [Fri, 17 Jan 2025 07:28:34 +0000 (23:28 -0800)]
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.

(cherry picked from commit 29794c71452c58c596c58fd6148741d213d3ee7b)

4 weeks agoUpdate from Gnulib by running admin/merge-gnulib
Paul Eggert [Fri, 17 Jan 2025 23:34:41 +0000 (15:34 -0800)]
Update from Gnulib by running admin/merge-gnulib

(cherry picked from commit 9eefe7ccdae5cc9d5cfb8b7e5897497490d4be4f)

4 weeks agoFix build on Solaris 10 (bug#75451)
Pip Cet [Fri, 17 Jan 2025 17:13:29 +0000 (17:13 +0000)]
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.

(cherry picked from commit 2a00bedeaef0a0caf8c810842c524b5c46de06ed)

4 weeks agoTurn macros into enums in keyboard.h
Stefan Kangas [Fri, 17 Jan 2025 17:17:35 +0000 (18:17 +0100)]
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.

(cherry picked from commit 91b2b3654f2dcf79c15a11cfe1130df6638b4a4e)

4 weeks ago; Skip commit 45ec5865aa78d098c8842e41f360947b1b030393
Eshel Yaron [Sat, 18 Jan 2025 22:00:42 +0000 (23:00 +0100)]
; Skip commit 45ec5865aa78d098c8842e41f360947b1b030393

4 weeks agoDo not rotate dedicated windows
Pranshu Sharma [Fri, 17 Jan 2025 15:35:43 +0000 (16:35 +0100)]
Do not rotate dedicated windows

* lisp/window-x.el (rotate-windows): Do not rotate windows
dedicated to their buffers.

(cherry picked from commit efd4fb51ec96b8ce8956fff2406de7a498ee6278)

4 weeks ago(hack-one-local-variable): Refine last patch (bug#74964)
Stefan Monnier [Fri, 17 Jan 2025 13:43:50 +0000 (08:43 -0500)]
(hack-one-local-variable): Refine last patch (bug#74964)

* lisp/files.el (hack-local-variables--inhibit-eval): Rename from
`hack-local-variables--inhibit`.
(hack-one-local-variable): Skip only those eval forms we're already
in the process of evaluating.

(cherry picked from commit 4fada67748db787bf3a08ff15f1ab6f7992f9a7e)

4 weeks ago; cperl-mode-tests.el: Don't run the newest test in perl-mode
Harald Jörg [Tue, 14 Jan 2025 11:17:47 +0000 (12:17 +0100)]
; cperl-mode-tests.el: Don't run the newest test in perl-mode

* test/lisp/progmodes/cperl-mode-tests.el (cperl-test-bug-74245): Skip
if not in cperl-mode

(cherry picked from commit b981889e9ee0a37f1bc8e2c9b90a5d154c1d032e)

4 weeks agoAdd smtpmail cross-reference to 'auth-sources'.
Robert Pluim [Tue, 14 Jan 2025 09:25:18 +0000 (10:25 +0100)]
Add smtpmail cross-reference to 'auth-sources'.

* doc/misc/smtpmail.texi (Authentication): Add cross-reference
to 'auth-sources'.

(cherry picked from commit 6a864ef8f39b8ec25c33479a8ac57b62fd10cfe7)

4 weeks ago; cperl-mode.el: Add a test for Bug#74245
Peter Oliver [Thu, 7 Nov 2024 19:22:21 +0000 (19:22 +0000)]
; cperl-mode.el: Add a test for Bug#74245

* test/lisp/progmodes/cperl-mode-resources/cperl-bug-74245.pl: New test data.

* test/lisp/progmodes/cperl-mode-tests.el (cperl-test-bug-74245): Verify
that a bare \"$\" can appear at the end of a subroutine signature.

(cherry picked from commit 1fd7957bc72b766ef8d2ddfc4858f714ee0814c0)

4 weeks ago; cperl-mode.el: Allow bare $ in a signature (Bug#74245)
Harald Jörg [Mon, 13 Jan 2025 11:24:40 +0000 (12:24 +0100)]
; cperl-mode.el: Allow bare $ in a signature (Bug#74245)

* lisp/progmodes/cperl-mode.el (cperl--signature-rx): Allow bare
sigils for unused parameters in signatures.
(cperl-find-pods-heres): Avoid $) at the end of a signature being
treated as the punctuation variable $) by treating this dollar as
punctuation

* test/lisp/progmodes/cperl-mode-tests.el
(cperl-test-signature-rx): Add ($first,$) as a valid signature,
remove ($) from the list of invalid signatures.

(cherry picked from commit b74ac4af9408230645f1edb56c410b7a80bb41d2)

4 weeks agoscope.el,elisp-mode.el: Improve 'rx' support
Eshel Yaron [Sat, 18 Jan 2025 21:30:43 +0000 (22:30 +0100)]
scope.el,elisp-mode.el: Improve 'rx' support

4 weeks agoscope.el: Handle 'signal' and 'ert-deftest'.
Eshel Yaron [Sat, 18 Jan 2025 21:30:06 +0000 (22:30 +0100)]
scope.el: Handle 'signal' and 'ert-deftest'.

4 weeks agoTeach elisp-mode.el to find widget definitions
Eshel Yaron [Sat, 18 Jan 2025 19:52:48 +0000 (20:52 +0100)]
Teach elisp-mode.el to find widget definitions

4 weeks agoscope.el,elisp-mode.el: Recognize some more definition types
Eshel Yaron [Sat, 18 Jan 2025 17:43:50 +0000 (18:43 +0100)]
scope.el,elisp-mode.el: Recognize some more definition types

4 weeks agoRestore autoload cookie highlighting
Eshel Yaron [Sat, 18 Jan 2025 17:43:28 +0000 (18:43 +0100)]
Restore autoload cookie highlighting

4 weeks ago(refactor-backend-read-scoped-identifier): Fail loudly
Eshel Yaron [Sat, 18 Jan 2025 17:09:45 +0000 (18:09 +0100)]
(refactor-backend-read-scoped-identifier): Fail loudly

4 weeks ago(refactor-backend-read-replacement): Provide live feedback
Eshel Yaron [Sat, 18 Jan 2025 17:04:55 +0000 (18:04 +0100)]
(refactor-backend-read-replacement): Provide live feedback

4 weeks ago(emacs-lisp-mode-map): Bind 'refactor-rename'
Eshel Yaron [Sat, 18 Jan 2025 17:04:21 +0000 (18:04 +0100)]
(emacs-lisp-mode-map): Bind 'refactor-rename'

4 weeks agoscope.el: better handling for defvar-local
Eshel Yaron [Sat, 18 Jan 2025 17:03:25 +0000 (18:03 +0100)]
scope.el: better handling for defvar-local

5 weeks agoscope.el,elisp-mode.el: Support and custom types groups
Eshel Yaron [Sat, 18 Jan 2025 13:54:46 +0000 (14:54 +0100)]
scope.el,elisp-mode.el: Support and custom types groups

5 weeks agoVarious 'emacs-lisp-mode' enhancements
Eshel Yaron [Sat, 18 Jan 2025 10:19:03 +0000 (11:19 +0100)]
Various 'emacs-lisp-mode' enhancements

5 weeks agoAdd 'major-mode-name' symbol property
Eshel Yaron [Sat, 18 Jan 2025 10:18:30 +0000 (11:18 +0100)]
Add 'major-mode-name' symbol property

5 weeks agoDrop some cruft
Eshel Yaron [Fri, 17 Jan 2025 12:34:49 +0000 (13:34 +0100)]
Drop some cruft

5 weeks agoMake NSM warn for TLS 1.1
Stefan Kangas [Fri, 17 Jan 2025 11:19:21 +0000 (12:19 +0100)]
Make NSM warn for TLS 1.1

* lisp/net/nsm.el (nsm-protocol-check--version): Warn also for
TLS 1.1.  Update docstring.

(cherry picked from commit 965e50e3aeda4bdca4d225194770796fc56d2b96)

5 weeks agoFlymake: fix bug introduced recently
João Távora [Fri, 17 Jan 2025 10:57:46 +0000 (10:57 +0000)]
Flymake: fix bug introduced recently

Must protect against flymake--state never having been a hash
table at all, so that flymake-mode can be safely turned off even
if it never turned on in the first place.

Github-reference: https://github.com/joaotavora/eglot/discussions/1480

* lisp/progmodes/flymake.el (flymake-mode): Fix bug.

(cherry picked from commit f7ff5f1ba4e87596cb4e055492b0e99321fd9950)

5 weeks agoMake NSM warn for DH key exchange on medium severity
Stefan Kangas [Fri, 17 Jan 2025 10:26:49 +0000 (11:26 +0100)]
Make NSM warn for DH key exchange on medium severity

* lisp/net/nsm.el (network-security-protocol-checks): Bump dhe-kx
severity to medium.
(nsm-protocol-check--dhe-kx): Update docstring to describe the so-called
Racoon Attack, discovered in 2020.

(cherry picked from commit c9196cf64e60c5c6088725e52d3f387108647e7b)

5 weeks ago; Skip commit 0b6ac3c6c134070cfd844c0d5605107bd66fbd7d
Eshel Yaron [Fri, 17 Jan 2025 11:48:56 +0000 (12:48 +0100)]
; Skip commit 0b6ac3c6c134070cfd844c0d5605107bd66fbd7d

5 weeks agoUpdate from Gnulib by running admin/merge-gnulib
Paul Eggert [Fri, 17 Jan 2025 07:19:27 +0000 (23:19 -0800)]
Update from Gnulib by running admin/merge-gnulib

(cherry picked from commit bc4c5818dfb3c16f817514d3ae3bc074b4c4c007)

5 weeks ago; Skip commit 37b5b3ea91a4ed005664540091e5150d2454d8d6
Eshel Yaron [Fri, 17 Jan 2025 11:48:51 +0000 (12:48 +0100)]
; Skip commit 37b5b3ea91a4ed005664540091e5150d2454d8d6

5 weeks ago; Skip commit 863fd1c276549fd70cd765e56f73d9649759ab90
Eshel Yaron [Fri, 17 Jan 2025 11:48:00 +0000 (12:48 +0100)]
; Skip commit 863fd1c276549fd70cd765e56f73d9649759ab90

5 weeks ago(find-function-search-for-symbol): Guard
Eshel Yaron [Fri, 17 Jan 2025 11:47:39 +0000 (12:47 +0100)]
(find-function-search-for-symbol): Guard

5 weeks ago(cl-block, cl-return-from): Fix bug#75498
Stefan Monnier [Thu, 16 Jan 2025 22:48:21 +0000 (17:48 -0500)]
(cl-block, cl-return-from): Fix bug#75498

* lisp/emacs-lisp/cl-macs.el (cl-block, cl-return-from):
Change encoding so it obeys variable coping (i.e. lexical scoping when
`lexical-binding` is non-nil).
(cl--block-wrapper, cl--block-throw): Adjust accordingly.

* test/lisp/emacs-lisp/cl-macs-tests.el
(cl-macs--test-cl-block-lexbind-bug-75498): New test.

(cherry picked from commit dace7fa2ab468aeeca664541490eb9f291427a63)

5 weeks ago(asm-mode): Fix bug#75542
Stefan Monnier [Thu, 16 Jan 2025 22:18:24 +0000 (17:18 -0500)]
(asm-mode): Fix bug#75542

* lisp/progmodes/asm-mode.el (asm-mode): Be careful not to override
changes in the mode map or in `comment-start`.
Move the use of `asm-mode-set-comment-hook` back to where it was before
commit 0cff4e67f1de.
(asm-mode-set-comment-hook): Declare it obsolete.

(cherry picked from commit 8fc5001ba5bc9fef3c438a070c87059fc19146a4)

5 weeks ago; Skip commit 78f5ea750a25145086c008991db6dd6f6dd2a466
Eshel Yaron [Fri, 17 Jan 2025 11:44:42 +0000 (12:44 +0100)]
; Skip commit 78f5ea750a25145086c008991db6dd6f6dd2a466

5 weeks agoImprove usability and documentation of Iroquoian input methods
Kierin Bell [Sat, 11 Jan 2025 22:25:51 +0000 (17:25 -0500)]
Improve usability and documentation of Iroquoian input methods

* lisp/leim/quail/iroquoian.el: Add variants for Mohawk and Oneida
endonyms in comments and docstrings.  Update the 'oneida-postfix' input
method to make the most commonly used glottal stop character easiest to
input.  Update the 'onondaga-postfix' input method with mnemonic keys
for nasals in the Onondaga Nation, New York orthography.  (Bug#75448)

* etc/NEWS: Add variants for Mohawk and Oneida endonyms to NEWS entry.

(cherry picked from commit edec6e2264ec4269d3bcdc5fadc22c793f5af7c2)

5 weeks ago; * src/font.c (syms_of_font): Fix typo.
Pip Cet [Thu, 16 Jan 2025 15:55:30 +0000 (15:55 +0000)]
; * src/font.c (syms_of_font): Fix typo.

(cherry picked from commit 7fdec438ef2538aea2cd02e91216d32348e6eb59)

5 weeks agoFix subtle problem with updating 'font_style_table'
Eli Zaretskii [Thu, 16 Jan 2025 15:51:47 +0000 (17:51 +0200)]
Fix subtle problem with updating 'font_style_table'

* src/font.c (font_style_to_value): Update the Vfont_* variables
to keep them in sync with their slots in 'font_style_table'.
(Bug#75521)
(syms_of_font): Comment on usage of DEFVAR_LISP_NOPRO.

(cherry picked from commit 8d471adecef540d49807dad114f7a11fb3fe2a95)

5 weeks ago; * lisp/emacs-lisp/rx.el: Remove extra dash. (Bug#75603)
Eli Zaretskii [Thu, 16 Jan 2025 15:15:42 +0000 (17:15 +0200)]
; * lisp/emacs-lisp/rx.el: Remove extra dash.  (Bug#75603)

(cherry picked from commit b86b8f52a6fe91af239ddda73dc4d8ee32c26fc0)

5 weeks ago; Skip commit d30351e03815e5914ec486607441e449c02c6c45
Eshel Yaron [Fri, 17 Jan 2025 11:35:22 +0000 (12:35 +0100)]
; Skip commit d30351e03815e5914ec486607441e449c02c6c45