1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-17 19:30:38 -08:00
Commit graph

90822 commits

Author SHA1 Message Date
Yuan Fu
f446bfc819
; * lisp/emacs-lisp/eldoc.el (eldoc-doc-buffer-separator): Fix doc. 2023-03-24 12:29:33 -07:00
Eli Zaretskii
4a2dccd6a6 Fix invocation of elixir LSP server on MS-Windows
* lisp/progmodes/eglot.el (eglot-server-programs): Invoke the
elixir-ls LSP via a batch file if using an MS-Windows shell.
(Bug#62407)
2023-03-24 21:37:11 +03:00
João Távora
e79b4ccd79 Allow users to customize eldoc buffer separator (bug#62029)
* lisp/emacs-lisp/eldoc.el (eldoc-doc-buffer-separator): New
variable.
(eldoc--format-doc-buffer): Use it.
2023-03-24 17:37:42 +00:00
João Távora
a384401eab Eldoc: slightly enhance meaning of :echo option
Can now be a string to echo instead of a larger docstring.

* lisp/emacs-lisp/eldoc.el (eldoc-documentation-functions):
Describe :echo.
(eldoc--echo-area-render): Allow :echo to be string.
2023-03-24 17:37:42 +00:00
João Távora
541eec259b Eldoc: fix bug recently introduced in "old" protocol
In the "old" protocol, eldoc-documentation-strategy is actually used
as the deprecated eldoc-documentation-function and it is itself the
"origin" of the doc snippet to be displayed.

* lisp/emacs-lisp/eldoc.el (eldoc--invoke-strategy): Fix.
2023-03-24 15:08:50 +00:00
JD Smith
4566a0c6b8 Eglot: let user opt-in to plaintext LSP docs (bug#61373)
* lisp/progmodes/eglot.el
(eglot-prefer-plaintext): New variable.
(eglot-client-capabilities): Use it.

Copyright-paperwork-exempt: yes
2023-03-23 21:14:21 +00:00
João Távora
fe8af4eb30 Eglot: don't send invisible text to Eldoc
Eglot's rendering of Markdown is imperfect and based on gfm-view-mode.
To make it slightly better, don't send invisible text in
eglot-hover-eldoc-function.

* lisp/progmodes/eglot.el (eglot--format-markup): Hide invisible text.
2023-03-23 21:14:21 +00:00
João Távora
67c1e6e89c Eglot: inform ElDoc about overly long 'hover' docs
* lisp/progmodes/eglot.el (eglot-hover-eldoc-function): Include :echo
  info in return value.
2023-03-23 21:14:21 +00:00
João Távora
e19994fe8c ElDoc: rework rendering of echo area (bug#62029)
Previously, the display function 'eldoc-display-in-echo-area' reused
the same buffer as 'eldoc-display-in-doc-buffer', but that made it
harder to render documentation items differently depending on the
specific constraints of each display functions.

Allow documentation-generating backends to pass an :echo-area property
for tweaking the echo area display of certain documentation items.

* lisp/emacs-lisp/eldoc.el (eldoc-documentation-functions): Update docstring.
(eldoc--doc-buffer-docs): Remove.
(eldoc--format-doc-buffer): Simplify.
(eldoc--echo-area-render): New helper.
(eldoc-display-in-echo-area): Use 'eldoc--echo-area-render'.
2023-03-23 21:14:18 +00:00
João Távora
9b18407c7f ElDoc: remember origin backend in doc snippets (bug#62029)
This lays groundwork for discriminating between different
documentation providers in ElDoc display outlets, i.e. members
of eldoc-display-functions

* lisp/emacs-lisp/eldoc.el (eldoc--make-callback): Take extra origin arg.
(eldoc-documentation-compose-1)
(eldoc-documentation-compose-eagerly)
(eldoc-documentation-default): Pass extra arg to eglot--make-callback.
(eldoc--invoke-strategy): Rework.
(eldoc-documentation-functions): Work docstring.
2023-03-23 21:14:15 +00:00
João Távora
0effdb29d6 Eglot: rework progress indicators
Show progress indicator in Eglot's mode line by default.

* lisp/progmodes/eglot.el (eglot-report-progress): Work docstring.
(eglot--mode-line-format): Rework.
(eglot-handle-notification $/progress): Rework.
2023-03-23 21:12:18 +00:00
João Távora
f20fe3e11a Eglot: more leniently handle 'window/showMessageRequest'
Some servers mess up this message's arguments.

* lisp/progmodes/eglot.el (eglot-handle-request): Fix.
2023-03-23 21:12:08 +00:00
Michael Albinus
b19d040a4f New user option remote-file-name-inhibit-auto-save
* doc/misc/tramp.texi (Auto-save File Lock and Backup):
Mention remote-file-name-inhibit-auto-save.
(Frequently Asked Questions): Describe, how to suppress auto-save.

* etc/NEWS: Add remote-file-name-inhibit-auto-save.

* lisp/simple.el (remote-file-name-inhibit-auto-save): New defcustom.
(auto-save-mode): Handle it.  (Bug#62260)

* lisp/net/tramp-integration.el
(tramp-set-connection-local-variables-for-buffer): Declare.
(find-file-hook): Add `tramp-set-connection-local-variables-for-buffer'.
2023-03-23 17:09:52 +01:00
Eli Zaretskii
6731c8827b ; * lisp/progmodes/eglot.el (eglot-server-programs): Fix last change. 2023-03-23 10:48:31 +02:00
Wilhelm H Kirschbaum
50a2b34ca7 Add heex-ts-mode to eglot-server-programs (bug#62327)
The same language server is used for elixir and heex modes.

* lisp/progmodes/eglot.el (eglot-server-programs): Add heex-ts-mode.
2023-03-23 10:48:10 +02:00
Stefan Kangas
90dca0a533 Merge from origin/emacs-29
6de00e4df9 ; Fix xref-match's :version since the default value did c...
db355b420b Use libgccjit-10-dev on EMBA
8496395653 * lisp/outline.el (outline--fix-buttons-after-change): Ad...
3d3bbaace6 Align concatenated strings to the first sibling in c-ts-mode
f856468e45 Only fill the current paragraph in c-ts-common--fill-bloc...
df669c5a11 Add missing indent rule for c-ts-mode
2023-03-23 06:30:13 +01:00
Dmitry Gutov
6de00e4df9 ; Fix xref-match's :version since the default value did change 2023-03-23 02:44:54 +02:00
Sean Whitton
e11813d574 Make icomplete-tidy-shadowed-file-names into a defcustom
lisp/icomplete.el (icomplete-tidy-shadowed-file-names): Make variable
into a defcustom.
2023-03-22 12:14:43 -07:00
Felician Nemeth
c5f369bacc Subject: send clientInfo during the initialize request
'clientInfo' arrived in LSP 3.15.0.  LSP clients can use clientInfo to
identify themselves in the initialize request.  This is generally
useful for various debugging tasks.

* lisp/progmodes/eglot.el (eglot--connect): Send clientInfo.
Author:
2023-03-22 18:34:45 +00:00
Juri Linkov
8496395653 * lisp/outline.el (outline--fix-buttons-after-change): Add save-match-data.
It's important for a hook in after-change-functions not to change match-data.
Otherwise it breaks functions that make changes in the buffer, such as
for example, successive calls to delete-region in smerge-keep-n, etc.
2023-03-22 09:44:02 +02:00
Yuan Fu
3d3bbaace6
Align concatenated strings to the first sibling in c-ts-mode
* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): Change rule.
2023-03-21 23:27:20 -07:00
Yuan Fu
f856468e45
Only fill the current paragraph in c-ts-common--fill-block-comment
* lisp/progmodes/c-ts-common.el:
(c-ts-common--fill-block-comment): Shrink the filled region to the
paragraph at point.
2023-03-21 22:50:03 -07:00
Stefan Kangas
2d0de86361 Merge from origin/emacs-29
8b6a0de964 Improve docstring of treesit-parent-while (bug#62301)
35648a8673 ; Delete accidental leftover '()' Eglot function
47d8e4b0d3 Eglot: report window/workDoneProgress capability to langu...
4a7a0c9a9f * lisp/emacs-lisp/comp.el (comp-emit-set-call-subr): Impr...
4a6eefb93a Expand defvar-keymap documentation
7a1272168a * lisp/treesit.el (treesit-end-of-defun): Guard arg again...
263d6c3853 Comp fix calls to redefined primtives with op-bytecode (b...
6bf441ff11 Warn package authors away from keymap-unset with REMOVE
786de66ec3 Comment out jobs on EMBA
eed240bc02 Improve defvar-keymap docstring.
2023-03-22 06:30:12 +01:00
Stefan Monnier
5904bdf581 (describe-function): Load file for `...' references
To fix bug#62300, we do the same for `...' as we already did for \[...]

* help-fns.el (describe-function-1): Look for `...' references in
addition to key substitution markup.
2023-03-21 21:48:24 -04:00
Yuan Fu
df669c5a11
Add missing indent rule for c-ts-mode
* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): New rule for case.
* test/lisp/progmodes/c-ts-mode-resources/indent.erts: New test.
2023-03-21 16:24:29 -07:00
Yuan Fu
8b6a0de964
Improve docstring of treesit-parent-while (bug#62301)
* doc/lispref/parsing.texi (Retrieving Nodes): Improve and fix
docstring for treesit-parent-until and treesit-parent-while.
* lisp/treesit.el (treesit-parent-while): Improve docstring.
2023-03-21 14:51:41 -07:00
Michael Albinus
4a5ff4d9c6 Invert variable alias declaration in Tramp
* lisp/net/tramp-sh.el (tramp-use-ssh-controlmaster-options):
Invert alias declaration.  (Bug#62295, Bug#62329)
2023-03-21 21:24:13 +01:00
Michael Albinus
dec09aaeb6 Improve Tramp backward compatibility
* lisp/net/tramp-gvfs.el (while-no-input-ignore-events):
Add `dbus-event' for older Emacs versions.
2023-03-21 16:14:40 +01:00
João Távora
35648a8673 ; Delete accidental leftover '()' Eglot function
* lisp/progmodes/eglot.el (eglot--workspace-configuration-plist):
Remove ().
2023-03-21 14:43:11 +00:00
João Távora
47d8e4b0d3 Eglot: report window/workDoneProgress capability to language server
In bug#59149, LSP progress reporting was implemented, but Eglot's
'capabilities' statement to the server wasn't changed to include
window/workDoneProgress.

* lisp/progmodes/eglot.el (eglot-client-capabilities): Actually
report workDoneProgress.
2023-03-21 14:43:11 +00:00
Andrea Corallo
4a7a0c9a9f * lisp/emacs-lisp/comp.el (comp-emit-set-call-subr): Improve 263d6c3853 2023-03-21 12:10:31 +01:00
Dmitry Gutov
7a1272168a * lisp/treesit.el (treesit-end-of-defun): Guard arg against nil (bug#62158). 2023-03-20 20:18:42 +02:00
Andrea Corallo
263d6c3853 Comp fix calls to redefined primtives with op-bytecode (bug#61917)
* lisp/emacs-lisp/comp.el (comp-emit-set-call-subr): Fix compilation
of calls to redefined primtives with dedicated op-bytecode.
* test/src/comp-tests.el (61917-1): New test.
2023-03-20 19:01:26 +01:00
Robert Pluim
eed240bc02 Improve defvar-keymap docstring.
* lisp/keymap.el (defvar-keymap): Improve description of ':enter' and
':exit' usage for ':repeat' keyword.
2023-03-20 09:47:32 +01:00
Stefan Kangas
42fba8f36b Merge from origin/emacs-29
b7f0333355 Improve warning about changing the string returned by sym...
e62f8b0239 Fix visiting XBM/XPM files when 'c-ts-mode' is active
94d1c81cf0 * lisp/mpc.el (mpc-format): Fix oversight in commit 48b6c...
a4d97811ed Bail early from eglot--apply-text-edits if nothing to do
61d571760b ; Clarify in-code commentary of eglot--after-change
5bbbd70f56 Improve ergonomics of Eglot's inlay hints
c3a543123a Protect against too large size of 'recent-keys' vector
231190b37f * lisp/net/tramp.el (tramp-yn-prompt-regexp): Fix regexp.
0bebd0e5f0 ; Remove 'build-module' and 'html-manual' directories fro...
6674c362ad Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/...
829e5dfabe Update to Org 9.6.1-48-g92471e
e84f878e19 ; * admin/notes/tree-sitter/starter-guide: Update starter...
ea0949853f Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/...
11592bcfda ; * lisp/nxml/xmltok.el (xmltok-scan-attributes): Fix las...
e388a77cf0 ; Minor copyedits of recent changes in ELisp reference ma...
33a2670368 ; Minor fixes in recent Eglot changes
d2cf1386fa ; * doc/misc/eglot.texi (Eglot Commands): Improve indexing.
b75e489362 ; Again correct node reference casing in doc/misc/eglot.texi
a55d2edc5a ; Remove overly verbose commentary
22a70451f3 Merge confusing duplicate sections on commands in Eglot m...
3293f93988 Don't take over mouse-1 binding on Eglot diagnostics (bug...
013057e351 ; Prefer "language server" to "LSP server" in Eglot manual
94a21c8864 * lisp/progmodes/eglot.el (eglot--connect): Improve Tramp...
0eddfa28eb Avoid slowdowns in xmltok-scan-attributes
647c6bf2a6 ; * test/lisp/abbrev-tests.el (abbrev--possibly-save-test...
531f8f7103 ; * admin/git-bisect-start: Update failing commits

# Conflicts:
#	admin/notes/tree-sitter/build-module/batch.sh
#	admin/notes/tree-sitter/build-module/build.sh
2023-03-20 06:30:40 +01:00
Stefan Kangas
bcbfb88c2f Merge from origin/emacs-29
aedb9e3ec3 Add tests for Bug#62207
faee8d5073 ; Fix 'make-obsolete-variable' forms
2023-03-20 06:30:39 +01:00
Stefan Kangas
20d8a1cf4b Merge from origin/emacs-29
ea87c54f35 ; * lisp/subr.el (setq-local): Add missing period (bug#62...
90362f87d5 ; Correct last commit, downcase node reference
38067f05b9 Enhance section about troubleshooting in Eglot manual.
6f82596b49 Fix Eglot's snippet insertion to follow the manual
c54bda15e3 Reset abbrevs-changed after saving abbrevs (bug#62208)
e8cee15f78 ; Fix markup in previous change
e4a7d0cd6e Document `keymap-unset' in lispref
bb3e0ded9e Don't add a key binding when REMOVE is non-nil
a4a9ffdd80 Fix the documentation of various aspects of adding Xref h...
a2222b9a9b ; Minor wording fix in ELisp reference manual
5cf1de683b Fix python-fill-paragraph problems on filling strings (bu...
7385c991df Also exempt eglot-inlay-hints-mode from desktop.el's fumb...
1961bdb52e ; Add WebDAV entry to index in Tramp manual
dfb36d3623 Refer to EWW instead of w3 and w3m
9d3fdf7e0d Fix Eglot's command generation for code actions

# Conflicts:
#	etc/NEWS
2023-03-20 06:30:32 +01:00
Stefan Kangas
c194a31fc4 Merge from origin/emacs-29
028f110273 Fix quoting of font-family in 'hfy-family'
4cb8a850b0 ; Tweak doc/misc/eglot.texi
d5d4959ed7 Document how to construct JSONRPC arrays in Eglot manual
078cf512ee * test/infra/Dockerfile.emba: Use debian:bullseye.
61adb44318 * configure.ac: Fix native comp compatibility check (bug#...
d814c249f4 * test/infra/Dockerfile.emba: Install clangd.
27edd7f88c Remove 'package-vc--query-spec'
39fea11551 Do not store :lisp-dir in package descriptors
168165178f Use 'package-vc-selected-packages' to store package specs
2023-03-20 06:30:30 +01:00
Eli Zaretskii
e62f8b0239 Fix visiting XBM/XPM files when 'c-ts-mode' is active
* lisp/progmodes/c-ts-mode.el (treesit-ready-p): Fix association
for XBM/XPM files in 'auto-mode-alist'.  (Bug#62276)
2023-03-19 22:19:52 +02:00
Stefan Monnier
94d1c81cf0 * lisp/mpc.el (mpc-format): Fix oversight in commit 48b6cec61c 2023-03-19 16:02:52 -04:00
João Távora
a4d97811ed Bail early from eglot--apply-text-edits if nothing to do
* lisp/progmodes/eglot.el (eglot--apply-text-edits): Early return.
2023-03-19 19:53:48 +00:00
João Távora
61d571760b ; Clarify in-code commentary of eglot--after-change
* lisp/progmodes/eglot.el (eglot--after-change): Minor
clarification to commentary.
2023-03-19 19:53:48 +00:00
João Távora
5bbbd70f56 Improve ergonomics of Eglot's inlay hints
Instead of deleting inlay hints instantly as soon as the affected
changes, make hint overlays span one character (instead of being
length 0).  Give the overlays an "evaporate" property.

Given an inlay hints at position POS, its attached to [POS, POS+1] if
it's kind=1 (usually type hints) and [POS-1, POS] otherwise.  For
kind=1 hints, the 'cursor position of the first such overlay is also
tweaked, so that's it's less akward to edit around it.

* lisp/progmodes/eglot.el (eglot--before-change): Don't delete hints
  here.
  (eglot--update-hints-1): Rework.
2023-03-19 19:53:00 +00:00
Stefan Monnier
3748c8a62e (textsec-bidi-controls-suspicious-p): Minor tweak
* lisp/international/textsec.el (textsec-bidi-controls-suspicious-p):
Don't assume point-min==1 (and point-min is marginally more
efficient, to boot).
2023-03-19 14:51:27 -04:00
Stefan Monnier
de81349bd8 * lisp/frame.el (handle-move-frame): Fix corner case error 2023-03-19 14:51:27 -04:00
Michael Albinus
1c39347d58 Rename tramp-use-ssh-controlmaster-options to tramp-use-connection-share
* doc/misc/tramp.texi (Ssh setup): Use tramp-use-connection-share.
Describe its settings for PuTTY.
(Remote processes): Use tramp-use-connection-share.

* etc/NEWS: Renamed user option tramp-use-connection-share.

* lisp/net/tramp-integration.el
(tramp-compile-disable-ssh-controlmaster-options):
Use `tramp-use-connection-share'.

* lisp/net/tramp-sh.el (tramp-use-connection-share):
Rename from `tramp-use-ssh-controlmaster-options'.  Make it a
defvaralias to `tramp-use-ssh-controlmaster-options'.
(tramp-ssh-controlmaster-options): Adapt docstring.
(tramp-methods) <plink, plinkx, pscp, psftp>: Adapt.
(tramp-ssh-controlmaster-options): Add plink implementation.
2023-03-19 13:11:06 +01:00
Michael Albinus
231190b37f * lisp/net/tramp.el (tramp-yn-prompt-regexp): Fix regexp. 2023-03-19 09:37:35 +01:00
Jim Porter
6afa91f796 Don't over-normalize file names starting with "~" in Eshell
Previously, this would call 'expand-file-name' on the file name, but
that normalizes the value, turning something like "~/." into
"/home/user".  As a result, Pcomplete didn't work for dotfiles after
"~/" (bug#28064).

* lisp/eshell/em-dirs.el (eshell-expand-user-reference): New
function...
(eshell-expand-user-reference): ... use it.
2023-03-18 19:24:15 -07:00
Kyle Meyer
829e5dfabe Update to Org 9.6.1-48-g92471e 2023-03-18 21:41:22 -04:00
Gregory Heytings
11592bcfda ; * lisp/nxml/xmltok.el (xmltok-scan-attributes): Fix last change 2023-03-18 16:05:31 +01:00