]> git.eshelyaron.com Git - emacs.git/log
emacs.git
18 months agoCement ordering of essential hook members in ERC
F. Jason Park [Mon, 5 Jun 2023 10:49:44 +0000 (03:49 -0700)]
Cement ordering of essential hook members in ERC

* etc/ERC-NEWS: Add new section explaining the pinning of certain hook
members owned by built-in modules to fixed depths.
* lisp/erc/erc-button.el (erc-button-mode, erc-button-enable): Change
hook depth for `erc-button-add-buttons' from 90 to 30.
* lisp/erc/erc-fill.el (erc-fill-mode, erc-fill-enable): Change hook
depth for `erc-fill' from 0 to 40.
* lisp/erc/erc-match.el (erc-match-mode, erc-match-enable): Change
hook depth for `erc-match-message' from 90 to 60.
* lisp/erc/erc-stamp.el (erc-stamp-mode, erc-stamp-enable): Change
hook depth for `erc-add-timestamp' from 90 to 50.
* test/lisp/erc/erc-tests.el
(erc-tests--assert-printed-in-subprocess): Add fixture for testing a
form printed from a subprocess.
(erc--find-mode, erc--essential-hook-ordering): Use helper in existing
and new tests, respectively.  (Bug#60936)

18 months agoMeasure stamps pixel-wise with erc-fill-wrap
F. Jason Park [Mon, 5 Jun 2023 09:35:53 +0000 (02:35 -0700)]
Measure stamps pixel-wise with erc-fill-wrap

* lisp/erc/erc-fill.el (erc-fill-wrap-mode, erc-fill-wrap-enable):
Change "how" for advice applied to `erc-stamp--insert-date-function'
from `:filter-args' to `:after'.
(erc-fill--wrap-stamp-insert-prefixed-date): Change signature to
conform to `:after'-style advice.  Use `buffer-text-pixel-size' when
desired and available for generating display spec.
(erc-fill-wrap): Remove confusing comment.  Don't apply text props to
newlines because there's no obvious use case for inheriting these.
* lisp/erc/erc.el (erc-send-action, erc-display-msg): Add
`erc-command' property (as "PRIVMSG") to inserted message, sans
newline, so that all inserted messages in an ERC buffer contain this
property.
* test/lisp/erc/resources/fill/snapshots/merge-01-start.eld: Update data.
* test/lisp/erc/resources/fill/snapshots/merge-02-right.eld: Update data.
* test/lisp/erc/resources/fill/snapshots/monospace-01-start.eld: Update.
* test/lisp/erc/resources/fill/snapshots/monospace-02-right.eld: Update.
* test/lisp/erc/resources/fill/snapshots/monospace-03-left.eld: Update.
* test/lisp/erc/resources/fill/snapshots/monospace-04-reset.eld: Update.
* test/lisp/erc/resources/fill/snapshots/spacing-01-mono.eld: Update.
(Bug#60936)

18 months agoAllow ERC modules to extend erc-nick-popup-alist
F. Jason Park [Mon, 19 Dec 2022 03:01:40 +0000 (19:01 -0800)]
Allow ERC modules to extend erc-nick-popup-alist

* etc/ERC-NEWS: Mention changes to `erc-button-alist' and superficial
changes to `erc-nick-popup-alist'.
* lisp/erc/erc-button.el (erc-nick-popup-alist): Change type to prefer
associating strings with functions instead of arbitrary sexps.
(erc-button-cmd-KICK, erc-button-cmd-MSG): New functions to serve as
interrogative wrappers for `erc-cmd-KICK' and `erc-cmd-MSG' in
`erc-nick-popup-alist'.  The first also fixes a bug in which all but
the first token of a given "reason" would be omitted from the
":trailing" portion of an outgoing "KICK" message.
(erc-button--nick-popup-alist): New variable to help built-in modules
expose special actions to `erc-nick-popup' without touching
`erc-nick-popup-alist'.
(erc-nick-popup): Present members from both `erc--nick-popup-alist'
and `erc-nick-popup-alist' to the invoking user.  Accommodate
functions as well as arbitrary sexps.  (bug#63569)

18 months agoDeprecate nicknames entry in erc-button-alist
F. Jason Park [Fri, 2 Jun 2023 05:07:03 +0000 (22:07 -0700)]
Deprecate nicknames entry in erc-button-alist

* lisp/erc/erc-button.el (erc-button-mode, erc-button-enable,
erc-button-disable): Restore running `erc-button-setup' on
`erc-mode-hook' and also do so immediately in all ERC buffers.
Do this instead of calling `erc-button--check-nicknames-entry.
(erc-button-buttonize-nicks): Mention that this option's value must be
non-nil for all but the most basic client functionality.
(erc-button-alist): Remove `nicknames' entry entirely.  Describe
deprecation, replacement behavior, and available escape hatches in doc
string.  Update and improve custom type definition, in particular, by
including long supported but never mentioned variants for the "REGEXP"
field.
(erc-button-keys-added): Deprecate because unused and misleading: keys
are bound during module init and remain so while module is enabled.
(erc-button--has-nickname-entry): New variable to indicate whether to
follow legacy code path when a `nicknames' entry exists in
`erc-button-alist'.
(erc-button-setup): Rewrite to provide warnings about deprecated
values for `erc-button-alist'.
(erc-button-nickname-callback-function): Add escape hatch for those
needing a custom callback for what was the default `nickname' entry in
`erc-button-alist'.
(erc-button-add-buttons): Always run `erc-button-add-nickname-buttons'
unless `erc-button--has-nickname-entry' is non-nil.
(erc-button--maybe-warn-arbitrary-sexp, erc-button--extract-form):
Rename former to latter and abstain from emitting a warning.
(erc-button--check-nicknames-entry): Remove unused function.
(erc-button-add-nickname-buttons): Defer to `erc-button--extract-form'
for determining value of third FORM slot of entry.
(erc-button-add-buttons-1): Call renamed version of
`erc-button--maybe-warn-arbitrary-sexp'.  (Bug#60933)

18 months agoAdd alias erc-buffer-do for erc-buffer-filter
F. Jason Park [Fri, 2 Jun 2023 05:07:03 +0000 (22:07 -0700)]
Add alias erc-buffer-do for erc-buffer-filter

* lisp/erc/erc-goodies.el (erc-scrolltobottom-enable,
erc-scrolltobottom-mode): Prefer `erc-buffer-do' to
`erc-buffer-filter'.
(erc-move-to-prompt-mode, erc-move-to-prompt-enable): Prefer
`erc-buffer-do' to `erc-buffer-filter'.
* lisp/erc/erc-imenu.el (erc-imenu-mode, erc-imenu-enable): Prefer
`erc-buffer-do' to `erc-buffer-filter'.
* lisp/erc/erc-match.el (erc-match-enable, erc-match-mode): Prefer
`erc-buffer-do' to `erc-buffer-filter'.
* lisp/erc/erc-stamp.el (erc-stamp-mode, erc-stamp-enable): Prefer
`erc-buffer-do' to `erc-buffer-filter'.
* lisp/erc/erc.el (erc-buffer-filter): Improve doc string.
(erc-buffer-do): Add alias for new code to prefer when calling
`erc-buffer-filter' for effect.  Do this because continually having to
refer back to the doc strings and implementations of the latter as
well as `erc-buffer-p', `erc-buffer-list', and co. is unproductive.
(erc-buffer-list): Use `always' as fallback predicate.

18 months ago; * lisp/erc/erc.el (erc-send-input-line-function): Doc.
F. Jason Park [Sat, 10 Jun 2023 03:40:59 +0000 (20:40 -0700)]
; * lisp/erc/erc.el (erc-send-input-line-function): Doc.

18 months ago; * doc/misc/erc.texi: Fix reconnecting in SOCKS example.
F. Jason Park [Thu, 8 Jun 2023 07:40:02 +0000 (00:40 -0700)]
; * doc/misc/erc.texi: Fix reconnecting in SOCKS example.

18 months agoPrefer emacs-news-mode in etc/ERC-NEWS
F. Jason Park [Fri, 2 Jun 2023 06:18:56 +0000 (23:18 -0700)]
Prefer emacs-news-mode in etc/ERC-NEWS

* etc/ERC-NEWS: Remove `outline' from prop line and prefer
`emacs-news-mode' in local variables list.
* lisp/erc/erc.el (erc-news): Overwrite cached file and ask before
re-fetching.

18 months agoAdapt emba integration
Michael Albinus [Sun, 11 Jun 2023 18:34:11 +0000 (20:34 +0200)]
Adapt emba integration

* test/infra/Makefile.in (subdir_template): Special handling of lib-src.

* test/infra/test-jobs.yml: Regenerate.

18 months agoFix tramp-sshfs
Michael Albinus [Sun, 11 Jun 2023 18:33:34 +0000 (20:33 +0200)]
Fix tramp-sshfs

* lisp/net/tramp-fuse.el (tramp-fuse-handle-file-exists-p): New defun.
(tramp-fuse-mount-timeout): Move up.
(tramp-fuse-mount-point): Use `tramp-fuse-mount-timeout'.
(tramp-fuse-unmount): Flush "mount-point" file property.

* lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist):
Use `tramp-fuse-handle-file-exists-p'.

* test/lisp/net/tramp-tests.el (all): Use function read syntax
where appropriate.
(tramp-test39-detect-external-change): Let-bind
`read-from-minibuffer' instead of `yes-or-no-p'.

18 months agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 10 Jun 2023 10:42:43 +0000 (06:42 -0400)]
Merge from origin/emacs-29

0d8b69e0ad3 Don't ding when completion succeeded
f11e2d36999 ; * admin/git-bisect-start: Update failing commits
9855a3ea744 ; * src/xdisp.c (redisplay_tool_bar): Fix a typo in a com...
f4ee696b887 Improve documentation of color-related functions
90eadc3e234 Revert "* package.el (package--get-activatable-pkg): Pref...
65f355ea0a3 ; Update my mail address
a3a69ec2342 Fix connection-local user options handling (bug#63300)
240803cc3e1 Document 'startup-redirect-eln-cache'
026afb22984 ; * etc/PROBLEMS: Entry about crashes due to anti-virus (...
bcc222251e1 Fix `emacs-lisp-native-compile-and-load' for C-h f (bug#5...
07c8211ca30 Add 'infer' as a keyword to typescript-ts-mode (bug#63880)
dd2d8ff2f5c ; * etc/NEWS: Mention the issue with PGTK on WSL (bug#633...
fa8135f8916 Revert changes to the order in which package descs are lo...
27fcfa2c0a7 ; * etc/NEWS: Improve instructions for grammar libraries.
2a84ab905c8 Handle point in last file-name component in minibuffer co...
05f25238b7b Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/...
4bc043ff45d Avoid asking redundant question in emacsbug.el
2eadf328d05 * test/infra/Dockerfile.emba (emacs-base): Don't install ...
583ba1db7ee typescript-ts-mode: Add a rule for function_signature

# Conflicts:
# etc/NEWS
# lisp/minibuffer.el

18 months ago; Merge from origin/emacs-29
Eli Zaretskii [Sat, 10 Jun 2023 10:36:58 +0000 (06:36 -0400)]
; Merge from origin/emacs-29

The following commit was skipped:

a3459a28e41 * admin/unidata/emoji-zwj.awk: Avoid sprint buffer overflow

18 months agoDon't ding when completion succeeded
Morgan Smith [Mon, 5 Jun 2023 17:34:59 +0000 (13:34 -0400)]
Don't ding when completion succeeded

* lisp/minibuffer.el (minibuffer-completion-help): Ensure 'ding'
is not called on a successful completion.  Ensure 'ding' is not
called on a failure if 'completion-fail-discreetly' is set.
Also change "No completions" to "No match" as that is what is
used elsewhere.  (Bug#63913)

18 months ago; * admin/git-bisect-start: Update failing commits
Gregory Heytings [Sat, 10 Jun 2023 08:50:47 +0000 (08:50 +0000)]
; * admin/git-bisect-start: Update failing commits

18 months agoAvoid infinite recursion in 'window_wants_header_line'
Eli Zaretskii [Sat, 10 Jun 2023 08:48:37 +0000 (11:48 +0300)]
Avoid infinite recursion in 'window_wants_header_line'

* src/window.c (null_header_line_format): Avoid infinite
recursion by disallowing :eval on recursive calls.
(Bug#63988)

18 months ago; * src/xdisp.c (redisplay_tool_bar): Fix a typo in a comment.
Eli Zaretskii [Fri, 9 Jun 2023 16:19:07 +0000 (19:19 +0300)]
; * src/xdisp.c (redisplay_tool_bar): Fix a typo in a comment.

18 months agoImprove documentation of color-related functions
Eli Zaretskii [Fri, 9 Jun 2023 07:28:36 +0000 (10:28 +0300)]
Improve documentation of color-related functions

* doc/lispref/frames.texi (Color Names): Document
'color-name-to-rgb' and 'color-dark-p'.

18 months ago; Eglot: simplify last change to eglot-unregister-capability
João Távora [Fri, 9 Jun 2023 01:11:38 +0000 (02:11 +0100)]
; Eglot: simplify last change to eglot-unregister-capability

* lisp/progmodes/eglot.el (eglot-unregister-capability): Simplify.

18 months ago; fix important-return-value-fns mistake
Mattias Engdegård [Thu, 8 Jun 2023 11:05:13 +0000 (13:05 +0200)]
; fix important-return-value-fns mistake

* lisp/emacs-lisp/bytecomp.el (important-return-value-fns):
Remove assoc-string; it's already side-effect-free.

18 months agoRemove special fset byte-compilation warning
Mattias Engdegård [Thu, 8 Jun 2023 09:50:44 +0000 (11:50 +0200)]
Remove special fset byte-compilation warning

* lisp/emacs-lisp/bytecomp.el (fset, byte-compile-fset):
Remove special warning for fset, subsumed by the more general quoted
lambda funarg warning.

18 months agoEglot: also add watches for newly created directories
João Távora [Thu, 8 Jun 2023 12:12:49 +0000 (13:12 +0100)]
Eglot: also add watches for newly created directories

GitHub-reference: https://github.com/joaotavora/eglot/pull/1228
GitHub-reference: https://github.com/joaotavora/eglot/discussions/1226

* lisp/progmodes/eglot.el (eglot-register-capability): Rework.

Suggested by: https://github.com/thejeffphil

18 months agoEglot: try reuse file watchers when server over-watches
João Távora [Thu, 8 Jun 2023 01:19:06 +0000 (02:19 +0100)]
Eglot: try reuse file watchers when server over-watches

GitHub-reference: https://github.com/joaotavora/eglot/pull/1228
GitHub-reference: https://github.com/joaotavora/eglot/discussions/1226

The Pyright language server issues very heavy file watching requests,
which sometimes exceed the OS limit.  Most of these file watches are
useless, but Pyright insists on issuing them.

What's more, for some (absurd?) reason, Pyright issues two file
watching requests for the _same_ directories, only to then almost
immediately ask to undo the effects of one of these requests.

This change to Eglot makes it so that if a single server requests to
watch a specific directory twice, only one file watch object is used.

Suggested by: https://github.com/thejeffphil

* lisp/progmodes/eglot.el (eglot-lsp-server): Change structure of
file-watches field.
(eglot--on-shutdown): Adapt to new structure.
(eglot-register-capability): Rework.
(eglot-unregister-capability): Rework.

* etc/EGLOT-NEWS: Mention change

18 months agoSupport files compressed by 'pigz'
Amritpal Singh [Fri, 2 Jun 2023 05:21:21 +0000 (10:51 +0530)]
Support files compressed by 'pigz'

* src/decompress.c (md5_gz_stream): Check 'stream.avail_in' as
well.  (Bug#63832)

Copyright-paperwork-exempt: yes

18 months agoRevert "* package.el (package--get-activatable-pkg): Prefer source packages"
Eli Zaretskii [Thu, 8 Jun 2023 09:23:11 +0000 (12:23 +0300)]
Revert "* package.el (package--get-activatable-pkg): Prefer source packages"

This reverts commit fb87d5008e21d1bc03547c1edf2280fb4cb8311e.
It caused problems when new versions of packages are installed
without deleting old versions.  (Bug#63757)

18 months ago; Update my mail address
Andrea Corallo [Thu, 8 Jun 2023 08:59:41 +0000 (10:59 +0200)]
; Update my mail address

* lisp/emacs-lisp/comp-cstr.el: Update author mail.
* lisp/emacs-lisp/comp.el: Likewise.
* src/comp.c: Likewise.
* test/lisp/emacs-lisp/comp-cstr-tests.el: Likewise.
* test/src/comp-resources/comp-test-funcs-dyn.el: Likewise.
* test/src/comp-resources/comp-test-funcs.el: Likewise.
* test/src/comp-resources/comp-test-pure.el: Likewise.
* test/src/comp-tests.el: Likewise.

18 months agoFix connection-local user options handling (bug#63300)
Michael Albinus [Thu, 8 Jun 2023 07:59:06 +0000 (09:59 +0200)]
Fix connection-local user options handling (bug#63300)

* lisp/files-x.el (connection-local-set-profiles)
(connection-local-set-profile-variables): Avoid saving the changed
user option to file unless triggered explicitly by user.  (Bug#63300)

18 months agoDocument 'startup-redirect-eln-cache'
Eli Zaretskii [Thu, 8 Jun 2023 05:50:54 +0000 (08:50 +0300)]
Document 'startup-redirect-eln-cache'

* doc/lispref/compile.texi (Native Compilation)
(Native-Compilation Functions): Document
'startup-redirect-eln-cache'.

* etc/PROBLEMS: Fix last change.
* etc/NEWS: Mark 'startup-redirect-eln-cache' as documented.

18 months ago; * etc/PROBLEMS: Entry about crashes due to anti-virus (bug#57880).
Eli Zaretskii [Thu, 8 Jun 2023 05:30:18 +0000 (08:30 +0300)]
; * etc/PROBLEMS: Entry about crashes due to anti-virus (bug#57880).

18 months agoUpdate from Gnulib by running admin/merge-gnulib
Paul Eggert [Wed, 7 Jun 2023 19:00:15 +0000 (12:00 -0700)]
Update from Gnulib by running admin/merge-gnulib

18 months agoMerge from verilog-mode upstream.
Wilson Snyder [Wed, 7 Jun 2023 01:46:19 +0000 (21:46 -0400)]
Merge from verilog-mode upstream.

* lisp/progmodes/verilog-mode.el (verilog-read-decls): Fix parsing "@ (* )" (#1829).
(verilog-indent-ignore-p): Fix indent of comments being
wrongly detected as multiline defines.  Reported by Gonzalo Larumbe
<gonzalomlarumbe@gmail.com>.
(verilog-pos-at-end-of-statement): Fix minor bug in
`verilog-pos-at-end-of-statement' assuming `verilog-end-of-statement`.
Reported by Gonzalo Larumbe <gonzalomlarumbe@gmail.com>.
(verilog-in-generate-region-p):
Fix indentation of generate blocks omitting keyword.
Reported by Gonzalo Larumbe <gonzalomlarumbe@gmail.com>.

18 months ago; * src/window.c (window_wants_header_line): Shut up bogus GCC warning.
Eli Zaretskii [Tue, 6 Jun 2023 18:27:27 +0000 (21:27 +0300)]
; * src/window.c (window_wants_header_line): Shut up bogus GCC warning.

18 months ago; Fix coding style in just installed change
Po Lu [Tue, 6 Jun 2023 13:05:13 +0000 (21:05 +0800)]
; Fix coding style in just installed change

* src/window.c (window_wants_header_line): Fix whitespace.

18 months agoFix problems resulting from modification of the undo list
Po Lu [Tue, 6 Jun 2023 13:00:44 +0000 (21:00 +0800)]
Fix problems resulting from modification of the undo list

* doc/lispref/text.texi (Atomic Changes): Describe what not to
do inside an atomic change group.
* lisp/elec-pair.el (electric-pair-inhibit-if-helps-balance):
Don't call `delete-char'; that edits the undo list by removing
boundary markers.
* lisp/subr.el (atomic-change-group, prepare-change-group): Warn
against modifying the undo list inside.

18 months ago; Fix last change
Eli Zaretskii [Tue, 6 Jun 2023 12:15:34 +0000 (15:15 +0300)]
; Fix last change

* src/window.c (window_wants_header_line): Fix whitespace and
commentary in last change.  (Bug#63825)

18 months agoAvoid header line with some empty non-nil formats
Eshel Yaron [Sun, 4 Jun 2023 16:41:20 +0000 (19:41 +0300)]
Avoid header line with some empty non-nil formats

Allow the value of 'header-line-format' to indicate that no header
line should be displayed when it trivially yields 'nil', even if it is
not plain 'nil'.  Previously, any non-nil 'header-line-format'
resulted in a (possibly empty) header line.  This change adds some
flexibility by also taking a non-nil value of 'header-line-format' to
mean that no header line should be displayed if it's a list whose
'car' is a symbol and either that symbol is ':eval' and the second
list element evaluates to 'nil', or the symbol's value as a variable
is 'nil' or void.
(Bug#63825)

* src/xdisp.c (safe_eval_inhibit_quit): New function.
* src/lisp.h (safe_eval_inhibit_quit): Declare it.
* src/window.c (null_header_line_format): New function.
(window_wants_header_line): Use it.

* doc/lispref/modes.texi (Header Line): Update to reflect new
conditions for displaying a window's header line.

* etc/NEWS: Announce updated treatment of 'header-line-format'.

18 months agoeval-command-interactive-spec: Shorten code
Sean Whitton [Tue, 6 Jun 2023 11:15:25 +0000 (12:15 +0100)]
eval-command-interactive-spec: Shorten code

* lisp/emacs-lisp/subr-x.el (eval-command-interactive-spec): Don't
reimplement checking for an 'interactive-form symbol property.
`interactive-form' already does this.  Thanks to Stefan Monnier.

18 months agoFix `emacs-lisp-native-compile-and-load' for C-h f (bug#58314)
Andrea Corallo [Tue, 6 Jun 2023 09:27:13 +0000 (11:27 +0200)]
Fix `emacs-lisp-native-compile-and-load' for C-h f (bug#58314)

* lisp/emacs-lisp/comp.el (comp-write-bytecode-file): New function
spilling code from `batch-byte+native-compile'.
(batch-byte+native-compile): Make use of.
* lisp/progmodes/elisp-mode.el
(emacs-lisp-native-compile-and-load): Produce the elc file and ask
to have it loaded.

18 months agoAdd 'infer' as a keyword to typescript-ts-mode (bug#63880)
Theodor Thornhill [Tue, 6 Jun 2023 04:26:43 +0000 (06:26 +0200)]
Add 'infer' as a keyword to typescript-ts-mode (bug#63880)

* lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode--keywords):
New keyword.

18 months agoImprove tree-sitter tests on emba
Michael Albinus [Mon, 5 Jun 2023 15:16:46 +0000 (17:16 +0200)]
Improve tree-sitter tests on emba

* test/infra/Dockerfile.emba (emacs-tree-sitter): Install further
grammars.

* test/infra/Makefile.in (subdir_template): Special handling of src.
(TREE-SITTER-FILES): Add treesit-tests.el.

* test/infra/test-jobs.yml: Regenerate.

18 months agoFix bug with point-adjustment after M-x COMMAND
Eli Zaretskii [Mon, 5 Jun 2023 12:57:05 +0000 (15:57 +0300)]
Fix bug with point-adjustment after M-x COMMAND

* src/keyboard.c (command_loop_1): Preserve 'last_point_position'
across command execution, to avoid bugs in
'adjust_point_for_property' if the command invokes
'recursive-edit'.  Reported by Mats Lidell <matsl@gnu.org>.

18 months ago; * etc/NEWS: Mention the issue with PGTK on WSL (bug#63384).
Eli Zaretskii [Mon, 5 Jun 2023 11:50:00 +0000 (14:50 +0300)]
; * etc/NEWS: Mention the issue with PGTK on WSL (bug#63384).

18 months agoAdapt emba integration
Michael Albinus [Mon, 5 Jun 2023 11:29:21 +0000 (13:29 +0200)]
Adapt emba integration

* test/infra/Dockerfile.emba (emacs-tree-sitter):
Use "/root/.emacs.d/tree-sitter" instead of "/usr/local/lib/tree-sitter".

* test/infra/gitlab-ci.yml (.job-template): Run "/bin/bash -xvc".
(test-eglot): Revert last change, it doesn't work yet.
(test-tree-sitter): Set TEST_HOME instead of LD_LIBRARY_PATH.

18 months ago* subr-x (eval-command-interactive-spec): New function.
Sean Whitton [Sun, 15 Jan 2023 17:57:30 +0000 (10:57 -0700)]
* subr-x (eval-command-interactive-spec): New function.

18 months agoBetter internal-make-closure optimisation
Mattias Engdegård [Sun, 4 Jun 2023 13:58:44 +0000 (15:58 +0200)]
Better internal-make-closure optimisation

* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
Optimise closed-over values in closure creation like any other, which
can lead to stack variables being eliminated.

18 months ago* lisp/emacs-lisp/comp-cstr.el (cl-macs): Require it.
Andrea Corallo [Sun, 4 Jun 2023 14:43:13 +0000 (16:43 +0200)]
* lisp/emacs-lisp/comp-cstr.el (cl-macs): Require it.

18 months ago* lisp/emacs-lisp/comp.el (comp-function-type-spec): Improve.
Andrea Corallo [Sun, 4 Jun 2023 14:25:14 +0000 (16:25 +0200)]
* lisp/emacs-lisp/comp.el (comp-function-type-spec): Improve.

18 months agoRevert changes to the order in which package descs are loaded
Philip Kaludercic [Sun, 4 Jun 2023 13:21:04 +0000 (15:21 +0200)]
Revert changes to the order in which package descs are loaded

* lisp/emacs-lisp/package.el (package-load-all-descriptors):  Remove
NOSORT argument to 'directory-files', reverting back to the behaviour
as of Emacs 28.  (Bug#63757)

18 months ago; Minor doc copyedits in comp.el
Eli Zaretskii [Sun, 4 Jun 2023 12:28:25 +0000 (15:28 +0300)]
; Minor doc copyedits in comp.el

* lisp/emacs-lisp/comp.el (comp-known-type-specifiers): Fix
commentary.
(comp-function-type-spec): Doc fix.

18 months ago; * lisp/emacs-lisp/comp.el (comp-funciton-type-spec): typo
Mattias Engdegård [Sun, 4 Jun 2023 12:09:39 +0000 (14:09 +0200)]
; * lisp/emacs-lisp/comp.el (comp-funciton-type-spec): typo

18 months agoPrint know function types in C-h f
Andrea Corallo [Tue, 30 May 2023 13:30:11 +0000 (15:30 +0200)]
Print know function types in C-h f

* lisp/emacs-lisp/comp.el (comp-known-type-specifiers): Improve comment.
(comp-funciton-type-spec): New function.
* lisp/help-fns.el (help-fns--signature): Update to make use of
`comp-funciton-type-spec'.

18 months ago* Have `comp-cstr-to-type-spec' handle comp-cstr-f as well
Andrea Corallo [Sun, 4 Jun 2023 09:26:22 +0000 (11:26 +0200)]
* Have `comp-cstr-to-type-spec' handle comp-cstr-f as well

* lisp/emacs-lisp/comp-cstr.el (comp--simple-cstr-to-type-spec): New
function.
(comp-cstr-to-type-spec): Make use of.

18 months ago* lisp/emacs-lisp/comp.el (comp-known-type-specifiers): Fix line lengths
Andrea Corallo [Sun, 4 Jun 2023 09:07:38 +0000 (11:07 +0200)]
* lisp/emacs-lisp/comp.el (comp-known-type-specifiers): Fix line lengths

18 months ago* lisp/emacs-lisp/comp.el: Improve 85cb075b1bd.
Andrea Corallo [Sun, 4 Jun 2023 10:19:09 +0000 (12:19 +0200)]
* lisp/emacs-lisp/comp.el: Improve 85cb075b1bd.

18 months ago* lisp/emacs-lisp/comp.el (comp-known-type-specifiers): Tweak framep.
Andrea Corallo [Sun, 4 Jun 2023 08:58:32 +0000 (10:58 +0200)]
* lisp/emacs-lisp/comp.el (comp-known-type-specifiers): Tweak framep.

18 months ago; * etc/NEWS: Improve instructions for grammar libraries.
Eli Zaretskii [Sun, 4 Jun 2023 07:57:07 +0000 (10:57 +0300)]
; * etc/NEWS: Improve instructions for grammar libraries.

18 months agoHandle point in last file-name component in minibuffer completion
Spencer Baugh [Sat, 3 Jun 2023 00:57:32 +0000 (20:57 -0400)]
Handle point in last file-name component in minibuffer completion

This is a followup to commit e338a8ac41d4a9fd798dda90275abe75ac071335
(Handle point not at EOB in minibuffer-choose-completion).
That commit added a heuristic, but the heuristic was insufficient:
It still had the original wrong behavior when completing the last
file-name component (i.e., the completion category is 'file' and
there's no slash after point).  This patch makes the heuristic
cover that case as well.
* lisp/minibuffer.el (minibuffer-next-completion)
(minibuffer-choose-completion): If in file completion and there's no
slash after point, clear what's after point when we complete.
(Bug#62700)

18 months agoAdapt emba integration
Michael Albinus [Sat, 3 Jun 2023 16:32:29 +0000 (18:32 +0200)]
Adapt emba integration

* test/infra/Dockerfile.emba (emacs-eglot, emacs-tree-sitter):
Don't install gawk.

* test/infra/gitlab-ci.yml (test-eglot): Add company and yasnippet.

18 months agoMerge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/emacs into emacs-29
Eli Zaretskii [Sat, 3 Jun 2023 16:22:22 +0000 (19:22 +0300)]
Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/emacs into emacs-29

18 months agoAvoid asking redundant question in emacsbug.el
Eli Zaretskii [Sat, 3 Jun 2023 16:20:23 +0000 (19:20 +0300)]
Avoid asking redundant question in emacsbug.el

* lisp/mail/emacsbug.el (report-emacs-bug-hook): Don't ask the
question about saving email setup if we cannot save it anyway.
(Bug#63816)

18 months ago* test/infra/Dockerfile.emba (emacs-base): Don't install gawk.
Michael Albinus [Sat, 3 Jun 2023 15:52:46 +0000 (17:52 +0200)]
* test/infra/Dockerfile.emba (emacs-base): Don't install gawk.

18 months agotypescript-ts-mode: Add a rule for function_signature
Dmitry Gutov [Sat, 3 Jun 2023 12:00:41 +0000 (15:00 +0300)]
typescript-ts-mode: Add a rule for function_signature

* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--font-lock-settings):
Add a rule for function_signature (bug#63867)

18 months ago* admin/unidata/emoji-zwj.awk: Avoid sprint buffer overflow
Mattias Engdegård [Sat, 3 Jun 2023 10:50:21 +0000 (12:50 +0200)]
* admin/unidata/emoji-zwj.awk: Avoid sprint buffer overflow

Some AWK implementations have a fixed buffer for sprintf; for mawk the
default size is 8192 bytes.  Hoist a string concatenation from
a sprintf call to avoid running into that limit.  See discussion at
https://lists.gnu.org/archive/html/emacs-devel/2023-06/msg00090.html .

(cherry picked from commit b5f17fe07c6624380ba8d0c7a400a6b89f225209)

18 months ago* admin/unidata/emoji-zwj.awk: Avoid sprint buffer overflow
Mattias Engdegård [Sat, 3 Jun 2023 10:50:21 +0000 (12:50 +0200)]
* admin/unidata/emoji-zwj.awk: Avoid sprint buffer overflow

Some AWK implementations have a fixed buffer for sprintf; for mawk the
default size is 8192 bytes.  Hoist a string concatenation from
a sprintf call to avoid running into that limit.  See discussion at
https://lists.gnu.org/archive/html/emacs-devel/2023-06/msg00090.html .

18 months agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 3 Jun 2023 09:50:58 +0000 (05:50 -0400)]
Merge from origin/emacs-29

ede3535051a ; Fix last change
8ec786349e1 Fix apostrophe handling in rust-ts-mode and go-ts-mode (B...
0eba9cf6511 * test/infra/Dockerfile.emba (emacs-base): Install also g...
4897c98b6c4 Fix 'python-util-clone-local-variables'
6b2c8dc9050 Revert "Enhance Python font-lock to support multilines"
348e4504c6d Fix typo in calc.texi
03663b8798a Update to Transient v0.4.1
dc7acb1aafe Avoid errors in 'delete-forward-char' deleting static com...
2f94f6de9d6 Make VS-15 and VS-16 compositions work correctly
753f8aa1f14 Fix project-name for vc-aware backend in non-file buffers
17c7915ab94 ; Fix 'package-install-upgrade-built-in' check for packag...
e252ce26eab Add type_predicate 'is' as keyword in typescript-ts-mode ...
0a354d65784 Fix infloop in info-look.el
83b22139e4c Fix several todo-mode.el item editing bugs (bug#63811)
ed4cd3eddf7 dockerfile-ts-mode: Prevent empty categories in imenu (Bu...
2e20e318da2 Brush up doc strings and terminology in plstore.el
372bc1278c2 Add internal documentation on plstore.el
23a14e7b902 Add compact_constructor_declaration font-locking to java-...
500abc4dc37 * lisp/tmm.el (tmm-completion-delete-prompt): Add more ch...
afc1f329356 Allow to disable the DWIMish behavior of 'x' in package menu
08104c01504 Allow dired to invoke secondary browser
a3063f0bc87 Add a binding for enriched-toggle-markup
d8ba28fa394 Fix order of tmm-menubar when 'tmm-mid-prompt' is nil

# Conflicts:
# etc/NEWS

18 months ago; Merge from origin/emacs-29
Eli Zaretskii [Sat, 3 Jun 2023 09:50:51 +0000 (05:50 -0400)]
; Merge from origin/emacs-29

The following commit was skipped:

53dc7bec830 Fix regression when saving tramp-default-proxies-alist (D...

18 months agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 3 Jun 2023 09:50:49 +0000 (05:50 -0400)]
Merge from origin/emacs-29

3f441525679 Save the tree-sitter grammar recipe when installing a gra...
c0c7b947baf Add instructions and test file for VS-15/VS-16
3be33aff963 A better fix for "Fix cancellation of Wdired"
756244c6963 ; * lisp/minibuffer.el (completions-header-format): Doc fix.
5d844e129ad Fix tmm-menubar when 'tmm-completion-prompt' is nil

# Conflicts:
# lisp/treesit.el

18 months ago; Merge from origin/emacs-29
Eli Zaretskii [Sat, 3 Jun 2023 09:47:29 +0000 (05:47 -0400)]
; Merge from origin/emacs-29

The following commit was skipped:

5e7c826bfa5 ; * lisp/progmodes/project.el: avoid warning in loaddefs.

18 months agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 3 Jun 2023 09:47:29 +0000 (05:47 -0400)]
Merge from origin/emacs-29

95ee5477e16 ; * src/lread.c (read0, skip_lazy_string): Fix commentary...

18 months ago; Fix last change
Eli Zaretskii [Sat, 3 Jun 2023 08:34:11 +0000 (11:34 +0300)]
; Fix last change

* lisp/progmodes/rust-ts-mode.el
(rust-ts-mode--syntax-propertize): Doc fix.  (Bug#63708)

18 months agoFix apostrophe handling in rust-ts-mode and go-ts-mode (Bug#63708)
Йордан Миладинов [Fri, 26 May 2023 14:23:26 +0000 (17:23 +0300)]
Fix apostrophe handling in rust-ts-mode and go-ts-mode (Bug#63708)

* lisp/progmodes/rust-ts-mode.el (rust-ts-mode--syntax-propertize):
Treat apostrophes as strings if used to define character literals.
Treat LT and GT as pairs if used to define type parameters (formerly
they were treated as pairs only for type arguments).
* lisp/progmodes/go-ts-mode.el (go-ts-mode--syntax-table): Treat
apostrophes as strings if used to define rune literals.

Copyright-paperwork-exempt: yes

18 months agoAdapt emba integration
Michael Albinus [Sat, 3 Jun 2023 08:19:02 +0000 (10:19 +0200)]
Adapt emba integration

* admin/notes/emba: Improve docker call.

* test/infra/Dockerfile.emba (emacs-eglot, emacs-tree-sitter):
Install also gawk.

* test/infra/Makefile.in (TREE-SITTER-FILES): New variable.
(tree-sitter-files-template): New rule.
(.PHONY, generate-test-jobs): Add it to dependencies.

* test/infra/gitlab-ci.yml (variables): Disable CI_DEBUG_TRACE.
(test-tree-sitter): Extends also .tree-sitter-files-template.  Use
$tree_sitter_files.

* test/infra/test-jobs.yml: Regenerate.

18 months ago* test/infra/Dockerfile.emba (emacs-base): Install also gawk.
Michael Albinus [Sat, 3 Jun 2023 07:54:52 +0000 (09:54 +0200)]
* test/infra/Dockerfile.emba (emacs-base): Install also gawk.

18 months agoFix use-package :vc keyword when byte-compiled
Steven Allen [Tue, 16 May 2023 23:07:36 +0000 (16:07 -0700)]
Fix use-package :vc keyword when byte-compiled

* lisp/use-package/use-package-core.el (use-package-handler/:vc):
Return the new 'body'. Otherwise, the entire package declaration gets
dropped when byte-compiling.
* test/lisp/use-package/use-package-tests.el
(use-package-test-handler/:vc-6): test it.

18 months agoFix 'python-util-clone-local-variables'
Eli Zaretskii [Sat, 3 Jun 2023 07:20:08 +0000 (10:20 +0300)]
Fix 'python-util-clone-local-variables'

* lisp/progmodes/python.el (python-util-clone-local-variables):
Avoid signaling an error when a local variable is unbound.
Patch by Ernesto Alfonso <erjoalgo@gmail.com>.  (Bug#63818)

18 months agoRevert "Enhance Python font-lock to support multilines"
kobarity [Fri, 2 Jun 2023 13:52:57 +0000 (22:52 +0900)]
Revert "Enhance Python font-lock to support multilines"

This reverts commit 4915ca5dd4245a909c046e6691e8d4a1919890c8.

We have found that there are performance issues when editing a large
file.  The issue can be reproduced as follows:

1. emacs -Q
2. Open large Python file (e.g. turtle.py in Python)
3. Near the top of the buffer, enter open paren and some characters.

The above commit extends the region to be font-locked using
`python-nav-end-of-statement'.  However, if there are unbalanced
parens, it may move point to the end of the buffer.  This causes
almost the entire buffer to be font-locked, which is not acceptable
for large files.

18 months agoFix typo in calc.texi
Eli Zaretskii [Sat, 3 Jun 2023 06:14:44 +0000 (09:14 +0300)]
Fix typo in calc.texi

* doc/misc/calc.texi (Programming Tutorial): Fix a typo.
Suggested by Vladimir Nikishkin <lockywolf@gmail.com>.

18 months agoUpdate to Transient v0.4.1
Jonas Bernoulli [Fri, 2 Jun 2023 21:26:45 +0000 (23:26 +0200)]
Update to Transient v0.4.1

18 months agoAvoid errors in 'delete-forward-char' deleting static compositions
Eli Zaretskii [Fri, 2 Jun 2023 12:42:42 +0000 (15:42 +0300)]
Avoid errors in 'delete-forward-char' deleting static compositions

* lisp/simple.el (delete-forward-char): Fix recognition of static
compositions.  (Bug#63837)

18 months agoMake VS-15 and VS-16 compositions work correctly
Robert Pluim [Fri, 2 Jun 2023 11:54:56 +0000 (13:54 +0200)]
Make VS-15 and VS-16 compositions work correctly

There is a conflict between forward matching and backward matching
composition rules involving the same codepoint, which can cause the
backward matching ones not to be invoked.  Ensure that VS-15 (U+FE0E)
and VS-16 (U+FE0F) are composed by forward matching rules instead in
order to avoid this issue.

* admin/unidata/emoji-zwj.awk: Add rules for CHAR+VS-15 and CHAR+VS-16.
* lisp/composite.el: remove backward matching rule for VS-15.  (Bug#63731)

18 months agoFix tree-sitter tests on emba
Michael Albinus [Fri, 2 Jun 2023 11:44:00 +0000 (13:44 +0200)]
Fix tree-sitter tests on emba

* test/infra/Makefile.in: Revert tree-sitter relevant changes.

* test/infra/gitlab-ci.yml (test-tree-sitter): Remove
.tree-sitter-files-template.  List files explicitly.

* test/infra/test-jobs.yml: Regenerate.

18 months agoFix project-name for vc-aware backend in non-file buffers
Dmitry Gutov [Fri, 2 Jun 2023 02:10:15 +0000 (05:10 +0300)]
Fix project-name for vc-aware backend in non-file buffers

* lisp/progmodes/project.el (project-name): Make sure
project-vc-name is picked up from dir-locals in all
non-file-visiting buffers too (mentioned in bug#63469).

18 months ago* lisp/emacs-lisp/comp.el (comp-known-type-specifiers): Fix a bunch of
Andrea Corallo [Thu, 1 Jun 2023 13:53:39 +0000 (15:53 +0200)]
* lisp/emacs-lisp/comp.el (comp-known-type-specifiers): Fix a bunch of

18 months agoAdapt tree-sitter tests on emba
Michael Albinus [Thu, 1 Jun 2023 13:57:43 +0000 (15:57 +0200)]
Adapt tree-sitter tests on emba

* test/infra/Makefile.in (TREE-SITTER-FILES): Double-quote variable.

* test/infra/test-jobs.yml: Regenerate.

18 months ago* lisp/emacs-lisp/comp.el (comp-jump-table-optimizable): Refactor.
Andrea Corallo [Thu, 1 Jun 2023 09:02:01 +0000 (11:02 +0200)]
* lisp/emacs-lisp/comp.el (comp-jump-table-optimizable): Refactor.

18 months ago; * test/infra/gitlab-ci.yml (variables): Enable CI_DEBUG_TRACE.
Michael Albinus [Thu, 1 Jun 2023 06:47:18 +0000 (08:47 +0200)]
; * test/infra/gitlab-ci.yml (variables): Enable CI_DEBUG_TRACE.

18 months ago; Fix 'package-install-upgrade-built-in' check for package menu
Philip Kaludercic [Sat, 27 May 2023 08:13:21 +0000 (10:13 +0200)]
; Fix 'package-install-upgrade-built-in' check for package menu

* lisp/emacs-lisp/package.el (package-menu--find-upgrades): Use
correct check to verify if a built-in packages in the package menu can
be upgraded or not.

This change improves upon a faulty assumption from
ba2c76fa2bc3aabfda7d1d09cc5148f3f9d8e08e.  (Bug#63587)

18 months agoAdd type_predicate 'is' as keyword in typescript-ts-mode (bug#63810)
Theodor Thornhill [Wed, 31 May 2023 18:47:06 +0000 (20:47 +0200)]
Add type_predicate 'is' as keyword in typescript-ts-mode (bug#63810)

* lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode--keywords):
New keyword 'is'.

18 months ago* lisp/composite.el (compose-gstring-for-terminal): Fix omitted var.
Mattias Engdegård [Wed, 31 May 2023 16:55:03 +0000 (18:55 +0200)]
* lisp/composite.el (compose-gstring-for-terminal): Fix omitted var.

It may not make much of a difference since the code path is probably
only taken once for i=0 with no more glyphs in the input, but this
change avoids depending on such external invariants and makes
the code less mystifying to the reader (bug#63807).

18 months agoDisable unused-return-value warning for delq and delete, again
Mattias Engdegård [Wed, 31 May 2023 14:34:01 +0000 (16:34 +0200)]
Disable unused-return-value warning for delq and delete, again

* lisp/emacs-lisp/bytecomp.el (important-return-value-fns):
Remove `delq` and `delete` since they resulted in false
positives that nobody was interested in silencing (bug#61730).

18 months ago* lisp/net/shr.el (shr-dom-max-natural-width): Rewrite muddled code.
Mattias Engdegård [Tue, 30 May 2023 20:58:26 +0000 (22:58 +0200)]
* lisp/net/shr.el (shr-dom-max-natural-width): Rewrite muddled code.

18 months ago; * test/src/comp-tests.el (non-locals): Repair botched test.
Mattias Engdegård [Tue, 30 May 2023 20:54:21 +0000 (22:54 +0200)]
; * test/src/comp-tests.el (non-locals): Repair botched test.

18 months agoFix infloop in info-look.el
Eli Zaretskii [Wed, 31 May 2023 14:50:53 +0000 (17:50 +0300)]
Fix infloop in info-look.el

* lisp/info-look.el (info-lookup-guess-gdb-script-symbol): Fix
infloop when there are no completions.  (Bug#63808)

18 months agoFix several todo-mode.el item editing bugs (bug#63811)
Stephen Berman [Wed, 31 May 2023 14:15:48 +0000 (16:15 +0200)]
Fix several todo-mode.el item editing bugs (bug#63811)

* lisp/calendar/todo-mode.el (todo-insert-item--basic): With
insertion type 'here', ensure item is inserted on the todo-mode
line where the command was invoked.
(todo-edit-item--cat, todo-edit-item--pos): New variables.
(todo-edit-item--text): Restrict the scope of nil-valued
buffer-read-only to the functions that change buffer text.  If
user moved point while editing a single-line todo item or a done
item comment, or while inserting a done item comment, restore
point, and for comments, make sure the done items section is
displayed.  For multiline items, set the new variables so
todo-edit-quit can use them.
(todo-edit-quit): Use the values of the new variables to restore
point in the todo-mode buffer if it had been moved while editing.
(todo-edit-item--header): Avoid clobbering match data when editing
a todo item header.

18 months agodockerfile-ts-mode: Prevent empty categories in imenu (Bug#63759)
Randy Taylor [Sun, 28 May 2023 00:52:37 +0000 (20:52 -0400)]
dockerfile-ts-mode: Prevent empty categories in imenu (Bug#63759)

* lisp/progmodes/dockerfile-ts-mode.el (dockerfile-ts-mode--imenu):
Don't include empty categories.

18 months ago; * lisp/misc.el (forward-to-word, backward-to-word): Doc fix.
Eli Zaretskii [Wed, 31 May 2023 13:13:56 +0000 (16:13 +0300)]
; * lisp/misc.el (forward-to-word, backward-to-word): Doc fix.

18 months agoMake forward and backward-to-word arg optional
Zaz Brown [Sun, 21 May 2023 04:33:51 +0000 (21:33 -0700)]
Make forward and backward-to-word arg optional

* lisp/misc.el (forward-to-word, backward-to-word): Make the
argument optional.  (Bug#63626)

Copyright-paperwork-exempt: yes

18 months agoBrush up doc strings and terminology in plstore.el
Jens Schmidt [Mon, 22 May 2023 19:47:13 +0000 (21:47 +0200)]
Brush up doc strings and terminology in plstore.el

* lisp/plstore.el (plstore-encoded, plstore-passphrase-callback-function)
(plstore--init-from-buffer, plstore-revert, plstore-close)
(plstore--merge-secret, plstore--decrypt, plstore--match, plstore-find)
(plstore-get, plstore-put, plstore-delete, plstore--insert-buffer)
(plstore-save, plstore--encode, plstore--decode)
(plstore--write-contents-functions, plstore-mode-decoded)
(plstore-mode): Brush up doc strings and documentation in general.
Fix terminology, in particular spurious occurences of all uppercase
"PLSTORE".  (Bug#63627)

18 months agoAdd internal documentation on plstore.el
Jens Schmidt [Sun, 21 May 2023 19:37:35 +0000 (21:37 +0200)]
Add internal documentation on plstore.el

* lisp/plstore.el: Add internal documentation and some words of
warning in the user documentation.  (Bug#63627)

18 months ago; * etc/NEWS: Fix typos.
Michael Albinus [Wed, 31 May 2023 06:45:08 +0000 (08:45 +0200)]
; * etc/NEWS: Fix typos.

18 months agoImprove tree-sitter tests on emba
Michael Albinus [Wed, 31 May 2023 06:44:44 +0000 (08:44 +0200)]
Improve tree-sitter tests on emba

* test/infra/Dockerfile.emba (emacs-tree-sitter): Install only
grammars which are needed.

* test/infra/Makefile.in (subdir_template): Special handling of
progmodes.
(TREE-SITTER-FILES): New variable.
(tree-sitter-files-template): New rule.
(.PHONY, generate-test-jobs): Add it to dependencies.

* test/infra/gitlab-ci.yml (.tree-sitter-template):
Add test/lisp/progmodes/*-ts-mode-resources/**.
(test-tree-sitter): Extends also .tree-sitter-files-template.  Use
$tree-sitter-files.

* test/infra/test-jobs.yml: Regenerate.