]> git.eshelyaron.com Git - emacs.git/log
emacs.git
12 months agoPort new Android window management strategy to Android 5.0
Po Lu [Sun, 7 Apr 2024 04:15:39 +0000 (12:15 +0800)]
Port new Android window management strategy to Android 5.0

* doc/emacs/android.texi (Android Windowing): Revise to match.

* java/org/gnu/emacs/EmacsWindowManager.java (registerWindow)
(removeWindowConsumer, pruneWindows): Decrease minimum API for
monitoring of tasks to Android 5.0.
(getTaskToken): Ignore misleading documentation and access
baseIntent by way of RecentTaskInfo.

(cherry picked from commit ae296d762bc7366879e74f9dca90bc7edd89e860)

12 months ago; * etc/NEWS: Add entry about tab-bar-mode-map (bug#69578).
Juri Linkov [Sat, 6 Apr 2024 18:32:04 +0000 (21:32 +0300)]
; * etc/NEWS: Add entry about tab-bar-mode-map (bug#69578).

(cherry picked from commit ec25f5ad3d4323b56f239a06186f965c8d4cb695)

12 months ago; Commit autogenerated files.
Eli Zaretskii [Sat, 6 Apr 2024 15:15:36 +0000 (11:15 -0400)]
; Commit autogenerated files.

(cherry picked from commit e6535e41027662238e89591e6620e92b496c90b2)

12 months ago; Minor fixes of doc strings referencing keymaps.
Eli Zaretskii [Sat, 6 Apr 2024 10:43:50 +0000 (13:43 +0300)]
; Minor fixes of doc strings referencing keymaps.

* lisp/edmacro.el (edmacro-mode):
* lisp/info.el (Info-mouse-follow-nearest-node): Move the
reference to mode keymap from the first line.  (Bug#70163)

(cherry picked from commit eaec6cc3d7cc247377524225f2a51407a4cb20c7)

12 months ago; * INSTALL: Mention installation without root access (bug#70071).
Eli Zaretskii [Sat, 6 Apr 2024 10:31:06 +0000 (13:31 +0300)]
; * INSTALL: Mention installation without root access (bug#70071).

(cherry picked from commit 73569eb957e47e99d8181950afd7977a1ffa1acc)

12 months ago; * doc/lispref/commands.texi (Focus Events): Fix markup of last change.
Eli Zaretskii [Sat, 6 Apr 2024 10:13:27 +0000 (13:13 +0300)]
; * doc/lispref/commands.texi (Focus Events): Fix markup of last change.

(cherry picked from commit fab58ffc224de5e4e20ce7ea19f06ed33a036129)

12 months agoAdd documentation for 'switch-window' event
Jared Finder [Sat, 30 Mar 2024 20:14:43 +0000 (13:14 -0700)]
Add documentation for 'switch-window' event

* doc/lispref/commands.texi (Focus Events): Add
documentation for the structure of 'switch-window' events.
Make sure to be clear when referring to window system windows
vs Emacs windows.
* doc/lispref/windows.texi (Mouse Window Auto-selection):
Adding cross-reference to "Focus Events".  (Bug#69915)

(cherry picked from commit 9260904072d01e4b0f585825bfbc077310c8a974)

12 months agoSupport 'mouse-autoselect-window' in xterm-mouse
Olaf Rogalsky [Sat, 30 Mar 2024 16:00:51 +0000 (17:00 +0100)]
Support 'mouse-autoselect-window' in xterm-mouse

Generate select-window events, so that 'mouse-autoselect-window'
takes effect on TTY frames, when 'xterm-mouse-mode' is enabled.
* lisp/xt-mouse.el (xterm-mouse-translate-1):
If 'mouse-autoselect-window' is non-nil, add select-window
events to 'unread-command-events'.  (Bug#69915)

(cherry picked from commit abe39d57889cf354add083681d438d79ab28b662)

12 months ago; * etc/PROBLEMS: Entry about slow mouse-wheel with GTK3 (bug#70002).
Eli Zaretskii [Sat, 6 Apr 2024 09:14:26 +0000 (12:14 +0300)]
; * etc/PROBLEMS: Entry about slow mouse-wheel with GTK3 (bug#70002).

(cherry picked from commit 3d87d74a23d13e853f202cc589eb750c40f9e2be)

12 months ago; * doc/lispref/tips.texi (Documentation Tips): Improve (bug#70163).
Eli Zaretskii [Thu, 4 Apr 2024 13:28:31 +0000 (16:28 +0300)]
; * doc/lispref/tips.texi (Documentation Tips): Improve (bug#70163).

(cherry picked from commit c6899603b9c2e5de590ecfd6397a7125d1dab08b)

12 months ago; Update admin/make-tarball.txt
Eli Zaretskii [Thu, 4 Apr 2024 12:23:49 +0000 (15:23 +0300)]
; Update admin/make-tarball.txt

* admin/make-tarball.txt: Add text about preparing bundled
packages for an emergency release.  Suggested by Michael Albinus
<michael.albinus@gmx.de>.

(cherry picked from commit bd2c4d825db69eeb592102edff9e3afb69c5a231)

12 months ago; * etc/PROBLEMS: Add an entry about WebKitGTK (bug#66068).
Eli Zaretskii [Mon, 1 Apr 2024 12:24:47 +0000 (15:24 +0300)]
; * etc/PROBLEMS: Add an entry about WebKitGTK (bug#66068).

(cherry picked from commit f107dc26e37c7cc24b158b5dfd21b4fd8eb145f2)

12 months ago; Skip commit 305e35b2d871fdf86e7a349443fc4507d540e11e
Eshel Yaron [Sun, 7 Apr 2024 16:33:32 +0000 (18:33 +0200)]
; Skip commit 305e35b2d871fdf86e7a349443fc4507d540e11e

12 months agoFix warning-suppress for list type "warning type"
Xuan Wang [Fri, 29 Mar 2024 00:34:23 +0000 (20:34 -0400)]
Fix warning-suppress for list type "warning type"

Per the documentation of 'warning-suppress-types' and the
implementation of 'warning-suppress-p', a warning type can
be either a symbol or a list of symbols.  The previous
implementation could generate wrong 'warning-suppress-types':

  old behavior:
  type              warning-suppress-types
  pkg           ->    '((pkg))                  Correct
  (pkg subtype) ->    '(((pkg subtype)))        Incorrect

Now we check whether type is a cons cell first.  (Should not
use listp here, as listp returns t for nil.)

  new behavior:
  type              warning-suppress-types
  pkg           ->    '((pkg))                Correct
  (pkg subtype) ->    '((pkg subtype))        Correct

* lisp/emacs-lisp/warnings.el (warnings-suppress): Fix saving
warning types in 'warning-suppress-types'.  (Bug#70063)

Copyright-paperwork-exempt: yes
(cherry picked from commit 46b8746b38e26ae3f216f57f231f5fc8aec22873)

12 months agoMake object init more robust (bug#69571)
Theodor Thornhill [Sun, 31 Mar 2024 08:43:44 +0000 (10:43 +0200)]
Make object init more robust (bug#69571)

* lisp/progmodes/csharp-mode.el (csharp-guess-basic-syntax): Make the
regex same as before, but conditionally check other heuristics rather
than crazy regex shenanigans.

(cherry picked from commit 910ea5f1e55793fa29292730a59397867b4e868f)

12 months agoAdd refactor.el
Eshel Yaron [Sun, 7 Apr 2024 16:32:35 +0000 (18:32 +0200)]
Add refactor.el

12 months agoCorrect typos in and omissions from earlier Android port changes
Po Lu [Sat, 6 Apr 2024 03:17:49 +0000 (11:17 +0800)]
Correct typos in and omissions from earlier Android port changes

* java/AndroidManifest.xml.in: Remove duplicate permissions.

* java/org/gnu/emacs/EmacsWindowManager.java
(removeWindowConsumer): Disregard isFinishing for non-initial
activities.

(cherry picked from commit 617bd85cd0bd1d0a73d405d623ee3dd41c7e8a37)

12 months ago(help-fns-function-description-header): Fix last change (bug#70209)
Stefan Monnier [Fri, 5 Apr 2024 22:29:16 +0000 (18:29 -0400)]
(help-fns-function-description-header): Fix last change (bug#70209)

* lisp/help-fns.el (help-fns-function-description-header): Don't make
a button for the type if it's not a type.

(cherry picked from commit 0286a11f3139dfd4bb9d3989ae860b8c128e12d0)

12 months agoMake sh-script-tests.el more robust
Michael Albinus [Fri, 5 Apr 2024 17:43:56 +0000 (19:43 +0200)]
Make sh-script-tests.el more robust

* test/lisp/progmodes/sh-script-tests.el (test-sh-script-indentation)
(test-basic-sh-indentation, test-indent-after-continuation):
* test/lisp/progmodes/sh-script-resources/sh-indents.erts (Code):
Skip if `sh-indent-supported-here' is nil.  (Bug#70196)

(cherry picked from commit aa356d03aeb13942ae6688ce919e0aa9fb4f1689)

12 months agoMark display-comint-buffer-action as obsolete after adding a category.
Juri Linkov [Fri, 5 Apr 2024 16:44:52 +0000 (19:44 +0300)]
Mark display-comint-buffer-action as obsolete after adding a category.

* lisp/window.el (display-comint-buffer-action):
Append '(category . comint)' to the default value.  Mark as obsolete.
(display-tex-shell-buffer-action):
Append '(category . tex-shell)' to the default value.  Mark as obsolete.
(bug#69983)

(cherry picked from commit 4e22ad8cef0710bf5ce3bf99deb8dd6e30d4078c)

12 months ago; Skip commit 6480de5ea74b6b2eeebdaa3bcf9fa8e384ffbab1
Eshel Yaron [Sat, 6 Apr 2024 06:42:23 +0000 (08:42 +0200)]
; Skip commit 6480de5ea74b6b2eeebdaa3bcf9fa8e384ffbab1

12 months ago* lisp/tab-bar.el (tab-bar-mode-map): New keymap (bug#69578).
Juri Linkov [Fri, 5 Apr 2024 16:23:08 +0000 (19:23 +0300)]
* lisp/tab-bar.el (tab-bar-mode-map): New keymap (bug#69578).

(tab-bar-select-tab-modifiers): Call tab-bar--undefine-keys
before set-default in :set of defcustom.
(tab-bar--define-keys, tab-bar--undefine-keys):
Change keybindings in tab-bar-mode-map instead of the global map.
Move checking of global-key-binding to tab-bar-mode--tab-key-bind.
(tab-bar-mode--tab-key-bind): New internal function.

(cherry picked from commit 50fab7062d9edf1a2698f3d468dcbcd1c9a3ee9b)

12 months agoOnly call set-text-conversion-style if it exists
Mattias Engdegård [Fri, 5 Apr 2024 13:54:30 +0000 (15:54 +0200)]
Only call set-text-conversion-style if it exists

* lisp/auth-source.el (read-passwd): Guard call, as it was before the
code was moved here.
`set-text-conversion-style` is not present in all configurations.

(cherry picked from commit 4fc84cb23b6d671b44f18b8462e94c3bcfc3ee09)

12 months ago* lisp/help-fns.el (help-fns-function-description-header): Fix bug#70209
Stefan Monnier [Fri, 5 Apr 2024 11:41:42 +0000 (07:41 -0400)]
* lisp/help-fns.el (help-fns-function-description-header): Fix bug#70209

Replace the whimsical "" default by something actually useful.

(cherry picked from commit 200a0e5e7d589256d9aad79ff0e9b74b579e7f5e)

12 months ago; Fix indentation in last change to windows.texi.
Basil L. Contovounesios [Thu, 4 Apr 2024 19:48:22 +0000 (21:48 +0200)]
; Fix indentation in last change to windows.texi.

(cherry picked from commit 64e1cfb98cbad24fbc72502f6529725cbe202101)

12 months agoEnable relinquishing access to Android content directories
Po Lu [Fri, 5 Apr 2024 07:04:09 +0000 (15:04 +0800)]
Enable relinquishing access to Android content directories

* doc/emacs/android.texi (Android Document Providers): Document
new command.

* java/org/gnu/emacs/EmacsService.java (relinquishUriRights):
New function.

* src/Makefile.in (SOME_MACHINE_OBJECTS): Add androidvfs.c.

* src/android.c (android_init_emacs_service): Link to new
function.

* src/android.h (struct android_emacs_service)
<relinquish_uri_rights>: New field.

* src/androidfns.c:

* src/androidvfs.c (android_saf_tree_name)
(android_saf_tree_opendir): Minor adjustments to commentary.
(Fandroid_relinquish_directory_access): New function.
(syms_of_androidvfs): Define new subr.

(cherry picked from commit aad63f935f8737598835612b53bc3b53c124661f)

12 months agoPrint records inside data-debug
Po Lu [Fri, 5 Apr 2024 06:07:44 +0000 (14:07 +0800)]
Print records inside data-debug

* lisp/cedet/data-debug.el
(data-debug-insert-stuff-record-button): New function.
(data-debug-thing-alist): Register new function.

(cherry picked from commit 7a13d012c8e17eb25fc8826cdd9ac3e96f912167)

12 months agoDefine missing type in semantic/db-find.el
Po Lu [Fri, 5 Apr 2024 05:54:07 +0000 (13:54 +0800)]
Define missing type in semantic/db-find.el

* lisp/cedet/semantic/db-find.el
(semanticdb-find-result-with-nil): New deftype.

(cherry picked from commit c57b50569cca1b0d1cc85446ecf6be11326c2a4d)

12 months ago* lisp/hexl.el (hexl-mode): Fix doc string (bug#70163).
Eli Zaretskii [Fri, 5 Apr 2024 05:45:44 +0000 (08:45 +0300)]
* lisp/hexl.el (hexl-mode): Fix doc string (bug#70163).

(cherry picked from commit 3cf0bb174ef9e5d517f3052a5b8639dddeb249ea)

12 months agoFix Semantic tag discovery when loading of unloaded files is suppressed
Po Lu [Fri, 5 Apr 2024 02:39:33 +0000 (10:39 +0800)]
Fix Semantic tag discovery when loading of unloaded files is suppressed

* lisp/cedet/semantic/db-find.el
(semanticdb-find-tags-by-name-method)
(semanticdb-find-tags-by-name-regexp-method)
(semanticdb-find-tags-for-completion-method)
(semanticdb-find-tags-by-class-method)
(semanticdb-find-tags-external-children-of-type-method)
(semanticdb-find-tags-subclasses-of-type-method)
(semanticdb-deep-find-tags-by-name-method)
(semanticdb-deep-find-tags-by-name-regexp-method)
(semanticdb-deep-find-tags-for-completion-method): Verify that
tags is bound before accessing it; this slot is unbound in
tables created for unloaded files when the `unloaded' throttle
is disabled.

(cherry picked from commit 3968b36ae0641e929426991028b49ce66a15af5f)

12 months ago(project-current): Fix the previous change
Spencer Baugh [Fri, 5 Apr 2024 00:29:42 +0000 (03:29 +0300)]
(project-current): Fix the previous change

* lisp/progmodes/project.el (project-current):
Fix the previous change (bug#69584).

(cherry picked from commit 21f9be005318dcc58918884fc3c24d7d75562e96)

12 months ago; * lisp/auth-source.el: add declarations to silence compiler
Mattias Engdegård [Thu, 4 Apr 2024 16:59:45 +0000 (18:59 +0200)]
; * lisp/auth-source.el: add declarations to silence compiler

(cherry picked from commit b49765b516e921d7dc020f1038c1442b1bb420ef)

12 months ago; * src/json.c: Comment correction
Mattias Engdegård [Thu, 4 Apr 2024 13:48:09 +0000 (15:48 +0200)]
; * src/json.c: Comment correction

(cherry picked from commit 4a74999a735d9c0980d119dedf266ac2035e3ae9)

12 months agoAdapt treesitter tests for EMBA
Michael Albinus [Thu, 4 Apr 2024 14:51:55 +0000 (16:51 +0200)]
Adapt treesitter tests for EMBA

* test/infra/Makefile.in (TREE-SITTER-FILES): Add js-tests.el and
python-tests.el, which don't follow test file name convention.

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

(cherry picked from commit c2e0ebf752cef595de16140933f51e810e0d4061)

12 months ago; * doc/misc/cl.texi (Function Bindings): Fix reference.
Michael Albinus [Thu, 4 Apr 2024 13:24:15 +0000 (15:24 +0200)]
; * doc/misc/cl.texi (Function Bindings): Fix reference.

(cherry picked from commit 77022a0d7327d3a79de083997a11a727a371cade)

12 months agoMove read-passwd* to auth-source.el, avoiding compilation warnings
Michael Albinus [Thu, 4 Apr 2024 12:51:57 +0000 (14:51 +0200)]
Move read-passwd* to auth-source.el, avoiding compilation warnings

* lisp/simple.el (read-passwd*):
* lisp/subr.el (read-passwd*): Move definitions ...

* lisp/auth-source.el: ... here.
(icons): Require.

(cherry picked from commit 44d83def4fa046986ac6919ca53f789d01840ffa)

12 months ago* src/json.c (make_symset_table): Fix over-large allocation size.
Mattias Engdegård [Thu, 4 Apr 2024 10:21:26 +0000 (12:21 +0200)]
* src/json.c (make_symset_table): Fix over-large allocation size.

We multiplied when we should have added.  Oops.

(cherry picked from commit a0d646fb9f3945d98586b15d157dbb909843f06c)

12 months agoUse different *Completions* buffers in different minibuffers
Eshel Yaron [Fri, 5 Apr 2024 08:43:10 +0000 (10:43 +0200)]
Use different *Completions* buffers in different minibuffers

12 months agoDisobey display actions while using switch-to-buffer on the tab-line
Juri Linkov [Thu, 4 Apr 2024 06:21:01 +0000 (09:21 +0300)]
Disobey display actions while using switch-to-buffer on the tab-line

* lisp/tab-line.el (tab-line-select-tab-buffer)
(tab-line-switch-to-prev-tab, tab-line-switch-to-next-tab): Let-bind
switch-to-buffer-obey-display-actions to nil around the call to
switch-to-buffer to restrain buffer switching in bounds of
the same window only (bug#69993).

(cherry picked from commit 57e78f2d49a5b1a2337a15254e7b8c87aa63c83a)

12 months agoRemove redundant byte-swapping boundary
Po Lu [Thu, 4 Apr 2024 05:52:52 +0000 (13:52 +0800)]
Remove redundant byte-swapping boundary

* src/sfnt.c (sfnt_read_OS_2_table):

* src/sfnt.h (struct sfnt_OS_2_table): Don't redundantly realign
after s_family_class.

(cherry picked from commit daefd6771a4879bb8e71ea67f69522700155df01)

12 months agoAvoid destroying windows after they are unmapped
Po Lu [Thu, 4 Apr 2024 01:53:07 +0000 (09:53 +0800)]
Avoid destroying windows after they are unmapped

* java/org/gnu/emacs/EmacsActivity.java (destroy): Detach from
current window before calling finish.

* java/org/gnu/emacs/EmacsWindow.java (reparentTo): Don't clear
attachment state here...

* java/org/gnu/emacs/EmacsWindowManager.java (detachWindow):
...but do so here instead.

(cherry picked from commit 42c0603c7aab191c9cc15a7eca1253060ff5b71a)

12 months ago; * src/haikufns.c (syms_of_haikufns): Fix indentation.
Po Lu [Thu, 4 Apr 2024 00:32:49 +0000 (08:32 +0800)]
; * src/haikufns.c (syms_of_haikufns): Fix indentation.

(cherry picked from commit 3608c1399ffdb130311e2d3674ff4037188d79d8)

12 months agoNew variable haiku-pass-control-tab-to-system
Tor-björn Claesson [Wed, 3 Apr 2024 07:25:59 +0000 (10:25 +0300)]
New variable haiku-pass-control-tab-to-system

Allow passing C-TAB on to the Haiku operating system, fixing
window switching when an Emacs frame has focus (Bug#70138).
* src/haiku_support.cc (DispatchMessage): Conditionally pass
message to BWindow.
* src/haiku_support.h:
* src/haikufns.c (haiku_should_pass_control_tab_to_system): Add
variable haiku-pass-control-tab-to-system, and C function
haiku_should_pass_control_tab_to_system.

Co-authored-by: Po Lu <luangruo@yahoo.com>
Copyright-paperwork-exempt: yes
(cherry picked from commit ba3bf69f84e5c1143a6ff3b1e7031a10e0beed89)

12 months agoSimplify tab-line-switch-to-prev-tab and tab-line-switch-to-next-tab.
Juri Linkov [Wed, 3 Apr 2024 17:42:11 +0000 (20:42 +0300)]
Simplify tab-line-switch-to-prev-tab and tab-line-switch-to-next-tab.

* lisp/tab-line.el (tab-line-switch-to-prev-tab)
(tab-line-switch-to-next-tab): Use buffers instead of tabs.

(cherry picked from commit 7a41de3d515077e3895fe9201d7786134c82ca26)

12 months agoDon't use file-truepath in Eglot (bug#70036)
Theodor Thornhill [Sat, 30 Mar 2024 19:52:41 +0000 (20:52 +0100)]
Don't use file-truepath in Eglot (bug#70036)

`file-truepath' is slow because of recursive calls and being implemented
in lisp.  It seems to not be needed in eglot, but it is used behind the
scenes in `find-buffer-visiting', thus appearing in profiles.  Moving
the implementation to a hash map will yield similar performance
benefits, but wouldn't require us to rewrite `file-truename' in C.

* lisp/progmodes/eglot.el (eglot-lsp-server): Convert 'managed-buffers'
to a hashmap.
(eglot-uri-to-path): Don't use file-truepath, as it is too slow to be
included in the hot path.
(eglot--on-shutdown): Use buffers from buffer map.
(eglot--managed-mode): Add buffer to map, rather than list. Also remove
it from the map on deactivation.
(eglot-handle-notification): Expose server and get buffer from the
buffer map.

(cherry picked from commit 08c80c45ddea17df87fc768a39dff353ccc13d3b)

12 months ago; * java/org/gnu/emacs/EmacsView.java (onKeyDown): Delete debugging code.
Po Lu [Wed, 3 Apr 2024 12:43:42 +0000 (20:43 +0800)]
; * java/org/gnu/emacs/EmacsView.java (onKeyDown): Delete debugging code.

(cherry picked from commit 48dc75f2353152158fa325f5fbf154cdc75e8cfa)

12 months agoPrevent detachWindow from deleting frames
Po Lu [Wed, 3 Apr 2024 12:41:08 +0000 (20:41 +0800)]
Prevent detachWindow from deleting frames

* java/org/gnu/emacs/EmacsWindowManager.java (detachWindow):
Remove WINDOW from the window list prior to pruning.

(cherry picked from commit 1f5a2c75e60484d9040e5a6e4912bdbed07c9294)

12 months ago; * java/org/gnu/emacs/EmacsWindow.java (reparentTo): Typo.
Po Lu [Wed, 3 Apr 2024 12:33:58 +0000 (20:33 +0800)]
; * java/org/gnu/emacs/EmacsWindow.java (reparentTo): Typo.

(cherry picked from commit a0da5d04baeca2c159122b11370f828ba8887b4f)

12 months agoRevise android.texi to agree with last change
Po Lu [Wed, 3 Apr 2024 12:30:18 +0000 (20:30 +0800)]
Revise android.texi to agree with last change

* doc/emacs/android.texi (Android Windowing): Revise to agree
with last change

(cherry picked from commit ad5c6de2fce7b72eb421ae98eff50f29d0723d2e)

12 months agoBetter align Emacs window management with Android task lifecycles
Po Lu [Wed, 3 Apr 2024 12:29:10 +0000 (20:29 +0800)]
Better align Emacs window management with Android task lifecycles

* java/org/gnu/emacs/EmacsActivity.java (onCreate): Permit
overriding by child classes.
(onDestroy): Minor stylistic adjustments.
(getAttachmentToken): New function.

* java/org/gnu/emacs/EmacsMultitaskActivity.java (onCreate)
(getAttachmentToken): New functions.

* java/org/gnu/emacs/EmacsWindow.java (EmacsWindow):
<attachmentToken, preserve, previouslyAttached>: New variables.
(onActivityDetached): Remove redundant isFinishing argument.
(reparentTo): Reset the foregoing fields before registering with
the window manager.

* java/org/gnu/emacs/EmacsWindowManager.java
(EmacsWindowManager): Rename from EmacsWindowAttachmentManager.
(WindowConsumer): New function getAttachmentToken.
(isWindowEligible): New function.
(registerWindowConsumer, registerWindow, removeWindowConsumer)
(detachWindow): Implement a new window management strategy on
API 29 and subsequent releases where both varieties of toplevel
window are permanently, except when reparented, bound to the
activities to which they attach, and Emacs establishes at
strategic junctures whether those activities remain present.
(getTaskToken, pruneWindows): New functions.

(cherry picked from commit 7df66b4762ff51e394b8db03dfffe888bdba0a67)

12 months agoRevert "Check if lexical-binding is enabled before warning"
Mattias Engdegård [Wed, 3 Apr 2024 09:28:49 +0000 (11:28 +0200)]
Revert "Check if lexical-binding is enabled before warning"

This reverts commit 7de192680fdac6938f5704aea0310b85b0da9c5e.
The logic is wrong (bug#70068).

(cherry picked from commit fa9791fe6af2bbedf1f5bb3e7dd8879a0191ebf1)

12 months agoMake lexical-binding cookie warning test more robust
Mattias Engdegård [Wed, 3 Apr 2024 09:27:16 +0000 (11:27 +0200)]
Make lexical-binding cookie warning test more robust

* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-tests--lexical-binding-cookie):
Run with lexical-binding both on and off.

(cherry picked from commit 0c55261971b0fea62a8e94204e544ff8af714a2e)

12 months agoCheck if lexical-binding is enabled before warning
Philip Kaludercic [Tue, 2 Apr 2024 16:01:27 +0000 (18:01 +0200)]
Check if lexical-binding is enabled before warning

* lisp/emacs-lisp/bytecomp.el (byte-compile-file): Suppress "file
has no `lexical-binding' directive" is the variable is non-nil,
as is the case with 'lisp-interaction-mode'.  (Bug#70068)

(cherry picked from commit 7de192680fdac6938f5704aea0310b85b0da9c5e)

12 months agoNew command 'completions-apply'
Eshel Yaron [Thu, 4 Apr 2024 10:01:40 +0000 (12:01 +0200)]
New command 'completions-apply'

12 months agoSupport changing completions sorting with via mouse clicks
Eshel Yaron [Thu, 4 Apr 2024 10:01:00 +0000 (12:01 +0200)]
Support changing completions sorting with via mouse clicks

12 months agoMake 'completion-buffer-name-table/affixation' more robust
Eshel Yaron [Thu, 4 Apr 2024 09:24:07 +0000 (11:24 +0200)]
Make 'completion-buffer-name-table/affixation' more robust

12 months ago; * src/json.c (json_parse_array): Remove unused variable.
Mattias Engdegård [Wed, 3 Apr 2024 07:52:55 +0000 (09:52 +0200)]
; * src/json.c (json_parse_array): Remove unused variable.

(cherry picked from commit 375ba7c8ea4e8c8bc7f08dedfc46884ffb908622)

12 months ago; Autoload 'global-completion-preview-mode'
Eshel Yaron [Wed, 3 Apr 2024 06:35:18 +0000 (08:35 +0200)]
; Autoload 'global-completion-preview-mode'

* lisp/completion-preview.el (global-completion-preview-mode):
Add autoload cookie.

(cherry picked from commit 5e5e74b17ac77e93bce7f2158c9d2af5ca2a2ff7)

12 months ago; * src/json.c (Fjson_insert): Fix typo in doc (bug#70156).
Randy Taylor [Wed, 3 Apr 2024 01:29:55 +0000 (21:29 -0400)]
; * src/json.c (Fjson_insert): Fix typo in doc (bug#70156).

(cherry picked from commit 7563d571463838970418fca1f81237c389c258b1)

12 months ago; * src/json.c (Fjson_insert): Doc fix.
Eli Zaretskii [Tue, 2 Apr 2024 17:43:29 +0000 (20:43 +0300)]
; * src/json.c (Fjson_insert): Doc fix.

(cherry picked from commit 5eedf41b31ad8b471ffb430d26f15c66139ff7eb)

12 months agoNew functions to set and use context of window points (bug#33871)
Juri Linkov [Tue, 2 Apr 2024 17:17:41 +0000 (20:17 +0300)]
New functions to set and use context of window points (bug#33871)

* lisp/dired.el (dired-mode): Set buffer-local
'window-point-context-set-function' to remember 'dired-filename'
or 'position' in the window with the Dired buffer.
Set buffer-local 'window-point-context-use-function' to restore
the remembered position of the window point.

* lisp/tab-bar.el (tab-bar--tab): Use window-point-context-set.
(tab-bar-select-restore-context): New user option.
(tab-bar-select-tab): Use window-point-context-use.

* lisp/window.el: Add '(context . writable)' to
'window-persistent-parameters'.
(window-point-context-set, window-point-context-use): New functions.
(window-point-context-set-default-function)
(window-point-context-use-default-function): New functions.
(window-point-context-set-function)
(window-point-context-use-function): New variables.

(cherry picked from commit c3781bf59edcd67769d068b5bc8f724e890d8e54)

12 months agoFix json-insert unibyte buffer bug (bug#70007)
Mattias Engdegård [Tue, 2 Apr 2024 16:58:09 +0000 (18:58 +0200)]
Fix json-insert unibyte buffer bug (bug#70007)

Previously, a unibyte target buffer could be put in an incorrect state
if json-insert was used to insert non-ASCII characters.

* src/json.c (Fjson_insert): Simplify.  Don't attempt to decode the data
being inserted: it is guaranteed to be correct UTF-8 and is correct for
both unibyte and multibyte buffers.
* test/src/json-tests.el (json-serialize/roundtrip)
(json-serialize/roundtrip-scalars): Extend tests.

(cherry picked from commit 617debf67392946b4b42fdf364c69da6f094a840)

12 months agojson-insert doc fixes
Mattias Engdegård [Tue, 2 Apr 2024 15:51:38 +0000 (17:51 +0200)]
json-insert doc fixes

* src/json.c (Fjson_insert): Precise the behaviour when the current
buffer is multibyte and unibyte, respectively.
* doc/lispref/text.texi (Parsing JSON): Refer to the right function.

(cherry picked from commit 0670032c0dc03c0df6e11b5411b8d10fc61a7d41)

12 months agoNew condition/action entry 'category' for 'display-buffer' (bug#69983)
Juri Linkov [Tue, 2 Apr 2024 16:51:51 +0000 (19:51 +0300)]
New condition/action entry 'category' for 'display-buffer' (bug#69983)

* doc/lispref/windows.texi (Choosing Window): Provide an example
of using '(category . comint)' in the condition of 'display-buffer-alist'
and in the action of 'display-buffer'.
(Buffer Display Action Alists): Add a new action alist entry 'category'.

* lisp/subr.el (buffer-match-p): Add a new condition 'category'.

* lisp/window.el (display-buffer): Document a new action alist entry
'category'.

(cherry picked from commit 9af533dc751e5220a545ca7e15456992cbbfab98)

12 months ago; Fix 'value<' type mismatch test
Eshel Yaron [Tue, 2 Apr 2024 13:52:10 +0000 (15:52 +0200)]
; Fix 'value<' type mismatch test

12 months agoUpdate JSON codec doc strings
Mattias Engdegård [Mon, 1 Apr 2024 15:02:58 +0000 (17:02 +0200)]
Update JSON codec doc strings

* src/json.c (Fjson_serialize, Fjson_insert, Fjson_parse_string)
(Fjson_parse_buffer): Make the text more readable, fix minor
errors and avoid terminology confusion.

(cherry picked from commit a5fbb652ed3614d6735015551564f32b80e42c53)

12 months ago; * src/json.c (json_parse_object): Call make_hash_table directly.
Mattias Engdegård [Mon, 1 Apr 2024 15:01:07 +0000 (17:01 +0200)]
; * src/json.c (json_parse_object): Call make_hash_table directly.

(cherry picked from commit 8bddf7f93e671bccec8103cecd99629bcc05f071)

12 months agoUpdate JSON parser test and docs
Mattias Engdegård [Mon, 1 Apr 2024 14:58:03 +0000 (16:58 +0200)]
Update JSON parser test and docs

* test/src/json-tests.el (json-parse-string/object):
Duplicated object keys are now retained in alist and plist output.
* etc/NEWS: Mention it.

(cherry picked from commit dbfe3cae2d9497fb14c83f26425f9421d1ef57cb)

12 months ago(scheme-syntax-propertize-sexp-comment): Allow `#;` in strings
Po Lu [Mon, 1 Apr 2024 14:46:19 +0000 (10:46 -0400)]
(scheme-syntax-propertize-sexp-comment): Allow `#;` in strings

* lisp/progmodes/scheme.el (scheme-syntax-propertize-sexp-comment):
Don't get confused by `#;` inside strings and (normal) comments.
(scheme-sexp-comment-syntax-table): Comment-out, unused.

(cherry picked from commit f53152faad170a93b7977c81f736cc787c2f9b71)

12 months agoCorrect custom type in tramp-androidsu.el
Po Lu [Mon, 1 Apr 2024 13:12:49 +0000 (21:12 +0800)]
Correct custom type in tramp-androidsu.el

* lisp/net/tramp-androidsu.el (tramp-androidsu-remote-path): Set
type to '(repeat string).

(cherry picked from commit 123bfc2779d52acfdb18e7fe64577645e227e1c2)

12 months ago; json.c stylistic adjustments
Po Lu [Mon, 1 Apr 2024 13:12:19 +0000 (21:12 +0800)]
; json.c stylistic adjustments

* src/json.c (json_parse_string): Stylistic changes.

(cherry picked from commit 7970f6bcfce7020030a7f87963496c06fa0017aa)

12 months ago; * doc/lispref/processes.texi: use @code for keywords in @table
Mattias Engdegård [Mon, 1 Apr 2024 12:41:37 +0000 (14:41 +0200)]
; * doc/lispref/processes.texi: use @code for keywords in @table

See discussion in bug#69709.

(cherry picked from commit 51e102a7c80d4b78eacb92a8cd164e9b1c5c3a91)

12 months agoAdd support for `ch' and `cw' dimension specifiers for images
Zajcev Evgeny [Thu, 21 Mar 2024 14:47:29 +0000 (17:47 +0300)]
Add support for `ch' and `cw' dimension specifiers for images

* src/image.c (image_get_dimension, lookup_image): Handle `ch'
and `cw' dimension specifiers in addition to `em'.
* src/dispextern.h: Add new members `face_font_height' and
`face_font_width' to `struct image'.

* doc/lispref/display.texi (Image Descriptors): Document
`ch' and `cw'.

(cherry picked from commit 61d70186a4a80d0ffc0aaef224e514ff9cac0372)

12 months ago* etc/NEWS: Mention a JSON codec improvement.
Mattias Engdegård [Mon, 1 Apr 2024 11:09:23 +0000 (13:09 +0200)]
* etc/NEWS: Mention a JSON codec improvement.

(cherry picked from commit ce492cc5ae4b0a185dde45b5f2fc046e8d98dc36)

12 months agoFix symbol list matching regexps.
Vladimir Kazanov [Sun, 31 Mar 2024 17:32:59 +0000 (18:32 +0100)]
Fix symbol list matching regexps.

Fix symbol list matching regexp performance

Allow empty face lists, improve the face list matching regexp (see
discussion in Bug#69714) based on relint's comments, add tests:
* test/lisp/emacs-lisp/ert-font-lock-tests.el: Add tests.
* lisp/emacs-lisp/ert-font-lock.el: Fix regexps.

(cherry picked from commit 3f9263f791fb8e4ff0507c8fde95fa19dabcab10)

12 months agoDon't signal `json-end-of-file` for short nonempty bad JSON inputs
Mattias Engdegård [Sun, 31 Mar 2024 17:19:58 +0000 (19:19 +0200)]
Don't signal `json-end-of-file` for short nonempty bad JSON inputs

* src/json.c (json_parse_value): Generate a plain parse error.
* test/src/json-tests.el (json-parse-string/short): Adapt test.

(cherry picked from commit 3f4486dd76c44c76c58605fb9a1643515133ff3f)

12 months agoFaster JSON parsing
Mattias Engdegård [Sun, 31 Mar 2024 13:00:00 +0000 (15:00 +0200)]
Faster JSON parsing

Speed up JSON parsing substantially by only UTF-8-parsing string
literals and only exactly once.  Previously, json-parse-string always
first parsed the entire input and copied it to a new string, and then
validated each string literal twice.

We no longer create an extra new string when interning an alist key,
nor do we garble plist keys with Unicode characters.

* src/lread.c (intern_c_multibyte): New.
* src/json.c (json_encode): Remove.
(utf8_error): New.
(json_parse_string): Faster and more careful UTF-8 decoding.
Create and return a new multibyte string or symbol without extra
decoding.  All callers adapted.
(Fjson_parse_string): Skip expensive input pre-decoding.
* test/src/json-tests.el (json-parse-string/object-unicode-keys)
(json-parse-string/short): New.
(json-parse-string/string, json-parse-string/invalid-unicode):
Adapt tests.
* etc/NEWS: Mentioned change in errors.

(cherry picked from commit 734bd005aa0fa955cf1a46d3a60a4d6ef5e7e3d1)

12 months agoNative JSON support is always available
Mattias Engdegård [Sun, 31 Mar 2024 13:07:34 +0000 (15:07 +0200)]
Native JSON support is always available

* lisp/progmodes/sh-script.el (sh--json-read): Remove.
(sh-shellcheck-flymake): Call json-parse-buffer directly.
* test/src/json-tests.el: Don't check for function availability.

(cherry picked from commit f178a6d8006f1e8afe06bb71d0a413622d73f131)

12 months agoFix mutates-arguments warning for `sort`
Mattias Engdegård [Sun, 31 Mar 2024 14:12:45 +0000 (16:12 +0200)]
Fix mutates-arguments warning for `sort`

* lisp/emacs-lisp/bytecomp.el (bytecomp--sort-call-in-place-p)
(bytecomp--mutargs-nconc, bytecomp--mutargs-sort): New.
(byte-compile-form, bytecomp--actually-important-return-value-p)
(mutating-fns):
Use a slightly more extendible scheme for specifying what arguments
a function mutates.  Give `sort` special treatment.

(cherry picked from commit 155462a1bd7909074f79a534324c7b209eb97142)

12 months ago(scheme-syntax-propertize-sexp-comment): Handle nested sexp-comments
Stefan Monnier [Mon, 1 Apr 2024 06:12:51 +0000 (02:12 -0400)]
(scheme-syntax-propertize-sexp-comment): Handle nested sexp-comments

Well, I'm not completely sure this will work right in all cases,
because I've been confused about this in the past.
It works in my test case, at least.

* lisp/progmodes/scheme.el (scheme-syntax-propertize-sexp-comment):
Look for nested `#;` and mark them appropriately.

(cherry picked from commit 0f504dde3388687d1214182fa519354146947635)

12 months agoFix androidsu's `make-process' file name handler
Po Lu [Mon, 1 Apr 2024 06:04:56 +0000 (14:04 +0800)]
Fix androidsu's `make-process' file name handler

* lisp/net/tramp-androidsu.el
(tramp-androidsu-handle-make-process): Disable exec loader
around call to setuid su binary.

(cherry picked from commit 9caf5cb55a3889fea019c73d6a3040204d77bf39)

12 months ago(scheme-syntax-propertize-sexp-comment): Remove unused argument
niceume [Sun, 24 Mar 2024 03:29:56 +0000 (12:29 +0900)]
(scheme-syntax-propertize-sexp-comment): Remove unused argument

* lisp/progmodes/scheme.el (scheme-syntax-propertize-sexp-comment):
Remove first arg, unused.
(scheme-syntax-propertize): Adjust calls accordingly.

(cherry picked from commit c4e7eec8c096219ddc6b3a981eef03ce421b8877)

12 months agoscheme.el: Enable dealing with regular expression literal
niceume [Sun, 17 Mar 2024 00:12:32 +0000 (09:12 +0900)]
scheme.el: Enable dealing with regular expression literal

* lisp/progmodes/scheme.el (scheme-syntax-propertize-regexp): New function.
(scheme-syntax-propertize): Use it.

(cherry picked from commit 02c2a95a52e53486d034de4cd2831b258a49f9c4)

12 months agoFix listing of Android root directory when it is accessible
Po Lu [Mon, 1 Apr 2024 01:26:03 +0000 (09:26 +0800)]
Fix listing of Android root directory when it is accessible

* src/androidvfs.c (android_root_closedir, android_root_dirfd)
(android_root_opendir): Allocate an ersatz file descriptor even
if directory is non-NULL, so that at-funcs will properly return
file status for virtual files in the root directory.

(cherry picked from commit 0cf9b58228580bfa400cdaf35eac04d375fe4785)

12 months agoFix wildcard signals in dbusbind.c
Michael Albinus [Sun, 31 Mar 2024 17:59:58 +0000 (19:59 +0200)]
Fix wildcard signals in dbusbind.c

* src/dbusbind.c (xd_read_message_1): Handle registered signals
with wildcards.  (Bug#69926)

(cherry picked from commit 09f381d70d8852d90cdd3c8d7e1e2786dbc61f92)

12 months agoAdapt Tramp version integrated in Emacs 29.3
Michael Albinus [Sun, 31 Mar 2024 12:21:58 +0000 (14:21 +0200)]
Adapt Tramp version integrated in Emacs 29.3

* lisp/net/trampver.el:
Adapt Tramp version integrated in Emacs 29.3.

(cherry picked from commit e303992a9faf7432ed8045825db45da6f6c48080)

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)