Commit graph

181473 commits

Author SHA1 Message Date
Mattias Engdegård
f52b42e45d useless list 2026-03-02 17:35:13 +01:00
Mattias Engdegård
3b32f85139 eliminate apply-partially 2026-03-02 17:35:13 +01:00
Mattias Engdegård
914fc6282b unmacro icalendar-recur-tests 2026-03-02 17:35:13 +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
Philip Kaludercic
24b922dec1
; Update "Maintainers" header for compat.el 2026-02-28 10:50:55 +01:00
Philip Kaludercic
668c42c4ac
Allow more fine configuration of package retention
* lisp/emacs-lisp/package.el (package-upgrade-keep-previous):
Rename user option to 'package-retention-policy'.
(package--policy-type): New constant for policy types.
(package-retention-policy): New option.
(package-review-policy): Use new type constant.
(package--review-p): Rename and generalise to
'package-matches-selector-p'.
(package-matches-selector-p): New function.
(package-upgrade, package-menu--mark-upgrades-1): Respect
'package-retention-policy'.
* doc/emacs/package.texi (Package Installation): Document new option.
* etc/NEWS: Update NEWS entry.  (Bug#79957)
2026-02-28 10:50:55 +01:00
Philip Kaludercic
e744e8a7a7
Indicate if 'package-isolate' had to download a package
* lisp/emacs-lisp/package.el (package-isolate): Change
formatting to indicate dependencies to include a note if the
package was downloaded in a temporary directory.
2026-02-28 10:50:55 +01:00
Philip Kaludercic
356d74b943
Fix 'package-isolate' in combination with quickload
* lisp/emacs-lisp/package.el (package-isolate): Call
'package--activate-all' directly, to ensure that all the package
directories are properly loaded.
2026-02-28 10:50:55 +01:00
Philip Kaludercic
33c63d24de
; Prevent 'package-isolate' from creating cyclic lists
* lisp/emacs-lisp/package.el (package-isolate): Do not use
destructive 'mapcan' to create a list of dependencies, as
'package-desc-reqs' doesn't return a fresh list.
2026-02-28 10:50:55 +01:00
Jeremy Bryant
0ca7040096
Add option to keep previous package versions on upgrade
This change adds a conditional to keep old package versions on upgrade.
This allows users to keep running multiple Emacsen without a package
upgrade in one Emacs breaking another running Emacs.

* lisp/emacs-lisp/package.el (package-upgrade-keep-previous):
New boolean user option.
(package-upgrade): Use it.
(package-menu--mark-upgrades-1): Use it.
(package-menu--find-upgrades): Make consistent with new option.
* etc/NEWS: Announce it.

(Bug#79957)
2026-02-28 10:50:55 +01:00
Boris Buliga
1c4f09aadc Fix macOS 26 scrolling lag and input handling issues (bug#80268)
macOS 26 introduced new event processing behavior that causes scrolling
lag and input handling problems in Emacs.  This patch disables two
features via NSUserDefaults when built against the macOS 26 SDK:
- NSEventConcurrentProcessingEnabled
- NSApplicationUpdateCycleEnabled

This fix is based on the equivalent patch in emacs-mac by Mitsuharu
Yamamoto.  See: https://bitbucket.org/mituharu/emacs-mac/commits/e52ebfd

* src/nsterm.m (ns_term_init): Disable problematic event processing
when built for macOS 26+.
2026-02-27 20:27:53 +00:00
Stefan Monnier
0068215e53 emacs-lisp-intro.texi: Eliminate duplicate ASCII art
* doc/lispintro/emacs-lisp-intro.texi (print-postscript-figures):
Set it only if we're outputting TeX.
(Lists diagrammed, Lists diagrammed, Lists diagrammed)
(Lists diagrammed, Lists diagrammed, Symbols as Chest)
(kill-ring-yank-pointer, lambda): Presume that
`print-postscript-figures` is set only for TeX output and remove
the `@tex...@end tex` around `@image` which do not seem relevant any more.
2026-02-27 13:42:40 -05:00
Sean Whitton
eca81082a1 ; Fix some comments. 2026-02-27 18:17:36 +00:00
Sean Whitton
9d7130439a ; Copy out log message from when branch was first introduced. 2026-02-27 16:02:49 +00:00
Eli Zaretskii
76c7c867d6 Fix bug on MS-Windows with frame title when system-name is non-ASCII
* src/w32.c (sys_gethostname): Convert system name to UTF-8.
Ensure the buffer passed to 'gethostname' is large enough.
(Bug#80472)
2026-02-27 17:55:05 +02:00
Sean Whitton
13cc7c2b54 New 'log-outstanding' value for vc-log-view-type
This fixes vc-hg-print-log's choice of -r arguments to 'hg log'.

* lisp/vc/vc.el (vc-log-view-type): New 'log-outstanding' value.
(vc-log-outstanding): Pass it.
* lisp/vc/vc-git.el (vc-git-log-view-mode):
* lisp/vc/vc-hg.el (vc-hg-print-log, vc-hg-log-view-mode): Treat
'log-outstanding' the same as 'log-outgoing'.
2026-02-27 13:45:24 +00:00