Since each SETTING in treesit-font-lock-settings is considered an opaque
object, provide accessor functions for each field.
* lisp/treesit.el:
(treesit-font-lock-settings): Update docstring.
(treesit-font-lock-setting-query):
(treesit-font-lock-setting-enable):
(treesit-font-lock-setting-feature):
(treesit-font-lock-setting-override): New functions.
(treesit--font-lock-setting-feature): Remove function.
(treesit--font-lock-setting-enable): Rename to
treesit--font-lock-setting-clone-enable to avoid confusion with
treesit-font-lock-setting-enable.
(treesit-add-font-lock-rules): Use renamed function.
(treesit-font-lock-fontify-region): Add a comment.
* doc/lispref/modes.texi (Parser-based Font Lock): Update manual.
* lisp/treesit.el (treesit--merge-ranges): Make sure that old
ranges that intersects with START-END are actually discarded.
* test/src/treesit-tests.el (treesit-range-merge): New test.
* etc/NEWS: Delete bug fix item. No correct program will see a
difference in behavior; at worst, the error message when calling
`(error)` is now better.
Reported by Mattias Engdegård <mattias.engdegard@gmail.com>.
* lisp/midnight.el (Commentary): Document that 'midnight-mode' should be
enabled using the function, instead of by merely loading the library.
In Emacs 31, doing the latter will no longer work. (Bug#73291)
* src/fontset.c (fontset_find_font) [!HAVE_ANDROID]: Don't
refuse to cache font objects whose registries do not agree with
the font specs. (bug#73363)
Do not merge to master.
Instead of setting the highlight overlay on every line in the selection,
only do so on the window-height worth of lines closest to point because
the rest aren't likely to be visible.
This makes a massive difference for tall rectangular selections which
previously were so slow as to be unusable.
(Tall selections are still slow if `select-active-regions` is non-nil,
but that is something that users can actually do something about.)
* lisp/rect.el (rectangle--highlight-for-redisplay)
(rectangle--unhighlight-for-redisplay):
Replace call to `apply-on-rectangle`, which operates on every line,
with a loop over an approximate screenful.
Extend the `rectangle` overlay list structure with a value for point,
because `exchange-point-and-mark` must trigger a recomputation of
highlight overlays despite the selection not actually changing.
let-alist is very useful. But sometimes an alist contains a list in
the middle, which contains yet more alists. Previously, this was
somewhat painful to deal with, and required something like:
(let-alist alist
(let-alist (nth 0 .a)
(let-alist (nth 3 .b)
.c)))
Now, the following works:
(let-alist alist
.a.0.b.3.c)
* lisp/emacs-lisp/let-alist.el (let-alist--access-sexp): Properly
parse numbers to handle lists. (Bug#66509)
(let-alist--list-to-sexp): Use nth to handle numbers.
(let-alist): Update docs.
* lisp/simple.el (kill-region-dwim): Move the default nil
to the top of choices.
(kill-region): Set the FORCE argument of 'mark' to non-nil
if kill-region-dwim is non-nil. That allows everyone to use
non-nil kill-region-dwim even if mark-even-if-inactive is nil.
Don't check 'last-command' if kill-region-dwim is non-nil.
That allows everyone to type C-w twice in a row to delete
two previous words.
* src/fns.c: Do not include syntax.h; no longer needed.
(Fyes_or_no_p): Use blankp rather than SYNTAX to check whether the
prompt ends in nonspace. That way, the test doesn’t depend on the
current buffer.
* src/treesit.c (treesit_sync_visible_region): If the parser's original
ranges don't overlap with visible region, give it a zero range, rather
than don't set any range.
* test/src/treesit-tests.el (treesit-range-fixup-after-edit): Test new
behavior.
Libraries like `socks' need to run `nsm-verify-connection' without
performing DNS lookups. This change allows them to achieve this by
binding `nsm-trust-local-network' to nil around calls to that function.
* lisp/net/nsm.el (nsm-should-check): Rework in a functionally
equivalent way, except forgo calling both `network-lookup-address-info'
and `network-interface-list' unless the various conditions regarding
`nsm-trust-local-network' are first satisfied. Replace `mapc' with
`dolist' to align with modern sensibilities. (Bug#53941)
This fixes some unlikely bugs and removes the temptation
of using ctype.h. Although some uses were correct,
many weren't.
* lib-src/ebrowse.c: Include c-ctype.h, not ctype.h.
* lib-src/emacsclient.c: Include c-ctype.h, not ctype.h.
* lib-src/update-game-score.c: Include c-ctype.h, not ctype.h.
All uses changed.
* exec/exec.c: Do not include ctype.h, as the kernel
does not care about the locale.
(check_interpreter): Treat only spaces and tabs as white space.
Do not inspect more bytes than were read.
Although the resulting code does not exactly match what
the Android kernel does, it’s closer than what it was before.
Problem reported by Thomas Klausner (Bug#73307).
Emacs shouldn’t use ctype.h, as it doesn’t work for multibyte
chars and it doesn’t work with Emacs’s locale model anyway.
* src/fns.c: Include syntax.h, not ctype.h.
(Fyes_or_no_p): Check the character category with SYNTAX, not
with isspace, which assumes the current locale and works only
with single-byte characters.
Completion Preview mode implicitly assumed that
'completion-ignore-case' is nil, and while it can also work
with 'completion-ignore-case' non-nil, the results are a bit
different than what you get with 'completion-at-point'. Add
an option that controls case sensitivity explicitly and
specifically for Completion Preview mode, and clarify the
behavior when case differences are ignored. (Bug#73234)
* lisp/completion-preview.el
(completion-preview-ignore-case): New user option.
The latest version of UTS #46 in Unicode 16 has changed the way it
indicates which codepoints are invalid in domain names, causing
'idna-mapping-table' to contain incorrect information, which then breaks
'textsec-domain-suspicious-p' and our test suite. (Bug#73312)
* admin/unidata/unidata-gen.el (unidata-gen-idna-mapping): Check the
IDNA validity field in "IdnaMappingTable.txt" in addition to checking
the status field, as the latter can now be 'valid' for disallowed
codepoints.
Enable GC_REMEMBER_LAST_MARKED by default (it was disabled in Emacs 29)
to make it easier to debug difficult-to-reproduce GC problems
encountered by users. This increases GC costs by about 5 %, which can
be avoided by turning the mark trace buffer back off using the new
--disable-gc-mark-trace option.
See discussion at
https://lists.gnu.org/archive/html/emacs-devel/2024-09/msg00240.html
* configure.ac (--disable-gc-mark-trace): New config option.
* etc/NEWS: Mention it.
* src/alloc.c: Enable it by default and avoid a compiler warning.
The 'initialize-new-tags-table' function is unconditionally available
after 'etags' has been loaded, which is done further up.
* lisp/progmodes/cperl-mode.el (cperl-write-tags): Remove XEmacs compat
code.