1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-02 08:22:22 +00:00
Commit Graph

165503 Commits

Author SHA1 Message Date
Po Lu
951bdd021f * INSTALL.android: Remove file. 2023-03-02 18:29:46 +08:00
Po Lu
cb233cb88a Fix Makefile race conditions
* configure.ac: Make cross/* and related directories.
* cross/Makefile.in (src/verbose.mk, lib/libgnu.a)
(src/config.h): Stop making directories here.
(lib-src/config.h): New config.h rule.
($(LIBSRC_BINARIES)): Add it.
(clean): Don't remove CLEAN_SUBDIRS, but clean inside.
2023-03-02 15:59:33 +08:00
Po Lu
44341959e8 Fix Android handle wraparound
* src/android.c (android_alloc_id): Return correct values upon
wraparound.
2023-03-02 13:48:03 +08:00
Po Lu
09aa948ab4 Improve criteria for restoring fullscreen state on Android
* java/Makefile.in ($(CLASS_FILES) &): Touch all class files,
even those javac chose not to rebuild.

* java/org/gnu/emacs/EmacsActivity.java (onWindowFocusChanged):
Restore fullscreen state here.
(onResume): And not here.
2023-03-02 12:30:36 +08:00
Po Lu
424077fadf Fix sectioning of android texi files
* doc/emacs/android.texi (Android):
* doc/emacs/emacs.texi (Top, GNU Free Documentation License):
Rearrange menu and sectioning.
2023-03-02 10:50:08 +08:00
Po Lu
7fb3c0d039 Update Android port
* doc/emacs/android.texi (Android Windowing): Reword
documentation.
* java/org/gnu/emacs/EmacsActivity.java (EmacsActivity):
* java/org/gnu/emacs/EmacsContextMenu.java (EmacsContextMenu):
* java/org/gnu/emacs/EmacsFontDriver.java (EmacsFontDriver):
* java/org/gnu/emacs/EmacsSdk7FontDriver.java
(EmacsSdk7FontDriver):
* java/org/gnu/emacs/EmacsService.java (queryBattery):
* java/org/gnu/emacs/EmacsWindow.java (EmacsWindow): Make
functions final and classes static where necessary.
* src/android.c (struct android_emacs_service): New method
`display_toast'.
(android_init_emacs_service): Load new method.
(android_display_toast): New function.
* src/android.h: Export.
* src/androidfns.c (Fandroid_detect_mouse):
* src/androidselect.c (Fandroid_clipboard_owner_p)
(Fandroid_set_clipboard, Fandroid_get_clipboard)
(Fandroid_browse_url): Prevent crashes when called from
libandroid-emacs.so.
* src/androidterm.c (handle_one_android_event): Fix out of date
commentary.
2023-03-02 09:27:37 +08:00
Po Lu
5e416d02c5 Merge remote-tracking branch 'origin/master' into feature/android 2023-03-02 08:38:06 +08:00
Michael Albinus
4b99015e15 Make Tramp file name completion more quiet
* lisp/net/tramp-sh.el (tramp-perl-file-name-all-completions):
Don't print status message.
(tramp-sh-handle-file-name-all-completions): Return nil when check
fails.  (Bug#61890)

* test/lisp/net/tramp-tests.el
(tramp-test26-file-name-completion-with-perl):
(tramp-test26-file-name-completion-with-ls): New tests.
2023-03-01 17:07:59 +01:00
Mattias Engdegård
42f4691388 Simplify effect-free code elimination
* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
Simplify overly defensive code.  This does not affect code generation.
2023-03-01 13:37:06 +01:00
Po Lu
daf9c62871 Fix out-of-tree Android builds
* configure.ac (JAVA_PUSH_LINT): Push to WARN_JAVAFLAGS instead
of JAVAFLAGS.
(cross/lib): Always AS_MKDIR_P.
* cross/Makefile.in (srcdir): New variable.
(LIB_SRCDIR): Take realpath relative to srcdir, not
.:(src/verbose.mk): Depend on verbose.mk.android in srcdir.
(lib/Makefile): Edit srcdir and VPATH to LIB_SRCDIR.
(src/Makefile): Edit -I$$(top_srcdir) to -I../$(srcdir)/lib,
instead of ommitting it.
(clean): Allow ndk-build clean to fail.

* java/Makefile.in (builddir): New variable.
(WARN_JAVAFLAGS): Likewise.
(JAVAFLAGS): Define in terms of WARN_JAVAFLAGS.
(SIGN_EMACS, SIGN_EMACS_V2): Use emacs.keystore relative to
srcdir.  Allow inclusion of ndk-build.mk to fail.
(install_temp, emacs.apk-in)
(../config.status): Depend relative to top_srcdir.
(AndroidManifest.xml, $(APK_NAME)): Likewise.
(RESOURCE_FILE, CLASS_FILES, classes.dex): Output class files
to $(srcdir); these are arch independents, so this is okay.
2023-03-01 19:35:19 +08:00
Po Lu
a0c3643abd Merge remote-tracking branch 'origin/master' into feature/android 2023-03-01 15:55:20 +08:00
Po Lu
920168c5d8 Fix mostlyclean rules
* cross/Makefile.in: Remove outdated comment.
* src/Makefile.in: (.PHONY): Clean android-emacs and
libemacs.so, not emacs.so and aemacs.
2023-03-01 15:54:57 +08:00
Po Lu
ad8e12b9f9 Update Android port
* doc/emacs/android.texi (Android File System): Document new
behavior of starting a subprocess from /assets.
* java/org/gnu/emacs/EmacsWindow.java (onSomeKindOfMotionEvent):
Don't use isFromSource where not present.
* src/androidterm.c (android_scroll_run): Avoid undefined
behavior writing to bitfields.
* src/callproc.c (get_current_directory): When trying to run a
subprocess inside /assets, run it from the home directory
instead.
2023-03-01 15:49:02 +08:00
Po Lu
194b3f948c Update Android port
* java/AndroidManifest.xml.in: Specify @style/EmacsStyle.
* java/org/gnu/emacs/EmacsActivity.java (onCreate): Stop setting
the theme here.
* java/res/values-v11/style.xml:
* java/res/values-v14/style.xml:
* java/res/values-v29/style.xml:
* java/res/values/style.xml: Extract style resources into
res/values.
2023-03-01 14:31:57 +08:00
Stefan Kangas
522b82118d ; Merge from origin/emacs-29
The following commit was skipped:

ec1dea7b43 ; Auto-commit of loaddefs files.
2023-03-01 06:30:20 +01:00
Stefan Kangas
4a5335158d Merge from origin/emacs-29
97a83ff31f Eglot: fix M-x eglot-show-workspace-configuration (bug#61...
48a0804d10 ruby-mode: Fix method call indentation in rhs of multiple...
16d012cf3b * lisp/net/tramp.el (tramp-remote-path): Improve docstring.
b371697cdc Minor change in 'dired--find-possibly-alternative-file'
c2b5c6acc5 Implement prefix arg for 'c-ts-mode-toggle-comment-style'
eb2ab52fb0 Defaults to zero for image-dired--number-of-thumbnails
5dc163f592 ; Add a doc string for 'ediff-window-display-p' obsolescence
2023-03-01 06:30:20 +01:00
Stefan Kangas
5b037331f6 Update SKK-JISYO.L from upstream
* leim/SKK-DIC/SKK-JISYO.L: Update from
https://raw.githubusercontent.com/skk-dev/dict/master/SKK-JISYO.L
2023-03-01 06:00:53 +01:00
Stefan Kangas
8ca5cb2564 Update publicsuffix.txt from upstream
* etc/publicsuffix.txt: Update from
https://publicsuffix.org/list/public_suffix_list.dat
dated 2023-02-28 02:16:27 UTC.
2023-03-01 06:00:51 +01:00
Stefan Kangas
93461e100c ; Auto-commit of loaddefs files. 2023-03-01 05:08:22 +01:00
Stefan Kangas
ec1dea7b43 ; Auto-commit of loaddefs files. 2023-03-01 05:07:53 +01:00
Po Lu
15bcb446be Update Android port
* java/Makefile.in (ETAGS, clean): New rules to generate tags.
* java/org/gnu/emacs/EmacsActivity.java (EmacsActivity):
* java/org/gnu/emacs/EmacsApplication.java (EmacsApplication):
* java/org/gnu/emacs/EmacsContextMenu.java (EmacsContextMenu):
* java/org/gnu/emacs/EmacsCopyArea.java (EmacsCopyArea):
* java/org/gnu/emacs/EmacsDialog.java (EmacsDialog)::(dialog.
Then):
* java/org/gnu/emacs/EmacsDocumentsProvider.java
(EmacsDocumentsProvider):
* java/org/gnu/emacs/EmacsDrawLine.java (EmacsDrawLine):
* java/org/gnu/emacs/EmacsDrawPoint.java (EmacsDrawPoint):
* java/org/gnu/emacs/EmacsDrawRectangle.java
(EmacsDrawRectangle):
* java/org/gnu/emacs/EmacsFillPolygon.java (EmacsFillPolygon):
* java/org/gnu/emacs/EmacsFillRectangle.java
(EmacsFillRectangle):
* java/org/gnu/emacs/EmacsGC.java (EmacsGC):
* java/org/gnu/emacs/EmacsInputConnection.java
(EmacsInputConnection):
* java/org/gnu/emacs/EmacsNative.java (EmacsNative):
* java/org/gnu/emacs/EmacsNoninteractive.java
(EmacsNoninteractive):
* java/org/gnu/emacs/EmacsOpenActivity.java (EmacsOpenActivity):
* java/org/gnu/emacs/EmacsPixmap.java (EmacsPixmap):
* java/org/gnu/emacs/EmacsPreferencesActivity.java
(EmacsPreferencesActivity):
* java/org/gnu/emacs/EmacsSdk11Clipboard.java
(EmacsSdk11Clipboard):
* java/org/gnu/emacs/EmacsSdk23FontDriver.java
(EmacsSdk23FontDriver):
* java/org/gnu/emacs/EmacsSdk8Clipboard.java
(EmacsSdk8Clipboard):
* java/org/gnu/emacs/EmacsService.java (EmacsService):
* java/org/gnu/emacs/EmacsSurfaceView.java (EmacsSurfaceView)
(buffers):
* java/org/gnu/emacs/EmacsView.java (EmacsView, ViewGroup):
* java/org/gnu/emacs/EmacsWindow.java (EmacsWindow, drawables):
* java/org/gnu/emacs/EmacsWindowAttachmentManager.java
(EmacsWindowAttachmentManager): Make classes final where
appropriate.
2023-03-01 12:00:46 +08:00
Po Lu
f8a2619d98 More fixes to JNI error checking
* src/android.c (android_query_tree, android_get_geometry)
(android_translate_coordinates, android_query_battery):
Correctly handle result of GetTArrayElements.
(android_exception_check_nonnull): New function.
* src/android.h:
* src/androidselect.c (Fandroid_get_clipboard): Likewise.
2023-03-01 09:30:01 +08:00
João Távora
97a83ff31f Eglot: fix M-x eglot-show-workspace-configuration (bug#61866)
Now consult .dir-locals.el every time the workspace configuration is
needed:

- workspace/configuration server request
- workspace/didChangeConfiguration signal
- M-x eglot-show-workspace-configuration

The major-mode/hack-dir-local-variables-non-file-buffer trick is used.
When there is more than one, the server connection's "main" major mode
is used to find the relevant .dir-locals.el section.

* lisp/progmodes/eglot.el (eglot--lookup-mode): Fix docstring.
(eglot--connect): Simplify.
(eglot-show-workspace-configuration): Fix.
(eglot--workspace-configuration): Remove.
(eglot--workspace-configuration-plist): Rework.
(eglot-handle-request): Simplify.
2023-03-01 01:22:40 +00:00
Po Lu
49d5aa3657 Merge remote-tracking branch 'origin/master' into feature/android 2023-03-01 09:15:08 +08:00
Dmitry Gutov
48a0804d10 ruby-mode: Fix method call indentation in rhs of multiple assignment
* lisp/progmodes/ruby-mode.el (ruby-smie-rules): Special-case
assignment that follows a comma-separated list (bug#61871).

* test/lisp/progmodes/ruby-mode-resources/ruby.rb: Add case.
2023-02-28 23:01:04 +02:00
Mattias Engdegård
68cc286c04 Fix some useless condition-case forms
* lisp/progmodes/cperl-mode.el (cperl-calculate-indent):
* lisp/progmodes/verilog-mode.el (verilog--suppressed-warnings):
Add error handler, seemingly the intention here.
* lisp/url/url-gw.el (url-open-stream): Remove condition-case;
it was neutered in 2006.
2023-02-28 17:12:54 +01:00
Michael Albinus
16d012cf3b * lisp/net/tramp.el (tramp-remote-path): Improve docstring. 2023-02-28 16:42:11 +01:00
Michael Albinus
316ba78a73 Improve warning in tramp-handle-unlock-file
* lisp/net/tramp.el (tramp-connectable-p): Simplify.
(tramp-handle-unlock-file): Improve warning.
2023-02-28 15:33:52 +01:00
Felix
b371697cdc Minor change in 'dired--find-possibly-alternative-file'
* lisp/dired.el (dired--find-possibly-alternative-file): Don't
kill the buffer if the directory is shown in other windows.

Copyright-paperwork-exempt: yes
2023-02-28 16:11:24 +02:00
Felix
c2b5c6acc5 Implement prefix arg for 'c-ts-mode-toggle-comment-style'
* lisp/progmodes/c-ts-mode.el (c-ts-mode-toggle-comment-style):
Actually implement the optional numeric arg mentioned in the
docstring.

Copyright-paperwork-exempt: yes
2023-02-28 15:31:49 +02:00
Manuel Giraud
eb2ab52fb0 Defaults to zero for image-dired--number-of-thumbnails
* lisp/image/image-dired.el (image-dired--number-of-thumbnails):
Defaults zero to avoid wrong type argument error.  (Bug#61734)
2023-02-28 15:25:07 +02:00
Eli Zaretskii
5dc163f592 ; Add a doc string for 'ediff-window-display-p' obsolescence
* lisp/vc/ediff-init.el (ediff-window-display-p): Document how to
prevent Ediff from creating additional frames, now that this
function can no longer be used or advised for that.  (Bug#61850)
2023-02-28 15:15:27 +02:00
Po Lu
03c0cb8671 Merge remote-tracking branch 'origin/master' into feature/android 2023-02-28 18:20:25 +08:00
Po Lu
d96dac96e7 Update Android port
* src/sfnt.c (main):
* src/sfntfont.c (sfntfont_get_glyph_outline): Remove outdated
comment.
2023-02-28 18:20:05 +08:00
Stefan Kangas
c5d319af47 Merge from origin/emacs-29
613de66281 Rename the newly added -ref- faces to -use-
f601e9666d Eglot: support multiple labels in same inlay hint
4a5eda7ed2 Eglot: don't paint hints outside requested region (bug#61...
11c1aa1eb1 ; * doc/misc/gnus.texi: Fix last change.
44949c292f ; Add `nnimap-user' to Gnus manual
6c7078c66f ; * lisp/progmodes/c-ts-mode.el (treesit-node-prev-siblin...
3d0a6c9baa Eglot: protect against unintended field text motion (bug#...
647e40f4a0 ; And yet another fix to eglot-current-linepos-function's...
9d0f856a16 Fix description of 'desktop-save-mode'
aee10ca1cb Adjust tree-sitter defun navigation (bug#61617)
edf5b97686 Simplify c-ts-mode--top-level-label-matcher
0f15286c53 New tree-sitter indent anchor standalone-parent used by c...

# Conflicts:
#	etc/NEWS
2023-02-28 06:30:13 +01:00
Dmitry Gutov
613de66281 Rename the newly added -ref- faces to -use-
* lisp/font-lock.el (font-lock-variable-use-face)
(font-lock-property-use-face): Rename from font-lock-variable-ref-face
and font-lock-property-ref-face.  Update all references (bug#61655).
2023-02-28 04:08:55 +02:00
Augusto Stoffel
93f557af0e New user option 'grep-use-headings'
* lisp/progmodes/grep.el (grep-heading-regexp): New user option.
(grep-heading): New face (bug#59888).
(grep--heading-format, grep--heading-state, grep--heading-filter):
Filter function for grep processes and supporting variables.
(grep-use-headings): New user option.
(grep-mode): Use the above, if applicable.
2023-02-27 21:14:47 +02:00
Augusto Stoffel
b699c38028 Introduce 'compilation-annotation' text property
It is meant to mark parts of compilation buffers which do not
correspond to process output (bug#59888).

* lisp/progmodes/compile.el (compilation-insert-annotation): New
function.
(compilation-start, compilation-handle-exit): Use it.
(compilation--ensure-parse) Rely on 'compilation-annotation' property
instead of 'compilation-header-end'.
2023-02-27 21:14:41 +02:00
João Távora
b5c1303253 * lisp/icomplete.el (fido-mode): Enable in-buffer completion (bug#45763). 2023-02-27 20:40:48 +02:00
Juri Linkov
a7a984c0eb * lisp/icomplete.el: Fix in-buffer completion.
(icomplete-force-complete-and-exit, icomplete-force-complete): Use
'icomplete--field-beg/end' when not in the minibuffer to not erase
the current buffer.  Also disable 'completion-in-region-mode' instead
of calling 'exit-minibuffer' (bug#45764, bug#51575, bug#61479).
2023-02-27 20:32:53 +02:00
João Távora
f601e9666d Eglot: support multiple labels in same inlay hint
Mainly the rust-analyzer LSP server uses this.  There are still more
things we could support, like tooltips and stuff.

* lisp/progmodes/eglot.el (lsp-interface-alist): Add
InlayHintLabelPart.
(eglot--update-hints-1): Support multiple labels for same hint.
2023-02-27 14:54:53 +00:00
João Távora
4a5eda7ed2 Eglot: don't paint hints outside requested region (bug#61812)
* lisp/progmodes/eglot.el (eglot--lambda): Add cl-block.
(eglot--update-hints-1): Return early if hint is outside the
requested inlay hint range.
2023-02-27 14:23:53 +00:00
Mattias Engdegård
1767d18c91 Adjust some pure and side-effect-free function declarations
* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns):
Add `format-message` and `substring-no-properties`.
* lisp/subr.el (number-sequence, copy-tree, looking-at-p)
(string-match-p, string-trim-right, string-lines):
Declare side-effect-free.
(syntax-class, version-list-<, version-list-=, version-list-<=)
(version-list-not-zero): Declare pure and side-effect-free.
(ensure-list): Declare side-effect-free and error-free.
(string-equal-ignore-case): Remove `pure` declaration.
We may want it to be pure but right now it's not.
2023-02-27 14:34:22 +01:00
Mattias Engdegård
443c249d85 Warn about condition-case without handlers
Omitting handlers from a `condition-case` form makes it useless
since no errors are caught.

* lisp/emacs-lisp/macroexp.el (macroexp--expand-all): New warning.
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-test--with-suppressed-warnings): Add test case.
* etc/NEWS: Announce.
2023-02-27 14:34:22 +01:00
Eli Zaretskii
11c1aa1eb1 ; * doc/misc/gnus.texi: Fix last change. 2023-02-27 14:32:57 +02:00
Arash Esbati
44949c292f ; Add `nnimap-user' to Gnus manual
* doc/misc/gnus.texi (Customizing the IMAP Connection): Document
backend variable `nnimap-user' which was introduced with commit
5e68f8614f in 2011.
Add index entries for all backend variables.  (bug#61837)
2023-02-27 14:30:29 +02:00
Eli Zaretskii
6c7078c66f ; * lisp/progmodes/c-ts-mode.el (treesit-node-prev-sibling): Declare. 2023-02-27 14:11:13 +02:00
João Távora
3d0a6c9baa Eglot: protect against unintended field text motion (bug#61726)
Suggested-by: Augusto Stoffel <arstoffel@gmail.com>

* lisp/progmodes/eglot.el (eglot--bol): New helper.
(eglot-utf-8-linepos, eglot-utf-16-linepos)
(eglot-utf-32-linepos, eglot-move-to-utf-8-linepos)
(eglot-move-to-utf-16-linepos, eglot-move-to-utf-32-linepos)
(eglot-handle-notification, eglot--xref-make-match)
(eglot-completion-at-point): Use it.
2023-02-27 11:36:22 +00:00
João Távora
647e40f4a0 ; And yet another fix to eglot-current-linepos-function's docstring
bug#61726

* lisp/progmodes/eglot.el (eglot-current-linepos-function):
Another fix.
2023-02-27 11:36:22 +00:00
Eli Zaretskii
9d0f856a16 Fix description of 'desktop-save-mode'
* doc/emacs/misc.texi (Saving Emacs Sessions): Adjust to changes
in 'desktop-path'.  Reported by Petteri Hintsanen <petterih@iki.fi>.
2023-02-27 13:31:47 +02:00