Commit Graph

181705 Commits

Author SHA1 Message Date
Eli Zaretskii
d285b07579 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2026-03-28 12:17:04 +03:00
Eli Zaretskii
74e771d816 ; * lisp/gnus/gnus-delay.el (gnus-delay-article): Fix last change. 2026-03-28 12:16:11 +03:00
Adam Sjøgren
f932a683e8 Gnus: Accept date and time when specifying delay of a new article
* lisp/gnus/gnus-delay.el (gnus-delay-article): Accept YYYY-MM-DD
hh:mm(:ss) as a valid format.  (Bug#80637)

Copyright-paperwork-exempt: yes
2026-03-28 12:10:21 +03:00
Michael Albinus
a481b5807e Fix tramp-smb-handle-copy-file
* lisp/net/tramp-smb.el (tramp-smb-handle-copy-file):
Suppress `jka-compr-handler'.  Reported by Seppo Ronkainen
<sodr80@protonmail.com>.  (Bug#80667)
2026-03-28 10:04:07 +01:00
Michael Albinus
0de3844f80 Fix file-name-all-completions for symlinked directories in Tramp
* lisp/net/tramp.el (tramp-skeleton-file-name-all-completions):
* lisp/net/tramp-adb.el (tramp-adb-handle-file-name-all-completions):
* lisp/net/tramp-crypt.el (tramp-crypt-handle-file-name-all-completions):
* lisp/net/tramp-fuse.el (tramp-fuse-handle-file-name-all-completions):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-name-all-completions):
* lisp/net/tramp-sh.el (tramp-sh-handle-file-name-all-completions):
* lisp/net/tramp-smb.el (tramp-smb-handle-file-name-all-completions):
* lisp/net/tramp-sudoedit.el
(tramp-sudoedit-handle-file-name-all-completions): Simplify.
* tramp-tests.el (tramp-test32-shell-command): Adapt test.

* lisp/net/tramp-ftp.el (tramp-disable-ange-ftp): Use `seq-difference'.

* lisp/net/tramp-gvfs.el (tramp-gvfs-monitor-process-filter):
Use `thread-last'.

* lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory):
Use `seq-difference'.
(tramp-sh-gio-monitor-process-filter): Use `thread-last'.

* lisp/net/tramp-smb.el (tramp-smb-get-file-entries): Do not add
virtual entry ""; it isn't needed anymore.

* lisp/net/tramp.el (tramp-make-tramp-hop-name): Use `thread-last'.
(tramp-completion-handle-file-directory-p): Use `tramp-prefix-format'.
(tramp-fnac-add-trailing-slash): New defvar.
(tramp-skeleton-file-name-all-completions): Handle also symlinked
directories.
(tramp-skeleton-directory-files): Use `tramp-fnac-add-trailing-slash'.
(tramp-handle-file-name-completion): Use `seq-difference'.
(tramp-handle-make-process): Handle "%w" format specifier.

* test/lisp/net/tramp-tests.el (tramp-test26-file-name-completion)
(tramp-test32-shell-command, tramp-test36-vc-registered): Adapt tests.
2026-03-28 10:03:22 +01:00
Eli Zaretskii
5ec2940e38 ; Another fix fore dired-tests.el 2026-03-28 09:32:27 +03:00
Eli Zaretskii
d5a3a43745 ; Fix last change in dired-tests.el. 2026-03-28 09:29:56 +03:00
Eli Zaretskii
af0f9b3188 ; Fix files-tests and dired-tests on MS-Windows
* test/lisp/files-tests.el
(files-tests-file-name-non-special-insert-directory): Fix for
MS-Windows and MS-DOS.
* test/lisp/dired-tests.el (dired-test-filename-with-newline-1)
(dired-test-filename-with-newline-2): Skip on MS-Windows/DOS.
Remove unused variable 'end'.
(dired-test-ls-error-message): Special testing for MS-Windows and
MS-DOS when they use 'ls-lisp'.
(Bug#80499)
2026-03-28 09:18:38 +03:00
Martin Rudalics
c8b956dc32 ; Fix last fix to 'window--make-major-side-window'
* lisp/window.el (window--make-major-side-window): Fix last fix
which was broken by the committer.
2026-03-27 23:35:24 +01:00
Emil Ingelman Sahlén
57b119b296 Fix recombination of side windows (Bug#80665)
* lisp/window.el (window--make-major-side-window): Protect the
sibling (the main-window group) from recombination.  Without
this, deleting a side window can flatten the group into the
root, causing subsequent side windows on other sides to be
placed incorrectly (Bug#80665).

Copyright-paperwork-exempt: yes
2026-03-27 19:48:02 +01:00
Stephen Berman
3b7d9e37ce Implement new Dired handling of errors from 'ls'
The error messages are now displayed in a popped up buffer instead
of being output in the Dired buffer and signalling an error.  The
file name bounds in Dired entries are now determined solely by the
offsets calculated by 'ls' with the --dired option and
consequently Dired now reliably recognizes file names that contain
a newline (bug#80499).

* etc/NEWS: Announce new Dired handling of errors from 'ls'.

* lisp/dired.el (dired-internal-noselect): Check Dired buffer for
file entries and if there are none kill the buffer to prevent
displaying a Dired buffer with no file entries.
(dired--ls-error-buffer): New variable.
(dired--display-ls-error): New function.
(dired, dired-other-window, dired-other-frame, dired-other-tab):
Use it to pop up buffer with error message emitted by 'ls'.

* lisp/files.el (insert-directory-clean): Remove the code that
treats lines beginning at column 0 in a Dired buffer as error
lines and consequently also remove the code using these lines to
adjust the offsets specifying the bounds of the file name in the
Dired entries.  If the buffer contains a //DIRED-OPTIONS// line
output by --dired, delete this line even when it is at BOB.
(insert-directory): Remove the code that checks the return value
of 'ls' and signals an error based on that value.  Write any error
message emitted by 'ls' to a temporary file and insert its content
into a buffer, which will be popped when invoking a Dired command
results in the 'ls' error.  Adjust the comment above this function
to accommodate file names containing a newline in Dired entries.
(insert-directory-adj-pos): Remove this now unused function.

* test/lisp/dired-tests.el (dired-test-filename-with-newline-1)
(dired-test-filename-with-newline-2)
(dired-test-ls-error-message): New tests.

* test/lisp/files-tests.el
(files-tests-file-name-non-special-insert-directory): Adjust test
to use of 'ls' error buffer instead of signaling an error.
2026-03-27 16:36:16 +01:00
Stefan Monnier
de381366ea (c++-ts-mode): Fix bug#80682
* lisp/progmodes/c-ts-mode.el (c++-ts-mode): Set
`editorconfig-indent-size-vars` since it can't be guessed.
2026-03-27 09:56:55 -04:00
Stefan Monnier
db412283d6 (kmacro-end-call-mouse): Make obsolete
* lisp/kmacro.el (kmacro-end-and-call-macro): Add EVENT argument.
(kmacro-end-call-mouse): Define as obsolete alias
of `kmacro-end-and-call-macro`.
2026-03-27 08:54:14 -04:00
Philip Kaludercic
07baef0aff Elaborate the motivation for the "newcomers-presets" theme 2026-03-27 10:29:42 +01:00
Eli Zaretskii
9b5a9c90d2 ; * lisp/textmodes/css-mode.el: Update maintainer's email address. 2026-03-27 10:24:45 +03:00
YugaEgo
0b0cee07d2 * lisp/textmodes/css-mode.el (css-pseudo-class-ids): Add 'has' (bug#80664). 2026-03-27 10:22:22 +03:00
Eli Zaretskii
3d8f68db3b ; Fix comments and doc strings in some C files
* src/charset.c (Fmap_charset_chars, Fdefine_charset_internal)
(Ffind_charset_region, Ffind_charset_string, Fchar_charset):
* src/chartab.c (UNIPROP_COMPRESSED_FORM_P): Fix commentary and doc
strings.
2026-03-26 19:40:58 +02:00
Eli Zaretskii
887a7ec32d ; * src/xdisp.c (produce_special_glyphs): Fix commentary. 2026-03-26 19:13:15 +02:00
Basil L. Contovounesios
d780007283 Add predicate for initial_terminal
This introduces the predicate frame-initial-p, which uses
struct frame.output_method or struct terminal.type to detect
initial_terminal without relying on its name (bug#80629).
For some prior discussion, see:
https://lists.gnu.org/r/emacs-devel/2019-12/msg00480.html
https://lists.gnu.org/r/emacs-devel/2020-01/msg00120.html

* doc/lispref/frames.texi (Frames): Document frame-initial-p.
(Finding All Frames): Fix grammar.
* etc/NEWS (Lisp Changes in Emacs 31.1): Announce frame-initial-p.
* lisp/desktop.el (desktop--check-dont-save):
* lisp/emacs-lisp/debug.el (debug):
* lisp/frameset.el (frameset-restore):
* lisp/menu-bar.el (menu-bar-update-buffers):
* lisp/xt-mouse.el (turn-on-xterm-mouse-tracking-on-terminal):
Use frame-initial-p instead of checking the "initial_terminal" name.
* lisp/emacs-lisp/byte-opt.el: Mark frame-initial-p as error-free.

* src/pgtkterm.c (pgtk_focus_changed): Use IS_DAEMON in place of
Fdaemonp, thus also accepting a named daemon session.
* src/terminal.c (decode_tty_terminal): Clarify commentary.
(Fframe_initial_p): New function.
(syms_of_terminal): Expose it.
(init_initial_terminal): Update commentary now that
menu-bar-update-buffers uses frame-initial-p (bug#53740).

* test/lisp/xt-mouse-tests.el (with-xterm-mouse-mode): Simulate the
lack of an initial terminal by overriding frame-initial-p now
that turn-on-xterm-mouse-tracking-on-terminal uses it.
* test/src/terminal-tests.el: New file.
2026-03-26 15:19:56 +01:00
Basil L. Contovounesios
dfeaf7fc00 ; Simplify Fframe_id frame decoding.
The subsequent decode_live_frame already checks for nil.
2026-03-26 15:19:56 +01:00
Basil L. Contovounesios
cc4c8e6e9f Simplify some struct frame.output_method checks
* src/lisp.h (inhibit_window_system): Fix typo in commentary.
* src/dispnew.c (Fopen_termscript):
(init_display_interactive) [!HAVE_ANDROID, !MSDOS]:
* src/dosfns.c [MSDOS] (dos_cleanup):
* src/frame.c (frame_inhibit_resize, frame_windows_min_size)
(do_switch_frame, delete_frame):
(make_terminal_frame) [MSDOS]:
(Fmake_terminal_frame) [MSDOS, WINDOWSNT]:
* src/keyboard.c (read_decoded_event_from_main_queue) [!WINDOWSNT]:
(Fcurrent_input_mode):
* src/menu.c (single_menu_item):
* src/msdos.c [MSDOS] (internal_terminal_init):
* src/sysdep.c (init_sys_modes):
* src/term.c: [HAVE_GPM] (Fgpm_mouse_start, Fgpm_mouse_stop):
[MSDOS] (tty_free_frame_resources):
* src/w32xfns.c (get_frame_dc):
* src/xdisp.c (clear_garbaged_frames, hscroll_window_tree)
(redisplay_internal):
* src/xfaces.c (Fdisplay_supports_face_attributes_p)
(realize_default_face, realize_face, realize_tty_face): Use
is_tty_frame, FRAME_INITIAL_P, FRAME_MSDOS_P, FRAME_TERMCAP_P,
FRAME_W32_P, and FRAME_TTY as appropriate instead of open-coding
them (bug#80629).
2026-03-26 15:19:56 +01:00
Basil L. Contovounesios
b5f6bc0072 Improve last change to auth-source-pass
* lisp/auth-source-pass.el (auth-source-pass-search): Remove
redundant expand-file-name.
* test/lisp/auth-source-pass-tests.el
(auth-source-pass--with-store): Bind auth-source-pass-filename to an
existing directory to satisfy the new guard in
auth-source-pass-search (bug#76323).
2026-03-26 15:05:22 +01:00
Naofumi Yasufuku
3c06b7d523 Don't error on nonexistent ~/.password-store
* lisp/auth-source-pass.el (auth-source-pass-search):
If auth-source-pass-filename is not a directory, just do nothing to
avoid repeated errors raised by directory-files-recursively in
auth-source-pass-entries which is called for each search pattern.
(Bug#76323)

Copyright-paperwork-exempt: yes
2026-03-26 14:25:11 +01:00
Eli Zaretskii
4f46593668 ; * lisp/tool-bar.el (tool-bar-setup): Adapt to change for bug#80545. 2026-03-26 11:20:53 +02:00
Eli Zaretskii
55c752d631 ; Fix dired-tests on MS-Windows
* test/lisp/dired-tests.el (dired-test-filename-with-backslash-n):
Skip this test on MS-Windows and MS-DOS.
2026-03-26 08:10:06 +02:00
Stephen Berman
f2b9b827c9 Fix Dired check for newlines in file names
Ensure that Dired does not treat the sequence "\\n" within a file
name as a newline (bug#80608).

* lisp/dired.el (dired--filename-with-newline-p): Rewrite using
'directory-files' with match for regexp "\n".

* test/lisp/dired-tests.el
(dired-test--filename-with-backslash-n): New function.
(dired-test-filename-with-backslash-n): New test.
2026-03-25 20:45:44 +01:00
Pip Cet
2ca648068f Allow retrieving scheduler information in seccomp (bug#80656)
* lib-src/seccomp-filter.c (main): Add rules for 'sched_getscheduler'
and 'sched_getaffinity'.
2026-03-25 16:08:32 +00:00
Basil L. Contovounesios
0048dd0da0 Give compile-command a :group again
Like the commit of 2022-07-31
"Fix further package.el loaddefs byte-compile warnings"
this pacifies the warning that compile-command fails to specify
a containing group when byte-compiling loaddefs.el (bug#80648).

* lisp/progmodes/compile.el (compile-command): Restore explicit
custom :group on autoloaded user option.
2026-03-25 16:06:16 +01:00
Eli Zaretskii
9b0c23a890 Fix "File->Open Directory" menu item after 'ffap-bindings'
* lisp/dired.el (dired-from-menubar): New function.
* lisp/menu-bar.el (menu-bar-file-menu): Use it in the "Open
Directory" menu item, instead of calling Dired directly.  This
ensures we show the correct GUI dialog even if some package remaps
'dired' to something else (like 'ffap-bindings' does).
(Bug#80545)
2026-03-25 15:43:12 +02:00
Eli Zaretskii
99384b1869 ; * lisp/info.el (Info-goto-node-web, Info-url-for-node): Doc fix (bug#80670). 2026-03-25 15:23:46 +02:00
Eli Zaretskii
23b16cd696 ; Make 'default-korean-keyboard' a defcustom
* lisp/language/korea-util.el (default-korean-keyboard): Now a
defcustom.  (Bug#80648)
2026-03-25 14:59:56 +02:00
Stefan Monnier
617b254fe3 minibuffer.el: De-iconify a *Completions* frame only for eager display
* lisp/minibuffer.el (completions--after-change)
(minibuffer--completions-visible): Don't consider an iconified
frame as visible.
2026-03-24 15:54:49 -04:00
Vincent Belaïche
ebd982db33 Check all SES local variables are always set locally. 2026-03-24 18:18:10 +01:00
Vincent Belaïche
b677a90303 Rename ses tests with prefix ses-tests-... 2026-03-24 18:18:08 +01:00
Vincent Belaïche
bb0a5dd6e7 Fix SES tests indentation.
* test/lisp/ses-tests.el (ses-jump-B2-lowcase)
(ses-jump-B2-lowcase-keys): Fix indentation.
2026-03-24 18:18:07 +01:00
Eli Zaretskii
70fae75629 Avoid segfaults in 'bidi_mirror_char' during startup
* src/bidi.c (bidi_mirror_char): Make sure 'bidi_mirror_table' is
initialized before accessing it.  (Bug#80668)
2026-03-24 19:09:52 +02:00
F. Jason Park
7b8a38e053 Add tests for erc-track-faces-normal-list regression
* test/lisp/erc/erc-track-tests.el
(erc-track-tests--modified-channels/baseline): Update assertion to
expect an unchanged mode line segment if `erc-track-faces-normal-list'
lacks a ranked face in the latest inserted message.
(erc-track-modified-channels/baseline/nonotice)
(erc-track-modified-channels/priority-only-all/baseline/nonotice): New
tests.  (Bug#80659)
2026-03-23 18:16:31 -07:00
Ivan
52e5dbd2da Fix erc-track-faces-normal-list regression
* lisp/erc/erc-track.el (erc-track--select-mode-line-face): Check
whether ranked faces in the message appear in the value of the option
`erc-track-faces-normal-list' rather than repeatedly checking if the
current nominee does, usually the highest ranked face in the message.
Failure to do so caused ERC to treat faces absent from the option's
value as being present and thus eligible to replace ranked faces in the
mode line segment.  This bug was introduced in ERC 5.6 and is also part
of 5.6.1.  (Bug#80659)

Copyright-paperwork-exempt: yes
2026-03-23 18:14:57 -07:00
F. Jason Park
bb3c103968 Avoid nested erc-display-message in alert utility
* lisp/erc/erc.el (erc--warn-once-before-connect): Don't call
`erc-display-message' from insertion hooks because doing so places an
unnecessary burden on the caller to preserve the insertion marker and
"msg prop" environment.
2026-03-23 18:13:28 -07:00
Sean Whitton
f08dcace70 ; * lisp/whitespace.el (whitespace-global-modes): Grammar fix. 2026-03-23 21:11:38 +00:00
Basil L. Contovounesios
a4d99971d8 Fix recent whitespace.el changes
* etc/NEWS
(Changes in Specialized Modes and Packages in Emacs 31.1):
Announce new user option whitespace-global-mode-buffers (bug#79230).
* lisp/whitespace.el (whitespace-global-modes): Improve docstring
grammar.
(whitespace-global-mode-buffers): Make default value match *scratch*
exactly for backward compatibility.  Fix custom :type.
(whitespace-enable-predicate): Prefer any over seq-find.
2026-03-23 16:53:57 +01:00
Sean Whitton
c9676d68a2 ; Update tests to match rename of 'any' to 'member-if'. 2026-03-23 12:23:26 +00:00
Yuan Fu
6c79b6bede ; * lisp/treesit.el (treesit-range-rules): Fix range-fn handler. 2026-03-22 20:54:58 -07:00
Pip Cet
1932bb434a Delay initializing 'compile-command' to runtime (bug#80648)
* lisp/progmodes/compile.el (compile-command): Use
'custom-initialize-delay'.
2026-03-22 16:44:04 +00:00
Sean Whitton
17a3f6bf99 * lisp/subr.el (member-if): Fix compiler macro multiple evaluation.
Problem reported by Pip Cet <pipcet@protonmail.com>.
2026-03-22 16:03:16 +00:00
Daniel Mendler
c96c89faaa (dabbrev-completion): Improve last fix for bug#80645
* lisp/dabbrev.el (dabbrev-completion): Signal the error that
`dabbrev-capf` doesn't signal any more.
2026-03-22 10:58:40 -04:00
Helmut Eller
55bf30e017 Staticpro executing_kbd_macro
* src/macros.c (syms_of_macros): Staticpro executing_kbd_macro.
(executing_kbd_macro): Update comment.
* src/macros.h (executing_kbd_macro): Remove redundant comment.
2026-03-22 15:29:37 +01:00
Basil L. Contovounesios
5f3689d77f Fix no-focus-on-map on X without GTK
* src/xterm.c [!USE_GTK] (x_update_frame_user_time_window): When
replacing _NET_WM_USER_TIME with a new _NET_WM_USER_TIME_WINDOW and
the frame has requested no-focus-on-map, ensure _NET_WM_USER_TIME is
zero also on the new _NET_WM_USER_TIME_WINDOW.
(x_make_frame_visible) [!USE_GTK]: Don't overwrite _NET_WM_USER_TIME
before mapping a frame that has requested no-focus-on-map, and whose
_NET_WM_USER_TIME should thus remain zero (bug#80525).
2026-03-22 12:18:03 +01:00
Guilherme de Almeida Suckevicz
8dcbf4fafc Fix wrong type argument error in 'find-file-read-only-other-tab' (Bug#80630)
* lisp/tab-bar.el (find-file-read-only-other-tab): Pass the
function 'find-file-other-tab' directly to
'find-file--read-only' (Bug#80630).

Copyright-paperwork-exempt: yes
2026-03-22 09:27:41 +01:00
Stefan Monnier
a7d0520721 (dabbrev-capf): Fix bug#80645.
* lisp/dabbrev.el (dabbrev-capf): Return an empty table rather than
signaling an error when there are no completions.
The completion UI already takes care of emitting a message like
"No match".
2026-03-21 22:53:13 -04:00