Commit graph

179116 commits

Author SHA1 Message Date
James Thomas
cd31c3cb42 Add 'other-window-backward' for a default binding (bug#78803)
This moves in the opposite direction to 'other-window' by
default, and is consistent with its repeat map.
* lisp/window.el (other-window-backward): New function bound to
'C-x O'.
(ctl-x-map): Update definition.
* doc/emacs/windows.texi (Other Window): Update docs.
* etc/NEWS: Annouce the new command.
2025-08-02 17:25:14 +03:00
Jakub Ječmínek
e52ed1b5d1 Improve region deletion handling in python.el
* lisp/progmodes/python.el (python-indent-dedent-line-backspace):
Delete the text in the region if Transient Mark mode is enabled,
the mark is active, and prefix arg is 1.  (Bug#48695)

* test/lisp/progmodes/python-tests.el
(python-indent-dedent-line-backspace-4): Add new test.
2025-08-02 17:14:50 +03:00
Manuel Giraud
2846dd8842 Fix mode-line string width in diary view
Bug#78957

* lisp/calendar/calendar.el (calendar-in-read-only-buffer):
Select the buffer window because, for example,
`calendar-set-mode-line' needs it.
2025-08-02 17:07:37 +03:00
Steven Allen
5140e317b7 url: %-encode literal % characters when building query strings
When building a query string via `url-build-query-string',
%-encode literal % characters appearing in both the keys and
the values.
* lisp/url/url-util.el (url--query-key-value-preserved-chars):
Define a new constant based on `url-query-key-value-allowed-chars'
specifying the characters that should be preserved when %-encoding
query-string keys and values.
(url-build-query-string): Use the new constant (fixes Bug#78984).

* test/lisp/url/url-util-tests.el (url-util-tests): Add a test.
2025-08-02 16:49:52 +03:00
Antero Mejr
5979d17ea9 Fix index error when checking edited bug reports
* lisp/mail/emacsbug.el (report-emacs-bug-check-org): Improve regex
check.  (Bug#79080)
2025-08-02 16:30:09 +03:00
Daniel Mendler
836b2bb8b4 ibuffer-update-title-and-summary: Fix out of range error
When `ibuffer-use-header-line' is set to `title' and the buffer
list contains no buffers due to a filter,
`ibuffer-update-title-and-summary' would error with an
"Args out of range: 0, 0" error.
* lisp/ibuffer.el (ibuffer-update-title-and-summary): Check if
buffer is empty to prevent out of range error.  (Bug#79152)
2025-08-02 16:25:39 +03:00
Mattias Engdegård
adc05bead3 ; * etc/NEWS: Move read-directory-name entry; a compatible change. 2025-08-02 13:16:15 +02:00
Jonas Bernoulli
17c54bed4b
Update to Transient v0.9.4-8-g6bc543d5 2025-08-01 19:38:56 +02:00
Eli Zaretskii
91dc27c199 ; * etc/NEWS: Fix wording of a recently-added entry. 2025-08-01 08:25:50 +03:00
Rudolf Adamkovič
6e1054a40b NS: Correct the accessibility role of Emacs windows (bug#77062)
Make the accessibility role of Emacs windows to be "standard
window" (AXWindow) instead of "text field" (AXTextField).  This matches
other applications on NS, as can be verified with any accessibility
inspector.  All widely used NS ports, such as Emacs Plus, have this
patch already applied. As for practical impact, this change makes Emacs,
for example, work with tiling window managers, such as Yabai, where many
users report problems with Emacs specifically, and are instructed to
simply avoid the official NS port of GNU Emacs due to this problem.

* src/nsterm.m: ([EmacsWindow accessibilityAttributeValue:]): Make the
accessibility role of Emacs windows to be "standard window" (AXWindow)
instead of "text field" (AXTextField).
2025-07-31 22:14:39 +01:00
Juri Linkov
a6e0bb92bb * lisp/tab-line.el (tab-line-cache-key-default): Adapt to new feature.
Take into account 'tab-line-close-modified-button-show' similarly
to the case when 'tab-line-tab-face-modified' is a member of
'tab-line-tab-face-functions' (bug#79046).
2025-07-31 21:47:22 +03:00
Elías Gabriel Pérez
7d77ae98d4 tab-line: Add close button for modified tabs (bug#79046)
* etc/NEWS: Announce changes.
* etc/images/tabs/close-modified.xpm: New image.
* etc/images/tabs/README (Files): Add button icon name to README.
* lisp/tab-line.el (tab-line-close-modified-button-show): New
user option.
(tab-line-close-modified): Define new icon.
(tab-line-close-modified-button): New variable.
(tab-line-tab-modified-p): New function.
(tab-line-tab-name-format-default): Rework.
(tab-line-tab-face-modified): Use 'tab-line-tab-modified-p'.
2025-07-31 21:35:50 +03:00
Robert Pluim
38557cac74 * lisp/emacs-lisp/shortdoc.el (sequence): Add 'seq-doseq'. 2025-07-31 10:33:11 +02:00
Michael Albinus
0b449b4f38 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2025-07-31 07:44:11 +02:00
Paul Eggert
0eaf5c045f GCC union bugs to be fixed in GCC 15.2
Thanks to Martin Jambor for the GCC fixes; see:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117423#c27
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119085#c12
Also, thanks to Sam James for letting me know.
* configure.ac (emacs_cv_gcc_union_bugs_CFLAGS):
Rename from emacs_cv_gcc_bug_119085_CFLAGS.  All uses changed.
Assume the GCC union bugs will be fixed in GCC 15.2.
2025-07-30 18:41:26 -07:00
Robert Pluim
45a5fae991 Add support for AUTH=PLAIN to imap.el
* lisp/net/imap.el (imap-authenticators): Add 'plain' to the
list.
(imap-authenticator-alist): Add 'imap-plain-p' and
'imap-plain-auth'.
(imap-plain-p): New function, detects AUTH=PLAIN support.
(imap-plain-auth): Perform the AUTH=PLAIN authentication.

* doc/misc/gnus.texi (Mail Source Specifiers): Add 'plain'.
(Conformity): Add reference to RFC 4616.

* etc/NEWS: Announce the support.
2025-07-30 15:36:02 +02:00
Baptiste Strazzulla
93dff95463 ; Fix NEWS entry for Newsticker
* etc/NEWS: Amend the correct name of the new
'newsticker-hide-old-feed-header' option.  (Bug#78305)
2025-07-30 14:17:04 +03:00
Mattias Engdegård
95be144994 Refactor reader to use readbuf_t in more places
Simplify the code by using the already existing dynamic string buffer
type.  This is a refactoring; performance isn't measurably affected.

* src/lread.c (grow_read_buffer): Dissolve into...
(readbuf_grow): ...here, simplifying the code.
(add_char_to_buffer): Check for growth before adding char, not after.
(read_integer, read_string_literal): Use readbuf_t.
2025-07-30 11:04:12 +02:00
Mattias Engdegård
2d18878b96 Move keyboard input functions from lread.c to keyboard.c
These have nothing to do with the Lisp reader at all.

Suggested by Lynn Winebarger (bug#79035).

* src/lread.c (read_filtered_event, Fread_char, Fread_event)
(Fread_char_exclusive, Qascii_character): Move...
* src/keyboard.c: ...here.
* test/src/lread-tests.el (test-inhibit-interaction): Move...
* test/src/keyboard-tests.el (keyboard-inhibit-interaction): ...here.
2025-07-30 11:04:11 +02:00
Mattias Engdegård
5a9cbf24ec ; * src/bytecode.c: remove unneeded includes 2025-07-30 11:04:11 +02:00
Michael Albinus
4516091fd8 Fix problem in tramp-smb.el
* lisp/net/tramp-smb.el (tramp-smb-handle-file-attributes):
Use `directory-file-name'.

* test/lisp/net/tramp-tests.el (tramp-test18-file-attributes)
(tramp-test19-directory-files-and-attributes): Extend tests.
2025-07-30 09:33:20 +02:00
F. Jason Park
edd1f0512f ; Adjust sleep-for in erc-autojoin-channels tests
* test/lisp/erc/erc-join-tests.el
(erc-join-tests--autojoin-channels-ident): A `sleep-for' value of 0.01
caused associated tests to fail on at least one setup involving Solaris
10.  The new value is arbitrary and possibly temporary, pending further
investigation.  (Bug#79017)
2025-07-29 16:02:16 -07:00
Paul Eggert
3797484608 Update from Gnulib by running admin/merge-gnulib 2025-07-29 15:06:14 -07:00
Paul Eggert
354f9ba754 Disable Gnulib’s non-Gregorian calendars
Prepare for the next Gnulib merge by disabling the optional
support for non-Gregorian calendars recently added to Gnulib’s
nstrftime module.  This would be tricky to integrate with Emacs,
as Emacs has its own (much fancier) calendar system, one that at
least for the Persian calendar sometimes disagrees with Gnulib’s,
and it’s likely not worth the trouble of reconciling the conflicts.
* src/conf_post.h (SUPPORT_NON_GREG_CALENDARS_IN_STRFTIME):
New macro, defined to false.
* admin/merge-gnulib (GNULIB_MODULES): nstrftime → nstrftime-limited.
(AVOIDED_MODULES): Add localcharset.
Near the end, also remove the files lib/calendar-ethiopian.h,
lib/calendar-persian.h, lib/calendar-thai.h, lib/calendars.h.
2025-07-29 15:06:13 -07:00
Stefan Monnier
6eb6cdfbe5 (define-globalized-minor-mode): Remove left-over code
* lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
Delete the code managing `<MODE>-buffers`, since it's not used any more.
Prefer `%S` over `%S` to print arbitrary sexps.
(define-minor-mode): Make sure we use the same test to distinguish
old-style and new-style.
2025-07-29 15:52:26 -04:00
Harald Jörg
7291eef004 ; Improve NEWS entry for CPerl mode
* etc/NEWS: Improve wording for the entry on CPerl mode as
suggested by Michael Albinus.  Also, link to perldelta.
2025-07-29 13:57:38 +02:00
Juri Linkov
87ea884748 Minor image-convert file types related changes (bug#79109)
* lisp/files.el (auto-mode-alist): Add ".avif" to the list of
image file types supported by 'image-convert'.
Remove duplicate entry for ".webp" that was added at the top
in the list of natively supported image types.

* lisp/image.el (imagemagick-enabled-types): Add AVIF and
WEBP (the latest for the case when native libs are not installed).

* lisp/image/image-converter.el (image-converter--converters):
Add "-layers merge" to the imagemagick convert command line.
2025-07-29 09:42:21 +03:00
Sean Whitton
c403e9a18f ; * doc/emacs/vc1-xtra.texi (Other Working Trees): Expand text. 2025-07-28 20:17:09 +01:00
Eli Zaretskii
4035bfa542 ; * src/pdumper.c (dump_buffer): Update HASH_buffer. 2025-07-28 19:51:06 +03:00
Harald Jörg
cef4302d30 cperl-mode.el: Support syntax of Perl version 5.42
* lisp/progmodes/cperl-mode.el (cperl--sub-name-generated-rx):
Simplify captures to account for the :writer attribute.  Parsing
is done later.
(cperl-imenu-sub-keywords): Remove attributes which generate subs
(cperl-imenu--create-perl-index): Analyze field declarations for
autogenerated methods
(cperl-init-faces): Add "all" and "any" to the list of functions
(cperl-short-docs): Add short docs for "all" and "any"

* test/lisp/progmodes/cperl-mode-tests.el
(cperl-test-autogenerated-reader-rx):
Adjust for modified rx form due to ":writer" support
(cperl-test-imenu-index): Add tests for autogenerated writer
accessors (in grammar.pl)

* test/lisp/progmodes/cperl-mode-resources/grammar.pl: Add code samples
for ":writer"

* etc/NEWS: Announce that CPerl mode supports Perl 5.42.
2025-07-28 18:20:26 +02:00
F. Jason Park
62fba3a723 ; Improve some doc strings in erc-services
* lisp/erc/erc-services.el: Fix shape of option in commentary example.
Existing value didn't pass `setopt' validation and raised an error
during successful lookup in `erc-nickserv-get-password'.
(erc-nickserv-passwords, erc-nickserv-identify-autodetect): Update doc
string by removing erroneous constraint, which was no longer applicable
following c6eb114a42 "ERC: NickServ:
Prompt for password last, overall simplifications (bug#46777)".
(erc-nickserv-identify): Simplify doc and guarantee t as return value on
success rather than rely on unadvertised behavior from other API
functions.
2025-07-27 19:57:28 -07:00
F. Jason Park
00a3ec9d53 Use function-valued variable for ERC query predicate
* lisp/erc/erc-notify.el (erc-querypoll-mode, erc-querypoll-enable)
(erc-querypoll-disable): Override `erc-query-table-synced-predicate'
when mode is active.
(erc--queries-current-p): Remove method.
(erc--querypoll-active-p): New function.
* lisp/erc/erc-speedbar.el (erc-speedbar-buttons)
(erc-speedbar-insert-target): Call function-valued variable
`erc--query-table-synced-predicate' instead of its now default value
`erc--queries-current-p' directly.
* lisp/erc/erc.el (erc--query-table-synced-predicate): New variable.
(erc--queries-current-p, erc--query-participant-present-p): Convert
former from method to normal function and rename to latter.  Original
was added as part of bug#70928.
2025-07-27 19:57:28 -07:00
F. Jason Park
db8f469bd4 Redo erc-nicks track integration tests as scenarios
* test/lisp/erc/erc-nicks-tests.el (erc-nicks-tests--track-faces):
Remove unused function.
(erc-nicks-track-faces/prioritize, erc-nicks-track-faces/defer)
(erc-nicks-track-faces/nil, erc-nicks-track-faces/t): Remove tests.
* test/lisp/erc/erc-scenarios-nicks-track.el: New file.
* test/lisp/erc/resources/nicks/track-prioritize.eld: New file.
* test/lisp/erc/resources/nicks/track-t.eld: New file.  (Bug#76188)
2025-07-27 19:57:28 -07:00
F. Jason Park
2f5fe1a48e Cancel ERC autojoin timer in the server buffer
* lisp/erc/erc-join.el (erc-autojoin-channels-delayed): Only cancel
`erc--autojoin-timer' in the server buffer in which it's local.  After
Emacs 28 brought commit fc66ec3322 "Prefer
defvar-local in erc", customizing `erc-autojoin-timing' to `ident' led
to ERC emitting redundant JOINs before `erc-autojoin--join' was factored
out.  Additionally, don't bother binding options around the call to
`erc-autojoin-channels' to shape its behavior, preferring instead to
call the internal workhorse function directly.  Ever since bug#5521
introduced those options, the logic in `erc-autojoin-channels' has
ignored `erc-autojoin-delay' anyway, so long as `erc-autojoin-timing'
isn't `ident'.  This change may break third party advice.
(erc-autojoin-after-ident): Restore code to cancel timer.  It was
erroneously deleted in 959fbcf34b "favor
network identities in erc-join".
* test/lisp/erc/erc-join-tests.el: Require erc-tests-common atop file so
tests can take advantage of common utilities.
(erc-autojoin-channels--connect): Replace with a function and three
separate tests.
(erc-join-tests--autojoin-channels-connect): New function.
(erc-autojoin-channels/server, erc-autojoin-channels/network)
(erc-autojoin-channels/nomatch): New tests.
(erc-autojoin-channels--delay): Replace with a function and three
separate tests.  Remove guard to skip test on Solaris.
(erc-join-tests--autojoin-channels-ident): New function.
(erc-autojoin-channels-delayed/server)
(erc-autojoin-channels-delayed/network)
(erc-autojoin-channels-delayed/nomatch): New tests.
(erc-autojoin-channels--ident): Replace with function and two separate
tests.
(erc-join-tests--autojoin-after-ident): New function.
(erc-autojoin-after-ident/server)
(erc-autojoin-after-ident/network): New tests.
(erc-join-tests--autojoin-add--common)
(erc-join-tests--autojoin-add): Rename former to latter.
(erc-autojoin-add--network)
(erc-autojoin-add--network-extended-syntax)
(erc-autojoin-add--network-id): Adjust arguments to fixture.
(erc-autojoin-add--server): Use common utils.
(erc-join-tests--autojoin-remove--common)
(erc-join-tests--autojoin-remove): Rename former to latter.
(erc-autojoin-remove--network)
(erc-autojoin-remove--network-id): Adjust args for fixture.
(erc-autojoin-remove--server): Use common utils.
* test/lisp/erc/erc-scenarios-join-timing.el: New file.
* test/lisp/erc/resources/erc-scenarios-common.el
(erc-scenarios-common--run-in-term): In subprocess, don't use failure
tally as exit status unless body form succeeds.
* test/lisp/erc/resources/erc-tests-common.el
(erc-tests-common-init-server-proc): Use `make-process' instead of
`start-process'.
(erc-tests-common-make-server-buf): Use `erc-server-current-nick' to
create the `erc-networks--id' as a `erc-networks--id-qualifying'
instance, which is more realistic than a "fixed" variant.
* test/lisp/erc/resources/join/timing/connect-both.eld: New file.
* test/lisp/erc/resources/join/timing/ident-both.eld: New file.
(Bug#79017)
2025-07-27 19:57:28 -07:00
Sean Whitton
068b324d99 * doc/emacs/vc1-xtra.texi (Other Working Trees): Extended example. 2025-07-27 20:24:53 +01:00
Sean Whitton
9f28f12ad5 vc-git-modify-change-comment: Error out for merge commits
* lisp/vc/vc-git.el (vc-git-modify-change-comment): Don't try to
modify merge commit comments.
2025-07-27 20:05:08 +01:00
Sean Whitton
e954b29f5f vc-test--other-working-trees: Stub out 'vc-dir'
* test/lisp/vc/vc-tests/vc-tests.el
(vc-test--other-working-trees): Stub out 'vc-dir' when adding
the second working tree.
2025-07-27 19:44:31 +01:00
Michael Albinus
f55f3259d6 Tramp: Fix thinko in local process environment
* lisp/net/tramp-sh.el (tramp-maybe-open-connection): Do not set "TERM",
"PROMPT_COMMAND" and "PS1".

* lisp/net/tramp.el (with-tramp-local-environment): Do not override
`process-environment'.  Set "TERM", "PROMPT_COMMAND", "PS1" and
"INSIDE_EMACS".  (Bug#79103)

* lisp/net/trampver.el (tramp-inside-emacs): Remove duplicate entries.
2025-07-27 19:41:29 +02:00
Juri Linkov
6982dc460a * lisp/window.el (window--quit-restore-select-window): Use 'select-frame'.
Replace 'select-frame-set-input-focus' with the
less obtrusive 'select-frame' (bug#79098).
2025-07-27 19:30:35 +03:00
Eli Zaretskii
aef2d807e7 ; * src/emacs.c (default_PATH) [DOS_NT]: Add commentary. 2025-07-27 18:45:03 +03:00
Paul Eggert
64c93e188e Better default PATH on MS-Windows
* src/emacs.c (default_PATH): Use a more-reasonable default
for MS-Windows and DOS.  Problem reported by Eli Zaretskii in:
https://lists.gnu.org/r/emacs-devel/2025-07/msg00384.html
2025-07-27 08:17:25 -07:00
Madhu
39566b7337 (cl-nsubstitute): Fix regression in commit 8c8ff13e
lisp/emacs-lisp/cl-seq.el (cl-nsubstitute): restore a variable names that
were incorrectly replaced in commit 8c8ff13e, so nsubstitute on a string
returns a string instead of a vector.
2025-07-27 09:19:42 -04:00
Mattias Engdegård
3738488571 * .mailmap: update my entry 2025-07-27 14:32:23 +02:00
Sean Whitton
eadc36a2af vc-tests: Fix two problems with other working tree tests
* test/lisp/vc/vc-tests/vc-tests.el (project, cl-lib): Require.
(vc-test--other-working-trees): Bind project-list-file to a
writeable file name.
(vc-test-hg07-other-working-trees): Use vc-hg-global-switches to
enable the share extension.
2025-07-27 09:24:02 +01:00
Sean Whitton
e104c06e6a ; * lisp/vc/vc.el (vc-switch-working-tree): Improve docstring. 2025-07-27 08:46:22 +01:00
Eli Zaretskii
b46bbf89ad ; Fix last change
* etc/NEWS: Announce new newsticker commands.

* lisp/net/newst-plainview.el (newsticker-hide-old-feed-header):
Doc fix.  Add :version tag.  (Bug#78305)
2025-07-27 08:07:35 +03:00
Baptiste Strazzulla
67f36e80ce Add a new user option to hide the header of old newsticker feeds
* lisp/net/newst-plainview.el (newsticker-hide-old-feed-header):
Define that new user option
(newsticker-mode-map): Add the new bindings related to that new
user option.
(newsticker-buffer-update): Hide the old feeds if the new user
option is true.
(newsticker-hide-old-feed-header): Define a function to hide the
old feeds.
(newsticker-show-old-feed-header): Define a function to restore
them.
(newsticker--old-feed-p): Define a function to check if a feed is
old.
(newsticker--buffer-do-insert-text): Set age of feed to old if
applicable.
(newsticker--buffer-set-invisibility): Update the function to
account for the fact that there are two lines (not just one) to
hide feeds.

* etc/NEWS: Announce the new user option
'newsticker-hide-old-feed-header' to hide old feeds.  (Bug#78305)
2025-07-27 07:58:13 +03:00
Po Lu
9d2c7bed66 Update Android frame param handlers
* src/androidfns.c (android_frame_parm_handlers): Add
gui_set_borders_respect_alpha_background for consistency with X.
2025-07-27 09:36:10 +08:00
Stefan Monnier
f6d314dfe5 bytecomp.el: Rework the message when the macro is not recognized
The "Macro %s unrecognized, won't work in file" message
happened only for macros defined to `nil`, and the code handling
"unrecognized" code was split with the function part is
`byte-compile-file-form-defmumble` and the macro part in
`byte-compile-file-form-defalias`, so straighten it out
and simplify a bit.

* lisp/emacs-lisp/bytecomp.el (byte-compile-file-form-defmumble):
Don't modify `byte-compile-*-environment` here.
(byte-compile-file-form-defalias): Do it here instead.
Use `macroexp-quote`.  Merge the two "unrecognized macro" warnings.
2025-07-26 18:35:00 -04:00
Paul Eggert
547525176f Add readlink, realpath startup comments
This does not change behavior.
* src/emacs.c (follow_if_symlink): New static function, as a
vehicle for commentary explaining the deal with readlink and realpath.
(find_emacs_executable): Use it.
2025-07-26 12:52:55 -07:00