]> git.eshelyaron.com Git - emacs.git/log
emacs.git
7 days agoFix styling issues on Android 15 QPR1
Po Lu [Mon, 3 Mar 2025 13:57:05 +0000 (21:57 +0800)]
Fix styling issues on Android 15 QPR1

* java/org/gnu/emacs/EmacsView.java (EmacsView): Guarantee that
frame views are created with the correct theme.

* java/res/values-v20/style.xml (EmacsStyle):

* java/res/values-v29/style.xml (EmacsStyle): Disable a swiping
gesture enabled on certain Android systems.

* java/res/values-v35/style.xml: Rename from `styles'.xml.

(cherry picked from commit 96d26b493618f59bbdd4de86be65e784735541c8)

7 days ago; Skip commit f372508f68c9797f8d17cce0293526f3f30cb4c4
Eshel Yaron [Tue, 4 Mar 2025 21:03:46 +0000 (22:03 +0100)]
; Skip commit f372508f68c9797f8d17cce0293526f3f30cb4c4

7 days ago* lisp/wid-edit.el (widget-get): Make faster.
Mattias Engdegård [Sun, 2 Mar 2025 14:21:21 +0000 (15:21 +0100)]
* lisp/wid-edit.el (widget-get): Make faster.

(cherry picked from commit 7b504f898d36b24d3ec4a55b9814edb27f379f6b)

7 days agoStrengthen widget-get/put tests
Mattias Engdegård [Sun, 2 Mar 2025 14:20:11 +0000 (15:20 +0100)]
Strengthen widget-get/put tests

* test/lisp/wid-edit-tests.el
(widget-test-editable-field-widget-get/put): Test on inherited properties.

(cherry picked from commit 932397ce52ec0fa112afcd8d52324b8cdfbb66af)

7 days ago; * test/infra/android/test-controller.el: minor regexp snags
Mattias Engdegård [Sat, 1 Mar 2025 13:29:58 +0000 (14:29 +0100)]
; * test/infra/android/test-controller.el: minor regexp snags

(cherry picked from commit 773108fc0456c6c164aa60881929fdd59232c946)

7 days ago; Fix my previous commit
Yuan Fu [Mon, 3 Mar 2025 04:34:01 +0000 (20:34 -0800)]
; Fix my previous commit

* lisp/treesit.el (treesit--update-range-1): Actually guard
against calling treesit-query-language on a function.

(cherry picked from commit f1950fbdb49abfcea26b995b38223c1e89b3c720)

7 days agoDon't process function range settings in treesit--update-range-1
Yuan Fu [Mon, 3 Mar 2025 04:26:28 +0000 (20:26 -0800)]
Don't process function range settings in treesit--update-range-1

This fixes a bug where we call treesit-query-language on a
function, which happens before the QUERY in a range setting can
be either a function or a query, but we call it with
treesit-query-language before knowing whether it's a query or
function.

* lisp/treesit.el:
(treesit--update-range-1): Skip function range settings.
(treesit-update-ranges): Handle function range settings here.

(cherry picked from commit a211a940a1e085d53172ceddf6bfc2391985e861)

7 days agoPacify GCC in pgtkselect malloc alignment
Paul Eggert [Sun, 2 Mar 2025 23:57:14 +0000 (15:57 -0800)]
Pacify GCC in pgtkselect malloc alignment

This is a better fix for Bug#76414.
* src/pgtkselect.c (pgtk_nalloc): New function.
(pgtk_get_window_property, lisp_data_to_selection_data): Use it.

(cherry picked from commit 76342efe9d758a6ca66cdc0ed197381664a6fbbd)

7 days agoEglot: fix invocation of neocmakelsp
João Távora [Sun, 2 Mar 2025 22:07:51 +0000 (22:07 +0000)]
Eglot: fix invocation of neocmakelsp

* lisp/progmodes/eglot.el (eglot-server-programs): Fix invocation
of neocmakelsp

(cherry picked from commit 07bbfea901a71a89d54129ee690e71e9a79b7720)

7 days agoEglot: implement additionalPropertiesSupport for showMessage
Felician Nemeth [Sun, 2 Mar 2025 22:06:38 +0000 (22:06 +0000)]
Eglot: implement additionalPropertiesSupport for showMessage

This feature was introduced in LSP v3.16.

https://microsoft.github.io/language-server-protocol/specifications/lsp/3.18/specification/#window_showMessageRequest

* lisp/progmodes/eglot.el (eglot-client-capabilities): Set
window/showMessage/messageActionItem/additionalPropertiesSupport to t.
(eglot-handle-request window/showMessageRequest): Return the whole
selected MessageActionItem, not just its title.

Co-authored-by: João Távora <joaotavora@gmail.com>
(cherry picked from commit 18c81b76bc4c0fcd3effac3114763bae887a9d67)

7 days agoAdd auto-margin enable/disable to term
Daniel Colascione [Sun, 2 Mar 2025 20:53:17 +0000 (15:53 -0500)]
Add auto-margin enable/disable to term

* test/lisp/term-tests.el (term-line-wrap-no-auto-margins): add test

* lisp/term.el (term-auto-margins): new variable
(term-mode): documentation
(term-termcap-format): mention auto-margins flag
(term-emulate-terminal): support it
(term-reset-terminal): reset it
(term-handle-ansi-escape): notice it

* etc/e/eterm-color.ti: add auto margin capability

* etc/e/README: fix build documentation

* etc/NEWS: mention auto-margins

(cherry picked from commit 13b1436d975b270cb1001cf475fa65cc854ec462)

7 days ago; Fix thinko
Stefan Kangas [Sun, 2 Mar 2025 18:45:53 +0000 (19:45 +0100)]
; Fix thinko

(cherry picked from commit 83e2e5e24b72f7a271c04a0ce9cad1399fb2a0f9)

7 days ago; Add missing lexical-binding cookies
Stefan Kangas [Sun, 2 Mar 2025 18:00:36 +0000 (19:00 +0100)]
; Add missing lexical-binding cookies

(cherry picked from commit 56202138a3f63875b962ecec70afd46b19c23e00)

7 days ago; Fix my last commit
Stefan Kangas [Sun, 2 Mar 2025 18:21:57 +0000 (19:21 +0100)]
; Fix my last commit

(cherry picked from commit b5fe1702405daab4a5332d3584e1bbde5f4e2768)

7 days agoAdapt recent css-ts-mode changes to mhtml-ts-mode
Juri Linkov [Sun, 2 Mar 2025 18:44:40 +0000 (20:44 +0200)]
Adapt recent css-ts-mode changes to mhtml-ts-mode

* lisp/textmodes/css-mode.el (css--treesit-thing-settings):
(css-ts-mode--outline-predicate): New variables.
(css-ts-mode): Set treesit-outline-predicate.

* lisp/textmodes/mhtml-ts-mode.el (mhtml-ts-mode--treesit-thing-settings):
Use css--treesit-thing-settings and css--treesit-defun-type-regexp.
(mhtml-ts-mode): Use 'css-ts-mode--outline-predicate' for
'treesit-aggregated-outline-predicate'.

(cherry picked from commit 888a2b5394f4574edd5fe6e76bef91aab8111ebd)

7 days agoImprove treesit settings for css-ts-mode (bug#73404)
Juri Linkov [Sun, 2 Mar 2025 18:07:21 +0000 (20:07 +0200)]
Improve treesit settings for css-ts-mode (bug#73404)

* lisp/textmodes/css-mode.el (css--treesit-settings): Add
"@supports" and '(at_keyword)' to 'keyword', 'keyframe_block' to
'selector', 'keyframes_name' to 'query'.
(css--treesit-defun-name): Support "keyframe_block",
"keyframes_statement" and "supports_statement" as well.
(css--treesit-simple-imenu-settings): Add "keyframes_statement",
"keyframe_block", "supports_statement".
(css--treesit-defun-type-regexp): Add "keyframe_block".
(css-ts-mode): Add 'treesit-thing-settings'.

(cherry picked from commit a5e82110b087f05d50a9d628e70009ce33c33bc2)

7 days ago; Move python.el Maintainer header further up
Stefan Kangas [Sun, 2 Mar 2025 17:53:27 +0000 (18:53 +0100)]
; Move python.el Maintainer header further up

This is more consistent with our common practices.

(cherry picked from commit 1b77e94bcc2bcab4e160cc736db74211e2b6421c)

7 days agoBump python.el package version to 0.29
Stefan Kangas [Sun, 2 Mar 2025 17:50:04 +0000 (18:50 +0100)]
Bump python.el package version to 0.29

* lisp/progmodes/python.el: Bump package version to 0.29.

(cherry picked from commit 538ab57dc5b8371b3a6d3ccb635deb8b35133fc4)

7 days agoBump python.el requirement to Emacs 29.1
Stefan Kangas [Sun, 2 Mar 2025 17:49:37 +0000 (18:49 +0100)]
Bump python.el requirement to Emacs 29.1

* lisp/progmodes/python.el: Require Emacs 26.3, flymake 1.0 and
project 0.1.  (Bug#75526)

(cherry picked from commit 0cff855690109ab57216aeda6c0daa2ec566294e)

7 days agoDon't warn when calling hl-lock-mode from init file
Stefan Kangas [Sun, 2 Mar 2025 17:04:32 +0000 (18:04 +0100)]
Don't warn when calling hl-lock-mode from init file

This was a compatibility kluge introduced in Emacs 22.1, twenty years
ago.  It's fair to assume that any former Emacs 21 user have seen this
warning already, and will have updated their init file.  So remove it.

* lisp/hi-lock.el (hi-lock-mode): Don't warn when calling plain
hi-lock-mode from init file.
(hi-lock-archaic-interface-message-used)
(hi-lock-archaic-interface-deduce): Remove associated variables.

(cherry picked from commit fad9b7dce73d81d669cb22f880b65c867ac36b54)

7 days agoNew commands to convert ASCII to fullwidth characters and back
Eli Zaretskii [Sun, 2 Mar 2025 13:25:53 +0000 (15:25 +0200)]
New commands to convert ASCII to fullwidth characters and back

* lisp/textmodes/text-mode.el (text-mode--fullwidth-table): New
variable.
(text-mode--get-fullwidth-table): New internal function.
(fullwidth-region, halfwidth-region, fullwidth-word)
(halfwidth-word): New commands.  (Bug#71822)

* etc/NEWS: Announce new commands.

(cherry picked from commit 8937dee9e418c64587769dd22bb9683cd3690688)

7 days ago; Skip commit e34d7a7c4eb90cde7a2dc55ac5a02fae303e5d0f
Eshel Yaron [Tue, 4 Mar 2025 21:02:00 +0000 (22:02 +0100)]
; Skip commit e34d7a7c4eb90cde7a2dc55ac5a02fae303e5d0f

7 days agoSpecifically report attempts to exit Emacs during test execution
Po Lu [Sun, 2 Mar 2025 12:54:36 +0000 (20:54 +0800)]
Specifically report attempts to exit Emacs during test execution

* test/infra/android/test-driver.el (ats-in-eval): Fix typo in
doc string.
(ats-eval-as-printed, ats-eval-serial, ats-eval-do-decode):
Render buffer-local.
(ats-executing-form): New variable.
(ats-process-filter): Bind the same around `eval'.
(ats-kill-emacs-function): New function; register it to execute
when Emacs exits.

(cherry picked from commit 749e33bb481eedbefe0fd24124b446f9c47728d5)

7 days agoFix a vc test for Breezy by setting $HOME
Stefan Kangas [Sun, 2 Mar 2025 12:26:43 +0000 (13:26 +0100)]
Fix a vc test for Breezy by setting $HOME

* test/lisp/vc/vc-tests.el (vc--fix-home-for-bzr): New macro.
(vc-test--create-repo, vc-test--register, vc-test--working-revision)
(vc-test--checkout-model, vc-test--rename-file)
(vc-test--version-diff): Fix test for Breezy by setting HOME to a
temporary directory.  (Bug#70195)

(cherry picked from commit e4d8095c3dccc4f37be54b083d8b511fac0142b3)

7 days agoDon't byte compile early-init.el
Po Lu [Sun, 2 Mar 2025 11:23:44 +0000 (19:23 +0800)]
Don't byte compile early-init.el

* test/infra/android/early-init.el (frame-initialize): Remove
redundant debugging printouts.

(cherry picked from commit c73003ade161a50728aa15cc10967ad04fe90b05)

7 days ago; * test/infra/android/test-driver.el: Don't byte-compile.
Po Lu [Sun, 2 Mar 2025 11:13:01 +0000 (19:13 +0800)]
; * test/infra/android/test-driver.el: Don't byte-compile.

(cherry picked from commit 8e007f79908abf95d5e0495cdf5d8f4a8d32be70)

7 days agoExclude files under `infra' from automatic testing
Po Lu [Sun, 2 Mar 2025 11:11:10 +0000 (19:11 +0800)]
Exclude files under `infra' from automatic testing

* test/Makefile.in (ELFILES): Exclude files within `infra'.
Reported by Stefan Kangas <skangas@gmail.com>.

(cherry picked from commit ecbb0808657e04c0e561e9d62c0ade39eb01351b)

7 days ago; Silence byte-compiler in Android tests
Stefan Kangas [Sun, 2 Mar 2025 07:37:07 +0000 (08:37 +0100)]
; Silence byte-compiler in Android tests

(cherry picked from commit c4232a08f135b347a24cb75bb901659d45c61787)

7 days ago; * lisp/treesit.el: Silence byte-compiler.
Po Lu [Sun, 2 Mar 2025 08:08:30 +0000 (16:08 +0800)]
; * lisp/treesit.el: Silence byte-compiler.

(cherry picked from commit 2ba2157a610346b56507a8ed7c771f6f57263ee6)

7 days agoRun Android tests in the initial frame
Po Lu [Sun, 2 Mar 2025 08:02:46 +0000 (16:02 +0800)]
Run Android tests in the initial frame

* test/infra/android/early-init.el: New file.

* test/infra/android/test-controller.el (ats-connect): Upload
`early-init.el' to the staging directory and configure that
directory as the Emacs instance's initialization directory.
(ats-run-test): Always append to the test buffer.  Execute tests
within terminal-frame.
(ats-run-all-tests): Gracefully respond to errors.
(ats-cmd-error): New function.
(ats-execute-tests-batch): Accept a number of command line
arguments.

(cherry picked from commit a8988ce80004af57f3741dc059c5a97cb83dca64)

7 days agoEnable kmacro-call-macro to function in some circumstances
Po Lu [Sun, 2 Mar 2025 08:00:33 +0000 (16:00 +0800)]
Enable kmacro-call-macro to function in some circumstances

* lisp/kmacro.el (kmacro-call-macro): Enable to function when
the selected frame's terminal is different from that most
recently consulted by the event loop.

(cherry picked from commit 7fcb01e76ba9b2c74019f3863975cfe32c8b0da0)

7 days ago; (completion-preview--try-table): Propagate extra properties.
Eshel Yaron [Sun, 2 Mar 2025 07:03:04 +0000 (08:03 +0100)]
; (completion-preview--try-table): Propagate extra properties.

* lisp/completion-preview.el
(completion-preview--try-table): Let-bind
'completion-extra-properties' to completion properties
that the completion backend (capf) provides, so that these
properties take effect when querying the completion table.
* test/lisp/completion-preview-tests.el
(completion-preview-propagates-properties): Add test.

(cherry picked from commit 365a91622e093fe0fb74b7fee3ff7cc4a0025611)

7 days ago; Skip commit 828e08a9961de7c3e5d149c0c53b6ff06b46d70f
Eshel Yaron [Tue, 4 Mar 2025 21:00:32 +0000 (22:00 +0100)]
; Skip commit 828e08a9961de7c3e5d149c0c53b6ff06b46d70f

7 days ago; Add Maintainer header to loaddefs-gen.el
Stefan Kangas [Sun, 2 Mar 2025 05:45:53 +0000 (06:45 +0100)]
; Add Maintainer header to loaddefs-gen.el

(cherry picked from commit 558e6792c0a920a691b6c70fd7eda6b5c6e85a80)

7 days ago; Skip commit b7fdddc86ba1733633fa29a4dec6f76667d29aa5
Eshel Yaron [Tue, 4 Mar 2025 21:00:13 +0000 (22:00 +0100)]
; Skip commit b7fdddc86ba1733633fa29a4dec6f76667d29aa5

7 days ago; Skip commit 6f8c4581eaf8c45029171aa390f291faaa58d15f
Eshel Yaron [Tue, 4 Mar 2025 21:00:08 +0000 (22:00 +0100)]
; Skip commit 6f8c4581eaf8c45029171aa390f291faaa58d15f

7 days ago; Skip commit 33222bd000043ad79cf7d472fadf7cda6d49e31d
Eshel Yaron [Tue, 4 Mar 2025 20:59:57 +0000 (21:59 +0100)]
; Skip commit 33222bd000043ad79cf7d472fadf7cda6d49e31d

7 days agoBump python.el requirement to Emacs 26.3
Stefan Kangas [Sun, 2 Mar 2025 04:37:55 +0000 (05:37 +0100)]
Bump python.el requirement to Emacs 26.3

* lisp/progmodes/python.el: Require Emacs 26.3, flymake 1.0 and
project 0.1.  (Bug#75526)

(cherry picked from commit eff5a3e43ba886074c3a2e007a2bced9bcb85f17)

7 days ago; Skip commit 7dcf9b71e6ffc0cc92d2d504b1428c3ab432a028
Eshel Yaron [Tue, 4 Mar 2025 20:59:01 +0000 (21:59 +0100)]
; Skip commit 7dcf9b71e6ffc0cc92d2d504b1428c3ab432a028

7 days ago; Document spurious warnings on macOS 15
Stefan Kangas [Sun, 2 Mar 2025 03:34:27 +0000 (04:34 +0100)]
; Document spurious warnings on macOS 15

* etc/PROBLEMS: Document spurious warnings on macOS 15.  (Bug#73382)

(cherry picked from commit a5fd518d52418638813bdb1015ab0c63ac53ebfa)

7 days agoPass buffer as object in gnus-highlight-selected-tree
Pranshu Sharma [Sun, 2 Mar 2025 04:02:13 +0000 (05:02 +0100)]
Pass buffer as object in gnus-highlight-selected-tree

* lisp/gnus/gnus-salt.el (gnus-highlight-selected-tree): Correctly
pass buffer object instead of string.  (Bug#75557)

(cherry picked from commit d6dd9dd066e8db665b5c48a4b8fde4db1753e6ad)

7 days agoFix the use of xref-window-local-history together with Xref buffer
Dmitry Gutov [Sun, 2 Mar 2025 03:22:56 +0000 (05:22 +0200)]
Fix the use of xref-window-local-history together with Xref buffer

* lisp/progmodes/xref.el (xref--push-markers): Temporarily
restore the selected window as well, using the value from the
new argument (bug#76565).  Update both callers.

(cherry picked from commit 625ed68aeaadce4df7bdfd8c08ddfc8ed4f9b01a)

7 days ago; Skip commit 735eace97b88c7e1a7864a0eb5caf2a6d263b60a
Eshel Yaron [Tue, 4 Mar 2025 20:58:26 +0000 (21:58 +0100)]
; Skip commit 735eace97b88c7e1a7864a0eb5caf2a6d263b60a

7 days ago; Skip commit 8091772767666f2c671a8ba481d50859388152db
Eshel Yaron [Tue, 4 Mar 2025 20:58:21 +0000 (21:58 +0100)]
; Skip commit 8091772767666f2c671a8ba481d50859388152db

7 days ago; Improve docstring of cl-check-type
Stefan Kangas [Sun, 2 Mar 2025 03:11:55 +0000 (04:11 +0100)]
; Improve docstring of cl-check-type

* lisp/emacs-lisp/cl-macs.el (cl-check-type): Improve docstring.

(cherry picked from commit 38cc36a375344d2518eb8f9d3e0e6943199da529)

7 days agoImprove use-package error message on wrong type
Stefan Kangas [Sun, 2 Mar 2025 02:59:22 +0000 (03:59 +0100)]
Improve use-package error message on wrong type

* lisp/use-package/use-package-core.el (use-package): Improve error
message when passed the wrong type.  (Bug#72160)

(cherry picked from commit 38782e684bf5f67e2d8f69daeeb17f37cf4b2c3f)

7 days agoSimplify and speed up widget-get implementation
David Ponce [Sun, 2 Mar 2025 01:41:24 +0000 (02:41 +0100)]
Simplify and speed up widget-get implementation

* lisp/wid-edit.el (widget-get): Simplify and speed up.
Ref: https://lists.gnu.org/r/emacs-devel/2025-03/msg00010.html

(cherry picked from commit be8a7c9c882540dd7267f9046166cb680f10fd9d)

7 days ago; Add test for last change
Stefan Kangas [Sun, 2 Mar 2025 01:16:11 +0000 (02:16 +0100)]
; Add test for last change

* test/lisp/wid-edit-tests.el
(widget-test-editable-field-widget-get/put): Check return value of
widget-put.  (Bug#76664)

(cherry picked from commit 49e3ef343784adaf967d1ff02a8499eb4d7d1ddd)

7 days agoCorrectly return passed value from widget-put
David Ponce [Sun, 2 Mar 2025 01:17:12 +0000 (02:17 +0100)]
Correctly return passed value from widget-put

* lisp/wid-edit.el (widget-get-indirect): Return passed value to stay
consistent with old C implementation.  (Bug#76664)

(cherry picked from commit 5b13541858707a5cbb857b257e00848430d87c47)

7 days ago; * etc/symbol-releases.eld: Add missing symbols.
Stefan Kangas [Sun, 2 Mar 2025 00:16:20 +0000 (01:16 +0100)]
; * etc/symbol-releases.eld: Add missing symbols.

(cherry picked from commit 10f11d730e3347f34d873c005ae8e4f830cf166f)

7 days agoImprove instructions for running with -fsanitize=address (bug#76393)
Pip Cet [Sat, 1 Mar 2025 21:39:23 +0000 (21:39 +0000)]
Improve instructions for running with -fsanitize=address (bug#76393)

* etc/DEBUG (ASAN_OPTIONS): Add 'detect_stack_use_after_return=0'
requirement.  Remove obsolete unexec commentary.

(cherry picked from commit 1e84a8767692f9f3a3bc37eba8eeb8f9d537322d)

7 days agoMake Emacs respond to NS activation clicks
Daniel Colascione [Sat, 1 Mar 2025 17:27:08 +0000 (12:27 -0500)]
Make Emacs respond to NS activation clicks

* src/nsterm.m (acceptsFirstMouse): Opt into receiving mouse events that
activate the window. (bug#76629)

(cherry picked from commit 354598874061ab9ecb9362d7ac4233494b51252b)

7 days agoProvide tool-tip display delays on TTY frames
Eli Zaretskii [Sat, 1 Mar 2025 15:16:08 +0000 (17:16 +0200)]
Provide tool-tip display delays on TTY frames

* lisp/tooltip.el (tooltip-show, tooltip-hide)
(tooltip-show-help): Support delayed tool-tip display on TTY
frames as well.  (Bug#76653)

* etc/NEWS: Announce the behavior change.

(cherry picked from commit 6a2f6056c5a079a7f3db240171680560a3bd9710)

7 days ago; Skip commit 503622a10151d2ec15e08d91b4f6aeec347fa855
Eshel Yaron [Tue, 4 Mar 2025 20:57:50 +0000 (21:57 +0100)]
; Skip commit 503622a10151d2ec15e08d91b4f6aeec347fa855

7 days ago; * lisp/progmodes/java-ts-mode.el (treesit-node-end): Declare.
Eli Zaretskii [Sat, 1 Mar 2025 14:42:50 +0000 (16:42 +0200)]
; * lisp/progmodes/java-ts-mode.el (treesit-node-end): Declare.

(cherry picked from commit 0460177451d86460c0a028f07458e78087181f82)

7 days agoFix 'M-q' in 'makefile-mode'
Eli Zaretskii [Sat, 1 Mar 2025 14:04:52 +0000 (16:04 +0200)]
Fix 'M-q' in 'makefile-mode'

* lisp/progmodes/make-mode.el (makefile-mode-map): Bind 'M-q' to
'fill-paragraph', as 'prog-mode's default binding is not
appropriate for Makefile's syntax.  (Bug#76641)

(cherry picked from commit 8481170eb296780b404caea587d17ab33a24aaeb)

7 days ago; Improve documentation of 'rmail-movemail-program'
Eli Zaretskii [Sat, 1 Mar 2025 13:45:57 +0000 (15:45 +0200)]
; Improve documentation of 'rmail-movemail-program'

* lisp/mail/rmail.el (rmail-movemail-program):
* doc/emacs/rmail.texi (Movemail): Document how to change the
value of 'rmail-movemail-program' safely.  (Bug#76595)

(cherry picked from commit 44a770b87137c93f0c4af4d203bb071659a603a0)

7 days agodoc-view: Fix error during revert in editing mode
Tassilo Horn [Sun, 23 Feb 2025 08:46:54 +0000 (09:46 +0100)]
doc-view: Fix error during revert in editing mode

When in editing mode in a doc-view buffer and then reverting (which can
happen automatically when editing OpenDocument contents), we errored in
the advide function doc-view--revert-buffer because the local
doc-view--buffer-file-name has been killed when switching to the editing
mode.

Also restore doc-view-minor-mode after reverting during being in the
editing mode.

* lisp/doc-view.el (doc-view--revert-buffer): Check that
'doc-view--buffer-file-name' is non-nil.
(doc-view-minor-mode): Add re-enabling function to
'revert-buffer-restore-functions'.

(cherry picked from commit 34362a2a1ccd229b486d87cbf4de2eed66e0010d)

7 days agoFix go-ts-mode const_spec highlighting (Bug#76330)
Randy Taylor [Sun, 16 Feb 2025 20:51:43 +0000 (15:51 -0500)]
Fix go-ts-mode const_spec highlighting (Bug#76330)

* lisp/progmodes/go-ts-mode.el (go-ts-mode--font-lock-settings):
Handle multiple const_spec identifiers.
* test/lisp/progmodes/go-ts-mode-resources/font-lock.go:
Add test case.

(cherry picked from commit b531bbf73ef91aca0a699ffc89e6b93dc49d0151)

7 days agoIgnore dedicated windows in 'display-buffer-reuse-mode-window'
Trevor Murphy [Wed, 12 Feb 2025 01:26:55 +0000 (17:26 -0800)]
Ignore dedicated windows in 'display-buffer-reuse-mode-window'

Ignore the dedicated windows unless the dedicated window is
already displaying the buffer-to-be-displayed.  In that case,
the window may be reused, according to the setting of
'inhibit-same-window'.
* lisp/window.el (display-buffer-reuse-mode-window): Check
'window-dedicated-p' before pushing the candidate window onto
the stack.  (Bug#76216)

(cherry picked from commit b6efedd66a08103e547266279419e646fc659339)

7 days ago; Document what happens when 'display' and 'invisible' props clash
Eli Zaretskii [Sat, 1 Mar 2025 10:59:32 +0000 (12:59 +0200)]
; Document what happens when 'display' and 'invisible' props clash

* doc/lispref/display.texi (Replacing Specs, Overlay Properties)
(Invisible Text): Document that 'invisible' is ignored when
'display' property covers the same text.  (Bug#76658)

(cherry picked from commit bd1d6761f4cd6548731dcb80e0ee8e1a53d929cc)

7 days agoSave IELM input history on "C-c C-c"
Eli Zaretskii [Sat, 1 Mar 2025 08:27:17 +0000 (10:27 +0200)]
Save IELM input history on "C-c C-c"

* lisp/ielm.el (ielm--write-history-on-interrupt): New function.
(inferior-emacs-lisp-mode): Install it as buffer-local value of
the 'interrupt-process-functions' hook.  (Bug#76585)

* etc/NEWS: Announce the behavior change.

(cherry picked from commit cabbb36ae1d089e34c501c54a682ea7121899565)

7 days ago; Skip commit 61320784ed2a8f5f3dcdeb401579d220e5dc05da
Eshel Yaron [Tue, 4 Mar 2025 20:56:53 +0000 (21:56 +0100)]
; Skip commit 61320784ed2a8f5f3dcdeb401579d220e5dc05da

7 days agokeymaps.texi: Move "Changing Key Bindings" section up
Stefan Kangas [Sat, 1 Mar 2025 05:34:00 +0000 (06:34 +0100)]
keymaps.texi: Move "Changing Key Bindings" section up

* doc/lispref/keymaps.texi (Changing Key Bindings): Move section
up.  (Bug#52821)

(cherry picked from commit 526eeedf88941daf2a77ac5a6c2ba8237ed4814d)

7 days agokeymaps.texi: Move "Key Sequences" section down
Stefan Kangas [Sat, 1 Mar 2025 05:28:17 +0000 (06:28 +0100)]
keymaps.texi: Move "Key Sequences" section down

* doc/lispref/keymaps.texi (Key Sequences): Move section
down.  (Bug#52821)

(cherry picked from commit 7ec6531c7bd99ff13e73b9cc2f00d49d2472565f)

7 days agoImprove process-get/process-put docstrings
Stefan Kangas [Sat, 1 Mar 2025 01:01:30 +0000 (02:01 +0100)]
Improve process-get/process-put docstrings

* lisp/subr.el (process-get, process-put): Explain the purpose of these
functions in the docstring.

(cherry picked from commit 8b804011275f9f7b5dda1f03e1d6118cae2846c5)

7 days agoFix handling of delta values with negative month field
Łukasz Stelmach [Wed, 7 Feb 2024 13:37:39 +0000 (14:37 +0100)]
Fix handling of delta values with negative month field

* lisp/calendar/time-date.el (decoded-time-add): If the new
variable is less then zero, the year needs to be decremented
by quotient of new and 12 increased by one.
* test/lisp/calendar/time-date-tests.el (test-decoded-add):
Add applicable test cases.  (Bug#68969)

(cherry picked from commit bc33b70b280933470b252f2a877fd50e4aed42ba)

7 days agogrep: Signal error if unable to access directory
Stefan Kangas [Sat, 1 Mar 2025 02:22:30 +0000 (03:22 +0100)]
grep: Signal error if unable to access directory

* lisp/progmodes/grep.el (lgrep, rgrep): grep: Signal error if unable to
access directory, instead of just trying to use default-directory,
because that level of DWIMishness is confusing.  (Bug#71078)

(cherry picked from commit c0ca272bd7cbab5a2013e112f171e1d7fda65216)

7 days ago; Fix an interactive spec (Bug#71373)
Stefan Kangas [Sat, 1 Mar 2025 02:10:35 +0000 (03:10 +0100)]
; Fix an interactive spec (Bug#71373)

(cherry picked from commit 22c98747601dfdc7ac90b22168a6ec1ca13e0e59)

7 days agoMake '(setf (process-get ...) VAL)' return VAL
Stefan Kangas [Sat, 1 Mar 2025 01:05:28 +0000 (02:05 +0100)]
Make '(setf (process-get ...) VAL)' return VAL

* lisp/emacs-lisp/gv.el (process-get): Return only the last value
when set as a generalized variable.  (Bug#76643)

(cherry picked from commit 77f597ee3de04f6a8dee27b5a5f601911d74c6f5)

7 days ago* test/src/editfns-tests.el (editfns--replace-region): New test
Stefan Monnier [Fri, 28 Feb 2025 22:10:56 +0000 (17:10 -0500)]
* test/src/editfns-tests.el (editfns--replace-region): New test

This test fails, sadly, because `replace-buffer-contents` is not
careful enough to something like `replace_range`.

(cherry picked from commit 1cfbbcfaf657e767ed5743565b62eeecde3a4ef5)

7 days ago; Skip commit 5f165caf316f9da6f04f4d6c5a0fa786f6f197b9
Eshel Yaron [Tue, 4 Mar 2025 20:55:57 +0000 (21:55 +0100)]
; Skip commit 5f165caf316f9da6f04f4d6c5a0fa786f6f197b9

7 days ago; Grammar fixes for "native-compiled"
Stefan Kangas [Fri, 28 Feb 2025 18:59:12 +0000 (19:59 +0100)]
; Grammar fixes for "native-compiled"

1. Prefer "native-compiled" to "native compiled".
The adjective "native-compiled" with the hyphen is generally more
consistent with the typical pattern in English, especially when the
compound modifies a noun (e.g., "native-compiled code").

2. Prefer "natively compiled" to "natively-compiled".
The adverb "natively" modifies "compiled", and it is standard not
to hyphenate an adverb + adjective combination when the adverb ends
in -ly (e.g., "code that is natively compiled").

For example, note that we say "high-speed internet" but "highly
performant code".

* Makefile.in (dest):
* configure.ac (HAVE_NATIVE_COMP):
* doc/emacs/building.texi (Lisp Libraries):
* doc/lispref/compile.texi (Native Compilation)
(Native-Compilation Functions, Native-Compilation Variables):
* doc/lispref/functions.texi (What Is a Function, Declare Form):
* doc/lispref/loading.texi (How Programs Do Loading, Library Search):
* etc/NEWS:
* etc/NEWS.28:
* etc/NEWS.29:
* etc/NEWS.30:
* lisp/emacs-lisp/comp-common.el (native-comp-never-optimize-functions)
(comp-function-type-spec):
* lisp/emacs-lisp/comp-cstr.el:
* lisp/subr.el (locate-eln-file):
* src/comp.c (SETJMP_NAME, syms_of_comp):
* src/data.c (Fsubrp, Fnative_comp_function_p, Fsubr_native_lambda_list):
* src/lread.c (Fload):
* src/pdumper.c (dump_do_dump_relocation):
* test/src/comp-tests.el (lambda-return2): Avoid grammatically incorrect
variations on "natively compiled" and "native-compiled".  (Bug#56727)

(cherry picked from commit 678fdcc16594aaedb319fe145d039aa118174f5d)

7 days agoUpdate .gitattributes
Eshel Yaron [Tue, 4 Mar 2025 20:53:16 +0000 (21:53 +0100)]
Update .gitattributes

7 days ago(completion-preview-sort-function): Refine ':type'.
Eshel Yaron [Fri, 28 Feb 2025 17:59:11 +0000 (18:59 +0100)]
(completion-preview-sort-function): Refine ':type'.

* lisp/completion-preview.el
(completion-preview-sort-function): Add some specific sort
functions as available choices for this user option.

Suggested by Robert Pluim <rpluim@gmail.com>.

(cherry picked from commit 0b0bf7c07f2ecaca1e9b25d72139af0dd7e49832)

7 days ago; Silence byte-compiler during bootstrap
Stefan Kangas [Fri, 28 Feb 2025 17:42:18 +0000 (18:42 +0100)]
; Silence byte-compiler during bootstrap

(cherry picked from commit 3a5cf24735809d79a8603f6b17079708fa0cce0a)

7 days ago; Skip commit 85ef06392a07e2405dd03c7a1efe76348e001d19
Eshel Yaron [Tue, 4 Mar 2025 20:52:12 +0000 (21:52 +0100)]
; Skip commit 85ef06392a07e2405dd03c7a1efe76348e001d19

7 days ago; Skip commit 2435749efa5b082b520bb1e40db3d3c839023c04
Eshel Yaron [Tue, 4 Mar 2025 20:52:09 +0000 (21:52 +0100)]
; Skip commit 2435749efa5b082b520bb1e40db3d3c839023c04

7 days agoLift widget functions from C to Lisp
Stefan Kangas [Fri, 28 Feb 2025 17:28:58 +0000 (18:28 +0100)]
Lift widget functions from C to Lisp

In the mid-1990s, these functions were moved from Lisp to C to
"improve performance".  However, Moore's Law, and perhaps other
improvements too, has made this rationale irrelevant.

On this machine, with --native-compilation=no, I observed only a
slight ~4% performance difference.  For example, displaying a buffer
full of widgets (e.g., 'M-x customize RET browse-url RET') takes 4ms
here, meaning the performance gap is under 0.1ms.  Even on less
powerful machines, this difference would remain imperceptible.  Given
this, let's lift these functions back to to Lisp, which offers the
usual benefits.

We already have solid test coverage, but let's add a more focused test
for 'widget-get' and 'widget-put' to be thorough.

* lisp/wid-edit.el (widget-put, widget-get, widget-apply): Move to
Lisp from...
* src/fns.c (Fwidget_put, Fwidget_get, Fwidget_apply): ...here.
(syms_of_fns): Remove defsubrs for the above functions.
* test/lisp/wid-edit-tests.el
(widget-test-editable-field-widget-get/put): New test.

(cherry picked from commit 8b659313b83c82cfe09af1638289fccdfc9af23d)

7 days agoFix recent change in diff-no-select
Michael Albinus [Fri, 28 Feb 2025 17:03:54 +0000 (18:03 +0100)]
Fix recent change in diff-no-select

* lisp/vc/diff.el (diff-no-select): Keep initial default directory
in *Diff* buffer.

(cherry picked from commit 0af5c5749988180c6a2f7c50b7e1c8163b4c5bf1)

7 days ago; Adapt last change
Michael Albinus [Fri, 28 Feb 2025 16:47:42 +0000 (17:47 +0100)]
; Adapt last change

(cherry picked from commit 92a8d24e4948dd9e7fa8bdbadac48f9eed19fa49)

7 days ago; Skip commit c8cec840d7972d5cca0c255a19fd521703c7628c
Eshel Yaron [Tue, 4 Mar 2025 20:51:48 +0000 (21:51 +0100)]
; Skip commit c8cec840d7972d5cca0c255a19fd521703c7628c

7 days ago* lisp/proced.el (proced-<): Check, that NUM1 and NUM2 are numbers.
Michael Albinus [Fri, 28 Feb 2025 14:32:35 +0000 (15:32 +0100)]
* lisp/proced.el (proced-<): Check, that NUM1 and NUM2 are numbers.

(Bug#76549)

(cherry picked from commit 5247da2e3cd2705278bb68e0c5313a6972a6d43c)

7 days agoFix the values and documentation of 'printable-chars' table
Eli Zaretskii [Fri, 28 Feb 2025 14:22:30 +0000 (16:22 +0200)]
Fix the values and documentation of 'printable-chars' table

* src/character.c (syms_of_character) <printable-chars>: Doc fix.

* lisp/international/characters.el (printable-chars): Fix values
for non-ASCII characters.

* doc/lispref/nonascii.texi (Character Properties): Add
cross-reference for what is a printable character.
* doc/lispref/display.texi (Usual Display):
* doc/lispref/searching.texi (Char Classes): Add indexing.
(Bug#76611)

(cherry picked from commit 68a37760dec83a8126b03bcacc60a96644a6831f)

7 days agoAdapt process-tests to Android
Po Lu [Fri, 28 Feb 2025 13:05:55 +0000 (21:05 +0800)]
Adapt process-tests to Android

* src/android.c (android_init_thread_events)
(android_run_select_thread): Guarantee that the select thread is
initialized before returning.

* test/src/process-tests.el
(process-tests/fd-setsize-no-crash/make-process)
(process-tests/fd-setsize-no-crash/make-pipe-process)
(process-tests/fd-setsize-no-crash/make-network-process)
(process-tests/fd-setsize-no-crash/make-serial-process): Skip on
Android.

(cherry picked from commit 18c8c44bef9b85adf3cff65f08b7f6a8c59687db)

7 days agoFix 'internal--c-header-file-path'
Eli Zaretskii [Fri, 28 Feb 2025 12:45:39 +0000 (14:45 +0200)]
Fix 'internal--c-header-file-path'

* lisp/subr.el (internal--c-header-file-path): Fix for MS-Windows:
don't prepend the (usually non-existent) "/usr/include", and run
each directory through 'expand-file-name' to remove the many ".."
elements and mirror any backslashes.  Invoke "clang" if "gcc" is
not available or is actually clang.

* test/lisp/subr-tests.el
(subr-tests-internal--c-header-file-path): Fix for MS-Windows:
test the path by looking for stdio.h, and expand all directory
names to compare to expected results.

(cherry picked from commit a04e8812ee0dfb7f2984d0b57b380cf15c73567c)

7 days ago; Skip commit 387dcb1be88168f2683af52041b4f5a6e3bde146
Eshel Yaron [Tue, 4 Mar 2025 20:51:21 +0000 (21:51 +0100)]
; Skip commit 387dcb1be88168f2683af52041b4f5a6e3bde146

7 days agoFully support Lisp threads on Android
Po Lu [Fri, 28 Feb 2025 11:49:34 +0000 (19:49 +0800)]
Fully support Lisp threads on Android

* src/android.c (struct android_thread_event_queue): New
structure.  Move global pselect arguments, mutexes, and
semaphores, and pipes here.
(struct android_event_queue) <select_mutex, select_thread>:
Remove to the above-named struct.
(android_init_thread_events, android_finalize_thread_events)
(android_get_poll_thread): New functions.
(android_run_select_thread): Accept a set of mutexes and
thread-local data as the first argument, and operate with them
rather than globals.
(android_handle_sigusr1): Rename to
`android_handle_poll_signal'.  Set thread-specific cancellation
indicator.
(android_init_events): Properly abort after a fatal condition.
Enable interruptible polling on Android 5.1 and later, not 4.2.
(android_select): Never check for queries here, but in
thread_select, if threads are enabled.  Adapt to per-thread
polling threads and only enable interruptible polling on Android
5.1 and later.
(android_before_select): New function.

* src/android.h (android_before_select): New declaration.

* src/thread.c (thread_select): Call `android_before_select'
before the global lock is released.

(cherry picked from commit 8df582a46836e312ef3bfc36c8038b5f4a2c0d9b)

7 days agoRecommend secure-hash in md5 docstring
Stefan Kangas [Fri, 28 Feb 2025 04:21:48 +0000 (05:21 +0100)]
Recommend secure-hash in md5 docstring

* src/fns.c (Fmd5): Repeat explanation from manual about md5 being
"semi-obsolete", and recommend using secure-hash instead.

(cherry picked from commit 6f5c322f5974786290b1b3e68b5a0685ddec3410)

7 days agoImprove docstring of add-hook and remove-hook
Tomas Nordin [Thu, 27 Feb 2025 21:06:25 +0000 (22:06 +0100)]
Improve docstring of add-hook and remove-hook

* lisp/subr.el (add-hook, remove-hook): Remove detail about setting to
nil and talk about functions instead of hooks.  (Bug#72915)

(cherry picked from commit 1352b184f3f7bd1e31ee71ee4b60491dacaf347b)

7 days agoFix fns-tests-collate-strings failure with musl
Paul Eggert [Thu, 27 Feb 2025 18:57:19 +0000 (10:57 -0800)]
Fix fns-tests-collate-strings failure with musl

* test/src/fns-tests.el (fns-tests-collate-strings):
Don’t assume "en_XY.UTF-8", or any particular string,
is an invalid locale, as they all seem to be valid in musl.
Instead, simply test that a non-string is invalid.
(Bug#76550)

(cherry picked from commit 62b3d3136fae8830d63f69143b09e99b5173c537)

7 days ago; (completion-preview-complete): Fix bug#76606
Eshel Yaron [Thu, 27 Feb 2025 14:34:24 +0000 (15:34 +0100)]
; (completion-preview-complete): Fix bug#76606

* lisp/completion-preview.el (completion-preview-complete):
Dismiss completion preview before calling ':exit-function'.
This eliminates potential flicker with slow exit functions
and avoids the broken preview update reported in bug#76606.

(cherry picked from commit 840c6824589c9a82deedc5112891d8014d134746)

7 days ago; Fix indentation in cl.texi example
Stefan Kangas [Wed, 26 Feb 2025 17:31:48 +0000 (18:31 +0100)]
; Fix indentation in cl.texi example

(cherry picked from commit fa42626a6a8d60c9ab313f39b64c12be32054442)

7 days ago; Fix my last commit
Stefan Kangas [Wed, 26 Feb 2025 16:49:56 +0000 (17:49 +0100)]
; Fix my last commit

(cherry picked from commit 7ff806da496619f9109b2075c3ff5b803506d258)

7 days ago; Fix documentation of 'buffer-text-pixel-size'
Eli Zaretskii [Wed, 26 Feb 2025 12:52:26 +0000 (14:52 +0200)]
; Fix documentation of 'buffer-text-pixel-size'

* doc/lispref/display.texi (Size of Displayed Text): Fix arguments
of 'buffer-text-pixel-size'.  (Bug#76519)

(cherry picked from commit f88dc0f2f9d28d0988cca54c5b9fc1ba85ce3d7e)

7 days ago; Minor Android documentation improvements
Po Lu [Wed, 26 Feb 2025 07:10:27 +0000 (15:10 +0800)]
; Minor Android documentation improvements

* doc/emacs/android.texi (Android Startup, Android File System)
(Android Document Providers): Improve phrasing.

(cherry picked from commit 734986349fd460e5c1f65f315e16817320026444)

7 days ago; Fix up emacs-lisp-mode docstring
Stefan Kangas [Wed, 26 Feb 2025 02:31:57 +0000 (03:31 +0100)]
; Fix up emacs-lisp-mode docstring

* lisp/progmodes/elisp-mode.el (emacs-lisp-mode, lisp-interaction-mode):
Fix up docstring slightly by removing redundant and misplaced word
"Commands", and prefix list with dashes.

(cherry picked from commit a90da8990342c7fc0aa51ae92a0849de346a8d8b)

7 days ago; Skip commit 58c7acb55543bddf4280e90c219ee5023d4898f9
Eshel Yaron [Tue, 4 Mar 2025 20:50:07 +0000 (21:50 +0100)]
; Skip commit 58c7acb55543bddf4280e90c219ee5023d4898f9

7 days agoFix ert-font-lock macro signatures
Basil L. Contovounesios [Thu, 20 Feb 2025 09:29:54 +0000 (10:29 +0100)]
Fix ert-font-lock macro signatures

* doc/misc/ert.texi (Syntax Highlighting Tests):
* test/lisp/emacs-lisp/ert-font-lock-tests.el
(test-line-comment-p--emacs-lisp, test-line-comment-p--shell-script)
(test-line-comment-p--javascript, test-line-comment-p--python)
(test-line-comment-p--c, test-macro-test--correct-highlighting)
(test-macro-test--docstring, test-macro-test--failing)
(test-macro-test--file, test-macro-test--file-no-asserts)
(test-macro-test--file-failing): Reindent macro calls.
(with-temp-buffer-str-mode): Evaluate macro arguments left-to-right.
(ert-font-lock--wrap-begin-end): Use rx for more robust composition.
(test-line-comment-p--php): Require that php-mode is callable, not
already loaded.

* lisp/emacs-lisp/ert-font-lock.el (ert-font-lock-deftest)
(ert-font-lock-deftest-file): NAME is not followed by an empty list
like in ert-deftest, so the optional DOCSTRING is actually the
second argument.  Adapt calling convention in docstring, and debug,
doc-string, and indent properties accordingly (bug#76372).  Fix
docstring grammar, document MAJOR-MODE, and avoid referring to a
file name as a path.

(cherry picked from commit 02c830ba22b0564f6725cd403beba4accb836061)

7 days agoFix a typo in 'window_text_pixel_size'
Eli Zaretskii [Mon, 24 Feb 2025 19:02:14 +0000 (21:02 +0200)]
Fix a typo in 'window_text_pixel_size'

This typo caused strange mis-behaviors in buffers
with non-ASCII characters.
* src/xdisp.c (window_text_pixel_size): Fix typo.  (Bug#76519)

(cherry picked from commit 0c6b8643aec24935f82c63d43219f26378e3e578)