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

174871 Commits

Author SHA1 Message Date
Eli Zaretskii
4c5ab949fb ; * lisp/emacs-lisp/lisp.el (delete-pair-push-mark): Add :version. 2024-09-21 13:23:50 +03:00
Paul Nelson
a48672c6bb Add option for delete-pair to mark end of region
* lisp/emacs-lisp/lisp.el (delete-pair-push-mark): New user option.
(delete-pair): Use it.  (Bug#73284)

* etc/NEWS: Announce the new user option.
2024-09-21 13:20:59 +03:00
Eli Zaretskii
39d2cc36b2 ; * etc/NEWS: Fix last change. 2024-09-21 12:42:43 +03:00
Vincenzo Pupillo
b0523dffab Add user option to enable Doxygen syntax highlighting (bug#72814)
Both 'c-ts-mode' and 'java-ts-mode' have a new user option,
'c-ts-mode-enable-doxygen' and 'java-ts-mode-enable-doxygen'
(defaults to nil) which allow to enable syntax highlighting
of comment blocks based on the Doxygen grammar.

* lisp/progmodes/c-ts-mode.el: Add the 'c-ts-mode-enable-doxygen'
user option variable to disable doxygen grammar.
Notifies the user if doxygen grammar is not available.
* lisp/progmodes/c-ts-mode.el (c-ts-mode, c++-ts-mode): Use the
new 'c-ts-mode-enable-doxygen' option.
* lisp/progmodes/java-ts-mode.el: Add the
'java-ts-mode-enable-doxygen' user option variable to disable
doxygen grammar.  Notifies the user if doxygen grammar is not
available.
* lisp/progmodes/java-ts-mode.el (java-ts-mode): Use the new
'java-ts-mode-enable-doxygen' option.

* etc/NEWS: Document the change.
2024-09-21 12:39:34 +03:00
Eli Zaretskii
a513f2a4dd Fix 'regexp-replace' in WDired
* src/search.c (Freplace_match): Remove the test that
search_regs.num_regs != num_regs.  It is deemed unnecessary now,
and could produce false positives.  (Bug#73018)
2024-09-21 12:30:49 +03:00
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
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
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
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
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
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
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
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
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
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