1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-18 00:50:44 -08:00
Commit graph

178877 commits

Author SHA1 Message Date
Drew Adams
1abc54ffe1 Allow duplicate menu entries in Imenu
* lisp/imenu.el (imenu-allow-duplicate-menu-items): New user
option.
(imenu--create-keymap): Allow duplicate imenu items if
'imenu-allow-duplicate-menu-items' is non-nil.

* etc/NEWS: Announce the change.
(Bug#78935)
2025-07-13 08:41:38 +03:00
Stephen Berman
d63746d519 ; Fix spurious email address in ChangeLog
* ChangeLog.3: Replace spurious email address.
2025-07-12 17:11:28 +02:00
Sean Whitton
423c6a4dc0 ; Delete unnecessary global autoload from last change. 2025-07-12 14:07:58 +01:00
Stephen Berman
b406c44c82 dired-vc-deduce-fileset: Call vc-backend-for-registration
* lisp/vc/vc.el (vc-backend-for-registration):
* lisp/dired-aux.el (vc-backend-for-registration): Autoload.
(dired-vc-deduce-fileset): Call vc-backend-for-registration when
vc-responsible-backend returns nil (bug#78987).
2025-07-12 11:34:31 +01:00
Pip Cet
fce86c7e95 Avoid crashes when profiling multi-threaded Lisp (bug#76970)
* src/eval.c (backtrace_p): Check 'current_thread' before
dereferencing it.
2025-07-12 10:24:11 +00:00
Eli Zaretskii
c6c64d6da3 Merge from origin/emacs-30
6dd8266bc4 ; * doc/emacs/custom.texi (Init File): Mention "M-x custo...
723cb4da47 ; Fix indexing in Emacs user manual
2025-07-12 05:25:03 -04:00
Eli Zaretskii
d7c2cd63ce ; Merge from origin/emacs-30
The following commit was skipped:

05ecb2b8f0 Nativecomp don't error with undeclared types (bug#6573) (...
2025-07-12 05:25:03 -04:00
Eli Zaretskii
4bff1dfe1f Merge from origin/emacs-30
ebb65d4163 ; Fix typos
2025-07-12 05:25:02 -04:00
Eli Zaretskii
6729e314c2 ; Merge from origin/emacs-30
The following commit was skipped:

b4b7ddb603 Fix 'kill-ring-deindent-mode'
2025-07-12 05:25:02 -04:00
Eli Zaretskii
6dd8266bc4 ; * doc/emacs/custom.texi (Init File): Mention "M-x customize". 2025-07-12 12:01:05 +03:00
Liu Hui
e0270c563a Add option 'ffap-prefer-remote-file' (bug#78925)
This option only affects absolute filenames that are found by
ffap-file-at-point in buffers with remote default directory.

The handling of relative filenames in above buffers remains
unchanged: ffap-file-at-point returns the relative filename,
which can be converted to a remote absolute filename by
subsequent callers (e.g. ffap) using expand-file-name.

* lisp/ffap.el (ffap-prefer-remote-file): New user option.
(ffap-file-exists-string): Add an optional argument to allow the
check of existence of absolute filename on the remote host.
(ffap-file-at-point): Always find remote files in remote context
if the new option is non-nil.
* test/lisp/ffap-tests.el (ffap-test-remote): Add a test.
* etc/NEWS: Announce the change.
2025-07-12 11:48:52 +03:00
Eli Zaretskii
c6ce81c15d Revert "Add option 'ffap-prefer-remote-file' (bug#78925)"
This reverts commit ae46edff68.
I mistakenly installed the wrong version of the patch for
bug#78925.
2025-07-12 11:48:03 +03:00
Liu Hui
ae46edff68 Add option 'ffap-prefer-remote-file' (bug#78925)
This option only affects absolute filenames that are found by
ffap-file-at-point in buffers with remote default directory.

The handling of relative filenames in above buffers remains
unchanged: ffap-file-at-point returns the relative filename,
which can be converted to a remote absolute filename by
subsequent callers (e.g. ffap) using expand-file-name.

* lisp/ffap.el (ffap-prefer-remote-file): New user option.
(ffap-file-exists-string): Add an optional argument to allow the
check of existence of absolute filename on the remote host.
(ffap-file-at-point): Always find remote files in remote context
if the new option is non-nil.
* test/lisp/ffap-tests.el (ffap-test-remote): Add a test.
* etc/NEWS: Announce the change.
2025-07-12 11:38:27 +03:00
Elías Gabriel Pérez
f746762e74 New command 'mode-line-invisible-mode'
This new command allows hide the mode line in the current
buffer.  (Bug#78881)

* doc/emacs/display.texi (Optional Mode Line): Document feature.
* etc/NEWS: Announce changes.
* lisp/simple.el (mode-line-invisible--buf-state): New buffer
local variable.
(mode-line-invisible-mode): New minor mode.
2025-07-12 10:50:22 +03:00
Eli Zaretskii
a8b0f5adfa ; Fix documentation of last change (bug#78844)
* doc/lispref/elisp.texi (Top):
* doc/lispref/package.texi (Packaging): Fix menus.
(Package Information): Fix wording, indexing and markup.
2025-07-12 10:11:09 +03:00
Xiyue Deng
5c75ec6ae5 Add public interfaces for accessing builtin package info (Bug#78844)
* lisp/emacs-lisp/package.el (package-builtin-packages)
(package-builtin-package-version): New functions.
* doc/lispref/package.texi: Add a section 'Package Information' with
documentation for the new functions.
* etc/NEWS: Add entry for 'package-versioned-builtin-packages' and
'package-builtin-package-version'.
2025-07-12 10:03:50 +03:00
Mattias Engdegård
52b96d3a7e * src/fns.c (Flength): Fix char table length off-by-one bug. 2025-07-11 16:36:27 +02:00
Sean Whitton
8ff6e7fe58 ; vc-git-find-revision: Fix last change to this function. 2025-07-11 11:08:10 +01:00
Sean Whitton
10024cc065 VC: Fix displaying the async command buffer during async checkins
* lisp/vc/vc-dispatcher.el (vc--display-async-command-buffer):
New function, factored out of vc-do-async-command.
(vc-do-async-command): Use it.
(vc-finish-logentry): Bind vc--inhibit-async-window when running
the log operation, then call vc--display-async-command-buffer
again ourselves after performing other window changes.
2025-07-11 09:58:20 +01:00
Sean Whitton
5d048521e2 Apply vc-use-incoming-outgoing-prefixes to vc-dir-mode-map too
* lisp/vc/vc-dir.el (vc-use-incoming-outgoing-prefixes):
* lisp/vc/vc-hooks.el: Apply vc-use-incoming-outgoing-prefixes
to the corresponding bindings in vc-dir-mode-map, too.
2025-07-11 09:30:19 +01:00
Sean Whitton
0814a93a04 ; Improve manual docs for incoming and outgoing diff commands 2025-07-11 09:29:12 +01:00
Sean Whitton
191109e25e vc-git-find-revision: Pass --filters to git-cat-file
* lisp/vc/vc-git.el (vc-git-find-revision): Pass --filters to
git-cat-file.  Problem reported and fix suggested by Oscar
Fuentes <ofv@wanadoo.es>.
2025-07-11 09:13:47 +01:00
Eli Zaretskii
723cb4da47 ; Fix indexing in Emacs user manual
* doc/emacs/frames.texi (Creating Frames):
* doc/emacs/windows.texi (Pop Up Window): Fix indexing and
wording.  (Bug#78945)
2025-07-11 09:24:50 +03:00
Alan Third
2e3ee3e448 Update documentation and NEWS with SVG changes (bug#77841)
* doc/lispref/display.texi (SVG Images):
* etc/NEWS: Document changes to SVG foreground color handling.
2025-07-10 17:54:33 +01:00
Alan Third
9f5d17cd72 Move CSS into the SVG wrapper
This allows CSS to be used with librsvg < 2.48.

* src/image.c (svg_load_image): Move CSS construction and include
"color".  Also append the CSS passed in by the user rather than
replacing it.
2025-07-10 17:54:33 +01:00
Alan Third
8b200c0419 Use css to set SVG foreground in docview
* lisp/doc-view.el (doc-view-insert-image): Use CSS to set the fill
attribute to the desired foreground color.
2025-07-10 17:54:33 +01:00
Alan Third
4d145d08da Change foreground color handling for SVG files (bug#77841)
* etc/images/checkbox-mixed.svg:
* etc/images/checked.svg:
* etc/images/conceal.svg:
* etc/images/down.svg:
* etc/images/gnus/gnus-pointer.svg:
* etc/images/left.svg:
* etc/images/outline-close.svg:
* etc/images/outline-open.svg:
* etc/images/radio-checked.svg:
* etc/images/radio-mixed.svg:
* etc/images/radio.svg:
* etc/images/reveal.svg:
* etc/images/right.svg:
* etc/images/symbols/check-mark_16.svg:
* etc/images/symbols/chevron_down_16.svg:
* etc/images/symbols/chevron_left_16.svg:
* etc/images/symbols/chevron_right_16.svg:
* etc/images/symbols/chevron_up_16.svg:
* etc/images/symbols/cross_16.svg:
* etc/images/symbols/cross_circle_16.svg:
* etc/images/symbols/cross_circle_fill_16.svg:
* etc/images/symbols/dot_large_16.svg:
* etc/images/symbols/dot_medium_16.svg:
* etc/images/symbols/dot_small_16.svg:
* etc/images/symbols/heart_16.svg:
* etc/images/symbols/heart_fill_16.svg:
* etc/images/symbols/heart_half_16.svg:
* etc/images/symbols/menu_16.svg:
* etc/images/symbols/minus_16.svg:
* etc/images/symbols/minus_circle_16.svg:
* etc/images/symbols/minus_circle_fill_16.svg:
* etc/images/symbols/plus_16.svg:
* etc/images/symbols/plus_circle_16.svg:
* etc/images/symbols/plus_circle_fill_16.svg:
* etc/images/symbols/star_16.svg:
* etc/images/symbols/star_fill_16.svg:
* etc/images/symbols/star_half_16.svg:
* etc/images/unchecked.svg:
* etc/images/up.svg: Set 'fill' color to 'currentcolor'.
* etc/images/symbols/README: Add explanation of change to instructions.
* src/image.c: Remove setting of the 'fill' color in the default SVG
stylesheet.
2025-07-10 17:54:33 +01:00
Michael Albinus
6d0812e57a Fix browse-url-tests-delete-temp-file
* test/lisp/net/browse-url-tests.el (browse-url-tests-delete-temp-file):
Fix test.
2025-07-10 18:44:52 +02:00
Michael Albinus
9f82300bb0 Fix handling of `browse-url-temp-file-name'
* lisp/net/browse-url.el (browse-url--temp-file-setup):
Add `browse-url-delete-temp-file' to `write-file-functions'.
(browse-url-of-file, browse-url-delete-temp-file): Fix handling of
`browse-url-temp-file-name'.  (Bug#78830)
2025-07-10 17:25:56 +02:00
Michael Albinus
18ff84df0c * admin/notes/jargon: Add TIL. 2025-07-10 17:25:11 +02:00
Eli Zaretskii
b51b01f682 ; * src/fileio.c: Remove version from commentary (bug#78983). 2025-07-10 16:08:29 +03:00
Mattias Engdegård
b83f2d16fb Unintern Qget_file_char and Qget_emacs_mule_file_char
These symbols are used in the reader as special constants and can't be
passed from Lisp (Emacs would crash).

* src/lread.c (syms_of_lread): Unintern.
(init_source): Use BASE_EQ.
2025-07-10 13:45:50 +02:00
Mattias Engdegård
cd3727f7e0 Speed up low-level parts of the reader and refactor
Inspect the given 'readcharfun' source once, before using it, instead of
for each character read.  This moves a bunch of branches away from the
critical path, with separate functions for different source types.
Replace some preprocessor macros with functions.

* src/lread.c (READCHAR, UNREAD, READCHAR_REPORT_MULTIBYTE)
(FROM_FILE_P): Remove; use corresponding functions instead.
All callers adapted.
(source_t): New struct that takes the place of the `readcharfun` and
`readbyte` arguments in many places.
(init_source)
(source_buffer_get, source_buffer_unget)
(source_marker_get, source_marker_unget)
(source_string_get, source_string_unget)
(source_file_get, source_file_unget)
(source_function_get, source_function_unget)
(from_file_p, unreadbyte_from_file):
New.
(readbyte_from_stdio): Replace `readbyte_from_file`.
(readchar, unreadchar): Rewrite.
(lisp_file_lexical_cookie, readevalloop, read_internal_start):
Create a source_t for use during reading.  All signatures and functions
called adapted.
(read_char_escape): Remove check for an error that can no longer occur.
2025-07-10 10:24:58 +02:00
Juri Linkov
99080d0c04 Cache only the last string in 'tab-bar-format-align-right' (bug#78953)
* lisp/tab-bar.el (tab-bar--align-right-cache):
Rename from 'tab-bar--align-right-hash'.
(tab-bar-format-align-right): Use it to store
the string in the car, and the width in the cdr.
2025-07-10 09:40:51 +03:00
Yuan Fu
b85d9048f4
Eldoc: Run eldoc-display-functions with original buffer (bug#78530)
Also bump eldoc version so Eglot can require the new version
later.

* lisp/emacs-lisp/eldoc.el (eldoc--invoke-strategy): Run the
hook with the original buffer as the current buffer. This way
we're certain that the buffer-local value of
'eldoc-display-functions' is used.
(eldoc-display-functions): Update docstring.
2025-07-09 19:28:45 -07:00
Mattias Engdegård
f605e6ede3 ; * src/lread.c (read_internal_start): Simplify.
This removes code that became dead in the non-recursive reader reform.
2025-07-09 19:23:47 +02:00
Eli Zaretskii
1a6e7280e2 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2025-07-09 19:13:56 +03:00
Andrea Corallo
48a5917681 Nativecomp don't materialize non-materializable objects (bug#78606)
The native compiler should not try to generate in rendered code
immediate floats produced by the constrain on the '=' operator.

* test/src/comp-tests.el (comp-test-78606-1): Add test.
* test/src/comp-resources/comp-test-funcs.el (comp-test-78606-1-f): New
function.
* src/comp.c (emit_mvar_rval): Check if an immediate is materializable.
* lisp/emacs-lisp/comp.el (comp-ctxt): Add 'non-materializable-objs-h'
slot.
(comp--fwprop-insn): Update call.
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-=): Add parameter.
2025-07-09 17:32:07 +02:00
Pip Cet
6a5d9cb07d Call eieio--class-* accessors only on eieio classes (bug#78786)
* lisp/emacs-lisp/eieio-core.el (eieio-oref, eieio-oref-default):
(eieio-oset, eieio-oset-default): Don't look for class slots except in
eieio classes.
* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
(eieio-test-defstruct-slot-value): New test.
2025-07-09 15:20:14 +00:00
Pip Cet
a76506f131 Fix crashes when "emacsclient -nw" frames are suspended (bug#78980)
* src/frame.c (frame_redisplay_p): Start loop with 'f', not its parent
frame.  Simplify return expression.
2025-07-09 14:09:53 +00:00
Eli Zaretskii
115a4fd940 ; * doc/lispref/parsing.texi (Using Parser): Fix wording. 2025-07-09 15:43:00 +03:00
Sean Whitton
8497cfeaea ; * lisp/treesit.el (treesit-parser-changed-regions): Declare. 2025-07-09 11:46:50 +01:00
Sean Whitton
b03f11d9ac print_error_message: Handle user-error to the echo area specially
* src/print.c (print_error_message): For a user-error that is to
be printed to the echo area, use message3 in order to preserve
fontification.
2025-07-09 11:45:13 +01:00
Sean Whitton
72eb20f93f * lisp/vc/vc.el (vc-find-revision-no-save): Call read-only-mode. 2025-07-09 11:43:49 +01:00
Stephen Berman
8b86978895 Amend last change to 'kill-this-buffer'
* lisp/menu-bar.el (kill-this-buffer): Take using window tool bar
into account (bug#78809).
2025-07-09 10:59:13 +02:00
Andrea Corallo
05ecb2b8f0 Nativecomp don't error with undeclared types (bug#6573) (don't merge)
Backporting f38e969e47 from trunk to emacs-30

* test/src/comp-resources/comp-test-funcs.el (comp-test-76573-1-f): New
function.
* lisp/emacs-lisp/comp-cstr.el (comp-supertypes): Don't error if 'type'
is unknown.
2025-07-09 10:31:20 +02:00
Martin Rudalics
2fc402cb0b Handle invalid frame_or_window slots in tty input events (Bug#78966)
* src/frame.c (make_terminal_frame): Initialize terminal's
top_frame slot if it has not been set up yet (Bug#78966).
* src/keyboard.c (kbd_buffer_get_event): Do not assume that the
event's frame_or_window slot always produces a valid frame
(Bug#78966).
(tty_read_avail_input): Try to make sure that the input event we
create has a valid frame_or_window slot (Bug#78966).  Add assertion
to that purpose.
2025-07-09 09:52:01 +02:00
Juri Linkov
280d6f70a3 Handle multiple mouse events in display-buffer-override-next-command
* lisp/window.el (display-buffer-override-next-command):
Use 'mouse-event-p' to wait for more following mouse events.

* lisp/frame.el (other-frame-prefix):
* lisp/tab-bar.el (other-tab-prefix):
* lisp/windmove.el (windmove-display-in-direction):
* lisp/window.el (other-window-prefix, same-window-prefix):
Update the docstring to explain the behavior in regard
to multiple consecutive mouse events (bug#78945).
2025-07-09 09:48:17 +03:00
Yuan Fu
159ddd27ee
Ditch the async range update in tree-sitter (bug#78402)
Right now in treesit-outline-search -> treesit-navigate-thing, a
freshly created tree-sitter node becomes outdated within the
function.  I'm not sure _exactly_ how it happend, but it might
look like this: we first get a node from, say, html parser, then
get another node from, say, liquid parser.  Creating the node
from liquid parser causes a reparse which updated the range of
the html parser, which rendered the html node outdated.

There're several problems with the current design, let's start
with the most obvious one: we add
treesit--font-lock-mark-ranges-to-fontify as a notifier of the
primar parser in treesit-major-mode-setup.  Now, if a ts major
mode inherits another major mode, treesit-major-mode-setup will
be called twice, once in the parent mode and once in the child
node, and two parsers will have the notifier.  But
treesit--font-lock-mark-ranges-to-fontify is designed to run
only once.

I believe this bug, together with some mysterious async
execution order, led to the problems we saw in the bug report.
My solution is to just make everything synchronous.

So I added treesit-parser-changed-regions, and modified
treesit--font-lock-mark-ranges-to-fontify to use it.  Now we
don't need to add the notifier to the primary parser anymore.

I also applied the tree-sitter-outline change we discussed in
the bug report.  (Change to treesit-outline-search, and remove
treesit--after-change.)

* lisp/treesit.el:
(treesit--font-lock-mark-ranges-to-fontify): Remove the unused
PARSER arg.
(treesit--pre-redisplay): Make use of
treesit-parser-changed-regions.
(treesit-outline-search): Call treesit--pre-redisplay in the
beginning.
(treesit--after-change): Remove function.
(treesit-major-mode-setup): Don't add notifier to primary parser.
2025-07-08 23:39:39 -07:00
Yuan Fu
564b947745
Add a synchronous way to get parser change ranges (bug#78402)
This commit only adds the new function, the fix for the bug is
in the next commit.

* doc/lispref/parsing.texi (Using Parser): Add docs.
* lisp/treesit.el (treesit): Add shortdoc.
* src/treesit.c (treesit_get_affected_ranges): New function
extracted from treesit_call_after_change_functions.
(treesit_call_after_change_functions): Extract out.
(treesit_ensure_parsed): Return affected regions.
(Ftreesit_parser_changed_regions): New function that returns the
affected regions.
2025-07-08 23:39:36 -07:00