1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-10 01:34:36 -08:00
Commit graph

177579 commits

Author SHA1 Message Date
Yuan Fu
eb63d0c04a
Add some keywords to java-ts-mode--keywords (bug#75154)
* lisp/progmodes/java-ts-mode.el:
(java-ts-mode--keywords): Add keywords, remove @interface.
2025-03-16 22:44:05 -07:00
Yuan Fu
3d2d95e284
Move around java-ts-mode font-lock rules (bug#75154)
* lisp/progmodes/java-ts-mode.el:
(java-ts-mode--font-lock-settings): Move constant feature down
so it overrides expression and definition.
2025-03-16 22:44:05 -07:00
Yuan Fu
93cd55f40e
Use c-ts-common baseline rule in java-ts-mode (bug#75154)
Use it for function parameters.

* lisp/progmodes/java-ts-mode.el:
(java-ts-mode--standalone-predicate): New function.
(java-ts-mode--indent-rules): Comment out rules for function
parameters and statements, and add
c-ts-common-baseline-indent-rule as fallback.
(java-ts-mode): Setup.
(java-ts-mode--first-line-on-multi-line-string): Mark BOL as
unused.
* test/lisp/progmodes/java-ts-mode-resources/indent.erts:
New test.
2025-03-16 22:44:05 -07:00
Yuan Fu
affb2ba77b
Add indentation for multi-line string in java-ts-mode (bug#75154)
* lisp/progmodes/java-ts-mode.el:
(java-ts-mode--first-line-on-multi-line-string): New function.
(java-ts-mode--indent-rules): Add rules.
2025-03-16 22:44:04 -07:00
Yuan Fu
8fb31f5866
Add java-ts-mode-method-chaining-indent-offset (bug#75154)
Default method chaining to indent 8 spaces.

* lisp/progmodes/java-ts-mode.el:
(java-ts-mode-method-chaining-indent-offset): New custom option.
(java-ts-mode--indent-rules): Use
java-ts-mode-method-chaining-indent-offset.
2025-03-16 22:44:04 -07:00
Sean Whitton
d7763c4513 ; etc/NEWS (remember-prefix-map): Suggest a key reserved to users.
Matthias intended to incorporate a change like this into his
most recent reroll of his patch, but it was accidentally
omitted.
2025-03-17 11:00:14 +08:00
Gerd Möllmann
eab14d68b2 Make sure to initialize glyph::frame to NULL (bug#77039)
* src/dispnew.c (adjust_glyph_matrix): Clear glyph memory when
enlarging window-system window glyph matrices.
2025-03-16 21:24:36 +01:00
Jens Schmidt
7f2e4508ce Correctly unload variable aliases.
* src/eval.c (Finternal_delete_indirect_variable): Add function.
* lisp/loadhist.el (loadhist-unload-element): Use it for variable
aliases.
* test/src/eval-tests.el (eval-tests--internal-delete-indirect-variable):
Test function `internal-delete-indirect-variable'.
* test/lisp/loadhist-tests.el (loadhist-test-unload-feature-alias):
* test/lisp/loadhist-resources/loadhist--alias.el: Test unloading of
features that define variable aliases.  (Bug#76748)
2025-03-16 12:52:40 -04:00
Michael Albinus
b8104dadbf Tramp: Handle symlinks to non-existing targets better
* lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file):
Don't use the truename.

* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file): Refactor.  Handle
symlinks.  (Bug#76678)

* lisp/net/tramp-smb.el (tramp-smb-errors): Add string.
(tramp-smb-handle-copy-file, tramp-smb-handle-rename-file):
Refactor.

* lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file):
Don't use the truename.  Handle symlinks.

* lisp/net/tramp.el (tramp-barf-if-file-missing): Accept also symlinks.
(tramp-skeleton-file-exists-p): Handle non-existing symlink targets.
(tramp-skeleton-set-file-modes-times-uid-gid): Fix typo.

* test/lisp/net/tramp-tests.el (vc-handled-backends):
Suppress only if noninteractive.
(tramp-test11-copy-file, tramp-test12-rename-file)
(tramp-test18-file-attributes, tramp-test21-file-links)
(tramp--test-check-files): Adapt tests.
2025-03-16 14:17:38 +01:00
Stefan Kangas
03e33cbef3 Don't recommend legacy keymap functions in docstrings
* lisp/comint.el (comint-prompt-read-only):
* lisp/ielm.el (ielm-prompt-read-only):
* lisp/international/ogonek.el (ogonek-informacja, ogonek-information):
* lisp/mouse-copy.el (mouse-drag-secondary-pasting):
* lisp/mouse-drag.el (mouse-drag-throw, mouse-drag-drag): Don't
recommend using legacy keymap functions.
2025-03-16 13:48:11 +01:00
Stefan Kangas
dec21bcc99 Use substitute-quotes for checkdoc errors
* lisp/emacs-lisp/checkdoc.el (checkdoc-create-error): Use
substitute-quotes.
2025-03-16 13:48:11 +01:00
Stefan Kangas
d8d524071d Use defvar-keymap for some trivial keymaps
* lisp/bindings.el (mode-line-window-dedicated-keymap)
(mode-line-buffer-identification-keymap):
* lisp/emulation/cua-rect.el (cua--overlay-keymap, cua--overlay-key):
* lisp/mh-e/mh-mime.el (mh-mime-security-button-map):
* lisp/mh-e/mh-utils.el (mh-hidden-header-keymap):
* lisp/net/eudc-bob.el (eudc-bob-generic-keymap, eudc-bob-image-keymap)
(eudc-bob-sound-keymap, eudc-bob-url-keymap, eudc-bob-mail-keymap):
* lisp/progmodes/etags-regen.el (etags-regen-mode-map):
* lisp/progmodes/octave.el (octave-help-mode-map):
* lisp/replace.el (multi-query-replace-map):
* lisp/simple.el (process-menu-mode-map, messages-buffer-mode-map):
* lisp/startup.el (splash-screen-keymap):
* lisp/tab-bar.el (tab-bar-mode-map):
* lisp/textmodes/ispell.el (ispell-minor-keymap):
* lisp/textmodes/tex-mode.el (latex-mode-map, plain-tex-mode-map):
* lisp/tree-widget.el (tree-widget-button-keymap):
* lisp/vc/vc-hooks.el (vc-mode-line-map): Use defvar-keymap.
2025-03-16 13:48:11 +01:00
Po Lu
a07465410a Merge from savannah/emacs-30
2d5cf22818 Fix clipboard object handle leak on Android 3.1 to 11.0
b6b4a080a3 Only disable 'completion-preview-active-mode' when it is on
2025-03-16 20:16:57 +08:00
Po Lu
773e9ebadc ; Merge from savannah/emacs-30
The following commit was skipped:

91a9d02199 Backport Transient commit f69e1286
2025-03-16 20:14:48 +08:00
Po Lu
66ea323f0d Merge from savannah/emacs-30
dcf3916e55 ; Doc fix for legacy keymap functions
227db70db9 ; * doc/misc/ede.texi (Top): Improve introduction.
2025-03-16 20:14:48 +08:00
Po Lu
5d02ca181d ; New bisect' argument to ats-execute-tests-batch'
* test/infra/android/test-controller.el
(ats-execute-tests-batch): New argument `bisect'.
2025-03-16 20:14:34 +08:00
Po Lu
2d5cf22818 Fix clipboard object handle leak on Android 3.1 to 11.0
* src/androidselect.c (extract_fd_offsets): Release retrieved
ParcelFileDescriptor objects on APIs 12 through 30.
2025-03-16 20:13:34 +08:00
Eli Zaretskii
412a6fad98 Avoid rare segfaults in 'combine_updates_for_frame'
* src/xdisp.c (redisplay_internal): Don't add to 'tty_root_frames'
frames that are not yet completely made.  (Bug#77046)
2025-03-16 13:35:18 +02:00
Eshel Yaron
b6b4a080a3
Only disable 'completion-preview-active-mode' when it is on
* lisp/completion-preview.el
(completion-preview--post-command): Avoid calling
'completion-preview-active-mode' to disable the mode when
already off, since it forces a costly redisplay. (Bug#76964)
2025-03-16 09:45:25 +01:00
Sean Whitton
db0bed7a68 New project-save-some-buffers command
* lisp/progmodes/project.el (project-save-some-buffers): New command.
(project-prefix-map): Bind it to C-x p C-x s.
* etc/NEWS: Announce the new command and binding.
2025-03-16 11:31:55 +08:00
Sean Whitton
6f483ffdc2 vc-revert: Offer to save modified buffers (bug#55310)
* lisp/vc/vc.el (vc-revert): Offer to save modified buffers that
otherwise prevent proceeding with the revert (bug#55310).
2025-03-16 11:27:02 +08:00
Eli Zaretskii
f5f3fb7dd4 ; * lisp/menu-bar.el (menu-bar-tools-menu): Move "EDE" after "Project". 2025-03-15 22:19:52 +02:00
Jonas Bernoulli
91a9d02199
Backport Transient commit f69e1286
2025-03-12 f69e128654627275e7483a735f670bd53501999d
transient-suffix-object: Handle duplicated command invoked using mouse

Fixes bug#76680.
2025-03-15 20:29:58 +01:00
Jonas Bernoulli
f12ea5b703
Update to Transient v0.8.6-7-g64cb8404 2025-03-15 20:21:20 +01:00
Stefan Kangas
dcf3916e55 ; Doc fix for legacy keymap functions
* doc/lispref/keymaps.texi (Low-Level Key Binding): Add new alternatives
for two more legacy functions.
2025-03-15 19:41:02 +01:00
Stefan Kangas
227db70db9 ; * doc/misc/ede.texi (Top): Improve introduction. 2025-03-15 19:41:02 +01:00
Juri Linkov
f3925732bc Add the treesit 'list' thing to csharp/go/php/rust-ts-mode (bug#73404)
* lisp/progmodes/csharp-mode.el (csharp-ts-mode): Add the
'list' and 'sentence' things to 'treesit-thing-settings'.
Set 'treesit-outline-predicate'.

* lisp/progmodes/go-ts-mode.el (go-ts-mode):
Add 'treesit-thing-settings' with the 'list' and 'sentence' things.

* lisp/progmodes/php-ts-mode.el (php-ts-mode):
Add the 'list' thing to 'treesit-thing-settings'.

* lisp/progmodes/rust-ts-mode.el (rust-ts-mode):
Add 'treesit-thing-settings' with the 'list' thing.
2025-03-15 20:37:46 +02:00
Eshel Yaron
4f4105e622
; * lisp/winner.el (winner--set-dont-bind-my-keys): Fix typo. 2025-03-15 18:24:28 +01:00
Gerd Möllmann
3860562a71 ; * lisp/help-fns.el (help-fns-edit-variable): Revert buffer. 2025-03-15 14:55:09 +01:00
Eli Zaretskii
9e670088c7 Merge from origin/emacs-30
1a8fbf69e3 Fix 'whitespace-mode' in CJK locales
01c03043e6 ; Improve documentation of 'gui-get-selection' use on X
2025-03-15 09:22:51 -04:00
Eli Zaretskii
515e242c3d ; Merge from origin/emacs-30
The following commit was skipped:

66ec9ae719 ; Fix documentation of mouse-click events
2025-03-15 09:22:51 -04:00
Eli Zaretskii
ea49eb4752 Improve conversion between half-width and full-width characters
* lisp/textmodes/text-mode.el (text-mode--get-fullwidth-table):
Add conversion of SPC to IDEOGRAPHIC SPACE.  (Bug#71822)
2025-03-15 13:58:44 +02:00
Michael Albinus
52e49a5616 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2025-03-15 12:52:37 +01:00
Michael Albinus
4b8b7bb5cf ; Minor Tramp changes
* doc/misc/tramp.texi (Top): Add Key Index to menu.
(Key Index): New node.

* lisp/net/tramp-cmds.el (tramp-dired-buffer-command-completion-p):
New defun.
(tramp-dired-find-file-with-sudo): Add property
`completion-predicate'.
2025-03-15 12:43:35 +01:00
Eli Zaretskii
1a8fbf69e3 Fix 'whitespace-mode' in CJK locales
* lisp/international/characters.el (ambiguous-width-chars): Remove
U+00A4 and U+00B7 from the list of ambiguous-width characters.
(cjk-ambiguous-chars-are-wide): Doc fix.  (Bug#76852)
2025-03-15 13:42:12 +02:00
Sean Whitton
a57e9f45db ; Touch up tramp-*-with-sudo documentation, add FIXMEs
* doc/emacs/dired.texi (Dired Visiting):
* doc/emacs/files.texi (Reverting):
* doc/misc/tramp.texi (Ad-hoc multi-hops):
* etc/NEWS:
* lisp/net/tramp-cmds.el (tramp-revert-buffer-with-sudo)
(tramp-dired-find-file-with-sudo): Touch up documentation of
these features.  Add FIXMEs about renaming the two commands.
2025-03-15 19:32:35 +08:00
Phil Sainty
87f9c09ab5 ; * lisp/so-long.el: Documentation 2025-03-15 23:05:18 +13:00
Phil Sainty
25eabcde0d ; * lisp/so-long.el: Backwards-compatibility fix for Emacs < 30
We support Emacs 24.4 and later (for ELPA releases), so revert the
change from commit 7705bdfa5b
2025-03-15 23:04:59 +13:00
Phil Sainty
03a6d5a763 ; * lisp/so-long.el: Backwards-compatibility fix for Emacs < 27
We support Emacs 24.4 and later (for ELPA releases), and ad-find-advice
only changed from a macro to a function in Emacs 27, so this change is
to restore compatibility with older versions where we do need the macro
definition loaded at byte-compilation time.

This effectively combines the related changes from:

- commit 986c12b20f
- commit c221db0402
2025-03-15 23:04:28 +13:00
Eli Zaretskii
01c03043e6 ; Improve documentation of 'gui-get-selection' use on X
* doc/lispref/frames.texi (Window System Selections):
* lisp/select.el (gui-get-selection): Suggest to use an explicit
DATA-TYPE when calling 'gui-get-selection'.
2025-03-15 11:48:36 +02:00
Michael Albinus
5d1b696e99 * lisp/bindings.el (tramp-revert-buffer-with-sudo): Declare. 2025-03-15 09:57:39 +01:00
Eli Zaretskii
f69cc74c89 ; Fix last change (bug#76789)
* doc/misc/speedbar.texi (Frames Windows and Faces): Fix node
name.  Fix markup and punctuation.
(Introduction): Fix markup.
2025-03-15 10:52:45 +02:00
Vincenzo Pupillo
c1aab8c49b Add a new command `speedbar-window'.
Speedbar now can be opened in a window instead of a separate frame. The
frame remains the default.

* doc/emacs/frames.texi: Mention Speedbar window mode.
* doc/misc/speedbar.texi: Document 'speedbar-window'.
* lisp/speedbar.el
(speedbar-prefer-window): New user option. If t, the command `speedbar'
open the speedbar in a window.
(speedbar-window-dedicated-window): New user option. If t the window is
dedicated.
(speedbar-window-side):  New user option. The side of 'speedbar-window',
defaults to left.
(speedbar-window-default-width): New user option. The default size of
the 'speedbar-window'.
(speedbar-window-max-width): New user option. Limits the width of the
'speedbar-window'. The user can resize the window as desired, but this
option will be the width of the window when restored.
(speedbar--buffer-name): New variable, the buffer name used for both
'speedbar-frame-mode' and 'speedbar-window-mode'.
(speedbar--window): New variable, the window displaying 'speedbar-window'.
(speedbar--window-width): New variable, store the current width of
'speedbar-window'.
(speedbar-easymenu-definition-trailer): Now it is a function that
returns a different trailer for 'speedbar-frame' and 'speedbar-window'.
(speedbar): Now it is a function that calls 'speedbar-frame-mode', the
default or 'speedbar-window-mode' based on the value of
'speedbar-prefer-window'.
(speedbar-frame-mode): Before opening a frame, close 'speedbar-window'
if it is open.
(speedbar-frame-or-window): New function, returns 'frame', 'window'
or nil if speedbar is not open.
(speedbar-window): New alias for 'speedbar-window-mode'.
(speedbar-window-mode): Enable of disable 'speedbar-window'.
(speedbar-window--window-live-p): New function, return non-nil if the
'speedbar-window' is live.
(speedbar-window--buffer-live-p): New function, return non-nil if the
'speedbar-buffer' is live.
(speedbar-window--live-p): New function, return t if 'speedbar-window'
is open.
(speedbar-window-current-window): New function, return t if the selected
window is speedbar-window.
(speedbar-window--close): New function, close the 'speedbar-window'.
(speedbar-window--width): New function, return the current width of
'speedbar-window'.
(speedbar-width): New function, return the 'speedbar' of
'speedbar-frame-mode' of 'speedbar-frame-mode'.
(speedbar-set-mode-line-format): Use the new 'speedbar-width' function.
(speedbar-directory-buttons): Use the new 'speedbar-width' function.
(speedbar--speedbar-live-p): New function, returns t if
'speedbar-frame-mode' or 'speedbar-window-mode' are open.
(speedbar-timer-fn): Now handle 'speedbar-frame-mode' and
'speedbar-window-mode'.
2025-03-15 10:46:19 +02:00
Eli Zaretskii
c8471129dd ; * doc/lispref/commands.texi (Click Events): Fix a thinko. 2025-03-15 10:17:20 +02:00
Eli Zaretskii
66ec9ae719 ; Fix documentation of mouse-click events
* doc/lispref/commands.texi (Click Events): Add menu-bar events to
the description.  Add missing details about tab-bar click events.

(cherry picked from commit 6e28c2019e)
2025-03-15 10:12:35 +02:00
Eli Zaretskii
82e44e8675 ; Fix documentation of recent change in mouse.el
* lisp/mouse.el (mouse-event-areas-with-no-buffer-positions): Doc
fix.
(mouse-posn-property): Add commentary.
2025-03-15 10:10:14 +02:00
Eli Zaretskii
6e28c2019e ; Fix documentation of mouse-click events
* doc/lispref/commands.texi (Click Events): Add menu-bar events to
the description.  Add missing details about tab-bar click events.
2025-03-15 10:04:01 +02:00
Eli Zaretskii
e09cb3aee9 ; * lisp/dired.el (project-root): Declare. 2025-03-15 09:36:03 +02:00
Gerd Möllmann
b105089715 Fix mouse-posn-property
* doc/lispref/commands.texi (Click Events): Mention menu-bar.
* lisp/mouse.el (mouse-event-areas-with-no-buffer-positions):
New defvar including all areas mentioned in the Lisp reference.
(mouse-posn-property): Use it.
2025-03-15 08:25:07 +01:00
Po Lu
88e30e1ac5 ; * src/w32.c (term_ntproc): Fix capitalization of commentary. 2025-03-15 12:47:40 +08:00