1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00
Commit graph

177268 commits

Author SHA1 Message Date
Stefan Kangas
eeda2a8ab1 Improve argument type error in load-theme
* lisp/custom.el (load-theme): Improve error message when passing in a
non-symbol THEME argument.
2025-03-03 18:57:17 +01:00
Paul Eggert
29a9fd4f4b Avoid some union buffered_input_event uses
Simplify by using separate local vars for struct input_event and
struct selection_input_event, rather than a single local var that
is the union of the two.  This makes the code easier to follow by
the human reader, and should help avoid GCC bug 117423
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117423> and
therefore work around Emacs bug 76559 <https://bugs.gnu.org/76559>.
* src/androidterm.c (handle_one_android_event):
* src/gtkutil.c (xg_widget_key_press_event_cb):
* src/pgtkterm.c (evq_flush):
* src/xterm.c (handle_one_xevent): Use struct input_event and
kbd_buffer_store_event_hold, or struct selection_input_event and
kbd_buffer_store_selection_event_hold, rather than union
buffered_input_event and union buffered_input_event.
* src/keyboard.c (beware_long_paste, maybe_quit_while_no_input):
New functions, broken out from kbd_buffer_store_buffered_event.
(kbd_buffer_store_event_hold): Define here, with a simplified
version of the body of the old kbd_buffer_store_buffered_event,
rather than defining in keyboard.h.  Specialize to struct
input_event.
(kbd_buffer_store_selection_event_hold): New function; it is
a simplified version of the old kbd_buffer_store_buffered_event,
specialized to struct selection_input_event.
(is_ignored_event_kind): Accept enum event_kind instead of
union buffered_input_event.  All callers changed.
* src/keyboard.h (kbd_buffer_store_event_hold):
Remove definition, as keyboard.c now defines it.
* src/pgtkterm.c (evq_grow_if_needed): New function.
(evq_enqueue, evq_selection_enqueue): Two functions now,
not one.  Args are now struct input_event const * or
struct selection_input_event const *, not
union buffered_input_event *.  All callers changed.
This lets us simplify the callers so that they need
not use the union.
2025-03-03 09:44:42 -08:00
Po Lu
96d26b4936 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.
2025-03-03 21:59:41 +08:00
Po Lu
f372508f68 ; Adapt another test to Android
* test/lisp/erc/erc-match-tests.el (erc-add-entry-to-list): Skip
on Android as it hangs for reasons unknown.
2025-03-03 21:59:41 +08:00
Mattias Engdegård
7b504f898d * lisp/wid-edit.el (widget-get): Make faster. 2025-03-03 10:49:09 +01:00
Mattias Engdegård
932397ce52 Strengthen widget-get/put tests
* test/lisp/wid-edit-tests.el
(widget-test-editable-field-widget-get/put): Test on inherited properties.
2025-03-03 10:49:09 +01:00
Mattias Engdegård
773108fc04 ; * test/infra/android/test-controller.el: minor regexp snags 2025-03-03 10:49:09 +01:00
Yuan Fu
f1950fbdb4
; Fix my previous commit
* lisp/treesit.el (treesit--update-range-1): Actually guard
against calling treesit-query-language on a function.
2025-03-02 20:34:01 -08:00
Yuan Fu
a211a940a1
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.
2025-03-02 20:28:07 -08:00
Paul Eggert
76342efe9d 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.
2025-03-02 15:58:04 -08:00
João Távora
07bbfea901 Eglot: fix invocation of neocmakelsp
* lisp/progmodes/eglot.el (eglot-server-programs): Fix invocation
of neocmakelsp
2025-03-02 22:22:15 +00:00
Felician Nemeth
18c81b76bc 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>
2025-03-02 22:22:09 +00:00
Daniel Colascione
13b1436d97 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
2025-03-02 16:01:13 -05:00
Stefan Kangas
83e2e5e24b ; Fix thinko 2025-03-02 19:46:15 +01:00
Stefan Kangas
56202138a3 ; Add missing lexical-binding cookies 2025-03-02 19:46:15 +01:00
Stefan Kangas
b5fe170240 ; Fix my last commit 2025-03-02 19:46:15 +01:00
Juri Linkov
888a2b5394 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'.
2025-03-02 20:44:40 +02:00
Juri Linkov
a5e82110b0 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'.
2025-03-02 20:07:21 +02:00
Stefan Kangas
1b77e94bcc ; Move python.el Maintainer header further up
This is more consistent with our common practices.
2025-03-02 18:53:27 +01:00
Stefan Kangas
538ab57dc5 Bump python.el package version to 0.29
* lisp/progmodes/python.el: Bump package version to 0.29.
2025-03-02 18:53:09 +01:00
Stefan Kangas
0cff855690 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)
2025-03-02 18:49:37 +01:00
Stefan Kangas
fad9b7dce7 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.
2025-03-02 18:45:03 +01:00
Eli Zaretskii
8937dee9e4 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.
2025-03-02 15:25:53 +02:00
Po Lu
e34d7a7c4e ; Adapt more tests for Android
* test/infra/android/test-controller.el (ats-eval): Document new
values of ats-eval.
(ats-run-test): Report conditions where tests induce Emacs to
exit.

* test/lisp/erc/resources/erc-tests-common.el
(erc-tests-common-kill-buffers): Bind
kill-buffer-query-functions to nil.
2025-03-02 21:02:10 +08:00
Po Lu
749e33bb48 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.
2025-03-02 21:02:10 +08:00
Stefan Kangas
e4d8095c3d 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)
2025-03-02 13:37:34 +01:00
Po Lu
c73003ade1 Don't byte compile early-init.el
* test/infra/android/early-init.el (frame-initialize): Remove
redundant debugging printouts.
2025-03-02 19:23:44 +08:00
Po Lu
8e007f7990 ; * test/infra/android/test-driver.el: Don't byte-compile. 2025-03-02 19:15:48 +08:00
Po Lu
ecbb080865 Exclude files under `infra' from automatic testing
* test/Makefile.in (ELFILES): Exclude files within `infra'.
Reported by Stefan Kangas <skangas@gmail.com>.
2025-03-02 19:11:10 +08:00
Stefan Kangas
c4232a08f1 ; Silence byte-compiler in Android tests 2025-03-02 09:19:54 +01:00
Po Lu
2ba2157a61 ; * lisp/treesit.el: Silence byte-compiler. 2025-03-02 16:08:30 +08:00
Po Lu
a8988ce800 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.
2025-03-02 16:05:04 +08:00
Po Lu
7fcb01e76b 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.
2025-03-02 16:05:04 +08:00
Stefan Kangas
558e6792c0 ; Add Maintainer header to loaddefs-gen.el 2025-03-02 06:45:53 +01:00
Stefan Kangas
b7fdddc86b Mark echistory.el as obsolete
* lisp/obsolete/echistory.el: Add Obsolete-since header.
* etc/TODO: Delete echistory.
* etc/NEWS: Announce above obsoletion.  (Bug#76506)
2025-03-02 06:33:46 +01:00
Stefan Kangas
6f8c4581ea Move echistory.el to lisp/obsolete
* lisp/echistory.el: Move from here...
* lisp/obsolete/echistory.el: ...to here.  (Bug#76506)
2025-03-02 06:32:35 +01:00
Stefan Kangas
33222bd000 Document apply-partially as inefficient
* doc/lispref/functions.texi (Calling Functions): Document that it is
less inefficient than a regular 'lambda'.
* lisp/subr.el (apply-partially): Adjust documentation like above and
remove compiler macro.
Ref: https://lists.gnu.org/r/emacs-devel/2025-03/msg00024.html
2025-03-02 05:57:27 +01:00
Stefan Kangas
eff5a3e43b 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)
2025-03-02 05:40:27 +01:00
Pranshu Sharma
d6dd9dd066 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)
2025-03-02 05:02:23 +01:00
Stefan Kangas
735eace97b Make package-install accept a string as well
* lisp/emacs-lisp/package.el (package-install): Allow passing a string
instead of a symbol.  (Bug#72160)
(package-upgrade): Improve docstring.

* test/lisp/emacs-lisp/package-tests.el
(package-test-install-single-from-archive/string-type): New test.
2025-03-02 04:19:35 +01:00
Stefan Kangas
38782e684b 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)
2025-03-02 04:07:48 +01:00
David Ponce
be8a7c9c88 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
2025-03-02 02:42:37 +01:00
Stefan Kangas
49e3ef3437 ; 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)
2025-03-02 02:18:30 +01:00
David Ponce
5b13541858 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)
2025-03-02 02:18:26 +01:00
Stefan Kangas
10f11d730e ; * etc/symbol-releases.eld: Add missing symbols. 2025-03-02 01:59:13 +01:00
Pip Cet
1e84a87676 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.
2025-03-01 21:39:23 +00:00
Daniel Colascione
3545988740 Make Emacs respond to NS activation clicks
* src/nsterm.m (acceptsFirstMouse): Opt into receiving mouse events that
activate the window. (bug#76629)
2025-03-01 12:55:15 -05:00
Eli Zaretskii
6a2f6056c5 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.
2025-03-01 17:16:08 +02:00
Eli Zaretskii
503622a101 ; * etc/NEWS.30: Fix last merge. 2025-03-01 10:09:16 -05:00
Eli Zaretskii
2095d0fcc6 Merge from origin/emacs-30
0460177451 ; * lisp/progmodes/java-ts-mode.el (treesit-node-end): De...
8481170eb2 Fix 'M-q' in 'makefile-mode'
44a770b871 ; Improve documentation of 'rmail-movemail-program'

# Conflicts:
#	lisp/progmodes/java-ts-mode.el
2025-03-01 10:02:41 -05:00