]> git.eshelyaron.com Git - emacs.git/log
emacs.git
20 months agoFix regression in Tramp (bug#62194)
Michael Albinus [Thu, 16 Mar 2023 11:41:13 +0000 (12:41 +0100)]
Fix regression in Tramp (bug#62194)

* lisp/net/tramp.el (tramp-handle-make-process):
* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band)
(tramp-sh-handle-file-notify-add-watch)
(tramp-maybe-open-connection): Don't set process property
`shared-socket'.  (Bug#62194)

20 months agoFix elixir-ts-mode.elc warning (bug#62155)
Wilhelm H Kirschbaum [Mon, 13 Mar 2023 19:47:50 +0000 (21:47 +0200)]
Fix elixir-ts-mode.elc warning (bug#62155)

* lisp/progmodes/elixir-ts-mode.el: Only require heex-ts-mode once
elixir-ts-mode loads to avoid calling (treesit-ready-p 'heex)
during byte-compilation.

20 months agoMinor Tramp cleanup
Michael Albinus [Wed, 15 Mar 2023 17:01:48 +0000 (18:01 +0100)]
Minor Tramp cleanup

* lisp/net/tramp-sh.el (tramp-run-test): Add VEC argument.
(tramp-sh-handle-file-executable-p)
(tramp-sh-handle-file-readable-p)
(tramp-sh-handle-file-directory-p)
(tramp-sh-handle-file-writable-p): Adapt callees.

20 months agoAlways display the "Archive" column in the package list
Philip Kaludercic [Wed, 15 Mar 2023 15:47:48 +0000 (16:47 +0100)]
Always display the "Archive" column in the package list

* lisp/emacs-lisp/package.el (package-menu-mode): Always display
column.
(package-menu--print-info-simple): Always provide column information.

Since NonGNU ELPA has been added to the default value of
'package-archives', this condition is practically never satisfied,
meaning the code can be simplified.

20 months ago; * lisp/progmodes/elixir-ts-mode.el: remove duplicates from regexp
Mattias Engdegård [Wed, 15 Mar 2023 11:43:18 +0000 (12:43 +0100)]
; * lisp/progmodes/elixir-ts-mode.el: remove duplicates from regexp

20 months agoUnbreak Eglot (as a :core ELPA package) on Emacs 26.3
João Távora [Wed, 15 Mar 2023 10:27:24 +0000 (10:27 +0000)]
Unbreak Eglot (as a :core ELPA package) on Emacs 26.3

Because of the lack of regular automated testing on a CI system, many
recent developments in and outside Eglot had wrecked this
compatibility.

The GitHub CI available at https://github.com/joaotavora/eglot/actions
can be used to run this combination of eglot.el + eglot-tests.el on
26.3, 27.2 and 28.2.

* etc/EGLOT-NEWS: Mention new version.

* lisp/progmodes/eglot.el (eglot--reporter-update): New
compatibility shim.
(eglot-handle-notification $/progress): Use it.
(eglot-handle-notification textDocument/publishDiagnostics): Use
two-arg assoc-delete-all.
(Version): Bump to 1.13.

* test/lisp/progmodes/eglot-tests.el
(Commentary): Tweak.
(tramp): Tweak require;
(eglot-test-diagnostic-tags-unnecessary-code): Use
jsonrpc--encode.
(eglot--call-with-tramp-test): Adjust dependency on
ert-remote-temporary-file-directory.
(eglot-test-rust-on-type-formatting)
(eglot-test-project-wide-diagnostics-rust-analyzer): Wait longer.

20 months ago; Auto-commit of loaddefs files.
Stefan Kangas [Wed, 15 Mar 2023 04:12:01 +0000 (05:12 +0100)]
; Auto-commit of loaddefs files.

20 months agoMore fixes to Eglot tests
João Távora [Wed, 15 Mar 2023 00:36:26 +0000 (00:36 +0000)]
More fixes to Eglot tests

* test/lisp/progmodes/eglot-tests.el
(eglot-test-project-wide-diagnostics-rust-analyzer): Make even more
robust.
(eglot--wait-for): flush-standard-output doesn't exist in older
Emacsen.
(eglot-test-basic-diagnostics): Increase timeout.

20 months agoImprove debug output of Eglot tests
João Távora [Tue, 14 Mar 2023 19:50:48 +0000 (19:50 +0000)]
Improve debug output of Eglot tests

* test/lisp/progmodes/eglot-tests.el
(eglot--test-message): New helper.
(eglot--call-with-fixture): Use it.
(eglot--cleanup-after-test): Use it.
(eglot--wait-for): Use it.  Clean mistaken docstring.

20 months agoRobustify some Eglot tests involving rust-analyzer
João Távora [Tue, 14 Mar 2023 19:44:45 +0000 (19:44 +0000)]
Robustify some Eglot tests involving rust-analyzer

* eglot-tests.el (eglot-test-diagnostics-tags-unnecessary-code): Use
clangd instead of rust-analyzer.
(eglot-test-project-wide-diagnostics-rust-analyzer): Don't count
diagnostics, just check they come from unvisited file.
(eglot-test-rust-analyzer-watches-files): Wait a bit more time..

20 months agoCheck before using bleeding edge ERT sym in Eglot tests
João Távora [Tue, 14 Mar 2023 19:43:04 +0000 (19:43 +0000)]
Check before using bleeding edge ERT sym in Eglot tests

Else, these tests won't run on Emacs versions that Eglot runs on, like
26.3.

* test/lisp/progmodes/eglot-tests.el
(eglot--call-with-tramp-test):  check for
ert-remote-temporary-file-directory before using.

20 months agoBetter jsonrpc.el workaround for debug-on-error check
João Távora [Tue, 14 Mar 2023 19:07:23 +0000 (19:07 +0000)]
Better jsonrpc.el workaround for debug-on-error check

Some extensions, notably ert.el, set `debug-on-error' to non-nil,
which makes it hard to test the behaviour catching of the Elisp
error when processing a request and replying to the endpoint with
an JSONRPC-error.

The previous workaround relied on requiring lisp/emacs-lisp/ert.el in
lisp/jsonrpc.el, which really doesn't make sense.

This is better.  For the single test of that behaviour, set a new
variable, jsonrpc-inhibit-debug-on-error.

Not only is this cleaner, it allows us to use ert.el's useful
debug-on-error setting.

* lisp/jsonrpc.el (ert): Don't require it.
(jsonrpc-inhibit-debug-on-error): New variable.
(jsonrpc-connection-receive): Use it.
(Package-Requires): Bump to 1.0.17

* test/lisp/jsonrpc-tests.el (signals-an--32603-JSONRPC-error):
Bind jsonrpc-inhibit-debug-on-error.

20 months agoMerge from origin/emacs-29
João Távora [Tue, 14 Mar 2023 18:14:48 +0000 (18:14 +0000)]
Merge from origin/emacs-29

4b6f2a7028b * lisp/progmodes/xref.el: Bump the version.
24c8b146bbc * lisp/progmodes/xref.el (xref--xref-buffer-mode): Split ...
46f9e53c3da Fix import of keys in buffer created by epa-search-keys
36ade0704e1 Fix connection-local variables settings
e759905d2e0 ; Minor copyedits in EGLOT-NEWS
ba22a2c346b Bump Eglot version to 1.12
54e123a5055 Update Eglot's manual about eglot-workspace-configuration
812597f864c ; * lisp/novice.el (disabled-command-function): Add note ...
4a603c98499 Amend last Eglot commit (bug#62065)
b916ec88b2f Make eglot-ensure's post-command-hook run a bit later (bu...
1c05175c21a Fix display of disabled-command help text
3ce37db9882 Remove mention of old dotted-list reader quirk from manual
42335c2c1f1 Fix value history shown for 'gc-cons-percentage'
fffbce29349 TRework fix for bug#62106
8bc12a27362 ; * etc/NEWS: Fix last change.
2ac068d294e ; Remove 'ns-popup-font-panel' from documentation
5bc32d008fb Add missing indentation rule for rust-ts-mode (Bug#62109)
0404924930d ; One more improvement to ELisp "internals" appendix.
c857775ca61 Fix bug#62106
0fedbfa6a9d ; Minor improvement of documentation of GC thresholds
b0b24ad2fc5 Add missing rust-ts-mode highlight query for scoped_type_...
c0cf69f7a17 Make "case" keyword a dedenter in Python
db178517ce7 ; * lisp/arc-mode.el (w32-get-console-codepage): Declare.
157a91b54be Fix decoding non-ASCII file names in zip archives on MS-W...
4803f972047 Fix copying binary files from zip archives
679f528b953 Skip ruby-ts-syntax-propertize-symbol unless treesitter i...
081cc7aa8e0 ; * doc/misc/eglot.texi (Project-specific configuration):...
1de513a29fa Fix enums and unions appearing as structs in c-ts-base-mo...
ecdfd584a52 ruby-ts-mode: Fine-tune s-p-f on symbols (bug#62086)
29228e24f20 python-info-dedenter-opening-block-positions: Fix to supp...
01b65d442ad Autoload Eglot helper funtion eglot--debbugs-or-github-bu...
50a3559c5a7 Add chapter on advanced server configuration to Eglot manual
2e7460c2315 ; * lisp/progmodes/java-ts-mode.el (treesit-query-capture...
255eeee0e06 java-ts-mode: detect if text_block is supported.
6fe9075ff38 Revert workaround introduced in Bug#56271
f175141aead Fix searching for end of string in python-nav-end-of-stat...

# Conflicts:
# etc/NEWS

20 months ago; * etc/NEWS: Fix typos.
Michael Albinus [Tue, 14 Mar 2023 10:39:32 +0000 (11:39 +0100)]
; * etc/NEWS: Fix typos.

20 months agoFix Tramp tests
Michael Albinus [Tue, 14 Mar 2023 10:39:16 +0000 (11:39 +0100)]
Fix Tramp tests

* test/lisp/net/tramp-tests.el (tramp-test26-file-name-completion):
Fix test.
(tramp-test45-asynchronous-requests): Mark it :unstable.

20 months agoImprove Tramp processes to accept output over the same socket
Michael Albinus [Tue, 14 Mar 2023 10:38:39 +0000 (11:38 +0100)]
Improve Tramp processes to accept output over the same socket

* lisp/net/tramp.el (tramp-accept-process-output): Don't use TIMEOUT
anymore, default it to 0.  When the connection uses a shared
socket possibly, accept also the output from other processes over
the same connection.  (Bug#61350)
(tramp-handle-file-notify-rm-watch, tramp-action-process-alive)
(tramp-action-out-of-band, tramp-process-one-action)
(tramp-interrupt-process):
* lisp/net/tramp-adb.el (tramp-adb-handle-make-process):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-notify-add-watch):
* lisp/net/tramp-sh.el (tramp-sh-handle-file-notify-add-watch):
* lisp/net/tramp-smb.el (tramp-smb-action-get-acl)
(tramp-smb-action-set-acl, tramp-smb-wait-for-output):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-action-sudo):
Adapt callees.

* lisp/net/tramp.el (tramp-handle-make-process):
* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band)
(tramp-sh-handle-file-notify-add-watch)
(tramp-maybe-open-connection): Set `shared-socket' property.

20 months ago* lisp/server.el (server-eval-at): Improve docstring
Robert Pluim [Mon, 13 Mar 2023 08:25:26 +0000 (09:25 +0100)]
* lisp/server.el (server-eval-at): Improve docstring

20 months ago* lisp/progmodes/xref.el: Bump the version.
Juri Linkov [Mon, 13 Mar 2023 18:21:47 +0000 (20:21 +0200)]
* lisp/progmodes/xref.el: Bump the version.

20 months ago* lisp/progmodes/xref.el (xref--xref-buffer-mode): Split up 'setq-local'.
Juri Linkov [Mon, 13 Mar 2023 17:38:28 +0000 (19:38 +0200)]
* lisp/progmodes/xref.el (xref--xref-buffer-mode): Split up 'setq-local'.

xref.el needs to support 26.1, but an arbitrary number of variables
in 'setq-local' was added in Emacs 27.1 (bug#62162).

20 months agoFix import of keys in buffer created by epa-search-keys
Filipp Gunbin [Mon, 13 Mar 2023 16:27:13 +0000 (19:27 +0300)]
Fix import of keys in buffer created by epa-search-keys

* lisp/epa-ks.el (epa-ks--query-url): Add operation parameter.
(epa-ks--fetch-key, epa-search-keys): Use it.

20 months agoFix connection-local variables settings
Michael Albinus [Mon, 13 Mar 2023 17:02:36 +0000 (18:02 +0100)]
Fix connection-local variables settings

; * etc/NEWS: Fix typos.

* lisp/files-x.el (connection-local-set-profiles)
(connection-local-set-profile-variables): Use NOW when calling
`custom-set-variables'.

* test/lisp/files-x-tests.el
(files-x-test-connection-local-set-profile-variables)
(files-x-test-connection-local-update-profile-variables)
(files-x-test-connection-local-set-profiles)
(files-x-test-hack-connection-local-variables-apply)
(files-x-test-with-connection-local-variables)
(files-x-test-setq-connection-local): Fix tests.

* test/lisp/net/tramp-tests.el (tramp-test34-connection-local-variables)
(tramp-test34-explicit-shell-file-name): Fix tests.

20 months agoCC Mode: Allow lists of strings as safe values for *-font-lock-extra-types
Alan Mackenzie [Mon, 13 Mar 2023 16:42:02 +0000 (16:42 +0000)]
CC Mode: Allow lists of strings as safe values for *-font-lock-extra-types

* lisp/progmodes/cc-vars.el (c-list-of-strings): New function.
(c-font-lock-extra-types, c++-font-lock-extra-types)
(objc-font-lock-extra-types, java-font-lock-extra-types)
(idl-font-lock-extra-types, pike-font-lock-extra-types): Add a :safe entry
into each of thes defcustoms for c-list-of-string.
(Top level): Add an autoload entry for each of the above.

20 months ago; Minor copyedits in EGLOT-NEWS
Eli Zaretskii [Mon, 13 Mar 2023 12:48:08 +0000 (14:48 +0200)]
; Minor copyedits in EGLOT-NEWS

* etc/EGLOT-NEWS: Fix punctuation and quoting, add note about
finding Issues.

20 months agoBump Eglot version to 1.12
João Távora [Fri, 10 Mar 2023 11:30:58 +0000 (11:30 +0000)]
Bump Eglot version to 1.12

* etc/EGLOT-NEWS: New file.

* etc/NEWS: Briefly mention etc/EGLOT-NEWS.

* lisp/progmodes/eglot.el: Bump versions.

20 months agoUpdate Eglot's manual about eglot-workspace-configuration
João Távora [Sun, 12 Mar 2023 19:44:53 +0000 (19:44 +0000)]
Update Eglot's manual about eglot-workspace-configuration

There is a possible use for a global setting
eglot-workspace-configuration, which is to (ab)use it to set
user-specific configuration when the server doesn't permit other
methods.  Rearrange the "Advanced server configuration" section and
describe that use in the manual.

* doc/misc/eglot.texi (Project-specific configuration): Correct
mistake about global usefulness of eglot-workspace-configuration.
(Advanced server configuration): Swap order of sections.
(User-specific configuration): Mention possibility of globally
setting eglot-workspace-configuration.

20 months ago; * lisp/novice.el (disabled-command-function): Add note in a comment.
Eli Zaretskii [Sun, 12 Mar 2023 20:22:41 +0000 (22:22 +0200)]
; * lisp/novice.el (disabled-command-function): Add note in a comment.

20 months agoAmend last Eglot commit (bug#62065)
João Távora [Sun, 12 Mar 2023 19:30:53 +0000 (19:30 +0000)]
Amend last Eglot commit (bug#62065)

The fix contained a spurious check for this-command that shouldn't
have made it in..

* lisp/progmodes/eglot.el (eglot-ensure): Don't check this-command.

20 months agoMake eglot-ensure's post-command-hook run a bit later (bug#62065)
João Távora [Sun, 12 Mar 2023 18:19:40 +0000 (18:19 +0000)]
Make eglot-ensure's post-command-hook run a bit later (bug#62065)

'eglot-ensure', typically used in the major-mode-hook, use
'post-command-hook' to schedule an automated, non-interactive
connection attempt to a server.  The goal is to connect when the
buffer is ready, i.e. after the user command that found the file.

However, if there are dir-local or buffer-local variables to confirm,
finding the file will cause a minibuffer prompt to appear.

In that case, 'eglot-ensure's addition to the global post-command-hook
runs before it was intended too and a connection is started
prematurely.

In turn, this means that a call to 'hack-dir-local-variables' -- which
is part of the connection process -- which also needs a minibuffer
prompt, collides with the previous one.  This generates an error and
confuses the user, who doesn't know if the directory-local variables
have been applied or not.

This commit fixes the clash by having 'eglot-ensure' set
'post-command-hook' buffer-locally.  This causes the automated
connection to take place, as intended, after the user's original
file-finding command has ended.

However, the problem reported in bug#62065 is not completely fixed.
If the user answers "no" to the first "confirm local variables"
"prompt, she will be prompted again in the second one.  A subsequent
commit will address this separate problem.

* lisp/progmodes/eglot.el (eglot-ensure): Use buffer-local post-command-hook.

20 months agoFix display of disabled-command help text
Eli Zaretskii [Sun, 12 Mar 2023 17:32:02 +0000 (19:32 +0200)]
Fix display of disabled-command help text

* lisp/novice.el (disabled-command-function): Improve wording, and
make sure the prompt doesn't exceed one screen line, so that the
mini-window is not resized (which gets in the way of fitting the
window to the size of the help text), and the help text is fully
visible when Emacs prompts for input.  (Bug#62146)

20 months agoRepair and speed up safe-copy-tree and make it internal (bug#61962)
Mattias Engdegård [Sun, 12 Mar 2023 16:00:25 +0000 (17:00 +0100)]
Repair and speed up safe-copy-tree and make it internal (bug#61962)

There is no particular requirement for safe-copy-tree so let's make it
internal for now.  The new implementation is faster and more correct.

* doc/lispref/lists.texi (Building Lists):
* etc/NEWS:  Remove doc and announcement.
* lisp/subr.el (safe-copy-tree--seen, safe-copy-tree--1)
(safe-copy-tree): Remove old version.
* lisp/emacs-lisp/bytecomp.el (bytecomp--copy-tree-seen)
(bytecomp--copy-tree-1, bytecomp--copy-tree): Add new version.
(byte-compile-initial-macro-environment): Use it.
* test/lisp/subr-tests.el (subr--safe-copy-tree):
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp--copy-tree):
Move and improve tests.

20 months agoRemove mention of old dotted-list reader quirk from manual
Mattias Engdegård [Sun, 12 Mar 2023 16:57:38 +0000 (17:57 +0100)]
Remove mention of old dotted-list reader quirk from manual

* doc/lispref/objects.texi (Dotted Pair Notation):
The (. X) reader peculiarity is no more (bug#62020).

20 months agoMake Tramp file name completion more quiet for all backends
Michael Albinus [Sun, 12 Mar 2023 16:21:57 +0000 (17:21 +0100)]
Make Tramp file name completion more quiet for all backends

* lisp/net/tramp-adb.el (tramp-adb-handle-file-name-all-completions):
* lisp/net/tramp-archive.el
(tramp-archive-handle-file-name-all-completions):
* lisp/net/tramp-crypt.el (tramp-crypt-handle-file-name-all-completions):
* lisp/net/tramp-fuse.el (tramp-fuse-handle-file-name-all-completions):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-name-all-completions):
* lisp/net/tramp-sh.el (tramp-sh-handle-file-name-all-completions):
* lisp/net/tramp-smb.el (tramp-smb-handle-file-name-all-completions):
* lisp/net/tramp-sudoedit.el
(tramp-sudoedit-handle-file-name-all-completions):
Return nil when DIRECTORY is missing.  (Bug#61890)

20 months ago; NEWS markings.
Eli Zaretskii [Sun, 12 Mar 2023 15:43:40 +0000 (17:43 +0200)]
; NEWS markings.

20 months agoAdd elixir-ts-mode (Bug#61996)
Wilhelm H Kirschbaum [Sun, 12 Mar 2023 15:10:43 +0000 (17:10 +0200)]
Add elixir-ts-mode (Bug#61996)

* etc/NEWS: Mention the new mode.
* lisp/progmodes/elixir-ts-mode.el: New file.
* test/lisp/progmodes/elixir-ts-mode-tests.el: New file.
* test/lisp/progmodes/elixir-ts-mode-resources/indent.erts: New file.
* admin/notes/tree-sitter/build-module/batch.sh:
* admin/notes/tree-sitter/build-module/build.sh: Add Elixir support.
* lisp/progmodes/eglot.el (eglot-server-programs): Add elixir-ts-mode.

20 months agoAdd heex-ts-mode (Bug#61996)
Wilhelm H Kirschbaum [Sun, 12 Mar 2023 15:08:50 +0000 (17:08 +0200)]
Add heex-ts-mode (Bug#61996)

* etc/NEWS: Mention the new mode.
* lisp/progmodes/heex-ts-mode.el: New file.
* test/lisp/progmodes/heex-ts-mode-tests.el: New file.
* test/lisp/progmodes/heex-ts-mode-resources/indent.erts: New file.
* admin/notes/tree-sitter/build-module/batch.sh:
* admin/notes/tree-sitter/build-module/build.sh: Add HEEx support.

20 months agoFix value history shown for 'gc-cons-percentage'
Eli Zaretskii [Sun, 12 Mar 2023 14:19:49 +0000 (16:19 +0200)]
Fix value history shown for 'gc-cons-percentage'

When Emacs is built, temacs is run in batch mode, so if we enlarge
'gc-cons-percentage' in that case, the enlarged value will be
"remembered" by the dumped Emacs, and will show confusing
information in "C-h v", claiming that the original value was 1.0.
Keeping the value at 0.1 during dumping avoids that.

* src/emacs.c (main): Increase 'gc-cons-percentage' in batch mode
only if we are not initializing (a.k.a. "dumping") Emacs.

20 months agoFix pluralization in shortdoc-help-fns-examples-function
Daniel Martín [Sun, 12 Mar 2023 12:38:34 +0000 (13:38 +0100)]
Fix pluralization in shortdoc-help-fns-examples-function

* lisp/emacs-lisp/shortdoc.el (shortdoc-help-fns-examples-function):
Implement a better logic to pluralize "Example", by counting the
number of arrow characters in the example string. (Bug#61877)
* test/lisp/emacs-lisp/shortdoc-tests.el
(shortdoc-help-fns-examples-function-test): Add a test.

20 months agoTRework fix for bug#62106
Michael Albinus [Sun, 12 Mar 2023 10:01:22 +0000 (11:01 +0100)]
TRework fix for bug#62106

* lisp/files-x.el (connection-local-set-profiles)
(connection-local-set-profile-variables):
Use `custom-set-variables'.  It serves the purpose to not keep
unsaved user options, and it is less invasive than
`customize-save-variable'.

20 months ago; Fix last change
Eli Zaretskii [Sun, 12 Mar 2023 08:25:10 +0000 (10:25 +0200)]
; Fix last change

* lisp/emacs-lisp/shortdoc.el (shortdoc-help-fns-examples-function)
(shortdoc-function-examples): Fix compilation warning and add an
empty line before the examples.

* lisp/emacs-lisp/shortdoc.el (shortdoc--insert-group-in-buffer)
(shortdoc-function-examples)
(shortdoc-help-fns-examples-function):
* etc/NEWS:
* doc/lispref/help.texi (Documentation Groups):
* doc/emacs/help.texi (Name Help): Improve documentation of
the last change.  (Bug#61877)

20 months agoAdd functions to query Emacs Lisp examples registered in shortdoc
Daniel Martín [Tue, 28 Feb 2023 22:15:40 +0000 (23:15 +0100)]
Add functions to query Emacs Lisp examples registered in shortdoc

* lisp/emacs-lisp/shortdoc.el (shortdoc--display-function): Add
a new shortdoc-example text property so that ELisp examples can
be searched for later.
(shortdoc--insert-group-in-buffer): New function extracted from
the buffer insertion code in 'shortdoc-display-group'.
(shortdoc-display-group): Implement in terms of
'shortdoc--insert-group-in-buffer'.
(shortdoc-function-examples): New function that returns an alist
of Emacs Lisp examples from shortdoc.
(shortdoc-help-fns-examples-function): New function to insert
Emacs Lisp function examples in *Help* buffers, if added to
'help-fns-describe-function-functions'.
*
test/lisp/emacs-lisp/shortdoc-tests.el (shortdoc-function-examples-test):
Test it.
* doc/emacs/help.texi (Name Help): Document in the user manual.
* doc/lispref/help.texi (Documentation Groups): Document it.
* etc/NEWS: Advertise it. (Bug#61877)

20 months ago; Fix typo in docstring
Jim Porter [Sun, 12 Mar 2023 07:51:20 +0000 (23:51 -0800)]
; Fix typo in docstring

* test/lisp/eshell/em-cmpl-tests.el
(em-cmpl-test/variable-assign-completion/non-assignment): Fix typo.

20 months ago; * etc/NEWS: Fix last change.
Eli Zaretskii [Sun, 12 Mar 2023 07:48:45 +0000 (09:48 +0200)]
; * etc/NEWS: Fix last change.

20 months ago; Remove 'ns-popup-font-panel' from documentation
Eli Zaretskii [Sun, 12 Mar 2023 07:45:48 +0000 (09:45 +0200)]
; Remove 'ns-popup-font-panel' from documentation

* doc/emacs/macos.texi (Mac / GNUstep Customization): Remove the
reference to 'ns-popup-font-panel'.  (Bug#62130)

20 months agoAdd support for completing special references (e.g. buffers) in Eshell
Jim Porter [Wed, 25 Jan 2023 05:22:06 +0000 (21:22 -0800)]
Add support for completing special references (e.g. buffers) in Eshell

* lisp/eshell/em-cmpl.el (eshell-complete-parse-arguments): Handle
special references.

* lisp/eshell/em-arg.el (eshell-parse-special-reference): Ensure point
is just after the "#<" when incomplete, and handle backslash escapes
more thoroughly.
(eshell-complete-special-reference): New function.

* test/lisp/eshell/esh-arg-tests.el
(esh-arg-test/special-reference/default)
(esh-arg-test/special-reference/buffer)
(esh-arg-test/special-reference/special):
* test/lisp/eshell/em-cmpl-tests.el
(em-cmpl-test/special-ref-completion/type)
(em-cmpl-test/special-ref-completion/implicit-buffer)
(em-cmpl-test/special-ref-completion/buffer): New tests.

20 months agoAdd missing indentation rule for rust-ts-mode (Bug#62109)
Randy Taylor [Sat, 11 Mar 2023 01:56:04 +0000 (20:56 -0500)]
Add missing indentation rule for rust-ts-mode (Bug#62109)

* lisp/progmodes/rust-ts-mode.el (rust-ts-mode--indent-rules): Add
missing rule.

20 months ago; One more improvement to ELisp "internals" appendix.
Eli Zaretskii [Sat, 11 Mar 2023 17:30:06 +0000 (19:30 +0200)]
; One more improvement to ELisp "internals" appendix.

20 months agoFix bug#62106
Michael Albinus [Sat, 11 Mar 2023 16:31:11 +0000 (17:31 +0100)]
Fix bug#62106

* lisp/files-x.el (connection-local-set-profiles)
(connection-local-set-profile-variables):
Use `customize-save-variable' instead of `customize-set-variable'.
(Bug#62106)

20 months ago; Minor improvement of documentation of GC thresholds
Eli Zaretskii [Sat, 11 Mar 2023 16:16:35 +0000 (18:16 +0200)]
; Minor improvement of documentation of GC thresholds

* doc/lispref/internals.texi (Garbage Collection): More practical
aspects of enlarging the GC threshold.

20 months agoAdd missing rust-ts-mode highlight query for scoped_type_identifiers
Randy Taylor [Sat, 11 Mar 2023 02:12:33 +0000 (21:12 -0500)]
Add missing rust-ts-mode highlight query for scoped_type_identifiers

* lisp/progmodes/rust-ts-mode.el (rust-ts-mode--font-lock-settings):
Add missing query.

20 months agoMake "case" keyword a dedenter in Python
kobarity [Fri, 10 Mar 2023 05:26:22 +0000 (14:26 +0900)]
Make "case" keyword a dedenter in Python

* lisp/progmodes/python.el (python-rx): Add "case" to dedenter.
(python-info-dedenter-opening-block-positions): Add "case" to pairs.
* test/lisp/progmodes/python-tests.el (python-indent-dedenters-9):
New test.

20 months ago; * lisp/arc-mode.el (w32-get-console-codepage): Declare.
Eli Zaretskii [Sat, 11 Mar 2023 12:54:22 +0000 (14:54 +0200)]
; * lisp/arc-mode.el (w32-get-console-codepage): Declare.

20 months agoFix decoding non-ASCII file names in zip archives on MS-Windows
Eli Zaretskii [Sat, 11 Mar 2023 11:30:37 +0000 (13:30 +0200)]
Fix decoding non-ASCII file names in zip archives on MS-Windows

* lisp/arc-mode.el (archive-zip-summarize): On MS-Windows,
override archive-file-name-coding-system for files compressed
on MS-Windows, and use the local console encoding instead.

20 months agoFix copying binary files from zip archives
Eli Zaretskii [Sat, 11 Mar 2023 09:54:31 +0000 (11:54 +0200)]
Fix copying binary files from zip archives

* lisp/arc-mode.el (archive-copy-file): Prevent any coding
conversions when writing output files.  (Bug#62091)

20 months agoRemove recursion from character escape handling in reader
Mattias Engdegård [Fri, 10 Mar 2023 16:10:30 +0000 (17:10 +0100)]
Remove recursion from character escape handling in reader

This cures a C stack overflow when reading certain long (crafted)
strings (bug#62039) and improves performance of reading escaped
characters in character and string literals.
Reported by Bruno Haible.

* src/lread.c (invalid_escape_syntax_error): New.
(read_escape): Rename to...
(read_char_escape): ...this.  Remove recursion.  Pass read-ahead char
as argument.  Improve code performance and clarity.
(read_char_literal, read_string_literal): Update calls.
* test/src/lread-tests.el (lread-char-modifiers)
(lread-many-modifiers): Add test cases.

20 months agoUpdate from Gnulib by running admin/merge-gnulib
Paul Eggert [Sat, 11 Mar 2023 00:51:41 +0000 (16:51 -0800)]
Update from Gnulib by running admin/merge-gnulib

Run admin/merge-gnulib along with the following change:
* admin/merge-gnulib (GNULIB_MODULES): Replace ‘time’ with
‘time-h’, adjusting to a recent renaming in Gnulib modules.
Emacs doesn’t appear to need the new Gnulib ‘time’ module.

20 months agosrc/profiler.c: Keep track of the discarded counts
Stefan Monnier [Fri, 10 Mar 2023 20:54:10 +0000 (15:54 -0500)]
src/profiler.c: Keep track of the discarded counts

When the table overflows and wh evict entries, keep track of those
counts in a global counter so we can see the proportion of
samples this represents.

* src/profiler.c (struct profiler_log): Add `discarded` field.
(evict_lower_half): Change arg to be `struct profiler_log`.
Transfer counts to the new `discarded` field.
(record_backtrace): Change arg to be `struct profiler_log`.
(add_sample): Adjust call accordingly.
(export_log): Add `discarded` counts to the result.
Onle add the GC and `discarded` counts if they're non-zero.
(syms_of_profiler): Define new symbol `Discarded Samples`.

20 months agosrc/profiler.c: Share more code between CPU and Memory profilers
Stefan Monnier [Fri, 10 Mar 2023 20:30:20 +0000 (15:30 -0500)]
src/profiler.c: Share more code between CPU and Memory profilers

* src/profiler.c (struct profiler_log): New type.
(make_log): Use it.
(cpu, memory): New vars to replace cpu_log, memory_log, cpu_gc_count,
and mem_gc_count.
(add_sample): New function, extracted from `handle_profiler_signal`.
(handle_profiler_signal, malloc_probe): Use it.
(Fprofiler_cpu_start, Fprofiler_memory_start): Adjust call to `make_log`.
(export_log): New function, extracted from `Fprofiler_cpu_log`.
(Fprofiler_cpu_log, Fprofiler_memory_log): Use it.
(syms_of_profiler, syms_of_profiler_for_pdumper): Adjust to new `cpu`
and `memory` vars.

20 months agosrc/profiler.c: Try and fix occasional assertion failures
Stefan Monnier [Fri, 10 Mar 2023 20:05:55 +0000 (15:05 -0500)]
src/profiler.c: Try and fix occasional assertion failures

Apparently the (>= match imatch) test fails sometimes in `profiler.el`.
Not sure where this comes from, but this patch should remove one
possible source.

* src/profiler.c (Fprofiler_cpu_log, Fprofiler_memory_log):
Change the special Automatic_GC backtrace to make it clear that it's
a *sibling* of the call tree (i.e. it's at the (its own) root).
(malloc_probe): Obey `size` when incrementing the gc_counter.

20 months agosrc/profiler.c: Keep track of allocations during GC
Eli Zaretskii [Fri, 10 Mar 2023 19:54:52 +0000 (14:54 -0500)]
src/profiler.c: Keep track of allocations during GC

Cargo-cult the `cpu_gc_count` code to `memory_gc_count`.

* src/profiler.c (mem_gc_count): New var.
(Fprofiler_memory_start): Initialize it.
(Fprofiler_memory_log): Increment it.
(Fprofiler_memory_log): Use it.

20 months ago* lisp/progmodes/gud.el (gud-minor-menu-map): Fix thinko in last change
Stefan Monnier [Fri, 10 Mar 2023 17:22:43 +0000 (12:22 -0500)]
* lisp/progmodes/gud.el (gud-minor-menu-map): Fix thinko in last change

20 months agoImprove thing-at-point email detection
Robert Pluim [Wed, 15 Feb 2023 11:16:11 +0000 (12:16 +0100)]
Improve thing-at-point email detection

* lisp/thingatpt.el (thing-at-point-email-regexp): Allow numbers at
the start of the user portion, and disallow '.' at the start.  Also
disallow '.' at the start of the domain portion.
* test/lisp/thingatpt-tests.el (thing-at-point-test-data): Add various
email tests.

Bug#61519

20 months agoSkip ruby-ts-syntax-propertize-symbol unless treesitter is available
Robert Pluim [Fri, 10 Mar 2023 10:13:42 +0000 (11:13 +0100)]
Skip ruby-ts-syntax-propertize-symbol unless treesitter is available

 *
 test/lisp/progmodes/ruby-ts-mode-tests.el (ruby-ts-syntax-propertize-symbol):
 Add check for treesitter.

20 months ago; * doc/misc/eglot.texi (Project-specific configuration): Fix typo.
Yuan Fu [Fri, 10 Mar 2023 06:15:36 +0000 (22:15 -0800)]
; * doc/misc/eglot.texi (Project-specific configuration): Fix typo.

20 months agoFix enums and unions appearing as structs in c-ts-base-mode's imenu
Randy Taylor [Wed, 8 Mar 2023 01:38:18 +0000 (20:38 -0500)]
Fix enums and unions appearing as structs in c-ts-base-mode's imenu

* lisp/progmodes/c-ts-mode.el (c-ts-base-mode): Separate enums and unions out
from structs.

20 months agoruby-ts-mode: Fine-tune s-p-f on symbols (bug#62086)
Dmitry Gutov [Thu, 9 Mar 2023 21:49:39 +0000 (23:49 +0200)]
ruby-ts-mode: Fine-tune s-p-f on symbols (bug#62086)

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--s-p-query):
Don't match ':' in symbol node text.  Or '_', I suppose.
(ruby-ts--syntax-propertize): Make sure to only put the '_' syntax
on punctuation syntax characters, and not on the whole symbol (to
e.g. have symbols like :foo? include text recognized as word).

* test/lisp/progmodes/ruby-ts-mode-tests.el
(ruby-ts-syntax-propertize-symbol): New test.

20 months agogud.el: Bring back the pseudo-tool-bar in text frames (bug#62041)
Stefan Monnier [Thu, 9 Mar 2023 21:19:16 +0000 (16:19 -0500)]
gud.el: Bring back the pseudo-tool-bar in text frames (bug#62041)

commit 8bb5c1bfec0929f2ba419e1c503f5acc01c336c2 accidentally
threw away the pseudo-tool-bar implemented in the text frames'
menu-bar of gud-minor-mode buffers.
Bring it back, and while we're at it, improve it so it also works
right when you have both text and GUI frames.

Also fix a misunderstanding in last change (`gud-mode-map` does need
to have a Gud menu, because `gud-mode` buffers already have it by
virtue of being in `gud-minor-mode` as well).

* lisp/progmodes/gud.el (gud-text-menu-bar-map): New keymap.
(gud-menu-mode-map): Rename from `gud-shared-mode-map`.
(gud-menu-map): Adjust accordingly.
(gud-minor-mode-map): Use them.
(gud-mode-map): Don't inherit from the shared/menu keymap.

20 months agopython-info-dedenter-opening-block-positions: Fix to support "bare" match
Dmitry Gutov [Thu, 9 Mar 2023 15:24:54 +0000 (17:24 +0200)]
python-info-dedenter-opening-block-positions: Fix to support "bare" match

* lisp/progmodes/python.el
(python-info-dedenter-opening-block-positions): Make the check
stricter.  Require that block starts only at indentation.

* test/lisp/progmodes/python-tests.el
(python-indent-after-bare-match): Another test (bug#62031).

20 months agoAutoload Eglot helper funtion eglot--debbugs-or-github-bug-uri
João Távora [Thu, 9 Mar 2023 13:07:02 +0000 (13:07 +0000)]
Autoload Eglot helper funtion eglot--debbugs-or-github-bug-uri

This isn't a typical autoload: the progn block is plced in the
autoloads file, but the eglot.el file itself isn't loaded as a result
when the function inside the progn block is called.

* lisp/progmodes/eglot.el (eglot--debbugs-or-github-bug-uri):
autoload, but in progn.

20 months agoAdd chapter on advanced server configuration to Eglot manual
João Távora [Thu, 9 Mar 2023 01:20:11 +0000 (01:20 +0000)]
Add chapter on advanced server configuration to Eglot manual

* doc/misc/eglot.texi (Top): Add section "Advanced server configuration"
(Setting Up LSP Servers): Rework.
(Advanced server configuration): New chapter.

20 months ago; * lisp/progmodes/java-ts-mode.el (treesit-query-capture): Declare.
Eli Zaretskii [Thu, 9 Mar 2023 10:23:14 +0000 (12:23 +0200)]
; * lisp/progmodes/java-ts-mode.el (treesit-query-capture): Declare.

20 months agojava-ts-mode: detect if text_block is supported.
Vincenzo Pupillo [Mon, 6 Mar 2023 11:24:34 +0000 (12:24 +0100)]
java-ts-mode: detect if text_block is supported.

A recent commit in tree-sitter-java (issue #141) removed support for
the text_block node type from the grammar. To support the old released
version and the new one, a helper function was added on which the
string syntax highlighting now depends. (bug#61913)

* lisp/progmodes/java-ts-mode.el
(java-ts-mode--string-highlight-helper): New helper function that
return the right query string
(java-ts-mode--font-lock-settings): Use it

Copyright-paperwork-exempt: yes

20 months agoRevert workaround introduced in Bug#56271
kobarity [Sun, 5 Mar 2023 08:07:17 +0000 (17:07 +0900)]
Revert workaround introduced in Bug#56271

* lisp/progmodes/python.el (python-nav-end-of-statement)
(python-nav-end-of-block): Revert workaround introduced in Bug#56271
as the bug is fixedin Bug#58780.

20 months agoFix searching for end of string in python-nav-end-of-statement
kobarity [Sun, 5 Mar 2023 08:06:26 +0000 (17:06 +0900)]
Fix searching for end of string in python-nav-end-of-statement

* lisp/progmodes/python.el (python-nav-end-of-statement): Add
searching for corresponding string-quote.
* test/lisp/progmodes/python-tests.el (python-nav-end-of-statement-3)
(python-nav-end-of-statement-4, python-info-current-defun-4): New
tests. (Bug#58780)

20 months agoUse a face for DocView SVG
Manuel Giraud [Thu, 2 Mar 2023 18:16:19 +0000 (19:16 +0100)]
Use a face for DocView SVG

* lisp/doc-view.el (doc-view-svg-face): New face for SVG images.
(doc-view-insert-image): Use it.  (Bug#61816)

20 months agoFix out of sync counters in image-dired
Manuel Giraud [Thu, 2 Mar 2023 16:53:26 +0000 (17:53 +0100)]
Fix out of sync counters in image-dired

* lisp/image/image-dired.el (image-dired-delete-char): Update
thumbnails counter upon deletion.
(image-dired--update-header-line): Compute thumbnail index
dynamically.
(image-dired-insert-thumbnail): Remove now unused image-number
text property.  (Bug#61922)

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

7e1012765c4 Fix libwebp check for some webp installations
c2ca009da4c Avoid potential infloop
34c14430e9d Don't misindent 'else:' after 'if re.match:' in Python
8a2a554192a * Make sure `default-directory' exists before spawning pr...
1862e7eb7ef Fix sed expression in install-etc make target
c8ec0017cb9 Avoid using bash in the emacsclient desktop file
a588937094f Fix documentation of the 'line-height' text property
971ded31c4f Add 'declare' specs to with- and without-restriction

20 months agoFix libwebp check for some webp installations
Po Lu [Thu, 9 Mar 2023 00:52:54 +0000 (08:52 +0800)]
Fix libwebp check for some webp installations

* configure.ac: Look for WebPGetInfo; if it is not there, look
for libwebpdecoder as well.  (bug#61988)

20 months agoserver-eval-at: Signal more specific condition on unreadable result
Sean Whitton [Sat, 4 Mar 2023 21:53:01 +0000 (14:53 -0700)]
server-eval-at: Signal more specific condition on unreadable result

* lisp/server.el (server-return-invalid-read-syntax): New error
signal.
(server-eval-at): Re-signal invalid-read-syntax as
server-return-invalid-read-syntax (bug#61658).

20 months agoAvoid potential infloop
Dmitry Gutov [Wed, 8 Mar 2023 22:43:31 +0000 (00:43 +0200)]
Avoid potential infloop

* lisp/progmodes/python.el
(python-info-dedenter-opening-block-positions):
Avoid potential infloop (bug#62031).

20 months agoFix Pcompletion of "tar" when using unrecognized arguments
Jim Porter [Fri, 10 Feb 2023 07:27:50 +0000 (23:27 -0800)]
Fix Pcompletion of "tar" when using unrecognized arguments

Previously, arguments to tar like "--warning=no-timestamp" would cause
Pcompletion to hang (bug#58921).

This simplifies the logic flow by moving all the cases for "--"
arguments inside the THEN form of '(if (pcomplete-match "^--" 0)', and
for all "-" arguments inside the ELSE form.

* lisp/pcmpl-gnu.el (pcmpl-gnu--tar-long-options): New variable.
(pcomplete/tar): Properly handle completion of arguments that look
like "--ARG=", even if they're not recognized by this function.

20 months agoDon't misindent 'else:' after 'if re.match:' in Python
Dmitry Gutov [Wed, 8 Mar 2023 20:41:23 +0000 (22:41 +0200)]
Don't misindent 'else:' after 'if re.match:' in Python

* lisp/progmodes/python.el
(python-info-dedenter-opening-block-positions): Check that the
supposed block start is not a method call (bug#62031).

* test/lisp/progmodes/python-tests.el (python-indent-after-re-match):
New test.

Co-authored-by: Lele Gaifax <lele@metapensiero.it>
20 months ago* Make sure `default-directory' exists before spawning processes (bug#62004)
Andrea Corallo [Wed, 8 Mar 2023 20:08:49 +0000 (21:08 +0100)]
* Make sure `default-directory' exists before spawning processes (bug#62004)

* lisp/emacs-lisp/comp.el (comp-final, comp-run-async-workers): Bind
`default-directory' to `invocation-directory'.

20 months agogud.el: Fix bug#62041
Stefan Monnier [Wed, 8 Mar 2023 20:08:00 +0000 (15:08 -0500)]
gud.el: Fix bug#62041

Add a new `gud-shared-mode-map` where we put the bindings
shared between `gud-minor-mode-map` and `gud-mode-map`.

* lisp/progmodes/gud.el (gud-shared-mode-map): New keymap.
(gud-mode-map, gud-minor-mode-map): Use it as parent.
(gud-menu-map): Put the menu in that new keymap.
(gud-speedbar-buttons, gdb-script-font-lock-syntactic-face)
(gdb-script-indent-line): Skip obsolete face variables.

20 months agoFix sed expression in install-etc make target
Ulrich Müller [Wed, 8 Mar 2023 18:48:33 +0000 (19:48 +0100)]
Fix sed expression in install-etc make target

* Makefile.in (install-etc): Fix sed expression for emacsclient
desktop files.  (Bug#62045)

20 months agoAvoid using bash in the emacsclient desktop file
Ulrich Müller [Wed, 8 Mar 2023 18:37:27 +0000 (19:37 +0100)]
Avoid using bash in the emacsclient desktop file

* etc/emacsclient-mail.desktop (Exec): Use sh and sed instead
of bash, because the latter may not be available everywhere.

20 months agoFix documentation of the 'line-height' text property
Eli Zaretskii [Wed, 8 Mar 2023 17:29:33 +0000 (19:29 +0200)]
Fix documentation of the 'line-height' text property

* doc/lispref/display.texi (Line Height): More accurate
documentation of the value t of 'line-height' text property.
(Bug#62048)

20 months agoAdd 'declare' specs to with- and without-restriction
Gregory Heytings [Wed, 8 Mar 2023 09:55:06 +0000 (09:55 +0000)]
Add 'declare' specs to with- and without-restriction

* lisp/subr.el (with-restriction):
(without-restriction): Add 'declare' specs.

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

f9b7913656f Fix empty line indentation in c-ts-mode (bug#61997)
90504f9d898 Fix tree-sitter indent preset prev-line (bug#61998)
ed3bab3cc72 Revert 'forward-sentence-default-function' to return poin...
bfe62b10413 ; * etc/NEWS: Fix typos.
3c1693d08b0 Fix Elisp code injection vulnerability in emacsclient-mai...
ab417c8a6ee Fix problem with debuginfod queries in "M-x gdb"

# Conflicts:
# etc/NEWS

20 months agoFix empty line indentation in c-ts-mode (bug#61997)
Yuan Fu [Wed, 8 Mar 2023 00:35:23 +0000 (16:35 -0800)]
Fix empty line indentation in c-ts-mode (bug#61997)

* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--indent-styles): Handle the empty line case.
* test/lisp/progmodes/c-ts-mode-resources/indent.erts: New test.

* doc/lispref/modes.texi (Parser-based Indentation): Update manual.
* lisp/treesit.el (treesit-simple-indent-presets): Support null as
a value for NODE-TYPE in the 'match' matcher.

20 months agoFix tree-sitter indent preset prev-line (bug#61998)
Yuan Fu [Wed, 8 Mar 2023 00:26:33 +0000 (16:26 -0800)]
Fix tree-sitter indent preset prev-line (bug#61998)

* lisp/treesit.el (treesit-simple-indent-presets): Fix return value.

20 months agoRevert 'forward-sentence-default-function' to return point (bug#62027)
Manuel Giraud [Tue, 7 Mar 2023 19:03:53 +0000 (20:03 +0100)]
Revert 'forward-sentence-default-function' to return point (bug#62027)

* lisp/textmodes/paragraphs.el
(forward-sentence-default-function): Revert to return the
position of point.
(count-sentences): Adapt to this change.

20 months ago; * etc/NEWS: Fix typos.
Michael Albinus [Tue, 7 Mar 2023 17:50:44 +0000 (18:50 +0100)]
; * etc/NEWS: Fix typos.

20 months ago* test/lisp/subr-tests.el (subr--safe-copy-tree): New tests for safe-copy-tree
Alan Mackenzie [Tue, 7 Mar 2023 17:38:20 +0000 (17:38 +0000)]
* test/lisp/subr-tests.el (subr--safe-copy-tree): New tests for safe-copy-tree

20 months agoFix Elisp code injection vulnerability in emacsclient-mail.desktop
Ulrich Müller [Tue, 7 Mar 2023 17:25:37 +0000 (18:25 +0100)]
Fix Elisp code injection vulnerability in emacsclient-mail.desktop

A crafted mailto URI could contain unescaped double-quote
characters, allowing injection of Elisp code.  Therefore, any
'\' and '"' characters are replaced by '\\' and '\"', using Bash
pattern substitution (which is not available in the POSIX shell).

We want to pass literal 'u=${1//\\/\\\\}; u=${u//\"/\\\"};' in the
bash -c command, but in the desktop entry '"', '$', and '\' must
be escaped as '\\"', '\\$', and '\\\\', respectively (backslashes
are expanded twice, see the Desktop Entry Specification).

Reported by Gabriel Corona <gabriel.corona@free.fr>.

* etc/emacsclient-mail.desktop (Exec): Escape backslash and
double-quote characters.

20 months agosafe-copy-tree. Correct mistakes from earlier patch.
Alan Mackenzie [Tue, 7 Mar 2023 15:26:20 +0000 (15:26 +0000)]
safe-copy-tree.  Correct mistakes from earlier patch.

* lisp/emacs-lisp/bytecomp.el (compile-defun): Remove unintended change.

* lisp/subr.el (safe-copy-tree--seen): Correct grammatical error in doc
string.
(safe-copy-tree): Delete hash table at end of function.

* doc/lispref/lists.texi (Building Lists): Add an "@end defun" line.

20 months agoFix problem with debuginfod queries in "M-x gdb"
Eli Zaretskii [Tue, 7 Mar 2023 12:39:27 +0000 (14:39 +0200)]
Fix problem with debuginfod queries in "M-x gdb"

* lisp/progmodes/gdb-mi.el (gdb-debuginfod-enable-setting): New
defcustom.
(gdb-debuginfod-message): New function.
(gdb-init-1): Initialize gdb-debuginfod-enable.  Ask the user
about debuginfod queries and display any error messages.
(Bug#61973)

* etc/NEWS: Announce the change.

20 months agoeval-and-compile: Strip symbol positions for eval but not for compile.
Alan Mackenzie [Tue, 7 Mar 2023 08:00:25 +0000 (08:00 +0000)]
eval-and-compile: Strip symbol positions for eval but not for compile.

This fixes bug #61962.

* lisp/subr.el (safe-copy-tree): New function.

* lisp/emacs-lisp/bytecomp.el (byte-compile-initial-macro-environment): Amend
the entry for eval-and-compile to use safe-copy-tree and
byte-run-strip-symbol-positions for the eval part.

* doc/lispref/lists.texi (Building Lists): Document safe-copy-tree.

* etc/NEWS: Note the new function safe-copy-tree.

20 months agoMerge from origin/emacs-29
Stefan Kangas [Tue, 7 Mar 2023 05:30:10 +0000 (06:30 +0100)]
Merge from origin/emacs-29

bd07cec8442 Fix regression in Fido mode (bug#62015)
0e3c7ac13da * Fix `emacs-lisp-native-compile-and-load' for (bug#61917)
4a7e657389a * lisp/emacs-lisp/comp.el (comp-prettyformat-insn): Fix (...
8a8a994cfab Revert "Fix configuration of webp libraries"
de4277af009 Fix configuration of webp libraries

20 months agoFix regression in Fido mode (bug#62015)
João Távora [Mon, 6 Mar 2023 22:28:47 +0000 (22:28 +0000)]
Fix regression in Fido mode (bug#62015)

To understand the regression consider this recipe where the 'fo'
pattern is typed by the user in the last step.

   emacs -Q
   C-x b foo RET
   C-x b afoo RET
   C-x b *scratch* RET
   M-x fido-mode RET
   C-x b fo

This used to offer both 'foo' and 'afoo' as candidates but now only
offered 'foo'.  This is because the pattern 'fo' matches 'foo', but
not 'afoo' with 'basic' completion style.

Fido mode, however, prioritizes 'flex' completion style, and that is
not happening here as it used to.

This was introduced in this commit

     commit bf81df86e52fdc995bec8d9646f84d114cb896d1
     Author: João Távora <joaotavora@gmail.com>
     Date:   Wed Dec 7 10:43:59 2022 +0000

         Don't override completion-category-defaults in fido-mode

I took away the nil setting of 'completion-category-defaults; in Fido
mode's minibuffer. It seemed generally the correct thing to do, and
was done mainly because Eglot added its style preferences to that
variable instead of completion-category-overrides directly, which is a
nono.  So, to be able use the Fido UI with Eglot successfully,
'completion-category-defaults' should stay untouched.  Or so I
thought.

However, I failed to notice that, for most categories, the default
value of 'completion-category-defaults' prioritizes the 'basic'
completion style.

For example, in the 'buffer' category, the default value has the
styles list '(basic substring)'.  This means that if a pattern matches
accoring to the 'basic' style, 'substring' will not be tried.  And
neither will 'completion-styles' which in Fido mode's case happens to
be 'flex'.

The solution in this commit is to craft a value for completion
category defaults that is just like the default one, but prioritizes
'flex' completion for every category.

* lisp/icomplete.el (icomplete--fido-ccd): New helper.
(icomplete--fido-mode-setup): Use it.

20 months ago* Fix `emacs-lisp-native-compile-and-load' for (bug#61917)
Andrea Corallo [Mon, 6 Mar 2023 16:27:32 +0000 (17:27 +0100)]
* Fix `emacs-lisp-native-compile-and-load' for (bug#61917)

* lisp/progmodes/elisp-mode.el (emacs-lisp-native-compile-and-load):
Don't load if no compialtion happened.