]> git.eshelyaron.com Git - emacs.git/log
emacs.git
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)

12 months agoAdd erc--skip message property
F. Jason Park [Fri, 19 Apr 2024 05:18:57 +0000 (22:18 -0700)]
Add erc--skip message property

* lisp/erc/erc-backend.el (erc-server-connect): Add `erc--skip'
property to `erc--msg-prop-overrides' so that timestamps only show up
with the first server-sent message.
(erc-server-PRIVMSG): Move `erc--msg-prop-overrides' declaration to
top-level.
* lisp/erc/erc-button.el (erc-button--display-error-notice-with-keys):
Use `erc--skip' msg prop instead of `erc-stamp--skip' variable.
* lisp/erc/erc-stamp.el (erc-stamp--skip): Remove variable.
(erc-stamp--allow-unmanaged, erc-stamp--allow-unmanaged-p): Rename
former to latter to remain consistent with convention used by other
quasi-internal compatibility-related switches.
(erc-add-timestamp): Check `erc--skip' property instead of deleted
variable `erc-stamp--skip'.
* lisp/erc/erc.el (erc--msg-props): Mention `erc--skip' in doc.
(erc--check-msg-prop): Doc.
(erc--memq-msg-prop): New function.
(erc--ranked-properties): Add `erc--skip'.
* test/lisp/erc/erc-scenarios-stamp.el
(erc-scenarios-stamp--legacy-date-stamps): Revise to expect
"opening connection.." to appear above first stamp.
* test/lisp/erc/erc-tests.el (erc--memq-msg-prop): New test.
(Bug#60936)

(cherry picked from commit 6000e48e0d7d5742ba817942f1b0dbbda9315ddc)

12 months agoDon't nest date stamp insertions in erc-stamp
F. Jason Park [Mon, 8 Apr 2024 21:21:43 +0000 (14:21 -0700)]
Don't nest date stamp insertions in erc-stamp

* etc/ERC-NEWS: Don't mention certain insertion-adjacent hooks being
suppressed for date stamps, which is no longer true.
* lisp/erc/erc-common.el (erc--solo): New utility function.
* lisp/erc/erc-fill.el (erc-fill-wrap): Don't move last-message marker
when encountering a date stamp.
* lisp/erc/erc-stamp.el (erc-stamp--recover-on-reconnect): Restore
`erc-stamp--date-stamps' on reconnect and rejoin.
(erc-stamp--insert-date-hook): Fix erroneous doc string.
(erc-stamp--date): New struct type.
(erc-stamp--deferred-date-stamp): New internal variable to pass state
between hook members.
(erc-stamp--date-stamps): New internal variable to store a reference
to all inserted timestamps.
(erc-stamp--propertize-left-date-stamp): Don't hide messages because
this function runs on `erc-insert-modify-hook'.  Prefer doing so
later, in `erc-insert-post-hook'.
(erc-stamp--find-insertion-point): New helper function.
(erc-stamp--insert-date-stamp-as-phony-message): Remove.
(erc-stamp--lr-date-on-pre-modify): Remove function.  Portions of body
now appear in `erc-stamp--defer-date-insertion-on-post-modify'.
(erc-stamp--defer-date-insertion-on-post-modify)
(erc-stamp--defer-date-insertion-on-post-insert)
(erc-stamp--defer-date-insertion-on-post-send): New functions,
although the first incorporates parts of the now defunct
`erc-stamp--lr-date-on-pre-modify'.
(erc-stamp--date-mode): Update hook-member functions.
(erc-stamp-prepend-date-stamps-p): Revise doc.
(erc-insert-timestamp-left-and-right): Remove code to initialize a
date stamp in place through a nested call to `erc-display-message'.
Instead, "pre-render" date stamp and stash it for retrieval by
the function `erc-stamp--defer-date-insertion-on-post-modify'.
(erc-stamp--setup): Kill variables `erc-stamp--deferred-date-stamp'
and `erc-stamp--date-stamps'.
(erc-stamp--reset-on-clear): Remove trimmed stamps from
`erc-stamp--date-stamps'.
* lisp/erc/erc.el (erc--msg-props): Document `erc--hide' in doc
string.
(erc--with-inserted-msg): Remove unused macro.
(erc--insert-line-splice-function): New variable.
(erc--with-spliced-insertion): New macro.
(erc--insert-line-function): Expand doc string.
(erc--remove-from-prop-value-list): Tweak doc string.
(erc--insert-before-markers-transplanting-hidden): New function.
(erc--hide-message): Remember managed `invisible' prop value.  Do so
by recording them in the `erc--hide' "msg prop".
(erc--delete-inserted-message, erc--delete-inserted-message-naively):
Rename former to latter to emphasize that it's largely impractical for
general use.
(erc--ranked-properties): Add `erc--hide'.
* test/lisp/erc/erc-button-tests.el
(erc-button-tests--erc-button-alist--function-as-form): Use
`erc-display-message' helper.
* test/lisp/erc/erc-fill-tests.el (erc-fill-tests--insert-privmsg)
(erc-fill-tests--wrap-populate, erc-fill-wrap-tests--merge-action)
(erc-fill-line-spacing): Use `erc-display-message' wrappers to
intercept `erc-timer-hook' modifications.
* test/lisp/erc/erc-scenarios-match.el
(erc-scenarios-match--invisible-stamp): Add convenience commands to
`extended-command-history' when running interactively.
* test/lisp/erc/erc-tests.el
(erc--insert-before-markers-transplanting-hidden): New test.
(erc--delete-inserted-message, erc--delete-inserted-message-naively):
Update test name as well as namesake function in body.
* test/lisp/erc/resources/erc-scenarios-common.el
(erc-scenarios-common-with-cleanup): Validate `erc-stamp--date-stamps'
members after every scenario test.
(erc-scenarios-common--assert-date-stamps): New function.
* test/lisp/erc/resources/erc-tests-common.el: Require `erc-stamp'
atop file when compiling.
(erc-tests--common-display-message)
(erc-tests-common-display-message)
(erc-tests-common-with-date-aware-display-message): New functions and
macro for running `erc-display-message' while intercepting additions
to `erc-timer-hook' made by date-stamp-related post-insertion hooks.
(erc-tests-common-snapshot-compare): Insert expected output into its
own buffer for easier review during interactive sessions.  This change
is unrelated to the rest of this commit.  (Bug#60936)

(cherry picked from commit 86184cba2180a09b31e92f7366f9dd38de5b976a)

12 months agoImprove erc-fill-wrap-merge refilling and movement
F. Jason Park [Fri, 12 Apr 2024 07:04:50 +0000 (00:04 -0700)]
Improve erc-fill-wrap-merge refilling and movement

* lisp/erc/erc-fill.el (erc-fill--wrap-escape-hidden-speaker): Add
parameter to suppress escaping of hidden prefixes.
(erc-fill--wrap-beginning-of-line): Remember original value of point,
and pass it to `erc-fill--wrap-escape-hidden-speaker'.
(erc-fill--wrap-previous-line, erc-fill--wrap-next-line): Guard call
to `erc-fill--wrap-escape-hidden-speaker' with conditional check for
`erc-fill-wrap-merge'.
(erc-fill--wrap-insert-merged-pre): Add additional text property,
`erc-fill--wrap-merge', to help identify `display' regions servicing
`erc-fill-wrap-merge'.  This should make resolving inconsistencies
easier when "splicing" new messages between existing ones.
(erc-fill-wrap): Add `erc-fill--wrap-merge' text property to merged
speaker region.
(erc-fill--wrap-rejigger-region): Remove assertion disallowing a
non-nil `erc-fill--wrap-rejigger-last-message'.  Instead, adopt the
existing value of that variable when shadowing it for the remaining
extent of the function's execution.  When removing the `display'
property, also look for nonempty replacement text, such as values
specified by the option `erc-fill-wrap-merge-indicator'.
(erc-fill--wrap-merged-button-p): Look for `erc-fill--wrap-merge'
property instead of `display'.
* test/lisp/erc/resources/fill/snapshots/merge-01-start.eld: Update.
* test/lisp/erc/resources/fill/snapshots/merge-02-right.eld: Update.
* test/lisp/erc/resources/fill/snapshots/merge-wrap-01.eld: Update.
* test/lisp/erc/resources/fill/snapshots/merge-wrap-indicator-pre-01.eld:
Update.
* test/lisp/erc/resources/fill/snapshots/spacing-01-mono.eld: Update.
(Bug#60936)

(cherry picked from commit 21b372a57bb0cab9ebdf93843090081eb4715030)

12 months agoSimplify option erc-merge-wrap-merge-indicator
F. Jason Park [Fri, 12 Apr 2024 07:04:50 +0000 (00:04 -0700)]
Simplify option erc-merge-wrap-merge-indicator

* lisp/erc/erc-fill.el (erc-fill-wrap-merge-indicator): Reduce
offering of acceptable values by removing leading symbols and ditching
the `post' variant entirely.  The justification for the latter move
hinges on it not being well suited to next-gen requirements involving
the splicing and deletion of inserted messages.  Meeting these would
be overly burdensome and involve scanning the buffer in both
directions for every such operation.  This option is new in ERC 5.6,
which is yet unreleased.
(erc-fill--wrap-massage-legacy-indicator-type): New function to warn
of obsolete `erc-fill-wrap-merge-indicator' value and perform a
migration for the current session.
(erc-fill-wrap, erc-fill-wrap-enable): Preform preflight compat check
for obsolete `erc-fill-wrap-merge-indicator' value types.
(erc-fill-wrap-disable): Don't bother killing nonexistent variable
`erc-fill--wrap-merge-indicator-post'.
(erc-fill--wrap-merge-indicator-post): Remove unused variable.
(erc-fill--wrap-insert-merged-post): Remove unused function.
(erc-fill--wrap-insert-merged-pre): Adapt to simplified format for
option `erc-merge-wrap-merge-indicator'.
(erc-fill-wrap): Remove conditional dispatch because there is only one
path and only one indicator style.
(erc-fill--wrap-rejigger-region): Remove reference to nonexistent
variable `erc-fill--wrap-merge-indicator-post'.
* test/lisp/erc/erc-fill-tests.el
(erc-fill-wrap--merge-action/indicator-pre): Update format of value
for option `erc-fill-wrap-merge-indicator'.
(erc-fill-wrap--merge-action/indicator-post): Remove test focusing on
obsolete and unsupported `post' variant of option
`erc-fill-wrap-merge-indicator'.
(erc-fill--wrap-massage-legacy-indicator-type): New test.
* test/lisp/erc/resources/fill/snapshots/merge-wrap-indicator-post-01.eld:
Delete file.  (Bug#60936)

(cherry picked from commit c572c30fb121008e5b248688ebe319dd85633c72)

12 months ago; Improve erc-services and upgrade documentation
F. Jason Park [Mon, 8 Apr 2024 02:28:24 +0000 (19:28 -0700)]
; Improve erc-services and upgrade documentation

* doc/misc/erc.texi (Getting Help and Reporting Bugs): Describe
alternate method for upgrading from GNU ELPA.  This is a partial
workaround for bug#68660 discovered by ERC contributor Alcor.
* lisp/erc/erc-backend.el (erc-call-hooks): Add comment.
* lisp/erc/erc-services.el (erc-nickserv-alist): Doc.
* test/lisp/erc/erc-scenarios-base-renick.el
(erc-scenarios-base-renick-queries-bouncer): Adjust timeout.

(cherry picked from commit ff1d1f6df16a57acd699b18bdaa4baadff8269a1)

12 months agoMake publishDiagnostics faster by using cached variable
Theodor Thornhill [Fri, 19 Apr 2024 18:40:25 +0000 (20:40 +0200)]
Make publishDiagnostics faster by using cached variable

* lisp/progmodes/eglot.el (eglot--cached-tdi): Move variable.
(eglot-handle-notification): Expose 'server' and search through managed
buffers for a cached textDocumentIdentifier, which has a file-truename
resolved path.
* test/lisp/progmodes/eglot-tests.el (eglot-test-basic-symlink): Add
regression test for symlink behavior

(cherry picked from commit 49ef173b0287e17273e4476df16dca5f2196b11c)

12 months ago; * test/lisp/net/eww-tests.el (eww-test/display/html): Check for libxml.
Jim Porter [Fri, 19 Apr 2024 17:37:16 +0000 (10:37 -0700)]
; * test/lisp/net/eww-tests.el (eww-test/display/html): Check for libxml.

(cherry picked from commit 82775f21413681b09c888527b5d2fb15354f0793)

12 months agoNew user option tramp-inhibit-errors-if-setting-file-attributes-fail
Michael Albinus [Fri, 19 Apr 2024 10:15:47 +0000 (12:15 +0200)]
New user option tramp-inhibit-errors-if-setting-file-attributes-fail

* doc/misc/tramp.texi (Frequently Asked Questions):
Explain tramp-inhibit-errors-if-setting-file-attributes-fail.

* lisp/net/tramp.el
(tramp-inhibit-errors-if-setting-file-attributes-fail): New defcustom.
(tramp-skeleton-set-file-modes-times-uid-gid): Use it.

(cherry picked from commit 52d3ee46dbc6fb0fbcfbb8e446fb385aef189893)

12 months ago* java/INSTALL: Update instructions.
Po Lu [Fri, 19 Apr 2024 09:38:58 +0000 (17:38 +0800)]
* java/INSTALL: Update instructions.

(cherry picked from commit 2675c2824f77f46476831e637e4bc0fec692a0f1)

12 months ago(eglot--signal-textDocument/didChange): Fix tests
Stefan Monnier [Fri, 19 Apr 2024 03:39:30 +0000 (23:39 -0400)]
(eglot--signal-textDocument/didChange): Fix tests

The tests call `eglot--signal-textDocument/didChange` eagerly,
which means in the case where we use `track-changes` that they
call it before the tracker's signal has been called.
So make sure we fetch pending changes even if we haven't yet
been notified of them, and make sure `eglot--versioned-identifier`
is incremented even when the signal is not called.

* lisp/progmodes/eglot.el (eglot--track-changes-fetch)
(eglot--after-change): Increment `eglot--versioned-identifier` here...
(eglot--track-changes-signal): ...instead of here.
(eglot--signal-textDocument/didChange): Try and fetch changes even if the
tracker's signal wasn't called yet.

* test/lisp/progmodes/eglot-tests.el (eglot-tests--get): New function.
(eglot-tests--lsp-abiding-column-1): Use it.

(cherry picked from commit c833892140fbf4be45161bf85d4c1253c5503949)

12 months agoDrag tabs to reorder buffers on the tab line.
Juri Linkov [Thu, 18 Apr 2024 17:28:16 +0000 (20:28 +0300)]
Drag tabs to reorder buffers on the tab line.

* lisp/tab-line.el (tab-line-mouse-move-tab):
New command bound to [tab-line drag-mouse-1].

(cherry picked from commit a3f6d92714c31ccb87f56b13ee2606c05493c87d)

12 months agoBetter way to fix bug#70036
João Távora [Thu, 18 Apr 2024 13:03:10 +0000 (08:03 -0500)]
Better way to fix bug#70036

Cache a new eglot--cached-tdi var per buffer, which contains value to
return from eglot--TextDocumentIdentifier.

This avoids frequent expensive recomputation of a value that requires
potentially many 'file-truename' calls.  This technique is used in a
number of other cases already, like eglot--recent-changes or
eglot--versioned-identifier.

* lisp/progmodes/eglot.el (eglot--cached-tdi): New variable.
(eglot--TextDocumentIdentifier): Tweak.
(eglot--signal-textDocument/didOpen): Clear eglot--cached-tdi.

(cherry picked from commit 3228c1222c99e672ca0cd7599c07ea1db852aa1a)

12 months agoRevert "Don't use file-truepath in Eglot (bug#70036)"
João Távora [Thu, 18 Apr 2024 08:55:17 +0000 (03:55 -0500)]
Revert "Don't use file-truepath in Eglot (bug#70036)"

This reverts commit 08c80c45ddea17df87fc768a39dff353ccc13d3b.

It introduces bugs when a project contains symlinked files.  The server
will be informed of duplicate documents which are really the same and it
frequently has no means to deduplicate such information.

This leads to bugs such as excessive textDocument/references to a
function.

* lisp/progmodes/eglot.el (eglot-lsp-server): Revert change.
(eglot-uri-to-path): Revert change.
(eglot--on-shutdown): Revert change.
(eglot--managed-mode): Revert change.
(eglot-handle-notification textDocument/publishDiagnostics): Revert change.

(cherry picked from commit 306feb7d967ecea9c916dd6e25b2e84a3f1c714e)

12 months ago; Alphabetize go-ts-mode's treesit-font-lock-feature-list
Randy Taylor [Thu, 18 Apr 2024 13:38:28 +0000 (09:38 -0400)]
; Alphabetize go-ts-mode's treesit-font-lock-feature-list

* lisp/progmodes/go-ts-mode.el (go-ts-mode):
Rearrange features to keep alphabetical order.  (Bug#70362)

(cherry picked from commit c308f5687060423938a0a72ab39505451f223e8a)

12 months agoDon't error on tabbing to a widget at BOB (bug#69943)
Stephen Berman [Thu, 18 Apr 2024 13:35:49 +0000 (15:35 +0200)]
Don't error on tabbing to a widget at BOB (bug#69943)

* lisp/wid-edit.el (widget-move): Don't move backward when at
beginning of buffer, and keep point on widget's left side.

* test/lisp/wid-edit-tests.el (widget-test-widget-move): Test that
moving to a widget at beginning of buffer does not signal a
beginning-of-buffer error.

(cherry picked from commit 94dec95317994f36f1355b972850d9565b61c433)

12 months agoEnsure that specbind arg is always bare symbol, and drop check
Mattias Engdegård [Thu, 18 Apr 2024 10:59:35 +0000 (12:59 +0200)]
Ensure that specbind arg is always bare symbol, and drop check

* src/eval.c (FletX, Flet, internal_lisp_condition_case)
(funcall_lambda): Ensure that the first argument to `specbind` is
a bare symbol in the few cases where this isn't statically guaranteed.
(specbind): Drop the symbol argument type check on the fast path.

(cherry picked from commit 0a57dfcff8d0abcf4427cfbfd886264bb3b8eaab)

12 months agoDrop unnecessary type check in varref and varset byte ops
Mattias Engdegård [Thu, 18 Apr 2024 10:26:10 +0000 (12:26 +0200)]
Drop unnecessary type check in varref and varset byte ops

* src/bytecode.c (exec_byte_code):
We can safely assume that the immediate argument to varref and varset
is a bare symbol; the byte-compiler should guarantee that.

(cherry picked from commit dba115d6bcbc955858526740254bd9a169830d7e)

12 months ago; * lisp/comint.el: Fix wording of last change.
Eli Zaretskii [Thu, 18 Apr 2024 10:45:22 +0000 (13:45 +0300)]
; * lisp/comint.el: Fix wording of last change.

(cherry picked from commit d29d4a1d7b07806291b95792a821f8937746a467)

12 months agoObsolete comint-osc symbols moved to ansi-osc.el
Augusto Stoffel [Sun, 14 Apr 2024 07:43:27 +0000 (09:43 +0200)]
Obsolete comint-osc symbols moved to ansi-osc.el

* lisp/comint.el (comint-osc-handlers)
(comint-osc-directory-tracker, comint-osc-hyperlink-handler)
(comint-osc-hyperlink, comint-osc-hyperlink-map): Mark as
obsolete.  (Bug#70375)

(cherry picked from commit 11b1610c72a09950140cdf2284e9960af0f4a574)

12 months agoAdd YANG LSP support to Eglot
Siddharth Sharma [Fri, 12 Apr 2024 16:11:58 +0000 (18:11 +0200)]
Add YANG LSP support to Eglot

* lisp/progmodes/eglot.el (eglot-server-programs): Add
'yang-language-server' and 'json-ts-mode'.  (Bug#70364)

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

12 months ago; Minor change in last commit
Eli Zaretskii [Thu, 18 Apr 2024 10:30:20 +0000 (13:30 +0300)]
; Minor change in last commit

* lisp/progmodes/go-ts-mode.el (go-ts-mode--font-lock-settings):
Rearrange features to keep alphabetical order.  (Bug#70362)

(cherry picked from commit c7bcda4ac54f31ae2724cdc3b3c884c37b667b22)

12 months agoAdd font-locking for Go built-in functions in go-ts-mode
Noah Peart [Sat, 13 Apr 2024 05:38:28 +0000 (22:38 -0700)]
Add font-locking for Go built-in functions in go-ts-mode

* lisp/progmodes/go-ts-mode.el (go-ts-mode--font-lock-settings):
Add font-locking for Go built-in functions to 'go-ts-mode'.
(Bug#70362)

(cherry picked from commit 9055dad65d722850eaec049acbce15829638fd61)

12 months ago; Fix last change
Eli Zaretskii [Thu, 18 Apr 2024 10:08:23 +0000 (13:08 +0300)]
; Fix last change

* lisp/url/url-util.el (url-build-query-string): Move to after the
definition of 'url-query-key-value-allowed-chars'.

(cherry picked from commit f6c20ed5d5c22ce95df752f482df03209c7c8c42)

12 months agoAvoid unnecessary escaping in 'url-build-query-string'
Dagfinn Ilmari Mannsåker [Tue, 9 Apr 2024 14:02:45 +0000 (15:02 +0100)]
Avoid unnecessary escaping in 'url-build-query-string'

* lisp/url/url-util.el (url-query-key-value-allowed-chars):
New defconst.
(url-build-query-string): Use it to escape only those
characters that need it in keys and values.
* test/lisp/url/url-util-tests.el (url-util-tests): Add
new test cases.  (Bug#70312)

(cherry picked from commit 40629706b1ff1a2a596420dd2ac388b7e5fc656c)

12 months agoFlymake support for indicating errors in margin
Elias G. B. Perez [Sat, 6 Apr 2024 19:57:30 +0000 (13:57 -0600)]
Flymake support for indicating errors in margin

Add optional support for display flymake error in margin,
this allow displaying error indicators in both graphical and
terminal frames.
* doc/misc/flymake.texi (Customizable variables)
(Flymake error types): Document new margin indicator.
* etc/NEWS: Announce the new Flymake user option for margin
indicators.
* lisp/progmodes/flymake.el (flymake-indicator-type)
(flymake-margin-indicators-string, flymake-autoresize-margins)
(flymake-margin-indicator-position): New user options.
(flymake--original-margin-width): Add buffer-local variable for
store original buffer margin width.
(flymake-error, flymake-warning, flymake-note): Use new margin
value.
(flymake--indicator-overlay-spec): Rework and Rename from
flymake--fringe-overlay-spec.
(flymake--resize-margins): Add new function for resize margin
width.
(flymake--highlight-line, flymake-mode): Rework.

(cherry picked from commit 3c4f6c78b4b2ae0b1efadf5e664fa180e663037e)

12 months agoFix sending input to SQL when point is not at EOB
Eli Zaretskii [Thu, 18 Apr 2024 08:53:26 +0000 (11:53 +0300)]
Fix sending input to SQL when point is not at EOB

* lisp/progmodes/sql.el (sql-send-string): Move point to EOB
before sending input to the SQL process.  Suggested by Gary Hollis
<ghollisjr@gmail.com>.  (Bug#69420)

(cherry picked from commit bb9d81d5144ae497809c416eef91d126f8ac5df5)

12 months ago; * etc/NEWS: Reindent and refill recently added entries.
Eli Zaretskii [Thu, 18 Apr 2024 08:45:47 +0000 (11:45 +0300)]
; * etc/NEWS: Reindent and refill recently added entries.

(cherry picked from commit b993c1b2752dcfe8bf6c17e58430a90b3dda5952)

12 months ago* lisp/tab-line.el: Use the new keyword :key for 'sort'.
Juri Linkov [Thu, 18 Apr 2024 06:36:18 +0000 (09:36 +0300)]
* lisp/tab-line.el: Use the new keyword :key for 'sort'.

(tab-line-tabs-fixed-window-buffers): Use :key for 'sort'.
Rename the window parameter 'tab-line-fixed-window-buffers'
to shorter 'tab-line-buffers'.  Add '(tab-line-buffers . writable)
to window-persistent-parameters.

(cherry picked from commit b585fb8171dd139f178c398c64c584565deacfb1)

12 months agoCorrectly verify availability of Android content URIs
Po Lu [Thu, 18 Apr 2024 02:37:31 +0000 (10:37 +0800)]
Correctly verify availability of Android content URIs

* java/org/gnu/emacs/EmacsService.java (checkContentUri): Call
checkUriPermission with IPC-effective PID and UID rather than
checkCallingUriPermission, which never considers permissions of
Emacs itself, and delete the now-redundant workaround.

(cherry picked from commit c19b988c2967f13597b7a3ceafb7c3cd40d83458)

12 months agoPropagate 'lexical-binding' value to pp buffers
Augusto Stoffel [Sun, 14 Apr 2024 07:36:05 +0000 (09:36 +0200)]
Propagate 'lexical-binding' value to pp buffers

See bug#70137.

* lisp/emacs-lisp/pp.el (pp-display-expression): Set lexical-binding to
match the value in the calling buffer.

(cherry picked from commit 3cdd86b8affa6d58de8f6d07b4e117676fedd58c)

12 months agoDocument earlier change in eglot-report-progress
Theodor Thornhill [Wed, 17 Apr 2024 18:27:35 +0000 (20:27 +0200)]
Document earlier change in eglot-report-progress

* lisp/progmodes/eglot.el (eglot-report-progress): Document the changed
behavior.
* etc/EGLOT-NEWS (https): Mention the change.

(cherry picked from commit 0dbd9ed04660152276696e462359204a45ca933d)

12 months ago(conf-toml-recognize-section): Fix bug#70383
Stefan Monnier [Wed, 17 Apr 2024 18:30:10 +0000 (14:30 -0400)]
(conf-toml-recognize-section): Fix bug#70383

* lisp/textmodes/conf-mode.el (conf-toml-recognize-section): Move
point, like font-lock matchers are expected to do.

(cherry picked from commit c15c9f4de62b5bf06d6ccdb5bbada4f542108a38)