1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-05 13:31:45 -08:00
Commit graph

179952 commits

Author SHA1 Message Date
Amin Bandali
bbabc1db25 ; * doc/lispref/os.texi (Startup Summary): Fix typo. 2025-10-25 10:55:00 -04:00
Mattias Engdegård
0db56a335c * lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode): Fix mistake 2025-10-25 15:41:13 +02:00
Stephen Berman
e561d14900 Fix Tramp support of GVFS built without FUSE
* lisp/net/tramp-gvfs.el (tramp-gvfs-enabled): Add check for
running process "gvsd", since GVFS may be built without FUSE.
2025-10-25 13:06:13 +02:00
Eli Zaretskii
42ac31133e ; Remove unintended hunks from last changeset. 2025-10-25 13:06:42 +03:00
Eli Zaretskii
f20eed46f9 ; Fix last change (bug#79629)
* lisp/calendar/holidays.el (holiday-general-holidays)
(holiday-oriental-holidays, holiday-local-holidays)
(holiday-other-holidays, holiday-hebrew-holidays)
(holiday-christian-holidays, holiday-islamic-holidays)
(holiday-bahai-holidays, holiday-solar-holidays): Doc fixes.
2025-10-25 10:38:07 +03:00
Amin Bandali
500a2d0cc5 Recompute calendar-holidays when its components are set (bug#79629)
* lisp/calendar/holidays.el (holidays--set-calendar-holidays):
New function for recomputing the 'calendar-holidays' user option
for use as the :set function of the following user options,
using 'custom-reevaluate-setting' to avoid overwriting the
user's customization of 'calendar-holidays'.
(holiday-general-holidays, holiday-oriental-holidays)
(holiday-local-holidays, holiday-other-holidays)
(holiday-hebrew-holidays, holiday-christian-holidays)
(holiday-islamic-holidays, holiday-bahai-holidays)
(holiday-solar-holidays): Use 'holidays--set-calendar-holidays'
as the :set function to recompute 'calendar-holidays' as needed.
2025-10-25 10:32:10 +03:00
Sean Whitton
b5303715cc * lisp/vc/vc-git.el (vc-git-branches): Use 'git for-each-ref'. 2025-10-24 21:17:36 +01:00
Sean Whitton
d0bcbc7ada Make UPSTREAM-LOCATION argument to incoming-revision optional
Using an empty string to mean the location from which vc-update
would pull was inherited from the old incoming/outgoing
functions, but we have opportunity to simplify things for this
new one.

* lisp/vc/vc-bzr.el (vc-bzr-incoming-revision):
* lisp/vc/vc-git.el (vc-git-incoming-revision):
* lisp/vc/vc-hg.el (vc-hg-incoming-revision):
* lisp/vc/vc.el (vc-diff-incoming, vc-diff-outgoing)
(vc-diff-outgoing-base, vc--incoming-revision): Make
UPSTREAM-LOCATION parameter optional.  Use nil, rather than an
empty string, to mean the default.
2025-10-24 20:55:19 +01:00
Sean Whitton
68e07ef8b2 ; * lisp/custom.el (custom-initialize-after-file-load): Fix docs. 2025-10-24 20:53:25 +01:00
Mattias Engdegård
8ad494fc76 Fix peephole optimiser bug for symbolp
* lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode):
Don't sink 'symbolp' past 'unbind'; it's unsafe.
2025-10-24 17:33:03 +02:00
Mattias Engdegård
0ccc246465 Move some constants into the peephole optimiser
* lisp/emacs-lisp/byte-opt.el (byte-tagref-ops, byte-conditional-ops)
(byte-after-unbind-ops, byte-compile-side-effect-and-error-free-ops)
(byte-compile-side-effect-free-ops):
Move into the constant pool...
* lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode): ...here,
bringing comments up to date.
2025-10-24 16:34:49 +02:00
Yuan Fu
2ed5179179
Remove cached font-lock settings in java-ts-mode
After the changes made in bug#79363, we don't need the cache anymore.

* lisp/progmodes/java-ts-mode.el:
(java-ts-mode--font-lock-settings-cached): Remove variable.
(java-ts-mode--font-lock-settings): Remove use of the variable.
2025-10-23 23:41:31 -07:00
Yuan Fu
fa9d22d719
Fix field access fontification in java-ts-mode (bug#79625)
* lisp/progmodes/java-ts-mode.el (java-ts-mode--font-lock-settings):
Remove the field_access rule.
2025-10-23 23:35:32 -07:00
Yuan Fu
bb491ff804
Fix treesit-admin.el after recent treesit.el change
* admin/tree-sitter/treesit-admin.el:
(treesit-admin--verify-major-mode-queries):
(treesit-admin--validate-mode-lang):
(treesit-admin--mode-languages): Use
treesit-font-lock-setting-language.
2025-10-23 21:46:14 -07:00
João Távora
f47824106a Prevent shorthand inheritance when loading .elc files (bug#79485)
Loading .elc files doesn't go through 'load-with-code-conversion' as
usual, but since these files are still 'read', we must still take care
to bind read-symbol-shorthands to nil around that.  The process is
simpler than in 'load-with-code-conversion' because .elc files cannot
have read-symbol-shorthands cookies, so the binding is always to nil.
If we don't do this, the symbols in the .elc will be subject to
shorthand manipulation if there's an active binding in the recursive
load stack.

* src/lread.c (readevalloop): Bind read-symbol-shorthands to nil.
(syms_of_lread): Add Qread_symbol_shorthands.
2025-10-23 22:35:32 +01:00
João Távora
94a4bf8a39 Eglot: release version 1.19
* lisp/progmodes/eglot.el (Version): Bump to 1.19.
(Package-Requires): Require Flymake 1.4.2

* etc/EGLOT-NEWS: Announce new version.
2025-10-23 21:47:04 +01:00
João Távora
15ce665239 Flymake: bump package version to 1.4.2
* lisp/progmodes/flymake.el (Version): Bump to 1.4.2.
2025-10-23 21:46:57 +01:00
João Távora
1e7981fd86 Eglot: don't send JSONRPC params in 'shutdown' request (bug#79653)
See also bug#66144.
Github-reference: https://github.com/joaotavora/eglot/discussions/1540

* lisp/progmodes/eglot.el (eglot-shutdown): Pass :jsonrpc-omit
(Package-Requires): Require jsonrpc 1.0.26.

* etc/EGLOT-NEWS: Announce bugfix.
2025-10-23 21:46:22 +01:00
João Távora
74618070ab Jsonrpc: support requests and notifications without params (bug#79653)
See also bug#66144.
Github-reference: https://github.com/joaotavora/eglot/discussions/1540

* lisp/jsonrpc.el (jsonrpc-async-request): Fix docstring.
(jsonrpc--async-request-1): Handle :jsonrpc-omit
(jsonrpc-notify): Handle jsonrpc-omit.
(jsonrpc-request): Tweak doc.
(Version): Bump to 1.0.26.
2025-10-23 21:44:46 +01:00
Juri Linkov
ac78b945d5 * doc/lispref/display.texi (Display Margins): Remove obsolete remark.
Text and images in the margin were made mouse-sensitive long ago.
https://lists.gnu.org/archive/html/emacs-devel/2025-10/msg00596.html
2025-10-23 19:28:14 +03:00
Mattias Engdegård
c2b23a04c2 Sink calls to byte-compile-warning-enabled-p
* lisp/emacs-lisp/bytecomp.el (byte-compile--check-arity-bytecode)
(byte-compile-warn-about-unresolved-functions, byte-compile-form)
(byte-compile-free-vars-warn):
Delay checking whether a warning is enabled until we are about to emit
such a warning, since most warnings are enabled most of the time but
finding something to warn about is rare.
2025-10-23 17:53:10 +02:00
Martin Rudalics
a78bf76fb9 Revert recent additions of 'split-frame' and 'merge-frames'
* lisp/window-x.el (merge-frames, split-frame): Remove.
* doc/lispref/windows.texi (Changing Window Layouts): Remove
sections on 'split-frame' and 'merge-frames'.
* etc/NEWS: Remove announcement of 'split-frame' and
'merge-frames'.
2025-10-23 16:38:25 +02:00
Robert Pluim
a8c4f06a8e ; * etc/NEWS: Fix typo. 2025-10-23 11:44:31 +02:00
Robert Pluim
1cbc6c2f17 ; * etc/NEWS: Grammar fix. 2025-10-23 11:40:00 +02:00
Martin Rudalics
3b8cec55c4 Document and announce 'split-frame' and 'merge-frames'
* lisp/window-x.el (merge-frames): Rewrite doc-string.  Error out
when FRAME1 and FRAME2 are not distinct frames.
(split-frame): Rewrite doc-string.  Use 'user-error' instead of
'error'.
* doc/lispref/windows.texi (Changing Window Layouts): Document
'split-frame' and 'merge-frames'.
* etc/NEWS: Announce 'split-frame' and 'merge-frames'.
2025-10-23 11:14:03 +02:00
Pranshu Sharma
db6ac3c5f4 New commands to split and merge frames
* lisp/window-x.el (merge-frames, split-frame): New commands.
2025-10-23 10:04:39 +02:00
Eli Zaretskii
8fc068a15d ; Fix a recent documentation change
* doc/lispref/customize.texi (Variable Definitions): Restore
description of 'custom-initialize-delay'.  Fix indexing.
2025-10-23 07:46:12 +03:00
Stephen Gildea
953d1db6ba time-stamp-format-* tests: reduce repetitiveness
* test/lisp/time-stamp-tests.el (time-stamp-test): New macro.
Use it to coalesce the repetitive lines of the various
time-stamp-format-* tests, reducing the line count of the
time-stamp-string formatting tests by 30%.
2025-10-22 21:18:38 -07:00
F. Jason Park
7aef4db23d ; Prefer EMACS_EMBA_CI for selecting ERC tests
* test/lisp/erc/erc-scenarios-keep-place-indicator.el
(erc-scenarios-keep-place-indicator--follow):
* test/lisp/erc/erc-stamp-tests.el (erc-echo-timestamp):
* test/lisp/erc/erc-tests.el (erc--channel-modes): Use "EMACS_EMBA_CI"
for EMBA-specific test selection instead of "CI", which is a Gitlab
"predefined" variable absent from .job-template's Docker subprocess.
2025-10-22 19:20:27 -07:00
Stefan Monnier
c2127c541e lisp/comint.el (comint--mark-yanked-as-output): Use letrec 2025-10-22 17:58:16 -04:00
Stefan Monnier
287fb2fbad (custom-initialize-after-file): New function
Some global minor modes require initialization.  Those that are preloaded
currently abuse `custom-initialize-delay` for that, but it's suboptimal
and doesn't help those that aren't preloaded.
So introduce a new function to fill that need.
While at it, make `define-globalized-minor-mode` use it
automatically when useful.

* lisp/custom.el (custom-initialize-after-file-load): New function.
* lisp/tooltip.el (tooltip-mode):
* lisp/paren.el (show-paren-mode):
* lisp/rfn-eshadow.el (file-name-shadow-mode):
* lisp/epa-hook.el (auto-encryption-mode):
* lisp/minibuffer.el (minibuffer-regexp-mode, minibuffer-nonselected-mode):
* lisp/electric.el (electric-indent-mode): Use it instead of
`custom-initialize-delay` since the value does not depend on the
runtime context.
(electric-quote-mode): Don't use `custom-initialize-delay` since
the default value is nil anyway.

* lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
Automatically add `:initialize` if needed.
* lisp/emacs-lisp/eldoc.el (global-eldoc-mode): Remove `:initialize`,
now provided automatically.

* doc/lispref/customize.texi (Variable Definitions):
* doc/lispref/modes.texi (Defining Minor Modes): Document and Suggest
`custom-initialize-after-file-load` instead of `custom-initialize-delay`.
2025-10-22 17:12:10 -04:00
Eli Zaretskii
100963b492 ; * src/frame.c (frame_get): Fix a thinko. 2025-10-22 19:03:53 +03:00
Alan Mackenzie
1a75481932 Allow renaming of frames to F<num> on text terminals
This fixes bug#79649.  Creating duplicate names F<num> is
prevented, ensuring that select-frame-by-name is still
effective on text terminals.

* src/frame.c (frame_get, frame_next_F_name): New functions.
(make_terminal_frame): Use frame_next_F_name.
(set_term_frame_name): In place of disallowing F<num>, check
that the requested F<num> doesn't already exist.

* etc/NEWS (Frames): Add an entry for this amendment.
2025-10-22 12:44:34 +00:00
Mattias Engdegård
6a3d22f3a0 ; * src/lisp.h (struct Lisp_String): mention terminating NUL 2025-10-22 09:03:38 +02:00
Elías Gabriel Pérez
ef58006fee ; * lisp/progmodes/hideshow.el: More fixes for recent changes.
(hs-discard-overlays, hs-show-block): Fix the case when
`hs-allow-nesting` is enabled (bug#79616).
2025-10-22 09:42:29 +03:00
F. Jason Park
1b5fef63b4 Release ERC 5.6.1
* lisp/erc/erc.el: Change "Version" header from 5.6.1-git to 5.6.1.  A
`customize-package-emacs-version-alist' mapping to Emacs 31.1 was
already added at some point during the course of development for this
release.  The ERCVER variable in doc/misc/erc.texi was updated when
moving to the "-git" suffixed version.
(erc-version): Change version from 5.6.1-git to 5.6.1.
2025-10-21 18:21:46 -07:00
F. Jason Park
61f4d97a0b ; Remove unwanted noise from ERC test output
Omit newlines and other stray chars, such as "^G", from log output when
running tests for ERC non-interactively.

* test/lisp/erc/erc-match-tests.el (erc-add-entry-to-list, erc-pals)
(erc-fools, erc-keywords, erc-dangerous-hosts): Make `inhibit-message'
non-nil when `noninteractive'.
* test/lisp/erc/erc-sasl-tests.el (erc-sasl--read-password--basic): Make
`inhibit-message' non-nil when `noninteractive'.
* test/lisp/erc/erc-scenarios-base-buffer-display.el
(erc-scenarios-base-buffer-display--interactive-default): Make
`inhibit-message' non-nil when `noninteractive'.
* test/lisp/erc/erc-scenarios-services-misc.el
(erc-scenarios-services-prompt): Make `inhibit-message' non-nil when
`noninteractive'.
* test/lisp/erc/erc-services-tests.el (erc-nickserv-get-password): Make
`inhibit-message' non-nil when `noninteractive'.
* test/lisp/erc/erc-stamp-tests.el (erc-timestamp-intangible--left):
Make `inhibit-message' non-nil when `noninteractive'.
* test/lisp/erc/erc-tests.el (erc-cmd-UNIGNORE, erc-hide-prompt)
(erc--check-prompt-input-for-excess-lines, erc-select-read-args, erc-tls)
(erc--interactive, erc-server-select): Make `inhibit-message' non-nil
when `noninteractive'.
(erc--modify-local-map): Inhibit call to `ding' because it inserts an 07
char, which shows up in the test result logs.
2025-10-21 18:21:46 -07:00
Stephen Berman
9a56cf9194 Improve Dired handling of file names with newlines (bug#79528)
* doc/emacs/dired.texi (Dired Enter): Update documentation of
Dired's display and handling of file names that contain newlines.
Document new user option 'dired-auto-toggle-b-switch'.

* etc/NEWS: Announce new warning and new user option.

* lisp/dired.el (dired-auto-toggle-b-switch): New user option.
(dired-internal-noselect): Pop up a warning if the Dired listing
displays a literal newline.
(dired-switches-escape-p): Take the 'ls' switch
'--quoting-style=escape' into account.
(dired-mode): Add 'dired--toggle-b-switch' to 'post-command-hook'.
(dired-move-to-end-of-filename): When the Dired listing includes a
file name containing a newline, this can result in no change in
the 'dired-filename' text property on the last file name, so in
this case take the position just before the final newline as the
end of the last file name to prevent a wrong-type-argument error.
(dired--filename-with-newline-p, dired--remove-b-switch)
(dired--toggle-b-switch, dired--set-auto-toggle-b-switch)
(dired--display-filename-with-newline-warning): New functions.
2025-10-22 00:06:03 +02:00
Stefan Monnier
38c32ed3ea (easy-mmode--less-selective-first): Enable test
*  test/lisp/emacs-lisp/easy-mmode-tests.el
(easy-mmode--less-selective-first): Enable test since it now succeeds.
2025-10-21 15:37:38 -04:00
Stefan Monnier
698a584e92 (define-globalized-minor-mode): Remove MODE-mode-name hack (bug#79624)
Stop trying to detect when a globalized mode enabled its
minor mode "too early".  This reverts the core of commit 876daebc85
since the problem it tried to circumvent has been made almost impossible
by commit 17e26cf57e.

* lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
Remove the `MODE-mode-name` variable, don't remember in which major
mode we enabled the minor mode, and don't disable the minor mode
before (re)enabling it.
2025-10-21 15:35:36 -04:00
Eshel Yaron
9f35d1653f
; elisp-scope.el: Fix error during widget args analysis
* lisp/emacs-lisp/elisp-scope.el (elisp-scope--match-spec-to-arg):
Simplify and fix handling of empty list.

* test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el:
Add test.
2025-10-21 16:18:24 +02:00
Eshel Yaron
93dcc342a5
; Simplify symbol role ':help' functions.
* lisp/progmodes/elisp-mode.el
(elisp--annotate-symbol-with-help-echo): Take SYM argument
instead of DEF.  Apply ':help' function partially with SYM
instead of calling it.

* lisp/emacs-lisp/elisp-scope.el: Adapt ':help' functions.
2025-10-21 16:18:23 +02:00
Eshel Yaron
bb54174c21
; Fix semantic highlighting in presence of shorthands
So far, 'scope-elisp-analyze-form' would disable
'read-symbol-shorthands' while reading a source form in
order to obtain the "original" length of symbols and pass
that length to the callback called for each analyzed symbol.
However, 'scope-elisp-analyze-form' could report an
incorrect length when a symbol was written with redundant
escaping (e.g. 'f\oo').  Moreover, disabling
'read-symbol-shorthands' breaks macro-expansion during
analysis, because macros may expect "expanded" symbols,
without shorthands.

In this commit we address these issues by leaving
'scope-elisp-analyze-form' enabled (so we get expended
symbols for macro-expansion) and recovering the original
length lazily in the callback, if needed, by going to the
beginning of the symbol and searching forward for its end.

* lisp/emacs-lisp/elisp-scope.el (elisp-scope--report):
Replace LEN argument with SYM, the analyzed symbol itself.
Adapt all callers.
(elisp-scope-analyze-form): Cease let-binding
'read-symbol-shorthands' to nil while reading.  Wrap
analysis in 'save-excursion' when reading from current
buffer.  Update docstring.
* lisp/progmodes/elisp-mode.el (elisp-local-references)
(elisp-fontify-symbol): Obtain symbol length from buffer.

* test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el:
Add test that incorporates 'read-symbol-shorthands'.
* test/lisp/progmodes/elisp-mode-tests.el (elisp-test-font-lock):
Set up 'read-symbol-shorthands' in test file.
2025-10-21 16:12:11 +02:00
Mattias Engdegård
bcc88bc5c2 Use 'any' and 'all' to simplify parts of the byte-compiler
* lisp/emacs-lisp/byte-opt.el (byte-opt--nary-comparison)
(byte-optimize-constant-args, byte-optimize-member)
(byte-optimize-append):
* lisp/emacs-lisp/bytecomp.el (byte-compile-warnings)
(byte-compile-out-toplevel):
* lisp/emacs-lisp/cconv.el (cconv-convert):
Replace various hand-written 'any' and 'all' expressions with
calls to the new functions, for readability and speed.
2025-10-21 13:20:04 +02:00
Mattias Engdegård
4a39e46d9c * lisp/emacs-lisp/shortdoc.el: Add take-while, drop-while, any, all. 2025-10-21 13:19:08 +02:00
Mattias Engdegård
eed2fce541 Disable one tab-bar-test case on macOS
The test works when run interactively and in batch mode started from
a terminal, but not from M-x compile.

* test/lisp/tab-bar-tests.el (tab-bar-tests-quit-restore-window):
Disable on macOS when TERM=dumb.
2025-10-21 13:19:07 +02:00
Yuan Fu
11915c6acb
; Fix previous tree-sitter commit
* lisp/treesit.el (treesit-font-lock-rules): Use lang instead of
current-language, lang = (or cunrrent-language default-language).
2025-10-21 00:01:59 -07:00
Elías Gabriel Pérez
1c8fc379b8 hideshow: Define new keymap for all the commands.
bug#79569

* lisp/progmodes/hideshow.el (hs-prefix-map): New keymap.
(hs-minor-mode-map): Use the new keymap.
2025-10-21 09:37:37 +03:00
Elías Gabriel Pérez
c513224fa3 hideshow: Update the indicators properly after showing/hiding
bug#79616

* lisp/progmodes/hideshow.el (hs-discard-overlays)
(hs-make-overlay, hs-show-block): Rework
'hs--refresh-indicators' calls.
(hs--refresh-indicators): Rework code, add new function
arguments.
(hs-minor-mode): Properly remove the indicators after turning
off the mode.
2025-10-21 09:33:16 +03:00
Yuan Fu
80a17f7a30
Cache compiled tree-sitter queries (bug#79363)
This way major modes can compute font-lock settings and
indentation rules dynamically when the major mode is enabled.
We don't want to compute it at package load time because the
grammar might not be installed at that point.  (Grammar might
be (semi)auto-installed when the major mode is enabled.)

This commit adds treesit--query-cache and changes
treesit-font-lock-rules to not compile the query.  Instead, the
queries are compiled in
treesit-validate-and-compile-font-lock-rules.

Go-ts-mode is modified to use this new framework.

* lisp/progmodes/go-ts-mode.el (go-ts-mode--iota-query-supported-p):
(go-ts-mode--method-elem-supported-p):
(go-ts-mode--font-lock-settings-cached): Removed.
(go-ts-mode--font-lock-settings): Simply return the result of
treesit-font-lock-rules rather than saving to
go-ts-mode--font-lock-settings-cached.  Use
treesit-query-with-optional for computed queries.
* lisp/treesit.el (treesit--query-cache): New variable.
(treesit-font-lock-settings): Add new field language.
(treesit-font-lock-setting-language): New function.
(treesit-query-with-optional): New function.
(treesit-font-lock-recompute-features): Don't compile query and
store language (because we can't derive from compiled query anymore).
(treesit-replace-font-lock-feature-settings): Use the new
language field.
(treesit-validate-and-compile-font-lock-rules): Renamed from
treesit-validate-font-lock-rules, add logic to compile queries.
(treesit-major-mode-setup): Use treesit-validate-and-compile-font-lock-rules.
2025-10-20 22:12:35 -07:00