]> git.eshelyaron.com Git - emacs.git/log
emacs.git
12 months agoList special directories when reading root directory on Android
Po Lu [Sun, 31 Mar 2024 07:33:40 +0000 (15:33 +0800)]
List special directories when reading root directory on Android

* src/androidvfs.c (root_vfs_ops): Substitute
android_root_opendir for android_root_opendir.
(struct android_root_vdir): New structure.
(root_fd, root_fd_references): New variables.
(android_root_readdir, android_root_closedir, android_root_dirfd)
(android_root_opendir): New functions.
(android_fstatat_1): Test provided fd against root_fd, and if
they match, prefix FILENAME with the name of the root directory.

* lisp/ls-lisp.el (ls-lisp-insert-directory): If d-f-a-a signals
an error while retrieving attributes, compile the alist of
directory contents by hand.

(cherry picked from commit 7f377407b4b7d6ac9994ed983d7516bc42139885)

12 months ago; Skip commit de8cae30bcf8283e4c3b069ccb8b75224659ac5c
Eshel Yaron [Sun, 31 Mar 2024 18:06:46 +0000 (20:06 +0200)]
; Skip commit de8cae30bcf8283e4c3b069ccb8b75224659ac5c

12 months agoFix the new PEG library
Eli Zaretskii [Sun, 31 Mar 2024 07:29:34 +0000 (10:29 +0300)]
Fix the new PEG library

* doc/lispref/peg.texi (Parsing Expression Grammars)
(PEX Definitions, Parsing Actions, Writing PEG Rules): Fix markup,
indexing, and wording.

* etc/NEWS: Fix wording of PEG entry.

* test/lisp/progmodes/peg-tests.el: Move from test/lisp/, to match
the directory of peg.el.

(cherry picked from commit 994bcc125b66397b455c8a7b70fb454b483df052)

12 months ago; Another round of stylistic fixes in json.c
Eli Zaretskii [Sun, 31 Mar 2024 06:31:58 +0000 (09:31 +0300)]
; Another round of stylistic fixes in json.c

* src/json.c (json_parser_init, json_parse_object)
(json_parse_value, Fjson_parse_string, json_parse)
(json_create_float, json_create_integer, json_parse_args): Fix
whitespace and indentation.

(cherry picked from commit 914b00f2079431bd0d44618f1d3558986ac5c282)

12 months ago; json.c stylistic adjustments
Po Lu [Sun, 31 Mar 2024 00:26:48 +0000 (08:26 +0800)]
; json.c stylistic adjustments

* src/json.c (json_signal_error, json_parser_init)
(json_parse_object, json_parse_value, syms_of_json): Tabify and
wrap unacceptably long lines.

(cherry picked from commit 411f46fd365bc0008c58e1fa6bee6a60d841da75)

12 months ago; json.c stylistic adjustments
Po Lu [Sun, 31 Mar 2024 00:22:56 +0000 (08:22 +0800)]
; json.c stylistic adjustments

* src/json.c (json_parse_args, json_out_t, symset_t, symset_size)
(Fjson_serialize, Fjson_insert): Tabify and modify all sentences
to be punctuated with two spaces.

(cherry picked from commit d2c822944cc6e4480e64ec8c90f74a256971dfdd)

12 months agoAdd peg.el as a built-in library
Eric Abrahamsen [Tue, 6 Dec 2022 05:59:03 +0000 (21:59 -0800)]
Add peg.el as a built-in library

* lisp/progmodes/peg.el: New file, taken from ELPA package.
* test/lisp/peg-tests.el: Package tests.
* doc/lispref/peg.texi: Documentation.

(cherry picked from commit 8bee4060ea42c61e52ebe6487ff97bc095261050)

12 months agoMake gnus cache work with group names having '/'
James Thomas [Thu, 14 Mar 2024 03:12:00 +0000 (08:42 +0530)]
Make gnus cache work with group names having '/'

Make `gnus-cache-file-name` use the existing
`nnmail-group-pathname`.

* lisp/gnus/gnus-cache.el (gnus-cache-file-name)
(gnus-cache-update-article):
* lisp/gnus/nnmail.el (nnmail-group-pathname):

(cherry picked from commit 0df8dadde2edaee406c76d639a22c70d0b03426b)

12 months agoDisable workDoneProgress if defcustom is nil
Theodor Thornhill [Sat, 30 Mar 2024 08:35:16 +0000 (09:35 +0100)]
Disable workDoneProgress if defcustom is nil

There is no need to receive the $/progress notifications from the server
if we don't want to render them. Because they are effectively ignored
when eglot-report-progress is nil we'd rather not waste cycles on serde
of the messages.

* lisp/progmodes/eglot.el (eglot-client-capabilities): use value from
defcustom to decide whether or not to advertise to server.

(cherry picked from commit a33e7c0286c2a9c8af1c96db42f5c0c37611c9db)

12 months agoFix typo in docstring
Theodor Thornhill [Fri, 29 Mar 2024 08:18:53 +0000 (09:18 +0100)]
Fix typo in docstring

* lisp/progmodes/eglot.el (eglot-lsp-server): eglot-current-server is
now exposed.

(cherry picked from commit e5e3c9cef64e3ef3f54b91f98e28e030aba8c93f)

13 months agoFix the native JSON support code
Eli Zaretskii [Sat, 30 Mar 2024 16:33:23 +0000 (19:33 +0300)]
Fix the native JSON support code

* src/Makefile.in (base_obj): Add the missing json.o.  Without
this, we get link error.
* src/json.c (json_serialize): Don't use too sophisticated C99
features, as they confuse make-docfile.  Initialize all the
members explicitly.

(cherry picked from commit 000f919b3c7779609dc43773fdc49aca9b50d76f)

13 months agoAlways enable native JSON support and remove Jansson references
Mattias Engdegård [Sat, 30 Mar 2024 14:13:24 +0000 (15:13 +0100)]
Always enable native JSON support and remove Jansson references

* src/json.c (Fjson__available_p): Remove.
* lisp/subr.el (json-available-p): Always return t.
* admin/nt/dist-build/build-dep-zips.py:
* configure.ac:
* doc/lispref/text.texi (Parsing JSON):
* java/INSTALL:
* java/org/gnu/emacs/EmacsNative.java (EmacsNative):
* lisp/term/w32-win.el (dynamic-library-alist):
* m4/ndk-build.m4 (ndk_INIT):
* msdos/sed1v2.inp:
* nt/INSTALL:
* nt/INSTALL.W64:
* src/Makefile.in:
* src/emacs.c (main):
* src/lisp.h:
Remove JSON configuration options and references to it and Jansson from
documentation and build files.
* etc/NEWS: Announce.

(cherry picked from commit 1135ce461d188869e0294af45641edc2cbfacbf0)

13 months agoNew JSON encoder (bug#70007)
Mattias Engdegård [Tue, 26 Mar 2024 15:44:09 +0000 (16:44 +0100)]
New JSON encoder (bug#70007)

It is in general at least 2x faster than the old encoder and does not
depend on any external library.  Using our own code also gives us
control over translation details: for example, we now have full
bignum support and tighter float formatting.

* src/json.c (json_delete, json_initialized, init_json_functions)
(json_malloc, json_free, init_json, json_out_of_memory)
(json_releae_object, check_string_without_embedded_nulls, json_check)
(json_check_utf8, lisp_to_json_nonscalar_1, lisp_to_json_nonscalar)
(lisp_to_json, json_available_p, ensure_json_available, json_insert)
(json_handle_nonlocal_exit, json_insert_callback):
Remove.  Remaining uses updated.
* src/json.c (json_out_t, symset_t, struct symset_tbl)
(symset_size, make_symset_table, push_symset, pop_symset)
(cleanup_symset_tables, symset_hash, symset_expand, symset_add)
(json_out_grow_buf, cleanup_json_out, json_make_room, JSON_OUT_STR)
(json_out_str, json_out_byte, json_out_fixnum, string_not_unicode)
(json_plain_char, json_out_string, json_out_nest, json_out_unnest)
(json_out_object_cons, json_out_object_hash), json_out_array)
(json_out_float, json_out_bignum, json_out_something)
(json_out_to_string, json_serialize): New.
(Fjson_serialize, Fjson_insert):
New JSON encoder implementation.
* test/src/json-tests.el (json-serialize/object-with-duplicate-keys)
(json-serialize/string): Update tests.

(cherry picked from commit 890edfd2bb8fd79730919972cc82811b73c7f572)

13 months agobug#69992: Minor improvement to image map transformation logic
David Ponce [Sat, 30 Mar 2024 12:59:41 +0000 (13:59 +0100)]
bug#69992: Minor improvement to image map transformation logic

* lisp/image.el (image--compute-rotation): New function.
(image--compute-map, image--compute-original-map): Use it.
Ensure all transformations are applied or undone according to what
Emacs does internally.  Call a transformation function only when
needed.  Fix doc string.
(image--scale-map, image--rotate-map): Assume effective scale
argument.
(image--rotate-coord): Improve doc string.
(image--flip-map): Remove no more used argument FLIP.

* test/lisp/image-tests.el (image-create-image-with-map): Use a
valid SVG image otherwise `image-size' will not return a valid
value and calculation of scale could fail.
(image-transform-map): Update according to changed signature of
`image--flip-map'.

(cherry picked from commit cc212ea314d45c98761ae7f68600ad8bf799ea36)

13 months agoAdd use-package-vc-prefer-newest user option
Tony Zorman [Thu, 21 Dec 2023 16:51:09 +0000 (17:51 +0100)]
Add use-package-vc-prefer-newest user option

* lisp/use-package/use-package-core.el (use-package-vc-prefer-newest):
User option to prefer the latest commit (as opposed to the latest
release) of a package.
(use-package-normalize--vc-arg): Check for
use-package-vc-prefer-newest.

* doc/misc/use-package.texi (Install package): Document
use-package-vc-prefer-newest.

* etc/NEWS: Document use-package-vc-prefer-newest.

(cherry picked from commit 77115be256d08c6524bc0c498d1d268686814090)

13 months ago; Fix last change in inclusion of byteswap.h header
Eli Zaretskii [Sat, 30 Mar 2024 07:52:00 +0000 (10:52 +0300)]
; Fix last change in inclusion of byteswap.h header

* src/w32uniscribe.c (w32hb_get_font_table): Avoid warning due to
redefinition of 'bswap_32'.

(cherry picked from commit 06882a2d768241a814d7f9da24e1e5436207c0d8)

13 months agoFix implicit declaration of bswap_{32,64}
Andreas Schwab [Sat, 30 Mar 2024 07:29:52 +0000 (08:29 +0100)]
Fix implicit declaration of bswap_{32,64}

* src/data.c: Move include of <byteswap.h> ...
* src/lisp.h: ... here.

(cherry picked from commit 86c4e5a2fb3fd6b7acb8a3fc10e1e7c2eb8012a9)

13 months agoClean up removal of libjansson parser
Eli Zaretskii [Sat, 30 Mar 2024 07:37:09 +0000 (10:37 +0300)]
Clean up removal of libjansson parser

* src/json.c (json_has_suffix, json_has_prefix): Remove unused
functions.
(json_object_key_to_iter, json_array_get, json_loads)
(json_load_callback, json_object_iter, json_object_iter_value)
(json_string_value, json_object_size, json_object_iter_key)
(json_object_iter_next, json_real_value, json_string_length)
(json_integer_value) [WINDOWSNT]: Don't DEF_DLL_FN, don't
LOAD_DLL_FN, and don't define a macro for unused libjansson
functions.
(JSON_HAS_ERROR_CODE): Remove: not used.

(cherry picked from commit c2d21bda6182511f453f7bea2cbff2e0640625c9)

13 months agoReplace libjansson JSON parser with a custom one
Géza Herman [Wed, 6 Mar 2024 12:14:50 +0000 (13:14 +0100)]
Replace libjansson JSON parser with a custom one

* src/json.c (json_parse_error, json_to_lisp)
(json_read_buffer_callback): Remove functions.
(struct json_parser): New struct.
(json_signal_error, json_parser_init, json_parser_done)
(json_make_object_workspace_for_slow_path)
(json_make_object_workspace_for, json_byte_workspace_reset)
(json_byte_workspace_put_slow_path, json_byte_workspace_put)
(json_input_at_eof, json_input_switch_to_secondary)
(json_input_get_slow_path, json_input_get)
(json_input_get_if_possible, json_input_put_back)
(json_skip_whitespace_internal, json_skip_whitespace)
(json_skip_whitespace_if_possible, json_hex_value)
(json_parse_unicode, json_handle_utf8_tail_bytes)
(json_parse_string, json_create_integer, json_create_float)
(json_parse_number, json_parse_array)
(json_parse_object_member_value, json_parse_object)
(json_is_token_char, json_parse_value, json_parse): New functions.
(Fjson_parse_buffer, Fjson_parse_string): Adjust to changes in the
parser.
(syms_of_json): DEFSYM new symbols and define_error new errors.

(cherry picked from commit a5df4d92e37a176396577ac901b85025a6952376)

13 months agoDisable VC in special directories on Android
Po Lu [Sat, 30 Mar 2024 07:05:30 +0000 (15:05 +0800)]
Disable VC in special directories on Android

* lisp/vc/vc-hooks.el (vc-registered, vc-backend): Return nil
without invoking any backend if FILE or FILE-OR-LIST sits within
/content or /assets.

(cherry picked from commit 21af3a9d9706baa417298e70260efa3fce72c6f1)

13 months agoAvoid errors in Info-search-case-sensitively in DIR buffers
Eli Zaretskii [Sat, 30 Mar 2024 07:00:02 +0000 (10:00 +0300)]
Avoid errors in Info-search-case-sensitively in DIR buffers

* lisp/info.el (Info-search): Don't run the "try other subfiles"
code if there are no subfiles.  This happens, for example, in DIR
files.  (Bug#70058)

(cherry picked from commit 946d4aad1dfb244352dfd0845a8bc3078fe9bca4)

13 months agoRationalize java/Makefile.in
Po Lu [Sat, 30 Mar 2024 01:59:36 +0000 (09:59 +0800)]
Rationalize java/Makefile.in

* java/Makefile.in: (emacs.apk-in): Bring commentary up to date,
and package classes.dex at this stage of the process.
($(APK_NAME)): Adjust to match.

(cherry picked from commit 4c9926fed157810199695167ba8542af13b04ad3)

13 months agoFix building the SFNT font driver
Po Lu [Sat, 30 Mar 2024 00:58:59 +0000 (08:58 +0800)]
Fix building the SFNT font driver

* src/sfntfont.c (sfntfont_list, sfntfont_list_family): Update
calls to Fsort for the new calling convention.

(cherry picked from commit bfbddf65245e179ef25c3b9b2699515b2d33ecca)

13 months ago* lisp/emacs-lisp/comp.el (comp--add-cond-cstrs): Consolidate 2 cases
Stefan Monnier [Fri, 29 Mar 2024 19:36:45 +0000 (15:36 -0400)]
* lisp/emacs-lisp/comp.el (comp--add-cond-cstrs): Consolidate 2 cases

(cherry picked from commit 717e7edc2ac1e4e04019319da19c5386077dfbea)

13 months ago* lisp/cedet/semantic/tag.el (semantic-tag): New type
Stefan Monnier [Fri, 29 Mar 2024 19:32:48 +0000 (15:32 -0400)]
* lisp/cedet/semantic/tag.el (semantic-tag): New type

(cherry picked from commit dd3e13469d75851f3d7907e3373d45032382a5f5)

13 months agoAdd test for previous change (bug#70023)
Theodor Thornhill [Thu, 28 Mar 2024 18:02:09 +0000 (19:02 +0100)]
Add test for previous change (bug#70023)

* test/lisp/progmodes/typescript-ts-mode-resources/indent.erts: Add
test.

(cherry picked from commit fbf6830299998a1e99b99c69cb90b637a3d26f12)

13 months agoAdd typescript-ts-mode indentation for interface bodies (bug#70023)
Noah Peart [Wed, 27 Mar 2024 05:44:48 +0000 (22:44 -0700)]
Add typescript-ts-mode indentation for interface bodies (bug#70023)

* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--indent-rules): Add indentation rule for
interface bodies.

(cherry picked from commit bcf6dd6e266222a293e359430afdf3a2dc18369c)

13 months ago; Skip commit 95d9e6eb6b48b9b51a0b9d7de4a0c4eeed6c7a70
Eshel Yaron [Sat, 30 Mar 2024 19:36:19 +0000 (20:36 +0100)]
; Skip commit 95d9e6eb6b48b9b51a0b9d7de4a0c4eeed6c7a70

13 months agoImprove documentation of <Delete> in user manual
Eli Zaretskii [Mon, 25 Mar 2024 19:49:55 +0000 (21:49 +0200)]
Improve documentation of <Delete> in user manual

* doc/emacs/basic.texi (Erasing): Document that <Delete> deletes
entire grapheme clusters.

(cherry picked from commit 38faacf353fb4c8efb027019a4619a386edfe62c)

13 months agoFix documentation of 'other-window-for-scrolling'
Eli Zaretskii [Mon, 25 Mar 2024 13:12:42 +0000 (15:12 +0200)]
Fix documentation of 'other-window-for-scrolling'

* src/window.c (Fother_window_for_scrolling): More accurate
documentation of how "the other" window is looked for.  Suggested
by Karthik Chikmagalur <karthikchikmagalur@gmail.com>.

(cherry picked from commit 9d3d77f12dac21c633cf10f111b0e4e574036b30)

13 months ago; Skip commit 96fb71994246508f9bcaae95395d44042941f02d
Eshel Yaron [Sat, 30 Mar 2024 19:34:59 +0000 (20:34 +0100)]
; Skip commit 96fb71994246508f9bcaae95395d44042941f02d

13 months agoUpdate files for Emacs 29.3
Eli Zaretskii [Sun, 24 Mar 2024 13:37:03 +0000 (09:37 -0400)]
Update files for Emacs 29.3

* ChangeLog.4:
* etc/AUTHORS:
* etc/HISTORY: Update for Emacs 29.3.

(cherry picked from commit ae8f815613c2e072e92aa8fe7b4bcf2fdabc7408)

13 months ago; Skip commit ff6cc3d2cf0e17fc44ac7dfd259c74f96eafa1c4
Eshel Yaron [Sat, 30 Mar 2024 19:31:36 +0000 (20:31 +0100)]
; Skip commit ff6cc3d2cf0e17fc44ac7dfd259c74f96eafa1c4

13 months ago; Skip commit 0dab0c0d688faf22adf48a429702bf906a38697b
Eshel Yaron [Sat, 30 Mar 2024 19:30:36 +0000 (20:30 +0100)]
; Skip commit 0dab0c0d688faf22adf48a429702bf906a38697b

13 months agoorg--confirm-resource-safe: Fix prompt when prompting in non-file Org buffers
Ihor Radchenko [Fri, 23 Feb 2024 09:56:58 +0000 (12:56 +0300)]
org--confirm-resource-safe: Fix prompt when prompting in non-file Org buffers

* lisp/org/org.el (org--confirm-resource-safe): When called from
non-file buffer, do not put stray "f" in the prompt.

(cherry picked from commit 7a5d7be52c5f0690ee47f30bfad973827261abf2)

13 months agoorg-file-contents: Consider all remote files unsafe
Ihor Radchenko [Tue, 20 Feb 2024 11:59:20 +0000 (14:59 +0300)]
org-file-contents: Consider all remote files unsafe

* lisp/org/org.el (org-file-contents): When loading files, consider all
remote files (like TRAMP-fetched files) unsafe, in addition to URLs.

(cherry picked from commit 2bc865ace050ff118db43f01457f95f95112b877)

13 months agoorg-latex-preview: Add protection when `untrusted-content' is non-nil
Ihor Radchenko [Tue, 20 Feb 2024 09:47:24 +0000 (12:47 +0300)]
org-latex-preview: Add protection when `untrusted-content' is non-nil

* lisp/org/org.el (org--latex-preview-when-risky): New variable
controlling how to handle LaTeX previews in Org files from untrusted
origin.
(org-latex-preview): Consult `org--latex-preview-when-risky' before
generating previews.

This patch adds a layer of protection when LaTeX preview is requested
for an email attachment, where `untrusted-content' is set to non-nil.

(cherry picked from commit 6f9ea396f49cbe38c2173e0a72ba6af3e03b271c)

13 months ago* lisp/gnus/mm-view.el (mm-display-inline-fontify): Mark contents untrusted.
Ihor Radchenko [Tue, 20 Feb 2024 09:44:30 +0000 (12:44 +0300)]
* lisp/gnus/mm-view.el (mm-display-inline-fontify): Mark contents untrusted.

(cherry picked from commit 937b9042ad7426acdcca33e3d931d8f495bdd804)

13 months ago* lisp/files.el (untrusted-content): New variable.
Ihor Radchenko [Tue, 20 Feb 2024 09:43:51 +0000 (12:43 +0300)]
* lisp/files.el (untrusted-content): New variable.

The new variable is to be used when buffer contents comes from untrusted
source.

(cherry picked from commit ccc188fcf98ad9166ee551fac9d94b2603c3a51b)

13 months agoorg-macro--set-templates: Prevent code evaluation
Ihor Radchenko [Tue, 20 Feb 2024 09:19:46 +0000 (12:19 +0300)]
org-macro--set-templates: Prevent code evaluation

* lisp/org/org-macro.el (org-macro--set-templates): Get rid of any
risk to evaluate code when `org-macro--set-templates' is called as a
part of major mode initialization.  This way, no code evaluation is
ever triggered when user merely opens the file or when
`mm-display-org-inline' invokes Org major mode to fontify mime part
preview in email messages.

(cherry picked from commit befa9fcaae29a6c9a283ba371c3c5234c7f644eb)

13 months ago* admin/authors.el (authors-aliases): Add ignored authors.
Eli Zaretskii [Sun, 24 Mar 2024 12:36:44 +0000 (08:36 -0400)]
* admin/authors.el (authors-aliases): Add ignored authors.

(cherry picked from commit 3221d8d46116fdefb19742be916d0e352dfab761)

13 months ago; Skip commit 8d8253f89915f1d9b45791d46cf974c6bdcc1457
Eshel Yaron [Sat, 30 Mar 2024 19:30:07 +0000 (20:30 +0100)]
; Skip commit 8d8253f89915f1d9b45791d46cf974c6bdcc1457

13 months ago; Simplify many 'sort' invocations using new interface
Eshel Yaron [Sat, 30 Mar 2024 09:08:07 +0000 (10:08 +0100)]
; Simplify many 'sort' invocations using new interface

13 months ago; Make 'value<' consider cons cell greater than all other objects
Eshel Yaron [Fri, 29 Mar 2024 20:37:27 +0000 (21:37 +0100)]
; Make 'value<' consider cons cell greater than all other objects

13 months ago; * lisp/shell.el (w32-application-type): Fix 'declare-function'.
Eli Zaretskii [Fri, 29 Mar 2024 15:26:38 +0000 (18:26 +0300)]
; * lisp/shell.el (w32-application-type): Fix 'declare-function'.

(cherry picked from commit 42322257ba9abdb8bcc2aceb34a27f261df070aa)

13 months ago`value<` manual entry adjustments (bug#69709)
Mattias Engdegård [Fri, 29 Mar 2024 14:25:22 +0000 (15:25 +0100)]
`value<` manual entry adjustments (bug#69709)

* doc/lispref/sequences.texi (Sequence Functions):
Explain lexicographical ordering.  Note the dual nature of `nil`.
Mention the depth limit.

(cherry picked from commit f04bd5568708f96dfad0e8240c7f8f23c90b6813)

13 months ago* src/fns.c (Fvaluelt): More generous depth limit (20 -> 200).
Mattias Engdegård [Fri, 29 Mar 2024 14:23:56 +0000 (15:23 +0100)]
* src/fns.c (Fvaluelt): More generous depth limit (20 -> 200).

This gives `value<` the same limit as `equal` which seems about right.

(cherry picked from commit d2d5e514397c453bbaa6e7fc3441af2d538eb3cf)

13 months agoSupport `shell-resync-dirs' on msys bash (Bug#70012)
Sam Steingold [Fri, 29 Mar 2024 14:36:43 +0000 (10:36 -0400)]
Support `shell-resync-dirs' on msys bash (Bug#70012)

* lisp/shell.el (w32-application-type): Declare.
(shell-mode): Set `shell-dirstack-query' to `pwd -W` when using msys bash.

(cherry picked from commit 6f7cb96543285dc8e37135abaec87d0b9a40e2e2)

13 months agoSimplify some sorting functions using the new 'sort' interface
Eshel Yaron [Fri, 29 Mar 2024 19:14:11 +0000 (20:14 +0100)]
Simplify some sorting functions using the new 'sort' interface

13 months ago; * doc/lispref/sequences.texi (Sequence Functions): Fix markup and examples.
Eli Zaretskii [Fri, 29 Mar 2024 12:03:44 +0000 (15:03 +0300)]
; * doc/lispref/sequences.texi (Sequence Functions): Fix markup and examples.

(cherry picked from commit 1f19ddec5b06720086c67d5d8b7d2184e9eef288)

13 months ago; * test/lisp/vc/vc-git-tests.el: bend doc string quote
Mattias Engdegård [Fri, 29 Mar 2024 10:53:56 +0000 (11:53 +0100)]
; * test/lisp/vc/vc-git-tests.el: bend doc string quote

(cherry picked from commit 2f0df93d8ca0a8d4d6b040458661b8eb21fc39e9)

13 months agoBetter `sort` ignored-return-value warning
Mattias Engdegård [Sun, 24 Mar 2024 17:18:41 +0000 (18:18 +0100)]
Better `sort` ignored-return-value warning

* lisp/emacs-lisp/bytecomp.el (byte-compile-form)
(bytecomp--actually-important-return-value-p):
Special handling of `sort` that takes into account that it may return
an important value depending on the :in-place keyword argument.

(cherry picked from commit b20866c4b3aa1446efda252bd5c3fa54f68c5d7f)

13 months agoRemove `sort-on` (bug#69709)
Mattias Engdegård [Fri, 22 Mar 2024 14:06:27 +0000 (15:06 +0100)]
Remove `sort-on` (bug#69709)

* lisp/sort.el (sort-on):
* doc/lispref/sequences.texi (Sequence Functions):
* etc/NEWS:
Remove the `sort-on` function which is now completely superseded by
the extended `sort` in features, ease of use, and performance.

(cherry picked from commit cbd862865ff0a08d1214ac33590e7af80d10a0ac)

13 months agoUse new-style `sort` signature in Lisp manual examples
Mattias Engdegård [Fri, 22 Mar 2024 14:08:50 +0000 (15:08 +0100)]
Use new-style `sort` signature in Lisp manual examples

* doc/lispref/help.texi (Accessing Documentation):
* doc/lispref/strings.texi (Text Comparison):
Use the new sort calling convention (bug#69709).

(cherry picked from commit 92d659ce6cd2e79231f1011202abb39606d6f06b)

13 months agoFaster non-destructive list sorting
Mattias Engdegård [Fri, 22 Mar 2024 10:54:09 +0000 (11:54 +0100)]
Faster non-destructive list sorting

Postpone the creation of a new list to after sorting which turns out to
be a lot faster (1.1x - 1.5x speedup).

* src/fns.c (sort_list, sort_vector, Fsort):
Create the new list when moving the data out from the temporary array.

(cherry picked from commit 45941a62c799f9685fae296079304ae0898920cc)

13 months agoSpeed up `sort` by special-casing the `value<` ordering
Mattias Engdegård [Thu, 21 Mar 2024 18:35:15 +0000 (19:35 +0100)]
Speed up `sort` by special-casing the `value<` ordering

This gives a 1.5x-2x speed-up when using the default :lessp value,
by eliminating the Ffuncall overhead.

* src/sort.c (order_pred_lisp, order_pred_valuelt): New.
(merge_state, inorder, binarysort, count_run, gallop_left, gallop_right)
(merge_init, merge_lo, merge_hi, tim_sort):
* src/fns.c (Fsort):
When using value<, call it directly.

(cherry picked from commit deae311281522864ebabaf56adafbe37032cc8a9)

13 months agoNew `sort` keyword arguments (bug#69709)
Mattias Engdegård [Tue, 19 Mar 2024 12:03:47 +0000 (13:03 +0100)]
New `sort` keyword arguments (bug#69709)

Add the :key, :lessp, :reverse and :in-place keyword arguments.
The old calling style remains available and is unchanged.

* src/fns.c (sort_list, sort_vector, Fsort):
* src/sort.c (tim_sort):
Add keyword arguments with associated new features.
All callers of Fsort adapted.
* test/src/fns-tests.el (fns-tests--shuffle-vector, fns-tests-sort-kw):
New test.
* doc/lispref/sequences.texi (Sequence Functions): Update manual.
* etc/NEWS: Announce.

(cherry picked from commit ae5f2c02bd2fc269e2cc32c8039d95fbf4225e69)

13 months agoAdd back timsort key function handling (bug#69709)
Mattias Engdegård [Mon, 18 Mar 2024 18:56:20 +0000 (19:56 +0100)]
Add back timsort key function handling (bug#69709)

The original timsort code did provide for a key (accessor) function
along with the necessary storage management, but we dropped it because
our `sort` function didn't need it.

Now it's been put back since it seems that it will come in handy after all.

* src/fns.c (sort_list, sort_vector, Fsort): Pass Qnil as key function
to tim_sort.
* src/sort.c (reverse_slice, sortslice_copy)
(sortslice_copy_incr, sortslice_copy_decr, sortslice_memcpy)
(sortslice_memmove, sortslice_advance): New functions.
(sortslice): New type.
(struct stretch, struct reloc, merge_state)
(binarysort, merge_init, merge_markmem, cleanup_mem)
(merge_register_cleanup, merge_getmem, merge_lo, merge_hi, merge_at)
(found_new_run, reverse_sortslice, resolve_fun, tim_sort):
Merge back previously discarded parts from the upstreams timsort code
that dealt with key functions, and adapt them to fit in.

(cherry picked from commit a52f1121a3589af8f89828e04d66f1215c361bcf)

13 months agoAdd `value<` (bug#69709)
Mattias Engdegård [Sun, 10 Mar 2024 12:18:22 +0000 (13:18 +0100)]
Add `value<` (bug#69709)

It's a general-purpose polymorphic ordering function, like `<` but
for any two values of the same type.

* src/data.c (syms_of_data): Add the `type-mismatch` error.
(bits_word_to_host_endian): Move...
* src/lisp.h (bits_word_to_host_endian): ...here, and declare inline.
* src/fns.c (Fstring_lessp): Extract the bulk of this function to...
(string_cmp): ...this 3-way comparison function, for use elsewhere.
(bool_vector_cmp, value_cmp, Fvaluelt): New.
* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns, pure-fns):
Add `value<`, which is pure and side-effect-free.
* test/src/fns-tests.el (fns-value<-ordered, fns-value<-unordered)
(fns-value<-type-mismatch, fns-value<-symbol-with-pos)
(fns-value<-circle, ert-deftest fns-value<-bool-vector): New tests.
* doc/lispref/sequences.texi (Sequence Functions):
* doc/lispref/numbers.texi (Comparison of Numbers):
* doc/lispref/strings.texi (Text Comparison):
Document the new value< function.
* etc/NEWS: Announce.

(cherry picked from commit 1232ab31c656b8564984a758957466f90ac10501)

13 months ago; Update 'read-multiple-choice' documentation
Eshel Yaron [Fri, 29 Mar 2024 12:32:41 +0000 (13:32 +0100)]
; Update 'read-multiple-choice' documentation

13 months ago; * java/org/gnu/emacs/EmacsActivity.java (isReallyFinishing): Fix typo.
Po Lu [Thu, 28 Mar 2024 11:57:22 +0000 (19:57 +0800)]
; * java/org/gnu/emacs/EmacsActivity.java (isReallyFinishing): Fix typo.

(cherry picked from commit c3684b97885c5a1f4d0713ff45c7395e9a4c6e8a)

13 months agoPrevent Android OS task trimming from deleting Emacs frames
Po Lu [Thu, 28 Mar 2024 11:56:31 +0000 (19:56 +0800)]
Prevent Android OS task trimming from deleting Emacs frames

* doc/emacs/android.texi (Android Windowing): Document proviso
on Android 7.0 and later.

* java/org/gnu/emacs/EmacsActivity.java (EmacsActivity)
<timeOfLastInteraction>: New field.
(onStop, onResume): Set and clear timeOfLastInteraction.
(isReallyFinishing): New function.
(onDestroy): Don't delete frame even in the event isFinishing
returns true if more than 4 hours have elapsed since the
activity last moved into the background.

(cherry picked from commit 755665d95adbba07335f400f1090e53b66c41ff5)

13 months agopp.el: Try and fix bug#70039
Stefan Monnier [Thu, 28 Mar 2024 19:31:04 +0000 (15:31 -0400)]
pp.el: Try and fix bug#70039

* lisp/emacs-lisp/pp.el (pp-fill): Avoid splitting `#N#` or `#[`.
* test/lisp/emacs-lisp/pp-tests.el (pp-tests--sanity): New test.

(cherry picked from commit 4cee95815b9d7d56f6f77abb1cc17e346c038685)

13 months ago* lisp/emacs-lisp/cl-macs.el (list): Predefine predicate by hand
Stefan Monnier [Thu, 28 Mar 2024 16:27:54 +0000 (12:27 -0400)]
* lisp/emacs-lisp/cl-macs.el (list): Predefine predicate by hand

(cherry picked from commit de9e913f9e2a1e01e5d091a553e98d75404a2246)

13 months agoAdd 'minibuffer-hint-mode'
Eshel Yaron [Thu, 28 Mar 2024 21:16:40 +0000 (22:16 +0100)]
Add 'minibuffer-hint-mode'

13 months agoAdd command 'register-toggle-volatility'
Eshel Yaron [Thu, 28 Mar 2024 20:29:14 +0000 (21:29 +0100)]
Add command 'register-toggle-volatility'

13 months agoImprove 'help--symbol-completion-table-affixation'
Eshel Yaron [Thu, 28 Mar 2024 18:46:43 +0000 (19:46 +0100)]
Improve 'help--symbol-completion-table-affixation'

13 months agoSupport choosing between multiple narrow-completions-functions
Eshel Yaron [Thu, 28 Mar 2024 18:24:02 +0000 (19:24 +0100)]
Support choosing between multiple narrow-completions-functions

13 months ago; Adjust 'read-multiple-choice' test
Eshel Yaron [Thu, 28 Mar 2024 17:11:15 +0000 (18:11 +0100)]
; Adjust 'read-multiple-choice' test

13 months agoFix a typo in flymake.el
Eli Zaretskii [Thu, 28 Mar 2024 10:15:13 +0000 (12:15 +0200)]
Fix a typo in flymake.el

* lisp/progmodes/flymake.el (flymake--update-eol-overlays): Use
'save-restriction', not 'save-excursion'.  (Bug#69984)

(cherry picked from commit 6c1a11078b194ed536db17381aad9e159e486fee)

13 months agocopy-tree just image map, not entire image
Joseph Turner [Sat, 23 Mar 2024 20:29:17 +0000 (13:29 -0700)]
copy-tree just image map, not entire image

* lisp/image.el (image--compute-original-map): Copy only
the image map.  (Bug#69602)

(cherry picked from commit a4da3971f2580c90fb3c6957eea2d0dbfb695879)

13 months ago; * etc/NEWS: Announce new feature of Proced. (Bug#69784)
Eli Zaretskii [Thu, 28 Mar 2024 09:50:22 +0000 (11:50 +0200)]
; * etc/NEWS: Announce new feature of Proced.  (Bug#69784)

(cherry picked from commit f021c3dbcd08eb1b0e3215ba6fd4e56364e6915f)

13 months agoAllow for auto updating only visible proced buffers (bug#69784)
Rahguzar [Fri, 15 Mar 2024 17:46:46 +0000 (18:46 +0100)]
Allow for auto updating only visible proced buffers (bug#69784)

* lisp/proced.el (proced-auto-update-flag): Document 'visible'
value and add it to the custom type.
(proced-auto-update-timer, proced-toggle-auto-update): Take
'visible' value into account.

(cherry picked from commit b2793febcaa31bf21caff2d6461fd328f0892ad2)

13 months agoImprove ert-font-lock assertion parser (Bug#69714)
Vladimir Kazanov [Tue, 12 Mar 2024 11:14:54 +0000 (11:14 +0000)]
Improve ert-font-lock assertion parser (Bug#69714)

Fail on files with no assertions, parser now accepts multiple
carets per line and face lists:
* lisp/emacs-lisp/ert-font-lock.el: Assertion parser fix.
* test/lisp/emacs-lisp/ert-font-lock-resources/no-asserts.js:
* test/lisp/emacs-lisp/ert-font-lock-tests.el
(test-parse-comments--no-assertion-error)
(test-syntax-highlight-inline--caret-negated-wrong-face)
(test-macro-test--file-no-asserts): New test cases.
* doc/misc/ert.texi (Syntax Highlighting Tests): More syntax examples.

(cherry picked from commit cdd7093e17a33a6efc4721af461af180e5af602d)

13 months ago; * lisp/emacs-lisp/pcase.el (pcase--subtype-bitsets): Doc fix.
Eli Zaretskii [Thu, 28 Mar 2024 09:34:25 +0000 (11:34 +0200)]
; * lisp/emacs-lisp/pcase.el (pcase--subtype-bitsets): Doc fix.

(cherry picked from commit 35ae2c576b8570da7b2e791991ad852c648be896)

13 months ago(pcase-mutually-exclusive): Use auto-generated table
Stefan Monnier [Thu, 28 Mar 2024 04:06:00 +0000 (00:06 -0400)]
(pcase-mutually-exclusive): Use auto-generated table

The `pcase-mutually-exclusive-predicates` table was not very
efficient since it grew like O(N²) with the number of
predicates.  Replace it with an O(N) table that's auto-generated
from the `built-in-class` objects.

* lisp/emacs-lisp/pcase.el (pcase-mutually-exclusive-predicates):
Delete variable.
(pcase--subtype-bitsets): New function and constant.
(pcase--mutually-exclusive-p): Use them.
* lisp/emacs-lisp/cl-preloaded.el (built-in-class): Don't inline.

(cherry picked from commit f1fe13ea057237f5426c93876488cb95be86156c)

13 months ago(project-current): Add binding for 'non-essential'
Dmitry Gutov [Thu, 28 Mar 2024 03:41:52 +0000 (05:41 +0200)]
(project-current): Add binding for 'non-essential'

* lisp/progmodes/project.el (project-current):
Add binding for 'non-essential' (bug#69584).

(cherry picked from commit 1552f8345d8cbea282d171bffe5a22e330eeed37)

13 months agoCorrectly check buffer mtime when displaying xref matches
Spencer Baugh [Tue, 26 Mar 2024 12:44:25 +0000 (08:44 -0400)]
Correctly check buffer mtime when displaying xref matches

This was just a typo: we were checking the modification time of
current-buffer instead of checking the modification time of the
passed-in buffer.

This caused matches to not be shown if they weren't present in
the current in-Emacs state of the buffer.

This was easily reproduced by writing a string to a file outside
Emacs, then searching for that string with
e.g. project-find-regexp.  The string would seemingly not be
found, although in reality it was found, just not displayed.

* lisp/progmodes/xref.el (xref--find-file-buffer):
Check buf, not current-buffer (bug#70008).

(cherry picked from commit 5efa2ddf62d4876fb62f23b571f4cc0af5885639)

13 months agoImprove 'read-multiple-choice--long-answers' annotations
Eshel Yaron [Wed, 27 Mar 2024 20:46:04 +0000 (21:46 +0100)]
Improve 'read-multiple-choice--long-answers' annotations

13 months agoRemove IME_FLAG_FORCE_ASCII from password input IME flags
Po Lu [Wed, 27 Mar 2024 02:03:15 +0000 (10:03 +0800)]
Remove IME_FLAG_FORCE_ASCII from password input IME flags

* java/org/gnu/emacs/EmacsView.java (onCreateInputConnection):
Passwords might also be non-ASCII, and this flag apparently
requests an IME limited to ASCII characters, rather than just
capable of ASCII input.

(cherry picked from commit 5a7c46355be1b5a9a8dbfb36ba44969963a3f558)

13 months ago* lisp/help.el (help-function-arglist): Don't `substitute-command-keys`
Stefan Monnier [Tue, 26 Mar 2024 21:41:42 +0000 (17:41 -0400)]
* lisp/help.el (help-function-arglist): Don't `substitute-command-keys`

(cherry picked from commit 48b6e6bd80f2783c6320db1f7e8fb0b3f44e2e9d)

13 months agocl-preloaded.el: Partly revert last change
Stefan Monnier [Tue, 26 Mar 2024 21:27:29 +0000 (17:27 -0400)]
cl-preloaded.el: Partly revert last change

The change caused type-check errors in auth-source where they use
`:type function` constraints on object slots and expect those to
be able to hold symbols.

* lisp/emacs-lisp/cl-preloaded.el (function): Revert last change.

* test/src/data-tests.el (data-tests--cl-type-of): Use `cl-functionp`
rather than `functionp` to test `function`.

(cherry picked from commit e5d824b632a68430535f6e94d911871eb0f3f772)

13 months agoCC Mode: Handle C++20's if consteval
Alan Mackenzie [Tue, 26 Mar 2024 20:59:43 +0000 (20:59 +0000)]
CC Mode: Handle C++20's if consteval

* lisp/progmodes/cc-engine.el (c-after-conditional): Handle the
new keyword in place of a paren sexp after `if'.

* lisp/progmodes/cc-langs.el (c-negation-op-re)
(c-paren-clause-kwds, c-paren-clause-key)
(c-block-stmt-with-kwds, c-block-stmt-with-key): New
lang-consts/vars.

* if-11.cc, if-11.res: New test files.

(cherry picked from commit ed85132740b39c147647be1831abb64a3f514d57)

13 months agocl-preloaded.el: Fix the type lattice
Stefan Monnier [Tue, 26 Mar 2024 17:14:15 +0000 (13:14 -0400)]
cl-preloaded.el: Fix the type lattice

We generally want types to form not just a DAG but a lattice.
If objects can be both `keyword` and `symbol-with-pos`, this
means there should be a more precise type describing this intersection.
If we ever find the need for such a refinement, we could add
such a `keyword-with-pos` type, but here I took the simpler
route of treating `keyword` not as a proper built-in type but
as a second-class type like `natnum`.

While fixing this problem, also fix the problem we had where
`functionp` was not quite adequate to characterize objects of type
`function`, by introducing a new predicate `cl-functionp` for that.

* lisp/emacs-lisp/cl-preloaded.el (cl-functionp): New function.
(function): Use it.
(keyword): Don't declare it as a built-in type.
(user-ptrp): Remove redundant declaration.

* lisp/emacs-lisp/cl-generic.el (cl--generic--unreachable-types):
Delete constant.
(cl-generic-generalizers): Remove corresponding test.

* lisp/emacs-lisp/cl-macs.el (cl-deftype-satisfies): Add entry for
`keyword` type.

* lisp/emacs-lisp/comp.el (comp-known-predicates): Fix type for
negative result of `characterp`.  Remove duplicate `numberp` entry.
Fix types for `keywordp` now that `keyword` is not a built-in type any more.

* test/src/data-tests.el (data-tests--cl-type-of): Add a few cases.
Remove workaround for `function`.

(cherry picked from commit 004f2493a542dd0b804a30e97fc612884ca440f4)

13 months ago; Fix recently-changed documentation
Eli Zaretskii [Tue, 26 Mar 2024 12:24:16 +0000 (14:24 +0200)]
; Fix recently-changed documentation

* src/buffer.c (syms_of_buffer) <text-conversion-style>:
* doc/lispref/commands.texi (Misc Events): Fix wording and
punctuation of the documentation.

(cherry picked from commit 351d98535dc10f8338b8a418e331cc0af488087b)

13 months agoFix native comp prediction on null functionp tested objects
Andrea Corallo [Tue, 26 Mar 2024 10:14:08 +0000 (11:14 +0100)]
Fix native comp prediction on null functionp tested objects

* lisp/emacs-lisp/comp.el (comp-known-predicates)
(comp-known-predicates-h): Update.
(comp--pred-to-pos-cstr, comp--pred-to-neg-cstr): New functions.
(comp--add-cond-cstrs): Make use of them.

* test/src/comp-tests.el (comp-tests-type-spec-tests): Add a test.

(cherry picked from commit 8cc67dbcec0753c5579e63bf82bfe247debe222c)

13 months agoPrevent focus "stalemates" on Android
Po Lu [Tue, 26 Mar 2024 02:54:39 +0000 (10:54 +0800)]
Prevent focus "stalemates" on Android

* java/org/gnu/emacs/EmacsActivity.java (invalidateFocus1): New
argument resetWhenChildless.
(invalidateFocus): If a toplevel window has no focus window,
transfer focus to the toplevel itself.

(cherry picked from commit b7b9a0a5c1afae07b8168e85dcf1fc37d29e98ef)

13 months agoPrevent passwords from being recorded during text conversion
Po Lu [Tue, 26 Mar 2024 02:11:26 +0000 (10:11 +0800)]
Prevent passwords from being recorded during text conversion

* doc/lispref/commands.texi (Misc Events): Document new value of
text-conversion-style.

* java/org/gnu/emacs/EmacsService.java (EmacsService)
<IC_MODE_PASSWORD>: New constant.

* java/org/gnu/emacs/EmacsView.java (onCreateInputConnection):
Set TYPE_TEXT_VARIATION_PASSWORD and IME_FLAG_FORCE_ASII if mode
is IC_MODE_PASSWORD.

* lisp/subr.el (read-passwd): Set text-conversion-style to
`password'.

* src/androidgui.h (enum android_ic_mode): New value
ANDROID_IC_MODE_PASSWORD.

* src/androidterm.c (android_reset_conversion): Handle
`password'.

* src/buffer.c (syms_of_buffer)
<&BVAR (current_buffer, text_conversion_style)>: Update doc
string.

* src/textconv.c (syms_of_textconv) <Qpassword>: New DEFSYM.
<Vtext_conversion_edits>: Fix typos in doc string.

(cherry picked from commit 728bf2c9e5353e68b16808ae455223549c16efc6)

13 months agoFix removal of bookmark's fringe mark in Info and Dired
Eli Zaretskii [Mon, 25 Mar 2024 13:51:07 +0000 (15:51 +0200)]
Fix removal of bookmark's fringe mark in Info and Dired

* lisp/bookmark.el (bookmark-buffer-file-name): Support Info
buffers.
(bookmark--remove-fringe-mark): Call 'bookmark-buffer-file-name'
instead of using 'buffer-file-name', which could be nil.
(Bug#69974)

(cherry picked from commit 7fba25cf5344f5c3507aedf59e6ae099e7662508)

13 months agoDocument the 'I' command in buffer-menu
Eli Zaretskii [Mon, 25 Mar 2024 12:53:23 +0000 (14:53 +0200)]
Document the 'I' command in buffer-menu

* doc/emacs/buffers.texi (Several Buffers): Document 'I'.  Fix
indexing.
(List Buffers): Mention 'I'.  (Bug#69987)

* etc/NEWS: Mark 'I' as documented.

(cherry picked from commit a79b424f7fdecf577e46c5fea6ee3d921e606596)

13 months ago* lisp/vc/diff-mode.el (diff-setup-buffer-type): Remove "\n" from regexp.
Juri Linkov [Mon, 25 Mar 2024 07:45:08 +0000 (09:45 +0200)]
* lisp/vc/diff-mode.el (diff-setup-buffer-type): Remove "\n" from regexp.

Remove extra "\n" from the end of the "diff --git.*" part
of 'diff-outline-regexp' because "\n" is not used in outline-regexp
and causes problems in such cases like when killing hunks
in the diff buffer with outline-minor-mode that loses
the outline icons because outline--fix-buttons-after-change and
outline--fix-up-all-buttons are limited to the single line and
can't match an outline line with a regexp that ends with "\n".

(cherry picked from commit f54b1d9f7b7a977ee4856c778a309c900ce9e8fa)

13 months agoPort restart-emacs to Android 4.3 and earlier
Po Lu [Mon, 25 Mar 2024 07:42:23 +0000 (15:42 +0800)]
Port restart-emacs to Android 4.3 and earlier

* java/org/gnu/emacs/EmacsService.java (restartEmacs): Run Emacs
from an alarm if required.

(cherry picked from commit ba96c4ec56a9978fce155c0af34a0412aee817b2)

13 months ago(byte-optimize-form-code-walker): Simplify a bit
Stefan Monnier [Mon, 25 Mar 2024 02:13:44 +0000 (22:13 -0400)]
(byte-optimize-form-code-walker): Simplify a bit

Eliminate a case that matches very rarely and where the default
handling works just as well anyway.

* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): Remove
redundant case.

(cherry picked from commit 83a6e80d66a4c6333e2bbb21d0428c432ddca881)

13 months ago; * lisp/simple.el (kill-buffer--possibly-save): Simplify.
Eshel Yaron [Wed, 27 Mar 2024 07:22:07 +0000 (08:22 +0100)]
; * lisp/simple.el (kill-buffer--possibly-save): Simplify.

13 months agoImprove 'read-multiple-choice'
Eshel Yaron [Tue, 26 Mar 2024 22:03:43 +0000 (23:03 +0100)]
Improve 'read-multiple-choice'

Crucially, make it more suitable for dynamic sets of choices.

13 months agoAdd global minor mode 'global-completion-preview-mode'
Eshel Yaron [Tue, 26 Mar 2024 21:34:51 +0000 (22:34 +0100)]
Add global minor mode 'global-completion-preview-mode'

This is a global variant of 'completion-preview-mode'.

* lisp/completion-preview.el (global-completion-preview-mode): New
global minor mode.

* doc/emacs/programs.texi (Symbol Completion): Document it.

* etc/NEWS: Announce it.  (Bug#70010)

13 months agoFix native compilation for circular immediates (bug#67883)
Andrea Corallo [Sun, 24 Mar 2024 10:29:37 +0000 (11:29 +0100)]
Fix native compilation for circular immediates (bug#67883)

* test/src/comp-resources/comp-test-funcs.el
(comp-test-67883-1-f): New function.

* lisp/emacs-lisp/comp.el (comp--collect-rhs)
(comp--ssa-rename-insn): Handle setimm aside to avoid unnecessary
immediate manipulation.
(comp--copy-insn-rec): Rename.
(comp--copy-insn): New function.
(comp--dead-assignments-func): Handle setimm aside to avoid
unnecessary.

(cherry picked from commit c5de73a95a6ecefe46fe1ac07da8e83032be7f5b)

13 months ago; * lisp/emacs-lisp/cl-preloaded.el (user-ptr): Fix typo.
Po Lu [Sun, 24 Mar 2024 03:05:31 +0000 (11:05 +0800)]
; * lisp/emacs-lisp/cl-preloaded.el (user-ptr): Fix typo.

Author:
(cherry picked from commit 30b1b0d7cd8e4d46a601e9737350cda970f6bab0)

13 months agoDon't define user-ptr type when user-ptrp is not present
Po Lu [Sun, 24 Mar 2024 03:02:34 +0000 (11:02 +0800)]
Don't define user-ptr type when user-ptrp is not present

* lisp/emacs-lisp/cl-preloaded.el (user-ptr): Condition on
presence of predicate function.

(cherry picked from commit 7206a620af2de7281d9c9299582241a10e79e1a3)

13 months agoImprove consistency of content file name handling
Po Lu [Sun, 24 Mar 2024 02:59:54 +0000 (10:59 +0800)]
Improve consistency of content file name handling

* java/org/gnu/emacs/EmacsService.java (getDisplayNameHash):
Always encode file names as modified UTF-8, as insurance against
future changes to undocumented behavior of the JVM.

(cherry picked from commit 2be41da38ef5432b6038058fcb0c284164fcb370)