]> git.eshelyaron.com Git - emacs.git/log
emacs.git
19 months agoUpdate Android port
Po Lu [Mon, 5 Jun 2023 02:38:25 +0000 (10:38 +0800)]
Update Android port

* java/org/gnu/emacs/EmacsNative.java (EmacsNative): New
function clearInputFlags.
* java/org/gnu/emacs/EmacsView.java (onCreateInputConnection):
Stop reporting changes after a new input method connection is
established.
* src/androidterm.c (android_handle_ime_event): Implement that
change.
(JNICALL): New function.

19 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Mon, 5 Jun 2023 00:46:58 +0000 (08:46 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

19 months agoBetter internal-make-closure optimisation
Mattias Engdegård [Sun, 4 Jun 2023 13:58:44 +0000 (15:58 +0200)]
Better internal-make-closure optimisation

* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
Optimise closed-over values in closure creation like any other, which
can lead to stack variables being eliminated.

19 months ago* lisp/emacs-lisp/comp-cstr.el (cl-macs): Require it.
Andrea Corallo [Sun, 4 Jun 2023 14:43:13 +0000 (16:43 +0200)]
* lisp/emacs-lisp/comp-cstr.el (cl-macs): Require it.

19 months ago* lisp/emacs-lisp/comp.el (comp-function-type-spec): Improve.
Andrea Corallo [Sun, 4 Jun 2023 14:25:14 +0000 (16:25 +0200)]
* lisp/emacs-lisp/comp.el (comp-function-type-spec): Improve.

19 months ago; Minor doc copyedits in comp.el
Eli Zaretskii [Sun, 4 Jun 2023 12:28:25 +0000 (15:28 +0300)]
; Minor doc copyedits in comp.el

* lisp/emacs-lisp/comp.el (comp-known-type-specifiers): Fix
commentary.
(comp-function-type-spec): Doc fix.

19 months ago; * src/keyboard.c: Fix build without window system
Po Lu [Sun, 4 Jun 2023 12:11:40 +0000 (20:11 +0800)]
; * src/keyboard.c: Fix build without window system

19 months ago; * lisp/emacs-lisp/comp.el (comp-funciton-type-spec): typo
Mattias Engdegård [Sun, 4 Jun 2023 12:09:39 +0000 (14:09 +0200)]
; * lisp/emacs-lisp/comp.el (comp-funciton-type-spec): typo

19 months agoPrint know function types in C-h f
Andrea Corallo [Tue, 30 May 2023 13:30:11 +0000 (15:30 +0200)]
Print know function types in C-h f

* lisp/emacs-lisp/comp.el (comp-known-type-specifiers): Improve comment.
(comp-funciton-type-spec): New function.
* lisp/help-fns.el (help-fns--signature): Update to make use of
`comp-funciton-type-spec'.

19 months ago* Have `comp-cstr-to-type-spec' handle comp-cstr-f as well
Andrea Corallo [Sun, 4 Jun 2023 09:26:22 +0000 (11:26 +0200)]
* Have `comp-cstr-to-type-spec' handle comp-cstr-f as well

* lisp/emacs-lisp/comp-cstr.el (comp--simple-cstr-to-type-spec): New
function.
(comp-cstr-to-type-spec): Make use of.

19 months ago* lisp/emacs-lisp/comp.el (comp-known-type-specifiers): Fix line lengths
Andrea Corallo [Sun, 4 Jun 2023 09:07:38 +0000 (11:07 +0200)]
* lisp/emacs-lisp/comp.el (comp-known-type-specifiers): Fix line lengths

19 months ago* lisp/emacs-lisp/comp.el: Improve 85cb075b1bd.
Andrea Corallo [Sun, 4 Jun 2023 10:19:09 +0000 (12:19 +0200)]
* lisp/emacs-lisp/comp.el: Improve 85cb075b1bd.

19 months ago* lisp/emacs-lisp/comp.el (comp-known-type-specifiers): Tweak framep.
Andrea Corallo [Sun, 4 Jun 2023 08:58:32 +0000 (10:58 +0200)]
* lisp/emacs-lisp/comp.el (comp-known-type-specifiers): Tweak framep.

19 months ago* configure.ac: Tune pty detection for Android.
Po Lu [Sun, 4 Jun 2023 07:11:48 +0000 (15:11 +0800)]
* configure.ac: Tune pty detection for Android.

19 months agoFix input method synchronization problems
Po Lu [Sun, 4 Jun 2023 04:04:15 +0000 (12:04 +0800)]
Fix input method synchronization problems

* java/debug.sh (gdbserver_cmd, is_root): Prefer TCP again.
* java/org/gnu/emacs/EmacsNative.java (EmacsNative): New
function `queryAndSpin'.
* java/org/gnu/emacs/EmacsService.java (EmacsService)
(icBeginSynchronous, icEndSynchronous, viewGetSelection): New
synchronization functions.
(resetIC, updateCursorAnchorInfo): Call those instead.
* java/org/gnu/emacs/EmacsView.java (onCreateInputConnection):
Call viewGetSelection.
* src/android.c (JNICALL, android_answer_query_spin): New
functions.

19 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Sun, 4 Jun 2023 00:33:30 +0000 (08:33 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

19 months agoAdapt emba integration
Michael Albinus [Sat, 3 Jun 2023 16:32:29 +0000 (18:32 +0200)]
Adapt emba integration

* test/infra/Dockerfile.emba (emacs-eglot, emacs-tree-sitter):
Don't install gawk.

* test/infra/gitlab-ci.yml (test-eglot): Add company and yasnippet.

19 months ago* admin/unidata/emoji-zwj.awk: Avoid sprint buffer overflow
Mattias Engdegård [Sat, 3 Jun 2023 10:50:21 +0000 (12:50 +0200)]
* admin/unidata/emoji-zwj.awk: Avoid sprint buffer overflow

Some AWK implementations have a fixed buffer for sprintf; for mawk the
default size is 8192 bytes.  Hoist a string concatenation from
a sprintf call to avoid running into that limit.  See discussion at
https://lists.gnu.org/archive/html/emacs-devel/2023-06/msg00090.html .

19 months agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 3 Jun 2023 09:50:58 +0000 (05:50 -0400)]
Merge from origin/emacs-29

ede3535051a ; Fix last change
8ec786349e1 Fix apostrophe handling in rust-ts-mode and go-ts-mode (B...
0eba9cf6511 * test/infra/Dockerfile.emba (emacs-base): Install also g...
4897c98b6c4 Fix 'python-util-clone-local-variables'
6b2c8dc9050 Revert "Enhance Python font-lock to support multilines"
348e4504c6d Fix typo in calc.texi
03663b8798a Update to Transient v0.4.1
dc7acb1aafe Avoid errors in 'delete-forward-char' deleting static com...
2f94f6de9d6 Make VS-15 and VS-16 compositions work correctly
753f8aa1f14 Fix project-name for vc-aware backend in non-file buffers
17c7915ab94 ; Fix 'package-install-upgrade-built-in' check for packag...
e252ce26eab Add type_predicate 'is' as keyword in typescript-ts-mode ...
0a354d65784 Fix infloop in info-look.el
83b22139e4c Fix several todo-mode.el item editing bugs (bug#63811)
ed4cd3eddf7 dockerfile-ts-mode: Prevent empty categories in imenu (Bu...
2e20e318da2 Brush up doc strings and terminology in plstore.el
372bc1278c2 Add internal documentation on plstore.el
23a14e7b902 Add compact_constructor_declaration font-locking to java-...
500abc4dc37 * lisp/tmm.el (tmm-completion-delete-prompt): Add more ch...
afc1f329356 Allow to disable the DWIMish behavior of 'x' in package menu
08104c01504 Allow dired to invoke secondary browser
a3063f0bc87 Add a binding for enriched-toggle-markup
d8ba28fa394 Fix order of tmm-menubar when 'tmm-mid-prompt' is nil

# Conflicts:
# etc/NEWS

19 months ago; Merge from origin/emacs-29
Eli Zaretskii [Sat, 3 Jun 2023 09:50:51 +0000 (05:50 -0400)]
; Merge from origin/emacs-29

The following commit was skipped:

53dc7bec830 Fix regression when saving tramp-default-proxies-alist (D...

19 months agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 3 Jun 2023 09:50:49 +0000 (05:50 -0400)]
Merge from origin/emacs-29

3f441525679 Save the tree-sitter grammar recipe when installing a gra...
c0c7b947baf Add instructions and test file for VS-15/VS-16
3be33aff963 A better fix for "Fix cancellation of Wdired"
756244c6963 ; * lisp/minibuffer.el (completions-header-format): Doc fix.
5d844e129ad Fix tmm-menubar when 'tmm-completion-prompt' is nil

# Conflicts:
# lisp/treesit.el

19 months ago; Merge from origin/emacs-29
Eli Zaretskii [Sat, 3 Jun 2023 09:47:29 +0000 (05:47 -0400)]
; Merge from origin/emacs-29

The following commit was skipped:

5e7c826bfa5 ; * lisp/progmodes/project.el: avoid warning in loaddefs.

19 months agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 3 Jun 2023 09:47:29 +0000 (05:47 -0400)]
Merge from origin/emacs-29

95ee5477e16 ; * src/lread.c (read0, skip_lazy_string): Fix commentary...

19 months ago; Fix last change
Eli Zaretskii [Sat, 3 Jun 2023 08:34:11 +0000 (11:34 +0300)]
; Fix last change

* lisp/progmodes/rust-ts-mode.el
(rust-ts-mode--syntax-propertize): Doc fix.  (Bug#63708)

19 months agoFix apostrophe handling in rust-ts-mode and go-ts-mode (Bug#63708)
Йордан Миладинов [Fri, 26 May 2023 14:23:26 +0000 (17:23 +0300)]
Fix apostrophe handling in rust-ts-mode and go-ts-mode (Bug#63708)

* lisp/progmodes/rust-ts-mode.el (rust-ts-mode--syntax-propertize):
Treat apostrophes as strings if used to define character literals.
Treat LT and GT as pairs if used to define type parameters (formerly
they were treated as pairs only for type arguments).
* lisp/progmodes/go-ts-mode.el (go-ts-mode--syntax-table): Treat
apostrophes as strings if used to define rune literals.

Copyright-paperwork-exempt: yes

19 months agoAdapt emba integration
Michael Albinus [Sat, 3 Jun 2023 08:19:02 +0000 (10:19 +0200)]
Adapt emba integration

* admin/notes/emba: Improve docker call.

* test/infra/Dockerfile.emba (emacs-eglot, emacs-tree-sitter):
Install also gawk.

* test/infra/Makefile.in (TREE-SITTER-FILES): New variable.
(tree-sitter-files-template): New rule.
(.PHONY, generate-test-jobs): Add it to dependencies.

* test/infra/gitlab-ci.yml (variables): Disable CI_DEBUG_TRACE.
(test-tree-sitter): Extends also .tree-sitter-files-template.  Use
$tree_sitter_files.

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

19 months ago* test/infra/Dockerfile.emba (emacs-base): Install also gawk.
Michael Albinus [Sat, 3 Jun 2023 07:54:52 +0000 (09:54 +0200)]
* test/infra/Dockerfile.emba (emacs-base): Install also gawk.

19 months agoFix use-package :vc keyword when byte-compiled
Steven Allen [Tue, 16 May 2023 23:07:36 +0000 (16:07 -0700)]
Fix use-package :vc keyword when byte-compiled

* lisp/use-package/use-package-core.el (use-package-handler/:vc):
Return the new 'body'. Otherwise, the entire package declaration gets
dropped when byte-compiling.
* test/lisp/use-package/use-package-tests.el
(use-package-test-handler/:vc-6): test it.

19 months agoFix 'python-util-clone-local-variables'
Eli Zaretskii [Sat, 3 Jun 2023 07:20:08 +0000 (10:20 +0300)]
Fix 'python-util-clone-local-variables'

* lisp/progmodes/python.el (python-util-clone-local-variables):
Avoid signaling an error when a local variable is unbound.
Patch by Ernesto Alfonso <erjoalgo@gmail.com>.  (Bug#63818)

19 months agoRevert "Enhance Python font-lock to support multilines"
kobarity [Fri, 2 Jun 2023 13:52:57 +0000 (22:52 +0900)]
Revert "Enhance Python font-lock to support multilines"

This reverts commit 4915ca5dd4245a909c046e6691e8d4a1919890c8.

We have found that there are performance issues when editing a large
file.  The issue can be reproduced as follows:

1. emacs -Q
2. Open large Python file (e.g. turtle.py in Python)
3. Near the top of the buffer, enter open paren and some characters.

The above commit extends the region to be font-locked using
`python-nav-end-of-statement'.  However, if there are unbalanced
parens, it may move point to the end of the buffer.  This causes
almost the entire buffer to be font-locked, which is not acceptable
for large files.

19 months agoFix typos in Android port
Po Lu [Sat, 3 Jun 2023 07:08:05 +0000 (15:08 +0800)]
Fix typos in Android port

* lisp/bindings.el (global-map): Bind cut, copy and paste.
* src/androidterm.c (JNICALL): Use key.

19 months agoFix typo in calc.texi
Eli Zaretskii [Sat, 3 Jun 2023 06:14:44 +0000 (09:14 +0300)]
Fix typo in calc.texi

* doc/misc/calc.texi (Programming Tutorial): Fix a typo.
Suggested by Vladimir Nikishkin <lockywolf@gmail.com>.

19 months agoBehave correctly when IMEs commit or compose text with active mark
Po Lu [Sat, 3 Jun 2023 03:25:01 +0000 (11:25 +0800)]
Behave correctly when IMEs commit or compose text with active mark

* src/textconv.c (really_commit_text)
(really_set_composing_text): Delete text between mark and point
if the mark is active.  Don't record changes if the text is
empty.

19 months agoUpdate Android port
Po Lu [Sat, 3 Jun 2023 02:16:30 +0000 (10:16 +0800)]
Update Android port

* src/androidterm.c (struct android_get_extracted_text_context):
New field `mark_active'.
(android_get_extracted_text): Set that field.
(struct android_extracted_text_class): New field `flags'.
(android_build_extracted_text): New argument `mark_active'.  Set
flags appropriately.
(NATIVE_NAME, android_update_selection): Likewise.
* src/textconv.c (get_extracted_text): New argument
`mark_active'.  Set it if the mark is active.
* src/textconv.h: Update prototypes.

19 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Sat, 3 Jun 2023 00:55:45 +0000 (08:55 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

19 months ago* etc/MACHINES: Fix reference to obsolete file.
Po Lu [Sat, 3 Jun 2023 00:54:42 +0000 (08:54 +0800)]
* etc/MACHINES: Fix reference to obsolete file.

19 months agoUpdate to Transient v0.4.1
Jonas Bernoulli [Fri, 2 Jun 2023 21:26:45 +0000 (23:26 +0200)]
Update to Transient v0.4.1

19 months agoAvoid errors in 'delete-forward-char' deleting static compositions
Eli Zaretskii [Fri, 2 Jun 2023 12:42:42 +0000 (15:42 +0300)]
Avoid errors in 'delete-forward-char' deleting static compositions

* lisp/simple.el (delete-forward-char): Fix recognition of static
compositions.  (Bug#63837)

19 months agoMake VS-15 and VS-16 compositions work correctly
Robert Pluim [Fri, 2 Jun 2023 11:54:56 +0000 (13:54 +0200)]
Make VS-15 and VS-16 compositions work correctly

There is a conflict between forward matching and backward matching
composition rules involving the same codepoint, which can cause the
backward matching ones not to be invoked.  Ensure that VS-15 (U+FE0E)
and VS-16 (U+FE0F) are composed by forward matching rules instead in
order to avoid this issue.

* admin/unidata/emoji-zwj.awk: Add rules for CHAR+VS-15 and CHAR+VS-16.
* lisp/composite.el: remove backward matching rule for VS-15.  (Bug#63731)

19 months agoFix tree-sitter tests on emba
Michael Albinus [Fri, 2 Jun 2023 11:44:00 +0000 (13:44 +0200)]
Fix tree-sitter tests on emba

* test/infra/Makefile.in: Revert tree-sitter relevant changes.

* test/infra/gitlab-ci.yml (test-tree-sitter): Remove
.tree-sitter-files-template.  List files explicitly.

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

19 months agoImprove Eldoc text conversion support
Po Lu [Fri, 2 Jun 2023 08:24:42 +0000 (16:24 +0800)]
Improve Eldoc text conversion support

* lisp/emacs-lisp/eldoc.el: ("back-to-indentation"): Register
touch screen and text conversion commands.

19 months agoImprove CC Mode support for text conversion
Po Lu [Fri, 2 Jun 2023 07:41:54 +0000 (15:41 +0800)]
Improve CC Mode support for text conversion

* lisp/progmodes/cc-cmds.el (c-post-text-conversion): New
function.
* lisp/progmodes/cc-mode.el (c-initialize-cc-mode): Add it as
the `post-texxt-conversion-hook'.
* lisp/simple.el (post-text-conversion-hook): New hook.
(analyze-text-conversion): Run it until success before trying
post insert functions.

19 months agoUpdate Android port
Po Lu [Fri, 2 Jun 2023 05:31:40 +0000 (13:31 +0800)]
Update Android port

* java/org/gnu/emacs/EmacsInputConnection.java
(EmacsInputConnection): Apply workarounds on Vivo devices as
well.
* src/android.c (sendKeyPress, sendKeyRelease): Clear counter.
* src/androidgui.h (struct android_key_event): New field
`counter'.
* src/androidterm.c (handle_one_android_event): Generate
barriers as appropriate.
(JNICALL): Set `counter'.
* src/frame.h (enum text_conversion_operation):
* src/textconv.c (detect_conversion_events)
(really_set_composing_text, handle_pending_conversion_events_1)
(handle_pending_conversion_events, textconv_barrier):
* src/textconv.h: Implement text conversion barriers and fix
various typos.

19 months agoFix project-name for vc-aware backend in non-file buffers
Dmitry Gutov [Fri, 2 Jun 2023 02:10:15 +0000 (05:10 +0300)]
Fix project-name for vc-aware backend in non-file buffers

* lisp/progmodes/project.el (project-name): Make sure
project-vc-name is picked up from dir-locals in all
non-file-visiting buffers too (mentioned in bug#63469).

19 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Fri, 2 Jun 2023 00:07:36 +0000 (08:07 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

19 months ago* lisp/emacs-lisp/comp.el (comp-known-type-specifiers): Fix a bunch of
Andrea Corallo [Thu, 1 Jun 2023 13:53:39 +0000 (15:53 +0200)]
* lisp/emacs-lisp/comp.el (comp-known-type-specifiers): Fix a bunch of

19 months agoAdapt tree-sitter tests on emba
Michael Albinus [Thu, 1 Jun 2023 13:57:43 +0000 (15:57 +0200)]
Adapt tree-sitter tests on emba

* test/infra/Makefile.in (TREE-SITTER-FILES): Double-quote variable.

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

19 months ago* lisp/emacs-lisp/comp.el (comp-jump-table-optimizable): Refactor.
Andrea Corallo [Thu, 1 Jun 2023 09:02:01 +0000 (11:02 +0200)]
* lisp/emacs-lisp/comp.el (comp-jump-table-optimizable): Refactor.

19 months agoCorrectly export file:// URIs on Android
Po Lu [Thu, 1 Jun 2023 08:31:50 +0000 (16:31 +0800)]
Correctly export file:// URIs on Android

* java/org/gnu/emacs/EmacsService.java (browseUrl): If uri's
scheme is `file', rewrite it into a content URI.

19 months agoUpdate Android port
Po Lu [Thu, 1 Jun 2023 07:16:02 +0000 (15:16 +0800)]
Update Android port

* java/org/gnu/emacs/EmacsInputConnection.java
(EmacsInputConnection, performContextMenuAction): New function.
* java/org/gnu/emacs/EmacsNative.java (EmacsNative)
(performContextMenuAction): New function.
* src/android.c (android_get_gc_values): Implement more
efficiently.
* src/androidterm.c (android_handle_ime_event): Pass through
`update' argument to `finish_composing_text'.  Fix thinko.
* src/textconv.c (really_finish_composing_text)
(really_set_composing_text, really_set_composing_region)
(handle_pending_conversion_events_1, finish_composing_text): New
argument `update'.  Notify IME of conversion region changes if
set.
* src/textconv.h: Update structs and prototypes.

19 months ago; * test/infra/gitlab-ci.yml (variables): Enable CI_DEBUG_TRACE.
Michael Albinus [Thu, 1 Jun 2023 06:47:18 +0000 (08:47 +0200)]
; * test/infra/gitlab-ci.yml (variables): Enable CI_DEBUG_TRACE.

19 months agoUpdate Android port
Po Lu [Thu, 1 Jun 2023 02:05:42 +0000 (10:05 +0800)]
Update Android port

* java/org/gnu/emacs/EmacsInputConnection.java
(EmacsInputConnection): Add compatibility adjustments for
Samsung devices.

19 months agoCorrectly report start and end in extracted text
Po Lu [Thu, 1 Jun 2023 00:29:48 +0000 (08:29 +0800)]
Correctly report start and end in extracted text

* src/androidterm.c (struct android_get_extracted_text_context):
New field `start_offset' and `end_offset'.  Delete `offset'.
(android_get_extracted_text, android_build_extracted_text):
Replace `offset' with new args `start_offset' and `end_offset'.
(NATIVE_NAME): Set `start_offset' and `end_offset'.
(android_update_selection): Likewise.
* src/textconv.c (get_extracted_text): Likewise.
* src/textconv.h: Update prototypes.

19 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Wed, 31 May 2023 23:40:25 +0000 (07:40 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

19 months ago; Fix 'package-install-upgrade-built-in' check for package menu
Philip Kaludercic [Sat, 27 May 2023 08:13:21 +0000 (10:13 +0200)]
; Fix 'package-install-upgrade-built-in' check for package menu

* lisp/emacs-lisp/package.el (package-menu--find-upgrades): Use
correct check to verify if a built-in packages in the package menu can
be upgraded or not.

This change improves upon a faulty assumption from
ba2c76fa2bc3aabfda7d1d09cc5148f3f9d8e08e.  (Bug#63587)

19 months agoAdd type_predicate 'is' as keyword in typescript-ts-mode (bug#63810)
Theodor Thornhill [Wed, 31 May 2023 18:47:06 +0000 (20:47 +0200)]
Add type_predicate 'is' as keyword in typescript-ts-mode (bug#63810)

* lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode--keywords):
New keyword 'is'.

19 months ago* lisp/composite.el (compose-gstring-for-terminal): Fix omitted var.
Mattias Engdegård [Wed, 31 May 2023 16:55:03 +0000 (18:55 +0200)]
* lisp/composite.el (compose-gstring-for-terminal): Fix omitted var.

It may not make much of a difference since the code path is probably
only taken once for i=0 with no more glyphs in the input, but this
change avoids depending on such external invariants and makes
the code less mystifying to the reader (bug#63807).

19 months agoDisable unused-return-value warning for delq and delete, again
Mattias Engdegård [Wed, 31 May 2023 14:34:01 +0000 (16:34 +0200)]
Disable unused-return-value warning for delq and delete, again

* lisp/emacs-lisp/bytecomp.el (important-return-value-fns):
Remove `delq` and `delete` since they resulted in false
positives that nobody was interested in silencing (bug#61730).

19 months ago* lisp/net/shr.el (shr-dom-max-natural-width): Rewrite muddled code.
Mattias Engdegård [Tue, 30 May 2023 20:58:26 +0000 (22:58 +0200)]
* lisp/net/shr.el (shr-dom-max-natural-width): Rewrite muddled code.

19 months ago; * test/src/comp-tests.el (non-locals): Repair botched test.
Mattias Engdegård [Tue, 30 May 2023 20:54:21 +0000 (22:54 +0200)]
; * test/src/comp-tests.el (non-locals): Repair botched test.

19 months agoFix infloop in info-look.el
Eli Zaretskii [Wed, 31 May 2023 14:50:53 +0000 (17:50 +0300)]
Fix infloop in info-look.el

* lisp/info-look.el (info-lookup-guess-gdb-script-symbol): Fix
infloop when there are no completions.  (Bug#63808)

19 months agoFix several todo-mode.el item editing bugs (bug#63811)
Stephen Berman [Wed, 31 May 2023 14:15:48 +0000 (16:15 +0200)]
Fix several todo-mode.el item editing bugs (bug#63811)

* lisp/calendar/todo-mode.el (todo-insert-item--basic): With
insertion type 'here', ensure item is inserted on the todo-mode
line where the command was invoked.
(todo-edit-item--cat, todo-edit-item--pos): New variables.
(todo-edit-item--text): Restrict the scope of nil-valued
buffer-read-only to the functions that change buffer text.  If
user moved point while editing a single-line todo item or a done
item comment, or while inserting a done item comment, restore
point, and for comments, make sure the done items section is
displayed.  For multiline items, set the new variables so
todo-edit-quit can use them.
(todo-edit-quit): Use the values of the new variables to restore
point in the todo-mode buffer if it had been moved while editing.
(todo-edit-item--header): Avoid clobbering match data when editing
a todo item header.

19 months agodockerfile-ts-mode: Prevent empty categories in imenu (Bug#63759)
Randy Taylor [Sun, 28 May 2023 00:52:37 +0000 (20:52 -0400)]
dockerfile-ts-mode: Prevent empty categories in imenu (Bug#63759)

* lisp/progmodes/dockerfile-ts-mode.el (dockerfile-ts-mode--imenu):
Don't include empty categories.

19 months ago; * lisp/misc.el (forward-to-word, backward-to-word): Doc fix.
Eli Zaretskii [Wed, 31 May 2023 13:13:56 +0000 (16:13 +0300)]
; * lisp/misc.el (forward-to-word, backward-to-word): Doc fix.

19 months agoMake forward and backward-to-word arg optional
Zaz Brown [Sun, 21 May 2023 04:33:51 +0000 (21:33 -0700)]
Make forward and backward-to-word arg optional

* lisp/misc.el (forward-to-word, backward-to-word): Make the
argument optional.  (Bug#63626)

Copyright-paperwork-exempt: yes

19 months agoFix build with Lisp_Object type checking
Po Lu [Wed, 31 May 2023 13:08:33 +0000 (21:08 +0800)]
Fix build with Lisp_Object type checking

* configure.ac: Pass through `--enable-check-lisp-object-type'
on Android.
* src/alloc.c (android_make_lisp_symbol):
* src/android.c:
* src/androidfns.c (android_set_no_focus_on_map)
(android_set_no_accept_focus):
* src/androidfont.c (androidfont_match, androidfont_open_font):
* src/androidselect.c (Fandroid_get_clipboard)
(Fandroid_get_clipboard_targets):
* src/keyboard.c (make_lispy_event, syms_of_keyboard):
* src/sfntfont.c (sfnt_enum_font_1, sfntfont_list_1):
* src/textconv.c (really_set_point_and_mark): Fix Lisp_Object
and integer screw-ups.

19 months agoBrush up doc strings and terminology in plstore.el
Jens Schmidt [Mon, 22 May 2023 19:47:13 +0000 (21:47 +0200)]
Brush up doc strings and terminology in plstore.el

* lisp/plstore.el (plstore-encoded, plstore-passphrase-callback-function)
(plstore--init-from-buffer, plstore-revert, plstore-close)
(plstore--merge-secret, plstore--decrypt, plstore--match, plstore-find)
(plstore-get, plstore-put, plstore-delete, plstore--insert-buffer)
(plstore-save, plstore--encode, plstore--decode)
(plstore--write-contents-functions, plstore-mode-decoded)
(plstore-mode): Brush up doc strings and documentation in general.
Fix terminology, in particular spurious occurences of all uppercase
"PLSTORE".  (Bug#63627)

19 months agoAdd internal documentation on plstore.el
Jens Schmidt [Sun, 21 May 2023 19:37:35 +0000 (21:37 +0200)]
Add internal documentation on plstore.el

* lisp/plstore.el: Add internal documentation and some words of
warning in the user documentation.  (Bug#63627)

19 months ago; * etc/NEWS: Fix typos.
Michael Albinus [Wed, 31 May 2023 06:45:08 +0000 (08:45 +0200)]
; * etc/NEWS: Fix typos.

19 months agoImprove tree-sitter tests on emba
Michael Albinus [Wed, 31 May 2023 06:44:44 +0000 (08:44 +0200)]
Improve tree-sitter tests on emba

* test/infra/Dockerfile.emba (emacs-tree-sitter): Install only
grammars which are needed.

* test/infra/Makefile.in (subdir_template): Special handling of
progmodes.
(TREE-SITTER-FILES): New variable.
(tree-sitter-files-template): New rule.
(.PHONY, generate-test-jobs): Add it to dependencies.

* test/infra/gitlab-ci.yml (.tree-sitter-template):
Add test/lisp/progmodes/*-ts-mode-resources/**.
(test-tree-sitter): Extends also .tree-sitter-files-template.  Use
$tree-sitter-files.

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

19 months agoUpdate Android port
Po Lu [Wed, 31 May 2023 05:47:08 +0000 (13:47 +0800)]
Update Android port

* doc/emacs/input.texi (Other Input Devices, Touchscreens)
(On-Screen Keyboards):
* doc/lispref/commands.texi (Misc Events):
* src/android.c (android_faccessat): Improve word choices and
commentary.
* lisp/touch-screen.el (touch-screen-handle-scroll): Make
precision scrolling work better with horizontal movement.

19 months ago; * src/android.c (android_copy_area): Pacify compiler warning.
Po Lu [Wed, 31 May 2023 03:50:21 +0000 (11:50 +0800)]
; * src/android.c (android_copy_area): Pacify compiler warning.

19 months agoUpdate Android port
Po Lu [Wed, 31 May 2023 03:27:19 +0000 (11:27 +0800)]
Update Android port

* exec/exec.c (insert_args): New argument `arg3'.  Replace
argv[1] with that argument.
(exec_0): Pass file name of script to `insert_args'.

19 months agoUpdate android.texi
Po Lu [Wed, 31 May 2023 02:48:52 +0000 (10:48 +0800)]
Update android.texi

* doc/emacs/android.texi (What is Android?):
(Android Startup):
(Android File System):
(Android Environment):
(Android Windowing):
(Android Troubleshooting): Improve wording and various other
issues.

19 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Wed, 31 May 2023 02:16:06 +0000 (10:16 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

19 months agoUpdate Android port
Po Lu [Wed, 31 May 2023 02:13:04 +0000 (10:13 +0800)]
Update Android port

* java/debug.sh (is_root): Go back to using unix sockets; allow
adb to forward them correctly.
* java/org/gnu/emacs/EmacsInputConnection.java
(getExtractedText): Don't print text if NULL.
* java/org/gnu/emacs/EmacsService.java (EmacsService): New field
`imSyncInProgress'.
(updateIC): If an IM sync might be in progress, avoid deadlocks.
* java/org/gnu/emacs/EmacsView.java (onCreateInputConnection):
Set `imSyncInProgress' across synchronization point.
* src/android.c (android_check_query): Use __atomic_store_n.
(android_answer_query): New function.
(android_begin_query): Set `android_servicing_query' to 2.
Check once, and don't spin waiting for query to complete.
(android_end_query): Use __atomic_store_n.
(android_run_in_emacs_thread): Compare-and-exchange flag.  If
originally 1, fail.
* src/textconv.c (really_set_composing_text): Clear conversion
region if text is empty.

19 months ago'describe-function' shows function inferred type when available
Andrea Corallo [Fri, 19 May 2023 08:46:41 +0000 (10:46 +0200)]
'describe-function' shows function inferred type when available

* lisp/help-fns.el (help-fns--signature): Print function type for
native compiled code.
* etc/NEWS: Add entry.

19 months agoAdd function declarations
Mattias Engdegård [Tue, 30 May 2023 15:09:45 +0000 (17:09 +0200)]
Add function declarations

* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns):
Add get-byte, string-width, unibyte-string, special-variable-p, frexp,
buffer-hash, buffer-line-statistics, load-average, md5, secure-hash,
string-collate-equalp, string-collate-lessp, string-to-unibyte,
string-version-lessp, current-cpu-time.
(side-effect-and-error-free-fns): Add equal-including-properties.
(pure-fns): Add equal-including-properties, string-version-lessp.
* lisp/emacs-lisp/bytecomp.el (important-return-value-fns):
Add match-data.
* lisp/subr.el (buffer-local-boundp, subr-primitive-p, gensym)
(frame-configuration-p, apply-partially, make-composed-keymap)
(keymap-canonicalize, listify-key-sequence, event-modifiers)
(event-basic-type, mouse-event-p, event-start, event-end)
(event-click-count, event-line-count, posnp, posn-window, posn-area)
(posn-point, posn-x-y, posn-col-row, posn-actual-col-row)
(posn-timestamp, posn-string, posn-image, posn-object)
(posn-object-x-y, posn-object-width-height, provided-mode-derived-p)
(derived-mode-p, autoloadp, locate-eln-file, symbol-file)
(process-lines-handling-status, process-lines)
(process-lines-ignore-status, process-get)
(copy-overlay, shell-quote-argument, field-at-pos):
Add appropriate function declarations.

19 months ago; * admin/cus-test.el (cus-test-apropos): remove TODO (already done)
Mattias Engdegård [Tue, 30 May 2023 09:17:10 +0000 (11:17 +0200)]
; * admin/cus-test.el (cus-test-apropos): remove TODO (already done)

19 months ago; * admin/admin.el (cusver-scan): remove broken warning
Mattias Engdegård [Tue, 30 May 2023 09:14:01 +0000 (11:14 +0200)]
; * admin/admin.el (cusver-scan): remove broken warning

The call to `format-message` had no effect in itself, but it turns out
that actually emitting the result just results in useless warnings so
we remove it entirely.

19 months agoxml.el: remove incorrect and botched attribute whitespace collapse
Mattias Engdegård [Tue, 30 May 2023 08:38:06 +0000 (10:38 +0200)]
xml.el: remove incorrect and botched attribute whitespace collapse

* lisp/xml.el (xml-parse-attlist): Don't attempt to collapse multiple
consecutive whitespace characters into a single space, which is wrong
to do a this point when attributes must be assumed to be CDATA.

The code was actually unintentionally correct since it forgot to use
the return value of `replace-regexp-in-string` (bug#63740).

19 months ago* test/lisp/dnd-tests.el (dnd-tests-begin-text-drag): Fix typo.
Mattias Engdegård [Tue, 30 May 2023 08:23:39 +0000 (10:23 +0200)]
* test/lisp/dnd-tests.el (dnd-tests-begin-text-drag): Fix typo.

19 months agoAvoid using rx `any` for `not-newline`
Mattias Engdegård [Tue, 30 May 2023 08:04:48 +0000 (10:04 +0200)]
Avoid using rx `any` for `not-newline`

Despite its name, `any` does not match any character (use `anychar`
for that) but is an old synonym for `not-newline` and `nonl`,
retained for compatibility with the obsolete `sregex` package.

(In SRE as defined by SRFI-115, `any` does match any character.)

There is also a mild but unnecessary confusion with the more
frequently used `any` construct for character alternatives.

* lisp/edmacro.el (edmacro-mode-font-lock-keywords):
* lisp/erc/erc.el (erc--ensure-url):
* lisp/org/org.el (org-fontify-meta-lines-and-blocks-1):
* lisp/progmodes/scheme.el (scheme-imenu-generic-expression):
* test/lisp/find-cmd-tests.el (find-cmd-test-find-cmd):
Replace uses of `any` with `nonl`.

19 months agoAdd compact_constructor_declaration font-locking to java-ts-mode
Theodor Thornhill [Tue, 30 May 2023 13:29:38 +0000 (15:29 +0200)]
Add compact_constructor_declaration font-locking to java-ts-mode

* lisp/progmodes/java-ts-mode.el (java-ts-mode--font-lock-settings):
New pattern.

19 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Tue, 30 May 2023 11:16:32 +0000 (19:16 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

19 months agoClean up defcustom type quote check
Mattias Engdegård [Mon, 29 May 2023 15:49:48 +0000 (17:49 +0200)]
Clean up defcustom type quote check

* lisp/emacs-lisp/bytecomp.el
(byte-compile--suspicious-defcustom-choice): Rename to...
(byte-compile--defcustom-type-quoted): ...this and rewrite to make
more sense.  All callers updated.
(byte-compile-nogroup-warn): Better warning message.
* test/lisp/emacs-lisp/bytecomp-tests.el
(test-bytecomp-defgroup-choice): This never failed because it wasn't
actually a test.  Turn it into...
(bytecomp-test-defcustom-type-quoted): ...this, which is.

19 months ago* test/infra/gitlab-ci.yml (test-tree-sitter): Fix file list.
Michael Albinus [Tue, 30 May 2023 07:46:46 +0000 (09:46 +0200)]
* test/infra/gitlab-ci.yml (test-tree-sitter): Fix file list.

19 months agoUpdate modus-themes to their version 4.2.0
Protesilaos Stavrou [Tue, 30 May 2023 06:37:24 +0000 (09:37 +0300)]
Update modus-themes to their version 4.2.0

* doc/misc/modus-themes.org: Update the manual.

* etc/themes/modus-operandi-tritanopia-theme.el:
* etc/themes/modus-vivendi-tritanopia-theme.el: Add new themes
  optimized for users with blue-yellow color deficiency (tritanopia).

* etc/themes/modus-operandi-deuteranopia-theme.el:
* etc/themes/modus-operandi-theme.el:
* etc/themes/modus-operandi-tinted-theme.el:
* etc/themes/modus-vivendi-deuteranopia-theme.el:
* etc/themes/modus-vivendi-theme.el:
* etc/themes/modus-vivendi-tinted-theme.el: Update theme files.

* etc/themes/modus-themes.el: Update main file to the latest version.

* etc/NEWS: Rephrase the announcement about the new Modus themes to
  also mention the tritanopia-optimized items.

Detailed release notes here:
<https://protesilaos.com/codelog/2023-05-30-modus-themes-4-2-0/>.

19 months agoPreserve prompt in erc-cmd-CLEAR
F. Jason Park [Mon, 29 May 2023 04:16:39 +0000 (21:16 -0700)]
Preserve prompt in erc-cmd-CLEAR

* etc/ERC-NEWS: Mention behavioral changes to functionality provided
by the `truncate' and `log' modules and also the "/CLEAR" command.
* lisp/erc/erc-log.el (erc-truncate-buffer-on-save): Deprecate option
because three's a crowd, and ERC already has a dedicated module as
well as a slash command for this purpose.  And although this commit
restores functionality, this option has been unusable since at least
the release of ERC 5.5, with no known complaints received thus far.
Also, the doc string of `erc-save-buffer-in-logs' makes no mention of
this feature WRT interactive invocations or otherwise.
(erc-log-mode, erc-log-enable, erc-log-disable): Subscribe to
new internal hook `erc--pre-clear-functions'.
(erc-log--save-in-progress-p): New variable to help restore
`erc-truncate-buffer-on-save' and promote code reuse.
(erc-logging-enabled): Guard with `erc-log--saved-in-progress-p'.
(erc-save-buffer-in-logs): Overload `buffer' parameter to allow
various hooks to supply a non-buffer as well.  Warn when people use
`erc-truncate-buffer-on-save', which is now deprecated.
* lisp/erc/erc-stamp.el (erc-stamp-mode, erc-stamp-enable,
erc-stamp-disable): Subscribe to `erc--pre-clear-functions'.
(erc-stamp--update-saved-position): New function for updating
last-logged marker on `erc-stamp--insert-date-function'.
(erc-stamp--reset-on-clear): New function to forget last inserted
stamps when truncating.
* lisp/erc/erc-truncate.el (erc-truncate-mode, erc-truncate-enable,
erc-truncate-disable): Use `erc-insert-done-hook' instead of
`erc-insert-post-hook', as implicitly suggested by an ancient comment,
which ponders whether truncating the buffer at the insertion phase may
be harmful to other hook members.
(erc-truncate-buffer-to-size): Set truncation boundary at message
break instead of line break.  Run `erc--pre-clear-functions'.
(erc-truncate-buffer): Save excursion.  This should probably be
handled by `erc-truncate-buffer-to-size' instead, but that's
likelier to cause breakage in third-party code.
* lisp/erc/erc.el (erc--pre-clear-functions): New internal hook.
(erc-cmd-CLEAR): Run `erc--pre-clear-functions' before clearing, and
don't blow away prompt.  The latter was a regression caused by
05f6fdb9e78 "Preserve ERC prompt and its bounding markers".
* test/lisp/erc/erc-scenarios-log.el: New file.  (Bug#60936)

19 months agoRecompute erc-prompt when inserting messages
F. Jason Park [Fri, 19 May 2023 06:47:27 +0000 (23:47 -0700)]
Recompute erc-prompt when inserting messages

* lisp/erc/erc.el (erc--refresh-prompt): New function for redrawing
the prompt in a couple select places.
(erc-display-line-1, erc-display-msg): Replace the prompt after
inserting messages.
* test/lisp/erc/erc-tests.el (erc--refresh-prompt): New
test.  (Bug#60936)

19 months agoSimplify erc-tab interface
F. Jason Park [Tue, 23 May 2023 06:42:11 +0000 (23:42 -0700)]
Simplify erc-tab interface

* etc/ERC-NEWS: Improve section mentioning `erc-tab'.
* lisp/erc/erc-button.el (erc-button-alist): Restore a commented out
version of the "<URL ...>" entry, which was dropped in 5adda2f4683
"Revise FORM-as-function interface in erc-button-alist" for being
redundant.  This may help unlikely objectors better adapt to the
churn.
(erc-button-next, erc-button-previous): Don't bother accommodating raw
prefix arguments; expect numeric arguments only.
* lisp/erc/erc.el (erc-tab): Change interactive spec to lowercase
"p".  (Bug#60933)

19 months agoAdd command to view ERC-NEWS
F. Jason Park [Tue, 23 May 2023 04:43:29 +0000 (21:43 -0700)]
Add command to view ERC-NEWS

* etc/ERC-NEWS: Mention `erc-news' command.
* lisp/erc/erc.el (erc--news-url, erc--news-temp-file, erc-news): Add
new command and supporting variable.

19 months agoDocument recommended way to use ERC over Tor
F. Jason Park [Tue, 23 May 2023 04:43:29 +0000 (21:43 -0700)]
Document recommended way to use ERC over Tor

* doc/misc/erc.texi: Add new SOCKS section to the chapter on
Integrations.  Also bump version in front matter.
* lisp/erc/erc.el (erc-open-socks-tls-stream): New convenience
function to connect over Tor via SOCKS proxy.

19 months ago* lisp/tmm.el (tmm-completion-delete-prompt): Add more checks (bug#63754).
Juri Linkov [Mon, 29 May 2023 17:34:53 +0000 (20:34 +0300)]
* lisp/tmm.el (tmm-completion-delete-prompt): Add more checks (bug#63754).

In case when 'completions-header-format' is nil, the first 'mouse-face'
property is at the beginning of the buffer.  So first use 'get-text-property'
at point-min.

19 months agoRevert "* Nativecomp disable propagation of pre slot access type check..."
Andrea Corallo [Mon, 29 May 2023 16:06:33 +0000 (18:06 +0200)]
Revert "* Nativecomp disable propagation of pre slot access type check..."

This reverts commit c8e527cbeeea6be9bb713af33a3f40408b261234 as
56a8d57d032 fixes the root cause.

19 months agocomp: Recompute type slots after byte compilation for user types
Andrea Corallo [Sun, 28 May 2023 12:49:19 +0000 (14:49 +0200)]
comp: Recompute type slots after byte compilation for user types

* lisp/emacs-lisp/comp-cstr.el (comp--compute-typeof-types)
(comp--compute--pred-type-h): New functions.
(comp-cstr-ctxt): Make use of.
(comp-cstr-ctxt-update-type-slots): New function.

* lisp/emacs-lisp/comp.el (comp-spill-lap): Use
`comp-cstr-ctxt-update-type-slots'.

19 months agoAdd tree-sitter tests to emba
Michael Albinus [Mon, 29 May 2023 15:26:46 +0000 (17:26 +0200)]
Add tree-sitter tests to emba

* admin/notes/emba: Add docker image emacs-tree-sitter.  Improve
docker call.

* test/infra/Dockerfile.emba (emacs-tree-sitter): New image.

* test/infra/gitlab-ci.yml (.tree-sitter-template): New template.
(build-image-tree-sitter, test-tree-sitter): New jobs.

19 months agoAllow to disable the DWIMish behavior of 'x' in package menu
Eli Zaretskii [Mon, 29 May 2023 13:44:48 +0000 (16:44 +0300)]
Allow to disable the DWIMish behavior of 'x' in package menu

* lisp/emacs-lisp/package.el
(package-menu-use-current-if-no-marks): New defcustom.
(package-menu-execute): Use it.  (Bug#62563)

* etc/NEWS: Announce the new option.

19 months agoAllow dired to invoke secondary browser
Robert Pluim [Tue, 25 Apr 2023 10:28:47 +0000 (12:28 +0200)]
Allow dired to invoke secondary browser

'browse-url-of-dired-file' always invokes the primary browser, but
sometimes it's handy to call a different browser, which is why
'browse-url-secondary-browser-function' exists.

* lisp/net/browse-url.el (browse-url-of-dired-file): Call
'browse-url-secondary-browser-function' when invoked with a prefix
argument.
* etc/NEWS: Announce the change.

19 months agoAdd a binding for enriched-toggle-markup
Robert Pluim [Tue, 25 Apr 2023 10:27:00 +0000 (12:27 +0200)]
Add a binding for enriched-toggle-markup

* lisp/textmodes/enriched.el (enriched-mode-map): Bind
'enriched-toggle-markup' to 'M-o m'.
* etc/NEWS: Announce the change.