Commit Graph

181485 Commits

Author SHA1 Message Date
Alan Mackenzie
b5e2b0bec1 CC Mode: Handle mixed symbols and non-symbols in regexps
This fixes bug#80507.

* lisp/progmodes/cc-defs.el (c-make-keywords-re): When a mixed list
of symbols and non-symbols is presented to this function, put
"\_< .... \_>" brackets around the part which handles the symbols
in the resulting regexp.
2026-03-03 16:19:16 +02:00
Sean Whitton
9563101c47 ; * doc/lispref/control.texi (Conditionals): Improve example. 2026-03-03 14:02:49 +00:00
Sean Whitton
7059bb160e Fix respecting vc-log-show-limit with new -change-log commands
* lisp/vc/vc.el (vc-print-change-log, vc-print-root-change-log):
Respect vc-log-show-limit when there is no prefix argument (bug#80532).
2026-03-03 14:00:39 +00:00
Sean Whitton
2bdf15f6d8 Rename 'any' to 'member-if' and deprecate 'cl-member-if'
* lisp/subr.el (any): Rename from this ...
(member-if): ... to this.  All uses changed.
Implement '&key KEY-FN' for backwards compatibility.
(any): New function alias.
* lisp/emacs-lisp/cl-seq.el (cl-member-if): Make an alias for
'member-if'.
* lisp/obsolete/cl.el (member-if): Delete obsolete function
alias.
* doc/lispref/lists.texi (List Elements):
* doc/misc/cl.texi (Lists as Sets):
* etc/NEWS: Document the change.
2026-03-03 13:57:07 +00:00
Eli Zaretskii
73a2a5cd05 ; Fix documentation of recent changes in treesit.el
* etc/NEWS:
* doc/lispref/parsing.texi (User-defined Things): Fix punctuation,
markup and typos.
2026-03-03 15:21:12 +02:00
Eli Zaretskii
75f6b5fe09 ; * doc/emacs/frames.texi (Multiple Displays): Improve markup. 2026-03-03 15:08:42 +02:00
Sean Whitton
1fb515e79f ; Suggest not using if-let* and friends to bind never-nil values. 2026-03-03 12:58:08 +00:00
Sean Whitton
d9611a7686 ; Tweak splash screen some more. Fix some punctuation. 2026-03-03 12:06:39 +00:00
Sean Whitton
1f9b6223e1 ; Move documentation for multiple-terminals-merge-keyboards. 2026-03-03 11:14:10 +00:00
Sean Whitton
d84c4e8346 dired-diff: Fix default input in inserted subdirectory
* lisp/dired-aux.el (dired-diff): Use default-directory, not
dired-current-directory, to determine whether the default input
is in another directory (bug#80497).  Use a relative file name
to improve readability.
2026-03-03 11:10:18 +00:00
Sean Whitton
afcc930833 Add some settings to newcomers-presets
* etc/themes/newcomers-presets-theme.el (newcomers-presets): Add
mode-line-compact, indent-tabs-mode, imenu-auto-rescan,
view-read-only, shell-command-prompt-show-cwd, after-save-hook,
etags-regen-mode, vc-deduce-backend-nonvc-modes,
vc-dir-save-some-buffers-on-revert, vc-find-revision-no-save,
vc-follow-symlinks, vc-use-incoming-outgoing-prefixes,
tab-bar-history-mode.
2026-03-03 10:42:22 +00:00
Yuan Fu
18c24866af Make tree-sitter thing navigation handle nested parsers
Not a bug report, but this is from the emacs-devel thread
"Tree-sitter: Transcendental things".

Improve tree-sitter thing navigation functions to handle the
case where there are multiple nested parsers in the
buffer. Previously these functions just grab the node at point
and are limited to the parser of that node.  Now these functions
will thoUrouly search through all parsers that covers point
before giving up.

* doc/lispref/parsing.texi: Mention the change.
* lisp/treesit.el (treesit--some): New macro.
(treesit--thing-sibling): Use the new macro, add a new PARSER
parameter.
(treesit-thing-prev):
(treesit-thing-next): Add PARSER parameter.
(treesit-thing-at):
(treesit-navigate-thing): Use the new macro, add a new PARSER
parameter.  Also pass the PARSER arg to recursive calls and
calls to treesit-thing-prev, etc.
2026-03-02 23:59:46 -08:00
Basil L. Contovounesios
b8ee7d667f Initialize help-window-old-frame again
Its sole initialization seems to have been accidentally dropped as
part of bug#25979.

* lisp/help.el (help--window-setup): Set help-window-old-frame
before showing the help buffer (bug#80505).
2026-03-02 22:11:51 +01:00
Mattias Engdegård
423a8b7fd8 Simplify some overly defensive compiler macros
* lisp/emacs-lisp/bytecomp.el (bytecomp--check-eq-args)
(bytecomp--check-memq-args, bytecomp--char-before)
(bytecomp--backward-char, bytecomp--backward-word):
Don't bother with malformed calls; macroexp--compiler-macro won't call
the handler unless the arity matches.
2026-03-02 21:36:26 +01:00
Mattias Engdegård
e96bb822e3 Don't complain on compiler-macro arity mismatch
* lisp/emacs-lisp/macroexp.el (macroexp--compiler-macro):
Don't warn if calling the compiler-macro handler elicits an arity error.

This helps in two ways: no messy wrong-number-of-arguments errors during
macro-expansion, only the actual warnings emitted by the compiler, and
compiler-macros no longer need to be written defensively to avoid such
errors.
2026-03-02 21:36:19 +01:00
Eli Zaretskii
f46eaf609e ; * src/w32image.c (w32_gdip_export_frame): Add error checking. 2026-03-02 17:03:17 +02:00
James Cherti
b3c0aee42b sh-script: Mark + and * as punctuation rather than a symbol constituent
In Bash, the characters + and * are not valid in variable names.
In sh, they are also disallowed in both function and variable
names.  Treating them as punctuation is appropriate, as they most
commonly appear as operators.

Examples:
   . Arithmetic: $((var1*var2))
   . Compound assignment: list_name+=("item")

* lisp/progmodes/sh-script.el (sh-mode-syntax-table): Mark + and *
as punctuation in the syntax table.  (Bug#80280)

Copyright-paperwork-exempt: yes
2026-03-02 14:32:54 +02:00
Martin Rudalics
f88d4a0d7b Handle side windows in 'ediff-setup-windows-plain-compare' (Bug#80415)
* lisp/vc/ediff-wind.el (ediff-split-window-function)
(ediff-merge-split-window-function): Amend doc-strings.
(ediff-setup-windows-plain-compare): Simplify minibuffer window
handling, handle side windows (Bug#80415), avoid 'other-window'
and 'switch-to-buffer' calls.
2026-03-02 10:25:49 +01:00
Paul Eggert
6e8dd0f898 Pacify clang -Wunused-result
Problem reported by badli al rashid (bug#80512).
* lib-src/make-docfile.c (scan_c_stream): Avoid a tricky ungetc+getc.
2026-03-01 11:36:47 -08:00
Paul Eggert
381eb4985b Update from Gnulib by running admin/merge-gnulib
* admin/merge-gnulib (GNULIB_MODULES): Add memeq, streq and remove
stringeq, to adjust to a module splitup in Gnulib.
* lib/memeq.c, lib/streq.c, lib/strnul.c, m4/memeq.m4, m4/streq.m4:
New files.
* lib/string.c, m4/stringeq.m4: Remove.
2026-03-01 10:41:54 -08:00
Mattias Engdegård
b715ae5b34 ; Explain some details about rust-panic rule (bug#80403) 2026-03-01 15:35:11 +01:00
Jacek Świerk
60bbe8786a Add Rust panic message pattern (bug#80403)
* etc/compilation.txt: Add example.
* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist):
New rule.
* test/lisp/progmodes/compile-tests.el (compile-tests--test-regexps-data)
(compile-test-error-regexps): Add test case.

Copyright-paperwork-exempt: yes
2026-03-01 15:35:10 +01:00
Eli Zaretskii
331e2e3787 ; * doc/misc/forms.texi (Credits): Added Johan Vromans (bug#80517). 2026-03-01 16:30:42 +02:00
Eli Zaretskii
a755d7fcf0 Teach Emacs on MS-Windows how to export frame screenshots
* src/w32image.c (w32_gdip_export_frame): New function.
(gdiplus_init): Load 'GdipCreateBitmapFromHBITMAP' from GDI+ DLL.
* src/w32fns.c (Fw32_export_frame): New primitive.

* etc/NEWS: Announce the new primitive.
2026-03-01 15:08:51 +02:00
Michael Albinus
1976223c56 Implement connection-local `command-line-max-length'
* lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
Set connection-local value of `command-line-max-length'.

* lisp/net/tramp.el (tramp-get-connection-local-criteria): New defsubst.
(tramp-set-connection-local-variables): Use it.
(tramp-set-connection-local-variables-for-buffer):
Use `connection-local-criteria-for-default-directory'.
2026-03-01 13:27:26 +01:00
Eli Zaretskii
f8d9ecb1b0 Add a few more translations to iso-transl.el
* lisp/international/iso-transl.el (iso-transl-char-map): Add a
few more translations for accented characters and arrows.  (Bug#80515)
2026-03-01 08:51:47 +02:00
Sean Whitton
b7dedde7aa ; Relocate comment along with the relocated code.
The code was moved, but without its comment, in this change:

    Author:     Dmitry Gutov <dgutov@yandex.ru>
    AuthorDate: Thu May 28 02:16:00 2015 +0300

        Delete the old process in vc-setup-buffer

        * lisp/vc/vc-dispatcher.el (vc-setup-buffer): Delete the old
        process here.
        (vc-do-command): Rather than here (bug#20608).
2026-02-28 21:16:49 +00:00
Sean Whitton
d78a1db462 New variable 'multiple-terminals-merge-keyboards'
* src/keyboard.c (syms_of_keyboard):
<multiple_terminals_merge_keyboards>: New variable.
(read_event_from_main_queue): Mention it in message.
* lisp/cus-start.el: Make it customizable.
* src/callint.c (Ffuncall_interactively):
* src/keyboard.c (Frecursive_edit):
* src/minibuf.c (read_minibuf): When its value is true, don't
enter single-kboard mode (bug#79892).
* admin/notes/multi-tty:
* etc/NEWS: Document it.
2026-02-28 20:54:56 +00:00
Paul Eggert
aed1c8b536 Don’t stuff keyboard input uselessly
Also, document stuffing better.
* src/keyboard.c (stuff_buffered_input):
Give up on stuffing if it fails.
* src/sysdep.c (stuff_char): Return failure indication.
2026-02-28 09:09:22 -08:00
Eli Zaretskii
936472345d Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2026-02-28 18:44:59 +02:00
Eli Zaretskii
8e3b20a702 ; * lisp/calendar/icalendar-recur.el (eval-when-compile): Fix a typo. 2026-02-28 18:00:55 +02:00
Basil L. Contovounesios
ada12edeb7 Better project-find-file error in empty project
* lisp/progmodes/project.el (project--read-file-name): Signal a
user-error and don't call project-read-file-name-function if the
file name collection is empty, since the default options for
project-read-file-name-function expect a cons (bug#80509).
(project-find-file-in): Avoid redundant consing for
vc-directory-exclusion-list in default case of include-all=nil.
2026-02-28 16:58:45 +01:00
Michael Albinus
31b106c1e2 multiple-command-partition-arguments: Use connection-local value
* lisp/subr.el (multiple-command-partition-arguments): Use
connection-local value for command-line-max-length.
2026-02-28 15:50:50 +00:00
Sean Whitton
62ab58972c ; * src/callproc.c (command-line-max-length): Use DEFVAR_INT. 2026-02-28 15:50:10 +00:00
Mattias Engdegård
a3411c8b86 Correct manual entry for string-lessp
* doc/lispref/strings.texi (Text Comparison):
The old text was wrong: non-ASCII unibyte chars overlap part of Unicode.
2026-02-28 16:38:27 +01:00
Mattias Engdegård
460e438356 Implement string> as a compiler macro instead of an optimisation
This doesn't affect the generated code.

* lisp/subr.el (string-greaterp): Add compiler macro.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-string-greaterp): Remove.
2026-02-28 16:37:38 +01:00
Mattias Engdegård
9d9f7b2c48 ; Don't set properties on function aliases
We look for properties on the aliased functions as well so there is no
need for them on the aliases themselves (unless we want the alias to
have different semantics but that's not the case for these).

* lisp/emacs-lisp/byte-opt.el: Don't set compilation-related properties
on 'string=', 'string>', 'not' or 'wholenump'.
(byte-optimize-null): Rename from 'byte-optimize-not'.
2026-02-28 16:37:37 +01:00
Mattias Engdegård
b85d853e50 Eliminate double arity warnings
Calls to some functions, such as 'cdr' and '%', would generate two
slightly different complaints if given the wrong number of arguments.

* lisp/emacs-lisp/bytecomp.el (byte-compile-subr-wrong-args): Remove.
Calls are replaced with 'byte-compile-normal-call'.
2026-02-28 16:37:37 +01:00
Sean Whitton
342e002c87 Show a message in locked frames in single-kboard mode
* src/keyboard.c (kbd_buffer_get_event): Pass the event's frame
up to the caller by means of a new 'struct frame **' argument.
(read_event_from_main_queue): Show a message in locked frames in
single-kboard mode (bug#79892).
* src/xdisp.c (log_message): Factor out of message3.
(message3): Call it.
(message3_nolog): Rename to ...
(message3_frame_nolog): ... this.  New 'struct frame *' argument
which causes temporarily switching to another frame when
displaying the message.
(message3_frame, message3_nolog): New functions.
* src/lisp.h: Declare message3_frame and message3_frame_nolog.
* admin/notes/multi-tty: Remove notes on showing a message.
2026-02-28 15:34:16 +00:00
Eli Zaretskii
fe2fdf7c82 ; * lisp/dired-aux.el (dired-do-async-shell-command): Doc fix (bug#80490). 2026-02-28 16:59:06 +02:00
Eli Zaretskii
b540c45bc5 Document that string ARG of 'kill-emacs' might not work
* src/emacs.c (Fkill_emacs):
* doc/lispref/os.texi (Killing Emacs): Document that EXIT-DATA
being a string doesn't always work.  (Bug#80435)
2026-02-28 16:10:08 +02:00
Richard Lawrence
a9a03cf35e Fix (or ...) patterns in 'cond*'/'match*'
This fixes Bug#80121.
* lisp/emacs-lisp/cond-star.el (cond*-subpat): Add missing reference to
'expression' when clearing multiple backtrack aliases.
2026-02-28 15:43:55 +02:00
Eli Zaretskii
0d017fc7ce ; Fix the documentation of 'overlays-in' etc.
* src/buffer.c (Foverlays_in):
* lisp/subr.el (remove-overlays):
* doc/lispref/display.texi (Finding Overlays, Managing Overlays):
* etc/NEWS: Improve the documentation of recent changes in
behavior of 'overlays-in' and 'remove-overlays'.  (Bug#80242)
2026-02-28 15:36:07 +02:00
Eli Zaretskii
a36d0c66e4 ; Remove unused declarations from w32heap.c
* src/w32heap.c (RtlCreateHeap_Proc, PRTL_HEAP_COMMIT_ROUTINE)
(RTL_HEAP_PARAMETERS): Remove unused declarations (bug#76041).
2026-02-28 14:58:33 +02:00
Eli Zaretskii
d366c8cf23 ; * src/w32proc.c (new_child): Update comment (bug#76041). 2026-02-28 14:53:34 +02:00
Sean Whitton
2c7f33e186 ; Hint for new users in manual. New comment. 2026-02-28 12:35:14 +00:00
Sean Whitton
3b223db8a7 Initialize command-line-max-length with sysconf(3)
* lisp/subr.el (command-line-max-length): Move from here ...
* src/callproc.c (syms_of_callproc): <Vcommand_line_max_length>:
... to here.  Initialize by calling sysconf(3) if possible.
2026-02-28 10:23:11 +00:00
Peter Oliver
58b195e5a3 New function rxvt-colorfgbg-background-mode
* lisp/term/rxvt.el (rxvt-colorfgbg-background-mode): New
function (bug#80486).
(rxvt-set-background-mode): Call it.

Copyright-paperwork-exempt: yes
2026-02-28 09:52:15 +00:00
Philip Kaludercic
91c8c0cc98 Fix prompting of packages for 'package-report-bug'
* lisp/emacs-lisp/package.el (package--query-desc): Load
'package-alist' if this hasn't already occurred.
(package-report-bug): Drop unnecessary ALIST argument when
invoking 'package--query-desc'.
2026-02-28 10:50:55 +01:00
Philip Kaludercic
4b253c39b1 Improve 'package-report-bug' robustness
* lisp/emacs-lisp/package.el (package-maintainers): Add
fallbacks if a package doesn't list a single maintainer.
(package-report-bug): Check if "emacs-devel@gnu.org" is listed
as a maintainer, in which case the message is redirected to
bug-gnu-emacs@gnu.org and the X-Debbugs-CC header is set.

(Bug#80478)
2026-02-28 10:50:55 +01:00