Commit graph

180043 commits

Author SHA1 Message Date
Juri Linkov
2f6e5d2eda * test/lisp/emacs-lisp/map-ynp-tests.el: Use 'eval-expression-debug-on-error'.
(test-map-ynp-kmacro): Bind 'eval-expression-debug-on-error' to nil
instead of silencing 'backtrace-print'.
2025-11-05 09:15:05 +02:00
Po Lu
e54fd7c012 Fix compilation on Android SDK 20 and earlier
* configure.ac (gl_PREREQ_NPROC): Disable ac_cv_header_mntent_h
if on Android and setmntent is not declared.
2025-11-05 11:10:11 +08:00
Po Lu
240355949e Fix the Android port
* configure.ac (gl_cv_onwards_func_tzalloc): Don't disable on
Android SDK 35.

* src/conf_post.h (tzalloc): Don't override Gnulib-selected
identifier on Android SDK 35.
2025-11-05 10:32:52 +08:00
Po Lu
abcc099c73 Fix the MS-DOS port and reading of symlink targets
* doc/misc/eglot.texi (Eglot Features): Add comma after @xref.

* msdos/sed2v2.inp (GNULIB_ISSYMLINK): Define to 1.

* msdos/sedlibmk.inp (HAVE_RANDOM_H): Undefine, in line with its
deletion from gnulib.mk.
(GL_GNULIB_STRINGEQ): Define to 1.

* src/msdos.c (careadlinkat): NULL terminate at the end of the
data written, not one character beyond the same.
2025-11-05 10:06:23 +08:00
Paul Eggert
6ab56a31a5 Simplify tzfree use
* src/timefns.c (Fdecode_time, Fencode_time)
(Fcurrent_time_string): Do not bother to preserve errno around
tzfree calls, as Gnulib now does that for us.
2025-11-04 13:32:58 -08:00
Paul Eggert
59fbaca6b9 Update from Gnulib by running admin/merge-gnulib
* admin/merge-gnulib (GNULIB_MODULES): Add stringeq.
With current Gnulib it is already present as in indirect dependency;
listing it here because Emacs now depends on it directly.
* lib-src/ebrowse.c, lib-src/etags.c:
(streq): Remove, as Gnulib defines this now.
* lib/fseterr.c, lib/fseterr.h, lib/issymlink.c, lib/issymlink.h:
* lib/issymlinkat.c, lib/stdio-consolesafe.c, lib/string.c:
* m4/fseterr.m4, m4/gettext_h.m4, m4/stringeq.m4:
New files from Gnulib.
* src/conf_post.h (tzfree) [__ANDROID_API__ >= 35]: Remove.
2025-11-04 13:32:58 -08:00
Philip Kaludercic
327c16ce14
Add support for 'bind-and*' patterns to 'cond*'
* lisp/emacs-lisp/cond-star.el (cond*): Document 'bind-and*'.
(bind-and*): Add a stub to raise an error if 'bind-and*' is used
outside of 'cond*'.
(cond*-convert-condition): Implement a new type of condition.
2025-11-04 20:45:39 +01:00
Juri Linkov
89f0853f1e Use 'read-char-choice' in 'ask-user-about-lock' (bug#79664)
* lisp/userlock.el (ask-user-about-lock): Use 'read-char-choice'
instead of 'read-char'.

* lisp/subr.el (read-char-choice-with-read-key): Add fallback
cond-branch to show a message with required keys.
2025-11-04 20:03:44 +02:00
Eli Zaretskii
d9ddf0d075 ; Fix documentation of a recent change
* lisp/progmodes/python.el (python-ts-hs-adjust-block-end-fn):
* lisp/progmodes/hideshow.el (hs-modes-alist)
(hs-adjust-block-end, hs-inside-comment-p-func): Doc fixes.
(bug#79671)
2025-11-04 20:00:39 +02:00
Eli Zaretskii
447bb6ef5c Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2025-11-04 19:45:10 +02:00
Juri Linkov
2bec93b5f4 * test/lisp/emacs-lisp/map-ynp-tests.el: Silence backtrace.
(test-map-ynp-kmacro): Ignore 'backtrace-print' that prints
unrequested backtrace (bug#67836).
2025-11-04 19:23:55 +02:00
Elías Gabriel Pérez
959345f602 hideshow: Rewrite 'hs-special-modes-alist'
Rewrite the format in 'hs-special-modes-alist' to make easier to
exclude some values, add support for settings inheritance
according to current major mode and parents, and support string
hiding for lisp modes.

Bug#79671

* lisp/progmodes/hideshow.el (hs-modes-alist): New variable.
(hs-special-modes-alist): Mark as obsolete.
(hs-forward-sexp-func, hs-adjust-block-beginning)
(hs-find-block-beginning-func, hs-find-next-block-func)
(hs-looking-at-block-start-p-func): Set default values to nil.
(hs-inside-comment-p): Remove function.
(hs-adjust-block-end, hs-treesit-things): New buffer-local
variables.
(hs-block-positions): Minor updates.
(hs--get-mode-value): New function.
(hs-grok-mode-type): Rewrite.
* lisp/progmodes/f90.el (hs-special-modes-alist):
* lisp/progmodes/fortran.el (hs-special-modes-alist):
* lisp/progmodes/icon.el (icon-mode):
* lisp/progmodes/lua-mode.el (lua-mode):
* lisp/progmodes/python.el (python-base-mode):
* lisp/progmodes/verilog-mode.el (verilog-mode):
* lisp/progmodes/vhdl-mode.el (vhdl-hs-minor-mode): Rewrite
settings.
* lisp/progmodes/python.el (python-ts-hs-adjust-block-end-fn):
New function.
* lisp/treesit.el (treesit-hs-block-end)
(treesit-hs-find-block-beginning, treesit-hs-find-next-block)
(treesit-hs-looking-at-block-start-p): Minor updates.
* doc/emacs/programs.texi (Hideshow):
* etc/NEWS: Document changes.
2025-11-04 19:15:10 +02:00
Eli Zaretskii
7c6993e21d ; * doc/lispref/objects.texi (Equality Predicates): Restore @group. 2025-11-04 13:55:27 +02:00
Mattias Engdegård
11860fe936 Improved examples for documentation of 'eq'
* doc/lispref/objects.texi (Equality Predicates):
Remove incorrect and/or misleading examples, add new ones,
and display them more compactly to save space.
2025-11-04 10:59:47 +01:00
Martin Rudalics
df3706a3c3 Fix thinko in 'delete-other-frames'
* lisp/frame.el (delete-other-frames): In second round make sure
the candidate frame has not been deleted in the first round to
avoid that 'frame-terminal' and friends throw an error.
2025-11-04 10:08:19 +01:00
Eli Zaretskii
08c1775264 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2025-11-03 09:29:35 -05:00
Eli Zaretskii
74780575e5 Fix compilation errors in xsettings.c
* src/xsettings.c (store_config_changed_event, dpyinfo_valid)
(store_font_name_changed, store_tool_bar_style_changed): Tweak
preprocessor conditions to satisfy all builds without warnings.
2025-11-03 09:27:16 -05:00
Mattias Engdegård
f2836a8515 ; Avoid minibuffer.el compilation warning about cl-every 2025-11-03 13:00:59 +01:00
Mattias Engdegård
d123ac1400 Don't assume that literal constants are eq-unique in tests
* test/lisp/emacs-lisp/cl-lib-tests.el (cl-test-ldiff):
* test/lisp/emacs-lisp/seq-tests.el (test-seq-union):
These tests relied on literal constants being unique in the sense of
'eq', and would fail if they stop being that (already the case for
strings).
2025-11-03 10:14:55 +01:00
F. Jason Park
f591d1c027 ; Skip erc-keep-place-indicator test on Emacs 27
* test/lisp/erc/erc-scenarios-base-reuse-buffers.el
(erc-scenarios-common--base-reuse-buffers-channel-buffers): Extend some
timeouts.
* test/lisp/erc/erc-scenarios-keep-place-indicator.el
(erc-scenarios-keep-place-indicator--follow): Prefer `ert-skip' here
instead of an :unstable tag because ERC's tests can run locally on some
systems with "SELECTOR=t".
2025-11-02 20:25:27 -08:00
Yuan Fu
b01435306a
Change tree-sitter query predicate names (bug#79687)
Latest tree-sitter library throws a syntax error if the
predicate names in a query don't end with question mark.  So we
made the following change:

:equal changed to :eq?
:match changed to :match?
:pred changed to :pred?

Old names are transparently converted to new names when
expanding patterns.

:match predicate can now take the regexp and the node in any
order: it'll figure out which is which automatically. This way
it works with current Emacs convention (regexp first), as well
as tree-sitter's match convention (regexp second).

* doc/lispref/parsing.texi (Pattern Matching): Update manuel to
use new predicate names.
* src/treesit.c:
(Ftreesit_pattern_expand):
(Ftreesit_query_expand):
(treesit_predicate_match):
(treesit_eval_predicates):
(syms_of_treesit): Use new predicate names.
* test/src/treesit-tests.el (treesit-query-api): Update test.
2025-11-02 17:11:55 -08:00
Yuan Fu
68290e1a03
Fix fontification for var in java-ts-mode (bug#79626)
* lisp/progmodes/java-ts-mode.el:
(java-ts-mode--font-lock-settings): Add font-lock rule for "var".
2025-11-02 14:17:23 -08:00
Sean Whitton
0175b7209e ; * lisp/emacs-lisp/cond-star.el (cond*): Fix typo. 2025-11-02 17:38:47 +00:00
Eli Zaretskii
942a21cc7e ; Fix another compilation warning in pgtkselect.c
* src/pgtkselect.c (pgtk_reply_selection_request): Remove another
unused variable.
2025-11-02 06:37:08 -05:00
Eli Zaretskii
58f2366075 Fix PGTK build without HSETTINGS, broken by recent changes
* src/xsettings.c (store_tool_bar_style_changed): Compile only
under HAVE_GSETTINGS.
(xg_get_system_dark_mode): Compile only under HAVE_GSETTINGS.
* src/gtkutil.c (xg_set_gtk_theme_dark_mode)
(xg_update_dark_mode_for_all_displays, xg_set_initial_dark_mode):
Only compile when HAVE_GSETTINGS is defined.
(xg_create_frame_widgets): Call 'xg_set_initial_dark_mode' only
under HAVE_GSETTINGS.
(xg_create_frame_outer_widgets): Remove unused code.  Call
'xg_set_initial_dark_mode' only under HAVE_GSETTINGS.
* src/pgtkselect.c (pgtk_reply_selection_request): Remove unused
variable.
2025-11-02 06:33:31 -05:00
Eli Zaretskii
69b0aa2928 ; Fix documentation of a recent commit
* doc/emacs/frames.texi (Frame Commands): Document
'alter-fullscreen-frames', which is a user option.  Fix indexing.

* src/frame.c (syms_of_frame) <alter-fullscreen-frames>: Doc fix.
(Bug#79756)
2025-11-02 10:48:13 +02:00
Eli Zaretskii
6d36c6b6f9 ; Fix byte-compilation warnings (bug#79664)
* lisp/emacs-lisp/rmc.el (overriding-text-conversion-style):
Defvar it.
* lisp/emacs-lisp/map-ynp.el (cl--map-keymap-recursively): Add
autoload form.
2025-11-02 10:28:25 +02:00
Martin Rudalics
2c4e7a99cc Handle resizing of fullscreen frames more consistently (Bug#79704)
* src/frame.c (adjust_frame_size): Honor new option
'alter-fullscreen-frames'.
(syms_of_frame) <alter-fullscreen-frames>: New option to
maintain consistent state when attempting to resize fullscreen
frames.  Default to 'inhibit' for NS builds because these
resized the frame while leaving the 'fullscreen' parameter alone
(Bug#79704).
(syms_of_frame) <Qinhibit>: Define symbol.
* lisp/cus-start.el (standard): Add customization options for
'alter-fullscreen-frames'
* doc/lispref/frames.texi (Frame Size): Describe new option
'alter-fullscreen-frames'.
* etc/NEWS: Call out new option 'alter-fullscreen-frames'.
2025-11-02 09:24:05 +01:00
Juri Linkov
fae5ced1ac * lisp/simple.el (previous-line-or-history-element): Fix off-by-one error.
(bug#79746)
2025-11-02 09:41:05 +02:00
Ahmed Khanzada
dd9d1df4fa Automatically toggle between dark and light mode PGTK widgets
* src/gtkutil.h: Declare 'xg_set_gtk_theme_dark_mode',
'xg_update_dark_mode_for_all_displays',
'xg_set_initial_dark_mode'.
* src/gtkutil.c (xg_set_gtk_theme_dark_mode): Toggle PGTK dark mode.
(xg_update_dark_mode_for_all_displays): Toggle PGTK dark mode for all
displays.
(xg_set_initial_dark_mode): Determine PGTK dark mode preference and set.
(xg_create_frame_widgets): Set PGTK dark mode preference for widgets.
(xg_create_frame_outer_widgets): Set PGTK dark mode preference for outer
widgets.
* src/xsettings.h: Declare 'xg_get_system_dark_mode'.
* src/xsettings.c (something_changed_gsettingsCB): Update PGTK dark mode
setting.
(xg_get_system_dark_mode): Determine PGTK dark mode preference.
GSETTINGS_COLOR_SCHEME: Defined and set to "color-scheme".
* etc/NEWS: Document automatic dark mode toggling.
(Bug#79689)
2025-11-02 08:01:41 +02:00
Eli Zaretskii
0c6aee3021 ; * doc/lispref/commands.texi (Reading One Event): Fix wording. 2025-11-02 07:41:08 +02:00
Philip Kaludercic
2777178dc6
Fix markup toggling in rcirc
(rcirc-markup-attributes): Delete markup codes straight after
processing it, to correctly handle toggling codes.  E.g. when
processing the message "one ^Btwo^B three", we previously
recognised the first interval "^Btwo^B" and moved over the ^B.
Searching for the next range to markup, we would now falsely
recognise "^B three" to be another markup range, instead of it
being the negative toggle.  By removing the processed codes, we
avoid this issue.  This reverts the functionality removed in
946ceca2, and therefore also re-adds the check to make an
exception to removing a ^O as that code can terminate multiple
markup sequences.  (Bug#57383)
2025-11-01 20:52:05 +01:00
Philip Kaludercic
da3e3756c2
; * lisp/emacs-lisp/cond-star.el (match*): Fix ` in docstring 2025-11-01 20:52:05 +01:00
Philip Kaludercic
3dacd8b41a
Check if 'hash-table-contains-p' is available in map.el
* lisp/emacs-lisp/map.el (map-contains-key): Hide old
implementation prior to f60fc128 behind a `fboundp', as the
package is distributed on ELPA and should be backwards
compatible to Emacs 26.  (Bug#79711)
2025-11-01 20:52:05 +01:00
Spencer Baugh
fbb7eb5686 * test/lisp/emacs-lisp/map-ynp-tests.el: New file (bug#67836). 2025-11-01 20:40:20 +02:00
Juri Linkov
2447188a69 'map-y-or-n-p' now uses the minibuffer to read a char (bug#79664)
* lisp/emacs-lisp/map-ynp.el (map-y-or-n-p): Use the 'read-key'
branch only when the variable 'y-or-n-p-use-read-key' is non-nil.
Add a new cond-branch to read from the minibuffer.
Add a special case when def is nil in a kmacro in batch mode (bug#67836).

* test/lisp/files-tests.el (files-tests--with-buffer-offer-save):
Let-bind 'y-or-n-p-use-read-key' to t.
2025-11-01 20:27:45 +02:00
Juri Linkov
ab4a616b0b 'read-multiple-choice' now uses the minibuffer to read a char (bug#79664)
* doc/lispref/commands.texi (Reading One Event): Mention
'read-char-choice-use-read-key'.

* lisp/emacs-lisp/rmc.el (rmc--show-help): Show non-selected
resized Help window at bottom.  Inhibit useless message.
Remove unnecessary call to 'pop-to-buffer'.
(read-multiple-choice): Call 'read-multiple-choice--from-minibuffer'
when 'read-char-choice-use-read-key' is nil.
(read-multiple-choice--from-minibuffer): New function.

* test/lisp/emacs-lisp/rmc-tests.el (test-rmc--with-minibuffer-setup):
New macro.
(test-read-multiple-choice, test-read-multiple-choice-help):
Test both values of 'read-char-choice-use-read-key'.
2025-11-01 20:21:09 +02:00
Eli Zaretskii
d2b0c78366 ; * doc/misc/cl.texi (Derived Types): Fix a typo. 2025-11-01 12:44:23 +02:00
Eli Zaretskii
e1b64c8b12 Merge from origin/emacs-30
0974418f2a Improve and correct documentation of 'font-lock-keywords-...
2025-11-01 05:28:54 -04:00
Michael Albinus
a7417c47fa ; Minor Tramp changes
* doc/misc/tramp.texi (Frequently Asked Questions): Don't mention
Windows 7/8, they are obsolete now.  Improve "speed up" item.

* lisp/net/tramp-sh.el (tramp-expand-script): Handle "%%" format
specifier better.
2025-11-01 10:01:43 +01:00
Gautier Ponsinet
126493735f Fix a typo in newst-backend.el
* lisp/net/newst-backend.el (newsticker--parse-text-container): Fix a
typo in the docstring.  (Bug#79747)
2025-11-01 09:25:44 +02:00
Eli Zaretskii
a730cb59ee ; * etc/NEWS (Speedbar): Fix a typo (bug#79748). 2025-11-01 09:23:16 +02:00
Protesilaos Stavrou
a9bac6585f
Update to modus-themes version 5.0.0
The release notes: <https://protesilaos.com/codelog/2025-11-01-emacs-modus-themes-5-0-0/>.
2025-11-01 07:40:13 +02:00
Po Lu
1d8b75f4b8 Restore compatibility with Texinfo 4.13
* doc/emacs/vc1-xtra.texi (Other Working Trees): Remove
@indentedblock; after reading the node twice I could not
understand why the paragraphs so formatted must have been thus.

* doc/misc/cl.texi (Derived types): Rename node to Derived
Types, and insert the same into the menu.
2025-11-01 13:02:34 +08:00
Sean Whitton
63ea5e5b3a ; * lisp/vc/vc-hg.el (vc-hg--reset-back-to): Fix docstring. 2025-10-31 18:53:09 +00:00
Sean Whitton
902f4e7166 ; * lisp/vc/vc-hg.el (vc-hg--reset-back-to): Reflow. 2025-10-31 18:50:41 +00:00
Sean Whitton
1fd4d3e070 New *-revisions-from-end VC backend API functions (bug#79408)
* lisp/vc/vc-git.el (vc-git-delete-revisions-from-end)
(vc-git-uncommit-revisions-from-end):
* lisp/vc/vc-hg.el (vc-hg--assert-rev-on-current-branch)
(vc-hg--reset-back-to, vc-hg-delete-revisions-from-end)
(vc-hg-uncommit-revisions-from-end): New functions.
* lisp/vc/vc.el: Specify delete-revisions-from-end and
uncommit-revisions-from-end backend API functions (bug#79408).
2025-10-31 18:49:19 +00:00
David Ponce
1e47f7492a lisp/emacs-lisp/cl-*.el: Minor changes accumulated during new API design
* lisp/emacs-lisp/cl-macs.el (cl-deftype): Support dispatch on
types that take arguments, as long as they can be used without arguments.

* lisp/emacs-lisp/cl-generic.el (cl--generic-derived-mode-specializers):
Rename from `cl--generic-derived-specializers` to clarify it's about
derived modes and not derived types.
(cl--generic-derived-mode-generalizer): Adjust accordingly and rename
from `cl--generic-derived-generalizer` for the same reason.
Ignore additional args in the tagcode function.
(cl-generic-generalizers) <derived-mode>: Adjust accordingly.

* lisp/emacs-lisp/macroexp.el (macroexp--dynamic-variable-p): Simplify.
2025-10-31 13:49:49 -04:00
David Ponce
13ec843352 cl-extra.el: Use the new API to speed up dispatch on derived types
* lisp/emacs-lisp/cl-extra.el (cl--types-of-memo): Delete var.
(cl--derived-type-specializers-memo): New var.
(cl-types-of): Delete function.
(cl--derived-type-specializers): New function.
(cl--derived-type-dispatch-list): Delete var.
(cl--derived-type-generalizer): Use the `:need-specializers` API instead.
(cl--derived-type-generalizers): Don't fill
`cl--derived-type-dispatch-list` any more.

* lisp/emacs-lisp/cl-preloaded.el (cl--derived-type-list): Delete var.
(cl--define-derived-type): Don't add type to `cl--derived-type-list`.

* test/lisp/emacs-lisp/cl-extra-tests.el (cl-types-test): Adjust.
2025-10-31 13:49:14 -04:00
Stefan Monnier
194b10b6ad (cl-generic-define-generalizer): Add new API
Sometimes, the computation of the tag (or the computations of
the list of specializers corresponding to a tag) can be sped up
if we know the set of specializers we're looking for.

So we add a new API for both the TAGCODE-FUNCTION and SPECIALIZERS-FUNCTION
that lets them receive the set of specializers they need to consider (or any
information they can precompute from that), i.e. the set of specializers
handled by the same generalizer currently used by the generic function
for the the specific argument on which we're currently dispatching.

* lisp/emacs-lisp/cl-generic.el (cl-generic-define-generalizer):
Document new API.
(cl--generic-collect-specializers, cl--generic-filter-specializers)
(cl--generic--tagcode-with-specializers): New helper functions.
(cl--generic-get-dispatcher): Use them to support new API.
2025-10-31 13:49:14 -04:00