]> git.eshelyaron.com Git - emacs.git/log
emacs.git
12 months agoSuppress warnings for obsolete display-comint-buffer-action (bug#69983)
Juri Linkov [Thu, 25 Apr 2024 17:34:28 +0000 (20:34 +0300)]
Suppress warnings for obsolete display-comint-buffer-action (bug#69983)

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

(cherry picked from commit 598505c4faa7c37133223417172223356ea02e65)

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

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

(cherry picked from commit d8687fd6cd807db1c76084a5e2bb214f9b6c9a49)

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

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

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

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

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

(cherry picked from commit 1cc6322e61275ad8b5056eb7dd43af6fe459aa0b)

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

(cherry picked from commit 42766f95e5c0e7eb9e21db964ed93c7e093cc0b9)

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

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

(cherry picked from commit 81476fa19e86f4d3a697909a87bec58a48e98d58)

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

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

(cherry picked from commit 2a533514929f2ad241bf1c6a65bdbf796bae092c)

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

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

(cherry picked from commit 90be3015b4dfe8068407dec996a48926b82d0ecb)

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

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

(cherry picked from commit afd0b548fcc5e141528a442ff9100fe8e2b98f21)

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

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

(cherry picked from commit dc720decc3a7f0cfaaaf4467c0c5d2954dec527c)

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

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

(cherry picked from commit f593bf79a91f3744daa83c8974f7fd21f6b07c3c)

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

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

(cherry picked from commit aed2b7a3d82fd16789befe3c6e4c05e20ed0ae60)

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

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

(cherry picked from commit c929532b4694a1c5d0f61ae77f4e8664706a36a1)

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

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

(cherry picked from commit e3aae5fd385bd5512f614d2273a2d6d8e95a7ce6)

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

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

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

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

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

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

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

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

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

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

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

(cherry picked from commit 98649236f5eb1d89a60ebb9cc06c71f410f6b347)

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

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

(cherry picked from commit c493f28cc948ac4aef9c262345a608b3c7d413a4)

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

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

(cherry picked from commit 88ebabe23a253ce040de94e6396bc4f587ba6e69)

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

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

(cherry picked from commit 2c8e7ebe6947b1268986dc51b0c093a68a18ce55)

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

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

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

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

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

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

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

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

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

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

(cherry picked from commit 3776539152711ca364d94f0d4f8166d6f67eb413)

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

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

(cherry picked from commit 0e9cd1d7c6f64680c9e98a7c5c373a470088d4f9)

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

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

(cherry picked from commit 3bf9a047427aab554ce228250a796fa327d9b353)

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

(cherry picked from commit 2df8bc468549523806270808ca6652de8ebc8824)

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

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

(cherry picked from commit c8c319e0b024eb2441cda786c282a094a9cd30fb)

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

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

(cherry picked from commit 67ef1d54e7e3983bb03840cf8f2990d579942710)

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

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

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

(cherry picked from commit 145a77808ebd36fffb2e9c0376f821f09733d045)

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

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

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

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

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

(cherry picked from commit d3d1be8ae56efe29e4a721c5dd4e1fa973cf9d5a)

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

(cherry picked from commit d8d4fd8c6dbe11542432fccdc31701da9f686460)

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

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

(cherry picked from commit 1601c5a518dfa208af4827c56cf9570f3b90e15d)

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

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

(cherry picked from commit 94ed2df02fa1841095041c8c26ad243052638e22)

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

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

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

(cherry picked from commit 418cade2390e4d6cd7ead1122e62742282e7b2cd)

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

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

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

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

(cherry picked from commit 3a4583baf679289857150ee8ecf20b61e59b9d37)

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

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

(cherry picked from commit 3a8d94dec136a067119ed0af2acc18664969dfbd)

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

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

(cherry picked from commit cb04549204d738603400d1fe14de7f5b59cc516f)

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

(cherry picked from commit 05008290fbbcdcf1cb8b75a447b855f94d6e4a7e)

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

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

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

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

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

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

(cherry picked from commit 956821672eb5306d4eeeae0dc07df4664cef230a)

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

(cherry picked from commit 0e139ca741a5a98abc199c9bce277d5d1f262bf3)

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

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

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

(cherry picked from commit 4a27b31c462d1cb015e28ddec8e0c43a3af0dc34)

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

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

(cherry picked from commit cd56e85c08307915941d5ae03a02569a52a2889c)

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

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

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

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

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

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

(cherry picked from commit cd7456e00d719d32c203c71b4e23c98b0c4e1967)

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

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

(cherry picked from commit d22c260cb7d43a27632750920f5238ed7947ae8d)

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

* .gitignore:

* java/Makefile.in: Fix typos.

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

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

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

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

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

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

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

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

(cherry picked from commit b9c191d690fd5d1480858469df23cc4509996fae)

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

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

(cherry picked from commit 6ae835c924124a743d4f9dc6255ff1a3bd09ba6f)

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

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

(cherry picked from commit 1f443c277a1215ab6353c47161819af155638110)

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

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

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

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

(cherry picked from commit 63765a74f15ef22109750414ec3025c8a40039f0)

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

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

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

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

(cherry picked from commit e442161f11d11e5d4cac6bb1d5920a9ec36ad29f)

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

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

(cherry picked from commit a2e327cbca1e756373109d4788ea635250d23224)

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

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

(cherry picked from commit 6f810459d892bbcb66ad715a5232656cbb99d364)

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

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

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

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

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

(cherry picked from commit 42c8e2dfceb504533c6db3f336e28dd6c94aaa70)

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

(cherry picked from commit 931cd9331363051a8cb5ef45dc37937e63b243d9)

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

* .gitignore: Ignore new generated files.

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

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

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

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

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

(cherry picked from commit 3bcdf010a9f2576bac0d7f23af70fa9dff81ef95)

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

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

(cherry picked from commit 4d9629b087fe6df941b553c6931b2f8996901e21)

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

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

(cherry picked from commit 419550c7907275bf962986e1cc8fba1989d8659c)

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

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

(cherry picked from commit 086608876ad4e3aacdce7169206482cef0cb7129)

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

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

(cherry picked from commit d51b0d2ebe4d0f55993e8e13f6d35b1eb23abf52)

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

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

(cherry picked from commit 7d6f4d90856000df805269fb620adb8bd3760717)

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

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

(cherry picked from commit ac2a4f61bdd0dc3a71a544d25de7cb36d37f44f9)

12 months agoAdd font-locking for Rust macros (bug#70464)
Noah Peart [Fri, 19 Apr 2024 01:22:05 +0000 (18:22 -0700)]
Add font-locking for Rust macros (bug#70464)

* lisp/progmodes/rust-ts-mode.el
(rust-ts-mode--font-lock-settings): Add font-locking for Rust
macro metavariables, fragment specifiers and repitition patterns.

(cherry picked from commit 5c51bc934ebb88dd9dd8b228e99c39518c92c54b)

12 months agoMake c-ts-common-comment-indent-new-line work for more cases
Yuan Fu [Mon, 22 Apr 2024 04:41:00 +0000 (21:41 -0700)]
Make c-ts-common-comment-indent-new-line work for more cases

* lisp/progmodes/c-ts-common.el:
(c-ts-common-comment-indent-new-line): Handle the case where user
types M-j in the middle of a line; and when the line starts with /**.

(cherry picked from commit ecf15513ea303a5ddf0d006b8ea6ebba665c737f)

12 months agoAdd tree-sitter comment-indent-new-line (bug#70074)
Yuan Fu [Mon, 22 Apr 2024 04:25:19 +0000 (21:25 -0700)]
Add tree-sitter comment-indent-new-line (bug#70074)

* lisp/progmodes/c-ts-common.el:
(c-ts-common-comment-indent-new-line): New function.
(c-ts-common-comment-setup): Setup comment-line-break-function and
comment-multi-line.

(cherry picked from commit 81391ae3f52a41f30137642976ae06dd49572bfe)

12 months agoImprove function signature font-lock rust-ts-mode (bug#70465)
Noah Peart [Fri, 19 Apr 2024 01:52:06 +0000 (18:52 -0700)]
Improve function signature font-lock rust-ts-mode (bug#70465)

* lisp/progmodes/rust-ts-mode.el
(rust-ts-mode--font-lock-settings): Add font-lock rule for Rust
function signatures and missing function modifier keyword 'default'.

(cherry picked from commit 91cad6df73e5d64ae5621baa8e01a295433e1e55)

12 months agoAdd treesit-add-font-lock-rules
Yuan Fu [Sat, 20 Apr 2024 07:42:25 +0000 (00:42 -0700)]
Add treesit-add-font-lock-rules

This function should help users customize font-lock rules.

* lisp/treesit.el (treesit-add-font-lock-rules): New function.

(cherry picked from commit bf5755aa91905a376e4ac9fedde6a645486e1589)

12 months agoBetter verify arguments to android-relinquish-directory-access
Po Lu [Sun, 21 Apr 2024 13:11:22 +0000 (21:11 +0800)]
Better verify arguments to android-relinquish-directory-access

* src/androidvfs.c (Fandroid_relinquish_directory_access):
Provide for NULL values from android_name_file and remote files.

* src/xdisp.c (decode_mode_spec): Don't intern file-remote-p.
(syms_of_xdisp) <Qfile_remote_p>: New defsym.

(cherry picked from commit 4773ecb93193495f141e5d60c0c5ded58eaa2c98)

12 months agoFix use of "dired" in Tramp
Michael Albinus [Sun, 21 Apr 2024 10:54:17 +0000 (12:54 +0200)]
Fix use of "dired" in Tramp

* lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory): Do not
use "--dired" when long format output isn't requested.

(cherry picked from commit 9c01da56a547f493535e73877e16ccefcb2730a0)

12 months agoRe-encode message bodies with externalized attachments during FCC
Eric Abrahamsen [Sun, 21 Apr 2024 00:25:20 +0000 (17:25 -0700)]
Re-encode message bodies with externalized attachments during FCC

Bug#70338

* lisp/gnus/message.el (message-do-fcc): If the user has requested to
externalize attachments, we can't use the cached version of the message
body from sending. This mirrors an equivalent check for GCC in
`gnus-inews-do-gcc'.

(cherry picked from commit 3dfca6f9c7f4da512fff48cf6957c6492e2c0449)

12 months agogitlab-ci.yml adaptions
Michael Albinus [Sat, 20 Apr 2024 15:49:28 +0000 (17:49 +0200)]
gitlab-ci.yml adaptions

* test/infra/gitlab-ci.yml (test-filenotify-gio, test-eglot):
Add TEST_HOME.
(test-tree-sitter): Extend SELECTOR.

(cherry picked from commit 21e33567fabdc1310005ff6f96684be514527e8d)

12 months ago(backtrace--print-func-and-args): Fix (part of) bug#70436
Stefan Monnier [Sat, 20 Apr 2024 15:23:58 +0000 (11:23 -0400)]
(backtrace--print-func-and-args): Fix (part of) bug#70436

The source of bug#70436 is that we print a value into the buffer
and then we generate its print representation a second time to
get its length to find the bounds of the thing we just printed.
Not only it's wasteful, but it risks bugs because the two
"prints" can be inconsistent with each other.

This is not a complete fix because in the non EVALD case we
still use that same broken way.

* lisp/emacs-lisp/backtrace.el (backtrace--print-func-and-args):
Don't re-print things just to get their length.
(backtrace--print-to-string): Skip a temp-buffer indirection.

(cherry picked from commit 0536b96011d24797d16d97a59a62f633a3d30472)

12 months ago(cl-print-object): Fix indirect cause of bug#70436
Stefan Monnier [Sat, 20 Apr 2024 15:17:39 +0000 (11:17 -0400)]
(cl-print-object): Fix indirect cause of bug#70436

* lisp/emacs-lisp/cl-print.el (cl-print-object): Fix specializer
for the byte-code case.

(cherry picked from commit 24ea3024ae241d1fc5fb3e05d584211070b73d5d)

12 months agoEliminate minor wart in EmacsService.java
Po Lu [Sat, 20 Apr 2024 12:44:30 +0000 (20:44 +0800)]
Eliminate minor wart in EmacsService.java

* java/org/gnu/emacs/EmacsService.java (openContentUri): Replace
arg BYTES with URI and change its type to String.

* src/android.c (android_init_emacs_service):

* src/androidvfs.c (android_authority_name)
(android_authority_open): Adjust commentary and code to match.

(cherry picked from commit 571fd42d48a0d99b7b210bd218836bd2f6ce2ccf)

12 months ago; Skip commit 00caec805810c752f0015c2ca23a494621e63046
Eshel Yaron [Mon, 22 Apr 2024 18:35:37 +0000 (20:35 +0200)]
; Skip commit 00caec805810c752f0015c2ca23a494621e63046

12 months ago; * lisp/treesit.el (treesit-parser-changed-ranges): Declare.
Eli Zaretskii [Sat, 20 Apr 2024 11:30:50 +0000 (14:30 +0300)]
; * lisp/treesit.el (treesit-parser-changed-ranges): Declare.

(cherry picked from commit 12cd8d26151907f8721f0cfe36e26294ab653708)

12 months agoKill process in files-tests before exiting
Mattias Engdegård [Sat, 20 Apr 2024 11:08:20 +0000 (13:08 +0200)]
Kill process in files-tests before exiting

* test/lisp/files-tests.el
(files-tests-file-name-non-special-start-file-process):
Make sure that the subprocess is killed before the test concludes.

(cherry picked from commit a4a136217dd20ee701d28ac1adfc828bfdd4655e)

12 months ago; Improve wording in documentation of 'not and 'null'
Eli Zaretskii [Mon, 15 Apr 2024 11:52:03 +0000 (14:52 +0300)]
; Improve wording in documentation of 'not and 'null'

* doc/lispref/control.texi (Combining Conditions):
* doc/lispref/lists.texi (List-related Predicates): Clarify
wording of 'not' vs 'null'.  (Bug#70392)

(cherry picked from commit ecb80e0e8aa6411b1e14334c2e4701208fdb238d)

12 months ago* lisp/dnd.el (dnd-handle-movement): Avoid errors (bug#70311).
Eli Zaretskii [Sun, 14 Apr 2024 10:16:29 +0000 (13:16 +0300)]
* lisp/dnd.el (dnd-handle-movement): Avoid errors (bug#70311).

(cherry picked from commit 5971aa1fd32583a8d50b67a56cf1b40f1665fca0)

12 months ago* doc/misc/calc.texi: Improve indexing.
Stefan Kangas [Sat, 13 Apr 2024 21:45:28 +0000 (23:45 +0200)]
* doc/misc/calc.texi: Improve indexing.

(cherry picked from commit bbc5204a0f3ebea32429bd01207284eead23bf22)

12 months agoAvoid "C-h for help" prompt in "C-h" commands describing keys
Eli Zaretskii [Sat, 20 Apr 2024 09:11:18 +0000 (12:11 +0300)]
Avoid "C-h for help" prompt in "C-h" commands describing keys

* lisp/info.el (Info-goto-emacs-key-command-node): Call
'read-key-sequence' instead of using 'interactive' with the "k"
code, and suppress the "C-h for help" echo.
* lisp/help.el (help--read-key-sequence): Suppress the "C-h for
help" prompt in echo-keystrokes.  Give the prompt the
'minibuffer-prompt' face.  (Bug#70432)

(cherry picked from commit 08b55ec559bd3e203abe5bbbdc2bc9135d385222)

12 months agoUpdate gravatar-tests after URL escaping change (bug#70312)
Mattias Engdegård [Sat, 20 Apr 2024 08:41:59 +0000 (10:41 +0200)]
Update gravatar-tests after URL escaping change (bug#70312)

* test/lisp/image/gravatar-tests.el (gravatar-default-image):
It seems we now escape less.

(cherry picked from commit 1bbc2fa416ce4e6b78b3a72894fe749ceef31aaf)

12 months agoWith glasses-uncapitalize-p, use a display overlay property
Augusto Stoffel [Wed, 17 Apr 2024 18:26:16 +0000 (20:26 +0200)]
With glasses-uncapitalize-p, use a display overlay property

* lisp/progmodes/glasses.el (glasses-make-readable): Use the
'display' property instead of 'after-string', so that one is
able to place the cursor on the uncapitalized character.
(Bug#70441)

(cherry picked from commit c99a1bb1cfc758d3ba78581b72ef8412ee258f76)

12 months ago* test/infra/Dockerfile.emba: Add libxml2-dev.
Michael Albinus [Sat, 20 Apr 2024 08:05:37 +0000 (10:05 +0200)]
* test/infra/Dockerfile.emba: Add libxml2-dev.

(cherry picked from commit dd2f9895116dc6774c2a63d0b1455d7766c7caac)

12 months agoComplete fix for eww-tests.el
Michael Albinus [Sat, 20 Apr 2024 07:43:30 +0000 (09:43 +0200)]
Complete fix for eww-tests.el

* test/lisp/net/eww-tests.el (eww-test/readable/toggle-display)
(eww-test/readable/default-readable): Check for libxml.  (Bug#70472)

(cherry picked from commit 3af9c33263df84f7a16bc07991f99352259121eb)

12 months ago; * lisp/progmodes/eglot.el (eglot-path-to-uri): Add comment.
Eli Zaretskii [Sat, 20 Apr 2024 07:32:34 +0000 (10:32 +0300)]
; * lisp/progmodes/eglot.el (eglot-path-to-uri): Add comment.

(cherry picked from commit 4d5fac4002412567b2b587c3cc4a1535ace0f2a8)

12 months ago; On MS-Windows, skip eglot test that creates symlinks
Eli Zaretskii [Sat, 20 Apr 2024 07:25:12 +0000 (10:25 +0300)]
; On MS-Windows, skip eglot test that creates symlinks

* test/lisp/progmodes/eglot-tests.el (eglot-test-basic-symlink):
Skip this test on MS-Windows.

(cherry picked from commit b93d568e47cd8c1a0e5f524d443287927f8a423c)

12 months ago; Fix documentation of recent commits related to treesit
Eli Zaretskii [Sat, 20 Apr 2024 06:53:35 +0000 (09:53 +0300)]
; Fix documentation of recent commits related to treesit

* src/treesit.c (Ftreesit_parser_changed_ranges):
* doc/lispref/parsing.texi (Using Parser): Fix wording.

(cherry picked from commit 42776dc5b7702cec2feb787fbf770d91623b9818)

12 months ago(track-changes--call-signal): Silence late signals
Stefan Monnier [Sat, 20 Apr 2024 02:19:00 +0000 (22:19 -0400)]
(track-changes--call-signal): Silence late signals

* lisp/emacs-lisp/track-changes.el (track-changes--call-signal):
Skip the call if the tracker was unregistered.

(cherry picked from commit 71d2ec7aba3d6ef9386e807970b0bfaa2043d128)

12 months agoTree-sitter: only update range and reparse for changed ranges
Yuan Fu [Fri, 19 Apr 2024 07:18:03 +0000 (00:18 -0700)]
Tree-sitter: only update range and reparse for changed ranges

In the very beginning, there's bug#66732, to solve that bug, we added
treesit--pre-redisplay and treesit--syntax-propertize-notifier.
However, to fix bug#66732, we were updating ranges for the whole
buffer which makes Emacs extremely slow when there are a lot of local
parsers in a large buffer.  Then to solve that we introduced a
workaround where we only update ranges in a fixed range around point.

This change fixes the original problem (bug#66732) without using that
workaround.

* lisp/treesit.el (treesit--font-lock-notifier):
(treesit--syntax-propertize-notifier): Remove functions
(treesit--pre-redisplay): Use the new function
treesit-parser-changed-ranges to get the changed ranges of the primary
parser, and only update ranges for those ranges.  Plus do the work of
the removed function.
(treesit-major-mode-setup): Remove setup for the removed functions.

(cherry picked from commit f62c1b4cd00e5b2f1cdc94796cf55d006c3113eb)

12 months agoNew function treesit-parser-changed-ranges
Yuan Fu [Wed, 17 Apr 2024 06:46:39 +0000 (23:46 -0700)]
New function treesit-parser-changed-ranges

- Add a new field last_changed_ranges to tree-sitter parser object.
- Add a new function treesit-parser-changed-ranges

* doc/lispref/parsing.texi (Using Parser): Add the function in
tree-sitter manual.
* src/treesit.c (treesit_get_changed_ranges): New function, refactored
out of treesit_call_after_change_functions.
(treesit_call_after_change_functions): Pull out
treesit_get_changed_ranges.
(treesit_ensure_parsed): Save the changed ranges to the parser object.
(make_treesit_parser): Initialize the new parser field
last_changed_ranges.
(Ftreesit_parser_changed_ranges): New function.
(Qtreesit_unparsed_edits): New error.
* src/treesit.h (Lisp_TS_Parser): New field.

(cherry picked from commit 996b9576713f9d63ea7ff7e9630a15cb0a0214eb)

12 months ago; Minor fix in tree-sitter manual section
Yuan Fu [Tue, 16 Apr 2024 06:13:20 +0000 (23:13 -0700)]
; Minor fix in tree-sitter manual section

* doc/lispref/parsing.texi (User-defined Things): Mention
treesit-defun-type-regexp.

(cherry picked from commit 8166d9d1747648d1f457195090ad36dd333bbc52)

12 months ago; Improve wording of manual entry for `peg-run'
Eric Abrahamsen [Fri, 19 Apr 2024 23:26:36 +0000 (16:26 -0700)]
; Improve wording of manual entry for `peg-run'

* doc/lispref/peg.texi (Parsing Expression Grammars): "lambda form"
isn't really a meaningful term.  Prefer plain "function", though in this
case we've used "anonymous function" to avoid ambiguity.

(cherry picked from commit e5b4d4dd1bb4d568ed20cfb7354c5ff898af7a05)

12 months agoEglot: tweak previous change (bug#70036)
João Távora [Fri, 19 Apr 2024 21:21:21 +0000 (16:21 -0500)]
Eglot: tweak previous change (bug#70036)

* lisp/progmodes/eglot.el (eglot--TextDocumentIdentifier-uri):
Rename from eglot--cached-tdi.
(eglot-handle-notification): Tweak comment.  Use
eglot--TextDocumentIdentifier-uri.
(eglot--TextDocumentIdentifier)
(eglot--signal-textDocument/didOpen): Use
eglot--TextDocumentIdentifier-uri.

* test/lisp/progmodes/eglot-tests.el (eglot-test-basic-symlink):
Address compilation warning.  Tweak comment slightly.

(cherry picked from commit f90008411e827390857a4ad25e0c40fa5d27212a)

12 months agoFix regression involving erc-query-buffer-p
F. Jason Park [Sat, 13 Apr 2024 21:58:13 +0000 (14:58 -0700)]
Fix regression involving erc-query-buffer-p

* lisp/erc/erc.el (erc-server-or-unjoined-channel-buffer-p): Doc.
(erc-query-buffer-p): Don't return non-nil in non-ERC buffers and
server buffers, and continue to honor string arguments.  The
regression was introduced by 3d87e343 "Use modern fallback for channel
name detection in ERC".  Thanks to Libera user mekeor for reporting
this bug.
* test/lisp/erc/erc-tests.el (erc-query-buffer-p): New test.
(Bug#67220)

(cherry picked from commit 473189ab6902b0488f8001fdf993522b82740663)