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

177614 commits

Author SHA1 Message Date
Stefan Kangas
f0800612e5 ; Fix global-hl-line-highlight after recent commit 2025-03-20 19:05:29 +01:00
john muhl
60e9195984 ; Fix 'lua-ts-mode' tests (Bug#77102)
* test/lisp/progmodes/lua-ts-mode-resources/indent.erts:
Remove unintended use of tabs and make indentation settings
buffer local.
2025-03-20 15:35:09 +02:00
Eli Zaretskii
22602f9c2c ; * etc/NEWS: Fix last change (bug#77022). 2025-03-20 15:05:00 +02:00
Elías Gabriel Pérez
77ad6518bb Allow specifying in which major modes to enable 'global-hl-line-mode'
* lisp/hl-line.el (global-hl-line-modes): New user option.
(global-hl-line-highlight): Obey the new variable.  (Bug#77022)

* etc/NEWS: Document new variable.
2025-03-20 15:01:30 +02:00
David Ponce
b1db48c0fc Fix `string-pixel-width' with alternate text properties
Fix possible wrong result of `string-pixel-width' with alternate
and default properties.  Create new regression tests.
* lisp/emacs-lisp/subr-x.el (string-pixel-width): Like for
`face-remapping-alist', use in work buffer the value of
`char-property-alias-alist' and `default-text-properties'
local to the passed buffer, to correctly compute pixel width.
(Bug#77042)

* test/lisp/misc-tests.el: Add tests for `string-pixel-width'.
2025-03-20 14:55:23 +02:00
Vincenzo Pupillo
cace07f27d MariaDB and Mysql handle escaped aphostrophes in the same way
* lisp/progmodes/sql.el (sql-mode): MariaDB and Mysql both
handle escaped apostrophes in the same way.  (Bug#77088)
2025-03-20 14:47:18 +02:00
Eli Zaretskii
e53b90a5ce Improve 'gui-get-selection' on MS-Windows
* lisp/term/w32-win.el (w32--get-selection): Allow UTF8_STRING and
TEXT data types as well, since w32select.c handles that correctly.
2025-03-20 11:03:32 +02:00
Stephen Gildea
a7d2aa7e0c ; * etc/symbol-releases.eld: Add time-stamp, from my notes 2025-03-19 21:05:41 -07:00
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