1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-18 08:51:45 -08:00
Commit graph

171593 commits

Author SHA1 Message Date
Juri Linkov
6480de5ea7 ; Use two dashes for internal function minibuffer-visible-completions--bind
* lisp/minibuffer.el (minibuffer-visible-completions--bind):
Rename from minibuffer-visible-completions-bind.
(minibuffer-visible-completions-map): Rename
minibuffer-visible-completions-bind to
minibuffer-visible-completions--bind.
2024-04-05 19:27:45 +03:00
Juri Linkov
50fab7062d * 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.
2024-04-05 19:23:08 +03:00
Mattias Engdegård
4fc84cb23b 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.
2024-04-05 15:56:04 +02:00
Stefan Monnier
200a0e5e7d * lisp/help-fns.el (help-fns-function-description-header): Fix bug#70209
Replace the whimsical "" default by something actually useful.
2024-04-05 07:41:42 -04:00
Basil L. Contovounesios
64e1cfb98c ; Fix indentation in last change to windows.texi. 2024-04-05 09:55:58 +02:00
Po Lu
aad63f935f 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.
2024-04-05 15:04:09 +08:00
Po Lu
2637b642d4 Merge remote-tracking branch 'savannah/master' into master-android-1 2024-04-05 14:08:23 +08:00
Po Lu
7a13d012c8 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.
2024-04-05 14:07:44 +08:00
Po Lu
c57b50569c Define missing type in semantic/db-find.el
* lisp/cedet/semantic/db-find.el
(semanticdb-find-result-with-nil): New deftype.
2024-04-05 13:54:07 +08:00
Eli Zaretskii
3cf0bb174e * lisp/hexl.el (hexl-mode): Fix doc string (bug#70163). 2024-04-05 08:45:44 +03:00
Po Lu
3968b36ae0 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.
2024-04-05 10:39:33 +08:00
Spencer Baugh
21f9be0053 (project-current): Fix the previous change
* lisp/progmodes/project.el (project-current):
Fix the previous change (bug#69584).
2024-04-05 03:29:42 +03:00
Mattias Engdegård
b49765b516 ; * lisp/auth-source.el: add declarations to silence compiler 2024-04-04 18:59:45 +02:00
Mattias Engdegård
4a74999a73 ; * src/json.c: Comment correction 2024-04-04 18:40:14 +02:00
Michael Albinus
c2e0ebf752 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.
2024-04-04 16:51:55 +02:00
Michael Albinus
77022a0d73 ; * doc/misc/cl.texi (Function Bindings): Fix reference. 2024-04-04 15:24:15 +02:00
Michael Albinus
44d83def4f 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.
2024-04-04 14:51:57 +02:00
Mattias Engdegård
a0d646fb9f * src/json.c (make_symset_table): Fix over-large allocation size.
We multiplied when we should have added.  Oops.
2024-04-04 12:24:22 +02:00
Juri Linkov
57e78f2d49 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).
2024-04-04 09:21:54 +03:00
Po Lu
daefd6771a 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.
2024-04-04 13:52:52 +08:00
Po Lu
42c0603c7a 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.
2024-04-04 09:53:07 +08:00
Po Lu
3608c1399f ; * src/haikufns.c (syms_of_haikufns): Fix indentation. 2024-04-04 08:33:53 +08:00
Tor-björn Claesson
ba3bf69f84 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
2024-04-04 08:33:52 +08:00
Juri Linkov
7a41de3d51 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.
2024-04-03 20:42:11 +03:00
Theodor Thornhill
08c80c45dd 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.
2024-04-03 15:02:16 +02:00
Po Lu
48dc75f235 ; * java/org/gnu/emacs/EmacsView.java (onKeyDown): Delete debugging code. 2024-04-03 20:43:42 +08:00
Po Lu
1f5a2c75e6 Prevent detachWindow from deleting frames
* java/org/gnu/emacs/EmacsWindowManager.java (detachWindow):
Remove WINDOW from the window list prior to pruning.
2024-04-03 20:41:08 +08:00
Po Lu
a0da5d04ba ; * java/org/gnu/emacs/EmacsWindow.java (reparentTo): Typo. 2024-04-03 20:33:58 +08:00
Po Lu
ad5c6de2fc Revise android.texi to agree with last change
* doc/emacs/android.texi (Android Windowing): Revise to agree
with last change
2024-04-03 20:31:22 +08:00
Po Lu
7df66b4762 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.
2024-04-03 20:31:22 +08:00
Mattias Engdegård
fa9791fe6a Revert "Check if lexical-binding is enabled before warning"
This reverts commit 7de192680f.
The logic is wrong (bug#70068).
2024-04-03 11:28:49 +02:00
Mattias Engdegård
0c55261971 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.
2024-04-03 11:27:16 +02:00
Philip Kaludercic
7de192680f 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)
2024-04-03 10:52:12 +02:00
Mattias Engdegård
375ba7c8ea ; * src/json.c (json_parse_array): Remove unused variable. 2024-04-03 09:53:37 +02:00
Eshel Yaron
5e5e74b17a
; Autoload 'global-completion-preview-mode'
* lisp/completion-preview.el (global-completion-preview-mode):
Add autoload cookie.
2024-04-03 08:35:18 +02:00
Randy Taylor
7563d57146 ; * src/json.c (Fjson_insert): Fix typo in doc (bug#70156). 2024-04-03 05:38:03 +03:00
Eli Zaretskii
5eedf41b31 ; * src/json.c (Fjson_insert): Doc fix. 2024-04-02 20:43:29 +03:00
Juri Linkov
c3781bf59e 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.
2024-04-02 20:19:21 +03:00
Mattias Engdegård
617debf673 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.
2024-04-02 19:10:00 +02:00
Mattias Engdegård
0670032c0d 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.
2024-04-02 19:06:39 +02:00
Juri Linkov
9af533dc75 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'.
2024-04-02 19:51:51 +03:00
Mattias Engdegård
a5fbb652ed 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.
2024-04-01 17:07:04 +02:00
Mattias Engdegård
8bddf7f93e ; * src/json.c (json_parse_object): Call make_hash_table directly. 2024-04-01 17:07:04 +02:00
Mattias Engdegård
dbfe3cae2d 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.
2024-04-01 17:07:04 +02:00
Po Lu
f53152faad (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.
2024-04-01 10:46:19 -04:00
Po Lu
123bfc2779 Correct custom type in tramp-androidsu.el
* lisp/net/tramp-androidsu.el (tramp-androidsu-remote-path): Set
type to '(repeat string).
2024-04-01 21:13:17 +08:00
Po Lu
7970f6bcfc ; json.c stylistic adjustments
* src/json.c (json_parse_string): Stylistic changes.
2024-04-01 21:12:19 +08:00
Mattias Engdegård
51e102a7c8 ; * doc/lispref/processes.texi: use @code for keywords in @table
See discussion in bug#69709.
2024-04-01 14:43:30 +02:00
Eli Zaretskii
601e772b06 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2024-04-01 14:21:10 +03:00
Zajcev Evgeny
61d70186a4 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'.
2024-04-01 14:18:05 +03:00