1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-08 00:33:13 -08:00
Commit graph

173671 commits

Author SHA1 Message Date
James Thomas
0df8dadde2 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):
2024-03-30 14:40:42 -07:00
Theodor Thornhill
a33e7c0286 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.
2024-03-30 20:48:32 +01:00
Theodor Thornhill
e5e3c9cef6 Fix typo in docstring
* lisp/progmodes/eglot.el (eglot-lsp-server): eglot-current-server is
now exposed.
2024-03-30 20:48:32 +01:00
Eli Zaretskii
000f919b3c 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.
2024-03-30 19:33:23 +03:00
Mattias Engdegård
1135ce461d 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.
2024-03-30 15:19:56 +01:00
Mattias Engdegård
890edfd2bb 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.
2024-03-30 14:45:53 +01:00
Eli Zaretskii
ab016657e7 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2024-03-30 16:37:27 +03:00
David Ponce
cc212ea314 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'.
2024-03-30 16:35:11 +03:00
Tony Zorman
77115be256 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.
2024-03-30 13:49:21 +01:00
Eli Zaretskii
87be53846b Merge from origin/emacs-29
946d4aad1d Avoid errors in Info-search-case-sensitively in DIR buffers
fbf6830299 Add test for previous change (bug#70023)
bcf6dd6e26 Add typescript-ts-mode indentation for interface bodies (...
2024-03-30 04:38:18 -04:00
Eli Zaretskii
966ece2475 ; Merge from origin/emacs-29
The following commit was skipped:

95d9e6eb6b * Don't install unnecessary trampolines (bug#69573) (don'...
2024-03-30 04:38:18 -04:00
Eli Zaretskii
b1e33b0b62 Merge from origin/emacs-29
38faacf353 Improve documentation of <Delete> in user manual
9d3d77f12d Fix documentation of 'other-window-for-scrolling'
2024-03-30 04:38:17 -04:00
Eli Zaretskii
1284aa2655 ; Merge from origin/emacs-29
The following commit was skipped:

96fb719942 Bump Emacs version to 29.3.50
2024-03-30 04:38:17 -04:00
Eli Zaretskii
826998e82f Merge from origin/emacs-29
ae8f815613 Update files for Emacs 29.3
2024-03-30 04:37:43 -04:00
Eli Zaretskii
706fda358b ; Merge from origin/emacs-29
The following commits were skipped:

ff6cc3d2cf * lisp/ldefs-boot.el: Regenerate.
0dab0c0d68 Bump Emacs version to 29.3
2024-03-30 04:36:13 -04:00
Eli Zaretskii
cd60fa42f6 Merge from origin/emacs-29
7a5d7be52c org--confirm-resource-safe: Fix prompt when prompting in ...
2bc865ace0 org-file-contents: Consider all remote files unsafe
6f9ea396f4 org-latex-preview: Add protection when `untrusted-content...
937b9042ad * lisp/gnus/mm-view.el (mm-display-inline-fontify): Mark ...
ccc188fcf9 * lisp/files.el (untrusted-content): New variable.
befa9fcaae org-macro--set-templates: Prevent code evaluation
3221d8d461 * admin/authors.el (authors-aliases): Add ignored authors.
8d8253f899 * etc/NEWS: Update for Emacs 29.3
2024-03-30 04:35:24 -04:00
Eli Zaretskii
06882a2d76 ; Fix last change in inclusion of byteswap.h header
* src/w32uniscribe.c (w32hb_get_font_table): Avoid warning due to
redefinition of 'bswap_32'.
2024-03-30 10:52:00 +03:00
Eli Zaretskii
d422e985ff Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2024-03-30 10:38:34 +03:00
Andreas Schwab
86c4e5a2fb Fix implicit declaration of bswap_{32,64}
* src/data.c: Move include of <byteswap.h> ...
* src/lisp.h: ... here.
2024-03-30 08:37:11 +01:00
Eli Zaretskii
c2d21bda61 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.
2024-03-30 10:37:09 +03:00
Géza Herman
a5df4d92e3 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.
2024-03-30 10:21:35 +03:00
Po Lu
21af3a9d97 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.
2024-03-30 15:05:30 +08:00
Eli Zaretskii
946d4aad1d 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)
2024-03-30 10:00:02 +03:00
Po Lu
4c9926fed1 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.
2024-03-30 09:59:36 +08:00
Po Lu
bfbddf6524 Fix building the SFNT font driver
* src/sfntfont.c (sfntfont_list, sfntfont_list_family): Update
calls to Fsort for the new calling convention.
2024-03-30 08:58:59 +08:00
Stefan Monnier
717e7edc2a * lisp/emacs-lisp/comp.el (comp--add-cond-cstrs): Consolidate 2 cases 2024-03-29 15:36:45 -04:00
Stefan Monnier
dd3e13469d * lisp/cedet/semantic/tag.el (semantic-tag): New type 2024-03-29 15:32:48 -04:00
Eli Zaretskii
42322257ba ; * lisp/shell.el (w32-application-type): Fix 'declare-function'. 2024-03-29 18:26:38 +03:00
Mattias Engdegård
f04bd55687 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.
2024-03-29 15:51:23 +01:00
Mattias Engdegård
d2d5e51439 * src/fns.c (Fvaluelt): More generous depth limit (20 -> 200).
This gives `value<` the same limit as `equal` which seems about right.
2024-03-29 15:40:15 +01:00
Sam Steingold
6f7cb96543 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.
2024-03-29 10:36:43 -04:00
Eli Zaretskii
1f19ddec5b ; * doc/lispref/sequences.texi (Sequence Functions): Fix markup and examples. 2024-03-29 15:03:44 +03:00
Mattias Engdegård
2f0df93d8c ; * test/lisp/vc/vc-git-tests.el: bend doc string quote 2024-03-29 11:53:56 +01:00
Mattias Engdegård
b20866c4b3 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.
2024-03-29 11:39:38 +01:00
Mattias Engdegård
cbd862865f 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.
2024-03-29 11:39:38 +01:00
Mattias Engdegård
92d659ce6c 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).
2024-03-29 11:39:38 +01:00
Mattias Engdegård
45941a62c7 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.
2024-03-29 11:39:38 +01:00
Mattias Engdegård
deae311281 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.
2024-03-29 11:39:38 +01:00
Mattias Engdegård
ae5f2c02bd 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.
2024-03-29 11:39:38 +01:00
Mattias Engdegård
a52f1121a3 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.
2024-03-29 11:39:38 +01:00
Mattias Engdegård
1232ab31c6 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.
2024-03-29 11:39:38 +01:00
Po Lu
c3684b9788 ; * java/org/gnu/emacs/EmacsActivity.java (isReallyFinishing): Fix typo. 2024-03-29 08:26:48 +08:00
Po Lu
755665d95a 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.
2024-03-29 08:26:48 +08:00
Stefan Monnier
4cee95815b 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.
2024-03-28 15:31:04 -04:00
Theodor Thornhill
fbf6830299 Add test for previous change (bug#70023)
* test/lisp/progmodes/typescript-ts-mode-resources/indent.erts: Add
test.
2024-03-28 19:03:02 +01:00
Noah Peart
bcf6dd6e26 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.
2024-03-28 19:02:57 +01:00
Stefan Monnier
de9e913f9e * lisp/emacs-lisp/cl-macs.el (list): Predefine predicate by hand 2024-03-28 12:27:54 -04:00
Eli Zaretskii
6c1a11078b Fix a typo in flymake.el
* lisp/progmodes/flymake.el (flymake--update-eol-overlays): Use
'save-restriction', not 'save-excursion'.  (Bug#69984)
2024-03-28 12:15:13 +02:00
Joseph Turner
a4da3971f2 copy-tree just image map, not entire image
* lisp/image.el (image--compute-original-map): Copy only
the image map.  (Bug#69602)
2024-03-28 12:11:50 +02:00
Eli Zaretskii
f021c3dbcd ; * etc/NEWS: Announce new feature of Proced. (Bug#69784) 2024-03-28 11:50:22 +02:00