1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-19 06:31:34 -08:00
Commit graph

177634 commits

Author SHA1 Message Date
Eli Zaretskii
42e116bb10 ; Fix last change (bug#76980)
* lisp/window.el (window--state-normalize-buffer-name): Doc fix.

* doc/lispref/windows.texi (Window Configurations): Add indexing.
2025-03-22 14:14:22 +02:00
shipmints
4266514dc8 'window-state-normalize-buffer-name' option for `uniquify' buffers
If 'window-state-normalize-buffer-name' is non-nil, 'window-state-get'
will normalize stored buffer names, making them easier to restore for
users that use 'uniquify' buffer naming.
* doc/lispref/windows.texi (Window Configurations): Document
'window-state-normalize-buffer-name'.
* lisp/window.el (window-state-normalize-buffer-name): New defvar.
(window--state-normalize-buffer-name): New function.
(window--state-get-1): Call 'window--state-normalize-buffer-name'
rather than 'buffer-name'.
* etc/NEWS: Announce 'window-state-normalize-buffer-name'.
(Bug#76980)
2025-03-22 14:10:37 +02:00
James Cherti
1aebb02611 ElDoc: Add more commands using 'eldoc-add-command-completions'
Add more commands to 'eldoc-add-command-completions' to fix
disappearing ElDoc help in the minibuffer for the following
cases:
- All modes: Added "comment-indent-new-line".
- All modes: Added "delete-char" for handling when the user presses delete.
- Python mode: Added "python-indent-dedent-line-backspace" for handling
  when the user presses backspace.
* lisp/emacs-lisp/eldoc.el (eldoc-remove-command-completions):
* lisp/progmodes/python.el (python-base-mode): Add more commands
to 'eldoc-add-command-completions'.

Copyright-paperwork-exempt: yes
2025-03-22 13:55:09 +02:00
Stefan Kangas
20687ab617 Delete now unused constants in nsterm.h
* src/nsterm.h (NS_DUMPGLYPH_NORMAL, NS_DUMPGLYPH_CURSOR)
(NS_DUMPGLYPH_FOREGROUND, NS_DUMPGLYPH_MOUSEFACE): Delete now unused
constants.
2025-03-22 12:47:06 +01:00
Stefan Kangas
69013ed73d ; Clean up comments in nsterm.h 2025-03-22 12:45:37 +01:00
Eli Zaretskii
d9386cb546 ; Fix recent documentation changes
* doc/lispref/frames.texi (Frames, Visibility of Frames):
* etc/NEWS: Fix wording, punctuation, and markup.
2025-03-22 12:55:43 +02:00
Eli Zaretskii
098fe4b73b Improve 'C-u C-x =' for ligatures of ASCII characters
* lisp/composite.el (composition-find-pos-glyph): New function.
* lisp/descr-text.el (describe-char): Use it to get the font glyph
code of "trivial" compositions.
(describe-char-display): Accept an additional optional argument
and use it as the font glyph code for the character.
2025-03-22 12:39:46 +02:00
Michael Albinus
172e35afce Tramp: Improve handling of cyclic symlinks
* lisp/net/tramp-sh.el (tramp-sh-handle-file-ownership-preserved-p):
Add FIXME.

* lisp/net/tramp.el (tramp-skeleton-file-exists-p)
(tramp-handle-file-directory-p): Protect against cyclic symlinks.

* test/lisp/net/tramp-tests.el (tramp-test18-file-attributes)
(tramp-test21-file-links): Adapt tests.
2025-03-22 09:52:22 +01:00
Martin Rudalics
049d7202f3 ; * etc/NEWS: Fix entry on TTY child frames 2025-03-22 09:40:03 +01:00
Martin Rudalics
1ee2a921ad Fix and document frame parameters for text terminals and child frames
* src/frame.c (Fmake_frame_invisible): In doc-string describe
effect on text terminals.  Set FRAME correctly when called with
nil value.  Make frame invisible before calling mru_rooted_frame
or next_frame.
(Ficonify_frame): Make it work for child frames on text
terminals
(Fmodify_frame_parameters): Make value 'icon' for 'visibility'
work for child frames.
* src/dispnew.c (frame_ancestors_visible_p): New function.
(frames_with_root): If VISIBLE_ONLY is non-nil, return only
frames whose ancestors are all visible to avoid that redisplay
draws visibly orphaned child frames.
* doc/lispref/frames.texi (Frames): Move descriptions of top
frame and 'tty-top-frame' here.
(Frame Layout): Mention that on text terminals the outer border
can be emulated by setting the 'undecorated' frame parameter.
(Frame Position, Frame Parameters, Window Frame Parameters)
(Position Parameters, Size Parameters): Rewrite sections dealing
with the handling of frame parameters in text terminals.
(Layout Parameters): Move description of 'undecorated' parameter
here.  Clarify semantics of 'menu-bar-lines' parameter.
(Frame Interaction Parameters): Move description of 'visibility'
parameter here.  Mention which parameters are not implemented on
text terminals.
(Mouse Dragging Parameters): Describe how these work on text
terminals.
(Visibility of Frames): Rewrite section.
(Raising and Lowering): Describe for text terminals.
(Child Frames): Fix description of 'iconify-child-frame' option.
2025-03-22 09:34:53 +01:00
john muhl
cf7fdd374a ; Update version comment in 'lua-ts-mode'
* lisp/progmodes/lua-ts-mode.el: Update comment for version
0.3.0 of tree-sitter-lua grammar.  (Bug#77158)
2025-03-22 09:12:01 +02:00
Eli Zaretskii
0d654a10c9 ; * etc/NEWS: Improve wording of a recent addition. 2025-03-22 08:39:20 +02:00
Stefan Kangas
580c050f6d Make 'eieio-version' obsolete
EIEIO used to be developed externally as part of CEDET, but that is no
longer the case.  It now has the same version as Emacs itself.
https://sourceforge.net/p/cedet/git/ci/8aa920380f8178ed2514f06f13c403d80db16752/

* lisp/emacs-lisp/eieio.el: Change "Version" header to "Old-Version".
(eieio-version): Make both the variable and the function obsolete in
favor of 'emacs-version'.
2025-03-22 07:01:14 +01:00
Daniel Colascione
2fcf6b4086 xref: error -> user-error: reduce debug-on-error annoyance
* lisp/progmodes/xref.el (xref--next-error-function): Use user-error
instead of error.
2025-03-21 21:11:07 -04:00
Daniel Colascione
e5ee1d2a74 Adapt ediff to nonstandard layouts
Make ediff cope with having some of its windows (especially the control
window) not shown by a custom ediff-window-setup-function.
Modernize relevant adjacent code. After this change, one can write a
custom ediff-window-setup-function that doesn't show the control window.

* doc/misc/ediff.texi (Notes on Heavy-duty Customization): Refine
language to explain that the window setup function doesn't have to show
all windows.
* lisp/vc/ediff-util.el (ediff-select-control-window-on-setup):
New variable.
(ediff-setup, ediff-recenter, ediff-recenter-one-window)
(ediff-recenter-ancestor, ediff-toggle-read-only)
(ediff-operate-on-windows, ediff-jump-to-difference-at-point)
(ediff-default-suspend-function)
(ediff-clone-buffer-for-region-comparison)
(ediff-clone-buffer-for-window-comparison): Modernize control flow;
select only windows that exist.
* lisp/vc/ediff-wind.el (ediff-with-live-window): New convenience macro.
(ediff-window-setup-function): Explain relaxed contract.
2025-03-21 20:56:12 -04:00
Spencer Baugh
b21636580b minibuffer.el: Fix warnings and coding style in last change
* lisp/minibuffer.el: Cut lines to fit into 80 columns.
(completion--insert-strings): Simplify `if` to `or`.
(completion--insert-horizontal, completion--insert-one-column):
Fix warning about used var starting with `_`.  Avoid `apply-partially`.
2025-03-21 17:24:50 -04:00
Spencer Baugh
b12a3a03ae Lazily highlight and insert candidates in *Completions*
From profiling, the main bottleneck in completion over large
completion sets is display-completion-list, when there are many
available candidates.  For example, in my large monorepo, when
completing over the 589196 files or the 73897 branches, even
with the candidates narrowed down by typing some prefix to
complete, TAB (when it shows *Completions*) or ? is slow, mostly
in display-completion-list.

However, rendering all the completion candidates is unnecessary if
the *Completions* window is never scrolled to see those candiates.  By
eagerly inserting only some candidates and lazily highlighting and
inserting the remaining candidates only when necessary, performance is
much improved.

* lisp/minibuffer.el (completion--insert-strings): Insert
completions lazily. (bug#74561)
(completions--lazy-insert-button): Add.
(completion--insert-horizontal, completion--insert-one-column):
Throw a continuation when enough lines of completions are
inserted.
(completion--insert-vertical): Add ignored lines argument.
(minibuffer-completion-help): Set completion-lazy-hilit.
(with-minibuffer-completions-window): Call
completion--lazy-insert-strings.
(with-minibuffer-completions-window):
* lisp/simple.el (completion-setup-function): Preserve
buffer-locals required for lazy completion insertion.
(switch-to-completions): Call completion--lazy-insert-strings.
* etc/NEWS: Announce.
2025-03-21 17:06:19 -04:00
Eli Zaretskii
df66695780 Avoid infinite loop with images under 'display-line-numbers-mode'
* src/xdisp.c (move_it_in_display_line_to, display_line): When
considering the first glyph on a glyph row, take into
consideration the glyphs produced for line-number display.
(Bug#77065)
2025-03-21 18:20:21 +02:00
Eli Zaretskii
bbad5be9f0 Leave buffer with input-method help unmodified
* lisp/international/quail.el (quail-help): Leave "*Help*"
unmodified.  (Bug#77139)
2025-03-20 22:33:32 +02:00
Stefan Kangas
40a17ce3b2 Make compilation-filter-hook into a defcustom
* lisp/progmodes/compile.el (compilation-filter-hook): Make variable
into a defcustom.
2025-03-20 19:21:08 +01:00
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