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

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

5 weeks agoUse 'eager-display' completion metadata in a couple more places
Eshel Yaron [Tue, 14 Jan 2025 13:15:58 +0000 (14:15 +0100)]
Use 'eager-display' completion metadata in a couple more places

5 weeks agocompletion-eager-display: Use buffer content instead of INITIAL-INPUT
Daniel Mendler [Sun, 15 Dec 2024 09:57:59 +0000 (10:57 +0100)]
completion-eager-display: Use buffer content instead of INITIAL-INPUT

* lisp/minibuffer.el (completing-read-default): Use the
minibuffer content instead of handling INITIAL-INPUT directly.

(cherry picked from commit 465544eb556777f16415c10e7607f7b72ec5a2b5)

5 weeks agoNew customization variable `completion-eager-display'
Daniel Mendler [Sun, 8 Dec 2024 19:05:07 +0000 (20:05 +0100)]
New customization variable `completion-eager-display'

The customization option can be set to t or nil, to respectively
always or never show the *Completions* buffer eagerly at the
beginning of a completion session.  Furthermore the option can
be set to the value auto.  In this case the *Completions* buffer
will only be shown if requested by the completion table.
Completion tables can use the `eager-display' completion
metadata to do so.  (Bug#74616, Bug#74617)

* lisp/minibuffer.el (completion-eager-display): New
customization variable.
(completion-metadata): Update docstring, document the
new `eager-display' completion metadata.
(completion-extra-properties): Update docstring, document the
new `:eager-display' completion metadata.
(completion-category-overrides): Add `eager-display' to the
custom type specification.
(completing-read-default): Handle the `completion-eager-display'
customization variable and the `eager-display' completion
metadata.
(completion-table-with-metadata): New function to create
a completion table with metadata.
(minibuffer-complete-defaults, minibuffer-complete-history):
Use it.
* lisp/ffap.el (ffap-menu-ask): Add `ffap-menu' completion
category and `eager-display' completion metadata.  Use
`completion-table-with-metadata'.
* lisp/imenu.el (imenu-eager-completion-buffer): Correct
docstring, which had been inverted.
(imenu--completion-buffer): Add `eager-display' completion
metadata.  Use `completion-table-with-metadata'.
* lisp/tmm.el (tmm-prompt): Add `tmm' completion category and
`eager-display' completion metadata.  Use
`completion-table-with-metadata'.  Add keymap setup.
(tmm-add-prompt): Remove keymap setup.
(tmm-goto-completions): Call `tmm-add-prompt' to ensure that a
*Completions* buffer is shown.
(tmm--completion-table): Remove unused internal function.
* etc/NEWS: Announce the change.

(cherry picked from commit fd021c07606264a73cd4c1f6fa6fe80a756defe0)

5 weeks ago; (completion-preview--bg-color): Fix bug#75544.
Eshel Yaron [Tue, 14 Jan 2025 06:37:18 +0000 (07:37 +0100)]
; (completion-preview--bg-color): Fix bug#75544.

* lisp/completion-preview.el (completion-preview--bg-color):
Fix loop check.

(cherry picked from commit 0226d3579461c57513cb0a600eda1f6fb17f8d22)

5 weeks agosrc/comp.c: New macro CALLNI
Stefan Kangas [Mon, 13 Jan 2025 23:35:51 +0000 (00:35 +0100)]
src/comp.c: New macro CALLNI

* src/comp.c (CALL0I, CALL1I, CALL2I, CALL4I): Delete macros.
(CALLNI): New macro, replacing the above.  All callers updated.

(cherry picked from commit e6ad99e36c6c2e5322381f8af48cc283d2d899dc)

5 weeks agoPrefer calln to CALLN where applicable
Stefan Kangas [Mon, 13 Jan 2025 23:16:40 +0000 (00:16 +0100)]
Prefer calln to CALLN where applicable

* src/callint.c (read_file_name):
* src/comp.c (CALL0I, CALL1I, CALL2I, CALL4I, declare_imported_func):
* src/data.c (Ffset, notify_variable_watchers):
* src/eval.c (Ffuncall_with_delayed_message):
* src/keymap.c (Fdescribe_buffer_bindings):
* src/minibuf.c (Fread_buffer, Fcompleting_read):
* src/pdumper.c (Fdump_emacs_portable):
* src/print.c (print_vectorlike_unreadable):
* src/treesit.c (treesit_traverse_match_predicate)
(treesit_build_sparse_tree): Prefer calln to CALLN.

(cherry picked from commit 383de5c3f6f1ca7c8da7450d6e1716b43e9d2020)

5 weeks agoMore sensible implementation of just-skipped commit
Eshel Yaron [Mon, 13 Jan 2025 13:27:15 +0000 (14:27 +0100)]
More sensible implementation of just-skipped commit

5 weeks ago; Skip commit e6591b549f35af1be31f5bf3547e1170b7604a99
Eshel Yaron [Mon, 13 Jan 2025 12:12:49 +0000 (13:12 +0100)]
; Skip commit e6591b549f35af1be31f5bf3547e1170b7604a99

5 weeks agoAdd 'and', 'named', and 'anonymous' predicate for tree-sitter
Yuan Fu [Mon, 13 Jan 2025 07:41:47 +0000 (23:41 -0800)]
Add 'and', 'named', and 'anonymous' predicate for tree-sitter

* doc/lispref/parsing.texi (User-defined Things): Mention the
new predicate.
* src/treesit.c (treesit_traverse_validate_predicate): Recognize
named, anonymous, and and predicates.
(treesit_traverse_match_predicate): Handle named, anonymous, and
and predicates.

(cherry picked from commit f0e63558bd3dfd9e57cacfba8690f9dd29774947)

5 weeks ago; Move c-ts-mode keyword variables forward
Yuan Fu [Mon, 13 Jan 2025 07:38:24 +0000 (23:38 -0800)]
; Move c-ts-mode keyword variables forward

* lisp/progmodes/c-ts-mode.el (c-ts-mode--type-keywords):
(c-ts-mode--operators):
(c-ts-mode--c++-operators):
(c-ts-mode--c++-operator-keywords): Move before
c-ts-mode--keywords to avoid undefined variable error.

(cherry picked from commit 4687fff4f0a473fd887bf0800976c356eecd7eb2)

5 weeks agoAdd special indent rule for FOR_EACH_TAIL in c-ts-mode
Yuan Fu [Mon, 13 Jan 2025 07:03:41 +0000 (23:03 -0800)]
Add special indent rule for FOR_EACH_TAIL in c-ts-mode

* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--emacs-macro-rules): New function
(c-ts-mode--simple-indent-rules): Add new rule.

(cherry picked from commit 8cfa3447b71a3586378e90e5690da6c1faaa77b6)

5 weeks agoFix c-ts-mode indentation (bug#75442)
Yuan Fu [Mon, 13 Jan 2025 06:23:36 +0000 (22:23 -0800)]
Fix c-ts-mode indentation (bug#75442)

* lisp/progmodes/c-ts-mode.el (c-ts-mode--simple-indent-rules):
Use standalone-parent instead of parent.
* test/lisp/progmodes/c-ts-mode-resources/indent.erts:
New test.

(cherry picked from commit 04032cd00af7617c709140f3c80b5604b05c11e8)

5 weeks agoAdd newly supported keywords to c-ts-mode (bug#75226)
Yuan Fu [Sun, 12 Jan 2025 08:35:20 +0000 (00:35 -0800)]
Add newly supported keywords to c-ts-mode (bug#75226)

For the new keywords, test if the grammar supports them before
useing it.

* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--optional-c-keywords): New variable.
(c-ts-mode--ms-keywords): New variable.
(c-ts-mode--compute-optional-keywords): New function.
(c-ts-mode--keywords): Add new optional keywords.
(c-ts-mode--c++-operators): New variable.
(c-ts-mode--c++-operator-keywords): New variable.
(c-ts-mode--font-lock-settings): Use c-ts-mode--c++-operators.

(cherry picked from commit 7d3bc1ff2f44215ad24fdd8b243e7cee8ff66fa0)

5 weeks agoLisp Reference Manual: Index standard symbol properties.
Stephen Gildea [Mon, 13 Jan 2025 04:13:08 +0000 (20:13 -0800)]
Lisp Reference Manual: Index standard symbol properties.

* doc/lispref/symbols.texi (Standard Properties):
* doc/lispref/commands.texi:
* doc/lispref/customize.texi (Variable Definitions):
* doc/lispref/help.texi:
* doc/lispref/keymaps.texi:
* doc/lispref/minibuf.texi (Minibuffer History):
* doc/lispref/modes.texi (Setting Hooks):
* doc/lispref/sequences.texi (Char-Tables):
* doc/lispref/text.texi (Undo):
* doc/lispref/variables.texi: Each standard symbol property has exactly
one index entry, uniformly formatted as "(symbol property)".

(cherry picked from commit c98d9e8bf58c75e3ed6c7d2f9c5e63fc17bf9cf7)

5 weeks agofix for bibtex.el in prior commit
Roland Winkler [Mon, 13 Jan 2025 00:43:16 +0000 (18:43 -0600)]
fix for bibtex.el in prior commit

* lisp/textmodes/bibtex.el (bibtex-string-file-path)
(bibtex-file-path): Check for undefined environment variable
BIBINPUTS.

(cherry picked from commit 615f06ea534cd565f439b08d563a31ca2b0eea92)

5 weeks agoUse eabs in Fcurrent_time_zone
Stefan Kangas [Sun, 12 Jan 2025 21:41:30 +0000 (22:41 +0100)]
Use eabs in Fcurrent_time_zone

* src/timefns.c (Fcurrent_time_zone): Use eabs.
* test/src/timefns-tests.el
(timefns-tests-current-time-zone): New test.

(cherry picked from commit ccd927d741df928d4de578dffac74bc67d24c8b0)

5 weeks agoDelete obsolete coccinelle files
Stefan Kangas [Sun, 12 Jan 2025 21:08:51 +0000 (22:08 +0100)]
Delete obsolete coccinelle files

These files relates to a 13 year old attempt at a generational GC that
was never merged.

* admin/coccinelle/frame.cocci:
* admin/coccinelle/window.cocci: Delete files.

(cherry picked from commit 85c73bb901e2adbad78e19c9a4f4d1ef74ac3d6d)

5 weeks agobibtex-string-file-path and bibtex-file-path are lists of directories
Roland Winkler [Sun, 12 Jan 2025 21:17:28 +0000 (15:17 -0600)]
bibtex-string-file-path and bibtex-file-path are lists of directories

* lisp/textmodes/bibtex.el (bibtex-string-file-path, bibtex-file-path):
These user options are now lists of directories.  For backward compatibility,
the old, obsolete format is still supported.
(bibtex-string-files-init, bibtex-initialize): Change accordingly.
Use file-name-extension and file-name-with-extension.
* etc/NEWS: Entry for new format of bibtex-string-file-path and
bibtex-file-path.

(cherry picked from commit 14b5ba7c61fd8fb1e2c8fe956ee925b4a59c10c8)

5 weeks agoEmphasize the use of :tag for new customization types
Mauro Aranda [Sun, 12 Jan 2025 18:19:40 +0000 (15:19 -0300)]
Emphasize the use of :tag for new customization types

* doc/lispref/customize.texi (Type Keywords): Name important use
cases of the :tag keyword.
(Defining New Types): Emphasize the use of the :tag keyword when
using the lazy widget.  (Bug#74409)

(cherry picked from commit 99b85e116f09e68e0d5750c9772d0a2489680078)

5 weeks agoAdd treesit-thing-settings to yaml-ts-mode and enable transpose-sexps
Juri Linkov [Sun, 12 Jan 2025 18:17:16 +0000 (20:17 +0200)]
Add treesit-thing-settings to yaml-ts-mode and enable transpose-sexps

* lisp/treesit.el (treesit-major-mode-setup): Move setting of
'transpose-sexps-function' outside of 'treesit-thing-defined-p'
since 'treesit-transpose-sexps' doesn't depend on the 'sexp' thing.

* lisp/textmodes/yaml-ts-mode.el (yaml-ts-mode):
Add 'treesit-thing-settings' with the 'list' thing,
but use it only for list commands, not sexp commands (bug#73404).

(cherry picked from commit 2d2bc6f1bc678b21c46af26cf343e24acdb48b79)

5 weeks agoAdd new option 'rotate-windows-change-selected'
Pranshu Sharma [Sun, 12 Jan 2025 17:45:30 +0000 (18:45 +0100)]
Add new option 'rotate-windows-change-selected'

* lisp/window-x.el: Fix header information.
(rotate-windows-change-selected): New option.
(rotate-window-layout-counterclockwise)
(rotate-window-layout-clockwise): Fix doc-strings.
(rotate-windows): Handle 'rotate-windows-change-selected'.

(cherry picked from commit 7648faedd3aeabadc66c67630809ef6178f4851a)

5 weeks ago; Add some niceties to .lldbinit
Gerd Möllmann [Sun, 12 Jan 2025 07:44:18 +0000 (08:44 +0100)]
; Add some niceties to .lldbinit

* src/.lldbinit: Handle some signals for tty Emacs.
New commands xreload and xattach. Common breakpoints.

(cherry picked from commit d00de6f166af77e686d0dd7a0d22fcf8f0e09f37)

5 weeks ago* lisp/treesit.el: Fix 'treesit--explorer-tree-mode-map'.
Juri Linkov [Sun, 12 Jan 2025 07:39:36 +0000 (09:39 +0200)]
* lisp/treesit.el: Fix 'treesit--explorer-tree-mode-map'.

(treesit--explorer-tree-mode-map): Move this map
before its mode 'treesit--explorer-tree-mode',
otherwise the map has no effect.

(cherry picked from commit 54e4b305032d4dadbee286179fa78e01d4d15182)

5 weeks ago; * src/keymap.c: Fix last change (bug#75219).
Eli Zaretskii [Sun, 12 Jan 2025 06:24:39 +0000 (08:24 +0200)]
; * src/keymap.c: Fix last change (bug#75219).

(cherry picked from commit 412c1a4f0e1df8c82bd94f02e21c1ef62b3d53d5)

5 weeks agoFix mouse-2 clicks on mode line and header line
Eli Zaretskii [Sun, 12 Jan 2025 06:22:24 +0000 (08:22 +0200)]
Fix mouse-2 clicks on mode line and header line

* src/keymap.c (Fcurrent_active_maps): For clicks on mode-line and
header-line, always override the keymaps at buffer position.
(Bug#75219)

(cherry picked from commit c41ea047a434710c4b7bc8280695c83fbe5fff35)

5 weeks agoAlign term-mode control character handling
Daniel Colascione [Sat, 11 Jan 2025 20:48:19 +0000 (12:48 -0800)]
Align term-mode control character handling

Terminal emulators generally ignore exotic ASCII control
characters like SOH and STX. Make term-mode do the same.

* lisp/term.el (term-emulate-terminal): ignore ASCII control
characters like other terminal emulators do

(cherry picked from commit 6cea3233a12f3964c46bffb0b6215e9c8cd92962)

5 weeks agoMake Eshell's "ls" command return a non-zero status on errors
Jim Porter [Sat, 11 Jan 2025 19:50:19 +0000 (11:50 -0800)]
Make Eshell's "ls" command return a non-zero status on errors

* lisp/eshell/em-ls.el (eshell/ls): Set exit code when calling 'error-func'.

(cherry picked from commit aff9261ab2ab3cf3435cf006e600a575bc2e3d6b)

5 weeks ago; * src/term.c (term_mouse_position): Fix 'fp' pointer.
Juri Linkov [Sat, 11 Jan 2025 18:40:11 +0000 (20:40 +0200)]
; * src/term.c (term_mouse_position): Fix 'fp' pointer.

(cherry picked from commit 3d375ced1f22fcd3b370d715ffdd055684bce5ac)

5 weeks agoImprove treesit list navigation support for #if/#endif (bug#73404)
Juri Linkov [Sat, 11 Jan 2025 18:28:43 +0000 (20:28 +0200)]
Improve treesit list navigation support for #if/#endif (bug#73404)

* lisp/treesit.el (treesit--forward-list-with-default): Improve to
better support the case when point is inside an opening/closing node
with a name longer than 1 character such as "#if" and "#endif".
(treesit-navigate-thing): No need to check for thing 'list'
since list commands now use other functions.

* lisp/progmodes/c-ts-mode.el (c-ts-mode--thing-settings): Add
more preproc nodes such as #if/#endif and #ifdef/#endif and their
variants to the 'list' thing.

(cherry picked from commit db4bf410f2bae6c77f2a0e660dcc680d73a18cd1)

5 weeks ago* lisp/progmodes/typescript-ts-mode.el: Fix syntax of tsx tags.
Juri Linkov [Sat, 11 Jan 2025 17:39:56 +0000 (19:39 +0200)]
* lisp/progmodes/typescript-ts-mode.el: Fix syntax of tsx tags.

(tsx-ts--s-p-query): Bind 'jsx_opening_element' and
'jsx_closing_element' to @jsx to be able to use the < and > syntax
for angle brackets in 'tsx-ts--syntax-propertize-captures' (bug#73978).

(cherry picked from commit fafcc8458e805e5c7d7785aa7e943bacfadcf79d)

5 weeks agoFix handling of 'minibuffer' frame parameter for tty frames
Martin Rudalics [Sat, 11 Jan 2025 17:07:21 +0000 (18:07 +0100)]
Fix handling of 'minibuffer' frame parameter for tty frames

* src/frame.c (make_terminal_frame): Fix handling of
'minibuffer' frame parameter for tty child frames.  Support
'minibuffer-only' child frames.

(cherry picked from commit b7dc4ba213e3c1aac5637546e48088206b6e91eb)

5 weeks ago; * lisp/window-x.el (window--transpose-1): Simplify.
Eshel Yaron [Sat, 11 Jan 2025 18:10:08 +0000 (19:10 +0100)]
; * lisp/window-x.el (window--transpose-1): Simplify.

5 weeks ago; * lisp/progmodes/scheme.el: Fix typo.
Eshel Yaron [Sat, 11 Jan 2025 17:55:08 +0000 (18:55 +0100)]
; * lisp/progmodes/scheme.el: Fix typo.

5 weeks agoFix cherry-picking
Eshel Yaron [Sat, 11 Jan 2025 17:10:40 +0000 (18:10 +0100)]
Fix cherry-picking