Commit graph

13466 commits

Author SHA1 Message Date
Eli Zaretskii
869ad24216 ; Improve documentation of Edebug
* doc/lispref/edebug.texi (Edebug, Using Edebug, Instrumenting)
(Source Breakpoints, Specification List): Improve indexing and
tell how to end debugging.
2026-02-14 14:51:41 +02:00
Eli Zaretskii
ed9d341026 Say in Emacs Lisp Intro how to contribute code to Emacs
* doc/lispintro/emacs-lisp-intro.texi (Permanent Installation):
Add a cross-reference to "Contributing" in the Emacs user manual.
Suggested by Matto Fransen <matto@matto.nl>.  (Bug#80393)
2026-02-14 13:05:56 +02:00
Eli Zaretskii
6aefaca819 Adjust documentation to changes in 'overlays-in' and 'overlays-at'
* src/buffer.c (overlays_in): Fix commentary to match the code.
(Foverlays_in, Foverlays_at): Doc fixes.  (Bug#80242)

* test/src/buffer-tests.el (test-overlays-at-2): Add one test.

* doc/lispref/display.texi (Finding Overlays): Update and improve
the documentation of 'overlays-in' and 'overlays-at'.

* etc/NEWS: Announce the changes.
2026-02-14 11:37:52 +02:00
Dmitry Gutov
a937396e76 vc-log-show-limit: Change default to 500, and the button to 4X
* lisp/vc/vc.el (vc-log-show-limit):
Change the default to 500 (bug#80037).
(vc-print-log-setup-buttons): Have the first button prompt and
propose 4X the current limit as the default.
(vc-print-fileset-branch-log):
Update the reference to the changed button text.

* lisp/vc/log-view.el (log-view-end-of-defun-1): Same.

* doc/emacs/maintaining.texi (VC Change Log): Also here.
2026-02-14 02:52:52 +02:00
Eli Zaretskii
48525f500e ; Improve documentation of 'package-autosuggest-mode'
* lisp/emacs-lisp/package.el (package--autosuggest-install-and-enable)
(package--autosugest-prompt, package-autosuggest): Doc fixes.
* lisp/emacs-lisp/package-activate.el (package-autosuggest-style)
(package-autosuggest-once, package-autosuggest-mode)
(package--suggestion-applies-p)
(package--autosuggest-find-candidates)
(package--autosugest-line-format)
(package--autosuggest-after-change-mode): Fix doc strings and add
:version tags.

* etc/NEWS (bindings):
* doc/emacs/package.texi (Package Installation): Improve wording,
markup and indexing.
2026-02-13 09:39:02 +02:00
Philip Kaludercic
1e6d4f827c
Merge branch 'feature/package-autosuggest' 2026-02-12 23:08:42 +01:00
Michael Albinus
e0e0e95f5b Tramp signals 'remote-file-error' consequently
* doc/misc/tramp.texi (External packages): Mention also special events.
Emphasise, that Tramp raises remote-file-error.

* etc/NEWS: Tramp signals 'remote-file-error' consequently.
Presentational fixes and improvements.

* lisp/net/tramp.el (tramp-skeleton-process-file)
(tramp-handle-make-symbolic-link, tramp-process-actions)
(tramp-wait-for-regexp, tramp-send-string):
* lisp/net/tramp-adb.el (tramp-adb-get-device)
(tramp-adb-send-command-and-check, tramp-adb-barf-unless-okay)
(tramp-adb-wait-for-output, tramp-adb-maybe-open-connection):
* lisp/net/tramp-archive.el (tramp-archive-handle-not-implemented):
* lisp/net/tramp-crypt.el (tramp-crypt-do-encrypt-or-decrypt-file-name)
(tramp-crypt-do-encrypt-or-decrypt-file):
* lisp/net/tramp-gvfs.el (tramp-gvfs-dbus-event-error)
(tramp-gvfs-maybe-open-connection):
* lisp/net/tramp-sh.el
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-sh-handle-file-local-copy, tramp-sh-handle-write-region)
(tramp-bundle-read-file-names, tramp-maybe-send-script)
(tramp-find-file-exists-command, tramp-barf-if-no-shell-prompt)
(tramp-maybe-open-connection, tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-get-ls-command):
* lisp/net/tramp-smb.el (tramp-smb-handle-file-attributes)
(tramp-smb-handle-make-symbolic-link)
(tramp-smb-maybe-open-connection, tramp-smb-call-winexe):
* lisp/net/tramp-sshfs.el (tramp-sshfs-maybe-open-connection):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-send-command-and-read):
Raise a `remote-file-error' in case of connection problems.

* lisp/net/tramp-rclone.el (tramp-rclone-maybe-open-connection): Improve
check for host.

* lisp/net/tramp-smb.el (tramp-smb-get-localname): Improve error message.

* lisp/net/tramp-sudoedit.el (tramp-default-host-alist):
Set a default for "sudoedit" method.
(tramp-sudoedit-maybe-open-connection): Check for proper host name.
(tramp-sudoedit-send-command): Do not expand ?h.

* lisp/net/tramp.el (tramp-compute-multi-hops): Check for cycle
proxy definition.

* test/lisp/net/tramp-archive-tests.el (tramp-archive-test20-file-modes)
(tramp-archive-test21-file-links): Check for `rmote-file-error'.

* test/lisp/net/tramp-tests.el (tramp-file-name-with-sudo): Declare.
(tramp--test-ignore-make-symbolic-link-error): Check for
`rmote-file-error'.
(tramp-test03-file-name-method-rules): Delete.
(tramp-test03-file-error): New test.
(tramp--test-supports-processes-p): Make it more rebust.
2026-02-12 19:24:10 +01:00
Dmitry Gutov
cf83dad395 Revise the paragraph about project-vc's caching
* doc/emacs/maintaining.texi (VC-Aware Project Backend):
Rephrase and mention a way to force invalitation (bug#78545).
2026-02-12 05:15:48 +02:00
Richard Lawrence
0f0a632028 * doc/emacs/calendar.texi (Diary iCalendar Import): Doc fix. 2026-02-11 16:04:32 -05:00
Morgan Willcock
a1e32130de Fix typo in smie-rules-function documentation
Fix a typo in the documentation for the expected arguments when
calling smie-rules-function to set the indentation offset of
function arguments.

* doc/lispref/modes.texi (SMIE Indentation):
* lisp/emacs-lisp/smie.el (smie-rules-function): Fix typo in
documentation for smie-rules-function arguments.
2026-02-11 15:35:29 -05:00
Sean Whitton
90fbadb3b1 cond*: bind-and* is not always a non-exit clause!
* lisp/emacs-lisp/cond-star.el (cond*-non-exit-clause-p)
(cond*-non-exit-clause-substance): Don't consider a bind-and*
clause without ':non-exit' to be a non-exit clause (bug#80376).
(cond*):
* doc/lispref/control.texi (cond* Macro): Fix docs accordingly.
2026-02-11 14:23:38 +00:00
Stéphane Marks
6967a8ac54 ; system-sleep texi markup fix (bug#80348)
* doc/lispref/os.texi (System Sleep): Minor markup fixes.
2026-02-11 14:32:02 +01:00
Eli Zaretskii
e464052a28 ; Fix recently installed changes
* src/w32fns.c (w32_register_for_sleep_notifications)
(sleep_notification_callback): Fix signatures.
* src/w32term.h (w32_register_for_sleep_notifications): Fix
prototype.  These changes avoid compilation warnings.

* lisp/system-sleep.el: Remove stray non-ASCII character.

* doc/lispref/os.texi (System Sleep): Remove non-ASCII character,
and fix wording and markup.

* etc/NEWS: Fix wording of recently-added entry.
2026-02-11 14:44:09 +02:00
Stéphane Marks
0bee754a72 system-sleep sleep blocker and sleep/wake event package (bug#80348)
This package provides platform-neutral interfaces to block your
system from entering idle sleep and a hook to process pre-sleep
and post-wake events.

Implementations are for D-Bus on GNU/Linux, macOS/GNUstep, and
MS-Windows.

* lisp/system-sleep.el: New package.
* src/fns.c: Qpre_sleep, Qpost_wake: New DEFSYM.
* src/nsfns.m (Fns_block_system_sleep, Fns_unblock_system_sleep)
(syms_of_nsfns): New functions.
* src/nsterm.m (applicationDidFinishLaunching): Subscribe to
pre-sleep and post-wake notifications.
(systemWillSleep, systemDidWake): New function.
* src/w32fns.c (Fw32_block_system_sleep)
(Fw32_unblock_system_sleep, Fw32_system_sleep_block_count)
(sleep_notification_callback)
(w32_register_for_sleep_notifications): New function.
(syms_of_w32fns): Sw32_unblock_system_sleep
Sw32_block_system_sleep Sw32_system_sleep_block_count: New
defsubr.
* src/w32term.h (Fw32_block_system_sleep): New extern.
* src/w32term.c (w32_initialize): Call
w32_register_for_sleep_notifications.
* doc/lispref/os.texi: Document the system-sleep package.
* doc/lispref/commands.texi: Update sleep-event special
documentation.
* etc/NEWS: Announce the new package.
2026-02-11 09:52:38 +01:00
Dmitry Gutov
583a112169 Do cache and timed invalidation in "VC-aware" project backend
* lisp/progmodes/project.el: Describe the new cache in Commentary,
the "VC-aware project" section.
(project-vc-cache-timeout)
(project-vc-non-essential-cache-timeout): New variables.
(project--get-cached, project--set-cached):
New functions.
(project-try-vc, project--value-in-dir): Use them.
(project--read-dir-locals): New function, extracted from the
above.  Return the full alist, to be saved to cache at once.
(project--clear-cache): New function.
(project-remember-projects-under)
(project-forget-zombie-projects, project-forget-projects-under):
Use it.
(project-uniquify-dirname-transform, project-mode-line-format):
Bind 'non-essential' to choose the longer caching strategy.
(project-name-cache-timeout, project-name-cached): Remove.
(project-mode-line-format): Switch to calling 'project-name'
directly, with the new caching in use.

Co-authored-by: Juri Linkov <juri@linkov.net>
2026-02-10 02:54:14 +02:00
Michael Albinus
c65a4e6a43 ; * doc/lispref/os.texi (Timers): Fix typo. 2026-02-09 18:31:04 +01:00
Stefan Monnier
f39eaad491 Merge branch 'main' into icalendar 2026-02-08 16:05:31 -05:00
Sean Whitton
2437a45144 ; Further fixes to core documentation for cond*. 2026-02-08 15:11:08 +00:00
Sean Whitton
51b883719b ; Fix some issues in core documentation for cond*. 2026-02-08 15:06:00 +00:00
Eli Zaretskii
f430166f7d ; * doc/lispref/commands.texi (Special Events): Add cross-reference. 2026-02-08 08:34:36 +02:00
Eli Zaretskii
419ac8148f ; Document creation of strings from copies of other strings
* doc/lispref/strings.texi (Creating Strings): Document how to
create a string from N copies of another string.  (Bug#80256)
2026-02-07 14:22:12 +02:00
Michael Albinus
89209a83b6 Support D-Bus file descriptor manipulation
* doc/misc/dbus.texi (Synchronous Methods): Adapt `dbus-call-method'.
(Asynchronous Methods): Adapt `dbus-call-method-asynchronously'.
(File Descriptors): New chapter, replaces Inhibitor Locks.

* etc/NEWS: Replace "New D-Bus functions to support systemd
inhibitor locks" by "Support D-Bus file descriptor manipulation".
Presentational fixes and improvements.

* lisp/net/dbus.el (dbus-call-method)
(dbus-call-method-asynchronously): Adapt docstring.
(dbus-list-hash-table): Return (nreverse result).
(dbus-monitor-goto-serial): Declare `completion'.

* src/dbusbind.c (Fdbus_message_internal, xd_read_message_1):
Handle `:keep-fd'.
(xd_registered_inhibitor_locks, Fdbus_make_inhibitor_lock)
(Fdbus_close_inhibitor_lock, Fdbus_registered_inhibitor_locks): Delete.
(xd_registered_fds): New variable.
(Fdbus__fd_open, Fdbus__fd_close, Fdbus__registered_fds):
New DEFUNs.  (Bug#79963)
(syms_of_dbusbind_for_pdumper): Initialize `xd_registered_fds'.
(syms_of_dbusbind): Remove subroutines
`Sdbus_make_inhibitor_lock', `Sdbus_close_inhibitor_lock' and
`Sdbus_registered_inhibitor_locks'.  Remove symbol `Qdbus_call_method'.
Declare subroutines `Sdbus__fd_open', `Sdbus__fd_close' and
`Sdbus__registered_fds'.  Declare symbol `QCkeep_fd'.  staticpro
`xd_registered_fds'.

* test/lisp/net/dbus-tests.el (dbus-test10-inhibitor-locks): Delete.
(dbus-test10-keep-fd, dbus-test10-open-close-fd): New tests.
2026-02-07 11:32:54 +01:00
Eli Zaretskii
e1524740be ; Fix documentation of widget commands
* doc/misc/widget.texi (Widgets and the Buffer): Fix the
signatures of 'widget-forward' and 'widget-backward'.  Reported by
Tim Landscheidt <tim@tim-landscheidt.de>.

* lisp/wid-edit.el (widget-forward, widget-backward)
(widget-move): Doc fixes.
2026-02-07 11:45:00 +02:00
Eli Zaretskii
cdc390d992 ; Improve documentation of 'etags-regen-mode'
* doc/emacs/maintaining.texi (Xref, Tags Tables)
(Create Tags Table, Select Tags Table): Improve documentation and
cross-references for 'etags-regen-mode'.
2026-02-07 09:12:42 +02:00
Dmitry Gutov
b37711a25f Some manual updates for the recent change
* doc/emacs/maintaining.texi (Looking Up Identifiers):
Mention that 'M-.' can signal an error.
(Xref): Recommend using 'etags-regen-mode' (bug#43086).

* etc/NEWS: Add updated marks.
2026-02-07 00:01:56 +02:00
Eli Zaretskii
8beb69b77c ; Fix cross references in "User Lisp Directory"
* doc/emacs/custom.texi (User Lisp Directory): Fix wording,
punctuation, and cross-references.  (Bug#80321)
2026-02-05 11:28:13 +02:00
Philip Kaludercic
ebe3838011
Merge remote-tracking branch 'origin/master' into feature/package-autosuggest 2026-02-04 17:36:37 +01:00
Eli Zaretskii
16b10d7617 ; Improve indexing in the ELisp manual
* doc/lispref/functions.texi (Function Names):
* doc/lispref/variables.texi (Tips for Defining): Improve
indexing.
2026-02-02 15:24:21 +02:00
Philip Kaludercic
2cde30aa1b
Merge remote-tracking branch 'origin/master' into feature/package-autosuggest 2026-02-01 21:01:40 +01:00
Jens Schmidt
e08efecd96 Improve documentation of 'seq-difference'
* doc/lispref/sequences.texi (Sequence Functions):
* lisp/emacs-lisp/seq.el (seq-difference): Clarify the documentation of
'seq-difference'.  (Bug#80257)
2026-01-31 16:08:52 +02:00
Michael Albinus
346f1bda6b Improve connection-local variables documentation.
* doc/emacs/custom.texi (Connection Variables):
* doc/lispref/variables.texi (Applying Connection Local Variables):
Improve documentation.
2026-01-31 13:37:56 +01:00
Jens Schmidt
1652e36c6c ; Fix documentaion of 'seq-intersection'
* doc/lispref/sequences.texi (Sequence Functions):
* lisp/emacs-lisp/seq.el (seq-intersection): Fix documentaion of
'seq-intersection'.  (Bug#80257)
2026-01-31 11:52:27 +02:00
Eli Zaretskii
f081afe23d ; Improve documentation of 'condition-case-unless-debug'
* doc/lispref/control.texi (Handling Errors):
* lisp/subr.el (condition-case-unless-debug): Improve the
documentation of 'condition-case-unless-debug'.  (Bug#80234)
2026-01-31 11:24:53 +02:00
Stéphane Marks
a0748d9791 New function 'truncate-string-pixelwise' (bug#80244)
This function will truncate a string on a pixelwise basis in a
work buffer and using a binary search rather than brute force.

* lisp/emacs-lisp/subr-x.el (work-buffer--prepare-pixelwise):
New defun helper function.
(string-pixel-width): Use the helper function.
(truncate-string-pixelwise): New defun.
* test/lisp/misc-tests.el (misc-test-truncate-string-pixelwise):
(misc-test-truncate-string-pixelwise-unicode): New test.
* doc/lispref/display.texi (Size of Displayed Text): Document
the function.
* etc/NEWS: Announce the function.
2026-01-31 11:04:40 +02:00
Sean Whitton
fcdd8678f9 Make diff-hunk-kill respect an active region
* lisp/vc/diff-mode.el (diff--revert-kill-hunks): New workhorse
routine.
(diff-hunk-kill, diff-revert-and-kill-hunk): Call it.
(diff-hunk-kill): New BEG and END parameters and interactive
form.
* doc/emacs/files.texi (Diff Mode):
* etc/NEWS: Document the change.
2026-01-30 15:06:52 +00:00
Eli Zaretskii
eca025334e ; Fix last change
* etc/NEWS:
* doc/lispref/windows.texi (Choosing Window Options):
* doc/emacs/windows.texi (Window Choice): Improve documentation of
'split-window-preferred-direction'.
2026-01-29 22:13:02 +02:00
Sean Whitton
12e53dfafe New C-x v T l and C-x v T L commands
* lisp/vc/vc.el (vc-log-outgoing-base)
(vc-root-log-outgoing-base): New commands.
* lisp/vc/vc-dir.el (vc-dir-mode-map):
* lisp/vc/vc-hooks.el (vc-prefix-map): Bind them.
* doc/emacs/vc1-xtra.texi (Outstanding Changes):
* etc/NEWS: Document them.
2026-01-29 17:01:32 +00:00
Sean Whitton
43d6907ad9 Move outstanding changes commands from 'o' to 'T'
The main reason for this is that then these commands can have
the same bindings in VC-Dir buffers that they have under
vc-prefix-map.  'T' is a good mnemonic for "Topic" and a
serviceable mnemonic for "outsTanding".

* lisp/vc/vc-hooks.el (vc-prefix-map): Move 'o' to 'T'.
* lisp/vc/vc-dir.el (vc-dir-mode-map): New 'T' bindings.
2026-01-28 16:13:47 +00:00
Stéphane Marks
99abaa70bf Document frame id related commands and tweak a return value (Bug#80192)
* doc/lispref/frames.texi (Input Focus): Document the commands
'select-frame-by-id' and 'undelete-frame-by-id'.
* lisp/frame.el (select-frame-by-id): Clarify return value and
add missing optional argument 'noerror' in sympathy with
'undelete-frame-by-id'.
2026-01-27 10:23:34 +01:00
Philip Kaludercic
7fe88de484
Refer to 'package-autosuggest-style' in manual.
* doc/emacs/package.texi (Package Installation): Mention the
user option.
2026-01-25 16:11:00 +01:00
Philip Kaludercic
5a53e27748
Merge branch 'feature/package-autosuggest' 2026-01-25 15:43:20 +01:00
Basil L. Contovounesios
db413c9da7 Improve animation cache documentation
* doc/lispref/display.texi (Image Cache): Document animation cache
argument that clear-image-cache gained in Emacs 29 (bug#56546,
bug#66221).

* lisp/image.el (image-animate-timeout): Note limitation of
clear-image-cache with ImageMagick.

* src/image.c (Fclear_image_cache): Rename animation-cache argument
to animation-filter and expand its description for clarity.
(struct anim_cache, anim_create_cache, image_prune_animation_caches):
Improve commentary.
(mark_image_cache): Replace stale commentary that referred to
forall_images_in_image_cache with description of mark_image_cache.
[HAVE_IMAGEMAGICK] (struct animation_cache): Mention lack of
clear-image-cache support in commentary.
2026-01-24 19:37:30 +01:00
Manuel Giraud
dea8f11c09 Document 'C-u M-x compile' (bug#80156)
* doc/emacs/building.texi (Compilation): Document 'C-u M-x
compile'.
2026-01-24 13:46:39 +02:00
Daniel Mendler
e8f26d554b Support cons cell for 'line-spacing'
* etc/NEWS: Announce the change.
* src/dispextern.h (struct glyph_row): Add
'extra_line_spacing_above' member.
(struct it): Add 'extra_line_spacing_above' member.
* src/frame.h (struct frame): Add 'extra_line_spacing_above'
member.  Update comment for 'extra_line_spacing.'
* src/buffer.c (syms_of_buffer): Update the docstring of
'line-spacing' to describe the cons cell usage.
* src/buffer.h (struct buffer): Update comment for
'extra_line_spacing'.
* src/frame.c (gui_set_line_spacing): Handle cons cell value for
'line-spacing'.  Calculate and set 'extra_line_spacing_above'
for both integer and float pairs.
* src/xdisp.c (init_iterator): Initialize 'extra_line_spacing_above'
from buffer or frame 'line-spacing', handling cons cells for both
integer and float values.
(gui_produce_glyphs): Use 'extra_line_spacing_above' to distribute
spacing between ascent and descent.  Update 'max_extra_line_spacing'
calculation.
(resize_mini_window): Take line spacing into account when resizing the
mini window.  Pass height of a single line to 'grow_mini_window' and
'shrink_mini_window'.
* src/window.c (grow_mini_window, shrink_mini_window): Add unit
argument which defines height of a single line.
* src/window.h (grow_mini_window, shrink_mini_window): Adjust function
prototypes accordingly with unit argument.
* lisp/subr.el (total-line-spacing): New function to calculate total
spacing from a number or cons cell.
(posn-col-row): Use total-line-spacing.
* lisp/simple.el (default-line-height): Use 'total-line-spacing'.
* lisp/textmodes/picture.el (picture-mouse-set-point): Use
'total-line-spacing'.
* lisp/window.el (window-default-line-height): Use
'total-line-spacing'.
(window--resize-mini-window): Take 'line-spacing' into account.
* test/lisp/subr-tests.el (total-line-spacing): New test.
* test/src/buffer-tests.el (test-line-spacing): New test.
* doc/emacs/display.texi (Display Custom): Document that
'line-spacing' can be a cons cell.
(Line Height): Document the new cons cell format for 'line-spacing'
to allow vertical centering.

Co-authored-by: Przemysław Alexander Kamiński <alexander@kaminski.se>
Co-authored-by: Daniel Mendler <mail@daniel-mendler.de>
2026-01-24 13:32:44 +02:00
Sean Whitton
29bdba37f2 New bindings for vc-revert
* lisp/vc/vc-dir.el (vc-dir-mode-map): Bind vc-revert to '@'.
* lisp/vc/vc-hooks.el (vc-prefix-map): Additionally bind
vc-revert to 'C-x v @'.
* doc/emacs/maintaining.texi (VC Undo, VC Directory Commands):
* etc/NEWS: Document the change.
2026-01-23 14:11:27 +00:00
João Távora
adb605716f Jsonrpc: don't let remote endpoint requests go unanswered
Previously, 'quit' could cause remote endpoints to never get a
reply and thus sometimes hang.  Ensure we always reply.  Also,
give the application a chance to signal jsonrpc-error with the
served code=32000, meaning "no error".

* doc/lispref/text.texi (JSONRPC Overview): Rework section on
request dispatchers.

* lisp/jsonrpc.el (jsonrpc-connection-receive): Rework.
2026-01-21 12:26:24 +00:00
Mattias Engdegård
b364c42a0e ; * doc/lispref/internals.texi (Garbage Collection): typo 2026-01-21 12:45:44 +01:00
Morgan Smith
0d448871be * doc/misc/dbus.texi (Inhibitor Locks): Fix path. 2026-01-21 09:24:52 +01:00
Stefan Monnier
4150c2e22e (garbage-collect-heapsize): New function
The info returned from `garbage-collect` is really handy to
track the evolution of the heap size, but sadly it's available only
at the cost of running a full GC, which has two big downsides:
it's slow, it affects what we're measuring, and it can't be used
in `post-gc-hook`.
So, this patch makes it available without running the GC.

* src/alloc.c (Fgarbage_collect_heapsize): New function, extracted from
`Fgarbage_collect`.
(Fgarbage_collect): Use it.
(syms_of_alloc): defsubr it.

* doc/lispref/internals.texi (Garbage Collection): Extract
documentation for it from that of `garbage-collect`.
2026-01-20 16:09:22 -05:00
Paul Eggert
4a0919df7f Update from Gnulib by running admin/merge-gnulib 2026-01-19 12:49:16 -08:00