1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00
Commit graph

177606 commits

Author SHA1 Message Date
Po Lu
f38f4588d7 ; * java/org/gnu/emacs/EmacsInputConnection.java: Fix commentary typo. 2025-03-20 10:23:49 +08:00
Stefan Kangas
3488ae7c52 Recenter calendar-chinese-year-cache on 2028
* lisp/calendar/cal-china.el (calendar-chinese-year-cache): Recenter
on 2028.
2025-03-20 02:45:11 +01:00
Stefan Kangas
03053baebe ; Improve documentation of incf and decf
* doc/lispref/variables.texi (Setting Generalized Variables): Mention
incf and decf.
* lisp/emacs-lisp/gv.el (incf, decf): Add references to Info manual
documentation on generalized variables.
2025-03-19 21:29:50 +01:00
Stefan Kangas
1fca171add ; Delete duplicate variable definition
* lisp/doc-view.el (doc-view--current-cache-dir): Delete duplicate
variable definition.
2025-03-19 21:26:28 +01:00
Stefan Monnier
5432331a62 indent.erts (Code): Don't modify the global state
* test/lisp/progmodes/java-ts-mode-resources/indent.erts (Code):
Use `setq-local` and correspondingly move the remaining
assignment after activating the major mode.
2025-03-19 15:53:37 -04:00
Stefan Kangas
beeece4712 ; Don't set symbol-packages in tty-tip.el 2025-03-19 20:45:06 +01:00
Juri Linkov
7016d1c8e3 * lisp/files.el (save-some-buffers-action-alist): Fix 'view-mode'.
Use 'view-mode-enter' instead of 'view-buffer' to ignore the 'special'
mode-class that prevents some modes from binding 'q' to 'exit-action'
that should call 'exit-recursive-edit' (bug#76745).
2025-03-19 21:09:10 +02:00
Philip Kaludercic
a77f10305c
; Avoid scraping non-readable files for maintainers
* lisp/mail/emacsbug.el (submit-emacs-patch): Check if a file
mentioned in a patch can be opened.  (Bug#77083)
2025-03-19 18:33:31 +01:00
shipmints
cf5aaae90b Promote bookmark-handler prop 'bookmark-inhibit to list (bug#65039)
* lisp/bookmark.el (bookmark-insert):
* lisp/shell.el (#'shell-bookmark-jump): The bookmark-handler
property 'bookmark-inhibit is now a list.
2025-03-19 16:58:55 +01:00
Michael Albinus
f6632114fe ; Tramp: fixes resulting from test campaign
* lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file):
Handle symlinks.

* lisp/net/tramp-sshfs.el (tramp-sshfs-handle-process-file):
STDERR is not implemented.

* lisp/net/tramp.el (tramp-skeleton-process-file): Raise a warning
if STDERR is not implemented.
(tramp-handle-shell-command):
Respect `async-shell-command-display-buffer'.

* test/lisp/net/tramp-tests.el (tramp-test28-process-file): Adapt test.
2025-03-19 14:40:54 +01:00
Martin Rudalics
fa1cfcada0 On tty frames restrict number of menu bar lines (Bug#77015)
* src/frame.c (set_menu_bar_lines): Make sure tty frames get
only 0 or 1 menu bar line (Bug#77015).
2025-03-19 09:36:42 +01:00
Stefan Kangas
ec9290eb80 ; Minor keymap cleanup in dired.el
* lisp/dired.el:
(dired-context-menu): Prefer keymap-set.
(dired-click-to-select-map): Move key definition inside defvar-keymap.
2025-03-18 23:35:53 +01:00
Stefan Monnier
0e1f81b9bc lisp/emacs-lisp/smie.el (smie-config-show-indent): Tweak message 2025-03-18 08:42:42 -04:00
Martin Rudalics
739d18dc41 Ensure redisplay after re-parenting a tty child frame (Bug#77079)
* src/frame.c (store_frame_param): When re-parenting a tty child
frame, mark it's old and new root frames as garbaged so redisplay
will reflect the change immediately (Bug#77079).
2025-03-18 09:17:52 +01:00
Po Lu
5a4b9ca736 Fix generation of mouse position lists on the tool and tab bars
* src/keyboard.c (make_lispy_tty_position): Return whether an
internal border was hit.
(make_lispy_position): Only skip standard window and frame
detection process if so, as there are other scenarios where POSN
is nil but WINDOW_OR_FRAME is none the less expected to be
provided by the conditionals skipped.
2025-03-18 09:41:56 +08:00
Stefan Kangas
5f4c905353 ; Use defvar-keymap in define-derived-mode
* lisp/emacs-lisp/derived.el (define-derived-mode): Use defvar-keymap.
This change is for documentation purposes on macro expansion.
2025-03-18 00:33:32 +01:00
Stefan Kangas
69210eb84e Use 'help-key' function in more places
* lisp/dired-aux.el (dired-query):
* lisp/emacs-lisp/helper.el (Helper-help-map):
* lisp/emacs-lisp/map-ynp.el (map-y-or-n-p): Use 'help-key'.
* lisp/net/tramp-cmds.el (tramp-rename-files):
* lisp/which-key.el (which-key--next-page-hint): Prefer 'help-key'
when available.
* lisp/help.el (help-key): Simplify.
* etc/symbol-releases.eld: Add 'help-key'.
2025-03-18 00:16:29 +01:00
Stefan Kangas
49e019fbbc ; * lisp/follow.el (follow-mode-prefix-key): Improve. 2025-03-18 00:16:29 +01:00
john muhl
be2b5a7148 ; Fix 'java-ts-mode' tests (Bug#77070)
* test/lisp/progmodes/java-ts-mode-resources/indent.erts:
Set 'indent-tabs-mode' later.
2025-03-17 16:48:22 +02:00
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