]> git.eshelyaron.com Git - emacs.git/log
emacs.git
22 months agoFix mostlyclean rules
Po Lu [Wed, 1 Mar 2023 07:54:57 +0000 (15:54 +0800)]
Fix mostlyclean rules

* cross/Makefile.in: Remove outdated comment.
* src/Makefile.in: (.PHONY): Clean android-emacs and
libemacs.so, not emacs.so and aemacs.

22 months agoUpdate Android port
Po Lu [Wed, 1 Mar 2023 07:49:02 +0000 (15:49 +0800)]
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.

22 months agoUpdate Android port
Po Lu [Wed, 1 Mar 2023 06:31:57 +0000 (14:31 +0800)]
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.

22 months agoUpdate Android port
Po Lu [Wed, 1 Mar 2023 04:00:46 +0000 (12:00 +0800)]
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.

22 months agoMore fixes to JNI error checking
Po Lu [Wed, 1 Mar 2023 01:30:01 +0000 (09:30 +0800)]
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.

22 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Wed, 1 Mar 2023 01:15:08 +0000 (09:15 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

22 months agoFix some useless condition-case forms
Mattias Engdegård [Tue, 28 Feb 2023 16:07:06 +0000 (17:07 +0100)]
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.

22 months agoImprove warning in tramp-handle-unlock-file
Michael Albinus [Tue, 28 Feb 2023 14:33:52 +0000 (15:33 +0100)]
Improve warning in tramp-handle-unlock-file

* lisp/net/tramp.el (tramp-connectable-p): Simplify.
(tramp-handle-unlock-file): Improve warning.

22 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Tue, 28 Feb 2023 10:20:25 +0000 (18:20 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

22 months agoUpdate Android port
Po Lu [Tue, 28 Feb 2023 10:20:05 +0000 (18:20 +0800)]
Update Android port

* src/sfnt.c (main):
* src/sfntfont.c (sfntfont_get_glyph_outline): Remove outdated
comment.

22 months agoMerge from origin/emacs-29
Stefan Kangas [Tue, 28 Feb 2023 05:30:13 +0000 (06:30 +0100)]
Merge from origin/emacs-29

613de662811 Rename the newly added -ref- faces to -use-
f601e9666d8 Eglot: support multiple labels in same inlay hint
4a5eda7ed2a Eglot: don't paint hints outside requested region (bug#61...
11c1aa1eb12 ; * doc/misc/gnus.texi: Fix last change.
44949c292f9 ; Add `nnimap-user' to Gnus manual
6c7078c66f4 ; * lisp/progmodes/c-ts-mode.el (treesit-node-prev-siblin...
3d0a6c9baa6 Eglot: protect against unintended field text motion (bug#...
647e40f4a0c ; And yet another fix to eglot-current-linepos-function's...
9d0f856a167 Fix description of 'desktop-save-mode'
aee10ca1cbe Adjust tree-sitter defun navigation (bug#61617)
edf5b976869 Simplify c-ts-mode--top-level-label-matcher
0f15286c539 New tree-sitter indent anchor standalone-parent used by c...

# Conflicts:
# etc/NEWS

22 months agoRename the newly added -ref- faces to -use-
Dmitry Gutov [Tue, 28 Feb 2023 02:07:55 +0000 (04:07 +0200)]
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).

22 months agoNew user option 'grep-use-headings'
Augusto Stoffel [Wed, 7 Dec 2022 17:44:07 +0000 (18:44 +0100)]
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.

22 months agoIntroduce 'compilation-annotation' text property
Augusto Stoffel [Thu, 8 Dec 2022 20:05:10 +0000 (21:05 +0100)]
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'.

22 months ago* lisp/icomplete.el (fido-mode): Enable in-buffer completion (bug#45763).
João Távora [Mon, 27 Feb 2023 18:40:48 +0000 (20:40 +0200)]
* lisp/icomplete.el (fido-mode): Enable in-buffer completion (bug#45763).

22 months ago* lisp/icomplete.el: Fix in-buffer completion.
Juri Linkov [Mon, 27 Feb 2023 18:32:53 +0000 (20:32 +0200)]
* 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).

22 months agoEglot: support multiple labels in same inlay hint
João Távora [Mon, 27 Feb 2023 14:54:53 +0000 (14:54 +0000)]
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.

22 months agoEglot: don't paint hints outside requested region (bug#61812)
João Távora [Mon, 27 Feb 2023 14:23:35 +0000 (14:23 +0000)]
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.

22 months agoAdjust some `pure` and `side-effect-free` function declarations
Mattias Engdegård [Sun, 26 Feb 2023 15:56:24 +0000 (16:56 +0100)]
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.

22 months agoWarn about `condition-case` without handlers
Mattias Engdegård [Mon, 27 Feb 2023 12:57:48 +0000 (13:57 +0100)]
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.

22 months ago; * doc/misc/gnus.texi: Fix last change.
Eli Zaretskii [Mon, 27 Feb 2023 12:32:57 +0000 (14:32 +0200)]
; * doc/misc/gnus.texi: Fix last change.

22 months ago; Add `nnimap-user' to Gnus manual
Arash Esbati [Mon, 27 Feb 2023 09:10:13 +0000 (10:10 +0100)]
; 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)

22 months ago; * lisp/progmodes/c-ts-mode.el (treesit-node-prev-sibling): Declare.
Eli Zaretskii [Mon, 27 Feb 2023 12:11:13 +0000 (14:11 +0200)]
; * lisp/progmodes/c-ts-mode.el (treesit-node-prev-sibling): Declare.

22 months agoEglot: protect against unintended field text motion (bug#61726)
João Távora [Mon, 27 Feb 2023 11:29:32 +0000 (11:29 +0000)]
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.

22 months ago; And yet another fix to eglot-current-linepos-function's docstring
João Távora [Mon, 27 Feb 2023 11:04:44 +0000 (11:04 +0000)]
; And yet another fix to eglot-current-linepos-function's docstring

bug#61726

* lisp/progmodes/eglot.el (eglot-current-linepos-function):
Another fix.

22 months agoFix description of 'desktop-save-mode'
Eli Zaretskii [Mon, 27 Feb 2023 11:31:47 +0000 (13:31 +0200)]
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>.

22 months ago* lisp/calc/calc.el (calcDigit-backspace): Hush warning.
Mattias Engdegård [Mon, 27 Feb 2023 09:40:11 +0000 (10:40 +0100)]
* lisp/calc/calc.el (calcDigit-backspace): Hush warning.

22 months agoImprove delete-consecutive-dups doc precision and add test
Mattias Engdegård [Sun, 26 Feb 2023 13:34:58 +0000 (14:34 +0100)]
Improve delete-consecutive-dups doc precision and add test

* lisp/subr.el (delete-consecutive-dups): Document which element of
each run is retained (the earliest in the list).  This matters because
it makes it safe to ignore the return value.
* test/lisp/subr-tests.el (subr--delete-dups)
(subr--delete-consecutive-dups): Add tests.

22 months agoAdjust tree-sitter defun navigation (bug#61617)
Yuan Fu [Mon, 27 Feb 2023 08:14:32 +0000 (00:14 -0800)]
Adjust tree-sitter defun navigation (bug#61617)

Before this change, when you use a tree-sitter navigation function to
move to the next beginning of a thing, it jumps over the immediate
next thing and lands you at the beginning of the next-next thing.

Eg, when point is at the "|", and we evaluate
(treesit--navigate-thing pos 1 'beg), we go from

|  (thing) (thing)

to

   (thing) |(thing)

But some might expect point to go to

   |(thing) (thing)

instead, which makes sense.  Also, that's how Emacs expect defun
navigation functions to work.  The discrepancy in expectation causes
bug#61617.

In this change I made tree-sitter navigation functions to work as what
Emacs expects.  And what I described for moving to the next beginning
of thing is similarly applicable to moving to the end of previous end
of thing.

* lisp/treesit.el (treesit-beginning-of-defun)
(treesit-end-of-defun): Handle the case where defun-skipper moves
point back to where we started, by adding a retry.

(treesit--navigate-thing): Add a single condition checking for
progress to the condition form responsible for checking whether to
skip the next defun.  Namely (eq pos (funcall advance next)))).

* test/src/treesit-tests.el:
(treesit--ert-defun-navigation-nested-master)
(treesit--ert-defun-navigation-top-level-master): Change tests to
reflect the new expectation.

22 months agoSimplify c-ts-mode--top-level-label-matcher
Yuan Fu [Mon, 27 Feb 2023 02:24:49 +0000 (18:24 -0800)]
Simplify c-ts-mode--top-level-label-matcher

* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--top-level-label-matcher): Make more assumptions and remove
the loop, so it's faster in large files.

22 months agoNew tree-sitter indent anchor standalone-parent used by c-ts-mode
Yuan Fu [Mon, 27 Feb 2023 02:05:13 +0000 (18:05 -0800)]
New tree-sitter indent anchor standalone-parent used by c-ts-mode

When writing c-ts-mode Theo used parent-bol which works well except
one case:

1 for (int i=0;
2      i < 5;
3      i++) {
4   func(i);
5 }

In this case, when indenting "func(i)", parent-bol returns the start
of "i++" on line 3, instead of the "correct" anchor, the start of
"for" on line 1.  parent-bol would have worked if the "for (...) {"
part is in one line.

To support this case I tried numerous things and added a bunch of
stuff, culminating in c-ts-common-statement-offset.  It's complicated,
requires extra setup, and slow.

Not anymore! I think the new anchor standalone-parent really captures
the logic behind how people expect indentation to work. It's simple
and fast, and requires no setup.

* doc/lispref/modes.texi (Parser-based Indentation): Update manual.

* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--standalone-grandparent): New anchor.
(c-ts-mode--indent-styles): Replace c-ts-common-statement-offset with
standalone-parent.
(c-ts-base-mode): Add comment.

* lisp/treesit.el:
(treesit-simple-indent-presets): New anchor standalone-parent.

22 months agoMerge from origin/emacs-29
Stefan Kangas [Mon, 27 Feb 2023 05:30:20 +0000 (06:30 +0100)]
Merge from origin/emacs-29

267fc6d00c4 ruby-smie-rules: Fix misindentation of a method call afte...
0fde314f6f6 * lib-src/etags.c (process_file_name): Free malloc'ed var...
dde9d149af3 ; Improve documentation of loading *.eln files
7c552be89da ; Another doc fix in eglot.el
75c65fcc98e ; Fix last change
a3d15c1f749 ; Fix last change
ca79b138d42 Eglot: rename and redocument encoding-related functions (...
3e3e6d71be7 Eglot: support positionEncoding LSP capability (bug#61726)
b0e87e930e8 Eglot: use faster strategy for moving to LSP positions (b...
5b174b96834 Fix mule-tests in UTF-8 locales
5256392a7ec Fix 'vertical-motion' when display strings are around
0db88d625a7 ; * src/treesit.c (treesit_predicate_match): Fix typo.

22 months agoruby-smie-rules: Fix misindentation of a method call after assignment
Dmitry Gutov [Mon, 27 Feb 2023 00:05:56 +0000 (02:05 +0200)]
ruby-smie-rules: Fix misindentation of a method call after assignment

* lisp/progmodes/ruby-mode.el (ruby-smie-rules): Fix indentation of a
method call after assignment with ruby-after-operator-indent=nil
(bug#61822).

* test/lisp/progmodes/ruby-mode-resources/ruby-after-operator-indent.rb:
Add corresponding example.

22 months ago* lib-src/etags.c (process_file_name): Free malloc'ed vars (bug#61819).
Eli Zaretskii [Sun, 26 Feb 2023 18:03:20 +0000 (20:03 +0200)]
* lib-src/etags.c (process_file_name): Free malloc'ed vars (bug#61819).

22 months ago; Improve documentation of loading *.eln files
Eli Zaretskii [Sun, 26 Feb 2023 17:51:59 +0000 (19:51 +0200)]
; Improve documentation of loading *.eln files

* doc/lispref/loading.texi (How Programs Do Loading):
* doc/emacs/building.texi (Lisp Libraries): Some additional
details about what happens with natively-compiled files.

22 months ago; Another doc fix in eglot.el
Eli Zaretskii [Sun, 26 Feb 2023 14:48:07 +0000 (16:48 +0200)]
; Another doc fix in eglot.el

* lisp/progmodes/eglot.el (eglot-current-linepos-function):
Another doc fix.

22 months agoTramp: Do not unlock when connection is broken
Michael Albinus [Sun, 26 Feb 2023 14:40:30 +0000 (15:40 +0100)]
Tramp: Do not unlock when connection is broken

* lisp/net/tramp.el (tramp-handle-unlock-file): Do not unlock when
connection is broken.  (Bug#61663)

* test/lisp/net/tramp-tests.el (tramp-test39-make-lock-file-name):
Extend test.

22 months ago; Fix last change
João Távora [Sun, 26 Feb 2023 14:05:07 +0000 (14:05 +0000)]
; Fix last change

bug#61726

* lisp/progmodes/eglot.el (eglot-current-linepos-function): Fix docstring.

22 months ago; Fix last change
Eli Zaretskii [Sun, 26 Feb 2023 13:24:11 +0000 (15:24 +0200)]
; Fix last change

* lisp/progmodes/eglot.el (eglot-current-linepos-function)
(eglot-utf-8-linepos, eglot-utf-16-linepos)
(eglot-utf-32-linepos, eglot-move-to-linepos-function)
(eglot-move-to-utf-8-linepos, eglot-move-to-utf-32-linepos): Doc
fixes.  (Bug#61726)

22 months agoEglot: rename and redocument encoding-related functions (bug#61726)
João Távora [Sun, 26 Feb 2023 12:50:42 +0000 (12:50 +0000)]
Eglot: rename and redocument encoding-related functions (bug#61726)

* lisp/progmodes/eglot.el (eglot-current-column): Obsolete.
(eglot-lsp-abiding-column): Obsolete.
(eglot-current-column-function): Obsolete.
(eglot-current-linepos-function): Rename from eglot-current-column-function.
(eglot-utf-8-linepos): Rename from eglot-bytewise-column.
(eglot-utf-16-linepos): Rename from eglot-lsp-abiding-column.
(eglot-utf-32-linepos): Rename from eglot-current-column.
(eglot-move-to-current-column): Obsolete.
(eglot-move-to-lsp-abiding-column): Obsolete.
(eglot-move-to-column-function): Obsolete.
(eglot-move-to-linepos-function): Rename from eglot-move-to-column-function.
(eglot-move-to-utf-8-linepos): Rename from eglot-move-to-bytewise-column.
(eglot-move-to-utf-16-linepos): Rename from eglot-move-to-lsp-abiding-column.
(eglot-move-to-utf-32-linepos): Rename from eglot-move-to-current-column.
(eglot--managed-mode): Adjust.
(eglot-client-capabilities): Trim whitespace.

* test/lisp/progmodes/eglot-tests.el (eglot-test-lsp-abiding-column)
(eglot-test-lsp-abiding-column-1): Use new function/variable names.

22 months agoEglot: support positionEncoding LSP capability (bug#61726)
Augusto Stoffel [Sun, 26 Feb 2023 11:47:32 +0000 (11:47 +0000)]
Eglot: support positionEncoding LSP capability (bug#61726)

* lisp/progmodes/eglot.el(eglot-client-capabilities):  Announce the
new capability.
(eglot-bytewise-column, eglot-move-to-bytewise-column): New functions.
(eglot--managed-mode): Set 'eglot-current-column-function' and
'eglot-move-to-bytewise-column' appropriately.

22 months agoEglot: use faster strategy for moving to LSP positions (bug#61726)
Eli Zaretskii [Sun, 26 Feb 2023 10:27:18 +0000 (10:27 +0000)]
Eglot: use faster strategy for moving to LSP positions (bug#61726)

Turns out we don't need encode-coding-region after all.

* lisp/progmodes/eglot.el (eglot-move-to-lsp-abiding-column): Rewrite.

Co-authored-by: Augusto Stoffel <arstoffel@gmail.com>
22 months agoFix mule-tests in UTF-8 locales
Eli Zaretskii [Sun, 26 Feb 2023 09:46:20 +0000 (11:46 +0200)]
Fix mule-tests in UTF-8 locales

* test/lisp/international/mule-tests.el
(sgml-html-meta-no-post-less-than-10lines): Fix test condition.

22 months agoFix 'vertical-motion' when display strings are around
Eli Zaretskii [Sun, 26 Feb 2023 09:34:14 +0000 (11:34 +0200)]
Fix 'vertical-motion' when display strings are around

* src/indent.c (Fvertical_motion): Correct bidi-related condition
for character position, when we didn't move vertically.  (Bug#61636)

22 months ago; * src/treesit.c (treesit_predicate_match): Fix typo.
Yuan Fu [Sun, 26 Feb 2023 09:12:18 +0000 (01:12 -0800)]
; * src/treesit.c (treesit_predicate_match): Fix typo.

22 months agoGet rid of android_lookup_method
Po Lu [Sun, 26 Feb 2023 07:00:47 +0000 (15:00 +0800)]
Get rid of android_lookup_method

* src/android.c (struct android_emacs_window): New methods.
(android_init_emacs_window): Add new methods.
(android_lookup_method): Delete now-unused function.
(android_change_window_attributes, android_reparent_window)
(android_map_window, android_unmap_window, android_resize_window)
(android_move_window, android_set_input_focus)
(android_raise_window, android_lower_window, android_get_geometry)
(android_translate_coordinates, android_set_dont_focus_on_map)
(android_set_dont_accept_focus): Don't look up the class and
method each time when calling a function; that's just waste.

22 months agoDisable xattr test on MS-Windows.
Paul Eggert [Sat, 25 Feb 2023 23:38:38 +0000 (15:38 -0800)]
Disable xattr test on MS-Windows.

* nt/mingw-cfg.site (enable_xattr): Set to "no".  (Bug#61782)

22 months agoFix the MS-DOS build
Po Lu [Sun, 26 Feb 2023 06:42:14 +0000 (14:42 +0800)]
Fix the MS-DOS build

* msdos/sedlibmk.inp: Update getopt.h conditions.

22 months agoUpdate from gnulib
Po Lu [Sun, 26 Feb 2023 06:14:43 +0000 (14:14 +0800)]
Update from gnulib

* cross/lib/unistd.in.h:
* lib/gnulib.mk.in (INT64_MAX_EQ_LONG_MAX):
* m4/gnulib-comp.m4 (gl_EARLY): Update from gnulib.

22 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Sun, 26 Feb 2023 06:11:18 +0000 (14:11 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

22 months agoMerge from origin/emacs-29
Stefan Kangas [Sun, 26 Feb 2023 05:30:12 +0000 (06:30 +0100)]
Merge from origin/emacs-29

3cae0e3d96a python-ts-mode: Fix single-quote string fontification
68d753e3712 ; * etc/NEWS: Fix typos.
ab0cc4e7811 Fix infloop in bidi.c
3b8b23f66df ; Fix doc string of 'emacs-lisp-byte-compile'

# Conflicts:
# etc/NEWS

22 months agoBe more cautious in completing Eshell variable assignments
Jim Porter [Sat, 25 Feb 2023 05:49:54 +0000 (21:49 -0800)]
Be more cautious in completing Eshell variable assignments

Previously, Eshell treated cases like the second argument in "tar
--directory=dir" as a variable assignment, but that prevented
'pcomplete/tar' from implementing its own completion for that
argument (bug#61778).

* lisp/eshell/esh-var.el (eshell-complete-variable-assignment): Only
handle completion when all initial arguments are variable assignments.

* test/lisp/eshell/em-cmpl-tests.el
(em-cmpl-test/variable-assign-completion/non-assignment): New test.

22 months ago(bytecomp-warn--ignore): New test
Stefan Monnier [Sun, 26 Feb 2023 03:34:02 +0000 (22:34 -0500)]
(bytecomp-warn--ignore): New test

Add tests for the interaction of `ignore` with warnings.

* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-warn--ignore): New test.
(bytecomp--with-warning-test): Really make it a function.

22 months agoUpdate Android port
Po Lu [Sun, 26 Feb 2023 02:33:41 +0000 (10:33 +0800)]
Update Android port

* doc/lispref/commands.texi (Misc Events): Update documentation.
* java/org/gnu/emacs/EmacsService.java (EmacsService)
(onStartCommand): Improve notification message.
* src/android.c (android_hack_asset_fd): Detect if ashmem is
available dynamically.
(android_detect_ashmem): New function.
* src/textconv.c (record_buffer_change): Use markers to
represent BEG and END instead.
(syms_of_textconv): Update doc string.

22 months agoOmit no-longer-needed SEEK_END workaround
Paul Eggert [Sun, 26 Feb 2023 01:13:00 +0000 (17:13 -0800)]
Omit no-longer-needed SEEK_END workaround

* lib-src/ebrowse.c (SEEK_END): Remove; no longer needed
on any supported SunOS version.

22 months agoUpdate from Gnulib by running admin/merge-gnulib
Paul Eggert [Sun, 26 Feb 2023 01:01:22 +0000 (17:01 -0800)]
Update from Gnulib by running admin/merge-gnulib

22 months agopython-ts-mode: Fix single-quote string fontification
Dmitry Gutov [Sun, 26 Feb 2023 01:09:29 +0000 (03:09 +0200)]
python-ts-mode: Fix single-quote string fontification

* lisp/progmodes/python.el (python--treesit-fontify-string):
Look for ', not just ", as opening delimiter (bug#61796).

22 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Sat, 25 Feb 2023 23:33:09 +0000 (07:33 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

22 months agobytecomp--with-warning-test: Make it a function
Stefan Monnier [Sat, 25 Feb 2023 22:45:40 +0000 (17:45 -0500)]
bytecomp--with-warning-test: Make it a function

* lisp/emacs-lisp/bytecomp.el (bytecomp--with-warning-test):
Make it a function.

22 months ago; * etc/NEWS: Fix typos.
Michael Albinus [Sat, 25 Feb 2023 17:45:14 +0000 (18:45 +0100)]
; * etc/NEWS: Fix typos.

22 months agoFix infloop in bidi.c
Eli Zaretskii [Sat, 25 Feb 2023 15:19:15 +0000 (17:19 +0200)]
Fix infloop in bidi.c

* src/bidi.c (bidi_set_paragraph_end): Reset the isolate_level to
zero.  Whenever stack_idx is reset to zero, the isolate_level must
also be reset, since there cannot be any isolate status outside of
embeddings.  Failure to reset isolate_level will cause us infloop
when we see a PDI.  Reported by Matt Beshara <m@mfa.pw>.

22 months agoUpdate Android port
Po Lu [Sat, 25 Feb 2023 13:52:11 +0000 (21:52 +0800)]
Update Android port

* java/debug.sh (is_root): Fix tee detection again for old
systems which don't return exit codes from adb shell.
* src/android.c (android_run_select_thread, NATIVE_NAME,
JNICALL):
* src/android.h (NATIVE_NAME):
* src/androidterm.c (JNICALL, NATIVE_NAME): Apply stack
alignment to all JNICALL functions.

22 months ago; Fix doc string of 'emacs-lisp-byte-compile'
Eli Zaretskii [Sat, 25 Feb 2023 13:51:04 +0000 (15:51 +0200)]
; Fix doc string of 'emacs-lisp-byte-compile'

* lisp/progmodes/elisp-mode.el (emacs-lisp-byte-compile): Doc
fix.  (Bug#61784)

22 months ago; * src/android.c (android_open): Clean up unused variables.
Po Lu [Sat, 25 Feb 2023 12:17:59 +0000 (20:17 +0800)]
; * src/android.c (android_open): Clean up unused variables.

22 months agoUpdate Android port
Po Lu [Sat, 25 Feb 2023 12:11:48 +0000 (20:11 +0800)]
Update Android port

* java/org/gnu/emacs/EmacsNoninteractive.java (main): Port to
Android 2.2.
* src/android-asset.h (AAsset_openFileDescriptor): Delete stub
function.
* src/android.c (android_check_compressed_file): Delete
function.
(android_open): Stop trying to find compressed files or to use
the system provided file descriptor.  Explain why.

22 months agoUpdate Android port
Po Lu [Sat, 25 Feb 2023 11:11:07 +0000 (19:11 +0800)]
Update Android port

* doc/emacs/android.texi (Android Startup, Android File System)
(Android Environment, Android Windowing, Android
Troubleshooting): Improve documentation; fix typos.
* doc/lispref/commands.texi (Misc Events): Likewise.
* java/org/gnu/emacs/EmacsService.java (queryBattery): New
function.
* lisp/battery.el (battery-status-function): Set appropriately
for Android.
(battery-android): New function.
* src/android.c (struct android_emacs_service): New method
`query_battery'.
(android_check_content_access): Improve exception checking.
(android_init_emacs_service): Look up new method.
(android_destroy_handle, android_create_window)
(android_init_android_rect_class, android_init_emacs_gc_class)
(android_set_clip_rectangles)
(android_create_pixmap_from_bitmap_data, android_fill_polygon)
(android_get_image, android_put_image, android_bell)
(android_set_input_focus, android_raise_window)
(android_lower_window, android_query_tree, android_get_geometry)
(android_translate_coordinates, android_wc_lookup_string)
(android_damage_window, android_build_string)
(android_build_jstring, android_exception_check_1)
(android_exception_check_2): New functions.
(android_browse_url): Improve exception handling.  Always use
android_exception_check and don't leak local refs.
(android_query_battery): New function.
* src/android.h (struct android_battery_state): New struct.
* src/androidfns.c (Fandroid_query_battery, syms_of_androidfns):
New function.
* src/androidfont.c (androidfont_from_lisp, DO_SYMBOL_FIELD)
(DO_CARDINAL_FIELD, androidfont_list, androidfont_match)
(androidfont_draw, androidfont_open_font)
(androidfont_close_font):
* src/androidselect.c (Fandroid_set_clipboard)
(Fandroid_get_clipboard):
* src/sfnt.c (sfnt_map_glyf_table):
* src/sfntfont.c (sfntfont_free_outline_cache)
(sfntfont_free_raster_cache, sfntfont_close): Allow font close
functions to be called twice.

22 months agoMake also 'diary-lunar-phases' report eclipses
Michael Heerdegen [Wed, 22 Feb 2023 13:56:07 +0000 (14:56 +0100)]
Make also 'diary-lunar-phases' report eclipses

* lisp/calendar/lunar.el (diary-lunar-phases): Report eclipses.
(calendar-lunar-phases): Tweak.

22 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Sat, 25 Feb 2023 06:24:17 +0000 (14:24 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

22 months agoMerge from origin/emacs-29
Stefan Kangas [Sat, 25 Feb 2023 05:30:14 +0000 (06:30 +0100)]
Merge from origin/emacs-29

5cf50d60041 Check the anchor along with the offset in treesit-indent-...
497018dd5c3 ; Fix typos in docstrings in c-ts-common.el
03072bbdd38 ; Set indent-tabs-mode to nil in c-ts-mode indent preproc...
4a25fa4586c Align to prev sibling for c-ts-mode indentation
d25f24fe57b Fix c-ts-common-statement-offset and c-ts-common--node-is
c92360c7a3b typescript-ts-mode: Highlight non-shorthand destructuring...
a795c51f605 Add more/finer faces for tree-sitter
146bce49321 Avoid crashes in batch mode due to lack of frame face cache
244a73cd729 Add Tramp version integrated in Emacs 28.3

# Conflicts:
# etc/NEWS

22 months agoCheck the anchor along with the offset in treesit-indent-region
Daniel Martín [Sat, 25 Feb 2023 02:07:55 +0000 (03:07 +0100)]
Check the anchor along with the offset in treesit-indent-region

* lisp/treesit.el (treesit-indent-region): To compute a valid column,
having a non-nil offset is not enough, we need a non-nil anchor as
well.

22 months ago; Fix typos in docstrings in c-ts-common.el
Daniel Martín [Thu, 23 Feb 2023 17:30:36 +0000 (18:30 +0100)]
; Fix typos in docstrings in c-ts-common.el

* lisp/progmodes/c-ts-common.el:
(c-ts-common-statement-offset): Fix typo.

22 months ago; Set indent-tabs-mode to nil in c-ts-mode indent preproc test
Yuan Fu [Sat, 25 Feb 2023 03:43:22 +0000 (19:43 -0800)]
; Set indent-tabs-mode to nil in c-ts-mode indent preproc test

* test/lisp/progmodes/c-ts-mode-resources/indent-preproc.erts: Set
indent-tabs-mode to nil.

22 months agoAlign to prev sibling for c-ts-mode indentation
Yuan Fu [Sat, 25 Feb 2023 02:40:52 +0000 (18:40 -0800)]
Align to prev sibling for c-ts-mode indentation

As requested by a discussion on emacs-devel.

* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--anchor-prev-sibling): New function.
(c-ts-mode--indent-styles): Indent first child as before, indent the
rest to their previous sibling.  Remove bracketless statement rules
that I forgot to remove previously.

22 months agoFix c-ts-common-statement-offset and c-ts-common--node-is
Yuan Fu [Sat, 25 Feb 2023 03:31:34 +0000 (19:31 -0800)]
Fix c-ts-common-statement-offset and c-ts-common--node-is

* lisp/progmodes/c-ts-common.el:
(c-ts-common--node-is): Guard against case where the node has no field
name.
(c-ts-common-statement-offset): Do indent a level if the "if" in the
"else if" is on an independent line.

22 months agotypescript-ts-mode: Highlight non-shorthand destructuring bindings
Dmitry Gutov [Sat, 25 Feb 2023 01:54:31 +0000 (03:54 +0200)]
typescript-ts-mode: Highlight non-shorthand destructuring bindings

* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--font-lock-settings): Highlight non-shorthand
variable bindings in object destructuring.

22 months agoAdd more/finer faces for tree-sitter
Dmitry Gutov [Sat, 25 Feb 2023 01:15:46 +0000 (03:15 +0200)]
Add more/finer faces for tree-sitter

* doc/lispref/modes.texi (Faces for Font Lock):
Update the list of faces (bug#61655).

* etc/NEWS: Update the list of new faces.

* lisp/cus-theme.el (custom-theme--listed-faces): Update.

* lisp/font-lock.el (font-lock-function-call-face)
(font-lock-variable-ref-face, font-lock-property-ref-face):
New faces.
(font-lock-property-name-face):
Rename from 'font-lock-property-face'.

* lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings):
Use new faces.  More 'enumerator' query to 'definition' feature.
(c-ts-mode--fontify-declarator, c-ts-mode--fontify-variable):
Use new faces.

* lisp/progmodes/cmake-ts-mode.el
(cmake-ts-mode--font-lock-settings): Use new faces.

* lisp/progmodes/csharp-mode.el
(csharp-ts-mode--font-lock-settings): Use new faces.

* lisp/progmodes/go-ts-mode.el (go-ts-mode--font-lock-settings):
Use new faces.

* lisp/progmodes/java-ts-mode.el
(java-ts-mode--font-lock-settings): Use new faces.

* lisp/progmodes/js.el (js--treesit-fontify-assignment-lhs)
(js--treesit-font-lock-settings): Use new faces.  Highlight
variable definitions inside array and object destructuring
patterns.

* lisp/progmodes/python.el (python--treesit-variable-p):
Exclude identifiers in parameters.
(python--treesit-settings): Use new faces.  Highlight function
parameters.  Move 'keyword' up to still highlight 'self' as
keyword.

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--font-lock-settings):
Use new faces.

* lisp/progmodes/rust-ts-mode.el
(rust-ts-mode--font-lock-settings): Use new faces.

* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--font-lock-settings): Use new faces.

* lisp/textmodes/css-mode.el (css--treesit-settings):
Use font-lock-property-ref-face.

* lisp/textmodes/toml-ts-mode.el
(toml-ts-mode--font-lock-settings):
Use font-lock-property-ref-face.

* lisp/textmodes/yaml-ts-mode.el
(yaml-ts-mode--font-lock-settings): Same.

22 months agoAvoid crashes in batch mode due to lack of frame face cache
Eli Zaretskii [Fri, 24 Feb 2023 20:46:05 +0000 (22:46 +0200)]
Avoid crashes in batch mode due to lack of frame face cache

* src/xfaces.c (Finternal_merge_in_global_face): Handle frames
with no face cache.

22 months agokmacro: Simplify register code and recent change
Stefan Monnier [Fri, 24 Feb 2023 19:18:24 +0000 (14:18 -0500)]
kmacro: Simplify register code and recent change

While reviewing uses of `last-kbd-macro` for more problems like
those of bug#61700 I noticed that we don't need the `kmacro-register`
type any more (we can directly use the new `kmacro` type instead).
Also `macros.el` requires `kmacro` so rather than autoload
`macro--string-to-vector` it's simpler to move the function to
`kmacro.el`.  And while at it fold into it the `stringp` test that's used
before every call to that function.

* lisp/kmacro.el (kmacro--to-vector): Rename from
`macro--string-to-vector`, move from `mcros.el`, and make it work for
vectors.
(kmacro-ring-head, kmacro-lambda-form): Simplify accordingly.
(cl-print-object): Remove unused declaration.
(kmacro-register): Delete type.  Use `kmacro` objects instead.
(register-val-jump-to, register-val-describe, register-val-insert):
Rewrite accordingly.
(kmacro-to-register): Put the `kmacro` object.

* lisp/macros.el (macro--string-to-vector): Move to `kmacro.el`.
(insert-kbd-macro): Use `kmacro--to-vector`.

* src/macros.c (end_kbd_macro): Always generate a vector.

22 months agoTramp cleanup
Michael Albinus [Fri, 24 Feb 2023 19:08:10 +0000 (20:08 +0100)]
Tramp cleanup

* lisp/net/tramp-gvfs.el (tramp-gvfs-parse-device-names): Ignore errors.

* test/lisp/net/tramp-tests.el (tramp-test26-file-name-completion)
(tramp-test26-interactive-file-name-completion)
(tramp-test29-start-file-process, tramp-test30-make-process): Fix tests.

22 months agoAdd Tramp version integrated in Emacs 28.3
Michael Albinus [Fri, 24 Feb 2023 18:47:15 +0000 (19:47 +0100)]
Add Tramp version integrated in Emacs 28.3

* lisp/net/trampver.el (customize-package-emacs-version-alist):
Add Tramp version integrated in Emacs 28.3.

22 months agoMerge branch 'emacs-29'
Stefan Monnier [Fri, 24 Feb 2023 18:13:59 +0000 (13:13 -0500)]
Merge branch 'emacs-29'

22 months agoAvoid reusing :lisp-dir twice in 'package-vc--main-file'
Philip Kaludercic [Wed, 22 Feb 2023 14:28:44 +0000 (15:28 +0100)]
Avoid reusing :lisp-dir twice in 'package-vc--main-file'

* lisp/emacs-lisp/package-vc.el (package-vc--main-file): Just use
:lisp-dir from 'package-desc-extras', not 'pkg-spec'.

This avoid appending the contents of :lisp-dir twice, in case it is
specified both in pkg-spec and pkg-desc.

22 months agoEnsure right package-desc-type before installing package
Philip Kaludercic [Wed, 22 Feb 2023 14:23:43 +0000 (15:23 +0100)]
Ensure right package-desc-type before installing package

* lisp/emacs-lisp/package-vc.el (package-vc--unpack): Move copying
code from 'package-vc-install'.
(package-vc-install): Remove copying.  (Bug#61669)

22 months agoMore accurate suppression of ignored return value warning
Mattias Engdegård [Fri, 24 Feb 2023 14:32:04 +0000 (15:32 +0100)]
More accurate suppression of ignored return value warning

* lisp/emacs-lisp/bytecomp.el (byte-compile-file-form-defalias):
Be careful to propagate the for-effect mode through a
`with-suppressed-warnings` form when compiling, so that a form
inside isn't erroneously considered to have its value 'used'
by the surrounding warning suppression form itself.

22 months agoFix unsafep for aliases to side-effect-free functions
Mattias Engdegård [Fri, 24 Feb 2023 14:12:40 +0000 (15:12 +0100)]
Fix unsafep for aliases to side-effect-free functions

* lisp/emacs-lisp/unsafep.el (unsafep-function):
Follow aliases when reading the `side-effect-free` property.

22 months agoFollow function aliases for `side-effect-free` and `pure` properties
Mattias Engdegård [Thu, 23 Feb 2023 13:04:55 +0000 (14:04 +0100)]
Follow function aliases for `side-effect-free` and `pure` properties

This way we don't need to set these properties on aliases at all;
it was always easy to forget doing so.

* lisp/emacs-lisp/byte-opt.el (byte-opt--fget): New function.
(byte-optimize-form-code-walker, byte-optimize-form): Use it.
(side-effect-free-fns, side-effect-and-error-free-fns, pure-fns):
Remove aliases from lists, leaving only built-in functions.

22 months agoRestore invisibility of symlink target on exiting wdired-mode
Stephen Berman [Fri, 24 Feb 2023 15:43:35 +0000 (16:43 +0100)]
Restore invisibility of symlink target on exiting wdired-mode

* lisp/wdired.el (wdired-change-to-dired-mode): Invoke
dired-hide-details-update-invisibility-spec (bug#61510).

* test/lisp/wdired-tests.el (wdired-test-bug61510): New test.

22 months agoEglot: fix jit-lock inlay hint bugs
João Távora [Fri, 24 Feb 2023 14:48:01 +0000 (14:48 +0000)]
Eglot: fix jit-lock inlay hint bugs

One of the bugs was straightforward.  The timer function of
eglot--update-hints must set the correct buffer.

The other is much more odd.  When using Eglot on Emacs's own
src/coding.c, the jit-lock code starts calling its jit-functions over
and over again with the same sequence of arguments, like so:

======================================================================
1 -> (eglot--update-hints 63551 65051)
1 <- eglot--update-hints: [nil 25592 52026 4
======================================================================
1 -> (eglot--update-hints 65051 66551)
1 <- eglot--update-hints: [nil 25592 52026 4
======================================================================
1 -> (eglot--update-hints-1 63551 66551)
1 <- eglot--update-hints-1: nil
======================================================================
1 -> (eglot--update-hints 63551 65051)
1 <- eglot--update-hints: [nil 25592 52026 4
======================================================================
1 -> (eglot--update-hints 65051 66551)
1 <- eglot--update-hints: [nil 25592 52026 5
======================================================================
1 -> (eglot--update-hints-1 63551 66551)
1 <- eglot--update-hints-1: nil

This continues forever at a very fast rate and saturates the LSP
channel.

At first I thought that it was because eglot--update-hints-1 is
actually causing the buffer to be modified with overlays sometime in
the future, but it is not so!  It seems that merely calling

   (goto-char (eglot--lsp-position-to-point position))

(from the LSP request handler in eglot--update-hints-1) will cause
this bug.

* lisp/progmodes/eglot.el (eglot--update-hints): Fix bugs.

22 months agoImprove Android configury
Po Lu [Fri, 24 Feb 2023 14:25:48 +0000 (22:25 +0800)]
Improve Android configury

* configure.ac (JAVA_PUSH_LINT): New macro.
(JAVAFLAGS): New variable.  Check for various lint flags and
macros and enable them.
* java/Makefile.in (ANDROID_ABI):
* java/org/gnu/emacs/EmacsSdk7FontDriver.java: Remove compiler
warning.

22 months agoEnable normal-erase-is-backspace on Android
Po Lu [Fri, 24 Feb 2023 13:22:47 +0000 (21:22 +0800)]
Enable normal-erase-is-backspace on Android

* lisp/frame.el (display-symbol-keys-p):
* lisp/simple.el (normal-erase-is-backspace-setup-frame): Return
appropriate values on Android.

22 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Fri, 24 Feb 2023 13:20:08 +0000 (21:20 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

22 months agoFix auto-revert-mode on Android
Po Lu [Fri, 24 Feb 2023 13:18:35 +0000 (21:18 +0800)]
Fix auto-revert-mode on Android

* src/inotify.c (Finotify_add_watch): Handle asset files.

22 months agoEglot: fix inlay hint with label collection instead of string
João Távora [Fri, 24 Feb 2023 10:46:20 +0000 (10:46 +0000)]
Eglot: fix inlay hint with label collection instead of string

Reported by Chinmay Dalal <dalal.chinmay.0101@gmail.com>

* lisp/progmodes/eglot.el (eglot--update-hints-1): Fix bug when
inlay hint contains collection of labels.

22 months agoFix insertion of keyboard macro containing named keys
Robert Pluim [Fri, 24 Feb 2023 10:12:24 +0000 (11:12 +0100)]
Fix insertion of keyboard macro containing named keys

* lisp/kmacro.el: Autoload `macro--string-to-vector'.
(kmacro-ring-head): Convert `last-kbd-macro' to a vector if it's a
string, since `kmacro' uses `key-parse' on it.
(kmacro-lambda-form): Remove require for 'macros
* test/lisp/kmacro-tests.el
(kmacro-tests-name-last-macro-key-parse-syntax):
Test that insertion of macros that contain strings that look
like named keys works correctly.

(Bug#61700)

22 months agoMerge from origin/emacs-29
Stefan Kangas [Fri, 24 Feb 2023 05:30:11 +0000 (06:30 +0100)]
Merge from origin/emacs-29

b0cbd5590b2 Eglot: simplify inlay hints implementation with jit-lock
91e24c5b5a6 Eglot: update inlay hints on window configuration changes
79fead1709f ; Fix a typo in a doc string in c-ts-common.el (bug#61736).
a0b273ef300 ; Clarify documentation of 'file-modes-number-to-symbolic'
5c2be6a2632 ; Fix recently-added doc strings in eglot.el
e3be0dbf85c Eglot: display completion label when safe
5286111ea1f Improve documentation of VC commands, including in Dired
990f4027131 * doc/emacs/maintaining.texi: More mentions of marked fil...

22 months agoEglot: simplify inlay hints implementation with jit-lock
João Távora [Thu, 23 Feb 2023 23:51:09 +0000 (23:51 +0000)]
Eglot: simplify inlay hints implementation with jit-lock

This implementation is much simpler than the one based on
windows-scroll-functions.  It's also supposedly safer, as long as
jit-lock guarantees refontification of affected regions.

It's not _trivially_ simple though, as simply adding
'eglot--update-hints-1' to jit-lock-functions, while possible, is
going to request inlay hints from the LSP server for many small
regions of the buffer, depending on what jit-lock thinks is best.  So
we keep coalescing these into a larger region until the time is
suitable for a more bandwidth-efficient request.

To do this, we use a jit-lock implementation detail,
jit-lock-context-unfontify-pos, which is a proxy for knowing that the
jit-lock-context-timer has run.  Not sure how brittle it is, but it
seems to work reasonably.

We also get rid of the previous "get hints for entire buffer"
implementation.

* doc/misc/eglot.texi (Eglot Variables): Remove mention
to deleted eglot-lazy-inlay-hints.

* lisp/progmodes/eglot.el (eglot-lazy-inlay-hints)
(eglot--inlay-hints-after-scroll)
(eglot--inlay-hints-fully)
(eglot--inlay-hints-lazily): Remove.
(eglot--update-hints): Add function.
(eglot-inlay-hints-mode): Simplify.

22 months ago; * src/keyboard.c (lispy_function_keys): Add missing delete key.
Po Lu [Fri, 24 Feb 2023 01:06:15 +0000 (09:06 +0800)]
; * src/keyboard.c (lispy_function_keys): Add missing delete key.

22 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Fri, 24 Feb 2023 01:01:29 +0000 (09:01 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

22 months ago; Return t or nil for 'test-completion' of Eshell user references
Jim Porter [Thu, 23 Feb 2023 23:13:38 +0000 (15:13 -0800)]
; Return t or nil for 'test-completion' of Eshell user references

* lisp/eshell/em-dirs.el (eshell-complete-user-reference): Simply call
'test-completion' when ACTION is 'lambda'; don't modify the result.

22 months ago; Remove commented-out leftover from the last commit
Jim Porter [Thu, 23 Feb 2023 22:14:01 +0000 (14:14 -0800)]
; Remove commented-out leftover from the last commit

* lisp/eshell/em-dirs.el (eshell-complete-user-reference): Remove
commented code.