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.
* 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.
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.
* 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>
* 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.
* 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.
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.
* 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.
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.
* 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'.
* 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.
* 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>
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.
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`.
* doc/lispref/internals.texi (Module Values, C Integer Types):
Mention that the example assumes Emacs was built with the
GMP library, not with mini-gmp. Mention stdckdint.h for
integer overflow checking, and mention Emacs integers
for values outside machine range.
Previously, if 'calc-string-maximum-character' wasn't a valid
character 'math-vector-is-string' would throw an error in the
comparison, leading to an incomplete display of the stack and a
cryptic error message. Instead, have 'math-vector-is-string'
return nil, which effectively disables the display of strings.
Refines feature introduced in bug#78528.
* doc/misc/calc.texi (Customizing Calc): Update description of
behavior for invalid 'calc-string-maximum-character'.
* lisp/calc/calccomp.el (math-vector-is-string): Return nil when
'calc-string-maximum-character' doesn't represent a character.
* test/lisp/calc/calc-tests.el (calc-math-vector-is-string): Correct
and simplify tests.
* doc/misc/dbus.texi (Top): Add "Inhibitor Locks" submenu.
Remove trailing period from chapter and section titles.
(Inhibitor Locks): New node.
* etc/NEWS: New D-Bus functions to support systemd inhibitor locks.
Presentational fixes and improvements.
* src/dbusbind.c (xd_registered_inhibitor_locks): New variable.
(Fdbus_make_inhibitor_lock, Fdbus_close_inhibitor_lock)
(Fdbus_registered_inhibitor_locks): New DEFUNs. (Bug#79963)
(syms_of_dbusbind_for_pdumper): Initialize
`xd_registered_inhibitor_locks'.
(syms_of_dbusbind): Declare subroutines
`Sdbus_make_inhibitor_lock', `Sdbus_close_inhibitor_lock' and
`Sdbus_registered_inhibitor_locks'. Declare symbol `Qdbus_call_method'.
staticpro `xd_registered_inhibitor_locks'.
* test/lisp/net/dbus-tests.el (dbus--test-systemd-service)
(dbus--test-systemd-path, dbus--test-systemd-manager-interface):
New defconsts.
(dbus-test10-inhibitor-locks): New test.
* doc/lispref/display.texi (Customizing Bitmaps): Fix grammar.
(XBM Images): Fix reference to incorrect number of properties.
(Multi-Frame Images, Other Image Types): Mention multi-frame WebP
support.
* src/image.c: Don't include pdumper.h; it hasn't been needed since
commit of 2019-05-17 "Clean up and simplify image-type setup". Fix
some commentary.
(image_pix_container_create_from_bitmap_data): Remove no longer used
frame parameter (bug#80191); this continues from commit of
2022-11-25 "Remove unused parameter from
image_create_pix_container". All callers updated.
(x_create_xrender_picture, initialize_image_type): Simplify.
(xbm_image_p): Remove redundant conditional branch. Update
commentary.
* etc/NEWS:
* doc/emacs/maintaining.texi (Projects):
* lisp/progmodes/project.el (project-mode-line): Update
documentation due to changes in bug#78545.