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

174923 Commits

Author SHA1 Message Date
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
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