1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00
Commit graph

165615 commits

Author SHA1 Message Date
Stefan Monnier
624416a2ae Merge commit '1bc9dfc5be' 2023-03-27 17:14:27 -04:00
Michael Albinus
afbb9b426c * test/infra/Dockerfile.emba (emacs-eglot): Adapt software selection. 2023-03-27 18:32:49 +02:00
Michael Albinus
0bd2bbc0c2 Fix Tramp error messages
* lisp/net/tramp.el:
* lisp/net/tramp-cmds.el:
* lisp/net/tramp-crypt.el:
* lisp/net/tramp-gvfs.el:
* lisp/net/tramp-sh.el:
* lisp/net/tramp-smb.el: Fix error messages.
2023-03-27 15:46:44 +02:00
Philip Kaludercic
e8790f4293 Have Xref inherit input method when reading identifiers
* lisp/progmodes/xref.el (xref--read-identifier): Set
INHERIT-INPUT-METHOD flag to non-nil.  (Bug#61299)
2023-03-27 00:05:59 +02:00
Philip Kaludercic
fca7e120d2 Add option to register packages as projects
* lisp/emacs-lisp/package-vc.el (package-vc-register-as-project): Add
new option.
(project-remember-projects-under): Declare function for usage in
'package-vc--clone'.
(package-vc--clone): Respect 'package-vc-register-as-project'.
* etc/NEWS: Document the feature.
2023-03-27 00:05:59 +02:00
Michael Albinus
082870c0d7 * test/infra/Dockerfile.emba (emacs-eglot): Adapt software selection. 2023-03-26 20:47:25 +02:00
Michael Albinus
d0be0d541d Add sanity check in tramp-gvfs.el
* lisp/net/tramp-gvfs.el (tramp-gvfs-listmountableinfo)
(tramp-gvfs-listmounttypes): New defconst.
(tramp-gvfs-maybe-open-connection): Add sanity check whether GVFS
backend is available.
2023-03-26 20:47:12 +02:00
Ken Brown
b4a3be783a Implement list-system-processes on Cygwin
* configure.ac (HAVE_PROCFS): Define to 1 on Cygwin.  (Bug#62462)
2023-03-26 10:27:26 -04:00
Phil Sainty
0770d7a0d0 * lisp/term.el (term-mouse-paste) Do not treat as a yank command (bug#58608)
This command sends the primary selection to the inferior process
rather than inserting it into the buffer, and it's entirely up to the
process as to whether anything at all gets inserted into the buffer as
a result, so this is not a `yank' as far as Emacs is concerned.
2023-03-27 01:19:19 +13:00
Phil Sainty
e83df530cf Fix primary selection modification during `term-mouse-paste' (bug#58608)
* lisp/term.el (term-mouse-paste): Prevent the primary selection from
being changed in the process of sending it to the inferior process.
2023-03-27 01:18:37 +13:00
Evgeni Kolev
1671e2db8a Fix 'go-ts-mode's incorrect docstring inserted for methods
The docstring inserted with go-ts-mode's C-c C-d was incorrectly
prefixed with the receiver "(myStruct).":

    // (myStruct).act
    func (m *myStruct) act () {...}

The above docstring is not correct because the receiver "myStruct"
should not be in the docstring.  This commit fixes the incorrect
behavior.
* lisp/progmodes/go-ts-mode.el (go-ts-mode--defun-name): New
optional argument SKIP-PREFIX.
(go-ts-mode-docstring): Call (go-ts-mode--defun-name t)
instead of (treesit-defun-name).  (Bug#62371)
2023-03-26 15:02:52 +03:00
Phil Sainty
28db56d5f0 * src/buffer.c (mode-line-format): Reorder and reformat %-construct docs
The original formatting dates back to the earliest commits.  It saved
a few lines but was harder to follow.  As windows are typically taller
now than the terminals of the time, this reformatting now makes better
sense for readabiity.  See bug#57080.

* doc/lispref/modes.texi: Order change for consistency.  Add index.
2023-03-27 00:36:47 +13:00
Phil Sainty
d4a3f64ad7 * doc/lispref/modes.texi: Improve docs for obsolete '%m' construct
Bug #57080.
2023-03-27 00:33:06 +13:00
Phil Sainty
7466909df4 Improve docs for global-mode-string / %M construct
* src/xdisp.c (global-mode-string): Update docstring.
* doc/lispref/modes.texi: Update manual.
2023-03-27 00:33:01 +13:00
Phil Sainty
73f186b0c9 * src/buffer.c (mode-line-format): Document %o and %q constructs
Missed from commit b0b02ca7f3.
2023-03-27 00:32:57 +13:00
Phil Sainty
3e70b2213a * src/buffer.c (mode-line-format): Remove docs for obsolete %t construct
This documentation had been previously removed in 1999 in [1]
but was subsequently restored again in a different form in 2006
in [2] as the construct was still supported on some systems.
However it looks like it hasn't done what that documentation
indicated since [3] in 2011, and the final remnant of this
functionality was removed in [4] in 2013; so it seems clear that
it's no longer supported and shouldn't be documented now.

[1] commit 08de620019
[2] commit dafbe726b8
[3] commit 05c6525173
[4] commit 8549f9e89b
2023-03-27 00:32:52 +13:00
Mattias Engdegård
0724c6dbda Use string-search instead of string-match[-p] when possible
* lisp/progmodes/c-ts-mode.el
(c-ts-mode--standalone-parent-skip-preproc):
* lisp/progmodes/ruby-ts-mode.el (ruby-ts--align-chain):
* lisp/treesit.el (treesit-max-buffer-size)
(treesit--check-manual-coverage):
Use the much faster string-search when just searching for a substring.
2023-03-26 12:09:41 +02:00
Andrew G Cohen
a27b0f7f30 * lisp/gnus/nnselect.el (nnselect-request-thread): Correctly parse queries. 2023-03-26 08:26:18 +08:00
Michael Albinus
e2ff4dbf3d * test/infra/Dockerfile.emba (emacs-eglot): Adapt software selection. 2023-03-25 18:29:25 +01:00
Michael Albinus
267d9d5e3d Connection-local variables are applied in buffers visiting a remote file
* etc/NEWS: Connection-local variables are applied in buffers
visiting a remote file.

* test/lisp/net/tramp-tests.el (tramp-test34-connection-local-variables):
Fix test.
2023-03-25 18:28:55 +01:00
Mattias Engdegård
d02f0221c4 Fix shortdoc-tests when Unicode arrows can be displayed
New shortdoc functions use Unicode arrows when possible, which caused
some tests to fail if run under such circumstances.

* test/lisp/emacs-lisp/shortdoc-tests.el
(shortdoc-tests--to-ascii): New function.
(shortdoc-function-examples-test)
(shortdoc-help-fns-examples-function-test): Call it.
2023-03-25 17:43:43 +01:00
Mattias Engdegård
52b67740d1 Generalise a LAP optimisation rule
* lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode):
Accept (stack-set 1) as equivalent to (discardN-preserve-tos 1) in a
rule previously overlooked.  This is usually beneficial in code size
and almost always shortens dynamic paths.
2023-03-25 16:21:09 +01:00
Yuan Fu
db7e95531a
Switch buffer in Ftreesit_query_capture
This way both #pred and #match predicates runs in the node's buffer by
default.

* src/treesit.c:
(treesit_predicate_match): No need to switch buffer anymore.
(Ftreesit_query_capture): Switch buffer.

* doc/lispref/parsing.texi (Pattern Matching): Update manual.
2023-03-24 12:29:34 -07:00
Yuan Fu
a37f19b14a
Handle signals gracefully in tree-sitter query predicates
Before this change, predicate functions can signal, which will cause
Ftreesit_query_capture to skip freeing the query and cursor object.
We make predicate functions return the signal data rather than
directly signal.

* src/treesit.c (treesit_predicate_capture_name_to_node)
(treesit_predicate_capture_name_to_text)
(treesit_predicate_equal)
(treesit_predicate_match)
(treesit_predicate_pred)
(treesit_eval_predicates): Return signal rather than signaling
directly.
(Ftreesit_query_capture): Check for returned signal data.
2023-03-24 12:29:33 -07:00
Yuan Fu
f446bfc819
; * lisp/emacs-lisp/eldoc.el (eldoc-doc-buffer-separator): Fix doc. 2023-03-24 12:29:33 -07:00
Yuan Fu
455412dd89
; Minor refactor of Ftreesit_query_capture
* src/treesit.c (Ftreesit_query_capture): Move around some variable
initialization.
2023-03-24 12:29:33 -07:00
Yuan Fu
c3a25bfb75
Refactor Ftreesit_query_capture
Refactor some part of Ftreesit_query_capture out into separate
functions, to pave the way for other query-based functions.

* src/treesit.c (treesit_resolve_node): New function.
(treesit_initialize_query): New function.
(Ftreesit_query_capture): Refactor some part into new functions.
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
Mattias Engdegård
3e32865d2c * etc/NEWS: Mention that \x without hex digits is an error. 2023-03-24 16:31:14 +01: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
João Távora
1bc9dfc5be ; Minor copyedits to Eglot manual
* doc/misc/eglot.texi (Troubleshooting Eglot): Minor fixes.
2023-03-23 10:26:50 +00:00
Eli Zaretskii
bcd02cf512 ; Improve documentation of :predicate in globalized minor modes
* doc/lispref/modes.texi (Defining Minor Modes):
* lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
Improve documentation of the :predicate keyword in defining
globalized minor modes.
2023-03-23 11:30:19 +02:00
Michael Albinus
117a29fd18 * test/infra/Dockerfile.emba (emacs-eglot): Install wget. 2023-03-23 10:21:11 +01:00
Stefan Monnier
930b9fdd3a Fix :predicate handling in globalized minor modes
* lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
Fix a thinko.  (Bug#62376)
2023-03-23 11:03:07 +02:00
Wilhelm H Kirschbaum
90c0472ed6 ; Add test for embedded HEEx to elixir-ts-mode-tests
* test/lisp/progmodes/elixir-ts-mode-resources/indent.erts:
Add test.  (Bug#62327)
2023-03-23 10:49:19 +02: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
Eli Zaretskii
19c95b1416 Allow showing prefix commands in Help buffers
* lisp/help.el (describe-bindings-show-prefix-commands): New user
option.
(describe-map): Use it to decide whether to output prefix
commands.  Patch by Bob Rogers <rogers@rgrjr.com>.  (Bug#62279)

* etc/NEWS: Document 'describe-bindings-show-prefix-commands'.
2023-03-23 10:31:56 +02:00
Daniel Martín
f0a2f37dee Fix toolbar item validation in the NS port
* src/nsterm.m ([EmacsView validateToolbarItem:]): Implement this
NSToolbarItemValidation method, which is called by AppKit when it
needs to validate an image item in a toolbar.  This solves, in
particular, the problem with having the "Save" icon on the tool
bar enabled at Emacs startup.  (Bug#62234)
2023-03-23 10:07:51 +02:00
Eli Zaretskii
22de4b1e72 ; Describe problems with 'screen' and COLORTERM variable
* etc/PROBLEMS: Describe the issue with 'screen' and
COLORTERM=truecolor.  (Bug#62237)
2023-03-23 10:03:04 +02:00