1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 18:40:39 -08:00
Commit graph

171879 commits

Author SHA1 Message Date
Eli Zaretskii
a7d51085cf Improve documentation of 'package-enable-at-startup'
* doc/emacs/package.texi (Package Installation): Clarify how to
customize 'package-enable-at-startup'.

* lisp/emacs-lisp/package.el (package-enable-at-startup): Add note
about customization.  (Bug#70402)
2024-04-27 11:52:30 +03:00
Yuan Fu
53333132e4
Fix c-ts-common--fill-paragraph for C
This should fix the failing filling test for c-ts-mode.

* lisp/progmodes/c-ts-common.el (c-ts-common--fill-paragraph): Don't
go back to indentation.
2024-04-26 19:56:26 -07:00
Po Lu
db8f7ed7f6 Enable customization of the quit key on Android
* doc/emacs/android.texi (Android Windowing):

* doc/emacs/input.texi (On-Screen Keyboards): Document various
tidbits related to the quit key.

* java/org/gnu/emacs/EmacsNative.java (getQuitKeycode): New
function.

* java/org/gnu/emacs/EmacsWindow.java (EmacsWindow): Rename
`lastVolumeButtonRelease' to `lastQuitKeyRelease'.
(onKeyUp): Treat value returned by getQuitKeycode as the quit
key rather than mandate KEYCODE_VOLUME_DOWN.

* src/android.c (getQuitKeycode): Implement new function.

* src/androidterm.c (syms_of_androidterm)
<android_quit_keycode>: New variable.
2024-04-27 10:47:12 +08:00
Gerd Möllmann
763eaa5a32 Fix gud-lldb-command-name
* lisp/progmodes/gud.el (gud-gud-lldb-command-name): Change to
gud-lldb-command-name.
(lldb): Don't do stuff that is not needed for lldb.
2024-04-26 12:25:28 +02:00
Philip Kaludercic
758fe9b670 Always update VC packages from a vc-dir buffer
* lisp/emacs-lisp/package-vc.el (vc-dir-prepare-status-buffer):
Add a declaration.
(package-vc-upgrade): Prepare a dummy vc-dir buffer to ensure
that 'vc-pull' (or rather 'vc-deduce-fileset') can correctly
infer the VC backend to use.  (bug#70526)
2024-04-26 08:21:37 +02:00
Juri Linkov
32ed3d2679 * lisp/tab-line.el: Fix tab-line-buffers in window-persistent-parameters.
Replace '(tab-line-buffers . writable)' with '(tab-line-buffers . t)'
in 'window-persistent-parameters' (bug#69993).
2024-04-25 20:39:56 +03:00
Juri Linkov
598505c4fa 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'.
2024-04-25 20:34:28 +03:00
Eli Zaretskii
98649236f5 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)
2024-04-25 19:34:42 +03:00
john muhl
c493f28cc9 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.
2024-04-25 18:39:30 +03:00
Eshel Yaron
a45ae6bce9
; 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.
2024-04-25 14:49:39 +02:00
Mattias Engdegård
88ebabe23a 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.
2024-04-25 11:39:21 +02:00
Po Lu
2c8e7ebe69 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.
2024-04-25 10:54:27 +08:00
Po Lu
3776539152 Disable unsuitable XPM color selection mechanism on Android
* src/image.c (xpm_load_image) [HAVE_ANDROID]: Always select
XPM_COLOR_KEY_C.
2024-04-24 16:33:53 +08:00
Gerd Möllmann
0e9cd1d7c6 Fix tbreak for LLDB
* lisp/progmodes/gud.el (lldb): Use _regexp-tbreak command.
2024-04-24 09:33:50 +02:00
Eli Zaretskii
3bf9a04742 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.
2024-04-24 10:02:22 +03:00
Michael Albinus
2df8bc4685 ; Remove comment in eglot-tests.el 2024-04-24 08:28:20 +02:00
Yuan Fu
c8c319e0b0
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.
2024-04-23 22:55:36 -07:00
Yuan Fu
67ef1d54e7
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 //.
2024-04-23 22:55:36 -07:00
Po Lu
145a77808e 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.
2024-04-24 11:45:31 +08:00
Po Lu
d3d1be8ae5 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.
2024-04-24 11:42:48 +08:00
Eli Zaretskii
d8d4fd8c6d ; * lisp/progmodes/eglot.el (eglot-path-to-uri): Improve commentary. 2024-04-23 21:28:09 +03:00
Daniel Semyonov
1601c5a518 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.
2024-04-23 11:20:01 -07:00
Michael Albinus
94ed2df02f Revert skip on eglot-tests.el
* test/lisp/progmodes/eglot-tests.el (eglot-test-basic-symlink):
Comment out skip on EMBA.
2024-04-23 17:08:06 +02:00
João Távora
418cade239 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.
2024-04-23 08:44:43 -05:00
João Távora
3a4583baf6 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.
2024-04-23 08:44:43 -05:00
Andrea Corallo
3a8d94dec1 Run admin/syncdoc-type-hierarchy.el
* doc/lispref/elisp_type_hierarchy.jpg: Update.
* doc/lispref/elisp_type_hierarchy.txt: Likewise.
2024-04-23 15:39:28 +02:00
Andrea Corallo
cb04549204 * 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.
2024-04-23 15:37:04 +02:00
Andrea Corallo
05008290fb * admin/syncdoc-type-hierarchy.el (org): Add missing require. 2024-04-23 15:35:44 +02:00
Eshel Yaron
2234fe929a
(completion-preview-prev-candidate): add numeric prefix argument
* lisp/completion-preview.el (completion-preview-prev-candidate):
Add numeric prefix argument N.
(completion-preview-next-candidate): Update documentation.
2024-04-23 14:35:45 +02:00
Eshel Yaron
6b26644300
; Fix Completion Preview mode mouse-click bindings
* lisp/completion-preview.el (completion-preview--ignore): New
internal command.
(completion-preview--internal-commands): Add it.
(completion-preview--mouse-map): Use it to fix bindings.
2024-04-23 14:35:38 +02:00
Michael Albinus
956821672e 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)
2024-04-23 13:54:09 +02:00
Michael Albinus
0e139ca741 * test/lisp/progmodes/eglot-tests.el (eglot-test-basic-symlink): Skip on EMBA. 2024-04-23 13:24:35 +02:00
Michael Albinus
4a27b31c46 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.
2024-04-23 13:24:09 +02:00
Po Lu
cd56e85c08 ; Fix default Android tile mode
* java/org/gnu/emacs/EmacsGC.java (markDirty): Use rather REPEAT
than MIRROR.
2024-04-23 17:09:50 +08:00
Po Lu
326437e6c8 Merge remote-tracking branch 'savannah/master' into master-android-1 2024-04-23 15:59:06 +08:00
Po Lu
cd7456e00d 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.
2024-04-23 15:57:45 +08:00
Eli Zaretskii
d22c260cb7 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.
2024-04-23 10:02:39 +03:00
Po Lu
b9c191d690 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.
2024-04-23 14:30:38 +08:00
Yuan Fu
6ae835c924
; 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.
2024-04-22 21:56:22 -07:00
Vincenzo Pupillo
1f443c277a
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.
2024-04-22 21:56:22 -07:00
Karl Fogel
63765a74f1 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.
2024-04-22 14:53:23 -05:00
Mattias Engdegård
e442161f11 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.
2024-04-22 19:27:24 +02:00
F. Moukayed
a2e327cbca 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).
2024-04-22 07:56:01 -07:00
Michael Albinus
6f810459d8 ; Fix last commit
* test/infra/Makefile.in:
* test/infra/gitlab-ci.yml:
* test/infra/test-jobs.yml: Do not quote make_params.
2024-04-22 16:54:07 +02:00
Michael Albinus
42c8e2dfce 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.
2024-04-22 13:38:10 +02:00
Po Lu
931cd93313 ; * java/Makefile.in: Fix typos. 2024-04-22 16:37:01 +08:00
Po Lu
3bcdf010a9 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.
2024-04-22 16:30:15 +08:00
Yuan Fu
4d9629b087
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.
2024-04-21 23:58:46 -07:00
Juri Linkov
419550c790 * 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.
2024-04-22 09:54:18 +03:00
Juri Linkov
086608876a * 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).
2024-04-22 09:50:45 +03:00