1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-01 08:17:38 +00:00
Commit Graph

162564 Commits

Author SHA1 Message Date
Theodor Thornhill
40ff40198d Add js-ts-mode to eglot-server-programs
* lisp/progmodes/eglot.el (eglot-server-programs): Add js-ts-mode as
an alternative.  (Bug#59252)
2022-11-27 07:55:16 +01:00
Stefan Kangas
4a28f55149 Improve describe-text-properties display
* lisp/descr-text.el (describe-property-list): Don't propertize white
space with the 'help-argument-name' face.  This improves display
slightly when that face has an underline.
2022-11-27 07:32:13 +01:00
Yuan Fu
a3d8da2476
Make typescript-ts-mode not fallback to js-mode
1. js-mode might not be able to handle typescript file
2. Now that we use separate modes for tree-sitter modes, not falling
back makes tree-sitter modes more consistent

* lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode): Remove
the fallback code.
2022-11-26 15:40:25 -08:00
Yuan Fu
3fe5fc3dc1
Make bash-ts-mode fall back to sh-mode if the file isn't in Bash
* lisp/progmodes/sh-script.el (sh--guess-shell): Take out into a new
function.
(sh-base-mode): Use the new function.
(bash-ts-mode): Update docstring.
(sh--redirect-recursing): New variable.
(sh--redirect-bash-ts-mode): New function.
2022-11-26 15:40:25 -08:00
Jostein Kjønigsen
bd10c3cfa2
Correctly fontify types in typeof() expression in csharp-ts-mode
* lisp/progmodes/csharp-mode.el (csharp-ts-mode--font-lock-settings):
Add new pattern.
2022-11-26 15:40:24 -08:00
Yuan Fu
93c8220937
Reorganize treesit-font-lock-feaure-list's to the new level scheme
* lisp/progmodes/c-ts-mode.el (c-ts-mode--base-mode)
* lisp/progmodes/csharp-mode.el (csharp-ts-mode)
* lisp/progmodes/java-ts-mode.el (java-ts-mode)
* lisp/progmodes/js.el (js-ts-mode)
* lisp/progmodes/python.el (python-ts-mode)
* lisp/progmodes/sh-script.el (bash-ts-mode)
* lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode):
Reorganized treesit-font-lock-feature-list.
2022-11-26 15:40:24 -08:00
Yuan Fu
447b9d48d9
Add treesit-font-lock-level
This replaces font-lock-maximum-decoration and allows us to disable
the busiest fontification level by default.

* lisp/treesit.el (treesit-font-lock-level): New variable.
(treesit-font-lock-feature-list)
(treesit-font-lock-settings): Change docstring.
(treesit-font-lock-recompute-features): Use the new variable.
2022-11-26 15:40:24 -08:00
Yuan Fu
cc086f37e8
Add default limit for tree-sitter recursive tree-traversing function
This fixes bug#59426.

* src/treesit.c (treesit_search_dfs)
(treesit_build_sparse_tree): Remove no_limit parameter.
(Ftreesit_search_forward, Ftreesit_induce_sparse_tree): Use default
limit of 1000.

* doc/lispref/parsing.texi (Retrieving Nodes): Update manual.
2022-11-26 15:40:24 -08:00
Yuan Fu
d884b43634
Partially fix some python tests (bug#59477)
This fixes

python-font-lock-assignment-statement-multiline-1
python-font-lock-assignment-statement-multiline-2
python-font-lock-assignment-statement-multiline-3
python-font-lock-assignment-statement-multiline-4
python-font-lock-assignment-statement-multiline-5
python-font-lock-assignment-statement-multiline-6

but leaves

python-tests--fill-long-first-line

unfixed.

* lisp/progmodes/python.el (python-mode): Add the missing setup.
2022-11-26 15:40:24 -08:00
Jim Porter
14d54212ea Improve robustness of server.el tests
* lisp/emacs-lisp/ert.el (ert--insert-infos): Allow 'message' to be a
function that is called when inserting the info.
(ert-info): Update docstring to describe using a function for
MESSAGE-FORM.

* lisp/server.el (server-start): Log when the server is starting.

* test/lisp/server-tests.el (server-tests/can-create-frames-p): New
constant.  Use it to skip tests that need to create frames.
(server-tests/start-emacsclient): Rename to...
(server-tests/start-client): ... this, and set the process's buffer.
(server-tests/with-server): Put the server file in a temporary
directory so we don't conflict with real Emacs servers.
(server-tests/with-client): New macro...
(server-tests/server-start/stop-prompt-with-client)
(server-tests/emacsclient/server-edit)
(server-tests/emacsclient/create-frame)
(server-tests/emacsclient/create-frame): ... use it.
(server-tests/server-start/stop-prompt-with-client): Simplify.
2022-11-26 13:40:33 -08:00
Eric Abrahamsen
eb713a8fcc Remove mentions of create-directory nnmaildir setting
* lisp/gnus/nnmaildir.el (nnmaildir-open-server): The
'create-directory server parameter should have been removed entirely,
and supplanted by 'target-prefix. Remove check for old parameter.
* doc/misc/gnus.texi (Maildir): Delete mention from manual.
2022-11-26 12:15:45 -08:00
Paul Eggert
b27e8f2628 Update from Gnulib by running admin/merge-gnulib 2022-11-26 10:56:53 -08:00
Eli Zaretskii
d440ca47ed ; * src/treesit.c: Fix typos and wording in comments. 2022-11-26 17:50:36 +02:00
Juanma Barranquero
a22671dbd0 ; doc fix: Use w32-* names instead of obsolete ones
* doc/emacs/msdos.texi (Text and Binary): Describe
w32-(add|remove)-untranslated-fiesystem functions by
their non-obsolete name.
2022-11-26 15:53:21 +01:00
Stefan Kangas
bd5aa073d4 ; Don't mention Makefiles twice in (emacs) Program Modes
* doc/emacs/programs.texi (Program Modes): Don't mention Makefiles
twice.  (Bug#59610)
2022-11-26 15:49:02 +01:00
lu4nx
6e82403013 ; Clean up unused function: cuserid
* lib-src/ntlib.c (cuserid): Remove unused function.
2022-11-26 16:28:45 +02:00
Stefan Kangas
78ccae4447 ; * doc/emacs/programs.texi (Program Modes): Improve indexing. 2022-11-26 14:55:58 +01:00
Stefan Kangas
9319c124c9 Mention new programming language support in manual
* doc/emacs/programs.texi (Program Modes): Mention newly added support
for C#, TypeScript and JSON.
2022-11-26 14:30:49 +01:00
Stefan Kangas
65f355a0ad ; Fix typos 2022-11-26 14:30:02 +01:00
Augusto Stoffel
24c06a92e9 In project-find-file and the like, add absolute file name to history
* lisp/progmodes/project.el (project--read-file-cpd-relative): Add
absolute file name to history.
2022-11-26 14:34:11 +02:00
Eli Zaretskii
b84408647c Improve documentation of some posn-* functions
* lisp/subr.el (posn-object-x-y): Doc fix.

* doc/lispref/commands.texi (Click Events): More accurate
documentation of what are DX and DY in POSITION.
2022-11-26 13:56:30 +02:00
Eli Zaretskii
b3c9840066 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2022-11-26 13:55:56 +02:00
Eli Zaretskii
4dec4aadf6 Fix generation of autoloads on MS-Windows
* lisp/emacs-lisp/loaddefs-gen.el
(loaddefs-generate--file-load-name): Handle the case when FILE and
OUTFILE don't share any common ancestor directory.  (Bug#59507)
2022-11-26 12:59:06 +02:00
Po Lu
5281e85513 Reduce wasted cycles in x*.c
* src/xfns.c (compute_tip_xy, Fx_show_tip):
* src/xselect.c (x_own_selection, x_get_local_selection)
(x_clear_frame_selections): Call CAR and CDR, not Fcar and Fcdr.
2022-11-26 18:58:25 +08:00
Michael Heerdegen
2eccd6eb5f ; Fix some typos
* doc/emacs/programs.texi (Programming Language Doc):
* lisp/wid-edit.el (lazy): Fix typos.
2022-11-26 11:05:58 +01:00
Eli Zaretskii
34256906aa ; Add doc string to 'ucs-normalize-string'
* lisp/international/ucs-normalize.el (ucs-normalize-string): Add
a doc string.  (Bug#59603)
2022-11-26 10:55:49 +02:00
Stefan Kangas
30d4011b8a Use substitute-command-keys in Info-index error
* lisp/info.el (info--ensure-not-in-directory-node): New helper
function using substitute-command-keys for error message.
(Info-index, Info-virtual-index): Use it.
2022-11-26 09:37:48 +01:00
Brian Leung
372f8c5bff eglot-server-programs: ts-mode -> typescript-ts-mode
* lisp/progmodes/eglot.el (eglot-server-programs): Fix name of
'typescript-ts-mode' after rename from 'ts-mode'.  (Bug#59589)
2022-11-26 09:11:13 +01:00
Stefan Kangas
3dbe0cde0e ; * lisp/progmodes/csharp-mode.el: Add Commentary. 2022-11-26 09:04:39 +01:00
Yuan Fu
0369dcacf3
Fix tree-sitter assertion error (bug#59574)
* src/treesit.c (treesit_sync_visible_region): Initialize
visible_beg/end when tree is NULL.
2022-11-25 19:00:22 -08:00
Yuan Fu
4ffca85f1e
Rename treesit_ensure_position_synced to treesit_sync_visible_region
* src/treesit.c: Rename to better convey the purpose of the function.
2022-11-25 19:00:22 -08:00
Yuan Fu
245366b18a
; Add comments in treesit.c and treesit.h
* src/treesit.c
* src/treesit.h: Add (and fix) comments.
2022-11-25 19:00:22 -08:00
Yuan Fu
73c94d5a9f
; Fix comment-end in treesit-simple-indent-presets
* lisp/treesit.el (treesit-simple-indent-presets): Fix comment-end.
2022-11-25 19:00:22 -08:00
Yuan Fu
e9f86182ce
; * lisp/progmodes/csharp-mode.el: Add author and maintainer. 2022-11-25 19:00:18 -08:00
Jim Porter
154daf8367 ; * test/lisp/eshell/esh-var-tests.el: Fix incorrect paren placement. 2022-11-25 17:45:06 -08:00
Theodor Thornhill
7fc0eae28f Rename ts-mode to typescript-ts-mode
* lisp/progmodes/typescript-ts-mode.el: Rename from 'ts-mode' to
'typescript-ts-mode'.  Rename all symbols to match new prefix.
* etc/NEWS: Mention the new mode name.
Ref: https://lists.gnu.org/r/emacs-devel/2022-11/msg01587.html
2022-11-26 01:57:39 +01:00
Theodor Thornhill
0a8e724e37 Rename ts-mode.el to typescript-ts-mode.el
* lisp/progmodes/ts-mode.el: Move from here...
* lisp/progmodes/typescript-ts-mode.el: ...to here.
2022-11-26 01:57:37 +01:00
Po Lu
123e90f6d3 Fix no-accept-focus handling for embedded frames
* src/xterm.c (handle_one_xevent): Don't focus embedded frames
on click if they have `no-accept-focus' set.
2022-11-26 08:47:25 +08:00
Dmitry Gutov
2389158a31 Drop project--value-in-dir
Drop the project--value-in-dir mechanics, where the user could edit
the value in .dir-locals.el and have it applied instantly without
reverting the current buffer.  It made working in remote buffers with
enable-remote-dir-locals non-nil slower, which doesn't seem worth it
for a minor improvement of an infrequent operation.  Also less
compexity overall.

* lisp/progmodes/project.el (project-try-vc, project-files)
(project--vc-list-files, project-ignores, project-buffers):
Use the user options directly.
(project--vc-merge-submodules-p, project--value-in-dir):
Delete functions.
2022-11-25 23:52:46 +02:00
Jim Porter
698b202ddc ; * lisp/server.el (server-start): Fix a typo in a warning message. 2022-11-25 10:36:20 -08:00
Stefan Kangas
2557145f10 ; lisp/progmodes/which-func.el: Mark emacs-devel as maintainer. 2022-11-25 15:04:12 +01:00
Juanma Barranquero
ba6ead4854 ; * lisp/progmodes/which-func.el: Remove obsolete comment 2022-11-25 14:50:23 +01:00
F. Jason Park
3d02c8aabf Disable auth-source-pass-extra-query-keywords by default
* doc/misc/auth.texi: Mention subdomain matching in
`auth-source-pass-extra-query-keywords' section.
* etc/NEWS: Mention the loss of traditional auth-source-pass features
when `auth-source-pass-extra-query-keywords' is enabled.
* lisp/auth-source-pass (auth-source-pass-extra-query-keywords): Set
default to nil.  Mention domain matching in doc string.
(auth-source-pass--match-regexp): Allow username to contain "@".
* lisp/erc/erc-compat.el:
(erc-compat--29-auth-source-pass--retrieve-parsed): Adjust regexp.
* test/lisp/auth-source-pass-tests.el
(auth-source-pass-extra-query-keywords--suffixed-user): make plain
username more email-like.
(Bug#58985.)
2022-11-25 05:37:01 -08:00
Eli Zaretskii
94a8a8c4fe ; * lisp/progmodes/python.el (treesit-node-prev-sibling): Declare. 2022-11-25 15:36:18 +02:00
Eli Zaretskii
af54523431 ; Fix doc strings in xref.el
* lisp/progmodes/xref.el (xref-history-storage)
(xref-global-history, xref-window-local-history): Doc fixes.
2022-11-25 15:29:10 +02:00
Eli Zaretskii
98c69b2556 ; * src/sqlite.c (Fsqlite_version): Doc fix. 2022-11-25 15:00:07 +02:00
Mattias Engdegård
f35dc7058b Add sqlite library version string retrieval function (bug#58766)
* src/sqlite.c (sqlite3_libversion, load_dll_functions):
Make sqlite3_libversion available.
(Fsqlite_version): New.
(syms_of_sqlite): Define sqlite-version.
* doc/lispref/text.texi (Database): Document.
* test/src/sqlite-tests.el (sqlite-returning): `RETURNING` was added
in sqlite 3.35; skip the test for older versions.
2022-11-25 11:03:10 +01:00
Theodor Thornhill
8910447308 Fix regex errors in csharp-mode
* lisp/progmodes/csharp-mode.el (csharp-guess-basic-syntax):
Repetition errors in regex.

(csharp-compilation-re-xbuild-warning): Make regex match regex for
xbuild-error.
2022-11-25 10:54:54 +01:00
Alan Mackenzie
639adf26a1 CC Mode: Fix the "asymmetry rule" for fontifying a type followed by *
This fixes bug #59427.  We now handle correctly the case when a parenthesis
follows the * which is ambiguously a multiplication or indirection operator.
Also, we don't recognise a type thus found as a found type - the evidence is
too weak.

* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): Fix CASE 17.5 as
above.
2022-11-25 09:49:02 +00:00
Stefan Kangas
a7f8087d7f Remove unused parameter from image_create_pix_container
* src/image.c (image_create_pix_container): Remove unused
frame parameter. Update callers.
2022-11-25 10:18:11 +01:00