]> git.eshelyaron.com Git - emacs.git/log
emacs.git
12 months agoTake fields into account during text conversion
Po Lu [Sun, 21 Apr 2024 13:51:09 +0000 (21:51 +0800)]
Take fields into account during text conversion

* lisp/cus-edit.el (Custom-mode): Enable text conversion, now
that fields are correctly treated.

* src/alloc.c (mark_frame): Mark f->conversion.field.

* src/androidterm.c (android_update_selection): Adjust
conversion region and selection position by the field start and
end.

* src/editfns.c (find_field): Export function.

* src/frame.c (make_frame): Clear f->conversion.field.

* src/frame.h (struct text_conversion_state) <field>: New field.

* src/lisp.h (find_fields, reset_frame_conversion): Export
functions.

* src/minibuf.c (Fread_from_minibuffer): Reset frame conversion
if Voverriding_text_conversion_style is set.

* src/textconv.c (textconv_query): Narrow to field.
(reset_frame_conversion): New function.
(reset_frame_state): Clear conversion field.
(really_delete_surrounding_text): Narrow to field.
(locate_and_save_position_in_field): New function.
(really_request_point_update, really_set_point_and_mark)
(complete_edit_check, handle_pending_conversion_events_1)
(handle_pending_conversion_events, get_conversion_field)
(set_composing_region, textconv_set_point_and_mark, replace_text)
(get_extracted_text, get_surrounding_text, report_point_change):
Compute, narrow to and offset by the currently active field
whenever point is updated or a command is received.
(syms_of_textconv): Revise doc strings.

* src/textconv.h (get_conversion_field): Export function.

(cherry picked from commit 430088c9ccec5fe9be57d267f45acdc87aa3b28e)

12 months ago; Delete obsolete commentary
Po Lu [Mon, 29 Apr 2024 01:21:02 +0000 (09:21 +0800)]
; Delete obsolete commentary

* java/org/gnu/emacs/EmacsDrawLine.java (perform): Delete
obsolete commentary.

(cherry picked from commit ee2e0031d8cc32bb7837ea97ce07ef3b25463223)

12 months agoFix NEWS entries and documentation for underline styles
Po Lu [Mon, 29 Apr 2024 00:49:28 +0000 (08:49 +0800)]
Fix NEWS entries and documentation for underline styles

* doc/lispref/display.texi (Face Attributes):

* etc/NEWS: Revise to not mislead users as to where these
attributes are available.

(cherry picked from commit 8cd9ca22362f8646e7717d2a18bcdb86780f423a)

12 months agoUse a dedicated type to represent interpreted-function values
Stefan Monnier [Mon, 11 Mar 2024 20:12:26 +0000 (16:12 -0400)]
Use a dedicated type to represent interpreted-function values

Change `function` so that when evaluating #'(lambda ...)
we return an object of type `interpreted-function` rather than
a list starting with one of `lambda` or `closure`.
The new type reuses the existing PVEC_CLOSURE (nee PVEC_COMPILED)
tag and tries to align the corresponding elements:

- the arglist, the docstring, and the interactive-form go in the
  same slots as for byte-code functions.
- the body of the function goes in the slot used for the bytecode string.
- the lexical context goes in the slot used for the constants of
  bytecoded functions.

The first point above means that `help-function-arglist`,
`documentation`, and `interactive-form`s don't need to
distinguish interpreted and bytecode functions any more.

Main benefits of the change:

- We can now reliably distinguish a list from a function value.
- `cl-defmethod` can dispatch on `interactive-function` and `closure`.
  Dispatch on `function` also works now for interpreted functions but still
  won't work for functions represented as lists or as symbols, of course.
- Function values are now self-evaluating.  That was alrready the case
  when byte-compiled, but not when interpreted since
  (eval '(closure ...)) signals a void-function error.
  That also avoids false-positive warnings about "don't quote your lambdas"
  when doing things like `(mapcar ',func ...)`.

* src/eval.c (Fmake_interpreted_closure): New function.
(Ffunction): Use it and change calling convention of
`Vinternal_make_interpreted_closure_function`.
(FUNCTIONP, Fcommandp, eval_sub, funcall_general, funcall_lambda)
(Ffunc_arity, lambda_arity): Simplify.
(funcall_lambda): Adjust to new representation.
(syms_of_eval): `defsubr` the new function.  Remove definition of `Qclosure`.

* lisp/emacs-lisp/cconv.el (cconv-make-interpreted-closure):
Change calling convention and use `make-interpreted-closure`.

* src/data.c (Fcl_type_of): Distinguish `byte-code-function`s from
`interpreted-function`s.
(Fclosurep, finterpreted_function_p): New functions.
(Fbyte_code_function_p): Don't be confused by `interpreted-function`s.
(Finteractive_form, Fcommand_modes): Simplify.
(syms_of_data): Define new type symbols and `defsubr` the two
new functions.

* lisp/emacs-lisp/cl-print.el (cl-print-object) <interpreted-function>:
New method.

* lisp/emacs-lisp/oclosure.el (oclosure): Refine the parent
to be `closure`.
(oclosure--fix-type, oclosure-type): Simplify.
(oclosure--copy, oclosure--get, oclosure--set): Adjust to
new representation.

* src/callint.c (Fcall_interactively): Adjust to new representation.

* src/lread.c (bytecode_from_rev_list):

* lisp/simple.el (function-documentation):
* lisp/help.el (help-function-arglist): Remove the old `closure` case
and adjust the byte-code case so it handles `interpreted-function`s.

* lisp/emacs-lisp/cl-preloaded.el (closure): New type.
(byte-code-function): Add it as a parent.
(interpreted-function): Adjust parent (the type itself was already
added earlier by accident).

* lisp/emacs-lisp/bytecomp.el (byte-compile--reify-function): Adjust to
new representation.
(byte-compile): Use `interpreted-function-p`.

* lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand): Adjust to
new representation.
(side-effect-free-fns): Add `interpreted-function-p` and `closurep`.

* src/profiler.c (trace_hash, ffunction_equal): Simplify.
* lisp/profiler.el (profiler-function-equal): Simplify.

* lisp/emacs-lisp/nadvice.el (advice--interactive-form-1):
Use `interpreted-function-p`; adjust to new representation; and take
advantage of the fact that function values are now self-evaluating.

* lisp/emacs-lisp/lisp-mode.el (closure):
Remove `lisp-indent-function` property.

* lisp/emacs-lisp/disass.el (disassemble-internal): Adjust to
new representation.
* lisp/emacs-lisp/edebug.el (edebug--strip-instrumentation):
Use `interpreted-function-p`.
* lisp/emacs-lisp/comp-common.el (comp-known-type-specifiers):
Add `closurep` and `interpreted-function-p`.

* test/lisp/help-fns-tests.el (help-fns-test-lisp-defun): Adjust to
more precise type info in `describe-function`.
* test/lisp/erc/resources/erc-d/erc-d-tests.el (erc-d--render-entries):
Use `interpreted-function-p`.
* test/lisp/emacs-lisp/macroexp-resources/vk.el (vk-f4, vk-f5):
Don't hardcode function values.

* doc/lispref/functions.texi (Anonymous Functions): Don't suggest that
function values are lists.  Reword "self-quoting" to reflect the
fact that #' doesn't return the exact same object.  Update examples
with the new shape of the return value.

* doc/lispref/variables.texi (Lexical Binding):
* doc/lispref/lists.texi (Rearrangement):
* doc/lispref/control.texi (Handling Errors): Update examples to reflect
new representation of function values.

(cherry picked from commit f2bccae22bd47a2e7e0937b78ea06131711b935a)

12 months ago(COMPILED): Rename to CLOSURE
Stefan Monnier [Sun, 24 Mar 2024 22:32:25 +0000 (18:32 -0400)]
(COMPILED): Rename to CLOSURE

In preparation for the use of `PVEC_COMPILED` objects for
interpreted functions, rename them to use a more neutral name.

* src/lisp.h (enum pvec_type): Rename `PVEC_COMPILED` to `PVEC_CLOSURE`.
(enum Lisp_Compiled): Use `CLOSURE_` prefix i.s.o `COMPILED_`.
Also use `CODE` rather than `BYTECODE`.
(CLOSUREP): Rename from `COMPILEDP`.
(enum Lisp_Closure): Rename from `Lisp_Compiled`.

* src/alloc.c, src/bytecode.c, src/comp.c, src/data.c, src/eval.c,
* src/fns.c, src/lisp.h, src/lread.c, src/pdumper.c, src/print.c,
* src/profiler.c: Rename all uses accordingly.
* src/.gdbinit (xclosure): Rename from `xcompiled`.
(xcompiled): New obsolete alias.
(xpr): Adjust accordingly.  Also adjust to new PVEC_CLOSURE tag name.

(cherry picked from commit 2fa839c1886acd4a7b6c25c50877534fe1d669bb)

12 months agoMake completion preview cleanup more robust
Eshel Yaron [Mon, 29 Apr 2024 19:45:25 +0000 (21:45 +0200)]
Make completion preview cleanup more robust

12 months ago* src/comp.c (comp_hash_string): Count bytes, not chars.
Mattias Engdegård [Sun, 28 Apr 2024 13:24:46 +0000 (15:24 +0200)]
* src/comp.c (comp_hash_string): Count bytes, not chars.

(cherry picked from commit 1e931f1c3db1588ba402d0eab60f03cc036f814a)

12 months agoImplement dots and dashes on PGTK
Po Lu [Sun, 28 Apr 2024 13:30:52 +0000 (21:30 +0800)]
Implement dots and dashes on PGTK

* src/image.c (image_create_bitmap_from_file) [HAVE_PGTK]:
Remove unused variable.

* src/pgtkterm.c (pgtk_draw_dash, pgtk_fill_underline)
(pgtk_draw_glyph_string): New functions, ported from X.

(cherry picked from commit 7341e600b7bc554df44784b6aa135bed8fcb61f1)

12 months agoImplement dots and dashes on Haiku
Po Lu [Sun, 28 Apr 2024 12:57:33 +0000 (12:57 +0000)]
Implement dots and dashes on Haiku

* src/doc.c (store_function_docstring): Re-enable loading doc
strings of compiled functions from etc/DOC, which haiku-win,
ns-win, and the like require.

* src/haikuterm.c (haiku_draw_dash, haiku_fill_underline)
(haiku_draw_text_decoration): Port underline code from X.

(cherry picked from commit 9d9881aceaefef56687baeb75eef94be1c7b22af)

12 months agoFix the Haiku build
Po Lu [Sun, 28 Apr 2024 11:52:27 +0000 (11:52 +0000)]
Fix the Haiku build

* src/haikuterm.c (haiku_draw_text_decoration): Remove stray
closing parenthesis.

(cherry picked from commit 94a9e41a9d333f946b74b175a8a7133595498805)

12 months agoImplement dots and dashes on Android
Po Lu [Sun, 28 Apr 2024 08:58:58 +0000 (16:58 +0800)]
Implement dots and dashes on Android

* java/org/gnu/emacs/EmacsDrawLine.java (EmacsDrawLine)
(measureLine, polyDashPattern): New function.
(perform): Delegate to polyDashPattern if the line style is not
LineSolid.  Also simplify now that anti-aliasing need no longer
be taken into account.

* java/org/gnu/emacs/EmacsDrawRectangle.java (perform): Mention
omission in commentary.

* java/org/gnu/emacs/EmacsGC.java (EmacsGC): Disable
anti-aliasing in default paint object.
<line_style, line>: New fields.
(markDirty): Apply stroke width.

* src/android.c (android_init_emacs_gc_class): Initialize new
fields.
(android_create_gc, android_free_gc, android_change_gc)
(android_set_dashes, android_get_gc_values):

* src/androidgui.h (enum android_line_style)
(enum android_gc_value_mask, struct android_gc): Introduce line
style, width, dash offset and dash GC attributes.

* src/androidterm.c (android_draw_dash, android_fill_underline)
(android_draw_glyph_string): Port from X.

* src/xterm.c (x_draw_dash): Delete redundant code.

(cherry picked from commit e658a6938e3b7a8a7c0be8b74fbd885787c26df6)

12 months agoFix the MS-Windows build broken by a recent commit
Eli Zaretskii [Sun, 28 Apr 2024 08:52:09 +0000 (11:52 +0300)]
Fix the MS-Windows build broken by a recent commit

* src/w32term.c (w32_draw_glyph_string): Move 'foreground'
declaration to where it belongs.

(cherry picked from commit b329358334712671de38f919c99d1434026aa8f2)

12 months agoFix Android build
Po Lu [Sun, 28 Apr 2024 04:03:07 +0000 (12:03 +0800)]
Fix Android build

* src/androidterm.c (android_draw_glyph_string): Omit extraneous
argument to android_fill_rectangle.

(cherry picked from commit ae9c76e588e5f64bfe1517a910d2cd6f54e9975a)

12 months agoImplement dots and dashes on X
Po Lu [Thu, 1 Jan 1970 00:00:00 +0000 (00:00 +0000)]
Implement dots and dashes on X

* src/dispextern.h (enum face_underline_type): Indent and expand
commentary as to the new dependency on the order of its
enumerals.

* src/xfaces.c (realize_gui_face): Enable dots and dashes on
window systems.

* src/xterm.c (x_draw_underwave): Don't define unused variable
on Cairo builds.
(x_draw_dash): New function; implement for X and Cairo.
(x_fill_underline): New function.  Delegate to x_fill_rectangle
or x_draw_dash as appropriate.
(x_draw_glyph_string): Call x_fill_underline rather than
x_fill_rectangle.

(cherry picked from commit e844b81c56d74aa2b2efa0ce98ed3de71647e656)

12 months agoPort double-line underlines to GUI systems
Po Lu [Thu, 1 Jan 1970 00:00:00 +0000 (00:00 +0000)]
Port double-line underlines to GUI systems

* src/xterm.c (x_get_scale_factor): Replace display in first
argument with a pointer to dpyinfo.
(x_draw_underwave): Adjust to match.
(x_draw_glyph_string): Implement double-line underlines.

* src/androidterm.c (android_get_scale_factor)
(android_draw_glyph_string):

* src/haikuterm.c (haiku_draw_text_decoration):

* src/nsterm.m (ns_draw_text_decoration):

* src/pgtkterm.c (pgtk_draw_glyph_string):

* src/w32term.c (w32_draw_glyph_string): Synchronize with X.

* src/xfaces.c (realize_gui_face): Enable `double-line' on
window systems.

(cherry picked from commit 77a170a175dfeb17dab23e41668b8497b8b3b9d7)

12 months ago; * src/term.c (turn_on_face): Fix coding style.
Po Lu [Sun, 28 Apr 2024 01:27:59 +0000 (09:27 +0800)]
; * src/term.c (turn_on_face): Fix coding style.

(cherry picked from commit 4992df159157806bcbad87569f34dc5136c96601)

12 months agoFix last change
Eli Zaretskii [Sat, 27 Apr 2024 19:12:14 +0000 (22:12 +0300)]
Fix last change

* test/lisp/progmodes/csharp-mode-tests.el
(csharp-ts-mode-test-indentation): If need to skip the tree-sitter
test, do so silently.  (Bug#70345)

(cherry picked from commit cf839129ce097c2116292cb69217be265f6b35e8)

12 months ago; Skip 'csharp-ts-mode' test if grammar is missing
john muhl [Sat, 27 Apr 2024 14:55:42 +0000 (09:55 -0500)]
; Skip 'csharp-ts-mode' test if grammar is missing

* test/lisp/progmodes/csharp-mode-tests.el
(csharp-ts-mode-test-indentation): Skip test instead of
failing.  (Bug#70345)

(cherry picked from commit 3e68d413c1c177e03ff60ba0faf09fc4b8af8e2e)

12 months ago; Skip commit f5439a929106d1482b185dce5369d4748658946f
Eshel Yaron [Mon, 29 Apr 2024 15:05:15 +0000 (17:05 +0200)]
; Skip commit f5439a929106d1482b185dce5369d4748658946f

12 months agoFix ommissions in window scrolling commands that ought to clear vscroll
Po Lu [Sat, 27 Apr 2024 11:48:45 +0000 (19:48 +0800)]
Fix ommissions in window scrolling commands that ought to clear vscroll

* src/window.c (Fdelete_other_windows_internal)
(window_scroll_for_long_lines, Frecenter, Fmove_to_window_line):
Reset window vscroll, or, if force_start be set, just
preserve_vscroll_p, after moving window start to a position
computed from iterators for the window in question, so that
vscroll may be reliably reset again after the conditions for
redisplay's doing the same were corrected.  (bug#70386)

(cherry picked from commit 01e0b783bcd1b48ec856c8960e9da571a289a1b2)

12 months agoFix a typo in Introduction to Emacs Lisp (bug#70571).
Brad Howes [Thu, 25 Apr 2024 16:39:02 +0000 (18:39 +0200)]
Fix a typo in Introduction to Emacs Lisp (bug#70571).

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

12 months agoFix `find-grep-dired' with default OpenBSD's Grep
Manuel Giraud [Wed, 24 Apr 2024 14:10:43 +0000 (16:10 +0200)]
Fix `find-grep-dired' with default OpenBSD's Grep

* lisp/find-dired.el (find-grep-options): Use '-q' on
OpenBSD as well.  (Bug#70550)

(cherry picked from commit b761a381066ca2fdeb510c0d5a88be58b524685d)

12 months ago; * test/lisp/jsonrpc-tests.el: Skip all tests on MS-Windows.
Eli Zaretskii [Sat, 27 Apr 2024 09:28:42 +0000 (12:28 +0300)]
; * test/lisp/jsonrpc-tests.el: Skip all tests on MS-Windows.

(cherry picked from commit 4e8e877c377e41d72705235922f97b69d81d0267)

12 months ago; * lisp/jsonrpc.el (jsonrpc-shutdown): Doc fix.
Eli Zaretskii [Sat, 27 Apr 2024 09:19:28 +0000 (12:19 +0300)]
; * lisp/jsonrpc.el (jsonrpc-shutdown): Doc fix.

(cherry picked from commit 990d615cabbeae62366e35bc74fdb27767bb8848)

12 months agoShut down jsonrpc server more gracefully
Daniel Pettersson [Tue, 23 Apr 2024 16:58:06 +0000 (18:58 +0200)]
Shut down jsonrpc server more gracefully

* lisp/jsonrpc.el (jsonrpc-running-p): Avoid unnecessarily killing
the server process.  Suggested by Aaron Zeng <azeng@janestreet.com>.
(Bug#70522)

(cherry picked from commit 3aed4400257a6762de96be37fa95357b5836363c)

12 months agoFollowup changes for styled underline support
Eli Zaretskii [Sat, 27 Apr 2024 09:07:53 +0000 (12:07 +0300)]
Followup changes for styled underline support

* src/nsterm.m (ns_draw_text_decoration):
* src/pgtkterm.c (pgtk_draw_glyph_string):
* src/haikuterm.c (haiku_draw_text_decoration):
* src/androidterm.c (android_draw_glyph_string):
* src/w32term.c (w32_draw_glyph_string): Use new FACE_UNDER*
constants.  (Bug#62994)

(cherry picked from commit 4e17e0b84ae1a52a6032c83592bf958a1e26dea5)

12 months agoAdd support for colored and styled underlines on tty frames
Mohsin Kaleem [Thu, 20 Apr 2023 21:30:12 +0000 (22:30 +0100)]
Add support for colored and styled underlines on tty frames

* src/dispextern.h (face, face_underline_type, syms_of_xfacse)
(internal-set-lisp-face-attribute)
(gui_supports_face_attributes_p): Add definitions for new
underline styles of Double-line, Dots and Dashes.  Rename
FACE_UNDER_LINE and FACE_UNDER_WAVE to make definitions
consistent.  Delete tty_underline_p from the face struct and use
just underline going forward.  Add a flag to check whether styled
underlines are available.
* lisp/cus-face.el (custom-face-attributes): Add entries for
Double-line, Dots and Dashes so they can be set through
`customize'.
* src/termchar.c (tty_display_info): Add an entry for the escape
sequence to set the underline style and color on terminal frames.
* src/term.c (init_tty, tty_capable_p, turn_on_face): Read and
save the underline style escape sequence from the Smulx termcap
(alternatively if the Su flag is set use a default sequence).
Allow checking for support of styled underlines in the current
terminal frame.  Output the necessary escape sequences to activate
a styled underline on turn_on_face; this is currently only used
for the new special underline styles, a default straight underline
will still use the "us" termcap.  Output escape sequence to set
underline color when set in the face and supported by the tty.
Save a default value for this sequence on init_tty when styled
underlines are supported.
* src/xfaces.c (tty_supports_face_attributes_p, realize_tty_face)
(map_tty_color): Assert whether styled underlines are supported by
the current terminal on display-supports-face-attributes-p checks.
Populate the correct underline style and color in the face spec
when realizing a face.  Allow map_tty_color to map underline
colors alongside foreground and background.  The interface of
map_tty_color was amended to allow the caller to supply the
underline color instead of accessing it through the face
attributes.  (bug#62994)
* src/xterm.c (x_draw_glyph_string): Updated to use renamed
FACE_UNDERLINE_SINGLE and FACE_UNDERLINE_WAVE face_underline_type
enumerations.

(cherry picked from commit 9f589eb924085a4612f46728e8850073128a2e43)

12 months agoImprove documentation of 'package-enable-at-startup'
Eli Zaretskii [Sat, 27 Apr 2024 08:52:30 +0000 (11:52 +0300)]
Improve documentation of 'package-enable-at-startup'

* doc/emacs/package.texi (Package Installation): Clarify how to
customize 'package-enable-at-startup'.

* lisp/emacs-lisp/package.el (package-enable-at-startup): Add note
about customization.  (Bug#70402)

(cherry picked from commit a7d51085cf0a6e6d01fa265001d7d6a4bd728ed2)

12 months agoFix c-ts-common--fill-paragraph for C
Yuan Fu [Sat, 27 Apr 2024 02:55:37 +0000 (19:55 -0700)]
Fix c-ts-common--fill-paragraph for C

This should fix the failing filling test for c-ts-mode.

* lisp/progmodes/c-ts-common.el (c-ts-common--fill-paragraph): Don't
go back to indentation.

(cherry picked from commit 53333132e47589c59331a7b8b3afb5ce964aed99)

12 months agoEnable customization of the quit key on Android
Po Lu [Sat, 27 Apr 2024 02:47:12 +0000 (10:47 +0800)]
Enable customization of the quit key on Android

* doc/emacs/android.texi (Android Windowing):

* doc/emacs/input.texi (On-Screen Keyboards): Document various
tidbits related to the quit key.

* java/org/gnu/emacs/EmacsNative.java (getQuitKeycode): New
function.

* java/org/gnu/emacs/EmacsWindow.java (EmacsWindow): Rename
`lastVolumeButtonRelease' to `lastQuitKeyRelease'.
(onKeyUp): Treat value returned by getQuitKeycode as the quit
key rather than mandate KEYCODE_VOLUME_DOWN.

* src/android.c (getQuitKeycode): Implement new function.

* src/androidterm.c (syms_of_androidterm)
<android_quit_keycode>: New variable.

(cherry picked from commit db8f7ed7f652c114e606de423e5094b4cefe49e2)

12 months agoFix gud-lldb-command-name
Gerd Möllmann [Fri, 26 Apr 2024 10:25:28 +0000 (12:25 +0200)]
Fix gud-lldb-command-name

* lisp/progmodes/gud.el (gud-gud-lldb-command-name): Change to
gud-lldb-command-name.
(lldb): Don't do stuff that is not needed for lldb.

(cherry picked from commit 763eaa5a324ff51dddad32d725ec8d416597d6d5)

12 months agoAlways update VC packages from a vc-dir buffer
Philip Kaludercic [Fri, 26 Apr 2024 06:21:37 +0000 (08:21 +0200)]
Always update VC packages from a vc-dir buffer

* lisp/emacs-lisp/package-vc.el (vc-dir-prepare-status-buffer):
Add a declaration.
(package-vc-upgrade): Prepare a dummy vc-dir buffer to ensure
that 'vc-pull' (or rather 'vc-deduce-fileset') can correctly
infer the VC backend to use.  (bug#70526)

(cherry picked from commit 758fe9b670e9d889f5dee541c492417af6af9f10)

12 months ago* lisp/tab-line.el: Fix tab-line-buffers in window-persistent-parameters.
Juri Linkov [Thu, 25 Apr 2024 17:39:56 +0000 (20:39 +0300)]
* lisp/tab-line.el: Fix tab-line-buffers in window-persistent-parameters.

Replace '(tab-line-buffers . writable)' with '(tab-line-buffers . t)'
in 'window-persistent-parameters' (bug#69993).

(cherry picked from commit 32ed3d26793753124d344901a6401eecd9225cd1)

12 months agoSuppress warnings for obsolete display-comint-buffer-action (bug#69983)
Juri Linkov [Thu, 25 Apr 2024 17:34:28 +0000 (20:34 +0300)]
Suppress warnings for obsolete display-comint-buffer-action (bug#69983)

* lisp/cmuscheme.el (run-scheme, switch-to-scheme):
* lisp/shell.el (shell):
* lisp/eshell/eshell.el (eshell):
* lisp/progmodes/inf-lisp.el (inferior-lisp):
* lisp/progmodes/sh-script.el (sh-show-shell):
* lisp/textmodes/tex-mode.el (tex-display-shell)
(tex-recenter-output-buffer): Add 'with-suppressed-warnings'
to suppress warnings for obsolete options
'display-comint-buffer-action' and 'display-tex-shell-buffer-action'.

(cherry picked from commit 598505c4faa7c37133223417172223356ea02e65)

12 months agoFix last change
Eli Zaretskii [Thu, 25 Apr 2024 15:59:25 +0000 (18:59 +0300)]
Fix last change

* test/lisp/progmodes/csharp-mode-tests.el
(csharp-ts-mode-test-indentation): Move the test to here.
* test/lisp/progmodes/csharp-ts-mode-tests.el: Remove file.
* test/lisp/progmodes/csharp-ts-mode-resources/indent.erts: Move
to test/lisp/progmodes/csharp-mode-resources/indent-ts.erts.

(cherry picked from commit d8687fd6cd807db1c76084a5e2bb214f9b6c9a49)

12 months agoFix indentation of if/else in 'csharp-ts-mode' (bug#70345)
Jacob Leeming [Mon, 22 Apr 2024 08:49:15 +0000 (09:49 +0100)]
Fix indentation of if/else in 'csharp-ts-mode' (bug#70345)

* lisp/progmodes/csharp-mode.el (csharp-ts-mode--indent-rules):
Fix indentation rules for 'if' and 'else'.

* test/lisp/progmodes/csharp-ts-mode-tests.el:
* test/lisp/progmodes/csharp-ts-mode-resources/indent.erts: New
test files.

Copyright-paperwork-exempt: yes
(cherry picked from commit 494dfd9cf2becdb33eefb1c0e6d8bc383cb8a2f0)

12 months ago; * etc/PROBLEMS: Document crashes due to tree-sitter ABI (bug#70438).
Eli Zaretskii [Thu, 25 Apr 2024 09:39:36 +0000 (12:39 +0300)]
; * etc/PROBLEMS: Document crashes due to tree-sitter ABI (bug#70438).

(cherry picked from commit 1cc6322e61275ad8b5056eb7dd43af6fe459aa0b)

12 months ago* build-aux/make-info-dir: Avoid bashism (bug#70484).
Ulrich Müller [Tue, 23 Apr 2024 05:37:17 +0000 (07:37 +0200)]
* build-aux/make-info-dir: Avoid bashism (bug#70484).

(cherry picked from commit 42766f95e5c0e7eb9e21db964ed93c7e093cc0b9)

12 months agoImprove documentation of selection and navigation in *xref* buffers
Eli Zaretskii [Tue, 23 Apr 2024 07:40:50 +0000 (10:40 +0300)]
Improve documentation of selection and navigation in *xref* buffers

* doc/emacs/maintaining.texi (Looking Up Identifiers): More
detailed description of 'xref-auto-jump-to-first-definition'.
Improve indexing.  Describe the use of 'next-error' and
'previous-error' in conjunction with the *xref* buffer.
(Identifier Search): More detailed description of
'xref-auto-jump-to-first-xref'.  Describe the use of 'next-error'
and 'previous-error'.

(cherry picked from commit 81476fa19e86f4d3a697909a87bec58a48e98d58)

12 months agoFix Widget manual typos, markup and omissions (bug#70502)
Stephen Berman [Mon, 22 Apr 2024 09:32:10 +0000 (11:32 +0200)]
Fix Widget manual typos, markup and omissions (bug#70502)

* doc/misc/widget.texi (Widgets and the Buffer): Correct typos and
texinfo markup, add equivalent key bindings and make minor changes
in wording.
(Customization): Correct names of two faces and add documentation
of remaining widget faces.

(cherry picked from commit 2a533514929f2ad241bf1c6a65bdbf796bae092c)

12 months ago; Document bookmark fringe mark in the user manual
Eli Zaretskii [Mon, 22 Apr 2024 07:37:18 +0000 (10:37 +0300)]
; Document bookmark fringe mark in the user manual

* doc/emacs/regs.texi (Bookmarks): Document
'bookmark-fringe-mark'.

(cherry picked from commit 90be3015b4dfe8068407dec996a48926b82d0ecb)

12 months agoFix python-ts-mode built-in functions and attributes (bug#70478)
Prateek Sharma [Fri, 19 Apr 2024 20:36:17 +0000 (02:06 +0530)]
Fix python-ts-mode built-in functions and attributes (bug#70478)

* lisp/progmodes/python.el (python--treesit-settings): Change the
treesitter query to fetch the correct type of node for built-in
functions and attributes and highlight them with corresponding
font-lock face.

(cherry picked from commit afd0b548fcc5e141528a442ff9100fe8e2b98f21)

12 months agoFix markup and indexing in the Calendar chapter of user manual
Eli Zaretskii [Sun, 21 Apr 2024 16:49:14 +0000 (19:49 +0300)]
Fix markup and indexing in the Calendar chapter of user manual

* doc/emacs/calendar.texi (Calendar Unit Motion)
(Scroll Calendar, Writing Calendar Files, Holidays)
(Sunrise/Sunset, Lunar Phases, Calendar Systems)
(To Other Calendar, Displaying the Diary, Date Formats)
(Adding to Diary, Special Diary Entries): Fix markup, style, and
indexing.

(cherry picked from commit dc720decc3a7f0cfaaaf4467c0c5d2954dec527c)

12 months agoFix the user manual for `calendar-time-zone-style'
Gautier Ponsinet [Sun, 21 Apr 2024 13:39:49 +0000 (15:39 +0200)]
Fix the user manual for `calendar-time-zone-style'

* doc/emacs/calendar.texi (Sunrise/Sunset): Refer to the
variable `calendar-time-zone-style' explicitly.  (Bug#70498)

(cherry picked from commit f593bf79a91f3744daa83c8974f7fd21f6b07c3c)

12 months agoAvoid assertion violations in 'push_prefix_prop'
Eli Zaretskii [Sun, 21 Apr 2024 13:06:34 +0000 (16:06 +0300)]
Avoid assertion violations in 'push_prefix_prop'

* src/xdisp.c (push_prefix_prop): Set the
'string_from_prefix_prop_p' flag for any valid value of the
'line-prefix' or 'wrap-prefix' property/variable.  (Bug#70495)

(cherry picked from commit aed2b7a3d82fd16789befe3c6e4c05e20ed0ae60)

12 months agoRemove ert-equal-including-properties from manual
Basil L. Contovounesios [Sat, 20 Apr 2024 14:01:49 +0000 (16:01 +0200)]
Remove ert-equal-including-properties from manual

* doc/misc/ert.texi (Useful Techniques): Mention only
equal-including-properties in place of the now obsolete
ert-equal-including-properties.

(cherry picked from commit c929532b4694a1c5d0f61ae77f4e8664706a36a1)

12 months ago; Document 'filtered-frame-list'
Eli Zaretskii [Sat, 20 Apr 2024 11:52:02 +0000 (14:52 +0300)]
; Document 'filtered-frame-list'

* doc/lispref/frames.texi (Finding All Frames): Document
'filtered-frame-list'.

(cherry picked from commit e3aae5fd385bd5512f614d2273a2d6d8e95a7ce6)

12 months agoChange cursor type when showing completion preview
Eshel Yaron [Sat, 27 Apr 2024 19:08:17 +0000 (21:08 +0200)]
Change cursor type when showing completion preview

* lisp/completion-preview.el (completion-preview-cursor-type):
New user option.
(completion-preview--window): New internal variable.
(completion-preview--window-selection-change): Bind it.
(completion-preview--original-cursor-type): New local var.
(completion-preview-active-mode, completion-preview--show): Set
'cursor-type' window parameter according to
'completion-preview-cursor-type', or reset it.
(completion-preview--post-command): Reset cursor type in
'completion-preview--window' if last command switched windows.

12 months agoNew window parameter 'cursor-type'
Eshel Yaron [Sat, 27 Apr 2024 18:47:34 +0000 (20:47 +0200)]
New window parameter 'cursor-type'

* src/xdisp.c (get_window_cursor_type): Consult new window
parameter 'cursor-type'.
* src/window.c (Fset_window_parameter): Mark window for
redisplay after 'cursor-type' parameter is set.
* doc/lispref/windows.texi (Window Parameters): Document it.
* doc/lispref/frames.texi (Cursor Parameters): Mention it.
* etc/NEWS: Announce it.  (Bug#70622)

12 months ago; Refine 'completion-preview-exact' face
Eshel Yaron [Sat, 27 Apr 2024 18:39:19 +0000 (20:39 +0200)]
; Refine 'completion-preview-exact' face

* lisp/completion-preview.el (completion-preview-exact): Use
more intense underline color to further distinguish this face
from 'completion-preview-common' and improve legibility with
dark background color.

12 months ago; * lisp/dired-aux.el (dired-diff): Fix TOCTOU, simplify.
Eshel Yaron [Sat, 27 Apr 2024 11:24:42 +0000 (13:24 +0200)]
; * lisp/dired-aux.el (dired-diff): Fix TOCTOU, simplify.

12 months agoRefine the Custom type of generated '*-modes' options
Eshel Yaron [Fri, 26 Apr 2024 09:43:29 +0000 (11:43 +0200)]
Refine the Custom type of generated '*-modes' options

* lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
Refine the Custom type of the '*-modes' option, generated when
this macro is given a ':predicate' argument.  (Bug#70589)

12 months agoFix 'mode-line-right-align-edge' with asymmetrical margins
Eli Zaretskii [Thu, 25 Apr 2024 16:34:42 +0000 (19:34 +0300)]
Fix 'mode-line-right-align-edge' with asymmetrical margins

* lisp/bindings.el (mode--line-format-right-align): Fix alignment
when window-margins are different on each side of the window.
Suggested by Charles Gonnaud <charles.gonnaud@gmail.com>.
(Bug#70485)

(cherry picked from commit 98649236f5eb1d89a60ebb9cc06c71f410f6b347)

12 months agoFix which-function error in 'lua-ts-mode' (bug#70515)
john muhl [Sun, 21 Apr 2024 02:19:27 +0000 (21:19 -0500)]
Fix which-function error in 'lua-ts-mode' (bug#70515)

* lisp/progmodes/lua-ts-mode.el (lua-ts-mode): Remove incorrect
usage of 'which-func-functions'.
* test/lisp/progmodes/lua-ts-mode-tests.el
(lua-ts-test-which-function): Add test.
* test/lisp/progmodes/lua-ts-mode-resources/which-function.lua:
New file.

(cherry picked from commit c493f28cc948ac4aef9c262345a608b3c7d413a4)

12 months agoBetter eval-when-compile example in manual
Mattias Engdegård [Thu, 25 Apr 2024 09:33:25 +0000 (11:33 +0200)]
Better eval-when-compile example in manual

* doc/lispref/compile.texi (Eval During Compile):
`regexp-opt` makes for a poor example because as a pure function it
doesn't need `eval-when-compile` for constant inputs.

(cherry picked from commit 88ebabe23a253ce040de94e6396bc4f587ba6e69)

12 months agoImprove custom button faces on monochrome displays
Po Lu [Thu, 25 Apr 2024 02:54:17 +0000 (10:54 +0800)]
Improve custom button faces on monochrome displays

* lisp/cus-edit.el (custom-button, custom-button-mouse)
(custom-button-pressed): Define raised boxes on monochrome
displays.

(cherry picked from commit 2c8e7ebe6947b1268986dc51b0c093a68a18ce55)

12 months agoNew commands 'minibuffer-first/last-completion'
Eshel Yaron [Thu, 25 Apr 2024 16:41:24 +0000 (18:41 +0200)]
New commands 'minibuffer-first/last-completion'

* lisp/minibuffer.el (minibuffer-completions-motion): New macro.
(minibuffer-next-completion): Use it.
(minibuffer-first-completion, minibuffer-last-completion): New commands.
(minibuffer-local-completion-map): Bind them.
(minibuffer-previous-completion, minibuffer-choose-completion): Doc fix.

12 months agoConsider empty cached completion input as no input at all
Eshel Yaron [Thu, 25 Apr 2024 16:15:03 +0000 (18:15 +0200)]
Consider empty cached completion input as no input at all

* lisp/minibuffer.el (minibuffer-restore-completion-input): When
the empty cached completion input is empty, report it as
non-existent.

12 months agoAvoid propertizing symbol names when dimming hyphens
Eshel Yaron [Thu, 25 Apr 2024 16:13:16 +0000 (18:13 +0200)]
Avoid propertizing symbol names when dimming hyphens

* lisp/simple.el (read-extended-command--affixation): Propertize
a copy of the command name instead of the original string.

12 months ago; Simplify 'minibuffer-previous/next-line-or-call'
Eshel Yaron [Thu, 25 Apr 2024 07:25:48 +0000 (09:25 +0200)]
; Simplify 'minibuffer-previous/next-line-or-call'

* lisp/simple.el (minibuffer-next-line-or-call)
(minibuffer-previous-line-or-call): Cease restoring column after
calling FUN, fixing cursor positioning in
'minibuffer-previous/next-line-or-completion'.

12 months agoDisable unsuitable XPM color selection mechanism on Android
Po Lu [Wed, 24 Apr 2024 08:33:33 +0000 (16:33 +0800)]
Disable unsuitable XPM color selection mechanism on Android

* src/image.c (xpm_load_image) [HAVE_ANDROID]: Always select
XPM_COLOR_KEY_C.

(cherry picked from commit 3776539152711ca364d94f0d4f8166d6f67eb413)

12 months agoFix tbreak for LLDB
Gerd Möllmann [Wed, 24 Apr 2024 07:33:50 +0000 (09:33 +0200)]
Fix tbreak for LLDB

* lisp/progmodes/gud.el (lldb): Use _regexp-tbreak command.

(cherry picked from commit 0e9cd1d7c6f64680c9e98a7c5c373a470088d4f9)

12 months agoFix handling of glyph codes in whitespace.el
Eli Zaretskii [Wed, 24 Apr 2024 07:02:22 +0000 (10:02 +0300)]
Fix handling of glyph codes in whitespace.el

* lisp/whitespace.el (whitespace-display-vector-p): Support glyph
codes, not just plain characters.  See
https://lists.gnu.org/archive/html/help-gnu-emacs/2024-04/msg00248.html
for the details.

(cherry picked from commit 3bf9a047427aab554ce228250a796fa327d9b353)

12 months ago; Remove comment in eglot-tests.el
Michael Albinus [Wed, 24 Apr 2024 06:28:20 +0000 (08:28 +0200)]
; Remove comment in eglot-tests.el

(cherry picked from commit 2df8bc468549523806270808ca6652de8ebc8824)

12 months agoMake c-ts-common-comment-indent-new-line work for rust doc comment
Yuan Fu [Wed, 24 Apr 2024 05:28:25 +0000 (22:28 -0700)]
Make c-ts-common-comment-indent-new-line work for rust doc comment

* lisp/progmodes/c-ts-common.el (c-ts-common-comment-indent-new-line):
Support //! comment directives.

(cherry picked from commit c8c319e0b024eb2441cda786c282a094a9cd30fb)

12 months agoMake c-ts-common--fill-paragraph work for rust line comment
Yuan Fu [Tue, 23 Apr 2024 23:28:20 +0000 (16:28 -0700)]
Make c-ts-common--fill-paragraph work for rust line comment

* lisp/progmodes/c-ts-common.el (c-ts-common--fill-paragraph): Back to
BOL before checking for //.

(cherry picked from commit 67ef1d54e7e3983bb03840cf8f2990d579942710)

12 months agoMore effectually prevent defun list wrapping in C-x C-w
Po Lu [Wed, 24 Apr 2024 03:45:31 +0000 (11:45 +0800)]
More effectually prevent defun list wrapping in C-x C-w

* lisp/vc/log-edit.el (log-edit-fill-entry): Match and replace
with NBSPs the opening defun list also.

* test/lisp/vc/log-edit-tests.el
(log-edit-fill-entry-no-defun-list-wrapping): New test.

(cherry picked from commit 145a77808ebd36fffb2e9c0376f821f09733d045)

12 months agoMiscellaneous fixes for Android port
Po Lu [Wed, 24 Apr 2024 03:42:48 +0000 (11:42 +0800)]
Miscellaneous fixes for Android port

* lisp/touch-screen.el (touch-screen-hold, touch-screen-drag):
Clear deactivate-mark if the mark is activated to prevent undue
deactivation after completion.

* lisp/wid-edit.el (widget-field, widget-single-line-field):
Insert specifications suitable for monochrome displays.

* src/androidfns.c (Fxw_display_color_p, Fx_display_grayscale_p):
Report color and/or grayscale properly.

* src/image.c (image_create_bitmap_from_file)
[HAVE_ANDROID]: If a file with no extension cannot be located,
append .xbm and retry.

(cherry picked from commit d3d1be8ae56efe29e4a721c5dd4e1fa973cf9d5a)

12 months ago; * lisp/progmodes/eglot.el (eglot-path-to-uri): Improve commentary.
Eli Zaretskii [Tue, 23 Apr 2024 18:28:09 +0000 (21:28 +0300)]
; * lisp/progmodes/eglot.el (eglot-path-to-uri): Improve commentary.

(cherry picked from commit d8d4fd8c6dbe11542432fccdc31701da9f686460)

12 months agoGnus: Add back end for Atom feeds (nnatom)
Daniel Semyonov [Wed, 21 Jun 2023 07:05:04 +0000 (10:05 +0300)]
Gnus: Add back end for Atom feeds (nnatom)

* lisp/gnus/gnus.el (gnus-valid-select-methods): Add entry for nnatom.
* lisp/gnus/nnfeed.el: New file implementing an abstract web feed back
end.
* lisp/gnus/nnatom.el: New file implementing a back end for Atom feeds.
* doc/misc/gnus.texi (Browsing the Web, Back End Interface):
* etc/NEWS (Gnus): Document nnatom and nnfeed.

(cherry picked from commit 1601c5a518dfa208af4827c56cf9570f3b90e15d)

12 months agoRevert skip on eglot-tests.el
Michael Albinus [Tue, 23 Apr 2024 15:08:06 +0000 (17:08 +0200)]
Revert skip on eglot-tests.el

* test/lisp/progmodes/eglot-tests.el (eglot-test-basic-symlink):
Comment out skip on EMBA.

(cherry picked from commit 94ed2df02fa1841095041c8c26ad243052638e22)

12 months agoEglot: robustify eglot-test-basic-symlink test (bug#70036)
João Távora [Tue, 23 Apr 2024 13:43:06 +0000 (08:43 -0500)]
Eglot: robustify eglot-test-basic-symlink test (bug#70036)

The previous version of this test was brittle, unstable and
didn't really fail when supposed to (because we need main.cpp to
not be visited when visiting mainlink.cpp).  This new version is
faster and more secure.

* test/lisp/progmodes/eglot-tests.el (eglot--sniffing): Add to the
jsonrpc-event-hook at the end.
(eglot-test-basic-symlink): Robustify test.

(cherry picked from commit 418cade2390e4d6cd7ead1122e62742282e7b2cd)

12 months agoEglot: fix bug#70408 yet another way
João Távora [Mon, 22 Apr 2024 15:37:38 +0000 (16:37 +0100)]
Eglot: fix bug#70408 yet another way

The previous fix based on comparing the Eglot-provided didOpen URI to
the server-provided textDocument/publishDiagnostics URI didn't quite
work because the URI differs slightly in escaping conventions on certain
platforms.

This elephant-size bug is easily reproducible on Windows with clangd,
where every file is basically diagnostic-free.

* lisp/progmodes/eglot.el (eglot-path-to-uri): Rework.
(eglot--TextDocumentIdentifier-cache):
Rename from eglot--TextDocumentIdentifier-uri.
(eglot-handle-notification textDocument/publishDiagnostics): Tweak.
(eglot--TextDocumentIdentifier): Rework.
(eglot--signal-textDocument/didOpen): Tweak.

(cherry picked from commit 3a4583baf679289857150ee8ecf20b61e59b9d37)

12 months agoRun admin/syncdoc-type-hierarchy.el
Andrea Corallo [Tue, 23 Apr 2024 13:39:28 +0000 (15:39 +0200)]
Run admin/syncdoc-type-hierarchy.el

* doc/lispref/elisp_type_hierarchy.jpg: Update.
* doc/lispref/elisp_type_hierarchy.txt: Likewise.

(cherry picked from commit 3a8d94dec136a067119ed0af2acc18664969dfbd)

12 months ago* Generate elisp_type_hierarchy.txt with top level types on top of it
Andrea Corallo [Tue, 23 Apr 2024 13:37:04 +0000 (15:37 +0200)]
* Generate elisp_type_hierarchy.txt with top level types on top of it

* admin/syncdoc-type-hierarchy.el (syncdoc-make-type-table): Prioratize
to level types.

(cherry picked from commit cb04549204d738603400d1fe14de7f5b59cc516f)

12 months ago* admin/syncdoc-type-hierarchy.el (org): Add missing require.
Andrea Corallo [Tue, 23 Apr 2024 13:35:44 +0000 (15:35 +0200)]
* admin/syncdoc-type-hierarchy.el (org): Add missing require.

(cherry picked from commit 05008290fbbcdcf1cb8b75a447b855f94d6e4a7e)

12 months ago; Exclude more modes in 'global-completion-preview-mode'
Eshel Yaron [Wed, 24 Apr 2024 17:27:15 +0000 (19:27 +0200)]
; Exclude more modes in 'global-completion-preview-mode'

Avoid activating Completion Preview mode in a few more major
modes when 'global-completion-preview-mode' is enabled.

* lisp/completion-preview.el (global-completion-preview-mode):
By default, exclude a few more major modes for which Completion
Preview mode isn't suitable.

12 months agoSupport remote trash-directory
Michael Albinus [Tue, 23 Apr 2024 11:54:09 +0000 (13:54 +0200)]
Support remote trash-directory

* doc/misc/tramp.texi (Frequently Asked Questions): Describe how
to manipulate trash-directory.
Explain tramp-inhibit-errors-if-setting-file-attributes-fail.

* lisp/files.el (move-file-to-trash): Use connection-local value
of `trash-directory'.  (Bug#70421)

(cherry picked from commit 956821672eb5306d4eeeae0dc07df4664cef230a)

12 months ago* test/lisp/progmodes/eglot-tests.el (eglot-test-basic-symlink): Skip on EMBA.
Michael Albinus [Tue, 23 Apr 2024 11:24:35 +0000 (13:24 +0200)]
* test/lisp/progmodes/eglot-tests.el (eglot-test-basic-symlink): Skip on EMBA.

(cherry picked from commit 0e139ca741a5a98abc199c9bce277d5d1f262bf3)

12 months agoSome EMBA integration fixes
Michael Albinus [Tue, 23 Apr 2024 11:24:09 +0000 (13:24 +0200)]
Some EMBA integration fixes

* test/infra/Dockerfile.emba (emacs-native-comp-speed2): Fix typo.

* test/infra/gitlab-ci.yml (.job-template): Add configure.log to
artifacts.

(cherry picked from commit 4a27b31c462d1cb015e28ddec8e0c43a3af0dc34)

12 months ago; Fix default Android tile mode
Po Lu [Tue, 23 Apr 2024 09:09:50 +0000 (17:09 +0800)]
; Fix default Android tile mode

* java/org/gnu/emacs/EmacsGC.java (markDirty): Use rather REPEAT
than MIRROR.

(cherry picked from commit cd56e85c08307915941d5ae03a02569a52a2889c)

12 months agoEnable configuring Emacs for "pseudo-grayscale" systems on Android
Po Lu [Tue, 23 Apr 2024 07:57:45 +0000 (15:57 +0800)]
Enable configuring Emacs for "pseudo-grayscale" systems on Android

* doc/emacs/android.texi (Android Windowing): Document how to
configure Emacs for monochrome displays.

* src/androidfns.c (Fx_display_visual_class): Return
Qstatic_gray when n_planes is smaller than 24.
(Fandroid_get_connection): Set n_planes by the value of
android_display_planes.
(syms_of_androidfns): <Qstatic_gray>: New function.

* src/androidterm.c (android_alloc_nearest_color): Allocate
monochrome colors similarly to the X server.
(android_query_colors): Fix typos.
(android_draw_fringe_bitmap): Create bitmaps of n_image_planes
depth.
(android_term_init): Initialize n_image_planes to 24.
(syms_of_androidterm) <android_display_planes>: New variable.

* src/androidterm.h (struct android_display_info): New field
`n_image_planes'.

* src/image.c (n_planes) [HAVE_ANDROID]: Define to
n_image_planes.

(cherry picked from commit cd7456e00d719d32c203c71b4e23c98b0c4e1967)

12 months agoFix dumping signal-handler data
Eli Zaretskii [Tue, 23 Apr 2024 07:02:39 +0000 (10:02 +0300)]
Fix dumping signal-handler data

* src/sysdep.c (init_signals): Don't install signal handlers while
dumping only with unexec, as pdumper doesn't dump static data of
signal handlers.  See
https://lists.gnu.org/archive/html/emacs-devel/2024-04/msg00539.html
for the details.

(cherry picked from commit d22c260cb7d43a27632750920f5238ed7947ae8d)

12 months agoImplement face stipples on Android
Po Lu [Tue, 23 Apr 2024 06:30:38 +0000 (14:30 +0800)]
Implement face stipples on Android

* .gitignore:

* java/Makefile.in: Fix typos.

* java/org/gnu/emacs/EmacsFillRectangle.java (perform): Call
blitOpaqueStipple if filling an unobscured rectangle with an
opaque stipple.

* java/org/gnu/emacs/EmacsGC.java (EmacsGC) <tileObject>: New
field.
(markDirty): Synchronize the current stipple with tileObject.
(prepareStipple, blitOpaqueStipple): New functions.

* java/org/gnu/emacs/EmacsService.java (EmacsService)
<resources>: New static field.
(onCreate): Set it.

* src/android.c (android_create_bitmap_from_data): Correct order
of arguments to android_create_pixmap_from_bitmap_data.
(HAS_BUILTIN_TRAP): Delete macro.
(emacs_abort): Always induce backtraces by means of a NULL
pointer deference.

* src/dispextern.h (Emacs_GC, Emacs_Rectangle, GCForeground)
(GCBackground, GCFillStyle, GCStipple, FillOpaqueStipple)
[HAVE_ANDROID]: Define to their Android counterparts rather
than simulating their existence.

* src/epaths.in: Set bitmap path to /assets/bitmaps on Android.

* src/image.c (image_bitmap_pixmap): Also enable when
HAVE_ANDROID.

* src/sfntfont-android.c (sfntfont_android_put_glyphs): Assert
that this is never called to draw a stippled background.
* src/xfaces.c (x_create_gc) [HAVE_ANDROID]: Redefine as
wrapper around android_create_gc.
(prepare_face_for_display) [HAVE_ANDROID]: Enable stipples.

(cherry picked from commit b9c191d690fd5d1480858469df23cc4509996fae)

12 months ago; Add some comments to c-ts-common-comment-indent-new-line
Yuan Fu [Tue, 23 Apr 2024 04:55:45 +0000 (21:55 -0700)]
; Add some comments to c-ts-common-comment-indent-new-line

* lisp/progmodes/c-ts-common.el:
(c-ts-common-comment-indent-new-line): Add comments.

(cherry picked from commit 6ae835c924124a743d4f9dc6255ff1a3bd09ba6f)

12 months agoCover more c-ts-common-comment-indent-new-line (bug#70520)
Vincenzo Pupillo [Mon, 22 Apr 2024 19:05:49 +0000 (21:05 +0200)]
Cover more c-ts-common-comment-indent-new-line (bug#70520)

* lisp/progmodes/c-ts-common.el:
(c-ts-common-comment-indent-new-line): Handles the case of comments in a
comment block that begin with whitespaces.

(cherry picked from commit 1f443c277a1215ab6353c47161819af155638110)

12 months agoFix two bugs in removing bookmark fringe marks
Karl Fogel [Mon, 22 Apr 2024 19:45:39 +0000 (14:45 -0500)]
Fix two bugs in removing bookmark fringe marks

This fixes bug#70019 and a separate fringe-mark removal bug that
also affected bookmarks in certain Info nodes.

* lisp/bookmark.el (bookmark--remove-fringe-mark): Fix bug#70019 by
temporarily widening in order to ensure we fetch the right overlays.
Also, normalize both filenames before comparing, to avoid spurious
failure to match.

Thanks to Dani Moncayo for the bug report and for testing.

(cherry picked from commit 63765a74f15ef22109750414ec3025c8a40039f0)

12 months agoRevert "* Fix missing `comp-files-queue' update (bug#63415)."
Eshel Yaron [Mon, 22 Apr 2024 19:10:24 +0000 (21:10 +0200)]
Revert "* Fix missing `comp-files-queue' update (bug#63415)."

This reverts commit 074a71cee60a962395fa674d2f3a9af0030df90b
(bad cherry-pick of 51848e4731f3e32e5d152990bf570b08ca544a92)

12 months agoBetter format string compilation warning
Mattias Engdegård [Mon, 22 Apr 2024 14:29:13 +0000 (16:29 +0200)]
Better format string compilation warning

* lisp/emacs-lisp/bytecomp.el (byte-compile-format-warn):
Speed up by eliminating the temporary buffer.
Detect invalid format sequences.  Use plurals properly.
* test/lisp/emacs-lisp/bytecomp-tests.el: Update test.

(cherry picked from commit e442161f11d11e5d4cac6bb1d5920a9ec36ad29f)

12 months agoEnsure that Gnus inline preview undisplayer removes added newline
F. Moukayed [Mon, 22 Apr 2024 14:54:47 +0000 (07:54 -0700)]
Ensure that Gnus inline preview undisplayer removes added newline

* lisp/gnus/mm-view.el (mm-inline-image): Remove two characters ("x\n")
instead of leaving behind a superfluous newline (bug#69920).

(cherry picked from commit a2e327cbca1e756373109d4788ea635250d23224)

12 months ago; Fix last commit
Michael Albinus [Mon, 22 Apr 2024 14:54:07 +0000 (16:54 +0200)]
; Fix last commit

* test/infra/Makefile.in:
* test/infra/gitlab-ci.yml:
* test/infra/test-jobs.yml: Do not quote make_params.

(cherry picked from commit 6f810459d892bbcb66ad715a5232656cbb99d364)

12 months agoRework EMBA integration
Michael Albinus [Mon, 22 Apr 2024 11:38:10 +0000 (13:38 +0200)]
Rework EMBA integration

* test/infra/Dockerfile.emba (emacs-inotify, emacs-filenotify-gio)
(emacs-eglot, emacs-tree-sitter, emacs-gnustep)
(emacs-native-comp-speed0, emacs-native-comp-speed1)
(emacs-native-comp-speed2): Use "-j `nproc`".
(emacs-eglot): Add libxml2-dev and node-typescript.
(emacs-tree-sitter) Add libxml2-dev and tree-sitter-rust.

* test/infra/Makefile.in (subdir_template): Simplify make_params.

* test/infra/gitlab-ci.yml (.job-template): Set environment
variable NPROC.  Use "-k -j \$NPROC".
(test-filenotify-gio, test-eglot, test-tree-sitter)
(test-native-comp-speed2): Simplify make_params.

* test/infra/test-jobs.yml: Regenerate.

(cherry picked from commit 42c8e2dfceb504533c6db3f336e28dd6c94aaa70)

12 months ago; * java/Makefile.in: Fix typos.
Po Lu [Mon, 22 Apr 2024 08:37:01 +0000 (16:37 +0800)]
; * java/Makefile.in: Fix typos.

(cherry picked from commit 931cd9331363051a8cb5ef45dc37937e63b243d9)

12 months agoGenerate Android shared library list automatically
Po Lu [Mon, 22 Apr 2024 08:27:30 +0000 (16:27 +0800)]
Generate Android shared library list automatically

* .gitignore: Ignore new generated files.

* cross/Makefile.in (src/Makefile): Remove leftover
specification of the source Gnulib directory.

* cross/ndk-build/ndk-build.mk.in (NDK_BUILD_READELF): New
variable.

* java/Makefile.in (CONFIG_FILE, ALL_DEPENDENCIES, READELF)
(cf-stamp-1, cf-stamp): New variables and rules; compute the set
of library files in the order of loading and generate a file
with this information.
(ALL_CLASS_FILES): New variable; if builddir is not srcdir,
$($(CONFIG_FILE), $(CLASS_FILES)): Depend on EmacsConfig.java.
add generated files in the build directory.
(classes.dex): Adjust to match.

* java/org/gnu/emacs/EmacsNative.java (EmacsNative)
<static initializer>: Load shared libraries from
EMACS_SHARED_LIBRARIES rather than a hard-coded list.

* m4/ndk-build.m4 (ndk_INIT): Search for readelf...
(ndk_CHECK_MODULES): ...and substitute its path as
NDK_BUILD_READELF.

(cherry picked from commit 3bcdf010a9f2576bac0d7f23af70fa9dff81ef95)

12 months agoCover more cases in c-ts-common-comment-indent-new-line
Yuan Fu [Mon, 22 Apr 2024 06:57:09 +0000 (23:57 -0700)]
Cover more cases in c-ts-common-comment-indent-new-line

* lisp/progmodes/c-ts-common.el:
(c-ts-common-comment-indent-new-line): Handle the case for ///, which
is used by rust.

(cherry picked from commit 4d9629b087fe6df941b553c6931b2f8996901e21)

12 months ago* lisp/progmodes/flymake.el: Small improvements for buffers display.
Juri Linkov [Mon, 22 Apr 2024 06:54:18 +0000 (09:54 +0300)]
* lisp/progmodes/flymake.el: Small improvements for buffers display.

(flymake-mode-map): Bind mouse-1 click on the fringe to
'flymake-show-buffer-diagnostics' (bug#70459).
(flymake-show-buffer-diagnostics): Display buffer diagnostics
at the bottom.
(flymake-show-project-diagnostics): Display project diagnostics
at the bottom.

(cherry picked from commit 419550c7907275bf962986e1cc8fba1989d8659c)

12 months ago* lisp/emacs-lisp/warnings.el (warning-display-at-bottom): New defcustom.
Juri Linkov [Mon, 22 Apr 2024 06:50:45 +0000 (09:50 +0300)]
* lisp/emacs-lisp/warnings.el (warning-display-at-bottom): New defcustom.

(display-warning): Use 'warning-display-at-bottom' to display
the warning buffer at the bottom of the screen and to scroll
to the last warning message (bug#69983).

(cherry picked from commit 086608876ad4e3aacdce7169206482cef0cb7129)

12 months ago* lisp/files.el (find-alternate-file): Fix the order of restoring buffer.
Juri Linkov [Mon, 22 Apr 2024 06:45:40 +0000 (09:45 +0300)]
* lisp/files.el (find-alternate-file): Fix the order of restoring buffer.

Swap the order of restoring original buffer's file names and
restoring original's buffer name with 'rename-buffer' (bug#68235).

(cherry picked from commit d51b0d2ebe4d0f55993e8e13f6d35b1eb23abf52)

12 months agoFix load order of certain Android shared libraries
Po Lu [Mon, 22 Apr 2024 05:31:57 +0000 (13:31 +0800)]
Fix load order of certain Android shared libraries

* java/org/gnu/emacs/EmacsNative.java (libraryDeps): Move
dependencies of selinux and gnutls before their respective
dependents.

(cherry picked from commit 7d6f4d90856000df805269fb620adb8bd3760717)

12 months agoAdd rust-ts-mode font-locking tests (bug#70464)
Noah Peart [Fri, 19 Apr 2024 17:27:10 +0000 (10:27 -0700)]
Add rust-ts-mode font-locking tests (bug#70464)

* test/lisp/progmodes/rust-ts-mode-tests.el: New file for rust-ts-mode
tests.
* test/lisp/progmodes/rust-ts-mode-resources/font-lock.rs: New file
with rust-ts-mode font-locking tests. New tests added for macro
font-locking (bug#70464) and function signatures
(bug#70465).

(cherry picked from commit ac2a4f61bdd0dc3a71a544d25de7cb36d37f44f9)