Stephen Gildea [Sun, 23 Mar 2025 17:37:21 +0000 (10:37 -0700)]
; Move time-stamp release info from symbol-releases.eld to NEWS
Update the appropriate historical NEWS files with time-stamp feature
releases. Suggested by Stefan Monnier. All dates are from my notes.
* etc/symbol-releases.eld: Remove time-stamp,
reverting commit 69210eb84e of 17 March.
* etc/NEWS.19:
* etc/NEWS.20: Add 'time-stamp' feature paragraphs that
should have been written then.
* etc/NEWS.21: Add missing quotes, so symbol names can be identified.
Stefan Kangas [Sun, 23 Mar 2025 16:22:51 +0000 (17:22 +0100)]
checkdoc: Delete redundant check for wide docstrings
With Emacs 28.1, wide docstrings are now flagged by the byte-compiler.
The logic in the byte-compiler for catching these issues is complex
and continuously evolving, particularly to avoid incorrectly flagging
`substitute-command-keys` substitutions. Unfortunately, the checkdoc
implementation incorrectly flags correct docstrings as overly wide.
Rather than duplicating the byte-compiler logic in checkdoc, which
would introduce unnecessary maintenance overhead, we acknowledge that
this check is now redundant and remove it. Users utilizing the
byte-compiler, whether manually or through `flymake`, will continue to
be warned about this issue.
Stephen Gildea [Sun, 23 Mar 2025 00:07:05 +0000 (17:07 -0700)]
Consistent wording in top-level headers in NEWS.19
* etc/NEWS.19: Put the word "Emacs" in front of each version number.
This change lets 'help-fns--first-release' parse the headers, which
produces more accurate "probably introduced at" versions from
'describe-function' and 'describe-variable'.
Stefan Kangas [Sat, 22 Mar 2025 21:41:53 +0000 (22:41 +0100)]
Reduce code duplication in ns_set_appearance
* src/nsterm.h (ns_set_appearance_1): Declare.
* src/nsterm.m (ns_set_appearance_1): Break out new function...
(ns_set_appearance): ...here.
* src/nsfns.m (Fx_create_frame): Use above new function.
shipmints [Sun, 16 Feb 2025 19:30:45 +0000 (14:30 -0500)]
Ensure .dir-locals-2.el behavior as documented (bug#75890)
* lisp/files.el
(dir-locals--all-files): New &optional 'base-el-only' argument.
(dir-locals--base-file): New function.
(dir-locals-find-file): 'locate-dominating-file' only for the base
.dir-locals.el.
* test/lisp/files-tests.el
(files-test-dir-locals-2-solo): New test.
* test/lisp/files-resources/dir-locals-2-solo: New test support.
(files-test-dir-locals-2-paired): New test.
* test/lisp/files-resources/dir-locals-and-2: New test support.
Paul Eggert [Sat, 22 Mar 2025 18:19:41 +0000 (11:19 -0700)]
Remove ctags program
Remove our old ctags and suggest Universal Ctags instead.
This fixes a FIXME in lib-src/Makefile.in and speeds up compilation
quite a bit on my older CPU when I compile with --enable-gcc-warnings.
It also lessens installation and runtime footprint. (Bug#76322)
* .gitignore: Remove lib-src/ctags.
* admin/authors.el (authors-renamed-files-alist): Remove ctags.1.
* admin/check-man-pages: ctags.1 is no longer a special case.
* admin/quick-install-emacs (PUBLIC_LIBSRC_BINARIES): Remove ctags.
* cross/Makefile.in (LIBSRC_BINARIES): Remove lib-src/ctags.
* doc/man/ctags.1, lib-src/ctags.c: Remove.
* java/Makefile.in (CROSS_LIBSRC_BINS): Remove ctags.
* lib-src/Makefile.in (INSTALLABLES): Remove ctags${EXEEXT}.
(ctags${EXEEXT}): Remove.
* lib-src/etags.c (CTAGS): Remove. All uses replaced by ...
(ctags): ... this new static var.
(STDIN): Remove macro. All uses replaced by new STDIN_OPTION constant.
(CTAGS_OPTION, STDIN_OPTION): New contants.
(longopts): New --ctags option.
(ctags_default_C_help): New constant,
to override default_C_help at runtime.
(default_C_help): Now always the etags version.
(C_LANG_NAMES_INDEX): New macro.
(print_language_names): Do not assume etags.
(PROGRAM_NAME): Remove. All uses removed.
(print_help): Document --ctags if PRINT_UNDOCUMENTED_OPTIONS_HELP.
(main): Support new --ctags option, and support all [ce]tags options.
* test/manual/etags/Makefile (CTAGS_PROG):
Now etags --ctags, since there is no longer a ctags.
shipmints [Wed, 12 Mar 2025 16:14:50 +0000 (12:14 -0400)]
'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)
Eli Zaretskii [Sat, 22 Mar 2025 10:39:46 +0000 (12:39 +0200)]
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.
Martin Rudalics [Sat, 22 Mar 2025 08:34:53 +0000 (09:34 +0100)]
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.
Stefan Kangas [Sat, 22 Mar 2025 08:05:08 +0000 (09:05 +0100)]
; Add index entry "code completion" to user manual
* doc/emacs/programs.texi (Symbol Completion): Improve indexing by
adding "code completion". This is the name that this feature goes by
elsewhere, so users are likely to look for it.
Stefan Kangas [Sat, 22 Mar 2025 06:01:14 +0000 (07:01 +0100)]
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'.
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.
Eli Zaretskii [Fri, 21 Mar 2025 16:20:21 +0000 (18:20 +0200)]
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)
David Ponce [Sun, 16 Mar 2025 10:31:21 +0000 (11:31 +0100)]
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'.
Stefan Monnier [Wed, 19 Mar 2025 19:47:11 +0000 (15:47 -0400)]
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.
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).
* 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'.
Martin Rudalics [Tue, 18 Mar 2025 08:17:52 +0000 (09:17 +0100)]
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).
Po Lu [Tue, 18 Mar 2025 01:41:56 +0000 (09:41 +0800)]
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.
Mauro Aranda [Mon, 17 Mar 2025 09:55:07 +0000 (06:55 -0300)]
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.
Martin Rudalics [Mon, 17 Mar 2025 08:50:19 +0000 (09:50 +0100)]
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).
Martin Rudalics [Mon, 17 Mar 2025 08:36:59 +0000 (09:36 +0100)]
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.
Yuan Fu [Fri, 14 Feb 2025 02:24:41 +0000 (18:24 -0800)]
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.
* 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.
Jens Schmidt [Fri, 14 Mar 2025 22:07:11 +0000 (23:07 +0100)]
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)