]> git.eshelyaron.com Git - emacs.git/log
emacs.git
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

5 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

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

5 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

5 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

5 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'

5 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

5 weeks agoTake the tab-line into account when computing the window edges
Steven Allen [Wed, 15 Jan 2025 07:56:08 +0000 (23:56 -0800)]
Take the tab-line into account when computing the window edges

window-body-height correctly subtracts the tab-line's height but
window-edges did not add this same height to the y-offset.

See https://github.com/emacs-exwm/exwm/pull/114

* lisp/window.el (window-edges): Add the tab-line-height to the y-offet
of the window body.  (Bug#75576)

(cherry picked from commit ec20ebf2413ca1042cd41e3a278d18f1fc1debf6)

5 weeks agoUpdate from Gnulib by running admin/merge-gnulib
Paul Eggert [Thu, 16 Jan 2025 03:31:07 +0000 (19:31 -0800)]
Update from Gnulib by running admin/merge-gnulib

(cherry picked from commit 74dc2bd28007e68532d9813a57d3ec7da0c390e3)

5 weeks agoFix clear-string crash with text properties
Stefan Kangas [Wed, 15 Jan 2025 22:11:16 +0000 (23:11 +0100)]
Fix clear-string crash with text properties

* src/fns.c (Fclear_string): Fix crash by clearing all text
properties.  (Bug#75581)
* doc/lispref/strings.texi (Modifying Strings): Document the above
behavior change.
Fix proposed by Andreas Schwab <schwab@linux-m68k.org>.

(cherry picked from commit 4f946a652278cc72a777fe56999bc4525f53e03a)

5 weeks agoAdd clear-string to symbol-releases.eld
Stefan Kangas [Wed, 15 Jan 2025 22:11:45 +0000 (23:11 +0100)]
Add clear-string to symbol-releases.eld

* etc/symbol-releases.eld (clear-string): Add function.

(cherry picked from commit 86916c136b3129fac2e805b380fe501a50459abd)

5 weeks agoPrefer 'ARRAYELTS (x)' to 'sizeof x / sizeof *x'
Stefan Kangas [Wed, 15 Jan 2025 19:09:32 +0000 (20:09 +0100)]
Prefer 'ARRAYELTS (x)' to 'sizeof x / sizeof *x'

* src/comp.c (emit_limple_insn):
* src/msdos.c (dos_set_keyboard, dos_rawgetc):
* src/sysdep.c (convert_speed, list_system_processes):
* src/w32fns.c (deliver_wm_chars, Fx_file_dialog):
* src/w32term.c (record_event, w32_read_socket):
Prefer 'ARRAYELTS (x)' to 'sizeof x / sizeof *x'.

* admin/coccinelle/arrayelts.cocci: New file.

(cherry picked from commit e092aabf714717dd135e5767a49b78c428e49878)

5 weeks agoUse calln instead of calling Ffuncall directly
Stefan Kangas [Tue, 14 Jan 2025 20:36:46 +0000 (21:36 +0100)]
Use calln instead of calling Ffuncall directly

* src/bytecode.c (bcall0):
* src/comp.c (bcall0):
* src/eval.c (apply1):
* src/lisp.h (call0):
* src/thread.c (invoke_thread_function): Use calln instead of calling
Ffuncall directly.

* admin/coccinelle/calln.cocci: New semantic patch.

(cherry picked from commit 16c89c5ae5ec0c002c327793e783f0a943bacb0d)

5 weeks agoImprove repeat-mode to correctly show multi-key sequences as echo
Juri Linkov [Tue, 14 Jan 2025 19:48:53 +0000 (21:48 +0200)]
Improve repeat-mode to correctly show multi-key sequences as echo

* lisp/repeat.el (repeat-echo-message-string):
Use 'cl--map-keymap-recursively' that iterates over
complete key sequences.  Also it returns key vectors,
so don't need to use 'vector'.

(cherry picked from commit 2e937dc2b5ad7a87a099df3f014795e88df5cba9)

5 weeks agoFix repeat-mode to keep the same map symbol for repeat-continue
Juri Linkov [Tue, 14 Jan 2025 19:41:48 +0000 (21:41 +0200)]
Fix repeat-mode to keep the same map symbol for repeat-continue

* lisp/repeat.el (repeat-get-map-sym): New function
refactored from 'repeat-get-map'.
(repeat-get-map): Move continue-related code to 'repeat-get-map-sym'.
(repeat-pre-hook): Use 'repeat-get-map-sym' and 'repeat-get-map'.
Set 'repeat-map' to 'map-sym'.
(repeat-post-hook): Use 'repeat-get-map-sym'.

* test/lisp/repeat-tests.el (repeat-tests-continue-another):
Improve to invoke double key 'C-M-o C-M-o' that should not switch
between maps (bug#74140).

(cherry picked from commit 0bd12f560b0b288e6c7717bf2e0f664c17d07619)

5 weeks ago* lisp/tab-bar.el (tab-bar-select-tab): Fix tab-bar-history-mode.
Juri Linkov [Tue, 14 Jan 2025 18:20:42 +0000 (20:20 +0200)]
* lisp/tab-bar.el (tab-bar-select-tab): Fix tab-bar-history-mode.

Reset the values of 'tab-bar-history-back' and 'tab-bar-history-forward'
to nil to not retain a previous tab's history after switching to another
tab using window-state.

(cherry picked from commit 6b71d0b1786928474741c356eb7199746f07eb62)

5 weeks agoFix copy paste error
Eshel Yaron [Fri, 17 Jan 2025 11:28:32 +0000 (12:28 +0100)]
Fix copy paste error

5 weeks ago; Avoid 'call-interactively' with constant arg
Eshel Yaron [Fri, 17 Jan 2025 11:28:14 +0000 (12:28 +0100)]
; Avoid 'call-interactively' with constant arg

5 weeks ago(elisp-extract-local-variable): Various improvements
Eshel Yaron [Fri, 17 Jan 2025 11:27:12 +0000 (12:27 +0100)]
(elisp-extract-local-variable): Various improvements

5 weeks agoNew command 'elisp-extract-local-variable'
Eshel Yaron [Thu, 16 Jan 2025 20:07:27 +0000 (21:07 +0100)]
New command 'elisp-extract-local-variable'

5 weeks agoNew pcase construct (cheq EQPRED)
Eshel Yaron [Thu, 16 Jan 2025 10:39:16 +0000 (11:39 +0100)]
New pcase construct (cheq EQPRED)

5 weeks agoDrop sneaky apropos reference
Eshel Yaron [Thu, 16 Jan 2025 08:45:44 +0000 (09:45 +0100)]
Drop sneaky apropos reference

5 weeks agoUse ert-deftest instead of ert--test consistently
Eshel Yaron [Thu, 16 Jan 2025 08:45:22 +0000 (09:45 +0100)]
Use ert-deftest instead of ert--test consistently

5 weeks ago(refactor-display-edits-as-diff): Handle buffers instead of files
Eshel Yaron [Wed, 15 Jan 2025 14:41:49 +0000 (15:41 +0100)]
(refactor-display-edits-as-diff): Handle buffers instead of files

5 weeks ago; Update lisp/ldef-boot.el
Eshel Yaron [Wed, 15 Jan 2025 12:47:27 +0000 (13:47 +0100)]
; Update lisp/ldef-boot.el

5 weeks agoNew 'extract' refactor operation
Eshel Yaron [Wed, 15 Jan 2025 12:44:47 +0000 (13:44 +0100)]
New 'extract' refactor operation

Generalizes 'elisp-extract'

5 weeks agoConsolidate symbols ERT uses with find-function
Eshel Yaron [Wed, 15 Jan 2025 08:47:03 +0000 (09:47 +0100)]
Consolidate symbols ERT uses with find-function

5 weeks agoNew command 'elisp-extract'
Eshel Yaron [Tue, 14 Jan 2025 23:06:13 +0000 (00:06 +0100)]
New command 'elisp-extract'

5 weeks agoFlymake: more ambitious cleanup in flymake-mode (bug#69809)
João Távora [Thu, 18 Jul 2024 00:09:10 +0000 (01:09 +0100)]
Flymake: more ambitious cleanup in flymake-mode (bug#69809)

Further improve flymake-mode idempotency by not nuke existing overlays.
This means multiple flymake-mode invocations do the same as just one
one, with minimal or no additional side effects.  This is good for
people with lots of 'flymake-mode' in hooks.

The foreign diagnostic importation has been refactored into a separate
function and moved to the "really start" section of 'flymake-start'.
The duplication problem appears to be avoided by some heuristics in
flymake-highlight-line.

A new test has been added.

* lisp/progmodes/flymake.el (flymake--import-foreign-diagnostics): New helper
  (flymake-start): Use it.
  (flymake-mode): Don't nuke overlays here.

* test/lisp/progmodes/flymake-tests.el (foreign-diagnostics): New
  test.

(cherry picked from commit 0ff82eb48725e15bb87a75d4f937b75c2482c59b)

5 weeks agoFlymake: improve idempotence of flymake-mode (bug#69809)
João Távora [Tue, 14 Jan 2025 17:44:38 +0000 (17:44 +0000)]
Flymake: improve idempotence of flymake-mode (bug#69809)

In some circumstances, such as the ones described in the referenced bug
report, flymake-mode is activated non-interactively and asynchronously
in buffers where it may already be active and in the midst of
operations.

This commit ensures that flymake-mode a bit safer to re-enable in such
circumstances and fixes the bug.  It also adds some comments documenting
the situation.

* lisp/progmodes/flymake.el (flymake-mode): Don't smash flymake--state.
Add some comments.  No need to check for flymake--state nil.
(flymake--project-diagnostics): No need to check for flymake--state nil.

(cherry picked from commit 3a1b36a39dcd5a860a91a403f96721109203934a)

5 weeks ago(info-lookup-symbol): Add 'minibuffer-action'.
Eshel Yaron [Tue, 14 Jan 2025 16:51:22 +0000 (17:51 +0100)]
(info-lookup-symbol): Add 'minibuffer-action'.

5 weeks ago; Fix wording and coding style of a recent commit
Eli Zaretskii [Tue, 14 Jan 2025 12:49:27 +0000 (14:49 +0200)]
; Fix wording and coding style of a recent commit

* src/treesit.c (treesit_traverse_match_predicate): Fix style.

* doc/lispref/parsing.texi (User-defined Things): Fix wording.

(cherry picked from commit e633bbfec0fe0fa436026d759132faa47b6b0dc4)

5 weeks agoHandle removal of selected tty child frame
Martin Rudalics [Tue, 14 Jan 2025 08:51:17 +0000 (09:51 +0100)]
Handle removal of selected tty child frame

* src/dispextern.h (root_frame):
* src/frame.h (root_frame): Move declaration from dispextern.h
to frame.h.
(SET_FRAME_VISIBLE): Whend making the selected tty child frame
invisible, use mru_rooted_frame to find a frame to switch to.
* src/dispnew.c (root_frame): Move root_frame to frame.c.
* src/frame.c (do_switch_frame): On ttys don't change the
top frame when switching from a child frame to another frame
with the same root.
(root_frame): Move here from dispnew.c.
(Fframe_root_frame): New Lisp function.
(delete_frame): Whend deleting the selected tty child frame use,
mru_rooted_frame to find a frame to switch to.
* src/window.c (mru_rooted_frame): New function.
* src/window.h (mru_rooted_frame): Declare it.
* doc/lispref/frames.texi (Child Frames): Describe new function
'frame-root-frame'.

(cherry picked from commit d4aeb6bd230c42cf7b773ec9aebd80ad6d928d98)

5 weeks agoMinor cleanup
Eshel Yaron [Tue, 14 Jan 2025 13:28:40 +0000 (14:28 +0100)]
Minor cleanup