]> git.eshelyaron.com Git - emacs.git/log
emacs.git
21 months agoMerge from origin/emacs-29
Stefan Monnier [Mon, 27 Mar 2023 21:16:58 +0000 (17:16 -0400)]
Merge from origin/emacs-29

b08bf828605 ; Fix :version of the new defcustom
d941666d859 ; Fix last change
e19b7da7b09 Add 'eww-default-download-directory'.
564c26bdbeb ; Fix edebug spec for 'gv-define-simple-setter' (bug#62256)

21 months ago; Merge from origin/emacs-29
Stefan Monnier [Mon, 27 Mar 2023 21:16:58 +0000 (17:16 -0400)]
; Merge from origin/emacs-29

The following commits were skipped:

9107b2dec1f * doc/lispref/modes.texi: Improve docs for obsolete '%m' ...
59b7086838e Improve docs for global-mode-string / %M construct
207176e6b1c * src/buffer.c (mode-line-format): Document %o and %q con...
9cfae822fb3 * src/buffer.c (mode-line-format): Remove docs for obsole...

21 months agoMerge from origin/emacs-29
Stefan Monnier [Mon, 27 Mar 2023 21:16:58 +0000 (17:16 -0400)]
Merge from origin/emacs-29

8f42db010d1 Improve indenting "case" in Python
c4d490490dc ; * test/src/fns-tests.el: Fix last change
875e77a66a6 * test/infra/Dockerfile.emba (emacs-native-comp): Add zli...
64a2b0d36fe Fix failure of fns-tests-collate-strings on Cygwin
90fc6b987ad * lisp/savehist.el (savehist-save): Preserve shared struc...
08fbc133756 Adapt Tramp manual
accb3871668 Fix system time sampling on MS-Windows
33d436eefa1 Fix treesit_ensure_parsed (bug#62333)
d93a439846f * lisp/help-fns.el (find-lisp-object-file-name): Fix bug#...
be8147c53f9 Improve "Bugs" in the Emacs manual

21 months ago; Merge from origin/emacs-29
Stefan Monnier [Mon, 27 Mar 2023 21:16:58 +0000 (17:16 -0400)]
; Merge from origin/emacs-29

The following commit was skipped:

82523dc621a Fix Eglot progress reporting

21 months agoMerge commit '1bc9dfc5bee'
Stefan Monnier [Mon, 27 Mar 2023 21:14:27 +0000 (17:14 -0400)]
Merge commit '1bc9dfc5bee'

21 months ago* test/infra/Dockerfile.emba (emacs-eglot): Adapt software selection.
Michael Albinus [Mon, 27 Mar 2023 16:32:49 +0000 (18:32 +0200)]
* test/infra/Dockerfile.emba (emacs-eglot): Adapt software selection.

21 months agoFix Tramp error messages
Michael Albinus [Mon, 27 Mar 2023 13:46:44 +0000 (15:46 +0200)]
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.

21 months agoHave Xref inherit input method when reading identifiers
Philip Kaludercic [Sun, 26 Mar 2023 11:50:27 +0000 (13:50 +0200)]
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)

21 months agoAdd option to register packages as projects
Philip Kaludercic [Tue, 14 Mar 2023 10:50:31 +0000 (11:50 +0100)]
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.

21 months ago* test/infra/Dockerfile.emba (emacs-eglot): Adapt software selection.
Michael Albinus [Sun, 26 Mar 2023 18:47:25 +0000 (20:47 +0200)]
* test/infra/Dockerfile.emba (emacs-eglot): Adapt software selection.

21 months agoAdd sanity check in tramp-gvfs.el
Michael Albinus [Sun, 26 Mar 2023 18:47:12 +0000 (20:47 +0200)]
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.

21 months agoImplement list-system-processes on Cygwin
Ken Brown [Sat, 25 Mar 2023 22:59:33 +0000 (18:59 -0400)]
Implement list-system-processes on Cygwin

* configure.ac (HAVE_PROCFS): Define to 1 on Cygwin.  (Bug#62462)

21 months ago* lisp/term.el (term-mouse-paste) Do not treat as a yank command (bug#58608)
Phil Sainty [Sun, 26 Mar 2023 12:19:19 +0000 (01:19 +1300)]
* 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.

21 months agoFix primary selection modification during `term-mouse-paste' (bug#58608)
Phil Sainty [Sun, 26 Mar 2023 12:06:52 +0000 (01:06 +1300)]
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.

21 months agoFix 'go-ts-mode's incorrect docstring inserted for methods
Evgeni Kolev [Wed, 8 Feb 2023 15:16:02 +0000 (17:16 +0200)]
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)

21 months ago; Fix :version of the new defcustom
Eli Zaretskii [Sun, 26 Mar 2023 11:58:40 +0000 (14:58 +0300)]
; Fix :version of the new defcustom

21 months ago; Fix last change
Eli Zaretskii [Sun, 26 Mar 2023 11:56:57 +0000 (14:56 +0300)]
; Fix last change

* lisp/net/eww.el (eww-download-directory): Rename from
'eww-default-download-directory'.  All users changed.  Change
:type to be a directory.  Doc fix.  (Bug#62435)

21 months agoAdd 'eww-default-download-directory'.
Xi Lu [Sat, 25 Mar 2023 13:38:48 +0000 (21:38 +0800)]
Add 'eww-default-download-directory'.

* lisp/net/eww.el (eww-default-download-directory): New defcustom.
(eww--download-directory): Use it.  (Bug#62435)

21 months ago; Fix edebug spec for 'gv-define-simple-setter' (bug#62256)
Matus Goljer [Sun, 26 Mar 2023 11:20:19 +0000 (13:20 +0200)]
; Fix edebug spec for 'gv-define-simple-setter' (bug#62256)

21 months ago* src/buffer.c (mode-line-format): Reorder and reformat %-construct docs
Phil Sainty [Sun, 14 Aug 2022 11:17:38 +0000 (23:17 +1200)]
* 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.

21 months ago* doc/lispref/modes.texi: Improve docs for obsolete '%m' construct
Phil Sainty [Sun, 14 Aug 2022 11:16:48 +0000 (23:16 +1200)]
* doc/lispref/modes.texi: Improve docs for obsolete '%m' construct

Bug #57080.

21 months agoImprove docs for global-mode-string / %M construct
Phil Sainty [Sun, 14 Aug 2022 11:14:51 +0000 (23:14 +1200)]
Improve docs for global-mode-string / %M construct

* src/xdisp.c (global-mode-string): Update docstring.
* doc/lispref/modes.texi: Update manual.

21 months ago* src/buffer.c (mode-line-format): Document %o and %q constructs
Phil Sainty [Sun, 14 Aug 2022 11:11:43 +0000 (23:11 +1200)]
* src/buffer.c (mode-line-format): Document %o and %q constructs

Missed from commit b0b02ca7f3e06d0f092df6f81babd1277bf93b0f.

21 months ago* src/buffer.c (mode-line-format): Remove docs for obsolete %t construct
Phil Sainty [Sun, 14 Aug 2022 10:34:41 +0000 (22:34 +1200)]
* 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 08de62001945d4dd32a3d6af44da05804cb296d5
[2] commit dafbe726b89a36010f3f24bb1efe4ace0a5f7f0f
[3] commit 05c652517317d10690aaf0a6aa0bc876382b9d82
[4] commit 8549f9e89bd9288c4c709d183a5bf8f07dbeed3d

21 months ago* doc/lispref/modes.texi: Improve docs for obsolete '%m' construct
Phil Sainty [Sun, 14 Aug 2022 11:16:48 +0000 (23:16 +1200)]
* doc/lispref/modes.texi: Improve docs for obsolete '%m' construct

Bug #57080.

21 months agoImprove docs for global-mode-string / %M construct
Phil Sainty [Sun, 14 Aug 2022 11:14:51 +0000 (23:14 +1200)]
Improve docs for global-mode-string / %M construct

* src/xdisp.c (global-mode-string): Update docstring.
* doc/lispref/modes.texi: Update manual.

21 months ago* src/buffer.c (mode-line-format): Document %o and %q constructs
Phil Sainty [Sun, 14 Aug 2022 11:11:43 +0000 (23:11 +1200)]
* src/buffer.c (mode-line-format): Document %o and %q constructs

Missed from commit b0b02ca7f3e06d0f092df6f81babd1277bf93b0f.

21 months ago* src/buffer.c (mode-line-format): Remove docs for obsolete %t construct
Phil Sainty [Sun, 14 Aug 2022 10:34:41 +0000 (22:34 +1200)]
* 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 08de62001945d4dd32a3d6af44da05804cb296d5
[2] commit dafbe726b89a36010f3f24bb1efe4ace0a5f7f0f
[3] commit 05c652517317d10690aaf0a6aa0bc876382b9d82
[4] commit 8549f9e89bd9288c4c709d183a5bf8f07dbeed3d

21 months agoUse string-search instead of string-match[-p] when possible
Mattias Engdegård [Sun, 26 Mar 2023 10:09:41 +0000 (12:09 +0200)]
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.

21 months agoImprove indenting "case" in Python
kobarity [Sat, 25 Mar 2023 13:59:05 +0000 (22:59 +0900)]
Improve indenting "case" in Python

* lisp/progmodes/python.el (python-info-dedenter-statement-p): Do not
consider the first "case" in the block as dedenter.
* test/lisp/progmodes/python-tests.el
(python-info-dedenter-opening-block-positions-7)
(python-info-dedenter-statement-p-6): New tests. (Bug#62092)

21 months ago* lisp/gnus/nnselect.el (nnselect-request-thread): Correctly parse queries.
Andrew G Cohen [Sun, 26 Mar 2023 00:26:18 +0000 (08:26 +0800)]
* lisp/gnus/nnselect.el (nnselect-request-thread): Correctly parse queries.

21 months ago* test/infra/Dockerfile.emba (emacs-eglot): Adapt software selection.
Michael Albinus [Sat, 25 Mar 2023 17:29:25 +0000 (18:29 +0100)]
* test/infra/Dockerfile.emba (emacs-eglot): Adapt software selection.

21 months agoConnection-local variables are applied in buffers visiting a remote file
Michael Albinus [Sat, 25 Mar 2023 17:28:55 +0000 (18:28 +0100)]
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.

21 months ago; * test/src/fns-tests.el: Fix last change
Ken Brown [Sat, 25 Mar 2023 16:54:23 +0000 (12:54 -0400)]
; * test/src/fns-tests.el: Fix last change

21 months agoFix shortdoc-tests when Unicode arrows can be displayed
Mattias Engdegård [Sat, 25 Mar 2023 16:43:43 +0000 (17:43 +0100)]
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.

21 months ago* test/infra/Dockerfile.emba (emacs-native-comp): Add zlib1g-dev.
Michael Albinus [Sat, 25 Mar 2023 16:33:33 +0000 (17:33 +0100)]
* test/infra/Dockerfile.emba (emacs-native-comp): Add zlib1g-dev.

21 months agoGeneralise a LAP optimisation rule
Mattias Engdegård [Sat, 25 Mar 2023 14:38:00 +0000 (15:38 +0100)]
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.

21 months agoFix failure of fns-tests-collate-strings on Cygwin
Ken Brown [Fri, 24 Mar 2023 15:35:40 +0000 (11:35 -0400)]
Fix failure of fns-tests-collate-strings on Cygwin

* test/src/fns-tests.el (fns-tests-collate-strings): Use
en_XY.UTF-8 instead of en_DE.UTF-8 as an example of an invalid
locale; en_DE.UTF-8 is actually a valid locale on Cygwin.
Note: The test will still fail on Cygwin releases < 3.5
because of a Cygwin bug.  (Bug#62420)

21 months ago* lisp/savehist.el (savehist-save): Preserve shared structure
Aaron L. Zeng [Tue, 21 Mar 2023 20:07:54 +0000 (16:07 -0400)]
* lisp/savehist.el (savehist-save): Preserve shared structure

This avoids ballooning the size of variables that contain
large text properties, such as the 'yank-handler' installed
by 'evil-yank-rectangle', which contains a list of lines in
the string.
* lisp/savehist.el (savehist-save): Enable 'print-circle'.
(Bug#62364)

Copyright-paperwork-exempt: yes

21 months agoSwitch buffer in Ftreesit_query_capture
Yuan Fu [Fri, 24 Mar 2023 19:25:19 +0000 (12:25 -0700)]
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.

21 months agoHandle signals gracefully in tree-sitter query predicates
Yuan Fu [Fri, 24 Mar 2023 19:19:25 +0000 (12:19 -0700)]
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.

21 months ago; * lisp/emacs-lisp/eldoc.el (eldoc-doc-buffer-separator): Fix doc.
Yuan Fu [Fri, 24 Mar 2023 18:34:39 +0000 (11:34 -0700)]
; * lisp/emacs-lisp/eldoc.el (eldoc-doc-buffer-separator): Fix doc.

21 months ago; Minor refactor of Ftreesit_query_capture
Yuan Fu [Tue, 21 Mar 2023 23:13:23 +0000 (16:13 -0700)]
; Minor refactor of Ftreesit_query_capture

* src/treesit.c (Ftreesit_query_capture): Move around some variable
initialization.

21 months agoRefactor Ftreesit_query_capture
Yuan Fu [Tue, 21 Mar 2023 23:03:08 +0000 (16:03 -0700)]
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.

21 months agoFix invocation of elixir LSP server on MS-Windows
Eli Zaretskii [Fri, 24 Mar 2023 18:37:11 +0000 (21:37 +0300)]
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)

21 months agoAllow users to customize eldoc buffer separator (bug#62029)
João Távora [Fri, 24 Mar 2023 17:37:01 +0000 (17:37 +0000)]
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.

21 months agoEldoc: slightly enhance meaning of :echo option
João Távora [Fri, 24 Mar 2023 17:16:00 +0000 (17:16 +0000)]
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.

21 months ago* etc/NEWS: Mention that \x without hex digits is an error.
Mattias Engdegård [Fri, 24 Mar 2023 15:03:41 +0000 (16:03 +0100)]
* etc/NEWS: Mention that \x without hex digits is an error.

21 months agoEldoc: fix bug recently introduced in "old" protocol
João Távora [Fri, 24 Mar 2023 14:34:05 +0000 (14:34 +0000)]
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.

21 months agoAdapt Tramp manual
Michael Albinus [Fri, 24 Mar 2023 12:30:25 +0000 (13:30 +0100)]
Adapt Tramp manual

* doc/misc/tramp.texi (Default Method): OpenSSH for MS Windows can
be used.
(Ssh setup): Extend for MS Windows and ssh.

21 months agoFix system time sampling on MS-Windows
Eli Zaretskii [Fri, 24 Mar 2023 11:10:30 +0000 (14:10 +0300)]
Fix system time sampling on MS-Windows

* src/timefns.c (emacs_localtime_rz) [WINDOWSNT]: Unconditionally
call tzset to make sure we pick up all the changes of time zone,
working around the MS CRT caching.

21 months agoFix treesit_ensure_parsed (bug#62333)
Yuan Fu [Fri, 24 Mar 2023 07:17:10 +0000 (00:17 -0700)]
Fix treesit_ensure_parsed (bug#62333)

* src/treesit.c (treesit_ensure_parsed): Check for need_reparse after
treesit_sync_visible_region runs, because as the comment says,
treesit_sync_visible_region might modify need_reparse.

21 months agoEglot: let user opt-in to plaintext LSP docs (bug#61373)
JD Smith [Thu, 23 Mar 2023 17:43:52 +0000 (17:43 +0000)]
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

21 months agoEglot: don't send invisible text to Eldoc
João Távora [Thu, 23 Mar 2023 17:34:46 +0000 (17:34 +0000)]
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.

21 months agoEglot: inform ElDoc about overly long 'hover' docs
João Távora [Thu, 23 Mar 2023 09:04:27 +0000 (09:04 +0000)]
Eglot: inform ElDoc about overly long 'hover' docs

* lisp/progmodes/eglot.el (eglot-hover-eldoc-function): Include :echo
  info in return value.

21 months agoElDoc: rework rendering of echo area (bug#62029)
João Távora [Thu, 23 Mar 2023 09:02:18 +0000 (09:02 +0000)]
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'.

21 months agoElDoc: remember origin backend in doc snippets (bug#62029)
João Távora [Wed, 22 Mar 2023 13:35:43 +0000 (13:35 +0000)]
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.

21 months agoEglot: rework progress indicators
João Távora [Thu, 23 Mar 2023 13:13:16 +0000 (13:13 +0000)]
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.

21 months agoEglot: more leniently handle 'window/showMessageRequest'
João Távora [Wed, 22 Mar 2023 10:16:17 +0000 (10:16 +0000)]
Eglot: more leniently handle 'window/showMessageRequest'

Some servers mess up this message's arguments.

* lisp/progmodes/eglot.el (eglot-handle-request): Fix.

21 months ago* lisp/help-fns.el (find-lisp-object-file-name): Fix bug#62376 part2
Stefan Monnier [Thu, 23 Mar 2023 17:43:45 +0000 (13:43 -0400)]
* lisp/help-fns.el (find-lisp-object-file-name): Fix bug#62376 part2

Nowadays `loaddefs.el` are byte-compiled, so adjust pattern accordingly

21 months agoNew user option remote-file-name-inhibit-auto-save
Michael Albinus [Thu, 23 Mar 2023 16:09:52 +0000 (17:09 +0100)]
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'.

21 months agoImprove "Bugs" in the Emacs manual
Eli Zaretskii [Thu, 23 Mar 2023 13:33:04 +0000 (15:33 +0200)]
Improve "Bugs" in the Emacs manual

* doc/emacs/trouble.texi (Bugs, Known Problems)
(Understanding Bug Reporting, Checklist, Sending Patches)
(Contributing, Coding Standards): Improve wording, structure,
markup, and indexing.  (Bug#62320)

21 months agoFix Eglot progress reporting
João Távora [Thu, 23 Mar 2023 10:25:17 +0000 (10:25 +0000)]
Fix Eglot progress reporting

When the server sends an "end" message, Emacs's progress reporters
should also be updated.

* lisp/progmodes/eglot.el (eglot-handle-notification $/progress): Rework.

21 months ago; Minor copyedits to Eglot manual
João Távora [Tue, 21 Mar 2023 14:55:57 +0000 (14:55 +0000)]
; Minor copyedits to Eglot manual

* doc/misc/eglot.texi (Troubleshooting Eglot): Minor fixes.

21 months ago; Improve documentation of :predicate in globalized minor modes
Eli Zaretskii [Thu, 23 Mar 2023 09:30:19 +0000 (11:30 +0200)]
; 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.

21 months ago* test/infra/Dockerfile.emba (emacs-eglot): Install wget.
Michael Albinus [Thu, 23 Mar 2023 09:21:11 +0000 (10:21 +0100)]
* test/infra/Dockerfile.emba (emacs-eglot): Install wget.

21 months agoFix :predicate handling in globalized minor modes
Stefan Monnier [Wed, 22 Mar 2023 17:52:50 +0000 (13:52 -0400)]
Fix :predicate handling in globalized minor modes

* lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
Fix a thinko.  (Bug#62376)

21 months ago; Add test for embedded HEEx to elixir-ts-mode-tests
Wilhelm H Kirschbaum [Tue, 21 Mar 2023 10:13:58 +0000 (12:13 +0200)]
; Add test for embedded HEEx to elixir-ts-mode-tests

* test/lisp/progmodes/elixir-ts-mode-resources/indent.erts:
Add test.  (Bug#62327)

21 months ago; * lisp/progmodes/eglot.el (eglot-server-programs): Fix last change.
Eli Zaretskii [Thu, 23 Mar 2023 08:48:31 +0000 (10:48 +0200)]
; * lisp/progmodes/eglot.el (eglot-server-programs): Fix last change.

21 months agoAdd heex-ts-mode to eglot-server-programs (bug#62327)
Wilhelm H Kirschbaum [Tue, 21 Mar 2023 09:48:30 +0000 (11:48 +0200)]
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.

21 months agoAllow showing prefix commands in Help buffers
Eli Zaretskii [Thu, 23 Mar 2023 08:31:56 +0000 (10:31 +0200)]
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'.

21 months agoFix toolbar item validation in the NS port
Daniel Martín [Sat, 18 Mar 2023 00:47:32 +0000 (01:47 +0100)]
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)

21 months ago; Describe problems with 'screen' and COLORTERM variable
Eli Zaretskii [Thu, 23 Mar 2023 08:03:04 +0000 (10:03 +0200)]
; Describe problems with 'screen' and COLORTERM variable

* etc/PROBLEMS: Describe the issue with 'screen' and
COLORTERM=truecolor.  (Bug#62237)

21 months agoMerge from origin/emacs-29
Stefan Kangas [Thu, 23 Mar 2023 05:30:13 +0000 (06:30 +0100)]
Merge from origin/emacs-29

6de00e4df99 ; Fix xref-match's :version since the default value did c...
db355b420b6 Use libgccjit-10-dev on EMBA
84963956535 * lisp/outline.el (outline--fix-buttons-after-change): Ad...
3d3bbaace69 Align concatenated strings to the first sibling in c-ts-mode
f856468e457 Only fill the current paragraph in c-ts-common--fill-bloc...
df669c5a11f Add missing indent rule for c-ts-mode

21 months ago; Fix xref-match's :version since the default value did change
Dmitry Gutov [Wed, 22 Mar 2023 16:16:50 +0000 (18:16 +0200)]
; Fix xref-match's :version since the default value did change

21 months agoMake icomplete-tidy-shadowed-file-names into a defcustom
Sean Whitton [Wed, 22 Mar 2023 17:28:05 +0000 (10:28 -0700)]
Make icomplete-tidy-shadowed-file-names into a defcustom

lisp/icomplete.el (icomplete-tidy-shadowed-file-names): Make variable
into a defcustom.

21 months agoSubject: send clientInfo during the initialize request
Felician Nemeth [Wed, 22 Mar 2023 18:34:03 +0000 (18:34 +0000)]
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:

21 months agoUse libgccjit-10-dev on EMBA
Michael Albinus [Wed, 22 Mar 2023 17:34:23 +0000 (18:34 +0100)]
Use libgccjit-10-dev on EMBA

* test/infra/Dockerfile.emba (emacs-native-comp): Use
libgccjit-10-dev.  (Bug#62211)

* test/infra/gitlab-ci.yml (build-native-comp-speed2)
(test-native-comp-speed2): Uncomment jobs.

21 months agoFix compilation of lib-src/movemail
Eli Zaretskii [Wed, 22 Mar 2023 15:26:22 +0000 (17:26 +0200)]
Fix compilation of lib-src/movemail

* lib-src/movemail.c: Include timespec.h.  Reported by Andreas
Schwab <schwab@linux-m68k.org>.

21 months agoAdd platform for Eglot tests on EMBA
Michael Albinus [Wed, 22 Mar 2023 14:00:15 +0000 (15:00 +0100)]
Add platform for Eglot tests on EMBA

* test/infra/Dockerfile.emba (emacs-eglot): New image.

* test/infra/gitlab-ci.yml (.eglot-template): New template.
(build-image-eglot, test-eglot): New jobs.

21 months agoMake eglot--clangd-version more robust
Robert Pluim [Wed, 22 Mar 2023 11:46:11 +0000 (12:46 +0100)]
Make eglot--clangd-version more robust

* test/lisp/progmodes/eglot-tests.el (eglot--clangd-version): Check
for 'version ' followed by a combination of numbers and dots to
extract the clangd version.

21 months ago* lisp/outline.el (outline--fix-buttons-after-change): Add save-match-data.
Juri Linkov [Wed, 22 Mar 2023 07:44:02 +0000 (09:44 +0200)]
* 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.

21 months agoAlign concatenated strings to the first sibling in c-ts-mode
Yuan Fu [Wed, 22 Mar 2023 06:27:20 +0000 (23:27 -0700)]
Align concatenated strings to the first sibling in c-ts-mode

* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): Change rule.

21 months agoOnly fill the current paragraph in c-ts-common--fill-block-comment
Yuan Fu [Wed, 22 Mar 2023 05:50:03 +0000 (22:50 -0700)]
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.

21 months agoMerge from origin/emacs-29
Stefan Kangas [Wed, 22 Mar 2023 05:30:12 +0000 (06:30 +0100)]
Merge from origin/emacs-29

8b6a0de964d Improve docstring of treesit-parent-while (bug#62301)
35648a86730 ; Delete accidental leftover '()' Eglot function
47d8e4b0d38 Eglot: report window/workDoneProgress capability to langu...
4a7a0c9a9f5 * lisp/emacs-lisp/comp.el (comp-emit-set-call-subr): Impr...
4a6eefb93a5 Expand defvar-keymap documentation
7a1272168af * lisp/treesit.el (treesit-end-of-defun): Guard arg again...
263d6c38539 Comp fix calls to redefined primtives with op-bytecode (b...
6bf441ff115 Warn package authors away from keymap-unset with REMOVE
786de66ec3c Comment out jobs on EMBA
eed240bc022 Improve defvar-keymap docstring.

21 months ago(describe-function): Load file for `...' references
Stefan Monnier [Wed, 22 Mar 2023 01:48:24 +0000 (21:48 -0400)]
(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.

21 months agoAdd missing indent rule for c-ts-mode
Yuan Fu [Tue, 21 Mar 2023 23:24:29 +0000 (16:24 -0700)]
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.

21 months agoImprove docstring of treesit-parent-while (bug#62301)
Yuan Fu [Tue, 21 Mar 2023 21:50:07 +0000 (14:50 -0700)]
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.

21 months agoSleep less in update-game-score
Paul Eggert [Tue, 21 Mar 2023 21:38:23 +0000 (14:38 -0700)]
Sleep less in update-game-score

This is mostly to avoid interface hassles with time/srand/rand.
* lib-src/update-game-score.c (main): Don’t use ‘srand’ or ‘time’.
(lock_file): Don’t sleep if we unlocked the lock file.  When
sleeping, always just sleep 1 s.  This avoids the need for calling
‘time’ and ‘rand’, the utility of which was dubious anyway.

21 months agoAvoid backwards clock in movemail timestamps
Paul Eggert [Tue, 21 Mar 2023 21:06:27 +0000 (14:06 -0700)]
Avoid backwards clock in movemail timestamps

* lib-src/movemail.c (mbx_delimit_begin): Use ‘current_timespec’
instead of ‘time’ to generate the user-visible timestamp.
This works around the minor glitch caused by glibc bug 30200
<https://sourceware.org/bugzilla/show_bug.cgi?id=30200>.

21 months agoInvert variable alias declaration in Tramp
Michael Albinus [Tue, 21 Mar 2023 20:24:13 +0000 (21:24 +0100)]
Invert variable alias declaration in Tramp

* lisp/net/tramp-sh.el (tramp-use-ssh-controlmaster-options):
Invert alias declaration.  (Bug#62295, Bug#62329)

21 months agoSkip Eglot test if using very old clangd
João Távora [Tue, 21 Mar 2023 18:43:58 +0000 (18:43 +0000)]
Skip Eglot test if using very old clangd

* test/lisp/progmodes/eglot-tests.el (eglot--clangd-version): New
helper.
(eglot-test-diagnostic-tags-unnecessary-code): Use it.

21 months agoImprove Tramp backward compatibility
Michael Albinus [Tue, 21 Mar 2023 15:14:40 +0000 (16:14 +0100)]
Improve Tramp backward compatibility

* lisp/net/tramp-gvfs.el (while-no-input-ignore-events):
Add `dbus-event' for older Emacs versions.

21 months ago; Delete accidental leftover '()' Eglot function
João Távora [Tue, 21 Mar 2023 09:59:13 +0000 (09:59 +0000)]
; Delete accidental leftover '()' Eglot function

* lisp/progmodes/eglot.el (eglot--workspace-configuration-plist):
Remove ().

21 months agoEglot: report window/workDoneProgress capability to language server
João Távora [Tue, 21 Mar 2023 09:56:30 +0000 (09:56 +0000)]
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.

21 months ago* lisp/emacs-lisp/comp.el (comp-emit-set-call-subr): Improve 263d6c38539
Andrea Corallo [Tue, 21 Mar 2023 10:51:03 +0000 (11:51 +0100)]
* lisp/emacs-lisp/comp.el (comp-emit-set-call-subr): Improve 263d6c38539

21 months agoExpand defvar-keymap documentation
Robert Pluim [Tue, 21 Mar 2023 09:56:07 +0000 (10:56 +0100)]
Expand defvar-keymap documentation

* doc/lispref/keymaps.texi (Creating Keymaps): Describe the :repeat keyword.

21 months ago* lisp/treesit.el (treesit-end-of-defun): Guard arg against nil (bug#62158).
Dmitry Gutov [Mon, 20 Mar 2023 18:18:42 +0000 (20:18 +0200)]
* lisp/treesit.el (treesit-end-of-defun): Guard arg against nil (bug#62158).

21 months agoComp fix calls to redefined primtives with op-bytecode (bug#61917)
Andrea Corallo [Mon, 20 Mar 2023 16:24:48 +0000 (17:24 +0100)]
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.

21 months agoWarn package authors away from keymap-unset with REMOVE
Robert Pluim [Mon, 20 Mar 2023 15:09:51 +0000 (16:09 +0100)]
Warn package authors away from keymap-unset with REMOVE

* doc/lispref/keymaps.texi (Changing Key Bindings): Ask package
authors to not use the REMOVE argument to `keymap-unset'.