]> git.eshelyaron.com Git - emacs.git/log
emacs.git
23 months agoUpdate Android port
Po Lu [Wed, 8 Feb 2023 14:40:10 +0000 (22:40 +0800)]
Update Android port

* doc/lispref/frames.texi (On-Screen Keyboards): Describe return
value of `frame-toggle-on-screen-keyboard'.
* java/org/gnu/emacs/EmacsSurfaceView.java (surfaceChanged)
(surfaceCreated, EmacsSurfaceView): Remove unuseful
synchronization code.  The framework doesn't seem to look at
this at all.

* java/org/gnu/emacs/EmacsView.java (EmacsView):
(onLayout): Lay out the window after children.
(swapBuffers): Properly implement `force'.
(windowUpdated): Delete function.

* lisp/frame.el (frame-toggle-on-screen-keyboard): Return
whether or not the on screen keyboard might've been displayed.

* lisp/minibuffer.el (minibuffer-on-screen-keyboard-timer):
(minibuffer-on-screen-keyboard-displayed):
(minibuffer-setup-on-screen-keyboard):
(minibuffer-exit-on-screen-keyboard): Improve OSK dismissal when
there are consecutive minibuffers.

* lisp/touch-screen.el (touch-screen-window-selection-changed):
New function.
(touch-screen-handle-point-up): Register it as a window
selection changed function.

* src/android.c (struct android_emacs_window)
(android_init_emacs_window): Remove references to
`windowUpdated'.
(android_window_updated): Delete function.
* src/android.h (struct android_output): Remove
`last_configure_serial'.
* src/androidterm.c (handle_one_android_event)
(android_frame_up_to_date):
* src/androidterm.h (struct android_output): Remove frame
synchronization, as that does not work on Android.

23 months agoFix graphics state when instructing glyphs
Po Lu [Wed, 8 Feb 2023 12:03:19 +0000 (20:03 +0800)]
Fix graphics state when instructing glyphs

* src/sfntfont.c (sfntfont_get_glyph_outline): Take new argument
STATE and restore it prior to instructing the glyph.
(sfntfont_measure_instructed_pcm, sfntfont_measure_pcm)
(sfntfont_draw): Adjust accordingly.

23 months agoCorrectly round bearing values while computing pcm
Po Lu [Wed, 8 Feb 2023 09:04:42 +0000 (17:04 +0800)]
Correctly round bearing values while computing pcm

* src/sfntfont.c (sfntfont_measure_instructed_pcm)
(sfntfont_measure_pcm): Ceil rbearing value.

23 months agoImprove text display on Android port
Po Lu [Wed, 8 Feb 2023 08:34:29 +0000 (16:34 +0800)]
Improve text display on Android port

* src/sfnt.c (sfnt_build_glyph_outline): Clear
build_outline_context.
(sfnt_poly_coverage): Extend coverage map.
(sfnt_prepare_raster): Always floor coordinates, since the
increase in coverage makes this hack unnecessary.
(sfnt_build_outline_edges): Likewise.
(sfnt_compare_edges): Remove function.
(sfnt_edge_sort): New function.  Since edges are already
partially sorted, and there are not many, insertion sort
suffices.
(sfnt_poly_edges): Use sfnt_edge_sort.
(sfnt_fill_span): Stop rounding x0 and x1 to the grid, and make
coverage computation static.
(sfnt_lookup_glyph_metrics): Fix return code for unscaled
metrics.
(sfnt_scale_metrics): New function.
(SFNT_ENABLE_HINTING): Remove define.
(struct sfnt_cvt_table, struct sfnt_fpgm_table)
(struct sfnt_prep_table): Move to sfnt.h.
(sfnt_read_cvt_table):
(sfnt_read_fpgm_table, sfnt_read_prep_table): Make TEST_STATIC.
(struct sfnt_unit_vector, struct sfnt_interpreter_definition)
(struct sfnt_interpreter_zone, struct sfnt_graphics_state):
(struct sfnt_interpreter): Move to sfnt.h.
(sfnt_make_interpreter): Make TEST_STATIC.
(POP, PUSH, DELTAP1, DELTAP2, DELTAP3): When TEST, define to
regular push and pop.
(sfnt_deltac):
(sfnt_deltap): Fix order of arguments.
(IUP_SINGLE_PAIR): Fix interpolation loop wraparound.
(sfnt_interpret_font_program):
(sfnt_interpret_control_value_program): Make TEST_STATIC.
(struct sfnt_instructed_outline): Move to sfnt.h.
(sfnt_build_instructed_outline): Make TEST_STATIC.
(sfnt_interpret_simple_glyph):
(sfnt_x_raster):
(sfnt_test_raster):
(all_tests):
(sfnt_verbose):
(main): Improve test code.

* src/sfnt.h (SFNT_ENABLE_HINTING, struct sfnt_cvt_table)
(struct sfnt_fpgm_table, struct sfnt_prep_table)
(struct sfnt_unit_vector, struct sfnt_interpreter_definition)
(struct sfnt_interpreter_zone, struct sfnt_graphics_state)
(struct sfnt_interpreter, struct sfnt_instructed_outline)
(PROTOTYPE): New definitions.
* src/sfntfont-android.c (sfntfont_android_put_glyphs): Make
coordinate generation more straightforward.
* src/sfntfont.c (sfntfont_get_glyph_outline): New arguments
INTERPRETER and METRICS.
(struct sfnt_font_info): New tables.
(sfntfont_setup_interpreter): New function.
(sfntfont_open): Avoid memory leak.  Set up interpreter.
(sfntfont_measure_instructed_pcm): New function.
(sfntfont_measure_pcm): Delegate to measure_instructed_pcm where
appropriate.
(sfntfont_close): Free new tables.
(sfntfont_draw): Scale metrics properly.

23 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Tue, 7 Feb 2023 15:06:46 +0000 (23:06 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

23 months agoRemove junk from instruction table
Po Lu [Tue, 7 Feb 2023 15:03:46 +0000 (23:03 +0800)]
Remove junk from instruction table

* src/sfnt.c (sfnt_name_instruction): Do so.

23 months agoRemove bresenham stuff
Po Lu [Tue, 7 Feb 2023 15:03:08 +0000 (23:03 +0800)]
Remove bresenham stuff

* src/sfnt.c (sfnt_step_edge, sfnt_step_edge_n)
(sfnt_build_outline_edges, sfnt_test_edge, main):
* src/sfnt.h (struct sfnt_edge): Stop using error corrected line
drawing, as it's actually slower.

23 months agoUpdate Android port
Po Lu [Tue, 7 Feb 2023 14:25:54 +0000 (22:25 +0800)]
Update Android port

* INSTALL.android: Describe patches for BoringSSL on ARM.

* src/sfnt.c (sfnt_build_glyph_outline): Remove redundant
multiplication.
(sfnt_prepare_raster): Update offset calculation for changes.
(sfnt_step_edge, sfnt_step_edge_n): Handle bresenham terms.
(sfnt_build_outline_edges): Don't subtract floored xmin, just
xmin.
(sfnt_saturate_short): Make clang generate better code.
(sfnt_fill_span): Stop rounding coordinates.
(sfnt_poly_span): Poly consecutive on transitions all in one go.
(sfnt_lookup_glyph_metrics): Remove redundant multiplication.
(struct sfnt_interpreter): New hooks for debugging.
(sfnt_large_integer_add): New function.
(sfnt_mul_f26dot6_fixed): Round product.
(sfnt_make_interpreter): Remove redundant multiplication.

(CHECK_STACK_ELEMENTS, POP_UNCHECKED, PUSH_UNCHECKED): New
macros.
(MOVE, POP, SWAP, CINDEX, RS, RCVT, LT, LTEQ, GT, GTEQ, EQ, NEQ)
(EVEN, AND, OR, NOT, ADD, SUB, DIV, MUL, ABS, NEG, FLOOR, CEILING)
(GETINFO, ROLL, _MAX, _MIN, ROUND, NROUND, GC, MD): Don't check
SP redundantly, especially when pushing an element right after
popping one.
(sfnt_move_glyph_zone): Don't touch points by passing NULL as
flags.
(sfnt_direct_move_zp2): Touch P in the directions of the
movement.
(sfnt_interpret_scfs): Fix coding style.
(sfnt_interpret_simple_glyph): Don't round Y coordinates.
(sfnt_test_span, sfnt_test_edges, sfnt_debug_edges, sfnt_test_edge)
(sfnt_x_raster, sfnt_test_raster, rcvt_test_args)
(deltac1_test_args, deltac2_test_args, deltac3_test_args)
(roll_1_test_args, sfnt_run_hook, sfnt_identify_instruction)
(sfnt_verbose, main): Improve debug code and tests.

* src/sfnt.h (struct sfnt_edge): Add bresenham terms.

23 months agoImprove Tramp file name completion
Michael Albinus [Mon, 6 Feb 2023 17:13:22 +0000 (18:13 +0100)]
Improve Tramp file name completion

This fixes Bug#51386, Bug#52758, Bug#53513, Bug#54042 and Bug#60505.

* doc/misc/tramp.texi (File name completion): Remove completion
styles restrictions.

* lisp/minibuffer.el (completion-styles): Fix docstring.

* lisp/net/tramp.el (tramp-methods) <->: Add.
(tramp-completion-file-name-handler-alist):
Add `expand-file-name', `file-exists-p', `file-name-directory' and
`file-name-nondirectory'.
(tramp-dissect-file-name): Do not extra check for
`tramp-default-method-marker'.
(tramp-completion-handle-expand-file-name)
(tramp-completion-handle-file-exists-p)
(tramp-completion-handle-file-name-directory)
(tramp-completion-handle-file-name-nondirectory): New defuns.
(tramp-completion-handle-file-name-all-completions): Remove duplicates.

* test/lisp/net/tramp-tests.el
(tramp-test26-interactive-file-name-completion): New test.

23 months agoFix 'hack-local-variables' when EOL conversion is inhibited
Eli Zaretskii [Mon, 6 Feb 2023 16:28:21 +0000 (18:28 +0200)]
Fix 'hack-local-variables' when EOL conversion is inhibited

* lisp/files.el (hack-local-variables--find-variables): Replace
CRs with newlines only if the original buffer is under explicit
selective-display.  (Bug#61321)

23 months agoPort emacsclient wrapper to Android 7.1 and earlier
Po Lu [Mon, 6 Feb 2023 14:55:42 +0000 (22:55 +0800)]
Port emacsclient wrapper to Android 7.1 and earlier

* java/org/gnu/emacs/EmacsNative.java (EmacsNative): Load every
native library on which Emacs depends prior to loading libemacs
itself.

* java/org/gnu/emacs/EmacsOpenActivity.java (readEmacsClientLog)
(EmacsOpenActivity, startEmacsClient): Don't use redirectError
on Android 7.1 and earlier.

23 months agoAdjust ndk-build implementation for old NDK versions
Po Lu [Mon, 6 Feb 2023 14:26:45 +0000 (22:26 +0800)]
Adjust ndk-build implementation for old NDK versions

* configure.ac: Pass ANDROID_CFLAGS to ndk_INIT.
* cross/ndk-build/Makefile.in (NDK_BUILD_CFLAGS):
* cross/ndk-build/ndk-build-shared-library.mk
($(call objname,$(LOCAL_MODULE),$(basename $(1)))):
($$(error Unsupported suffix):
* cross/ndk-build/ndk-build-static-library.mk
($(call objname,$(LOCAL_MODULE),$(basename $(1)))):
($$(error Unsupported suffix): Use NDK_BUILD_CFLAGS.
* m4/ndk-build.m4 (ndk_INIT): Accept cflags.
(ndk_CONFIG_FILES): Export NDK_BUILD_CFLAGS.

23 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Mon, 6 Feb 2023 14:03:40 +0000 (22:03 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

23 months agoUpdate Android port
Po Lu [Mon, 6 Feb 2023 14:00:08 +0000 (22:00 +0800)]
Update Android port

* java/AndroidManifest.xml.in: Prevent the Emacs activity from
being overlayed by the emacsclient wrapper.
* java/org/gnu/emacs/EmacsOpenActivity.java (run): Likewise.
(onCreate): Set an appropriate theme on ICS and up.

* java/org/gnu/emacs/EmacsWindow.java (onTouchEvent): Handle
ACTION_CANCEL correctly.

23 months agoUpdate Android port
Po Lu [Mon, 6 Feb 2023 13:19:04 +0000 (21:19 +0800)]
Update Android port

* src/sfnt.c (struct sfnt_build_glyph_outline_context)
(sfnt_build_glyph_outline, sfnt_fill_span): Improve glyph
appearance by rounding coordinate values.

(struct sfnt_interpreter): New fields `twilight_original_x',
`twilight_original_y'.
(sfnt_make_interpreter): Set new fields.
(DELTAP1, DELTAP2, DELTAP3, SVTCAy, SPVTL, SFVTL, MD): Implement
instructions.
(sfnt_save_projection_vector): New argument `dual_only'.  All
callers changed.
(sfnt_address_zp2, sfnt_address_zp1, sfnt_address_zp0): Obtain
original positions in the twilight zone as well.
(sfnt_check_zp1, sfnt_interpret_fliprgoff, sfnt_interpret_fliprgon)
(sfnt_interpret_flippt, sfnt_interpret_scfs, sfnt_interpret_miap)
(sfnt_interpret_alignrp, sfnt_line_to_vector, P)
(sfnt_interpret_msirp, sfnt_interpret_ip, sfnt_interpret_call)
(load_point, sfnt_interpret_iup_1, sfnt_interpret_iup)
(sfnt_interpret_run, struct sfnt_scaled_outline)
(struct sfnt_instructed_outline, sfnt_decompose_instructed_outline)
(sfnt_build_instructed_outline, sfnt_compute_phantom_points)
(sfnt_interpret_simple_glyph, all_tests, sfnt_setup_debugger)
(sfnt_name_instruction, sfnt_draw_debugger, sfnt_run_hook)
(sfnt_verbose, main): Make glyph instructing work.

* src/sfnt.h (SFNT_POLY_ROUND): New enumerator.

23 months agoCC Mode: Prevent infinite recursion in c-determine-limit.
Alan Mackenzie [Sun, 5 Feb 2023 18:01:09 +0000 (18:01 +0000)]
CC Mode: Prevent infinite recursion in c-determine-limit.

This was happening particularly with long-lines, possibly because the position
was inside a literal when calling c-determine-limit.

* lisp/progmodes/cc-engine.el (c-determine-limit): Guard a recursive call by
checking (- base try-size).

23 months agoFix misleading LAP optimiser debug log message
Mattias Engdegård [Sun, 5 Feb 2023 11:27:32 +0000 (12:27 +0100)]
Fix misleading LAP optimiser debug log message

* lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode):
Correct message in a conditional jump threading rule.

23 months agoAllow unbind to commute with discardN and discardN-preserve-tos
Mattias Engdegård [Sun, 5 Feb 2023 11:14:23 +0000 (12:14 +0100)]
Allow unbind to commute with discardN and discardN-preserve-tos

* lisp/emacs-lisp/byte-opt.el (byte-after-unbind-ops):
Add discardN and discardN-preserve-tos, both of which
commute with unbind.  This enables subsequent optimisations.

23 months agoRemove compatibility hacks in LAP optimiser
Mattias Engdegård [Sun, 5 Feb 2023 10:56:06 +0000 (11:56 +0100)]
Remove compatibility hacks in LAP optimiser

* lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode):
Remove code forcing forward motion after applying certain
transformations; these were only there to keep output identical across
refactorings.

23 months agoLAP optimiser: bind local variables instead of mutating them
Mattias Engdegård [Sun, 5 Feb 2023 10:18:26 +0000 (11:18 +0100)]
LAP optimiser: bind local variables instead of mutating them

This is a refactoring step: there is no change in how the optimiser
works.

* lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode):
Instead of re-using local variables through mutation, bind them at
point of use.  This ensures that there is no value leakage by mistake
and actually reduces the static size of the bytecode of this function
somewhat.
The lousy variable names (tmp, tmp2 etc) are retained but
can at least now be changed into something more descriptive.

23 months agoGet rid of delq in LAP optimiser
Mattias Engdegård [Sat, 4 Feb 2023 17:58:48 +0000 (18:58 +0100)]
Get rid of delq in LAP optimiser

* lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode):
Instead of using the O(n) `delq' to remove single instructions, use
the O(1) `setcdr'. To do this, anchor the instruction list in a cons
cell and use the predecessor cell in iteration.

23 months agoUpdate Android port
Po Lu [Sun, 5 Feb 2023 15:02:14 +0000 (23:02 +0800)]
Update Android port

* INSTALL.android: Explain how to build selinux.
* configure.ac: Enable selinux on Android.
* cross/ndk-build/ndk-build-shared-library.mk: ($(call
objname,$(LOCAL_MODULE),$(basename $(1))))::($$(error
Unsupported suffix)::(NDK_CFLAGS_$(LOCAL_MODULE)):
* cross/ndk-build/ndk-build-static-library.mk: ($(call
objname,$(LOCAL_MODULE),$(basename $(1))))::($$(error
Unsupported suffix)::(NDK_CFLAGS_$(LOCAL_MODULE)): Correctly
handle files with a .cc suffix, and clang-specific asflags.
* cross/ndk-build/ndk-clear-vars.mk: Handle AOSP extensions
LOCAL_ADDITIONAL_DEPENDENCIES,
LOCAL_CLANG_ASFLAGS_$(NDK_BUILD_ARCH) and LOCAL_IS_HOST_MODULE.

* doc/emacs/android.texi (Android Startup): Explain emacsclient
wrapper.

* java/org/gnu/emacs/EmacsView.java (EmacsView): New flag
`isCurrentlyTextEditor'.
(showOnScreenKeyboard, hideOnScreenKeyboard): Set as
appropriate.
(onCheckIsTextEditor): Return its value.

* lisp/touch-screen.el (touch-screen-handle-scroll): Don't ding
at buffer limits.
* m4/ndk-build.m4: Improve doc.

* src/Makefile.in (LIBSELINUX_CFLAGS): New variable.
(EMACS_CFLAGS): Add it.

23 months ago* lisp/emacs-lisp/cconv.el (cconv-convert): Fix thinko
Stefan Monnier [Sun, 5 Feb 2023 14:04:51 +0000 (09:04 -0500)]
* lisp/emacs-lisp/cconv.el (cconv-convert): Fix thinko

23 months agoUpdate from gnulib
Po Lu [Sun, 5 Feb 2023 13:06:11 +0000 (21:06 +0800)]
Update from gnulib

* admin/merge-gnulib (avoided_flags):
* cross/lib/cdefs.h (__bos):
(__glibc_unsigned_or_positive):
(__glibc_unsafe_len):
(__glibc_fortify):
(__glibc_fortify_n):
* cross/lib/isnan.c:
* cross/lib/libc-config.h:
* cross/lib/openat-proc.c (openat_proc_name):
* cross/lib/vasnprintf.c (VASNPRINTF):
* cross/lib/verify.h (_Static_assert):
(_GL_SA3):
* lib/gnulib.mk.in (HAVE_GRANTPT):
(HAVE_SPAWN_H):
(NEXT_AS_FIRST_DIRECTIVE_LIMITS_H):
(NEXT_LIMITS_H):
(REPLACE_GETSUBOPT):
(REPLACE_ILOGB):
(SYSTEM_TYPE):
(BUILT_SOURCES):
* lib/isnan.c:
* lib/vasnprintf.c (VASNPRINTF):
* lib/verify.h (_GL_SA3):
* m4/gnulib-common.m4 (gl_COMMON_BODY):
* m4/gnulib-comp.m4 (gl_INIT): Update from gnulib.

23 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Sun, 5 Feb 2023 12:55:21 +0000 (20:55 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

23 months agoUpdate Android port
Po Lu [Sun, 5 Feb 2023 12:49:19 +0000 (20:49 +0800)]
Update Android port

* src/sfnt.c (struct sfnt_graphics_state):
(LOOPCALL):
(DELTAC3):
(PROJECT):
(SHPIX):
(sfnt_save_projection_vector):
(sfnt_check_zp0):
(sfnt_dual_project_vector):
(sfnt_interpret_scfs):
(sfnt_round_symmetric):
(sfnt_interpret_miap):
(sfnt_interpret_alignrp_1):
(sfnt_interpret_alignrp):
(sfnt_measure_distance):
(sfnt_interpret_msirp):
(sfnt_interpret_ip):
(sfnt_interpret_mdap):
(sfnt_deltap):
(sfnt_dual_project_onto_any_vector):
(sfnt_validate_gs):
(sfnt_set_projection_vector):
(sfnt_interpret_shp):
(sfnt_interpret_run):
(sfnt_check_sloop):
(main): Check in more WIP font code.

23 months agoUpdate some commentary for C23
Paul Eggert [Sat, 4 Feb 2023 23:53:40 +0000 (15:53 -0800)]
Update some commentary for C23

23 months agoUse Gnulib module alignasof instead of stdalign
Paul Eggert [Sat, 4 Feb 2023 22:55:12 +0000 (14:55 -0800)]
Use Gnulib module alignasof instead of stdalign

* admin/merge-gnulib (GNULIB_MODULES):
Replace obsolescent Gnulib module stdalign with alignasof.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lib/stdalign.in.h: Remove; no longer needed.

23 months agoUpdate from Gnulib by running admin/merge-gnulib
Paul Eggert [Sat, 4 Feb 2023 22:45:11 +0000 (14:45 -0800)]
Update from Gnulib by running admin/merge-gnulib

23 months agoPrefer https: to git: URIs
Paul Eggert [Sat, 4 Feb 2023 22:24:37 +0000 (14:24 -0800)]
Prefer https: to git: URIs

Prefer https: to git: URIs on Savannah.
The idea is to avoid some adversary-in-the-middle attacks
on developers.

23 months agonadvice: Fix bug#61179
Stefan Monnier [Sat, 4 Feb 2023 16:23:31 +0000 (11:23 -0500)]
nadvice: Fix bug#61179

Advising interactive forms relies on the ability to distinguish
interactive forms that do nothing else than return a function.
So, be careful to preserve this info.
Furthermore, interactive forms are expected to be evaluated in
the lexical context captured by the closure to which they belong,
so be careful to preserve that context when manipulating those forms.

* lisp/emacs-lisp/cconv.el (cconv-convert, cconv-analyze-form) <lambda>:
Preserve the info that an interactive form does nothing else than
return a function.

* lisp/emacs-lisp/nadvice.el (advice--interactive-form-1): New function.
(advice--interactive-form): Use it.
(advice--make-interactive-form): Refine to also accept function values
quoted with `quote`.  Remove obsolete TODO.

* test/lisp/emacs-lisp/nadvice-tests.el: Don't disallow byte-compilation.
(advice-test-bug61179): New test.

* lisp/emacs-lisp/oclosure.el (cconv--interactive-helper): Allow
the `if` arg to be a form.
* lisp/simple.el (oclosure-interactive-form): Adjust accordingly.

23 months agoAdd emacsclient desktop file equivalent on Android
Po Lu [Sat, 4 Feb 2023 15:32:07 +0000 (23:32 +0800)]
Add emacsclient desktop file equivalent on Android

* doc/emacs/android.texi (Android File System):
* java/AndroidManifest.xml.in: Update with new activity.  Remove
Android 10 restrictions through a special flag.

* java/org/gnu/emacs/EmacsNative.java (getProcName): New
function.
* java/org/gnu/emacs/EmacsOpenActivity.java (EmacsOpenActivity):
New file.
* java/org/gnu/emacs/EmacsService.java (getLibraryDirection):
Remove unused annotation.
* lib-src/emacsclient.c (decode_options): Set alt_display on
Android.
* src/android.c (android_proc_name): New function.
(NATIVE_NAME): Export via JNI.

23 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Sat, 4 Feb 2023 11:50:00 +0000 (19:50 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

23 months agoAdd additional permissions to Android port
Po Lu [Sat, 4 Feb 2023 11:49:51 +0000 (19:49 +0800)]
Add additional permissions to Android port

* doc/emacs/android.texi (Android Environment):
* java/AndroidManifest.xml.in: Add network state permissions.

23 months agoUpdate Android port
Po Lu [Sat, 4 Feb 2023 11:47:54 +0000 (19:47 +0800)]
Update Android port

* src/sfnt.c (sfnt_multiply_divide_signed):
(struct sfnt_interpreter_zone):
(struct sfnt_graphics_state):
(struct sfnt_interpreter):
(sfnt_mul_f2dot14):
(sfnt_interpret_trap):
(WCVTF):
(ALIGNPTS):
(sfnt_scale_by_freedom_vector):
(sfnt_interpret_utp):
(sfnt_address_zp2):
(sfnt_address_zp1):
(sfnt_address_zp0):
(sfnt_check_zp2):
(sfnt_move_zp0):
(sfnt_move_zp1):
(sfnt_move_glyph_zone):
(sfnt_move_twilight_zone):
(sfnt_direct_move_zp2):
(sfnt_interpret_alignpts):
(sfnt_interpret_isect):
(sfnt_line_to_vector):
(sfnt_deltac):
(sfnt_interpret_mdap):
(sfnt_interpret_call):
(sfnt_dot_fix_14):
(sfnt_move_x):
(sfnt_move_y):
(sfnt_move):
(sfnt_validate_gs):
(sfnt_interpret_shz):
(sfnt_interpret_shc):
(sfnt_interpret_shp):
(sfnt_interpret_iup_1):
(sfnt_interpret_iup):
(sfnt_interpret_run):
(sfnt_interpret_font_program):
(sfnt_interpret_control_value_program):
(sfnt_interpret_simple_glyph):
(jrot_test_args):
(jrof_test_args):
(all_tests):
(main): Check in more WIP code.

23 months agoAdd test for java indentation (bug#61115)
Theodor Thornhill [Fri, 3 Feb 2023 08:09:49 +0000 (09:09 +0100)]
Add test for java indentation (bug#61115)

* test/lisp/progmodes/java-ts-mode-resources/indent.erts: Add new test
case.

23 months agoCC Mode: Fontify a certain foo * bar class by the asymmetric space heuristic
Alan Mackenzie [Fri, 3 Feb 2023 20:55:59 +0000 (20:55 +0000)]
CC Mode: Fontify a certain foo * bar class by the asymmetric space heuristic

This fixes bug #61144.  If the space around the * is "symmetric" we leave foo
* bar unfontified, a multiplication operation.  If it is "asymmetric" we
fontify it as a pointer declaration.

* lisp/progmodes/cc-engine.el (c-fdoc-assymetric-space-about-asterisk): New
macro, extracted from c-forward-decl-or-cast-1.
(c-forward-decl-or-cast-1): Invoke the new macro twice, in CASE 16 (new) and
CASE 17.5 (the source of the macro).  In CASE 16, additionally set
unsafe-maybe when appropriate.

23 months agoMerge from origin/emacs-29
Stefan Kangas [Fri, 3 Feb 2023 05:30:24 +0000 (06:30 +0100)]
Merge from origin/emacs-29

96ea27278b4 ; Fix c-ts-mode indent test
d963a8f1355 Make c-ts-mode indent tests side-effect-free
8a6bdf88b4b Call treesit_record_change in insert_from_gap_1
a2b77c79dcc Use c-ts-common-statement-offset for closing brackets too
74e715cb729 ; Go back to original point when filling comments in c-ts...
b8009bbf2d8 ; Fix error where we pass t to treesit-node-type in c-ts-...
88ccf78b206 ; * src/treesit.c (treesit_predicate_match): Simplify las...
20454128b8b Minor improvements in sqlite.c
3b3c47d977b (treesit_predicate_match): Match node text against regexp...
e8334781c9f Improve documentation of gdb-mi's dedicated windows
c4988840598 Avoid spurious pause in kill-ring-save (Bug#60841)
382ab516cef Change the default of 'treesit-defun-tactic' for 'c-ts-mode'
4d3428e95a9 Fix docstring fontification of CL's 'defstruct'
1c125baa3f0 Teach 'hs-minor-mode' about tree-sitter based modes
2de0ab5cbd3 ; Doc fixes in keymap.el
c6660a6d6de Improve documentation of 'repeat-mode' and related variables
be304bb3286 ; * etc/NEWS: Mention the 'utf-8-auto' bugfix (bug#60750).

# Conflicts:
# etc/NEWS

23 months ago; Fix c-ts-mode indent test
Yuan Fu [Fri, 3 Feb 2023 02:30:11 +0000 (18:30 -0800)]
; Fix c-ts-mode indent test

* test/lisp/progmodes/c-ts-mode-resources/indent.erts: Move the linux
style test case down.

23 months agoMake c-ts-mode indent tests side-effect-free
Yuan Fu [Fri, 3 Feb 2023 02:23:21 +0000 (18:23 -0800)]
Make c-ts-mode indent tests side-effect-free

Running indent tests changes the global value of
c-ts-mode-indent-style.  That's not good.  This change fixes that.

I also refactored the indent style functions a bit.

* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--prompt-for-style): New function.
(c-ts-mode-set-local-style): New function.
(c-ts-mode-set-style): Use c-ts-mode--prompt-for-style.  Use
derived-mode-p when testing for major mode.  Remove check of current
buffer's major mode since it doesn't matter.

* test/lisp/progmodes/c-ts-mode-resources/indent-bsd.erts:
* test/lisp/progmodes/c-ts-mode-resources/indent.erts: Use
c-ts-mode-set-local-style to set the indent style locally.

23 months agoCall treesit_record_change in insert_from_gap_1
Yuan Fu [Fri, 3 Feb 2023 01:22:22 +0000 (17:22 -0800)]
Call treesit_record_change in insert_from_gap_1

Before this change, insert_from_gap calls treesit_record_change but
insert_from_gap_1 doesn't.  However, insert_from_gap_1 is a public
function and is called in many other places outside of insdel.c.  This
could lead to tree-sitter's parse tree becoming out-of-sync with the
buffer content.

This change might fix bug#60650.

* src/insdel.c (insert_from_gap_1): Call treesit_record_change.
(insert_from_gap): Remove call to treesit_record_change.

* admin/notes/tree-sitter/treesit_record_change: New file.

23 months agoUse c-ts-common-statement-offset for closing brackets too
Yuan Fu [Thu, 2 Feb 2023 22:57:41 +0000 (14:57 -0800)]
Use c-ts-common-statement-offset for closing brackets too

Merge c-ts-mode--close-bracket-offset into
c-ts-common-statement-offset.

* lisp/progmodes/c-ts-common.el:
(c-ts-common-statement-offset): Handle closing brackets too.
(c-ts-mode--close-bracket-offset): Remove function.
* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): Use
c-ts-common-statement-offset for closing brackets.

23 months ago; Go back to original point when filling comments in c-ts-mode
Yuan Fu [Thu, 2 Feb 2023 22:48:22 +0000 (14:48 -0800)]
; Go back to original point when filling comments in c-ts-mode

* lisp/progmodes/c-ts-common.el:
(c-ts-common--fill-block-comment): Go to original point.

23 months ago; Fix error where we pass t to treesit-node-type in c-ts-common.el
Yuan Fu [Thu, 2 Feb 2023 22:42:42 +0000 (14:42 -0800)]
; Fix error where we pass t to treesit-node-type in c-ts-common.el

* lisp/progmodes/c-ts-common.el:
(c-ts-common-statement-offset): Move the form that sets node to t
down, also add a check for node’s nullness.

23 months ago; * src/treesit.c (treesit_predicate_match): Simplify last change.
Eli Zaretskii [Thu, 2 Feb 2023 19:54:15 +0000 (21:54 +0200)]
; * src/treesit.c (treesit_predicate_match): Simplify last change.

23 months agoMinor improvements in sqlite.c
Eli Zaretskii [Thu, 2 Feb 2023 19:45:44 +0000 (21:45 +0200)]
Minor improvements in sqlite.c

* src/sqlite.c (Fsqlite_next): Doc fix.  Return nil if SQLITE_DONE
was once seen for this statement.  (Bug#61151)
(row_to_value): Cons the value in reverse, to avoid the Fnreverse
call.  Patch by Helmut Eller <eller.helmut@gmail.com>.
(Bug#61165)

23 months ago(treesit_predicate_match): Match node text against regexp without consing
Dmitry Gutov [Thu, 2 Feb 2023 11:32:41 +0000 (13:32 +0200)]
(treesit_predicate_match): Match node text against regexp without consing

* src/treesit.c (treesit_predicate_match): Match node text against
regexp without creating a new string object (bug#60953).

* src/search.c (search_buffer): Make not static.
Delete declaration near the beginning of the file.

* src/lisp.h: Declare it here.

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--builtin-method-p):
Remove function.
(ruby-ts--font-lock-settings): Use the regexp with :match directly.

23 months agoImprove documentation of gdb-mi's dedicated windows
Eli Zaretskii [Thu, 2 Feb 2023 18:49:15 +0000 (20:49 +0200)]
Improve documentation of gdb-mi's dedicated windows

* doc/emacs/building.texi (Other GDB Buffers): Describe the I/O
buffer and commands to show individual specialized windows.
Improve indexing.

23 months agoAvoid spurious pause in kill-ring-save (Bug#60841)
Kévin Le Gouguec [Sun, 29 Jan 2023 10:23:01 +0000 (11:23 +0100)]
Avoid spurious pause in kill-ring-save (Bug#60841)

'indicate-copied-region' checks whether the region is "highlighted"
and if not, briefly moves point to mark to give a visual cue of the
extent of text that was saved to the kill ring.

The region is considered "highlighted" if (a) it is active and (b) its
face specifies a :background.  That latter condition does not account
for the multiple ways in which the face can make the region "visually
distinct" from the default face, so switch to the more extensive
predicate face-differs-from-default-p.

The patch also fixes a couple of issues with the predicate's
implementation, and introduces a new user option in case anyone
happened to enjoy unconditional blinking.

* lisp/faces.el (face-differs-from-default-p): Filter out :extend; add
rationale for the attributes we ignore.
* lisp/simple.el (copy-region-blink-predicate): Add option to let
users explicitly opt into or out of blinking point and mark.
(region-indistinguishable-p): New function to detect
"if there is currently no active region highlighting", leveraging
face-differs-from-default-p.
(indicate-copied-region): Use it.
* src/xfaces.c (merge_face_ref): Allow :stipple to be nil, since it is
a documented valid value for that attribute.
* etc/NEWS: Announce user option.

23 months agoChange the default of 'treesit-defun-tactic' for 'c-ts-mode'
Eli Zaretskii [Thu, 2 Feb 2023 18:21:02 +0000 (20:21 +0200)]
Change the default of 'treesit-defun-tactic' for 'c-ts-mode'

* lisp/progmodes/c-ts-mode.el (c-ts-mode): Set
'treesit-defun-tactic' as appropriate for C.  (Bug#61208)

23 months agoFix docstring fontification of CL's 'defstruct'
Eli Zaretskii [Thu, 2 Feb 2023 18:12:02 +0000 (20:12 +0200)]
Fix docstring fontification of CL's 'defstruct'

* lisp/emacs-lisp/lisp-mode.el (defstruct): Set 'doc-string'
property.  Patch by Nicolas Martyanoff <nicolas@n16f.net>.

Copyright-paperwork-exempt: yes

23 months agoTeach 'hs-minor-mode' about tree-sitter based modes
Eli Zaretskii [Thu, 2 Feb 2023 17:41:09 +0000 (19:41 +0200)]
Teach 'hs-minor-mode' about tree-sitter based modes

* lisp/progmodes/hideshow.el (hs-special-modes-alist): Teach
'hs-minor-mode' about tree-sitter based modes.  (Bug#61232)

23 months ago; Doc fixes in keymap.el
Eli Zaretskii [Thu, 2 Feb 2023 14:14:15 +0000 (16:14 +0200)]
; Doc fixes in keymap.el

* lisp/keymap.el (key-valid-p, key-translate, keymap-lookup)
(define-keymap): Doc fixes.

23 months agoLAP peephole optimisation improvements
Mattias Engdegård [Wed, 18 Jan 2023 17:36:29 +0000 (18:36 +0100)]
LAP peephole optimisation improvements

- Since discardN-preserve-tos(1) and stack-set(1) have the same
  effect, treat them as equivalent in all transformations.

- Move the rule

        discardN-preserve-tos(X) discardN-preserve-tos(Y)
    --> discardN-preserve-tos(X+Y)

  from the final pass to the main iteration since it may enable
  further optimisations.

- Don't apply the rule

    goto(X) ... X: DISCARD --> DISCARD goto(Y) ... X: DISCARD Y:

  when DISCARD could be merged or deleted instead, which is even better.

- Add the rule

    OP const return -> <deleted> const return

  where OP is effect-free.

- Generalise the push-pop annihilation rule to

    PUSH(K) discard(N) -> discard(N-K), N>K
    PUSH(K) discard(N) -> <deleted>,    N=K

  to any N, not just N=1.

- Add the rule

    OP goto(X) Y: OP X: -> <deleted> Y: OP X:

  for any operation OP.

* lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode):
Make the changes described above.

23 months agoClean up LAP peephole logging
Mattias Engdegård [Tue, 31 Jan 2023 10:15:13 +0000 (11:15 +0100)]
Clean up LAP peephole logging

Make `byte-compile-log-lap` more robust and produce nicer output.
This is of interest for Elisp compiler maintainers only.

* lisp/emacs-lisp/byte-opt.el (bytecomp--log-lap-arg): New.
(byte-compile-log-lap-1): Extract argument conversion and rewrite
in a more modern way, fixing bugs.  In particular, tags are now
displayed as "X:" where X is the tag number, and that tag number
is shown as argument to goto-like ops.
(byte-optimize-lapcode): Clean up and simplify logging, producing
useful information when `byte-optimize-log` is `byte` as intended.

23 months agoImprove documentation of 'repeat-mode' and related variables
Eli Zaretskii [Thu, 2 Feb 2023 13:34:58 +0000 (15:34 +0200)]
Improve documentation of 'repeat-mode' and related variables

* lisp/bindings.el (next-error-repeat-map)
(page-navigation-repeat-map, undo-repeat-map):
* lisp/tab-bar.el (tab-bar-switch-repeat-map)
(tab-bar-move-repeat-map):
* lisp/window.el (other-window-repeat-map)
(resize-window-repeat-map): Mention repeatable commands in the doc
strings.
* lisp/repeat.el (repeat-exit-timeout, repeat-check-key)
(repeat-echo-function, repeat-mode, repeat-check-key)
(repeat-check-map, repeat-echo-message-string)
(repeat-echo-message, repeat-echo-mode-line)
(describe-repeat-maps): Improve wording of doc strings.
(describe-repeat-maps): Improve wording of the heading line.
(Bug#61183)

* doc/emacs/basic.texi (Repeating): Clarify and improve wording of
'repeat-mode' documentation.

23 months ago; * etc/NEWS: Mention the 'utf-8-auto' bugfix (bug#60750).
Eli Zaretskii [Thu, 2 Feb 2023 10:35:16 +0000 (12:35 +0200)]
; * etc/NEWS: Mention the 'utf-8-auto' bugfix (bug#60750).

23 months agoMerge from origin/emacs-29
Stefan Kangas [Thu, 2 Feb 2023 05:30:28 +0000 (06:30 +0100)]
Merge from origin/emacs-29

9715715ac16 (eshell--complete-commands-list): Fix regression in fix t...
ea1bb263153 * doc/emacs/basic.texi (Repeating): Mention describe-repe...
f91bf9df892 Unbreak the MS-Windows build

23 months ago(eshell--complete-commands-list): Fix regression in fix to bug#48995
Nicolas Martyanoff [Thu, 2 Feb 2023 03:17:57 +0000 (22:17 -0500)]
(eshell--complete-commands-list): Fix regression in fix to bug#48995

Copyright-Paperwork-Exempt: Yes

* lisp/eshell/em-cmpl.el (eshell--complete-commands-list):
Fix misuse of `completion-table-dynamic` when completing a file name.

23 months agoAdd Emacs icon for Android package
Po Lu [Thu, 2 Feb 2023 02:31:10 +0000 (10:31 +0800)]
Add Emacs icon for Android package

* java/AndroidManifest.xml.in: Add new icon.
* java/Makefile.in (srcdir): New variable.
(JAVA_FILES, RESOURCE_FILES): Update variables.
(emacs.apk-in): Apply resources.
* java/README: Describe directory tree.

23 months agoAdd Emacs icon for Android
Po Lu [Thu, 2 Feb 2023 02:30:15 +0000 (10:30 +0800)]
Add Emacs icon for Android

* java/res/drawable/emacs.png: New file.

23 months agoUpdate Android port
Po Lu [Thu, 2 Feb 2023 02:18:18 +0000 (10:18 +0800)]
Update Android port

* src/android.c (android_get_current_api_level): New function.
* src/android.h: Export it.
* src/sfntfont-android.c (init_sfntfont_android): Make device
API level detection always work.

23 months agoClean up compiler warnings
Po Lu [Thu, 2 Feb 2023 02:13:46 +0000 (10:13 +0800)]
Clean up compiler warnings

* src/sfnt.c (sfnt_multiply_divide_signed): Add MAYBE_UNUSED.

23 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Thu, 2 Feb 2023 02:11:32 +0000 (10:11 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

23 months agoUpdate Android port
Po Lu [Thu, 2 Feb 2023 02:11:02 +0000 (10:11 +0800)]
Update Android port

* src/sfnt.c (xmalloc, xrealloc): Improve behavior upon
allocation failures during test.
(sfnt_table_names): Add prep.
(sfnt_transform_coordinates): Allow applying offsets during
coordinate transform.
(sfnt_decompose_compound_glyph): Defer offset computation until
any component compound glyph is loaded, then apply it during the
transform process.

(sfnt_multiply_divide): Make available everywhere.  Implement on
64 bit systems.
(sfnt_multiply_divide_signed): New function.
(sfnt_mul_fixed): Fix division overflow.

(sfnt_curve_to_and_build_1, sfnt_build_glyph_outline): Remove
outdated comment.
(sfnt_build_outline_edges): Fix coding style.
(sfnt_lookup_glyph_metrics): Allow looking up metrics without
scaling.
(struct sfnt_cvt_table): Fix type of cvt values.
(struct sfnt_prep_table): New structure.
(sfnt_read_cvt_table): Read cvt values in terms of fwords, not
longs (as Apple's doc seems to say).
(sfnt_read_fpgm_table): Fix memory allocation for font program
table.
(sfnt_read_prep_table): New function.
(struct sfnt_interpreter_zone): New structure.
(struct sfnt_interpreter_graphics_state): New fields `project',
`move', `vector_dot_product'.  Rename to `sfnt_graphics_state'.
(struct sfnt_interpreter, sfnt_mul_f26dot6): Stop doing rounding
division.
(sfnt_init_graphics_state):
(sfnt_make_interpreter):
(MOVE):
(SSW):
(RAW):
(SDS):
(ADD):
(SUB):
(ABS):
(NEG):
(WCVTF):
(_MIN):
(S45ROUND):
(SVTCAx):
(sfnt_set_srounding_state):
(sfnt_skip_code):
(sfnt_interpret_unimplemented):
(sfnt_interpret_fdef):
(sfnt_interpret_idef):
(sfnt_interpret_if):
(sfnt_interpret_else):
(sfnt_round_none):
(sfnt_round_to_grid):
(sfnt_round_to_double_grid):
(sfnt_round_down_to_grid):
(sfnt_round_up_to_grid):
(sfnt_round_to_half_grid):
(sfnt_round_super):
(sfnt_validate_gs):
(sfnt_interpret_run):
(sfnt_interpret_font_program):
(struct sfnt_test_dcontext):
(sfnt_test_move_to):
(sfnt_test_line_to):
(sfnt_test_curve_to):
(sfnt_test_get_glyph):
(sfnt_test_free_glyph):
(sfnt_test_span):
(sfnt_test_edge_ignore):
(sfnt_test_edge):
(sfnt_test_raster):
(test_interpreter_profile):
(test_cvt_values):
(test_interpreter_cvt):
(test_interpreter_head):
(sfnt_make_test_interpreter):
(struct sfnt_interpreter_test):
(sfnt_run_interpreter_test):
(struct sfnt_generic_test_args):
(sfnt_generic_check):
(sfnt_check_srp0):
(sfnt_check_szp0):
(sfnt_check_sloop):
(struct sfnt_rounding_test_args):
(sfnt_check_rounding):
(sfnt_check_smd):
(sfnt_check_scvtci):
(sfnt_check_sswci):
(sfnt_check_ssw):
(sfnt_check_flipon):
(sfnt_check_flipoff):
(npushb_test_args):
(npushw_test_args):
(pushb_test_args):
(pushw_test_args):
(stack_overflow_test_args):
(stack_underflow_test_args):
(rtg_test_args):
(rtg_symmetric_test_args):
(rtg_1_test_args):
(rtg_1_symmetric_test_args):
(rthg_test_args):
(rthg_1_test_args):
(rtdg_test_args):
(rtdg_1_test_args):
(rtdg_2_test_args):
(rtdg_3_test_args):
(else_test_args):
(jmpr_test_args):
(dup_test_args):
(pop_test_args):
(clear_test_args):
(swap_test_args):
(depth_test_args):
(cindex_test_args):
(mindex_test_args):
(raw_test_args):
(loopcall_test_args):
(call_test_args):
(fdef_test_args):
(fdef_1_test_args):
(endf_test_args):
(ws_test_args):
(rs_test_args):
(wcvtp_test_args):
(rcvt_test_args):
(mppem_test_args):
(mps_test_args):
(debug_test_args):
(lt_test_args):
(all_tests):
(main): Implement more instructions.

* src/sfnt.h (enum sfnt_table, struct sfnt_glyph_metrics): Add
new tables.  Add comment.

23 months ago* lisp/progmodes/ruby-ts-mode.el: Extend treesit-sexp-type-regexp.
Juri Linkov [Wed, 1 Feb 2023 18:14:06 +0000 (20:14 +0200)]
* lisp/progmodes/ruby-ts-mode.el: Extend treesit-sexp-type-regexp.

(ruby-ts-mode): Add more node types to treesit-sexp-type-regexp.

23 months ago* doc/emacs/basic.texi (Repeating): Mention describe-repeat-maps (bug#61183).
Juri Linkov [Wed, 1 Feb 2023 18:05:52 +0000 (20:05 +0200)]
* doc/emacs/basic.texi (Repeating): Mention describe-repeat-maps (bug#61183).

* lisp/repeat.el (describe-repeat-maps): Add more explanation to
the docstring.  Suggested by Robert Pluim <rpluim@gmail.com>.

23 months agoHandle large process output strings for Tramp
Michael Albinus [Wed, 1 Feb 2023 17:40:11 +0000 (18:40 +0100)]
Handle large process output strings for Tramp

* lisp/net/tramp-sh.el (tramp-sh-handle-make-process):
Improve handling of connection-type `pipe'.

* test/lisp/tramp-tests.el (tramp-test29-start-file-process)
(tramp-test30-make-process): Extend tests.

23 months agoUnbreak the MS-Windows build
Eli Zaretskii [Wed, 1 Feb 2023 12:13:54 +0000 (14:13 +0200)]
Unbreak the MS-Windows build

* src/treesit.c (ts_query_pattern_count) [WINDOWSNT]: Load from
the library and define as macro.

23 months ago; Merge from origin/emacs-29
Stefan Kangas [Wed, 1 Feb 2023 05:30:39 +0000 (06:30 +0100)]
; Merge from origin/emacs-29

The following commit was skipped:

f7fcc62b78a ; Auto-commit of loaddefs files.

23 months agoMerge from origin/emacs-29
Stefan Kangas [Wed, 1 Feb 2023 05:30:39 +0000 (06:30 +0100)]
Merge from origin/emacs-29

66aa9cb450a ; (Ftreesit_query_capture): Fix typo
f711f4e99f7 (Ftreesit_query_capture): Cache list of predicates for gi...
47ab9ba55d7 * lisp/keymap.el (keymap-global-unset): Correct prompt
49b61405582 Fix cursor-in-echo-area on TTY frames

23 months ago; Auto-commit of loaddefs files.
Stefan Kangas [Wed, 1 Feb 2023 04:08:57 +0000 (05:08 +0100)]
; Auto-commit of loaddefs files.

23 months ago; Auto-commit of loaddefs files.
Stefan Kangas [Wed, 1 Feb 2023 04:08:25 +0000 (05:08 +0100)]
; Auto-commit of loaddefs files.

23 months ago; (Ftreesit_query_capture): Fix typo
Dmitry Gutov [Wed, 1 Feb 2023 01:53:38 +0000 (03:53 +0200)]
; (Ftreesit_query_capture): Fix typo

23 months ago(Ftreesit_query_capture): Cache list of predicates for given pattern index
Dmitry Gutov [Wed, 1 Feb 2023 01:45:55 +0000 (03:45 +0200)]
(Ftreesit_query_capture): Cache list of predicates for given pattern index

* src/treesit.c (Ftreesit_query_capture):
Cache list of predicates for given pattern index (bug#60953).

23 months ago* lisp/keymap.el (keymap-global-unset): Correct prompt
Robert Pluim [Tue, 31 Jan 2023 17:17:41 +0000 (18:17 +0100)]
* lisp/keymap.el (keymap-global-unset): Correct prompt

23 months agoFix cursor-in-echo-area on TTY frames
Eli Zaretskii [Tue, 31 Jan 2023 16:03:28 +0000 (18:03 +0200)]
Fix cursor-in-echo-area on TTY frames

* src/dispnew.c (update_frame_1): Fix off-by-one error when
positioning the cursor in the echo-area.  (Bug#61184)

23 months agoMerge from origin/emacs-29
Stefan Kangas [Tue, 31 Jan 2023 05:30:26 +0000 (06:30 +0100)]
Merge from origin/emacs-29

1684e254a3b Update to Transient v0.3.7-196-gb91f509
327941b2112 CC Mode: Fix a coding bug in c-make-keywords-re.  This sh...
2f3683cd4dc * lisp/isearch.el (isearch-emoji-by-name): Disable derive...
86b03046c00 Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/...
e866490a077 Fix keymap inheritance in descendants of 'c-ts-base-mode'
f67a9a12b7b Fix interactive use of `keymap-local-set' and `keymap-glo...

23 months agoDuring completion, convert all Eshell arguments to strings
Jim Porter [Sun, 22 Jan 2023 21:20:46 +0000 (13:20 -0800)]
During completion, convert all Eshell arguments to strings

Eshell was already converting some types (numbers, nil) to strings, as
well as fixing up multiple-dot forms like ".../", so this way is more
consistent and should produce fewer problems for Pcomplete functions.

* lisp/eshell/em-cmpl.el (eshell-complete-parse-arguments): Always
convert parsed arguments to strings.

* test/lisp/eshell/em-cmpl-tests.el (eshell-arguments-equal,
eshell-arguments-equal--equal-explainer): New functions.
(em-cmpl-test/parse-arguments/pipeline)
(em-cmpl-test/parse-arguments/multiple-dots)
(em-cmpl-test/parse-arguments/variable/numeric)
(em-cmpl-test/parse-arguments/variable/nil)
(em-cmpl-test/parse-arguments/variable/list)
(em-cmpl-test/parse-arguments/variable/splice): Use
'eshell-arguments-equal'.

23 months agoProperly parse Eshell variable splices for interactive completion
Jim Porter [Mon, 16 Jan 2023 00:44:23 +0000 (16:44 -0800)]
Properly parse Eshell variable splices for interactive completion

Previously, the code simply ignored the splice operator, which usually
worked, but isn't actually correct.

* lisp/eshell/em-cmpl.el (eshell-complete-eval-argument-form): New
function.
(eshell-complete-parse-arguments): Properly parse variable splices.

* test/lisp/eshell/em-cmpl-tests.el
(em-cmpl-test/parse-arguments/variable/splice): New test.

23 months agoAdd regression tests for Eshell completions
Jim Porter [Mon, 16 Jan 2023 00:44:17 +0000 (16:44 -0800)]
Add regression tests for Eshell completions

* lisp/eshell/esh-cmd.el (eshell-complete-lisp-symbols): Fix
docstring.

* test/lisp/eshell/em-cmpl-tests.el: New file.

23 months agoUpdate to Transient v0.3.7-196-gb91f509
Jonas Bernoulli [Mon, 30 Jan 2023 21:39:38 +0000 (22:39 +0100)]
Update to Transient v0.3.7-196-gb91f509

23 months agoCC Mode: Fix a coding bug in c-make-keywords-re. This should fix bug #61135
Alan Mackenzie [Mon, 30 Jan 2023 20:02:36 +0000 (20:02 +0000)]
CC Mode: Fix a coding bug in c-make-keywords-re.  This should fix bug #61135

* lisp/progmodes/cc-defs.el (c-make-keywords-re): Generate "\>" components in
result regexp when argument ADORN is `appendable'.  This fully fixes a bug
which was half-fixed on 2019-01-22.

23 months agoRevert "Fix incremental build failures with tree-sitter"
Eli Zaretskii [Mon, 30 Jan 2023 18:25:59 +0000 (20:25 +0200)]
Revert "Fix incremental build failures with tree-sitter"

This reverts commit 176830fe2bb1c80ee128e515f6223cddc8b0a2ca.
That commit isn't needed, since the problem was fixed
in another way, in the defcustom's :set function.

23 months agoGnus nnimap date search string must use C locale
Eric Abrahamsen [Mon, 30 Jan 2023 17:55:40 +0000 (09:55 -0800)]
Gnus nnimap date search string must use C locale

* lisp/gnus/gnus-search.el (gnus-search-imap-handle-date): The %b
needs to be the English month name for IMAP search.

23 months ago* lisp/isearch.el (isearch-emoji-by-name): Disable derived emoji (bug#60740).
Juri Linkov [Mon, 30 Jan 2023 17:39:33 +0000 (19:39 +0200)]
* lisp/isearch.el (isearch-emoji-by-name): Disable derived emoji (bug#60740).

Let-bind emoji--derived to nil to avoid the subsequent selection
of derived emoji that fails in transient.el.

23 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Mon, 30 Jan 2023 13:49:19 +0000 (21:49 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

23 months agoMerge from origin/emacs-29
Po Lu [Mon, 30 Jan 2023 13:47:39 +0000 (21:47 +0800)]
Merge from origin/emacs-29

f67a9a12b7b Fix interactive use of `keymap-local-set' and `keymap-glo...
dda4baa58b7 ; Fix build and startup without tree-sitter

23 months ago; Merge from origin/emacs-29
Po Lu [Mon, 30 Jan 2023 13:47:39 +0000 (21:47 +0800)]
; Merge from origin/emacs-29

The following commit was skipped:

99e40959f40 Fix password prompt in Tramp (do not merge)

23 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Mon, 30 Jan 2023 13:46:52 +0000 (21:46 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

23 months agoMerge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/emacs into emacs-29
Eli Zaretskii [Mon, 30 Jan 2023 13:45:54 +0000 (15:45 +0200)]
Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/emacs into emacs-29

23 months agoFix keymap inheritance in descendants of 'c-ts-base-mode'
Eli Zaretskii [Mon, 30 Jan 2023 13:42:06 +0000 (15:42 +0200)]
Fix keymap inheritance in descendants of 'c-ts-base-mode'

* lisp/progmodes/c-ts-mode.el (c-ts-base-mode-map): Rename from
'c-ts-mode-map'.
(c-ts-base-mode): Adjust accordingly.  (Bug#60983)

23 months agoFix incremental build failures with tree-sitter
Po Lu [Mon, 30 Jan 2023 13:33:27 +0000 (21:33 +0800)]
Fix incremental build failures with tree-sitter

* lisp/treesit.el (treesit-subtree-stat): Declare missing
function.
(treesit-buffer-root-node): Return nil if tree-sitter not
present.

23 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Mon, 30 Jan 2023 13:19:55 +0000 (21:19 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

23 months agoUpdate Android port
Po Lu [Mon, 30 Jan 2023 13:19:33 +0000 (21:19 +0800)]
Update Android port

* cross/ndk-build/ndk-build-shared-library.mk: ($(call
objname,$(LOCAL_MODULE),$(basename $(1)))):
* cross/ndk-build/ndk-build-static-library.mk: ($(call
objname,$(LOCAL_MODULE),$(basename $(1)))): Revert broken typo
fixes.
* src/sfnt.c (TEST_STATIC): Define ARRAYELTS.
(sfnt_table_names): New CVT and FPGM tables.
(sfnt_decompose_compound_glyph, sfnt_decompose_glyph)
(struct sfnt_large_integer, sfnt_multiply_divide_1)
(sfnt_count_leading_zero_bits, sfnt_multiply_divide_2)
(sfnt_multiply_divide, sfnt_mul_fixed, sfnt_div_fixed)
(sfnt_ceil_fixed, sfnt_build_glyph_outline): Fix fixed point
multiplication routines on systems without 64 bit long long
type.
(SFNT_ENABLE_HINTING, struct sfnt_test_dcontext, sfnt_test_move_to)
(sfnt_test_line_to, sfnt_test_curve_to, sfnt_test_get_glyph)
(sfnt_test_free_glyph, sfnt_test_span, sfnt_test_edge_ignore)
(sfnt_read_cvt_table, sfnt_test_edge, sfnt_test_raster)
(sfnt_read_fpgm_table, struct sfnt_unit_vector)
(struct sfnt_interpreter_definition)
(struct sfnt_interpreter_graphics_state, struct sfnt_interpreter)
(sfnt_div_f26dot6, sfnt_mul_f26dot6, sfnt_floor_f26dot6)
(sfnt_ceil_f26dot6, sfnt_round_f26dot6, sfnt_init_graphics_state)
(sfnt_make_interpreter, enum sfnt_interpreter_run_context)
(sfnt_interpret_trap, STACKSIZE, sfnt_set_srounding_state)
(sfnt_skip_code, sfnt_interpret_unimplemented, sfnt_interpret_fdef)
(sfnt_interpret_idef, sfnt_interpret_if, sfnt_interpret_else)
(sfnt_round_none, sfnt_round_to_grid, sfnt_round_to_double_grid)
(sfnt_round_down_to_grid, sfnt_round_up_to_grid)
(sfnt_round_to_half_grid, sfnt_round_super, sfnt_validate_gs)
(sfnt_interpret_run, sfnt_interpret_font_program)
(test_interpreter_profile, test_cvt_values, test_interpreter_cvt)
(test_interpreter_head, sfnt_make_test_interpreter)
(struct sfnt_interpreter_test, sfnt_run_interpreter_test)
(struct sfnt_generic_test_args, sfnt_generic_check)
(sfnt_check_srp0, sfnt_check_szp0, sfnt_check_sloop)
(struct sfnt_rounding_test_args, sfnt_check_rounding)
(sfnt_check_smd, sfnt_check_scvtci, sfnt_check_sswci)
(sfnt_check_ssw, sfnt_check_flipon, sfnt_check_flipoff)
(npushb_test_args, npushw_test_args, pushb_test_args)
(pushw_test_args, stack_overflow_test_args)
(stack_underflow_test_args, rtg_test_args, rtg_symmetric_test_args)
(rtg_1_test_args, rtg_1_symmetric_test_args, rthg_test_args)
(rthg_1_test_args, rtdg_test_args, rtdg_1_test_args)
(rtdg_2_test_args, rtdg_3_test_args, else_test_args)
(jmpr_test_args, dup_test_args, pop_test_args, clear_test_args)
(swap_test_args, depth_test_args, cindex_test_args)
(mindex_test_args, raw_test_args, loopcall_test_args)
(call_test_args, fdef_test_args, fdef_1_test_args, endf_test_args)
(ws_test_args, rs_test_args, wcvtp_test_args, rcvt_test_args)
(mppem_test_args, mps_test_args, debug_test_args, lt_test_args)
(all_tests, main): Check in WIP hinting code.

* src/sfnt.h (enum sfnt_table): Add `cvt ' and `fpgm' tables.

23 months agoFix interactive use of `keymap-local-set' and `keymap-global-set'
Robert Pluim [Mon, 30 Jan 2023 09:51:30 +0000 (10:51 +0100)]
Fix interactive use of `keymap-local-set' and `keymap-global-set'

* lisp/keymap.el (keymap-global-set, keymap-local-set): Convert the
read key sequence to a string when called interactively.  Based on a
patch from Stephen Berman <stephen.berman@gmx.net>.  (Bug#61149)

23 months ago; Fix build and startup without tree-sitter
Eli Zaretskii [Mon, 30 Jan 2023 12:22:19 +0000 (14:22 +0200)]
; Fix build and startup without tree-sitter

* lisp/treesit.el (treesit--font-lock-level-setter): Don't loop
over all the buffers if tree-sitter is not built-in, or else
initialization of defcustom will fail.  (Bug#61155)
* lisp/progmodes/rust-ts-mode.el (treesit-node-parent):
* lisp/progmodes/c-ts-common.el (treesit-node-parent): Declare, to
* avoid byte-compilation warnings.

23 months agoFix password prompt in Tramp
Michael Albinus [Mon, 30 Jan 2023 10:55:23 +0000 (11:55 +0100)]
Fix password prompt in Tramp

* lisp/net/tramp.el (tramp-password-prompt-regexp):
Allow alternative trailing colons.  (Bug#61168)

23 months agoFix password prompt in Tramp (do not merge)
Michael Albinus [Mon, 30 Jan 2023 10:43:04 +0000 (11:43 +0100)]
Fix password prompt in Tramp (do not merge)

* lisp/net/tramp.el (tramp-password-prompt-regexp):
Allow alternative trailing colons.  (Bug#61168)

23 months agoMerge from origin/emacs-29
Stefan Kangas [Mon, 30 Jan 2023 06:19:43 +0000 (07:19 +0100)]
Merge from origin/emacs-29

8360e12f0ea Update to Org 9.6.1-23-gc45a05
9058601308d ; * doc/emacs/misc.texi (Document View): Remove @footnote...
197f994384c Document tree-sitter features in the user manual
b73539832d9 ; Remove treesit--font-lock-fast-mode-grace-count
64fee21d5f8 Fix dockerfile-ts-mode line continuation indentation (bug...
1970726e26a Use treesit-subtree-stat to determine treesit--font-lock-...
382e018856a Add treesit-subtree-stat
a3003492ace Move c-ts-mode--statement-offset to c-ts-common.el
4b1714571c8 ; Fix byte-compile warnings in c-ts-mode.el
f50cb7d7c4b ; Improve docstring of c-ts-mode--indent-style-setter
1c3ca3bb649 Fix <> syntax in rust-ts-mode
56e8607dc99 Fix spurious errors on Windows when deleting temporary *....
2bd0b947538 Fix java class member without access modifier (bug#61115)
1de6ebf2878 Make treesit-font-lock-level a defcustom
6e50ee8bbb5 Add c-ts-mode-set-style and :set for c-ts-mode-indent-style
450db0587a9 Minor documentation improvements for outline-minor-mode (...
578e8926713 ; * doc/lispref/variables.texi (File Local Variables): Im...
bc5ee2b7bf0 ; * src/comp.c: Remove Local Variables section to avoid w...
362678d90e1 python.el: Use correct regexp when enabling python-ts-mode
76bb46db9df ; * doc/emacs/frames.texi (Mouse References): Improve ind...

# Conflicts:
# doc/emacs/programs.texi
# etc/NEWS
# lisp/progmodes/c-ts-mode.el