1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-22 07:09:54 +00:00
Commit Graph

174987 Commits

Author SHA1 Message Date
Michael Albinus
39ac8ddafd * test/infra/gitlab-ci.yml (.tree-sitter-template): Add treesit.el. 2024-09-21 10:22:41 +02:00
Michael Albinus
2f80e62e6e Use (sit-for 0) in Tramp
* lisp/net/tramp.el (tramp-wait-for-regexp): Use (sit-for 0) in
order to avoid performace regression.
2024-09-21 10:22:13 +02:00
Eli Zaretskii
a6dafbc2bc ; * lisp/editorconfig.el (editorconfig-indentation-alist): Doc fix. 2024-09-21 10:21:21 +03:00
Yuan Fu
f9fa75c1ef
Add accessors for treesit-font-lock-settings
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.
2024-09-20 21:08:18 -07:00
Yuan Fu
4c4e26be7c
; * admin/MAINTAINERS: Add yuan to maintainer file. 2024-09-20 21:06:36 -07:00
Yuan Fu
0834106a62
Fix treesit--merge-ranges (bug#73324)
* 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.
2024-09-20 20:54:23 -07:00
Stefan Kangas
1103134a0e ; Delete bug fix from etc/NEWS
* 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>.
2024-09-21 03:43:38 +02:00
David Fussner
117d93a477 Fix regexps for TeX xref backend
* lisp/textmodes/tex-mode.el (tex-thingatpt-exclude-chars): Remove
variable.
(tex-thingatpt--beginning-of-symbol, tex-thingatpt--end-of-symbol):
Use hard-coded characters instead of variable.  (Bug#53749)
2024-09-21 03:35:27 +02:00
Stefan Kangas
76c6b4d279 Fix midnight-mode documentation
* 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)
2024-09-21 02:22:43 +02:00
Stefan Kangas
f778252220 ; Fix my email address 2024-09-21 02:17:27 +02:00
Stefan Monnier
db22efca8d editorconfig.el: Fix too naive sync from upstream
* lisp/editorconfig.el (editorconfig--get-indentation-nxml-mode):
New function.
(editorconfig-indentation-alist): Use it to fix bug#73359.
2024-09-20 14:58:45 -04:00
Eli Zaretskii
0f12d6dd23 ; * etc/NEWS: Announce 'doc-view-mpdf--use-svg'. 2024-09-20 21:50:12 +03:00
Stefan Monnier
29d50e245f * lisp/progmodes/eglot.el (eglot--signal-textDocument/didOpen): Fix bug#72696 2024-09-20 14:42:22 -04:00
Po Lu
7ef805d6a4 Disable fontset-related workaround on non-Android systems
* 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.
2024-09-20 22:30:07 +08:00
Po Lu
357cd83875 Remove obsolete workaround
* src/fontset.c (fontset_find_font): Don't refuse to cache
font objects whose registries do not agree with the font
specs.  (bug#73363)
2024-09-20 22:28:36 +08:00
Sean Whitton
4b9a8fd607 etags-regen-file-extensions: Add .pm
* lisp/progmodes/etags-regen.el (etags-regen-file-extensions):
Add .pm.
2024-09-20 14:39:53 +01:00
Mattias Engdegård
38c7516827 Speed up tall rectangular selections (bug#72830)
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.
2024-09-20 12:42:18 +02:00
Eli Zaretskii
cbaf7edbb4 Fix M-TAB completion of variables in 'cond'
* lisp/progmodes/elisp-mode.el (elisp-completion-at-point): Add
special support for 'cond, 'cond*', and 'bind*'.  (Bug#73330)
2024-09-19 19:36:46 +03:00
Andrea Corallo
956f14ae5e * src/treesit.c (treesit_debug_print_parser_list): Fix compiler warning. 2024-09-19 10:28:34 +02:00
Robert Pluim
300d05ecb4 Type-check argument to network-lookup-address-info
* src/process.c (Fnetwork_lookup_address_info): Check that the
"name" argument is a string, and mention 'puny-encode-domain'.
(Bug#73337)
2024-09-19 09:23:58 +02:00
Juri Linkov
8816b4f342 * lisp/dired-aux.el (dired-do-open): Optimize (bug#73004).
Detect system-type only once, then iterate over files
for every system type separately.
2024-09-19 09:14:34 +03:00
Eli Zaretskii
0f0f21b7f2 ; Improve doc strings of options related to numbered backups
* lisp/files.el (version-control, dired-kept-versions)
(delete-old-versions, kept-old-versions, kept-new-versions): Doc
fixes.
2024-09-19 08:20:04 +03:00
Spencer Baugh
ae4171efdc Support numeric indexing in let-alist
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.
2024-09-19 03:54:59 +02:00
Eli Zaretskii
252ed22d62 ; Use c-ctype.h in w32*.c
* src/w32.c:
* src/w32fns.c: Replace ctype.h functions by equivalent
c-ctype.h functions.
2024-09-18 21:22:04 +03:00
Juri Linkov
03a9919318 Additional fix for kill-region-dwim (bug#69097)
* lisp/simple.el (kill-region): Restore the original logic of
raising the error unless both 'beg' and 'end' are non-nil
since 'end' is always non-nil.
2024-09-18 20:37:44 +03:00
Juri Linkov
9026bfb571 More fixes for kill-region-dwim (bug#69097)
* 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.
2024-09-18 20:20:19 +03:00
Juri Linkov
3924730200 ; Small fix for 'grep-change-to-grep-edit-mode'
* lisp/progmodes/grep.el (grep-change-to-grep-edit-mode):
Use 'substitute-command-keys' like in 'occur-edit-mode'.
2024-09-18 19:59:35 +03:00
Manuel Giraud
5e377f4fcc Make `dired-do-open' work on more *nix systems
* lisp/dired-aux.el (dired-do-open): Make `dired-do-open' work
on more *nix systems (bug#73004).
2024-09-18 19:51:44 +03:00
Paul Eggert
6d507d586a yes-or-no-p now uses blankp rather than SYNTAX
* 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.
2024-09-18 09:18:48 -07:00
Yuan Fu
f0daa2f215
Conservative heuristic for tree-sitter parser ranges (bug#73324)
* 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.
2024-09-17 21:18:28 -07:00
Yuan Fu
035024b4e5
; Fix treesit.c printing
* src/treesit.c (treesit_debug_print_parser_list): Use PRIuPTR so 32bit
systems compile without warnings.
2024-09-17 20:54:40 -07:00
Po Lu
eace68a325 Fix layout of preferences activity on Android 35
* java/org/gnu/emacs/EmacsPreferencesActivity.java (onCreate):
Align list view to system windows.
2024-09-18 10:11:15 +08:00
F. Jason Park
50deb59aae Only conditionally resolve hosts in nsm-should-check
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)
2024-09-17 17:55:50 -07:00
Paul Eggert
865b54e2ac Use c-ctype.h in lib-src
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.
2024-09-17 16:57:58 -07:00
Paul Eggert
e0b027d121 Fix some #! misparsing in check_interpreter
* 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.
2024-09-17 16:39:25 -07:00
Paul Eggert
58a44b6ac3 Fix misuse of toupper in sfnt_parse_style
* src/sfntfont.c: Include c-ctype.h, not ctype.h.
(sfnt_parse_style): Upcase just initial ASCII letters;
that’s good enough here.
2024-09-17 16:39:25 -07:00
Paul Eggert
43cde03fa5 Fix yes-or-no-p with multibyte spaces
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.
2024-09-17 16:39:25 -07:00
Eshel Yaron
f1794a17b6
New user option 'completion-preview-ignore-case'
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.
2024-09-17 20:45:14 +02:00
Robert Pluim
7d365a2d72 Fix idna-mapping-table following Unicode 16 changes
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.
2024-09-17 15:50:27 +02:00
Eli Zaretskii
8771310a10 ; * admin/notes/unicode: Need to run textsec-tests (bug#73312). 2024-09-17 16:18:08 +03:00
Mattias Engdegård
4c6f45fa8e Re-enable GC mark trace buffer by default
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.
2024-09-17 13:27:35 +02:00
Dmitry Gutov
8eb66cca78 Rename project-{find-file-in-root,root-find-file}
* lisp/progmodes/project.el (project-root-find-file):
Rename from 'project-find-file-in-root' (bug#73044).
2024-09-17 12:59:56 +03:00
Paul Eggert
73427887d6 Update from Gnulib by running admin/merge-gnulib 2024-09-17 00:35:03 -07:00
Paul Eggert
cbe8683410 Remove unnecessary #include
* src/sysdep.c: Don’t include utimens.h; hasn’t been
needed for a while.
2024-09-16 16:48:45 -07:00
Stefan Kangas
f27553c30a Add make-directory to symbol-releases.eld
This avoids saying (incorrectly) that it was introduced in Emacs 23.1.

* etc/symbol-releases.eld: Add 'make-directory'.
2024-09-15 14:02:36 +02:00
Stefan Kangas
4464062f4e Remove some XEmacs compat code from cperl-mode.el
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.
2024-09-15 14:02:36 +02:00
Daniel Martín
16a142c2b2 ;; Fix typo in Grep Edit mode manual description (bug#73274). 2024-09-15 13:33:05 +03:00
Mattias Engdegård
2cd5774689 * lisp/simple.el (kill-region-dwim): Rectify choice label. 2024-09-15 11:24:29 +02:00
Po Lu
c607701589 ; * src/haiku_support.cc: Correct last change. 2024-09-15 16:28:54 +08:00
Yuan Fu
ae22ad7f62
; Add even more tests for previous commit
* test/src/treesit-tests.el:
(treesit-range-fixup-after-edit): Make the tests trickier.
2024-09-15 00:42:41 -07:00