* lisp/progmodes/lua-mode.el (lua-indent-level): Contemporary Lua
style guides no longer recommend 3 as default. Change type to
'natnum'.
(lua-always-show, lua-get-block-token-info)
(lua--backward-up-list-noerror, lua-make-indentation-info-pair)
(lua-accumulate-indentation-info)
(lua-calculate-indentation-block-modifier): Quote function names.
(lua-toggle-electric-state): Re-format to avoid confusion.
(lua-is-continuing-statement-p-1): Fix typo.
(lua--builtins): Move docstring to correct location.
(lua-is-continuing-statement-p-1): Remove unnecessary 'or'.
(lua-make-lua-string): Remove excessive backslashes and
unnecessary use of a temporary buffer.
(lua-find-matching-token-word): Make it clear that 'goto-char' is
only used only for its side-effect.
* src/xdisp.c (next_element_from_display_vector): Only switch the
iterator from unibyte to multibyte, never in the other direction,
and not if the original character came from a unibyte buffer.
(Bug#79317)
* lisp/erc/erc-fill.el (erc-fill--wrap-measure): Using
`buffer-text-pixel-size' for measuring text size in the selected window
can end up triggering a scroll, which then requires imperfect countering
by the scrolltobottom module, especially with regard to the option
`erc-scrolltobottom-all'. Thanks to Alcor for reporting and helping
with this bug, which was introduced along with fill-wrap in ERC 5.6.
* lisp/progmodes/ruby-mode.el (ruby-flymake-simple): Update
regular expression to handle new versions of Ruby including the
location of the executable in the output.
The following changes make the changes for bug#79275 less
radical, closer to their previous shape, while still fixing
that bug.
* src/xdisp.c (push_prefix_prop, get_it_property): Restore
original code that determined the object and position on it.
(get_line_prefix_it_property): Take FROM_BUFFER from the actual
object of the prefix property.
* lisp/progmodes/bug-reference.el (bug-reference-setup-from-vc-alist):
Add comment explaining the meaning of the nil argument when calling
vc-call-backend. Even though "origin" and nil are equivalent when using
the git backend, it is more intelligible to see "upstream" and "origin"
passed explicitly (bug#79276).
* lisp/erc/erc-status-sidebar.el (erc-status-sidebar-get-window): Set
`cursor-type' in `erc-status-sidebar-mode' buffer instead. This bug was
introduced along with the bufbar module for bug#63595 in ERC 5.6. It's
a regression because it also affects the status-sidebar module.
* lisp/erc/erc.el (erc-bug): On Emacs 30 and later, search for and
ideally use an existing "X-Debbugs-CC" header instead of inserting a new
one at the top. Section 4.5 Obsolete Header Fields of RFC 5322 says,
"except for destination address fields (described in section 4.5.3), the
interpretation of multiple occurrences of fields is unspecified."
Anecdotal fiddling suggests the Savannah servers aren't confused by the
second "empty" header field, so this change is probably just cosmetic.
Only allow string mutation that is certain not to require string data to
be resized and reallocated: writing bytes into a unibyte string, and
changing ASCII to ASCII in a multibyte string.
This ensures that mutation will never transform a unibyte string to
multibyte, that the size of a string in bytes never changes, and that
the byte offsets of characters remain the same. Most importantly, it
removes a long-standing obstacle to reform of string representation and
allow for future performance improvements.
* src/data.c (Faset): Disallow resizing string mutation.
* src/fns.c (clear_string_char_byte_cache):
* src/alloc.c (resize_string_data): Remove.
* test/src/data-tests.el (data-aset-string): New test.
* test/lisp/subr-tests.el (subr--subst-char-in-string):
Skip error cases.
* test/src/alloc-tests.el (aset-nbytes-change):
Remove test that is no longer relevant.
* doc/lispref/strings.texi (Modifying Strings):
* doc/lispref/sequences.texi (Array Functions):
* doc/lispref/text.texi (Substitution): Update manual.
* etc/NEWS: Announce.
* etc/NEWS: Mention the change.
* lisp/minibuffer.el (completion-category-defaults):
Add an entry for it.
* lisp/progmodes/project.el (project--buffers-completion-table):
Return category 'project-buffer'.
* lisp/progmodes/project.el (project--buffers-completion-table):
New function, use it to implement the no-internal/internal
fallback logic from 'internal-complete-buffer', apply the
category and cycle-sort-function (bug#77312).
(project--read-project-buffer): Use it. Skip 'read-buffer' in
favor of 'completing-read'. But make sure to honor
read-buffer-completion-ignore-case and use format-prompt when
the function is available. Unify two execution paths.