Po Lu [Sun, 12 Feb 2023 11:55:28 +0000 (19:55 +0800)]
Support input method ``text conversion'' on X Windows
* configure.ac (HAVE_TEXT_CONVERSION): Define on X.
* etc/NEWS: Announce new change.
* src/emacs.c (main): Always call init_xterm.
* src/frame.c (do_switch_frame): Use `fset_selected_window'.
* src/insdel.c (struct safe_del_range_context): New structure.
(safe_del_range_1, safe_del_range_2, safe_del_range): New
functions.
* src/lisp.h: Export new functions.
* src/window.c (run_window_change_functions): Report selected
window and buffer changes so that the input method can be reset.
* src/xfns.c (XICCallback, Xxic_preedit_caret_callback)
(Xxic_preedit_done_callback, Xxic_preedit_start_callback)
(Xxic_preedit_draw_callback): Fix coding style.
(Xxic_string_conversion_callback): New callback.
(create_frame_xic): Register string conversion callback.
(struct x_xim_text_conversion_data): New field `size'.
(x_encode_xim_text_1, x_encode_xim_text): New functions.
(xic_string_conversion_callback): New function.
* src/xterm.c (x_reset_conversion): New function.
(text_conversion_interface): New variable.
(init_xterm): Initialize text conversion interface.
Jim Porter [Sat, 11 Feb 2023 20:37:32 +0000 (12:37 -0800)]
Make sure core Eshell modules are loaded
Previously, if you removed all (or most) extension modules from
Eshell, it failed to load esh-var.el, meaning that you couldn't use
variable expansions. To avoid this issue, we now explicitly load the
core modules in esh-mode.el.
Michael Albinus [Sat, 11 Feb 2023 17:11:56 +0000 (18:11 +0100)]
Support Tramp user name completion
* lisp/net/tramp.el (tramp-build-completion-file-name-regexp)
(tramp-completion-handle-expand-file-name)
(tramp-completion-handle-file-name-directory): Support user name
completion.
This rule hoists stack reduction to where it is more likely to be
exploited further, may reduce the op size through smaller
immediates, and sometimes removes either or both operations
outright.
The rule is inhibited by an immediately following `return` op
because other rules will produce better code in that case.
- Add the rule
(discardN-preserve-tos|dup) OP return --> OP return
where OP is a unary operation such as `not` or `car`.
- Generalise a previous rule to
NOEFFECT PRODUCER return --> PRODUCER return
where PRODUCER is now any op that pushes a value without looking at
the stack: const, varref, point etc.
Alan Mackenzie [Sat, 11 Feb 2023 10:45:31 +0000 (10:45 +0000)]
Make edebug see unused variables when lexical-binding is non-nil
This fixes bug #59213.
* lisp/emacs-lisp/cconv.el (cconv-dont-trim-unused-variables): New variable.
(cconv-fv, cconv-make-interpreted-closure): Add/amend doc strings.
(cconv-make-interpreted-closure): Test cconv-dont-trim-unused-variables, and
if non-nil, don't "optimize" the lexical environment.
* lisp/emacs-lisp/edebug.el (edebug-make-enter-wrapper): Compile a binding of
cconv-dont-trim-unused-variables to t around the call of edebug-enter.
* lisp/emacs-lisp/testconver.el (testcover-analyze-coverage): Add a new arm to
the pcase form to handle the new form of edebug-enter.
Eli Zaretskii [Sat, 11 Feb 2023 09:48:48 +0000 (11:48 +0200)]
; Remove extraneous local variables from image-dired-*.el files
These cause annoying prompts when visiting these files, and evidently
belong to a third-party package.
* lisp/image/image-dired-external.el:
* lisp/image/image-dired-tags.el:
* lisp/image/image-dired-dired.el:
* lisp/image/image-dired-util.el: Remove unsafe local-variables.
Po Lu [Sat, 11 Feb 2023 02:26:34 +0000 (10:26 +0800)]
Fix displaying popup menus from a menu entry on Android
* java/org/gnu/emacs/EmacsActivity.java (EmacsActivity, onDestroy)
(onWindowFocusChanged): Keep track of the last focused activity.
* java/org/gnu/emacs/EmacsDialog.java (display1): Use it if
there is no current focus.
* lisp/progmodes/bug-reference.el (bug-reference-fontify): Wrap call
to syntax-ppss in save-match-data since it can clobber our
match-data (bug#61395).
Po Lu [Fri, 10 Feb 2023 13:07:14 +0000 (21:07 +0800)]
Implement more features for the Emacs ``documents provider''
* java/org/gnu/emacs/EmacsDocumentsProvider.java (queryRoots):
Implement isChild.
(getNotificationUri, notifyChange): New functions.
(queryDocument1): Set rename and remove flags.
(queryDocument, queryChildDocuments): Allow the requester to
detect changes in the directory hierarchy.
(createDocument, deleteDocument, removeDocument): Signal changes
to the directory hierarchy.
Po Lu [Fri, 10 Feb 2023 10:57:51 +0000 (18:57 +0800)]
Update Android port
* doc/emacs/android.texi (Android Windowing): Remove yet another
limitation.
* java/debug.sh: Make this work on systems which prohibit
attaching to app processes from adbd.
* java/org/gnu/emacs/EmacsCopyArea.java (perform): Avoid
creating copies whenever possible.
* java/org/gnu/emacs/EmacsSurfaceView.java (EmacsSurfaceView):
Remove SurfaceView based implementation and use manual double
buffering with invalidate instead.
* java/org/gnu/emacs/EmacsView.java (EmacsView, handleDirtyBitmap)
(raise, lower, onDetachedFromWindow): Adjust accordingly.
* java/org/gnu/emacs/EmacsWindow.java (windowUpdated): Remove
function.
* src/sfntfont.c (sfntfont_open): Set font->max_width correctly.
Po Lu [Fri, 10 Feb 2023 09:55:01 +0000 (17:55 +0800)]
Fix IUP for contours which start past end
Found with Droid Sans Mono hinted with ttfautohint 1.8.4.
* src/sfnt.c (IUP_SINGLE_PAIR): If i is initially more than end,
make it start.
(sfnt_verbose): Handle cases where interpreter->glyph_zone is
NULL.
(main): Update tests.
Jim Porter [Mon, 6 Feb 2023 05:37:08 +0000 (21:37 -0800)]
Ensure that Eshell users can run lines of command output as input
Previously, this failed to work properly because any additional input
the user entered would have no 'field' property, confusing
'eshell-get-old-input'. To fix this, we simply ensure that any
user-entered text in the output field retains said output field
(bug#61310).
* lisp/eshell/esh-util.el (eshell-command-output-properties): New
variable.
(eshell--mark-as-output, eshell--mark-yanked-as-output): New
functions, mostly copied from comint.
* lisp/eshell/esh-proc.el (eshell-interactive-process-filter):
* lisp/eshell/esh-mode.el (eshell-interactive-print): Call
'eshell--mark-as-output'.
(eshell-get-old-input): Remove properties from the returned string
just to be safe.
* test/lisp/eshell/eshell-tests.el (eshell-test-value): New variable.
(eshell-test/get-old-input/rerun-command)
(eshell-test/get-old-input/run-output): New tests.
* test/lisp/eshell/em-prompt-tests.el
(em-prompt-test/field-properties)
(em-prompt-test/field-properties/no-highlight): Use
'eshell-command-output-properties'.
Jim Porter [Wed, 25 Jan 2023 01:14:54 +0000 (17:14 -0800)]
Ensure that deferred commands don't make Eshell forget let-bound values
* lisp/eshell/esh-cmd.el (Command evaluation macros): Expand this
documentation to list allowed special forms and caveats for working
with 'if' and 'while'.
(eshell-do-eval): Provide more detail in docstring. Handle
'eshell-defer' inside 'let' forms.
* test/lisp/eshell/esh-cmd-tests.el
(esh-cmd-test/let-rebinds-after-defer): New test (bug#59469).
Juri Linkov [Thu, 9 Feb 2023 18:08:15 +0000 (20:08 +0200)]
* lisp/icomplete.el (icomplete-exhibit): Check validity of the current buffer.
This function is applicable only in buffers where functions like
icomplete--field-beg can be called, and they expects either non-nil
completion-in-region--data or window-minibuffer-p (bug#61308).
Po Lu [Thu, 9 Feb 2023 14:56:41 +0000 (22:56 +0800)]
Allow other text editors to edit files in Emacs' home directory
* java/AndroidManifest.xml.in: Declare the new documents
provider.
* java/README: Describe the meaning of files in res/values.
* java/org/gnu/emacs/EmacsDocumentsProvider.java
(EmacsDocumentsProvider): New file.
* java/res/values-v19/bool.xml:
* java/res/values/bool.xml: New files.
lisp-mode: add docstring recognition for more common lisp symbols
* lisp/emacs-lisp/lisp-mode.el (define-compiler-macro)
(define-setf-expander, deftype): Add the 'doc-string-elt'
property for proper docstring highlighting in Common Lisp.
Eli Zaretskii [Thu, 9 Feb 2023 14:06:55 +0000 (16:06 +0200)]
; Improve discoverability of empty file names handling
* doc/lispref/files.texi (Relative File Names)
(Testing Accessibility, File Name Expansion): Document and index
the behavior with empty strings as file names.
Po Lu [Thu, 9 Feb 2023 12:13:42 +0000 (20:13 +0800)]
Implement instructing compound glyphs
* src/sfnt.c (sfnt_read_simple_glyph, sfnt_read_compound_glyph)
(sfnt_read_glyph): Take size_t offsets.
(struct sfnt_compound_glyph_context)
(sfnt_expand_compound_glyph_context)
(sfnt_decompose_compound_glyph): Take size_t contour offsets.
(sfnt_decompose_glyph): Always close contour even if the first
point isn't on-curve.
(sfnt_build_outline_edges): Fix coding style.
(sfnt_interpret_iup): Skip phantom points during IUP.
(sfnt_decompose_instructed_outline): Clarify documentation.
Always close contour even if the first point isn't on-curve.
(struct sfnt_test_dcontext, sfnt_test_move_to, sfnt_test_line_to)
(sfnt_test_curve_to, sfnt_transform_f26dot6, sfnt_test_get_glyph)
(sfnt_test_free_glyph, sfnt_test_span, sfnt_test_edge_ignore)
(sfnt_interpret_compound_glyph_2, sfnt_test_edges, main): Update
tests.
Po Lu [Wed, 8 Feb 2023 15:39:46 +0000 (23:39 +0800)]
Update Android port
* src/sfnt.c (SCFS): Fix order of arguments.
(sfnt_normalize_vector): Make sure vx and vy are within a
reasonable range.
(sfnt_move): Don't move when vectors are orthogonal.
(main): Update.
Po Lu [Wed, 8 Feb 2023 14:51:43 +0000 (22:51 +0800)]
Update Android port
* doc/emacs/android.texi (Android Startup): Fix typos.
* src/sfnt.c (sfnt_interpret_msirp): Fix order in which operands
to MSIRP are popped.
(main): Reduce ppem values.
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.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-concat):
Flatten nested forms; concat is associative. This reduces the number
of calls and may coalesce adjacent constant strings.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-constant-args): Simplify.
(byte-optimize--constant-symbol-p): Speed up.
(byteopt--eval-const): New.
(byte-optimize-member, byte-optimize-concat, byte-optimize-append):
Use byteopt--eval-const instead of eval which is much slower.
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.
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.
Stefan Kangas [Wed, 8 Feb 2023 05:30:15 +0000 (06:30 +0100)]
Merge from origin/emacs-29
c9ba05af8df Fix crashes inside 'xfree' called from treesit.c 746748f5c28 Make java-ts-mode use the c-ts-common-indent-type-regexp-... 87d39a30b12 Fix c-ts-mode indentation 7cb92b53987 Fix c-ts-mode indentation d68ff6016d0 Fix c-ts-mode indentation (bug#61291) 2ac8c4bbd6f (eglot-completion-at-point): Return correct values in :co... 321cbd9a601 Tighten and simplify typescript compilation-mode regexps ... 97533e73ad6 ; * lisp/progmodes/c-ts-common.el (treesit-node-prev-sibl... 9dfccb89fc5 Clarify bug-reference-auto-setup-functions docstring. 17ab426670a * lisp/treesit.el (treesit): Fix shortdoc example form (b... 5a6dfab1e4d Use c-ts-common-statement-offset in java-ts-mode (bug#61142) c3262216abb Add array_initializer to java-ts-mode 79ab62e0bb5 go-ts-mode: Highlight variable declarations 1fab91d852e go-ts-mode: Fix highlighting of function name in call_exp... 07ffe902c63 c-ts-mode: Highlight "property functions" as functions a529b0d6463 rust-ts-mode: Fix highlighting of function name in call_e... 088425538f2 rust-ts-mode--font-lock-settings: Improve consistency 793c24a6ac7 Make sure 'M-x show-paren-local-mode' turns on right away 60089dcfe06 Add to bug-reference-auto-setup-functions after its decla... 26e947ccb14 * lisp/vc/vc.el (vc-find-revision-no-save): Fix parens (b... 948e343496b ; Fix byte-compilation warning 6568a1aaf9a Fix inability to turn show-paren-local-mode on manually (... 24085ba6105 ; go-ts-mode--indent-rules: Indent to 0 at top level 0862a79fef5 Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/... bb999df5d6f ; Fix whitespace of last change 929daafa1d6 ; Fix trivial mistake in emoji--choose-emoji d7b4a8487f6 ; * lisp/isearch.el (emoji--read-emoji): Avoid compilatio... e38ff004631 rust-ts-mode: Highlight variable declarations d12727057d4 rust-ts-mode--indent-rules: Indent to 0 at top level 85705a7059f ; Move misplaces parenthesis in emoji--choose-emoji 18c43bb9d6c Ensure upper bound of font-lock region is less than point... 94f291d1505 ; * lisp/paren.el (show-paren-predicate): Doc fix. (Bug#... 3ffd0eddce6 Highlight more complex function parameters 58dc03ba7e4 No longer use transient in isearch-emoji-by-name 0c125fcc67a Make highlighting more regular across TS modes (bug#61205) 1dd751c3ac4 ; Improve documentation of 'proper-list-p' 96181ed3f09 Document 'plistp' 03d9d18513b Fix display of raised/lowered composed text f13479d9556 Fix installation of tree-sitter grammar on MS-Windows 0358267204d Update the Emacs FAQ for Emacs 29 2c33e2889b4 Fix byte-compilation of *-ts-mode.el files b40a929a3f2 ; ruby-ts--syntax-propertize: Amend commentary b80f36b88c7 Make c-ts-mode-set-style's effect local (bug#61245) 671e5d9fad5 ; * lisp/treesit.el (treesit--font-lock-level-setter): Mi... 69380a88e92 c-ts-mode: Highlight name in parameter declarations 89b550eac29 Fix switch statement indentation for go-ts-mode (bug#61238) 1a123feb181 Fix bidi reordering of sequence of whitespace characters ... 8870b54db99 Add tests for compilation support for TypeScript (bug#61104) 873a0a15085 Add support for TypeScript compilation to compile.el (bug... 3a64f81ebc1 Don't clobber match data in 'y-or-n-p' 4c765d93ab3 Refine the previous change d99b5151f8c Add syntax-propertize-function to ruby-ts-mode f25c15ceb7d ; Fix typos 35e238cae8b Improve documentation of 'header-line-indent-mode' c3f58a66514 Don't casemap erc-sasl-user when set to :nick e444115d026 Improve keymap-global-set and keymap-local-set interactiv...
Stefan Monnier [Tue, 7 Feb 2023 23:03:22 +0000 (18:03 -0500)]
(cconv-convert): Fix regression
* lisp/emacs-lisp/cconv.el (cconv-convert, cconv-analyze-form):
Since we can't always remove the wrapper, make sure the wrapper
accepts the expected calling convention (i.e. called with no args).
Yuan Fu [Mon, 6 Feb 2023 03:32:24 +0000 (19:32 -0800)]
Fix c-ts-mode indentation
Sign, ok, there's another edge case: else if statements. Because
"else if" is usually implemented as just another if statement nested
in the else branch, this creates additional levels that indentation
needs to ignore.
I converted c-ts-common-indent-block-type-regexp +
c-ts-common-indent-bracketless-type-regexp into a new, more flexible
variable, c-ts-common-indent-type-regexp-alist, to avoid adding yet
more variables in order to recognize else and if statements.
* lisp/progmodes/c-ts-common.el:
(c-ts-common-indent-type-regexp-alist): New variable.
(c-ts-common-indent-block-type-regexp)
(c-ts-common-indent-bracketless-type-regexp): Remove variables.
(c-ts-common--node-is): New function.
(c-ts-common-statement-offset): Use the new variable, and add the
"else if" special case. Also merge the code of
c-ts-mode--fix-bracketless-indent, because now the code is much more
succinct.
(c-ts-mode--fix-bracketless-indent): Merge into
c-ts-common-statement-offset.
Dmitry Gutov [Mon, 6 Feb 2023 22:28:25 +0000 (00:28 +0200)]
(eglot-completion-at-point): Return correct values in :company-kind
* lisp/progmodes/eglot.el (eglot-completion-at-point): Return the
correct values in :company-kind for "EnumMember" and "TypeParameter".
The convention is to use kebab case rather than plain downcasing.
Reported in https://github.com/company-mode/company-mode/issues/1370.
* 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.
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)
* lisp/progmodes/bug-reference.el (bug-reference-auto-setup-functions):
Add clarification to docstring that this variable is for packages, not
for users.
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.
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.
Use c-ts-common-statement-offset in java-ts-mode (bug#61142)
* lisp/progmodes/java-ts-mode.el (java-ts-mode--indent-rules): Add new
matchers to enable c-ts-common machinery.
(java-ts-mode): Add regexps.
* lisp/progmodes/c-ts-common.el (c-ts-common-statement-offset): Fix
typo in documentation and use the new if statement helpers.
(c-ts-common-if-statement-regexp): New defvar.
(c-ts-common-nestable-if-statement-p): New defvar.
(c-ts-common--fix-nestable-if-statement): New helper.
* test/lisp/progmodes/c-ts-mode-resources/indent.erts: Add test for
complicated bracket matching indentation.
* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): Add indent
rules for bracketless statements.
Dmitry Gutov [Mon, 6 Feb 2023 02:12:25 +0000 (04:12 +0200)]
go-ts-mode: Fix highlighting of function name in call_expression
* lisp/progmodes/go-ts-mode.el (go-ts-mode--font-lock-settings):
Remove :override from the 'property' rules and move them above
'variable' (bug#61302). Just like in rust-ts-mode.
Dmitry Gutov [Sun, 5 Feb 2023 21:42:18 +0000 (23:42 +0200)]
rust-ts-mode: Fix highlighting of function name in call_expression
* lisp/progmodes/rust-ts-mode.el (rust-ts-mode--font-lock-settings):
Remove :override from the 'property' rules and move them above
'variable' (bug#61302).
* lisp/progmodes/rust-ts-mode.el (rust-ts-mode--font-lock-settings):
Remove the rule that highlighted scope identifier in a function call
as type. The existing rules will handle it when it does look like a
type (capitalized).