Previously, both the definition of __PYTHON_EL_get_completions
and the call to __PYTHON_EL_get_completions were sent to the
inferior Python each time
'python-shell-completion-get-completions' was executed.
However, there is no need to send the definition every time as
long as the definition remains unchanged. We improved this so
that the definition of __PYTHON_EL_get_completions is only sent
during the inferior Python initialization; it is no longer sent
during 'python-shell-completion-get-completions' execution.
* lisp/progmodes/python.el
(python-shell-completion-send-setup-code): New function.
(python-shell-first-prompt-hook): Add the above new function.
(python-shell-completion-get-completions): Omit sending
'python-shell-completion-setup-code'. (Bug#80182)
With higher values of 'calc-string-maximum-character', rules
made up of glyphs of non-unit width can be the wrong length.
Calculate the number of characters in the rule based on the
display width, rounded up to the nearest integer. Refines
feature introduced in bug#78528.
* lisp/calc/calccomp.el (math-comp-simplify-term): Calculate
rule width with a ratio of 'string-pixel-width's.
With higher values of 'calc-string-maximum-character' the
string length can differ from the displayed width. Calculate
alignment offsets based on the the display width, rounded up to
the nearest integer. Refines feature introduced in bug#78528.
* lisp/calc/calccomp.el (math-comp-width): Replace 'length' with
a ratio of 'string-pixel-width's.
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.
* lisp/textmodes/text-mode.el (center-line-mode--track-changes):
New local variable for storing the id of the change tracker registered
for the current buffer.
(center-line-mode--track-changes-signal): New function to be called by
the track-changes library whenever there is a change in the current
buffer.
(center-line-mode--track-changes-function): New function called from the
above signal function, iterates over the lines of the modified region,
calling 'center-line' for each non-empty line.
(center-line-mode): New minor mode.
* etc/NEWS: Document the new minor mode.
* src/nsimage.m (ns_can_use_native_image_api): Handle HEIF, SVG
and WEBP image types on GNUstep.
* src/image.c (syms_of_image): Add conditional native image
support for HEIF, SVG and WEBP on GNUstep. (Bug#80101)
* 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.
* src/image.c (native_image_format): Make array size explicit, to
help keep it consistent with its later fmt descriptor copy.
(native_image_p): Parse the correct number of keywords (bug#80191).
* etc/NEWS:
* doc/emacs/maintaining.texi (Projects):
* lisp/progmodes/project.el (project-mode-line): Update
documentation due to changes in bug#78545.
Add an optional 'context' argument to 'make-progress-reporter'
which 'progress-reporter-echo-area' consults to inhibit updates
if the context is 'async' and the echo area is busy.
* lisp/subr.el (make-progress-reporter): Add the optional
'context' argument.
(progress-reporter-context): New defun accessor.
(progress-reporter-echo-area): Consult
'progress-reporter-context'.
* doc/lispref/display.texi: Document context.
* etc/NEWS: Announce context.
* lisp/textmodes/ispell.el (ispell-save-corrections-as-abbrevs):
New user option.
(ispell--abbrev-saving-allowed)
(ispell--save-correction-as-abbrev): New variables.
(ispell--maybe-save-correction-abbrev): New function.
(ispell-word, ispell-process-line): Use them to save corrections
as abbrevs when appropriate (bug#79985).
(ispell-command-loop): Add C-u as command character to toggle
abbrev saving for an immediately following replacement command.
(ispell-help): Document C-u binding.
* doc/emacs/fixit.texi (Spelling): Document new feature.
(project-name-cache-timeout): New variable.
(project-name-cached): New function (bug#78545).
(project-mode-line): New value 'non-remote'.
(project-mode-line-format): Don't show the remote project's name
when 'project-mode-line' is 'non-remote'. Use 'project-name-cached'.
* lisp/term/xterm.el (xterm-update-cursor): Mention OSC 112 in
doc string.
(xterm--reset-cursor-color-escape-sequence): New constant.
(xterm--init-update-cursor, xterm--update-cursor-color): Use it
(bug#80091).
* doc/misc/dbus.texi (Signals): All registered signal handlers are
called.
(Synchronous Methods, Signals, Monitoring Messages): Add function
result in examples.
* src/dbusbind.c (xd_store_event): New function.
(xd_read_message_1): Use it. Call all registered handlers per
signal. (Bug#80168)
* test/lisp/net/dbus-tests.el (dbus--test-signal-handler): Adapt defun.
(dbus--test-signal-handler1, dbus--test-signal-handler2): New defuns.
(dbus-test05-register-signal-several-handlers): New test.
(dbus-test04-register-method)
(dbus-test04-call-method-authorizable)
(dbus-test05-register-signal)
(dbus-test05-register-signal-with-nils)
(dbus-test06-register-property-emits-signal): Adapt tests.
When a completion candidate has no suffix, then there is no need to
add whitespace "between" the candidate and suffix, since there is no
need to align suffixes if there are none. In this case the trailing
whitespace only serves to needlessly make all candidates the same
length, with the result that if one candidate does not fit one a
single line, then all other candidates are made to not fit either.
* lisp/emacs-lisp/package-activate.el: Move defvar of
`Info-directory-list` to when we know it should exist.
* lisp/emacs-lisp/package.el (Info-directory-list): Defvar before we
`let-bind it.
Now when calling 'Buffer-menu-unmark-all-buffers', only the
selected mark is removed.
* lisp/buff-menu.el (Buffer-menu--unmark): Add a mark parameter
to correctly select it in the entry.
(Buffer-menu-unmark, Buffer-menu-unmark-all-buffers)
(Buffer-menu-backup-unmark): Usage.
They're always called immediately before a `<` char, in which case
they do the same anyway. This saves us from having to touch
`forward-list-function` in addition to `forward-exp-function`.
While at it, change `sgml-tags-invisible` to use `define-minor-mode`.
* lisp/textmodes/sgml-mode.el (sgml-delete-tag)
(sgml-electric-tag-pair-before-change-function): Prefer `forward-sexp`
over `forward-list`.
(sgml-tags-invisible): Define with `define-minor-mode`. Don't disable
`cursor-sensor-mode` when we don't need it any more, since some other
package may be using it. Remove redundant binding of `inhibit-read-only`.
* lisp/emacs-lisp/lisp.el (forward-sexp-function): Give it a default value.
(forward-sexp): Simplify a bit.
(up-list-default-function): Fix for `forward-sexp-default-function`.
A unique frame id is assigned to a new or cloned frame, and
reused on an undeleted frame.
The id facilitates unambiguous identification among frames that
share identical names or titles, deleted frames where a live
frame object no longer exists that we can resurrect by id, for
example via 'tab-bar-undo-close-tab'. It also aids debugging at
the C level using the frame struct member id.
Rewrite 'clone-frame' and 'undelete-frame' to not let bind
variables that 'make-frame' uses to avoid conflicts with nested
'make-frame' calls, for example via
'after-make-frame-functions'.
* lisp/frame.el (clone-frame, undelete-frame): Use
'frame--purify-parameters' to supply parameters explicitly.
(undelete-frame--save-deleted-frame): Save frame id for
restoration.
(undelete-frame): Restore frame id.
(frame--purify-parameters): New defun.
(make-frame): Assign a new id for a new or cloned frame, reuse
for undeleted frame.
* src/frame.h (struct frame): Add id member.
(frame_next_id): New extern.
* src/frame.c (frame_next_id): New global counter.
(frame_set_id, frame_set_id_from_params): New function.
(Fframe_id): New DEFUN.
(syms_of_frame <Sframe_id>): New defsubr.
(syms_of_frame <Qinternal_id>): New DEFSYM.
(syms_of_frame <frame_internal_parameters>): Add 'Qinternal_id'.
* src/androidfns.c (Fx_create_frame):
* src/haikufns.c (Fx_create_frame):
* src/nsfns.m (Fx_create_frame):
* src/pgtkfns.c (Fx_create_frame):
* src/w32fns.c (Fx_create_frame):
* src/xfns.c (Fx_create_frame): Call 'frame_set_id_from_params'.
* doc/lispref/frames.texi: Add documentation.
* etc/NEWS: Announce frame id.
(html-ts-mode--show-paren-data): New function to exclude
unbalanced tags when the closing tag is missing.
(html-ts-mode): Set 'show-paren-data-function' to
'html-ts-mode--show-paren-data' (bug#80151).
(sgml-electric-tag-pair-before-change-function):
Let-bind 'forward-list-function' to nil.
(sgml-delete-tag): Let-bind 'forward-sexp-function'
and 'forward-list-function' to nil.
(sgml-tags-invisible): Let-bind 'forward-list-function' to nil.
All this is required to use the default definitions of sexp/list
that significantly differ from treesit definitions (bug#80151).