Commit graph

177587 commits

Author SHA1 Message Date
Eli Zaretskii
4cfeb3697c ; * src/dispnew.c (adjust_glyph_matrix): Restore lost comment. 2025-03-17 14:19:34 +02:00
Eli Zaretskii
4008e664a8 ; * src/dispnew.c (adjust_glyph_matrix): Add comment (bug#77039). 2025-03-17 14:16:45 +02:00
Eli Zaretskii
c44f34475a ; * etc/NEWS: Fix punctuation. 2025-03-17 14:14:46 +02:00
Eli Zaretskii
fd88c52320 ; * etc/NEWS: Fix last change. 2025-03-17 14:12:13 +02:00
Mauro Aranda
acb96a5ca8 Make marking conflicted files as resolved upon saving opt-out
This fixes Bug#3860.

* lisp/vc/vc.el (vc-resolve-conflicts): New user option.
* lisp/vc/vc-bzr.el (vc-bzr-resolve-conflicts): New user option.
(vc-bzr-find-file-hook): Use it.
* lisp/vc/vc-hg.el (vc-hg-resolve-conflicts): New user option.
(vc-hg-find-file-hook): Use it.
* lisp/vc/vc-svn.el (vc-svn-resolve-conflicts): New user option.
(vc-svn-find-file-hook): Use it.
* lisp/vc/vc-git.el (vc-git-resolve-conflicts): Support
'default' as an option.  Adjust docstring and version.
(vc-git-find-file-hook): Respect vc-resolve-conflicts.
* etc/NEWS: Announce the new options.
2025-03-17 06:55:07 -03:00
Martin Rudalics
86be9431ae Implement dragging and resizing of tty child frames
* lisp/faces.el (face-spec-recalc): Don't set
scroll-bar-foreground and scroll-bar-background parameters on
ttys.
* lisp/mouse.el (mouse-drag-frame-resize)
(mouse-drag-frame-move): On ttys call
'mouse-position-in-root-frame' to get position of child frame to
resize or drag.
* lisp/xt-mouse.el (xterm-mouse-event): Handle events on
child frame decorations as if they happened on the internal border
to find out whether a user wants to drag or resize a child frame.
* src/frame.c (frame_internal_border_part): Define for ttys too.
(Fmouse_position_in_root_frame): New function.
* src/frame.h (internal_border_part): Define for ttys too.
* src/keyboard.c (internal_border_parts): Define for ttys too.
(frame_border_side): New enum.
(make_lispy_position): Handle events on tty child frames.
(Fposn_at_x_y): Accept -1 for Y so we can handle a position on
the top decoration of a tty child frame.
* src/term.c (tty_frame_at): Handle case where X and Y denote a
position on a tty child frame's decoration.
* src/window.c (Fwindow_at): Handle case where X and Y denote a
position on the decoration of a tty child frame which we pretend
as belonging to that child frame (and not to its root).
2025-03-17 09:50:19 +01:00
Martin Rudalics
7e71b0a2c9 Implement surrogate menu bars for tty child frames
* lisp/menu-bar.el (popup-menu): When asked to pop up MENU from
a tty child frame try to use menu of its root frame.
(menu-bar-open): When FRAME is a child frame and
'tty-menu-open-use-tmm' is nil, navigate menu bar of its root
frame.
* src/keymap.c (Fcurrent_active_maps): Accept live window as
POSITION argument and use its buffer as current when processing
the key sequence.  Needed for tty child frames so the root
frame's menu bar can be updated according to the selected
window's buffer when navigating the menu bar from keyboard.
* src/xdisp.c (prepare_menu_bars): If the selected window's
frame is a tty child frame without menu bar, that frame's root
frame has a menu bar and 'tty-menu-open-use-tmm' is nil, prepare
to update the menu bar of the root frame as surrogate.
(update_menu_bar): New argument W denoting the window that
should be considered as selected.  For a tty child frame using F
as surrogate menu bar frame this specifies the child frame's
selected window and its buffer shall be used for updating the
menu bar of the root frame instead of the buffer of the root
frame's selected window.
(redisplay_window): Instead of setting redisplay_menu_p flag
always call display_menu_bar right away.  This facilitates to
call display_menu_bar for a tty child frame with its root
frame as surrogate menu bar frame.
(display_tty_menu_item): If the selected frame is a tty child
frame, overwrite its root frame's glyph matrix (and not that of
the child frame) when displaying a menu item.
(Qtty_menu_open_use_tmm): Define symbol.
2025-03-17 09:36:59 +01:00
Yuan Fu
d708ebe401
; Add NEWS entry for java-ts-mode-method-chaining-indent-offset
* etc/NEWS: Add entry.
2025-03-16 22:47:00 -07:00
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