]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years agoBring up the sfnt-android font driver
Po Lu [Wed, 11 Jan 2023 08:06:15 +0000 (16:06 +0800)]
Bring up the sfnt-android font driver

* configure.ac (ANDROID_CFLAGS): Add sfnt-related font objects
to ANDROID_OBJ when not building stubs.
* lisp/startup.el (android-fonts-enumerated): New variable.
(normal-top-level): Set it.  Also enumerate fonts as early as
possible upon startup.

* src/alloc.c (cleanup_vector): Only finalize Android font
entities.
(garbage_collect): Mark sfntfont.c.

* src/android.c (struct android_emacs_drawable): New field
`damage_rect'.
(android_init_emacs_drawable): Initialize
Lorg/gnu/emacs/EmacsDrawable;#damageRect(Landroid/graphics/rect;)V.
(android_create_gc): Initialize cached GC fields.
(android_free_gc): Free cached GC clip rectangles.
(android_change_gc): Cache fields as appropriate.
(android_set_clip_rectangles): Set cached clip rectangles for
easy access from C.
(android_get_gc_values): Use cached values.
(android_get_image): Remove obsolete comment.
(android_lock_bitmap, android_damage_window): New functions that
don't parallel anything on X.

* src/android.h: Update prototypes.

* src/androidfns.c (android_default_font_parameter): Set Droid
Sans Mono as the default monospace font.
(Fx_create_frame): Register the sfntfont driver.

* src/androidgui.h (struct android_gc): Add C side caches for
clip rectangles and the foreground and background colors.

* src/androidterm.h: Update prototypes.

* src/dispextern.h (struct gui_box): New struct.
(gui_union_rectangles): New function.

* src/emacs.c (android_emacs_init): Initialize Android font
stuff late.
* src/font.c (font_make_entity): Clear `is_android' field on
Android.
(font_make_entity_android): Set `is_android' field.
* src/font.h (struct font_entity): New field `is_android'.

* src/print.c (print_vectorlike): Don't print private data,
which could include Lisp_Misc.

* src/sfnt.c (sfnt_read_cmap_format_0, sfnt_read_cmap_format_2)
(sfnt_read_cmap_format_4, sfnt_read_cmap_format_6)
(sfnt_read_cmap_format_8, sfnt_read_cmap_format_12): Remove
buggy pragmas.
(sfnt_lookup_glyph_4_1): New function.
(sfnt_lookup_glyph_4): Handle malformed lookup tables found on
Android.
(sfnt_lookup_glyph): Fix overflow problems in glyph checks.
(sfnt_read_glyph): Handle empty glyphs.  This implements some
behavior which everyone else seems to as well, but I can't find
documented in the TrueType Reference Manual.
(sfnt_free_glyph): Export correctly.
(sfnt_transform_coordinates): Make faster.
(sfnt_lerp_half): Fix lerping in some cases.
(sfnt_decompose_glyph): Handle empty glyphs correctly.  Close
contours manually instead of waiting for the edge building
process to do that.  This lets curves be handled correctly.
(struct sfnt_build_glyph_outline_context): Move internal struct
back to sfnt.c.
(sfnt_build_append): Fix detection of initial entry.
(sfnt_curve_to_and_build_1): Fix De Casteljau implementation.
(sfnt_curve_to_and_build): Use fixed point arithmetic to scale
outlines.
(sfnt_build_glyph_outline): Clear reference counts.  Use fixed
point arithmetic.
(sfnt_prepare_raster): Align rasters to 4 bytes,
SFNT_POLY_ALIGNMENT.  Fix calculation of offx and offy.
(sfnt_step_edge_by): Step edge by previously computed step_x.
(sfnt_build_outline_edges): Adjust for already closed contours.
Ignore edges abandoned after grid fit.  Also precompute step_x
to avoid multiplication on each span rastered.
(sfnt_poly_edges): Improve alignment.
(sfnt_fill_span): Rewrite to avoid control flow in while loop.
(sfnt_poly_span): Remove unnecessary code.
(sfnt_raster_glyph_outline): Use raster stride instead of width.
(sfnt_test_edge, sfnt_test_raster, main): Improve debugging
code.

* src/sfnt.h (struct sfnt_glyph_outline): Add refcount field to
outline.
(struct sfnt_build_glyph_outline_context): Remove private
struct.
(struct sfnt_raster): Add refcount field to raster.
(struct sfnt_edge): Improve doc.  Add `source_x' field used when
built with TEST.
(SFNT_CEIL_FIXED): New macro.

* src/sfntfont-android.c (sfntfont_android_saturate32)
(sfntfont_android_scale32, sfntfont_android_mul8x2)
(sfntfont_android_blend, U255TO256)
(sfntfont_android_composite_bitmap, sfntfont_android_union_boxes)
(sfntfont_android_put_glyphs, sfntfont_android_get_cache): New
functions.
(android_sfntfont_driver): New font driver.
(Fandroid_enumerate_fonts): New function.
(syms_of_sfntfont_android_for_pdumper, init_sfntfont_android)
(syms_of_sfntfont_android): Initialize default fonts, special
family mapping and font driver.
* src/sfntfont.c (struct sfnt_font_desc): New fields
`char_cache', `cmap_invalid' and `subtable'.
(sfnt_setup_coding_system): Improve commentary.  Add default
branch.  Fix return value.
(sfnt_safe_encode_coding_object_1)
(sfnt_safe_encode_coding_object_2):
(sfnt_safe_encode_coding_object): Use decode_coding_object
instead of encode_coding_object.
(sfnt_decode_font_string): Adjust for rename.
(sfnt_decode_foundry_name): New function.
(sfnt_weight_descriptions, sfnt_slant_descriptions)
(sfnt_width_descriptions): Fix definitions.
(sfnt_parse_style): Make function work.
(sfnt_enum_font): Initialize designer, char-cache and subtable
platform ID.
(sfntfont_charset_for_name, mark_sfntfont)
(sfntfont_charset_for_cmap): New functions.
(syms_of_sfntfont): New variable `sfnt-default-family-alist'.

* src/sfntfont.h (_SFNTFONT_H_): Update prototypes.

* src/xdisp.c (gui_union_rectangles): New function.

2 years agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Sun, 8 Jan 2023 07:43:57 +0000 (15:43 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

2 years ago* configure.ac (ANDROID_OBJS): Add sfntfont files.
Po Lu [Sun, 8 Jan 2023 07:43:34 +0000 (15:43 +0800)]
* configure.ac (ANDROID_OBJS): Add sfntfont files.

2 years agoCheck in new files
Po Lu [Sun, 8 Jan 2023 07:43:09 +0000 (15:43 +0800)]
Check in new files

* src/sfnt.h:
* src/sfntfont-android.c:
* src/sfntfont.c:
* src/sfntfont.h: New files.

2 years agoUpdate Android port
Po Lu [Sun, 8 Jan 2023 07:42:37 +0000 (15:42 +0800)]
Update Android port

Note that the port currently does not work as of this check-in.

* src/android.c (android_change_gc): Fix situations where clip
rects are cleared.
(android_create_pixmap_from_bitmap_data): Fix bitmap data
iteration.
* src/androidfns.c (Fx_show_tip, Fx_hide_tip): Remove annoying
errors.

* src/androidgui.h (enum android_event_type):
(struct android_crossing_event):
(struct android_motion_event):
(struct android_button_event):
(union android_event): New crossing, motion and button events.

* src/androidterm.c (android_note_mouse_movement)
(mouse_or_wdesc_frame, android_construct_mouse_click)
(handle_one_android_event, android_mouse_position)
(android_wait_for_event, android_set_window_size_1)
(android_bitmap_icon, android_free_frame_resources)
(syms_of_androidterm): New functions.  Handle crossing, motion
and button events.

* src/androidterm.h (struct android_display_info): New field
`last_mouse_movement_time'.
(struct android_output): Remove unused `need_buffer_flip' field.

* src/emacs.c (android_emacs_init): Initialize sfntfont.
* src/frame.c (syms_of_frame): Set frame_inhibit_implied_resize
to some reasonable value.
* src/frame.h (GCALIGNED_STRUCT): Set wait_event_type on
Android.

* src/sfnt.c (eassert):
(TEST_STATIC):
(available):
(enum sfnt_table):
(sfnt_table_names):
(SFNT_ENDOF):
(struct sfnt_table_directory):
(enum sfnt_scaler_type):
(sfnt_coerce_fixed):
(struct sfnt_hhea_table):
(struct sfnt_cmap_table):
(enum sfnt_platform_id):
(enum sfnt_unicode_platform_specific_id):
(enum sfnt_macintosh_platform_specific_id):
(enum sfnt_microsoft_platform_specific_id):
(struct sfnt_cmap_encoding_subtable):
(struct sfnt_cmap_encoding_subtable_data):
(struct sfnt_cmap_format_0):
(struct sfnt_cmap_format_2_subheader):
(struct sfnt_cmap_format_2):
(struct sfnt_cmap_format_4):
(struct sfnt_cmap_format_6):
(struct sfnt_cmap_format_8_or_12_group):
(struct sfnt_cmap_format_8):
(struct sfnt_cmap_format_12):
(struct sfnt_maxp_table):
(struct sfnt_loca_table_short):
(struct sfnt_loca_table_long):
(struct sfnt_glyf_table):
(struct sfnt_simple_glyph):
(struct sfnt_compound_glyph_component):
(struct sfnt_compound_glyph):
(struct sfnt_glyph):
(sfnt_read_table_directory):
(file):
(sfnt_read_cmap_table):
(sfnt_read_head_table):
(success):
(sfnt_read_hhea_table):
(sfnt_read_loca_table_short):
(sfnt_read_loca_table_long):
(sfnt_read_maxp_table):
(sfnt_read_glyf_table):
(sfnt_read_compound_glyph):
(sfnt_read_glyph):
(struct sfnt_point):
(sfnt_expand_compound_glyph_context):
(sfnt_decompose_compound_glyph):
(struct sfnt_glyph_outline):
(enum sfnt_glyph_outline_flags):
(struct sfnt_build_glyph_outline_context):
(sfnt_build_append):
(sfnt_build_glyph_outline):
(struct sfnt_raster):
(struct sfnt_edge):
(sfnt_prepare_raster):
(sfnt_build_outline_edges):
(sfnt_raster_glyph_outline): Move structures to sfnt.h.

(struct sfnt_long_hor_metric):
(struct sfnt_hmtx_table):
(struct sfnt_glyph_metrics):
(sfnt_read_hmtx_table):
(sfnt_lookup_glyph_metrics):
(sfnt_read_name_table):
(sfnt_find_name):
(sfnt_read_meta_table):
(sfnt_find_metadata):
(sfnt_test_edge_ignore): New functions.
(main): Add new tests.
* src/xdisp.c (redisplay_tool_bar):

2 years agoDelete unused files
Po Lu [Sun, 8 Jan 2023 07:39:28 +0000 (15:39 +0800)]
Delete unused files

* java/org/gnu/emacs/EmacsPaintQueue.java
* java/org/gnu/emacs/EmacsPaintReq.java: Remove files.

2 years agoUpdate Java part of Android port
Po Lu [Sun, 8 Jan 2023 07:39:02 +0000 (15:39 +0800)]
Update Java part of Android port

* java/org/gnu/emacs/EmacsCopyArea.java (EmacsCopyArea, perform)
(paintTo):
* java/org/gnu/emacs/EmacsDrawLine.java (EmacsDrawLine):
* java/org/gnu/emacs/EmacsDrawPoint.java (EmacsDrawPoint):
* java/org/gnu/emacs/EmacsDrawRectangle.java (EmacsDrawRectangle)
(paintTo):
* java/org/gnu/emacs/EmacsDrawable.java (EmacsDrawable):
* java/org/gnu/emacs/EmacsFillPolygon.java (EmacsFillPolygon):
* java/org/gnu/emacs/EmacsFillRectangle.java
(EmacsFillRectangle):
* java/org/gnu/emacs/EmacsFontDriver.java (EmacsFontDriver):
* java/org/gnu/emacs/EmacsGC.java (EmacsGC):
* java/org/gnu/emacs/EmacsNative.java (EmacsNative):
* java/org/gnu/emacs/EmacsPixmap.java (EmacsPixmap):
* java/org/gnu/emacs/EmacsSdk23FontDriver.java
(EmacsSdk23FontDriver):
* java/org/gnu/emacs/EmacsSdk7FontDriver.java
(EmacsSdk7FontDriver, textExtents1, textExtents, draw):
* java/org/gnu/emacs/EmacsService.java (EmacsService, copyArea):
* java/org/gnu/emacs/EmacsSurfaceView.java (EmacsSurfaceView):
* java/org/gnu/emacs/EmacsView.java (EmacsView, onLayout)
(onFocusChanged):
* java/org/gnu/emacs/EmacsWindow.java (EmacsWindow, run)
(resizeWindow, lockCanvas, getBitmap, onKeyDown, onKeyUp)
(onActivityDetached): Move rendering to main thread.  Make
drawing operations completely static.

2 years agoCheck in new file androidmenu.c
Po Lu [Sun, 8 Jan 2023 07:37:30 +0000 (15:37 +0800)]
Check in new file androidmenu.c

* src/androidmenu.c: New file.

2 years agoAdjust to recent Gnulib macro renaming
Paul Eggert [Sat, 7 Jan 2023 23:28:00 +0000 (15:28 -0800)]
Adjust to recent Gnulib macro renaming

Also, remove some references to unused Gnulib macros.

2 years agoUpdate from Gnulib by running admin/merge-gnulib
Paul Eggert [Sat, 7 Jan 2023 23:08:45 +0000 (15:08 -0800)]
Update from Gnulib by running admin/merge-gnulib

2 years agoCheck in new file sfnt.c
Po Lu [Sat, 7 Jan 2023 12:27:30 +0000 (20:27 +0800)]
Check in new file sfnt.c

* src/sfnt.c (xmalloc, xrealloc, xfree, eassert, MIN)
(sfnt_table_names, SFNT_ENDOF, struct sfnt_table_directory)
(enum sfnt_scaler_type, sfnt_coerce_fixed, struct sfnt_hhea_table)
(struct sfnt_cmap_table, enum sfnt_platform_id)
(enum sfnt_unicode_platform_specific_id)
(enum sfnt_macintosh_platform_specific_id)
(enum sfnt_microsoft_platform_specific_id)
(struct sfnt_cmap_encoding_subtable)
(struct sfnt_cmap_encoding_subtable_data)
(struct sfnt_cmap_format_0, struct sfnt_cmap_format_2_subheader)
(struct sfnt_cmap_format_2, struct sfnt_cmap_format_4)
(struct sfnt_cmap_format_6, struct sfnt_cmap_format_8_or_12_group)
(struct sfnt_cmap_format_8, struct sfnt_cmap_format_12)
(struct sfnt_maxp_table, struct sfnt_loca_table_short)
(struct sfnt_loca_table_long, struct sfnt_glyf_table)
(struct sfnt_simple_glyph, struct sfnt_compound_glyph_component)
(struct sfnt_compound_glyph, struct sfnt_glyph, _sfnt_swap16)
(_sfnt_swap32, sfnt_swap16, sfnt_find_table)
(sfnt_read_cmap_format_0, sfnt_read_cmap_format_2)
(sfnt_read_cmap_format_4, sfnt_read_cmap_format_6)
(sfnt_read_cmap_format_8, sfnt_read_cmap_format_12)
(sfnt_read_cmap_table_1, sfnt_read_cmap_table, sfnt_lookup_glyph_0)
(sfnt_lookup_glyph_2, sfnt_bsearch_above, sfnt_compare_uint16)
(sfnt_lookup_glyph_4, sfnt_lookup_glyph_6, sfnt_lookup_glyph_8)
(sfnt_lookup_glyph_12, sfnt_lookup_glyph, sfnt_read_head_table)
(sfnt_read_hhea_table, sfnt_read_loca_table_short)
(sfnt_read_loca_table_long, sfnt_read_maxp_table)
(sfnt_read_glyf_table, sfnt_read_simple_glyph)
(sfnt_read_compound_glyph, sfnt_read_glyph, sfnt_free_glyph)
(struct sfnt_point, sfnt_transform_coordinates)
(struct sfnt_compound_glyph_context)
(sfnt_expand_compound_glyph_context, sfnt_round_fixed)
(sfnt_decompose_compound_glyph, sfnt_lerp_half)
(sfnt_decompose_glyph, struct sfnt_glyph_outline)
(enum sfnt_glyph_outline_flags)
(struct sfnt_build_glyph_outline_context, sfnt_build_append)
(sfnt_move_to_and_build, sfnt_line_to_and_build, sfnt_mul_fixed)
(sfnt_div_fixed, sfnt_ceil_fixed, sfnt_floor_fixed)
(sfnt_curve_is_flat, sfnt_curve_to_and_build_1)
(sfnt_curve_to_and_build, sfnt_build_glyph_outline)
(struct sfnt_raster, struct sfnt_edge, sfnt_poly_coverage)
(sfnt_poly_grid_ceil, sfnt_prepare_raster, sfnt_step_edge_by)
(sfnt_build_outline_edges, sfnt_compare_edges, sfnt_poly_edges)
(sfnt_saturate_short, sfnt_fill_span, sfnt_poly_span)
(sfnt_raster_span, sfnt_raster_edge, sfnt_raster_glyph_outline)
(struct sfnt_long_hor_metric, struct sfnt_hmtx_table)
(struct sfnt_glyph_metrics, sfnt_read_hmtx_table)
(sfnt_lookup_glyph_metrics, 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, sfnt_test_raster, main): Check in
5000-line-long file written by me for reading TrueType and
OpenType fonts with TrueType outlines.

2 years agoAdd new Tramp method "toolbox"
Michael Albinus [Sat, 7 Jan 2023 11:14:26 +0000 (12:14 +0100)]
Add new Tramp method "toolbox"

* doc/misc/tramp.texi (Inline methods): Add toolbox.

* etc/NEWS: Add new Tramp method "toolbox".

* lisp/net/tramp-container.el (tramp-toolbox-program): New defcustom.
(tramp-toolbox-method): New defconst.
(tramp-toolbox--completion-function): New defun.  Set it for "toolbox".
(tramp-methods) <toolbox>: Add.
(tramp-default-host-alist): Add rule for "toolbox".

2 years agoMinor tramp-archive.el fix
Michael Albinus [Sat, 7 Jan 2023 11:07:10 +0000 (12:07 +0100)]
Minor tramp-archive.el fix

* lisp/net/tramp-archive.el (tramp-archive-file-name-regexp):
Use `ignore-errors'.

2 years ago; Use a single '<=' for range comparisons
Xi Lu [Wed, 4 Jan 2023 21:27:03 +0000 (05:27 +0800)]
; Use a single '<=' for range comparisons

* lisp/simple.el (undo-elt-in-region, char-uppercase-p)
(event-apply-modifier): Use a single '<='.  (Bug#60561)

2 years agoMerge from origin/emacs-29
Stefan Kangas [Sat, 7 Jan 2023 05:30:10 +0000 (06:30 +0100)]
Merge from origin/emacs-29

9d410f8de64 (treesit-simple-indent-presets): Ensure 'and' works for a...
ff66a5d324b (treesit--indent-rules-optimize): Optimize 'and' and 'or'...
f2ebe43362c (treesit-simple-indent-presets): Short-circuit 'and' and ...
2ea6ee5cbfa (font-lock-regexp-face): New face
5ab03bcc433 Unify the string interpolation delimiters face across ts ...
92e8c0c091c ruby-ts-mode: Highlight more kinds of parameters
7420b6dcc37 Fix `pr-interface'
699711786ac Further generic-related improvements in csharp-ts-mode (b...

# Conflicts:
# etc/NEWS

2 years agoPort to current Gnulib file-has-acl
Paul Eggert [Sat, 7 Jan 2023 01:59:11 +0000 (17:59 -0800)]
Port to current Gnulib file-has-acl

* lib-src/Makefile.in (FILE_HAS_ACL_LIB): Rename from LIB_HAS_ACL,
to adjust to recent Gnulib renaming.  All uses changed.

2 years agoUpdate from Gnulib by running admin/merge-gnulib
Paul Eggert [Sat, 7 Jan 2023 01:53:54 +0000 (17:53 -0800)]
Update from Gnulib by running admin/merge-gnulib

2 years ago(treesit-simple-indent-presets): Ensure 'and' works for anchors too
Dmitry Gutov [Sat, 7 Jan 2023 01:28:38 +0000 (03:28 +0200)]
(treesit-simple-indent-presets): Ensure 'and' works for anchors too

* lisp/treesit.el (treesit-simple-indent-presets):
Rewrite to return the last successful evaluation, not just t.

2 years ago(treesit--indent-rules-optimize): Optimize 'and' and 'or' matcher forms
Dmitry Gutov [Sat, 7 Jan 2023 00:44:07 +0000 (02:44 +0200)]
(treesit--indent-rules-optimize): Optimize 'and' and 'or' matcher forms

* lisp/treesit.el (treesit--indent-rules-optimize):
Optimize 'and' and 'or' matcher forms.  When 'and' has a 'query'
matcher inside (as is the case in ruby-ts--indent-rules, many
times over), this yields a significant performance boost.

2 years ago(treesit-simple-indent-presets): Short-circuit 'and' and 'or'
Dmitry Gutov [Sat, 7 Jan 2023 00:02:25 +0000 (02:02 +0200)]
(treesit-simple-indent-presets): Short-circuit 'and' and 'or'

* lisp/treesit.el (treesit-simple-indent-presets):
Short-circuit the 'and' and 'or' matchers.  To avoid calling all
fns after one returned nil or truthy value, respectively.

2 years agoAdd new SI prefixes R, Q in other places
Paul Eggert [Fri, 6 Jan 2023 18:48:29 +0000 (10:48 -0800)]
Add new SI prefixes R, Q in other places

* lisp/dired-x.el (dired-x--string-to-number, dired-mark-sexp):
* lisp/dired.el (dired-re-inode-size):
* lisp/files.el (directory-listing-before-filename-regexp):
* src/xdisp.c (power_letter):
* src/xdisp.c: Include stdint.h.
Check that the prefixes suffice for ptrdiff_t.

2 years ago(font-lock-regexp-face): New face
Dmitry Gutov [Fri, 6 Jan 2023 17:56:20 +0000 (19:56 +0200)]
(font-lock-regexp-face): New face

* lisp/font-lock.el (font-lock-regexp-face): New face.

* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--font-lock-settings):
* lisp/progmodes/ruby-ts-mode.el (ruby-ts--font-lock-settings):
* lisp/progmodes/js.el (js--treesit-font-lock-settings):
Use it for regexps.

* etc/NEWS: Mention the addition.

2 years agoUnify the string interpolation delimiters face across ts modes
Dmitry Gutov [Fri, 6 Jan 2023 14:17:50 +0000 (16:17 +0200)]
Unify the string interpolation delimiters face across ts modes

* lisp/progmodes/js.el (js--treesit-font-lock-settings):
* lisp/progmodes/ruby-ts-mode.el (ruby-ts--font-lock-settings):
* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--font-lock-settings):
Use font-lock-misc-punctuation-face for string interpolation
delimiters.

2 years agoruby-ts-mode: Highlight more kinds of parameters
Dmitry Gutov [Fri, 6 Jan 2023 13:38:00 +0000 (15:38 +0200)]
ruby-ts-mode: Highlight more kinds of parameters

* lisp/progmodes/ruby-ts-mode.el
(ruby-ts--font-lock-settings): Highlight destructured parameters,
lambda parameters, identifiers in pattern matching clauses
(array/hash) and exception variables.
Move the 'symbol' matchers lower to make 'hash_key_symbol' lower
priority than hash keys in match patterns.

2 years agoRemove Emacs 26 compatibility from Tramp
Michael Albinus [Fri, 6 Jan 2023 12:34:33 +0000 (13:34 +0100)]
Remove Emacs 26 compatibility from Tramp

* doc/misc/tramp.texi (Remote processes): Don't mention Emacs version.
(Frequently Asked Questions): Adapt supported Emacs versions.

* doc/misc/trampver.texi:
* lisp/net/trampver.el: Change version to "2.7.0-pre".

* lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p)
(tramp-compat-file-name-quote, tramp-compat-file-name-unquote)
(tramp-compat-tramp-syntax, tramp-compat-exec-path)
(tramp-compat-time-equal-p, tramp-compat-flatten-tree)
(tramp-compat-progress-reporter-update)
(tramp-compat-ignore-error, tramp-compat-rx--transform-item)
(tramp-compat-rx--transform, tramp-compat-rx): Remove.

* lisp/net/tramp-adb.el:
* lisp/net/tramp-archive.el:
* lisp/net/tramp-cache.el:
* lisp/net/tramp-cmds.el:
* lisp/net/tramp-crypt.el:
* lisp/net/tramp-fuse.el:
* lisp/net/tramp-gvfs.el:
* lisp/net/tramp-integration.el:
* lisp/net/tramp-rclone.el:
* lisp/net/tramp-sh.el:
* lisp/net/tramp-smb.el:
* lisp/net/tramp-sshfs.el:
* lisp/net/tramp-sudoedit.el:
* lisp/net/tramp.el:
* lisp/net/trampver.el: Replace the removed `tramp-compat-*' items
by their real definition.  Don't use `tramp-compat-funcall' when
not needed.  Remove `with-no-warnings' and `ignore-errors' where
appropriate.

* lisp/net/tramp.el (tramp-file-name-for-operation): Rearrange list.
(tramp-handle-file-newer-than-file-p): Simplify.
(tramp-get-process-attributes): Don't check for existence of
`connection-local-criteria-for-default-directory'.
(tramp-handle-shell-command): Don't check for existence of
`shell-command-save-pos-or-erase', `async-shell-command-width' and
`shell-command-set-point-after-cmd'.
(tramp-handle-start-file-process): Call `make-process' directly.
(tramp-defined-time): New defsubst.
(tramp-get-local-gid): Don't check for existence of `group-name'.

* lisp/net/tramp-adb.el (tramp-adb-handle-set-file-times):
Use `tramp-defined-time'.
(tramp-adb-get-signal-strings): Don't bind `shell-file-name' and
`shell-command-switch'.

* lisp/net/tramp-archive.el (top, tramp-archive-file-name-handler):
Don't bind `max-specpdl-size' any longer.
(tramp-archive-autoload-file-name-regexp): Remove Emacs 26
specific code.
(top): Don't call `tramp-register-archive-autoload-file-name-handler'.

* lisp/net/tramp-gvfs.el (top): Don't bind `max-specpdl-size' any longer.
(tramp-gvfs-handle-set-file-times): Use `tramp-defined-time'.

* lisp/net/tramp-sh.el (tramp-sh-handle-set-file-times):
Use `tramp-defined-time'.

* test/lisp/net/tramp-archive-tests.el (tramp-archive--test-emacs27-p):
Remove.
(all):
* test/lisp/net/tramp-tests.el (all): Don't skip for Emacs 26.
Replace the removed `tramp-compat-*' items by their real
definition.  Don't use `tramp-compat-funcall' when not needed.
Remove `with-no-warnings' and `ignore-errors' where appropriate.
(with-connection-local-variables)
(shell-command-dont-erase-buffer): Don't declare.
(tramp-test10-write-region): Don't check for `make-empty-file'.
(tramp-test32-shell-command): Simplify.
(tramp-test34-explicit-shell-file-name): Don't protect
`explicit-shell-file-name' any longer.
(tramp--test-emacs27-p): Remove.

2 years agoFix `pr-interface'
Robert Pluim [Fri, 6 Jan 2023 08:00:00 +0000 (09:00 +0100)]
Fix `pr-interface'

`pr-interface' specifies `inline' for its menu items, which is not
necessary, but it causes `widget-choice-value-create' to bug
out.  (Bug#60501)

* lisp/wid-edit.el (widget-choice-value-create): Allow the value to be
a non-list.
* test/lisp/wid-edit-tests.el (widget-test-handle-spurious-inline):
Add test to ensure that unnecessary :inline is allowed.

2 years agoFurther generic-related improvements in csharp-ts-mode (bug#60376)
Jostein Kjønigsen [Sun, 1 Jan 2023 19:46:02 +0000 (20:46 +0100)]
Further generic-related improvements in csharp-ts-mode (bug#60376)

This is an additional patch for bug#60376.

* lisp/progmodes/csharp-mode.el (csharp-ts-mode--font-lock-settings):
New rules.

2 years agoMerge from origin/emacs-29
Stefan Kangas [Fri, 6 Jan 2023 05:30:10 +0000 (06:30 +0100)]
Merge from origin/emacs-29

0f5e74f1734 ruby-ts-mode: Highlight method and block parameters
f1aa306f915 ruby-ts-mode: Highlight variable assignments
089b08eb3eb ruby-ts-mode: Move 'self' and 'super' from constants to k...
7ede600273c (ruby-ts-mode): Split font-lock feature 'builtin' into two
ec172d748f3 Avoid assertion violation due to fill-column indicator face
62c2963ce60 Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/...
2e6070f16c4 ; Another review of etc/NEWS
16eca92415b ; * src/gnutls.c (Fgnutls_deinit): Fix typo in doc string...
4753b587868 * lisp/cedet/semantic/symref/grep.el: Support ts-modes (b...
8a18369afdc ; Another fix for doc strings of 2 treesit.el functions
3fc68833517 ; Fix the doc strings of 2 treesit.el functions
83ce7c861e1 Make 'toml-ts-mode' optional

# Conflicts:
# etc/NEWS

2 years agoruby-ts-mode: Highlight method and block parameters
Dmitry Gutov [Fri, 6 Jan 2023 02:48:35 +0000 (04:48 +0200)]
ruby-ts-mode: Highlight method and block parameters

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--font-lock-settings):
Add rules for method and block parameters.
(ruby-ts-mode): Add corresponding feature.

2 years agoruby-ts-mode: Highlight variable assignments
Perry Smith [Fri, 6 Jan 2023 02:20:02 +0000 (04:20 +0200)]
ruby-ts-mode: Highlight variable assignments

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--font-lock-settings):
Bring back the 'assignment' feature.
(ruby-ts-mode): Replace the unused 'variable' with 'assignment'.  Use
the level 3 for consistency with other ts modes.
Update the Commentary as well.

2 years agoruby-ts-mode: Move 'self' and 'super' from constants to keywords
Dmitry Gutov [Fri, 6 Jan 2023 01:31:41 +0000 (03:31 +0200)]
ruby-ts-mode: Move 'self' and 'super' from constants to keywords

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--font-lock-settings):
Move 'self' and 'super' from constants to keywords.

2 years ago(ruby-ts-mode): Split font-lock feature 'builtin' into two
Dmitry Gutov [Fri, 6 Jan 2023 01:12:20 +0000 (03:12 +0200)]
(ruby-ts-mode): Split font-lock feature 'builtin' into two

* lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode):
Split the 'builtin' feature in two: 'builtin-constant' and
'builtin-variable'.
(ruby-ts-highlight-predefined-constants):
Drop the user option, the highlighting granularity can be chosen
using treesit-font-lock-recompute-features.
(ruby-ts--font-lock-settings): Update accordingly.
(ruby-ts--predefined-constants, ruby-ts--predefined-variables):
Fix docstrings.

2 years agoAvoid assertion violation due to fill-column indicator face
Eli Zaretskii [Thu, 5 Jan 2023 20:33:51 +0000 (22:33 +0200)]
Avoid assertion violation due to fill-column indicator face

* src/xdisp.c (extend_face_to_end_of_line): Use the original
iterator metrics for the stretch glyph, the one unaffected by the
'fill-column-indicator' face.  (Bug#60580)

2 years agoMerge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/emacs into emacs-29
Eli Zaretskii [Thu, 5 Jan 2023 20:32:17 +0000 (22:32 +0200)]
Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/emacs into emacs-29

2 years ago; Another review of etc/NEWS
Michael Albinus [Thu, 5 Jan 2023 19:53:25 +0000 (20:53 +0100)]
; Another review of etc/NEWS

2 years ago; * src/gnutls.c (Fgnutls_deinit): Fix typo in doc string (bug#60579).
Eli Zaretskii [Thu, 5 Jan 2023 18:39:14 +0000 (20:39 +0200)]
; * src/gnutls.c (Fgnutls_deinit): Fix typo in doc string (bug#60579).

2 years ago* lisp/cedet/semantic/symref/grep.el: Support ts-modes (bug#60525)
Juri Linkov [Thu, 5 Jan 2023 18:18:11 +0000 (20:18 +0200)]
* lisp/cedet/semantic/symref/grep.el: Support ts-modes (bug#60525)

(semantic-symref-filepattern-alist): Duplicate entries
c-mode -> c-ts-mode, c++-mode -> c++-ts-mode, ruby-mode -> ruby-ts-mode,
python-mode -> python-ts-mode.

2 years agoRemove obsolete Tramp items
Michael Albinus [Thu, 5 Jan 2023 12:23:04 +0000 (13:23 +0100)]
Remove obsolete Tramp items

* etc/NEWS: Obsolete user option
'tramp-completion-reread-directory-timeout' has been removed.  Fix typos.

* lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist):
Ignore `make-directory-internal'.

* lisp/net/tramp-sh.el (tramp-get-remote-trash): Remove.

* lisp/net/tramp-smb.el (tramp-smb-handle-make-directory-internal):
Remove.

* lisp/net/tramp.el (tramp-default-user): Fix docstring.
(tramp-completion-reread-directory-timeout): Remove.

2 years ago; Another fix for doc strings of 2 treesit.el functions
Eli Zaretskii [Thu, 5 Jan 2023 07:34:02 +0000 (09:34 +0200)]
; Another fix for doc strings of 2 treesit.el functions

* lisp/treesit.el (treesit-parent-while): Clarify "closest" and
"furthest" in the doc string.  (Bug#60531)

2 years ago; Fix the doc strings of 2 treesit.el functions
Eli Zaretskii [Thu, 5 Jan 2023 07:20:02 +0000 (09:20 +0200)]
; Fix the doc strings of 2 treesit.el functions

* lisp/treesit.el (treesit-parent-until, treesit-parent-while):
Doc fixes.  (Bug#60531)

2 years agoMake 'toml-ts-mode' optional
Eli Zaretskii [Thu, 5 Jan 2023 06:40:07 +0000 (08:40 +0200)]
Make 'toml-ts-mode' optional

* etc/NEWS: Reflect the fact that 'toml-ts-mode' is optional.

* lisp/textmodes/toml-ts-mode.el (auto-mode-alist): Don't autoload
the addition of 'toml-ts-mode'.  (Bug#60559)

2 years agoMerge from origin/emacs-29
Stefan Kangas [Thu, 5 Jan 2023 05:30:20 +0000 (06:30 +0100)]
Merge from origin/emacs-29

92f753dc190 ; * etc/NEWS: Fix wording in last change.
cef875f6c51 ; * etc/NEWS: Instructions for builds without tree-sitter...
8d530ca6542 ; Fix documentation of y-or-n-p/yes-or-no-p
c18878ee0a2 Fix bug in Tramp multi-hop
7eed8e050a9 * lisp/files.el (find-sibling-rules): Fix docstring.
6b5831c6964 Tree-sitter doc fixes (bug#60524)
651927ac391 ; Fix function reference in comment in c-ts-mode.el (bug#...
c786afcbb9f Fontify C++ function definitions in c-ts-mode (bug#60529)

# Conflicts:
# etc/NEWS

2 years ago; * etc/NEWS: Fix wording in last change.
Eli Zaretskii [Wed, 4 Jan 2023 18:52:41 +0000 (20:52 +0200)]
; * etc/NEWS: Fix wording in last change.

2 years ago; * etc/NEWS: Instructions for builds without tree-sitter (bug#60559)
Eli Zaretskii [Wed, 4 Jan 2023 18:51:04 +0000 (20:51 +0200)]
; * etc/NEWS: Instructions for builds without tree-sitter (bug#60559)

2 years ago; Fix documentation of y-or-n-p/yes-or-no-p
Eli Zaretskii [Wed, 4 Jan 2023 17:25:47 +0000 (19:25 +0200)]
; Fix documentation of y-or-n-p/yes-or-no-p

* lisp/subr.el (y-or-n-p):
* src/fns.c (Fyes_or_no_p): Doc fix.

2 years agoFix bug in Tramp multi-hop
Michael Albinus [Wed, 4 Jan 2023 17:12:02 +0000 (18:12 +0100)]
Fix bug in Tramp multi-hop

* lisp/net/tramp.el (tramp-compute-multi-hops): Make check for
host name more robust.  (Bug#60499)

2 years ago* lisp/files.el (find-sibling-rules): Fix docstring.
Michael Albinus [Wed, 4 Jan 2023 17:11:31 +0000 (18:11 +0100)]
* lisp/files.el (find-sibling-rules): Fix docstring.

2 years agoTree-sitter doc fixes (bug#60524)
Juri Linkov [Wed, 4 Jan 2023 07:57:06 +0000 (09:57 +0200)]
Tree-sitter doc fixes (bug#60524)

* doc/lispref/modes.texi (Parser-based Font Lock):
Replace :lang with :language.

* doc/lispref/parsing.texi (Language Grammar): Replace
treesit-load-suffixes with dynamic-library-suffixes.
(Retrieving Nodes): Fix function names.
(Tree-sitter Major Modes): Fix treesit-ready-p args.
Fix pxref to Parser-based Indentation.
(Tree-sitter C API): Fix function names.

* lisp/treesit.el (treesit--simple-indent-eval): Remove cond BODY
duplicated from CONDITION.
(treesit)<define-short-documentation-group>: Fix function names.

2 years ago; Fix function reference in comment in c-ts-mode.el (bug#60514)
Daniel Martín [Tue, 3 Jan 2023 12:49:08 +0000 (13:49 +0100)]
; Fix function reference in comment in c-ts-mode.el (bug#60514)

* lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings): Fix
reference.

2 years agoFontify C++ function definitions in c-ts-mode (bug#60529)
Daniel Martín [Tue, 3 Jan 2023 21:08:13 +0000 (22:08 +0100)]
Fontify C++ function definitions in c-ts-mode (bug#60529)

* lisp/progmodes/c-ts-mode.el (c-ts-mode--declarator-identifier):
Teach the code how to extract the declarator of a node of type
"qualified_identifier".
(c-ts-mode--fontify-declarator): Consider the case where the
identifier in a function declarator is buried inside
"qualifier_identifier" nodes.

2 years agoMerge from origin/emacs-29
Stefan Kangas [Wed, 4 Jan 2023 05:30:13 +0000 (06:30 +0100)]
Merge from origin/emacs-29

0d98fac6bbc (ruby-ts-add-log-current-function): Fix when between two ...
da69f116bfc ; * doc/lispref/positions.texi (List Motion): Minor wordi...
0b0eae0bf76 ; Improve documentation of 'treesit-language-source-alist'
ae0d218d0b3 ; * etc/NEWS: Mention treesit-install-language-grammar.
de3df3bc51e * lisp/vc/vc-git.el (vc-git-checkin): Pass vc-git-diff-sw...

# Conflicts:
# etc/NEWS

2 years ago(ruby-ts-add-log-current-function): Fix when between two methods
Dmitry Gutov [Tue, 3 Jan 2023 22:37:43 +0000 (00:37 +0200)]
(ruby-ts-add-log-current-function): Fix when between two methods

* lisp/progmodes/ruby-ts-mode.el
(ruby-ts-add-log-current-function): Fix the case when point is
between two methods.  'treesit-node-at' returs the 'def' node of
the method after point in such case, so it behaved like point was
inside the method below.

* test/lisp/progmodes/ruby-ts-mode-tests.el
(ruby-ts-add-log-current-method-outside-of-method):
Update the test case.

* test/lisp/progmodes/ruby-mode-tests.el
(ruby-add-log-current-method-outside-of-method):
Mirror that change.

2 years agoStyled quotes in compiler warnings
Mattias Engdegård [Tue, 3 Jan 2023 14:58:14 +0000 (15:58 +0100)]
Styled quotes in compiler warnings

* lisp/emacs-lisp/byte-run.el (byte-run--parse-body)
(byte-run--unescaped-character-literals-warning):
* lisp/emacs-lisp/bytecomp.el (byte-compile-initial-macro-environment)
(byte-compile-form, bytecomp--warn-dodgy-eq-arg):
* lisp/emacs-lisp/cconv.el (cconv--warn-unused-msg):
* lisp/emacs-lisp/cl-macs.el (cl-defstruct):
* lisp/emacs-lisp/easy-mmode.el (define-minor-mode):
* lisp/emacs-lisp/eieio.el (defclass):
* lisp/emacs-lisp/macroexp.el (macroexp--unfold-lambda)
(macroexp--expand-all):
* lisp/emacs-lisp/pcase.el (pcase--u1):
* lisp/subr.el (when, unless, ignore-error, lsh, sit-for)
(with-demoted-errors):
Use format-message to ensure properly styled quotes in compiler
warning messages.

2 years ago; * cl-lib-tests.el: Suppress for the right function.
Mattias Engdegård [Tue, 3 Jan 2023 13:26:44 +0000 (14:26 +0100)]
; * cl-lib-tests.el: Suppress for the right function.

2 years ago; * doc/lispref/positions.texi (List Motion): Minor wording fix.
Eli Zaretskii [Tue, 3 Jan 2023 13:16:42 +0000 (15:16 +0200)]
; * doc/lispref/positions.texi (List Motion): Minor wording fix.

2 years ago; Improve documentation of 'treesit-language-source-alist'
Eli Zaretskii [Tue, 3 Jan 2023 13:12:48 +0000 (15:12 +0200)]
; Improve documentation of 'treesit-language-source-alist'

* lisp/treesit.el (treesit--install-language-grammar-build-recipe)
(treesit-install-language-grammar):  Doc fixes.
(treesit-install-language-grammar): Autoload it.

* etc/NEWS: Improve wording of the
'treesit-install-language-grammar' documentation.

2 years agoData argument to `signal` should be a list
Mattias Engdegård [Tue, 3 Jan 2023 13:03:58 +0000 (14:03 +0100)]
Data argument to `signal` should be a list

* lisp/calendar/iso8601.el (iso8601-parse, iso8601-parse-date)
(iso8601-parse-time, iso8601-parse-zone, iso8601-parse-duration)
(iso8601-parse-interval):
* lisp/emacs-lisp/cl-lib.el (cl-values-list):
* lisp/emacs-lisp/comp.el (comp-decrypt-arg-list)
(comp-spill-lap-function, comp-emit-switch)
(comp-compute-dominator-tree, comp-final):
* lisp/image.el (image-type):
* lisp/image/exif.el (exif--parse-jpeg, exif--parse-exif-chunk)
(exif--parse-directory, exif--read-chunk, exif--read-number-be)
(exif--read-number-le):
* lisp/vc/vc.el (vc-default-last-change):
Wrap obvious non-list data arguments to `signal` in a list.

2 years agoFix potential crash with fast mouse position enabled
Po Lu [Tue, 3 Jan 2023 07:12:39 +0000 (15:12 +0800)]
Fix potential crash with fast mouse position enabled

* src/xterm.c (x_free_frame_resources): Clear
last_mouse_motion_frame and last_mouse_frame if required.

2 years ago; * etc/NEWS: Mention treesit-install-language-grammar.
Yuan Fu [Tue, 3 Jan 2023 06:52:42 +0000 (22:52 -0800)]
; * etc/NEWS: Mention treesit-install-language-grammar.

2 years ago* lisp/vc/vc-git.el (vc-git-checkin): Pass vc-git-diff-switches.
Sean Whitton [Tue, 3 Jan 2023 06:08:39 +0000 (23:08 -0700)]
* lisp/vc/vc-git.el (vc-git-checkin): Pass vc-git-diff-switches.

2 years agoMerge from origin/emacs-29
Stefan Kangas [Tue, 3 Jan 2023 05:30:17 +0000 (06:30 +0100)]
Merge from origin/emacs-29

6dd3e352f44 Extract common code into ruby-base-mode to derive from
94e330243e1 ruby-ts-mode: Indentation fixes
9b24417dda8 ruby-ts--font-lock-settings: Use more standard faces
9e6536e4d96 ruby-ts-mode: Standardize the string literal highlights
1a9a1fdebf6 Improve fontification in java-ts-mode (bug#60492)
dfdf9c21cbe Fontification improvements in typescript-ts-mode (bug#60500)
68e68dfeefe Improve fontification consistency in js-ts-mode (bug#60503)
aef869e74f4 ; Update tree-sitter manual
4ef12cfb1fc ; Fix tree-sitter manual title case
aab8ddca5e1 ; nt/INSTALL: Update for Emacs 29.
809fbb0e8c4 ; Update copyright notice in tramp-sh.el
f8f5202487c (typescript/tsx-ts-mode): Split font-lock feature list in...
a86a213e1ac js-ts-mode: Move 'string-interpolation' to font-lock level 3
d26b523886e Fix shrinking of the tab-bar
3f7ea621b90 ; Fix typos in ruby-ts-mode.el
9599b054316 ; Skip ruby-ts tests if grammar is not available
ff35ac9dfab Fix default-port regression in erc-select-read-args
b7ad0b40148 ; Clarify doc strings of 'call-process' and 'call-process...

2 years agoExtract common code into ruby-base-mode to derive from
Dmitry Gutov [Tue, 3 Jan 2023 01:10:49 +0000 (03:10 +0200)]
Extract common code into ruby-base-mode to derive from

* lisp/progmodes/ruby-mode.el (ruby-base-mode):
New major base mode, to set up common vars and hooks.
(ruby-mode-variables): Delete.  Move most code to ruby-base-mode.
And some -- to ruby-mode body.
(ruby-mode): Derive from ruby-base-mode.  Also move some setup
to there.

* lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode):
Derive from ruby-base-mode.  Remove duplicating settings.

2 years agoruby-ts-mode: Indentation fixes
Dmitry Gutov [Tue, 3 Jan 2023 00:26:00 +0000 (02:26 +0200)]
ruby-ts-mode: Indentation fixes

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--align-keywords):
Fix for 'def' (which was misread as 'method' in the check).
(ruby-ts--indent-rules): Indent the curly block closer the same
way as the 'do ... end' closer.

2 years agoruby-ts--font-lock-settings: Use more standard faces
Dmitry Gutov [Mon, 2 Jan 2023 22:41:25 +0000 (00:41 +0200)]
ruby-ts--font-lock-settings: Use more standard faces

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--font-lock-settings):
Use more standard faces for regexp literals and string
interpolation delimiters (following js-ts-mode).

2 years agoruby-ts-mode: Standardize the string literal highlights
Dmitry Gutov [Mon, 2 Jan 2023 21:26:39 +0000 (23:26 +0200)]
ruby-ts-mode: Standardize the string literal highlights

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--font-lock-settings):
Use font-lock-string-face for %w() and `...`.
Use font-lock-constant-face (just like we do for symbol literals)
for symbol array literals, %i().
Combine the matchers for string content and heredocs.

2 years agoImprove fontification in java-ts-mode (bug#60492)
Theodor Thornhill [Mon, 2 Jan 2023 12:46:25 +0000 (13:46 +0100)]
Improve fontification in java-ts-mode (bug#60492)

* lisp/progmodes/java-ts-mode.el (java-ts-mode--font-lock-settings):
Add expression_statement with only identifier support.

2 years agoFontification improvements in typescript-ts-mode (bug#60500)
Jostein Kjønigsen [Mon, 2 Jan 2023 19:56:41 +0000 (20:56 +0100)]
Fontification improvements in typescript-ts-mode (bug#60500)

- highlight method-definitins in interfaces.
- only highlight variable-declarations, not variables
  everywhere (consistency with other modes).
- move highlighting of method invocations to level 4

* lisp/progmodes/typescript-ts-mode.el:
(typescript-ts-mode--font-lock-settings): Update rules.
(typescript-ts-mode, tsx-ts-mode): Update feature list.

2 years agoImprove fontification consistency in js-ts-mode (bug#60503)
Jostein Kjønigsen [Mon, 2 Jan 2023 20:26:36 +0000 (21:26 +0100)]
Improve fontification consistency in js-ts-mode (bug#60503)

* lisp/progmodes/js.el (js--treesit-font-lock-settings): Highlight
declared parameters in functions, methods and arrow-expressions as
variables.

2 years ago; Update tree-sitter manual
Yuan Fu [Mon, 2 Jan 2023 22:15:36 +0000 (14:15 -0800)]
; Update tree-sitter manual

* doc/lispref/positions.texi (List Motion): Replace
treesit-defun-prefer-top-level with treesit-defun-tactic.

2 years ago; Fix tree-sitter manual title case
Yuan Fu [Mon, 2 Jan 2023 22:15:05 +0000 (14:15 -0800)]
; Fix tree-sitter manual title case

* doc/lispref/elisp.texi:
* doc/lispref/modes.texi:
* doc/lispref/parsing.texi: Change to title case.

2 years agoImprove interactive file-saving performance
Paul Eggert [Mon, 2 Jan 2023 18:00:41 +0000 (10:00 -0800)]
Improve interactive file-saving performance

* src/fileio.c (init_fileio):
No longer any need to set write-region-inhibit-fsync here.
(syms_of_fileio): Default write-region-inhibit-fsync to t (Bug#60474).

2 years ago; nt/INSTALL: Update for Emacs 29.
Eli Zaretskii [Mon, 2 Jan 2023 18:56:52 +0000 (20:56 +0200)]
; nt/INSTALL: Update for Emacs 29.

2 years ago; Update copyright notice in tramp-sh.el
Michael Albinus [Mon, 2 Jan 2023 18:50:07 +0000 (19:50 +0100)]
; Update copyright notice in tramp-sh.el

* lisp/net/tramp-sh.el (tramp-perl-encode, tramp-perl-decode):
Remove copyright notice, Tramp is copyrighted by FSF anyway.

2 years ago(typescript/tsx-ts-mode): Split font-lock feature list into 4 values
Dmitry Gutov [Mon, 2 Jan 2023 18:42:52 +0000 (20:42 +0200)]
(typescript/tsx-ts-mode): Split font-lock feature list into 4 values

* lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode)
(tsx-ts-mode): Split font-lock feature list into 4 values.

2 years agojs-ts-mode: Move 'string-interpolation' to font-lock level 3
Dmitry Gutov [Mon, 2 Jan 2023 17:59:50 +0000 (19:59 +0200)]
js-ts-mode: Move 'string-interpolation' to font-lock level 3

* lisp/progmodes/js.el (js-ts-mode):
Move 'string-interpolation' to font-lock level 3.

2 years agoFix shrinking of the tab-bar
Eli Zaretskii [Mon, 2 Jan 2023 15:02:05 +0000 (17:02 +0200)]
Fix shrinking of the tab-bar

* src/haikufns.c (haiku_change_tab_bar_height):
* src/pgtkfns.c (pgtk_change_tab_bar_height):
* src/nsfns.m (ns_change_tab_bar_height):
* src/w32fns.c (w32_change_tab_bar_height):
* src/xfns.c (x_change_tab_bar_height): Don't let the number of
tab-bar lines degenerate to zero due to integer division.
(Bug#60210)

2 years ago; Fix typos in ruby-ts-mode.el
Stefan Kangas [Mon, 2 Jan 2023 14:17:59 +0000 (15:17 +0100)]
; Fix typos in ruby-ts-mode.el

2 years ago; Skip ruby-ts tests if grammar is not available
Stefan Kangas [Mon, 2 Jan 2023 13:58:37 +0000 (14:58 +0100)]
; Skip ruby-ts tests if grammar is not available

* test/lisp/progmodes/ruby-ts-mode-tests.el: Properly skip tests if
there is no grammar for ruby.

2 years agoFix default-port regression in erc-select-read-args
F. Jason Park [Thu, 29 Dec 2022 14:43:19 +0000 (06:43 -0800)]
Fix default-port regression in erc-select-read-args

* lisp/erc/erc.el (erc--warn-unencrypted): New function, likely
temporary, to warn new users connecting interactively to the default
server, "irc.libara.chat", via the default non-TLS port, 6667.
(erc-select-read-args): Remove stray code from incomplete feature
introduced by bug#56514.  Ensure connecting always works with default
port, which is non-TLS.  Respect `erc-prompt-for-password' when user
pastes URL containing password component into "server" prompt.  Maybe
add `erc--warn-unencrypted' as one-off hook for impending connection.
* test/lisp/erc/erc-tests.el (erc-select-read-args): Always expect
password prompt and sometimes a non-TLS port when `erc' called
interactively.  (Bug#60428.)

2 years agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Mon, 2 Jan 2023 13:38:37 +0000 (21:38 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

2 years agoUpdate Android port
Po Lu [Mon, 2 Jan 2023 13:38:19 +0000 (21:38 +0800)]
Update Android port

* Makefile.in (java): Depend on info.
(MAKEFILE_NAME):
(config.status): Remove unneeded changes.
* configure.ac (BUILD_DETAILS, ANDROID_STUBIFY): Don't require a
C++ compiler on Android.
* java/AndroidManifest.xml: <EmacsActivity>: Set launchMode
appropriately.  <EmacsMultitaskActivity>: New activity.
* java/Makefile.in (CROSS_BINS): Add EmacsClient.
* java/org/gnu/emacs/EmacsActivity.java (EmacsActivity)
(onCreate): Use the window attachment manager.
* java/org/gnu/emacs/EmacsCopyArea.java (EmacsCopyArea)
(paintTo): Implement clip masks correctly.
* java/org/gnu/emacs/EmacsDrawRectangle.java (getRect, paintTo):
Fix damage tracking rectangles.
* java/org/gnu/emacs/EmacsFontDriver.java (FontSpec, toString):
New function.
(FontMetrics, EmacsFontDriver): Fix signature of textExtents.
* java/org/gnu/emacs/EmacsMultitaskActivity.java
(EmacsMultitaskActivity): New file.
* java/org/gnu/emacs/EmacsNative.java (EmacsNative): New
functions sendFocusIn, sendFocusOut, sendWindowAction.
* java/org/gnu/emacs/EmacsPaintQueue.java (run): Fix clipping
handling.
* java/org/gnu/emacs/EmacsPixmap.java (EmacsPixmap): Add
constructor for mutable pixmaps.
* java/org/gnu/emacs/EmacsSdk23FontDriver.java
(EmacsSdk23FontDriver): New file.
* java/org/gnu/emacs/EmacsSdk7FontDriver.java
(EmacsSdk7FontDriver, Sdk7Typeface, Sdk7FontEntity, Sdk7FontObject)
(checkMatch, hasChar, encodeChar): Implement text display and
fix font metrics semantics.

* java/org/gnu/emacs/EmacsService.java (EmacsService): Remove
availableChildren.
(getLibraryDirectory, onCreate): Pass pixel density to Emacs.
(clearArea): Fix arguments.  Switch to using the window
attachment manager.
* java/org/gnu/emacs/EmacsSurfaceView.java (surfaceChanged)
(surfaceCreated): Flip buffers on surface attachment.
* java/org/gnu/emacs/EmacsView.java (EmacsView, swapBuffers):
New argument FORCE.  Always swap if it is true.
(onKeyMultiple, onFocusChanged): New functions.

* java/org/gnu/emacs/EmacsWindow.java (EmacsWindow, destroyHandle)
(run): Switch to using the window attachment manager.
* java/org/gnu/emacs/EmacsWindowAttachmentManager.java
(EmacsWindowAttachmentManager): New file.

* lisp/cus-edit.el (custom-button, custom-button-mouse)
(custom-button-pressed):
* lisp/faces.el (tool-bar): Define faces correctly on Android.
* src/android.c (struct android_emacs_pixmap): Add mutable
constructor.
(struct android_emacs_drawable): New structure.
(android_write_event): Check if event queue hasn't yet been
initialized.
(android_select): Set errno to EINTR if pselect fails.
(android_close): Remove unused debugging code.
(android_get_home_directory): New function.
(Java_org_gnu_emacs_EmacsNative_setEmacsParams): Set pixel
density and compute game path.
(android_init_emacs_drawable): New function.
(Java_org_gnu_emacs_EmacsNative_sendKeyPress): New argument
`unicode_char'.  Pass it in events.
(Java_org_gnu_emacs_EmacsNative_sendKeyRelease): Likewise.
(Java_org_gnu_emacs_EmacsNative_sendFocusIn)
(Java_org_gnu_emacs_EmacsNative_sendFocusOut)
(Java_org_gnu_emacs_EmacsNative_sendWindowAction): New
functions.
(android_resolve_handle): Export function.
(android_change_gc): Clear clip rects under the right
circumstances.  Set right clip mask field.
(android_create_pixmap_from_bitmap_data): Use correct alpha
channels.
(android_create_pixmap): Create mutable pixmap and avoid
redundant color array allocation.
(android_create_bitmap_from_data, android_create_image)
(android_destroy_image, android_put_pixel, android_get_pixel)
(android_get_image, android_put_image, faccessat): New
functions.

* src/android.h: Update prototypes.

* src/androidfns.c (android_default_font_parameter): Prefer
monospace to Droid Sans Mono.
* src/androidfont.c (struct android_emacs_font_driver): New
method `draw'.
(struct android_emacs_font_spec): New field `dpi'.
(struct androidfont_info): Add font metrics cache.
(android_init_font_driver, android_init_font_spec): Adjust
accordingly.
(androidfont_from_lisp, androidfont_from_java): Handle new
fields.
(androidfont_draw): Implement function.
(androidfont_open_font): Set pixel size correctly.
(androidfont_close_font): Free metrics cache.
(androidfont_cache_text_extents)
(androidfont_check_cached_extents): New functions.
(androidfont_text_extents): Cache glyph metrics somewhere for
future use.
(androidfont_list_family): Implement function.

* src/androidgui.h (enum android_event_type): New focus and
window action events.
(enum android_modifier_mask): New masks.
(struct android_key_event): New field `unicode_char'.
(ANDROID_IS_MODIFIER_KEY): Newmacro.
(struct android_focus_event, struct
android_window_action_event): New structs.
(union android_event): Add new fields.
(enum android_image_format, struct android_image): New enums and
structs.

* src/androidterm.c (android_android_to_emacs_modifiers)
(android_emacs_to_android_modifiers, android_lower_frame)
(android_raise_frame, android_new_focus_frame)
(android_focus_changed, android_detect_focus_change): New
functions.
(handle_one_android_event): Implement focus and key event
handling.
(android_frame_rehighlight): New function.
(android_frame_raise_lower): Implement accordingly.
(android_make_frame_invisible): Clear highlight_frame if
required.
(android_free_frame_resources): Clear x_focus_event_frame if
required.
(android_draw_fringe_bitmap, android_draw_image_foreground)
(android_draw_image_foreground_1)
(android_draw_image_glyph_string): Remove unnecessary code.
(android_create_terminal, android_term_init): Set the baud rate
to something sensible.
* src/androidterm.h (struct android_bitmap_record): Make
structure the same as on X.
(struct android_display_info): New focus tracking fields.
(struct android_output): Likewise.
* src/dispextern.h (struct image): Add ximg and mask_img on
Android.

* src/emacs.c (android_emacs_init): Fix argc sorting iteration.

* src/fileio.c (user_homedir):
(get_homedir): Implement correctly on Android.

* src/font.h (PT_PER_INCH): Define correctly on Android.

* src/fringe.c (X, swap_nibble, init_fringe_bitmap): Swap fringe
bitmaps correctly on Android.

* src/image.c (GET_PIXEL, image_create_bitmap_from_data)
(image_create_bitmap_from_file, free_bitmap_record)
(image_unget_x_image_or_dc, struct image_type)
(prepare_image_for_display, image_clear_image_1)
(image_size_in_bytes, x_check_image_size)
(x_create_x_image_and_pixmap, x_destroy_x_image)
(image_check_image_size, image_create_x_image_and_pixmap_1)
(image_destroy_x_image, gui_put_x_image, image_put_x_image)
(image_get_x_image, image_unget_x_image)
(Create_Pixmap_From_Bitmap_Data, image_pixmap_draw_cross)
(MaskForeground, image_types, syms_of_image): Implement all of
the above on Android in terms of an API very similar to X.

* src/keyboard.c (FUNCTION_KEY_OFFSET, lispy_function_keys):
Define on Android to something sensible.

* src/lread.c (build_load_history): Fix problem.

2 years ago; Clarify doc strings of 'call-process' and 'call-process-region'
Eli Zaretskii [Mon, 2 Jan 2023 11:52:25 +0000 (13:52 +0200)]
; Clarify doc strings of 'call-process' and 'call-process-region'

* src/callproc.c (Fcall_process, Fcall_process_region): Document
that the destination buffer can be specified by its name.
(Bug#60477)

2 years agoMerge from origin/emacs-29
Stefan Kangas [Mon, 2 Jan 2023 11:06:37 +0000 (12:06 +0100)]
Merge from origin/emacs-29

4520f09dd8b ; * admin/git-bisect-start: Update failing commits
2569ede9c49 Update to Org 9.6-81-g563a43
d9ed736f0a7 ruby-ts-mode: Remove some currently unused functions
45618447203 ruby-ts-mode: Highlight singleton method definitions and ...
0562006da3b Add ruby-ts-mode
84e7c2fbc85 Fix fontification of C++ reference return types (bug#60441)
1864b65af60 ; Minor fix for treesit--install-language-grammar-1 (bug#...
8994f87ad40 Adjust function-call fontification in csharp-ts-mode (bug...
411647a3f65 ; Fix NEWS.
7b0b17df67e Rewrite Antinews in ELisp manual for Emacs 29
f12f72b0e09 ; * lisp/simple.el (primitive-undo): Clarify error messag...
7fd822e7f52 Update Antinews in the user manual for Emacs 29
da77d70deeb ; * test/lisp/emacs-lisp/copyright-tests.el: Fix and futu...
2baf9e107c1 Fix shortdoc-tests failure with respect to regexp-opt-cha...
5aeb8de32ee ; Fix copyright years in 2 more files.

# Conflicts:
# etc/NEWS

2 years ago; * admin/git-bisect-start: Update failing commits
Gregory Heytings [Mon, 2 Jan 2023 09:58:23 +0000 (09:58 +0000)]
; * admin/git-bisect-start: Update failing commits

2 years agoUpdate to Org 9.6-81-g563a43
Kyle Meyer [Mon, 2 Jan 2023 03:24:28 +0000 (22:24 -0500)]
Update to Org 9.6-81-g563a43

2 years agoruby-ts-mode: Remove some currently unused functions
Dmitry Gutov [Mon, 2 Jan 2023 01:51:11 +0000 (03:51 +0200)]
ruby-ts-mode: Remove some currently unused functions

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--grand-parent-is)
(ruby-ts--ancestor-start, ruby-ts--ancestor-is):
Remove some currently unused functions.

2 years agoruby-ts-mode: Highlight singleton method definitions and setters
Dmitry Gutov [Mon, 2 Jan 2023 01:29:15 +0000 (03:29 +0200)]
ruby-ts-mode: Highlight singleton method definitions and setters

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--font-lock-settings):
Highlight singleton method definitions and setters.

2 years agoAdd ruby-ts-mode
Perry Smith [Mon, 2 Jan 2023 00:57:38 +0000 (02:57 +0200)]
Add ruby-ts-mode

* etc/NEWS: Mention the new mode.

* lisp/progmodes/ruby-ts-mode.el: New file.

* test/lisp/progmodes/ruby-ts-mode-tests.el: New file.

* lisp/progmodes/eglot.el (eglot-server-programs):
Add ruby-ts-mode to the Ruby entry.

Co-authored-by: Dmitry Gutov <dgutov@yandex.ru>
2 years agoFix fontification of C++ reference return types (bug#60441)
Daniel Martín [Sat, 31 Dec 2022 00:45:27 +0000 (01:45 +0100)]
Fix fontification of C++ reference return types (bug#60441)

* lisp/progmodes/c-ts-mode.el (c-ts-fontify-error): Treat
reference_declarator nodes the same as pointer_declarator nodes when
calculating the identifier to fontify.

2 years ago; Minor fix for treesit--install-language-grammar-1 (bug#60465)
Yuan Fu [Mon, 2 Jan 2023 00:15:02 +0000 (16:15 -0800)]
; Minor fix for treesit--install-language-grammar-1 (bug#60465)

* lisp/treesit.el (treesit--install-language-grammar-1): Fix.

2 years agoFix build with older versions of gnutls
Andreas Schwab [Sun, 1 Jan 2023 23:31:00 +0000 (00:31 +0100)]
Fix build with older versions of gnutls

* src/gnutls.c (key_file2_aux): Use GNUTLS_PKCS_* constants only
if defined.

2 years agoAdjust function-call fontification in csharp-ts-mode (bug#60376)
Jostein Kjønigsen [Sun, 1 Jan 2023 16:27:06 +0000 (17:27 +0100)]
Adjust function-call fontification in csharp-ts-mode (bug#60376)

- Ensure method-invocations are highlighted only on level 4.
- Ensure consistent fontification of variable declarations
  (don't highlight usage of all variables).
- Fix issues with highlighting types in new() expressions.
- Fix issues with generic types in variable-declarations not using "var".
- Use fewer, more general queries for function-invocations. simplify code.

* lisp/progmodes/csharp-mode.el (csharp-ts-mode--font-lock-settings):
Change rules.
(csharp-ts-mode): Update feature list.

2 years ago; Fix NEWS.
Eli Zaretskii [Sun, 1 Jan 2023 17:38:24 +0000 (19:38 +0200)]
; Fix NEWS.

2 years agoRewrite Antinews in ELisp manual for Emacs 29
Eli Zaretskii [Sun, 1 Jan 2023 17:37:22 +0000 (19:37 +0200)]
Rewrite Antinews in ELisp manual for Emacs 29

* doc/lispref/anti.texi (Antinews): Rewrite for Emacs 29.
* doc/lispref/elisp.texi (Top): Update the top-level menu for
Antinews.

2 years ago; * lisp/simple.el (primitive-undo): Clarify error message (bug#60467)
Eli Zaretskii [Sun, 1 Jan 2023 15:49:10 +0000 (17:49 +0200)]
; * lisp/simple.el (primitive-undo): Clarify error message (bug#60467)

2 years agoUpdate Antinews in the user manual for Emacs 29
Eli Zaretskii [Sun, 1 Jan 2023 15:38:23 +0000 (17:38 +0200)]
Update Antinews in the user manual for Emacs 29

* doc/emacs/anti.texi (Antinews): Rewrite for Emacs 29.
* doc/emacs/emacs.texi (Top): Adjust the top-level menu.

2 years ago; * test/lisp/emacs-lisp/copyright-tests.el: Fix and future-safe.
Mattias Engdegård [Sun, 1 Jan 2023 12:18:50 +0000 (13:18 +0100)]
; * test/lisp/emacs-lisp/copyright-tests.el: Fix and future-safe.

2 years agoUpdate Modus themes to version 4 and add new themes
Protesilaos Stavrou [Sun, 1 Jan 2023 12:14:09 +0000 (14:14 +0200)]
Update Modus themes to version 4 and add new themes

* etc/NEWS: Document the addition of four new Modus themes.

* doc/misc/modus-themes.org: Update the manual.

* etc/themes/modus-operandi-deuteranopia-theme.el:
* etc/themes/modus-operandi-theme.el:
* etc/themes/modus-operandi-tinted-theme.el:
* etc/themes/modus-vivendi-deuteranopia-theme.el:
* etc/themes/modus-vivendi-theme.el:
* etc/themes/modus-vivendi-tinted-theme.el: Add theme files.

* etc/themes/modus-themes.el: Update main file to the latest version.

Detailed release notes here:
<https://protesilaos.com/codelog/2023-01-01-modus-themes-4-0-0/>.

The inclusion of the four new Modus themes was discussed on
emacs-devel:
<https://lists.gnu.org/archive/html/emacs-devel/2022-12/msg00834.html>.

2 years agoFix shortdoc-tests failure with respect to regexp-opt-charset
Mattias Engdegård [Sun, 1 Jan 2023 11:52:47 +0000 (12:52 +0100)]
Fix shortdoc-tests failure with respect to regexp-opt-charset

* test/lisp/emacs-lisp/shortdoc-tests.el (regexp-opt): Require.
`regexp-opt-charset` is not autoloaded, and whether `regexp-opt` is
preloaded is configuration-dependent.

2 years ago; Fix copyright years in 2 more files.
Eli Zaretskii [Sun, 1 Jan 2023 11:08:15 +0000 (13:08 +0200)]
; Fix copyright years in 2 more files.