1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-27 23:50:30 -08:00
Commit graph

165763 commits

Author SHA1 Message Date
Michal Dubiel
9d334f558a eglot: Support signature labels without a function name
* lisp/progmodes/eglot.el (eglot--sig-info): Support signature labels
without a function name.  (Bug#58777)

Copyright-paperwork-exempt: yes
2022-11-12 22:29:42 +01:00
Theodor Thornhill
67f9705fc0
Add tree-sitter modes for C-like languages
* etc/NEWS: Mention the new modes
* lisp/progmodes/c-ts-mode.el: New major mode with tree-sitter support
for C and C++.
* lisp/progmodes/java-ts-mode.el: New major mode with tree-sitter support.
* lisp/progmodes/json-ts-mode.el: New major mode with tree-sitter support.
* lisp/progmodes/css-ts-mode.el: New major mode with tree-sitter support.
2022-11-12 12:17:35 -08:00
Morgan Smith
4ccc385ab1 vc-git: Ensure git doesn't try to colorize stashes
* lisp/vc/vc-git.el (vc-git-stash-show): Add --color=never to git
flags.  (Bug#59158)
2022-11-12 20:34:50 +01:00
Shohei YOSHIDA
d794f1d3f2 Add cperl-mode to eglot-server-programs 2022-11-12 20:33:02 +01:00
Alan Mackenzie
f8c11b5a92 .dir-locals.el (C entry). Add NO_INLINE to c-noise-macro-names 2022-11-12 15:30:38 +00:00
Po Lu
e7614cc9ac Correctly handle key map updates on Haiku
* src/haiku_support.cc (MessageReceived): Handle
B_KEY_MAP_LOADED by clearing the previous keymap.
2022-11-12 13:11:00 +00:00
Eli Zaretskii
7d592db0ab Document that 'transient-mark-mode' is off in batch mode
* doc/emacs/mark.texi (Mark, Disabled Transient Mark): Document,
belatedly, that 'transient-mark-mode' is turned on by default only
in interactive sessions.  (Bug#59201)
2022-11-12 13:10:24 +02:00
Po Lu
2bac9d4693 Handle request serial wraparound more correctly
* src/xterm.c (X_COMPARE_SERIALS): Remove macro.
(x_is_serial_more_than, x_is_serial_more_than_or_equal_to)
(x_is_serial_less_than, x_is_serial_less_than_or_equal_to): New
functions.
(x_find_error_handler, x_request_can_fail)
(x_clean_failable_requests, x_stop_ignoring_errors): Use those
functions to perform request serial comparison.
2022-11-12 19:01:30 +08:00
Po Lu
505e8c5b29 ; * src/xselect.c (x_handle_selection_request): Fix typo in last change. 2022-11-12 19:01:30 +08:00
Po Lu
25c6bc7a3d Fix implementation of MULTIPLE
* src/xselect.c (x_handle_selection_request): Make sure the type
of a reply to a MULTIPLE request is ATOM_PAIR.
2022-11-12 19:01:30 +08:00
Eli Zaretskii
faf44e2c61 Fix recent changes in documentation
* lisp/treesit.el (treesit-node-at): Doc fix.

* doc/lispref/parsing.texi (Language Definitions): Add
cross-reference.
(Retrieving Nodes): Renamed from "Retrieving Node"; all references
changed.
(Retrieving Nodes): Fix wording and markup.
2022-11-12 10:57:56 +02:00
Stefan Kangas
75fb59c55e * doc/lispref/intro.texi: Fix PDF output without VERSION. (Bug#59199) 2022-11-12 09:28:18 +01:00
Eli Zaretskii
26730d20cc ; * lisp/dired.el (dired--unhide): Remove FIXME. (Bug#59047) 2022-11-12 09:04:42 +02:00
Po Lu
0aea7da80b * lisp/xwidget.el: Improve Commentary. 2022-11-12 07:06:53 +01:00
Stefan Kangas
b5346eb84d Prefer defvar-keymap in cus-theme.el
* lisp/cus-theme.el (custom-new-theme-mode-map)
(custom-theme-choose-mode-map): Prefer defvar-keymap.
2022-11-12 07:02:30 +01:00
Yuan Fu
e333f040e9
; * lisp/treesit.el (treesit--indent-1): Fix treesit-node-at usage. 2022-11-11 21:37:29 -08:00
Yuan Fu
5cd3db73be
Improve treesit-node-at
* doc/lispref/parsing.texi (Retrieving Node): Update manual.
* lisp/treesit.el (treesit-node-at): Change semantic.  It tries to
return the node that a user would expect in various circumstances.
* test/src/treesit-tests.el (treesit-node-at): New test.
2022-11-11 20:04:38 -08:00
Dmitry Gutov
d2f956807e project--buffer-list: Remove as unused
* lisp/progmodes/project.el (project--buffer-list):
Remove as unused (pointed out in bug#59153 by Juri).
2022-11-12 03:34:41 +02:00
Eric Abrahamsen
0a4f73d300 Mention obsolete gnus/nnir package in Gnus manual
* doc/misc/gnus.texi (nnir): Provide some hints for upgrade.
2022-11-11 10:59:00 -08:00
Brian Leung
be17456063 Make Eglot consider FileSystemWatcher.kind when watching files
bug#58677

* eglot.el (eglot-register-capability
  workspace/didChangeWatchedFiles): Rework

Only send notifications of interest, as determined by the optional LSP
FileSystemWatcher.kind bitmask provided by the server.

When the FileSystemWatcher.kind property is omitted, use the default
value of 7, which is computed from taking the bitwise OR operation
WatchKind.Create (1) | WatchKind.Change (2) | WatchKind.Delete (4).
2022-11-11 15:22:06 +00:00
Stefan Kangas
6f48b46b03 ; Fix typos 2022-11-11 15:52:37 +01:00
Stefan Kangas
014176f283 ; * lisp/xwidget.el: Improve Commentary. 2022-11-11 15:27:13 +01:00
Gerd Möllmann
6d9065b748 Fix &key parameters called without arguments (bug#58714)
* lisp/emacs-lisp/cl-macs.el (cl--do-arglist): Check for missing
argument.
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-&key-arguments): New test.
2022-11-11 14:13:46 +01:00
Stefan Kangas
c64d94c849 eglot: Remove menu entry for manual
* lisp/progmodes/eglot.el (eglot-manual): Make obsolete.  Open the
eglot info manual instead of the less exhaustive README.
(eglot-menu): Remove entry for reading the manual.  (Bug#58892)
2022-11-11 13:58:37 +01:00
João Távora
23b49c0178 ; Tweak comment in lisp/progmodes/eglot.el (bug#58790)
* lisp/progmodes/eglot.el (eglot--uri-to-path): Tweak comment.
2022-11-11 09:31:00 +00:00
Eli Zaretskii
05d1186b7a ; Fix a typo in last change. 2022-11-11 10:22:29 +02:00
Eli Zaretskii
d764a2bfa8 ; * lisp/progmodes/eglot.el (eglot--path-to-uri): Improve commentary. 2022-11-11 10:21:45 +02:00
Eli Zaretskii
161cb6034c ; * CONTRIBUTE: Clarify the log message line width guidelines. 2022-11-11 09:14:14 +02:00
Stefan Kangas
0f53523775 Remove redundant library installation instructions
* lisp/apropos.el:
* lisp/mail/feedmail.el:
* lisp/mail/mail-hist.el:
* lisp/org/org-ctags.el:
* lisp/org/org-protocol.el:
* lisp/progmodes/ebnf2ps.el:
* lisp/progmodes/mixal-mode.el:
* lisp/progmodes/perl-mode.el:
* lisp/savehist.el:
* lisp/textmodes/table.el:
* lisp/vc/smerge-mode.el: Remove redundant installation instructions
for packages bundled with Emacs.
2022-11-11 04:29:29 +01:00
Po Lu
ea8ed105fd Slightly adjust EWMH frame activation code for child frames
* src/xterm.c (x_get_toplevel_parent): New function.
(x_focus_frame): Do not use EWMH activation in two cases: focus
transfers to child frames (this is not guaranteed to work if the
focus and the child frame do not share the same toplevel) or
focus transfers from child frames to their toplevel parents.
2022-11-11 10:31:57 +08:00
Stefan Kangas
52d9c51816 * lisp/progmodes/hideshow.el: Improve Commentary. 2022-11-11 01:55:11 +01:00
Stefan Kangas
025d28ed89 Prefer defvar-keymap in hideshow.el
* lisp/progmodes/hideshow.el (hs-minor-mode-map): Prefer
defvar-keymap.
2022-11-11 01:48:42 +01:00
Yuan Fu
4489450f37
In end-of-defun, terminate early if no further defun exists
Before this change, end-of-defun calls end-of-defun-function even if
point is not necessarily at the beginning of a defun (contrary to what
end-of-defun-function's docstring claims).  Now it terminates early
and doesn't call end-of-defun-function.

* lisp/emacs-lisp/lisp.el (beginning-of-defun-raw): Update docstring
clarifying the return value.
(end-of-defun): Terminate early if beginning-of-defun-raw returns nil.
2022-11-10 15:00:29 -08:00
dannyfreeman
1a2d603bb3 Eglot: Only handle URIs with the file:// scheme (bug#58790)
Eglot will not attempt to parse URIs that are not file:// type at all.
Instead let 'file-name-handler-alist' entries to deal with those.  Not
parsing them at all allows the 'file-name-handler-alist' regexps to
identify them more accurately.

By also checking if Eglot received a URI in 'eglot--path-to-uri',
'file-name-handler-alist' can provide the non-file type URI back to
the lsp server, which presumably will know how to handle them since it
is also giving them out to clients.

This issue originated with clojure-lsp sending clients "jar:" type
URIs that Emacs is unable to handle out of the box.  Before this
change, "jar:" URIs were parsed once, but since they contain a nested
URI, this resulted in a file being dispatched with a partially parsed
path that looked like "file://path/to.jar!/path/in/jar".

* lisp/progmodes/eglot.el (eglot--path-to-uri): Noop if already an
URI.  (eglot--uri-to-path):  Only handle file:// URIs
2022-11-10 22:39:09 +00:00
Yuan Fu
98ed6db34f
; Fix docstring graph alignment in Ftreesit_search_forward
* src/treesit.c (Ftreesit_search_forward): Replace tabs with spaces.
2022-11-10 14:16:25 -08:00
João Távora
c3b64985aa Improve Eglot's docstrings and manual
The examples in the manual can now be copy-pasted to user's init
files as-is.

* doc/misc/eglot.texi (Setting Up LSP Servers): Use
`with-eval-after-load'.  Add eglot-alternatives example.
(Customizing Eglot): Use 'require and fix  a typo.

* lisp/progmodes/eglot.el (eglot-server-programs): Mention
eglot-alternatives in eglot-server-program's docstring.
2022-11-10 21:10:49 +00:00
Juri Linkov
2e8551c076 ; * lisp/tab-line.el (tab-line-cache-key-function): Fix docstring (bug#57848). 2022-11-10 20:35:58 +02:00
Yuan Fu
2ec403f777
Utilize new face font-lock-escape-face in python-mode
* lisp/progmodes/python.el (python--treesit-settings): Use
font-lock-escape-face rather than font-lock-constant-face.
2022-11-10 10:34:57 -08:00
Yuan Fu
c5e3b99467
Accept older versions of tree-sitter library
* configure.ac: Accept a tree-sitter library as long as it provides
ts_set_allocator.
2022-11-10 10:25:29 -08:00
Eli Zaretskii
53f25609fc Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2022-11-10 19:18:28 +02:00
Evgeni Kolev
c833b291f5 Ignore errors when shutting down all LSP servers (bug#59146)
eglot-shutdown-all has a bug that results in partially stopping
servers: when a server shutdown timeouts (1.5s), an error is
propagated and eglot-shutdown-all does not try to shutdown the rest of
the servers.

* eglot.el (eglot-shutdown-all): Ignore errors when shutting down
  servers, converting errors to messages.
2022-11-10 17:18:13 +00:00
Eli Zaretskii
702a47f4f6 Don't reset the inbox buffer's modified status in Rmail
* lisp/mail/rmail.el (rmail-get-new-mail-1): Don't mark the buffer
unmodified if it was modified before getting new mail.  (Bug#59108)
2022-11-10 19:16:40 +02:00
Arash Esbati
dc4aef3b85 Support 'texlab' LSP server in Eglot OOTB
* lisp/progmodes/eglot.el (eglot-server-programs): Add support for
'texlab' LSP server for tex-mode and similar languages.
2022-11-10 19:03:10 +02:00
Alan Mackenzie
ed067f08fe Add to /etc/NEWS a mention of the new C++20 support in CC Mode
* etc/NEWS.  A new section about C++20 support.

* lisp/progmodes/cc-defs.el (c-version): Update to 5.35.2.
2022-11-10 11:57:42 +00:00
Robert Pluim
ab4edbf60e ; * lisp/font-lock.el (font-lock-bracket-face): Improve docstring 2022-11-10 12:46:03 +01:00
Robert Pluim
a5a047a07f ; * lisp/treesit.el (treesit-font-lock-rules): Improve docstring 2022-11-10 12:45:14 +01:00
Eli Zaretskii
f5084ed197 ; * etc/NEWS: Fix last change. 2022-11-10 13:04:42 +02:00
Randy Taylor
e06953b02a Add more font-lock faces (Bug#58940)
* lisp/font-lock.el (font-lock-bracket-face, font-lock-delimiter-face,
font-lock-escape-face, font-lock-number-face,
font-lock-misc-punctuation-face, font-lock-operator-face,
font-lock-property-face, font-lock-punctuation-face): Define new
faces.
* lisp/cus-theme.el (custom-theme--listed-faces): Add them to the
list.
* doc/lispref/modes.texi (Faces for Font Lock): Document them.
* etc/NEWS: Mention them.
2022-11-10 13:03:41 +02:00
Eli Zaretskii
2a7f01aa38 Fix initialization of module functions
* src/emacs-module.c (allocate_module_function): Fix
initialization of module functions.  Suggested by Richard Copley
<rcopley@gmail.com>.  (Bug#59104)
2022-11-10 12:55:16 +02:00
kobarity
f8df45f853 Fix indentation for multi-line block start in Python mode
* lisp/progmodes/python.el
(python-info-dedenter-opening-block-positions): Fix for multi-line
block start.
* test/lisp/progmodes/python-tests.el
(python-info-dedenter-opening-block-positions-6): New test. (Bug#59009)
2022-11-10 12:23:52 +02:00