1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-25 07:28:20 +00:00
Commit Graph

175019 Commits

Author SHA1 Message Date
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
Yuan Fu
460b9d705a
Fix treesit_sync_visible_region's range fixup code (bug#73264)
new_ranges_head
      |
      v
( )->( )->( )->( )->( )
           ^    ^
           |    |
           |    lisp_ranges (loop head)
           |
           prev_cons -> set cdr to nil to cut of the rest

result:

     ( )->( )

* src/treesit.c (treesit_sync_visible_region): Cut off this cons and the
rest, not set the current range's end to nil.
* test/src/treesit-tests.el:
(treesit-range-fixup-after-edit): Add tests for all cases.
2024-09-15 00:31:40 -07:00
Eli Zaretskii
81347c1aaf ; * etc/PROBLEMS: Fix last change (bug#73207). 2024-09-15 07:55:20 +03:00
Po Lu
a82b7f3e82 Document unavailability of frame geometry on Wayland
* etc/PROBLEMS (Runtime problems specific to PGTK build):
Document that frame-edges and company are liable not to return
valid coordinates.  (bug#73207)
2024-09-15 09:01:25 +08:00
Po Lu
7793b2fe2a Merge from savannah/emacs-30
709ce2aff1 Port to Haiku R1/beta5
21efdd5ef3 Fix c++-ts-mode font-lock for latest c++ grammar (bug#73191)
ffc00eac53 ; Set Transient's version and add admin/MAINTAINERS entry
3822a5e5d1 * admin/update-copyright: Print reminder to do manual upd...
43b678d3d2 * admin/notes/years: Update.
38de992a5a * etc/TODO: New item "support indentation guides".

# Conflicts:
#	admin/notes/years
#	doc/misc/transient.texi
#	lisp/progmodes/c-ts-mode.el
#	lisp/transient.el
2024-09-15 08:54:50 +08:00
Po Lu
709ce2aff1 Port to Haiku R1/beta5
* src/haiku_support.cc (keysym_from_raw_char): Use revised names
for B_HANGUL and B_HANGUL_HANJA.
2024-09-15 08:52:46 +08:00
Yuan Fu
21efdd5ef3
Fix c++-ts-mode font-lock for latest c++ grammar (bug#73191)
* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--keywords): Add "thread_local" keyword.
(c-ts-mode--test-virtual-named-p): New function.
(c-ts-mode--font-lock-settings): Use named/anonymous "virtual" depending
on the grammar.
2024-09-14 11:09:45 -07:00
Jonas Bernoulli
ffc00eac53
; Set Transient's version and add admin/MAINTAINERS entry
* admin/MAINTAINERS: Add entry for externally maintained Transient
package.
* doc/misc/transient.texi: Bump version strings.
* lisp/transient.el: Bump version in Version header.
* lisp/transient.el (transient-version): New constant.
2024-09-14 19:23:40 +02:00
Sean Whitton
691f441717 ; * etc/NEWS: Fix variable name. 2024-09-14 17:35:45 +01:00
Sean Whitton
a6631eaec3 ; * lisp/simple.el (kill-region-dwim): Try to simplify docstring. 2024-09-14 17:09:48 +01:00
Philip Kaludercic
7451bd6e39 Allow 'kill-region' to kill the last word when there is no region
* etc/NEWS: Document the new user option.
* lisp/simple.el (kill-region-dwim): New option.
(kill-region): Respect 'kill-region-dwim'.  (Bug#69097)
2024-09-14 17:01:40 +01:00
Stefan Kangas
3822a5e5d1 * admin/update-copyright: Print reminder to do manual updates. 2024-09-14 17:38:34 +02:00
Stefan Kangas
43b678d3d2 * admin/notes/years: Update. 2024-09-14 17:32:59 +02:00
Stefan Kangas
efde34f422 ; * etc/NEWS: Delete duplicated section title. 2024-09-14 17:08:58 +02:00
David Fussner
3090b2304e Update the etags/ctags test files
* test/manual/etags/ETAGS.good_1:
* test/manual/etags/ETAGS.good_2:
* test/manual/etags/ETAGS.good_3:
* test/manual/etags/ETAGS.good_4:
* test/manual/etags/ETAGS.good_5:
* test/manual/etags/ETAGS.good_6:
* test/manual/etags/CTAGS.good: Update expected results from TeX
files.  (Bug#53749)
2024-09-14 17:05:33 +02:00
David Fussner
b44c00669a Provide a modified xref backend for TeX buffers
In addition to providing a new `xref' backend, the patch also improves
the general handling of expl3 syntax.  Expl3 is the next-generation
LaTeX specification, and has for some time been available by default in
the LaTeX kernel.  The new syntax co-exists in many files with the
standard LaTeX2e syntax, so we try at least minimally to separate the
way modes handle the two specifications, both to reduce
visually-disturbing interference between them and also to improve the
`xref' backend.  (Bug#53749)

* lib-src/etags.c (TeX_commands): Improve parsing of commands in TeX
buffers.
(TEX_defenv): Expand list of commands to tag by default in TeX buffers.
(TeX_help):
* doc/emacs/maintaining.texi (Tag Syntax): Document new tagged commands.
(Identifier Search): Add note about semantic-symref-filepattern-alist,
auto-mode-alist, and xref-find-references.

* lisp/textmodes/tex-mode.el (tex-font-lock-suscript): Test for
underscore in expl3 files and regions, disable subscript face there.
(tex-common-initialization): Set up xref backend for in-tree TeX modes.
Detect expl3 files, and in others set up a list of expl3 regions.
(tex-expl-buffer-parse): New function called in previous.
(tex-expl-buffer-p): New variable to hold the result of previous.
(tex-expl-region-set): New function added to
'syntax-propertize-extend-region-functions' hook.
(tex-expl-region-list): New variable to hold the result of previous.
(tex--xref-backend): New function to identify the xref backend.
(tex--thing-at-point, tex-thingatpt--beginning-of-symbol)
(tex-thingatpt--end-of-symbol, tex--bounds-of-symbol-at-point):
New functions to return 'thing-at-point' for xref backend.
(tex-thingatpt-exclude-chars): New variable to do the same.
(xref-backend-identifier-at-point): New TeX backend method to provide
symbols for processing by xref.
(xref-backend-identifier-completion-table)
(xref-backend-identifier-completion-ignore-case)
(xref-backend-definitions, xref-backend-apropos): Placeholders to
call the standard 'etags' xref backend methods.
(xref-backend-references): Wrapper to call the default xref backend
method, finding as many relevant files as possible and using a bespoke
syntax-propertize-function when required.
(tex--collect-file-extensions, tex-xref-syntax-function): Helper
functions for previous.
(tex-find-references-syntax-table, tex--buffers-list)
(tex--xref-syntax-fun, tex--old-syntax-function): New variables for
the same.
2024-09-14 17:05:33 +02:00
Stefan Kangas
38de992a5a * etc/TODO: New item "support indentation guides".
Ref:
https://lists.gnu.org/r/emacs-devel/2024-07/msg01062.html
2024-09-14 16:36:56 +02:00
Eli Zaretskii
98e582e74a Fix indentation of Fortran do-loops
* lisp/progmodes/fortran.el (fortran-calculate-indent): Fix regexp
for do-loops.  Reported by Ken Mankoff <km@kenmankoff.com>.
(Bug#73218)
2024-09-14 17:18:57 +03:00
Eli Zaretskii
3e98ad3063 ; * etc/NEWS: Fix last change. 2024-09-14 15:42:15 +03:00