]> git.eshelyaron.com Git - emacs.git/log
emacs.git
21 months agoMerge from origin/emacs-29
Stefan Kangas [Thu, 15 Dec 2022 20:13:14 +0000 (21:13 +0100)]
Merge from origin/emacs-29

a15cd55044c ; Don't quote nil in comments
da39200c4be ; Checkdoc fixes in dired-aux.el
fd403a5c5a8 Fix ruby-add-log-current-method after nested class defini...
2ca06aed7b3 Add indent rules to js/typescript/tsx-ts-mode (bug#60074)
a54d5f500c1 Improve fontification in csharp-ts-mode (bug#59897)
3db2f560bb7 Revert "Add expression for generic_name in csharp-ts-mode"
1985762fbd7 Introduce support for TOML config-format
622838b957e Fix handling of % when searching in .tex or .dtx files
3b226b60248 Treat C++ classes as defuns in C Tree-sitter mode (bug#60...
480f41c7deb Add < and > to the syntax table in c++-ts-mode (bug#60049)
fbf0d3b796a Improve fontifications in Typescript mode
f93a5180a61 Update the documentation of overlays (bug#59996)
d51b66ed540 ; Improve description of scoping and let-bindings
752f9dde631 ; Fix a typo in window.el
102a3e3b445 Don't send erc-sasl-user as USER command argument
f0c90888781 Set erc-network to a "given" ID instead of failing
09c0c6b2ba3 Limit casemapping to appropriate ranges in ERC
44b04c0ac1c Actually accept non-symbols as IDs in erc-open
75f26646d4a ; Be nicer when updating browse-url var in erc-compat
0155fc67be3 Respect a nil erc-session-password when reconnecting
9ac80e8a6e4 Add dedicated auth-source section in ERC manual
2d96a18cd09 ; * lisp/emacs-lisp/shortdoc.el: fix mistakes in previous...
1d3cbba7dfa ; * lisp/progmodes/cmake-ts-mode.el (auto-mode-alist): $ ...
0cc199f1a61 Better shortdoc examples
931d97bf563 Shortdoc: read and evaluate strings after :eval
be165f75332 Fix Tramp tests in eglot-tests, prefix tests uniquely
8c30cb90ba9 * lisp/vc/vc-git.el (vc-git-checkin): Use make-nearby-tem...
3efe4df1d20 Delete temp files after icalendar tests

# Conflicts:
# etc/NEWS

21 months ago; Merge from origin/emacs-29
Stefan Kangas [Thu, 15 Dec 2022 20:13:14 +0000 (21:13 +0100)]
; Merge from origin/emacs-29

The following commit was skipped:

33e0a104649 ; * lisp/keymap.el (keymap-substitute): Doc fix.  (Bug#60...

21 months agoMerge from origin/emacs-29
Stefan Kangas [Thu, 15 Dec 2022 20:13:13 +0000 (21:13 +0100)]
Merge from origin/emacs-29

fafcf02c856 Fix syntax tables of tree-sitter modes (bug#59807)
91b8d9b7db4 ; * admin/notes/tree-sitter/build-module/build.sh: Minor ...
1b0e282a7f8 ; Comment and stylistic change in treesit.el
489b02d03cf * doc/misc/Makefile.in (need_emacsver): Add use-package.

21 months agoHandle selection transfer errors earlier
Po Lu [Thu, 15 Dec 2022 12:06:37 +0000 (20:06 +0800)]
Handle selection transfer errors earlier

* src/xselect.c (x_decline_selection_request, struct transfer)
(struct x_selection_request, x_cancel_selection_transfer)
(x_start_selection_transfer, x_continue_selection_transfer):
Give the right serial to x_ignore_errors_for_next_request.
(x_handle_selection_error): New function.
(x_reply_selection_request): Give the right serial to
x_ignore_errors_for_next_request.
* src/xterm.c (x_ignore_errors_for_next_request): New arg
`selection_serial'.  All callers changed.
(x_error_handler): Call selection error handler.
* src/xterm.h (struct x_failable_request): New field
`selection_serial'.

21 months ago; Auto-commit of loaddefs files.
Stefan Kangas [Thu, 15 Dec 2022 04:11:34 +0000 (05:11 +0100)]
; Auto-commit of loaddefs files.

21 months ago; Don't quote nil in comments
Stefan Kangas [Thu, 15 Dec 2022 01:24:56 +0000 (02:24 +0100)]
; Don't quote nil in comments

21 months ago; Checkdoc fixes in dired-aux.el
Stefan Kangas [Thu, 15 Dec 2022 01:22:45 +0000 (02:22 +0100)]
; Checkdoc fixes in dired-aux.el

* lisp/dired-aux.el (dired-compare-directories, dired-do-chmod)
(dired-do-chgrp, dired-do-chown, dired-do-touch)
(dired-minibuffer-default-add-shell-commands)
(dired-read-shell-command, dired-mark-prefix)
(dired-mark-postfix, dired-mark-separator, dired-kill-line)
(dired-reset-subdir-switches, dired-add-entry)
(dired-remove-file)
(dired-create-destination-dirs-on-trailing-dirsep)
(dired-maybe-insert-subdir, dired-tree-up, dired-tree-down):
Checkdoc fixes.

21 months agoFix ruby-add-log-current-method after nested class definition
Dmitry Gutov [Thu, 15 Dec 2022 01:21:14 +0000 (03:21 +0200)]
Fix ruby-add-log-current-method after nested class definition

* lisp/progmodes/ruby-mode.el (ruby--add-log-current-indent):
New function.
(ruby-add-log-current-method): Use it.
Check for "class" and "module" indentation to filter out the
definitions which don't include the given position.  Also try to
match "def" only once (for performance), because if the closest
one doesn't include the given position, none will.

* test/lisp/progmodes/ruby-mode-tests.el
(ruby-add-log-current-method-after-inner-class-outside-methods)
(ruby-add-log-current-method-after-inner-class-outside-methods-with-text):
New tests.

21 months agoMark flymake diagnostic modes as non-interactive
Stefan Kangas [Wed, 14 Dec 2022 22:46:38 +0000 (23:46 +0100)]
Mark flymake diagnostic modes as non-interactive

* lisp/progmodes/flymake.el (flymake-diagnostics-buffer-mode)
(flymake-project-diagnostics-mode): Mark modes as non-interactive.

21 months agoAdd indent rules to js/typescript/tsx-ts-mode (bug#60074)
Theodor Thornhill [Wed, 14 Dec 2022 20:23:33 +0000 (21:23 +0100)]
Add indent rules to js/typescript/tsx-ts-mode (bug#60074)

* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--indent-rules): Add in binary_expression and
jsx_fragment.
* lisp/progmodes/js.el (js--treesit-indent-rules): Add the same rules.

21 months agoImprove fontification in csharp-ts-mode (bug#59897)
Jostein Kjønigsen [Thu, 8 Dec 2022 10:07:15 +0000 (11:07 +0100)]
Improve fontification in csharp-ts-mode (bug#59897)

Fixes highlighting of generic methods like the one below:

instance.MethodWithTypeArguments<Type>(...);
InClassMethodWithTypeArguments<Type>(...);

* lisp/progmodes/csharp-mode.el (csharp-ts-mode--font-lock-settings):
Add new rule.

21 months agoRevert "Add expression for generic_name in csharp-ts-mode"
Yuan Fu [Wed, 14 Dec 2022 22:28:29 +0000 (14:28 -0800)]
Revert "Add expression for generic_name in csharp-ts-mode"

I applied the wrong commit, the next commit will be the right one,
sorry about that!

This reverts commit 647b6a8099f414e5a7b162efd3658e174064dfe7.

21 months agoIntroduce support for TOML config-format
Jostein Kjønigsen [Sun, 11 Dec 2022 12:05:29 +0000 (13:05 +0100)]
Introduce support for TOML config-format

This commit introduces support for the semi-popular TOML
config-format[1] through a new major-mode: toml-ts-mode.

I've read through the full spec[2], and from what I can see this
major-mode should provide correct syntax-highligting for every sort of
config-declaration which adheres to the specification.

Besides that it also adds support for imenu and basic tree-sitter
based navigation.

[1] https://toml.io/en/
[2] https://toml.io/en/v1.0.0

21 months agoFix handling of % when searching in .tex or .dtx files
Arash Esbati [Wed, 14 Dec 2022 20:17:30 +0000 (21:17 +0100)]
Fix handling of % when searching in .tex or .dtx files

* lisp/textmodes/reftex.el (reftex-compile-variables): Consider %
when building the regexp for searching only in .dtx files.
(AUCTeX bug#59638)

21 months agoTreat C++ classes as defuns in C Tree-sitter mode (bug#60047)
Daniel Martín [Tue, 13 Dec 2022 20:35:40 +0000 (21:35 +0100)]
Treat C++ classes as defuns in C Tree-sitter mode (bug#60047)

* lisp/progmodes/c-ts-mode.el (c-ts-base-mode): Add "class_specifier"
as a node of type "defun".

21 months agoAdd < and > to the syntax table in c++-ts-mode (bug#60049)
Daniel Martín [Tue, 13 Dec 2022 21:28:13 +0000 (22:28 +0100)]
Add < and > to the syntax table in c++-ts-mode (bug#60049)

* lisp/progmodes/c-ts-mode.el (c++-ts-mode--syntax-table): Add a
specific syntax table for C++.  Consider "<" and ">" open/close
delimiters (C++ templates).
(c++-ts-mode): Use the new syntax table.

21 months agoImprove fontifications in Typescript mode
Jostein Kjønigsen [Wed, 7 Dec 2022 08:27:42 +0000 (09:27 +0100)]
Improve fontifications in Typescript mode

* lisp/progmodes/typescript-ts-mode.el: Improve fontification of
variables.  (Bug#59831)

21 months agoWarn about unmatchable constant args to `eq`, `memq` etc
Mattias Engdegård [Wed, 14 Dec 2022 16:48:17 +0000 (17:48 +0100)]
Warn about unmatchable constant args to `eq`, `memq` etc

Add a byte-compiler warning about attempts to compare literal values
with undefined identity relation to other values.  For example:

  (eq x 2.0)
  (memq x '("a" (b) [c]))

Such incomparable values include all literal conses, strings, vectors,
records and (except for eql and memql) floats and bignums.
The warning currently applies to eq, eql, memq, memql, assq, rassq,
remq and delq.

* lisp/emacs-lisp/bytecomp.el (bytecomp--dodgy-eq-arg)
(bytecomp--value-type-description, bytecomp--arg-type-description)
(bytecomp--warn-dodgy-eq-arg, bytecomp--check-eq-args)
(bytecomp--check-memq-args): New.
(eq, eql, memq, memql, assq, rassq, remq, delq):
Set compiler-macro property.
* lisp/emacs-lisp/byte-run.el (with-suppressed-warnings):
Amend doc string.
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp--with-warning-test): Fix text-quoting-style and expand
re-warning so that it doesn't need to be a literal.
(bytecomp-warn-dodgy-args-eq, bytecomp-warn-dodgy-args-memq):
New tests.

21 months agoUpdate the documentation of overlays (bug#59996)
Eli Zaretskii [Wed, 14 Dec 2022 18:13:47 +0000 (20:13 +0200)]
Update the documentation of overlays (bug#59996)

* src/buffer.c (Foverlay_recenter, Foverlay_lists): Update the doc
strings.

* lisp/subr.el (copy-overlay): Update comment.

* doc/lispref/internals.texi (Buffer Internals): Remove buffer
fields relevant to the old implementation; add the new interval
tree field.
* doc/lispref/display.texi (Overlays, Managing Overlays): Update
text to be consistent with the new implementation of overlays.
(Managing Overlays): Remove documentation of 'overlay-recenter'.

* etc/NEWS: Mention incompatible aspects of overlay
reimplementation.

21 months ago; Improve description of scoping and let-bindings
Eli Zaretskii [Wed, 14 Dec 2022 15:46:16 +0000 (17:46 +0200)]
; Improve description of scoping and let-bindings

* doc/lispref/variables.texi (Local Variables, Variable Scoping):
Explain the move to lexical-binding and elaborate on 'let*'.
Suggested by Michael Heerdegen <michael_heerdegen@web.de>.
(Bug#60027)

21 months ago; Fix a typo in window.el
Eli Zaretskii [Wed, 14 Dec 2022 15:08:46 +0000 (17:08 +0200)]
; Fix a typo in window.el

* lisp/window.el (switch-to-prev-buffer-skip-p): Fix typo.
Patch by Shuguang Sun <shuguang79@qq.com>.  (Bug#59985)

21 months agoMake proced-tests work on more systems
Eli Zaretskii [Wed, 14 Dec 2022 14:53:29 +0000 (16:53 +0200)]
Make proced-tests work on more systems

* test/lisp/proced-tests.el (proced-format-test)
(proced-update-test, proced-revert-test, proced-color-test):
Remove the 'skip-unless' condition, as it is unnecessary.
(proced-refine-test, proced-refine-with-update-test): Use PID, not
Args, as the column to test, as PID is more portable.

21 months agoDon't send erc-sasl-user as USER command argument
F. Jason Park [Tue, 13 Dec 2022 07:58:03 +0000 (23:58 -0800)]
Don't send erc-sasl-user as USER command argument

* lisp/erc/erc-sasl.el (erc-sasl--send-cap-ls): Add internal switch
for sending an opening "CAP LS".  The rationale for not enabling this
by default is twofold: one, it more strongly implies that ERC supports
IRCv3 client capability negotiation, which is somewhat disingenuous;
and, two, We'd still be "faking it" by firing and forgetting, and more
balls in the air makes things less predictable.
(erc--register-connection): Possibly send a "CAP LS" before anything
depending on the value of `erc-sasl--send-cap-ls'.  Also, don't
attempt to send `erc-session-username' when it holds an SASL username
because the latter may contain protocol-defying characters.
* test/lisp/erc/resources/base/local-modules/fourth.eld: change user
parameter of "USER" command to reflect nick when `erc-sasl-user' is
set to `:user'.  (Bug#59976.)

21 months agoSet erc-network to a "given" ID instead of failing
F. Jason Park [Tue, 13 Dec 2022 07:58:03 +0000 (23:58 -0800)]
Set erc-network to a "given" ID instead of failing

* lisp/erc/erc-networks.el (erc-networks--determine): Return the
so-called "given" ID from a non-nil `:id' keyword arg passed to `erc'
or `erc-tls'.
(erc-networks--allow-unknown-network): Add internal variable to
allow IRC session to continue despite the network being unknown.
(erc-networks--set-name): Tell the user about falling back to a given
ID when the network can't be determined.  When that's so, end the
session by destroying the connection unless
`erc-networks--allow-unknown-network' is enabled.  (Bug#59976.)
(erc-networks--ensure-announced): Include the fallback announced
server name in the error message.
* test/lisp/erc/erc-networks-tests.el (erc-networks--set-name): Add
dummy server process and don't expect an error to be signaled.
* test/lisp/erc/erc-scenarios-misc.el
(erc-scenarios-networks-announced-missing): Don't expect an error to
be signaled.
* test/lisp/erc/resources/networks/announced-missing/foonet.eld:
Remove "mode" match pattern.

21 months agoLimit casemapping to appropriate ranges in ERC
F. Jason Park [Mon, 12 Dec 2022 03:41:43 +0000 (19:41 -0800)]
Limit casemapping to appropriate ranges in ERC

* lisp/erc/erc-common.el (erc-downcase): Use case table for
`erc-downcase' so that case conversions are limited to the ASCII
interval.
* lisp/erc/erc.el (erc-casemapping--rfc1459-strict,
erc--casemapping-rfc1459): Make these case tables instead of
translation tables.  The functions in case-table.el modify the
standard syntax table, but that doesn't seem to make sense here,
right?
* test/lisp/erc/erc-tests.el (erc-downcase): Add cases showing
mappings outside of the ASCII range.  (Bug#59976.)

21 months agoActually accept non-symbols as IDs in erc-open
F. Jason Park [Mon, 12 Dec 2022 03:41:43 +0000 (19:41 -0800)]
Actually accept non-symbols as IDs in erc-open

* lisp/erc/erc.el (erc-generate-new-buffer-name): Despite what it says
in the documentation, only symbols were being accepted as valid `:id'
entry-point arguments.  This uses the interned `princ' representation
of the argument instead.
* test/lisp/erc/erc-scenarios-base-netid-samenet.el
(erc-scenarios-common--base-network-id-same-network): Randomly specify
a string for the ID param instead of a non-nil symbol when opening a
new connection.
* test/lisp/erc/resources/erc-scenarios-common.el
(erc-scenarios-common-assert-initial-buf-name): Adjust helper to allow
for non-symbol IDs.  (Bug#59976.)

21 months ago; Be nicer when updating browse-url var in erc-compat
F. Jason Park [Mon, 12 Dec 2022 03:16:07 +0000 (19:16 -0800)]
; Be nicer when updating browse-url var in erc-compat

* lisp/erc/erc-compat.el: Be more cautious about modifying
`browse-url-default-handlers' when loading erc-compat on Emacs 28.  A
user may have already added an entry for irc:// URLs before loading
`erc-compat'.

21 months agoRespect a nil erc-session-password when reconnecting
F. Jason Park [Sat, 3 Dec 2022 07:11:24 +0000 (23:11 -0800)]
Respect a nil erc-session-password when reconnecting

* lisp/erc/erc.el (erc-open): Simplify `old-vars' expression.
(erc--compute-server-password): Only compute a server password when
first connecting.  For compatibility, this respects third-party code
that expects session passwords in target buffers when initially
non-nil.
* test/lisp/erc/erc-scenarios-services-misc.el
(erc-scenarios-services-auth-source-reconnect): Add new test.
* test/lisp/erc/resources/services/auth-source/recon.eld: Add new test
data file.  (Bug#59858.)

21 months agoAdd dedicated auth-source section in ERC manual
F. Jason Park [Thu, 1 Dec 2022 07:10:58 +0000 (23:10 -0800)]
Add dedicated auth-source section in ERC manual

* doc/misc/erc.texi: Move auth-source description from the Password
subheading of the Advanced chapter's Connecting section to the new
Integrations section as a new node, Auth-Source, and give it a bit
more structure.  Fix various misuses of xref vs. pxref.  Convert URL
subheading to subsection and add anchor.  Prefer "backend" as a single
word, based on usage in other manuals.  Also replace loud "warning" in
SASL troubleshooting section.
* etc/ERC-NEWS: Re-link auth-source mention.
* lisp/erc/erc-sasl.el (erc-sasl-auth-source-function): Update info
node in doc string.
* lisp/erc/erc-services.el (erc-auth-source-services-function):
Re-link auth-source info node in doc string.
* lisp/erc/erc.el (erc-password, erc-auth-source-server-function,
erc-auth-source-join-function): Re-link auth-source info node in doc
strings.

21 months agoAdd tests for proced
Laurence Warne [Thu, 8 Dec 2022 13:39:00 +0000 (13:39 +0000)]
Add tests for proced

* test/lisp/proced-tests.el: New file.

21 months agoMake proced-update preserve refinements
Laurence Warne [Sat, 3 Dec 2022 21:41:57 +0000 (21:41 +0000)]
Make proced-update preserve refinements

Make proced-update preserve refinements by creating a new buffer local
variable proced-refinements which stores information about the current
refinements and is used by proced-update to further refine
proced-process-alist in the case it is non-nil.  The result is that
refinements are not immediately cleared when a proced buffer is
updated with proced-auto-update-flag non-nil.  proced-revert
maintains its current behaviour of clearing any active refinements.

* lisp/proced.el (proced-refinements): New buffer local variable
which tracks the current refinements.
(proced-refine): Set 'proced-refinements' variable and defer setting of
'proced-process-alist' to 'proced-update'.
(proced-update): Take into account 'proced-refinements' when setting
'proced-process-alist'.
(proced-revert): Set 'proced-refinements' to nil prior to calling
'proced-update'.

21 months agoWork around primary selection clobbering during xterm DND
Po Lu [Wed, 14 Dec 2022 13:30:29 +0000 (21:30 +0800)]
Work around primary selection clobbering during xterm DND

* src/xterm.c (x_dnd_do_unsupported_drop): Set `deactivate-mark'
to `dont-save'.  Explain why.
(syms_of_xterm): New DEFSYM `dont-save'.

21 months ago; * lisp/emacs-lisp/shortdoc.el: fix mistakes in previous commit
Mattias Engdegård [Wed, 14 Dec 2022 13:06:46 +0000 (14:06 +0100)]
; * lisp/emacs-lisp/shortdoc.el: fix mistakes in previous commit

21 months ago; * lisp/progmodes/cmake-ts-mode.el (auto-mode-alist): $ -> \'
Mattias Engdegård [Wed, 14 Dec 2022 11:25:49 +0000 (12:25 +0100)]
; * lisp/progmodes/cmake-ts-mode.el (auto-mode-alist): $ -> \'

21 months agoBetter shortdoc examples
Mattias Engdegård [Wed, 14 Dec 2022 11:20:46 +0000 (12:20 +0100)]
Better shortdoc examples

* lisp/emacs-lisp/shortdoc.el
(symbol, comparison): New.
(string, list, number): Remove or change examples that do not have
well-defined results, such as `eq` on strings or floats.
Edit other examples for better illustrating each respective operation.

21 months agoShortdoc: read and evaluate strings after :eval
Mattias Engdegård [Wed, 14 Dec 2022 11:16:28 +0000 (12:16 +0100)]
Shortdoc: read and evaluate strings after :eval

* lisp/emacs-lisp/shortdoc.el (shortdoc--display-function):
If the parameter of :eval is a string then read, evaluate and print
the result.  This was always the intention and is documented behaviour.

21 months agoFix Tramp tests in eglot-tests, prefix tests uniquely
Michael Albinus [Wed, 14 Dec 2022 09:52:04 +0000 (10:52 +0100)]
Fix Tramp tests in eglot-tests, prefix tests uniquely

* test/lisp/progmodes/eglot-tests.el (eglot--call-with-fixture):
Use `make-nearby-temp-file'.
(eglot--call-with-tramp-test): Set `tramp-verbose' and
`default-directory'.  The latter is needed for `make-nearby-temp-file'.
(eglot-test-tramp-test, eglot-test-tramp-test-2): Tag them as
:expensive-test.
(all): Prefix all tests with `eglot-test-' uniquely.

21 months ago* lisp/vc/vc-git.el (vc-git-checkin): Use make-nearby-temp-file (bug#60011)
Juri Linkov [Wed, 14 Dec 2022 08:05:55 +0000 (10:05 +0200)]
* lisp/vc/vc-git.el (vc-git-checkin): Use make-nearby-temp-file (bug#60011)

21 months agoDelete temp files after icalendar tests
Stefan Kangas [Wed, 14 Dec 2022 07:21:34 +0000 (08:21 +0100)]
Delete temp files after icalendar tests

* test/lisp/calendar/icalendar-tests.el
(icalendar-tests--get-error-string-for-export): Make sure we clean up
temporary files after test.

21 months ago; * lisp/keymap.el (keymap-substitute): Doc fix. (Bug#60059)
Stefan Kangas [Wed, 14 Dec 2022 05:38:14 +0000 (06:38 +0100)]
; * lisp/keymap.el (keymap-substitute): Doc fix.  (Bug#60059)

(cherry picked from commit 1568123196cd8b57ed64e284b7deb058026be713)

21 months ago; * lisp/keymap.el (keymap-substitute): Doc fix. (Bug#60059)
Stefan Kangas [Wed, 14 Dec 2022 05:38:14 +0000 (06:38 +0100)]
; * lisp/keymap.el (keymap-substitute): Doc fix.  (Bug#60059)

21 months agoFix syntax tables of tree-sitter modes (bug#59807)
Kai Ma [Sat, 3 Dec 2022 22:15:42 +0000 (06:15 +0800)]
Fix syntax tables of tree-sitter modes (bug#59807)

Tree-sitter modes should use the same syntax table as the
non-tree-sitter ones.

* lisp/progmodes/js.el (js-mode-syntax-table)
(js-ts-mode)
* lisp/progmodes/python.el (python-ts-mode)
* lisp/progmodes/sh-script.el (bash-ts-mode)

Copyright-paperwork-exempt: yes

xx

21 months ago; * admin/notes/tree-sitter/build-module/build.sh: Minor name change.
Yuan Fu [Wed, 14 Dec 2022 00:24:38 +0000 (16:24 -0800)]
; * admin/notes/tree-sitter/build-module/build.sh: Minor name change.

21 months ago; Comment and stylistic change in treesit.el
Yuan Fu [Tue, 13 Dec 2022 23:59:29 +0000 (15:59 -0800)]
; Comment and stylistic change in treesit.el

* lisp/treesit.el (treesit-defun-skipper): Docstring change.
(treesit--navigate-defun): Comment and stylistic change.

21 months ago* doc/misc/Makefile.in (need_emacsver): Add use-package.
Stefan Kangas [Tue, 13 Dec 2022 23:36:30 +0000 (00:36 +0100)]
* doc/misc/Makefile.in (need_emacsver): Add use-package.

21 months ago; * etc/NEWS: Fix another merge error.
Stefan Kangas [Tue, 13 Dec 2022 23:15:03 +0000 (00:15 +0100)]
; * etc/NEWS: Fix another merge error.

21 months ago; Fix merge error
Stefan Kangas [Tue, 13 Dec 2022 23:12:52 +0000 (00:12 +0100)]
; Fix merge error

21 months agoMerge from origin/emacs-29
Stefan Kangas [Tue, 13 Dec 2022 23:06:29 +0000 (00:06 +0100)]
Merge from origin/emacs-29

cd5856e4038 Fix bug when calling `rgrep` non-interactively
ba4bdd6a259 Adapt Tramp specific tests in eglot-tests.el
1d5c35c8e46 * lisp/textmodes/texinfo.el (texinfo-flymake): Improve do...
a99d0e7e6c9 Support a function in the BUFFER-LIST arg of list-buffers...
def51dd6458 ; Fix typos
4980ed7a6d9 Don't allow lazy highlight from recursive minibuffers
4ef8b9f5441 Improve resetting face attributes when looking for suitab...
c4b8bc90a8e ; Fix typos in doc strings
c45eb138451 ; * lisp/bs.el (bs-attributes-list): Doc fix
d6adaf487d8 Add lexical-binding to example package header
03ad1a92a2d Add improved tree-sitter navigation
a5272e2a7cc ; * test/src/treesit-tests.el: Add outline headers.
489bcacc7c3 Add cross-reference to flush-lines
0f9e6532b14 Use font-lock-number-face for numeric values in csharp-mode
4bccb7b211e Make treesit-query-validate create a read-only buffer
c0fe6c72cec Improve dockerfile-ts-mode imenu generation (Bug#59979)
631908f7017 Add "->" to python--treesit-operators (bug#59968)
5d4274d9b65 ; * admin/notes/tree-sitter/build-module/build.sh: Add -f...
d264b75669d Align C++ access specifiers to their enclosing class/stru...
ca67d988d87 Add cmake-ts-mode
8ec923775de Tweak various ts-mode's indent and fontification (bug#59931)
647b6a8099f Add expression for generic_name in csharp-ts-mode (bug#59...
5b178efd85a ; Adjust eglot test to recent autopep8/pycodestyle
58b8ed8b55c ; Avoid compilation warning on MS-Windows
40c23c11e88 * lisp/outline.el: Fix the value 'insert' of outline-mino...
527eb11de20 * lisp/minibuffer.el (completions-group-separator): Rever...
42d740fb2cb ; Skip two eglot tests when typescript is missing
19ef86f775a ; Remove outdated text describing overlays
081bf583007 Skip Eglot rust-analyzer tests if 'cargo' isn't available

# Conflicts:
# lisp/progmodes/typescript-ts-mode.el
# lisp/treesit.el

21 months agoFix bug when calling `rgrep` non-interactively
Stefan Kangas [Tue, 13 Dec 2022 21:01:45 +0000 (22:01 +0100)]
Fix bug when calling `rgrep` non-interactively

* lisp/progmodes/grep.el (rgrep): Fix bug where running
non-interactively requires running it interactively
first.  (Bug#60024)

21 months agoAdapt Tramp specific tests in eglot-tests.el
Michael Albinus [Tue, 13 Dec 2022 19:06:48 +0000 (20:06 +0100)]
Adapt Tramp specific tests in eglot-tests.el

* test/lisp/progmodes/eglot-tests.el (tramp): Move up.
(tramp-sh): Don't require.
(eglot--cleanup-after-test): Delete Tramp buffers if needed.
(eglot-tests-lsp-abiding-column): Rename from `eglot-lsp-abiding-column'.
(tramp-histfile-override): Declare.
(eglot--call-with-tramp-test):
Use `ert-remote-temporary-file-directory'.  Skip if needed.
(eglot--tramp-test, eglot--tramp-test-2): Don't skip.

21 months ago* lisp/textmodes/texinfo.el (texinfo-flymake): Improve docstring.
Stefan Kangas [Tue, 13 Dec 2022 17:57:25 +0000 (18:57 +0100)]
* lisp/textmodes/texinfo.el (texinfo-flymake): Improve docstring.

21 months agoSupport a function in the BUFFER-LIST arg of list-buffers-noselect (bug#59935)
Juri Linkov [Tue, 13 Dec 2022 17:47:47 +0000 (19:47 +0200)]
Support a function in the BUFFER-LIST arg of list-buffers-noselect (bug#59935)

* lisp/buff-menu.el (Buffer-menu-buffer-list): New buffer-local variable.
(list-buffers-noselect): Set Buffer-menu-buffer-list to 'buffer-list'
that now keeps the buffer-local value of the provided buffer list
or a function that returns the buffer list.
(list-buffers--refresh): Handle buffer-list and Buffer-menu-buffer-list
as a function and as a list.

* lisp/progmodes/project.el (project-list-buffers): Let-bind
'buffer-list-function' used by both legacy code and the new version
of list-buffers-noselect that supports its arg BUFFER-LIST as a function.

21 months ago; Fix typos
Stefan Kangas [Mon, 12 Dec 2022 07:50:21 +0000 (08:50 +0100)]
; Fix typos

21 months agoDon't allow lazy highlight from recursive minibuffers
Augusto Stoffel [Mon, 12 Dec 2022 22:07:28 +0000 (23:07 +0100)]
Don't allow lazy highlight from recursive minibuffers

See bug#59918.

* lisp/isearch.el (minibuffer-lazy-highlight-setup): Don't activate
when starting a recursive minibuffer.

21 months agoImprove resetting face attributes when looking for suitable fonts
Eli Zaretskii [Tue, 13 Dec 2022 15:35:17 +0000 (17:35 +0200)]
Improve resetting face attributes when looking for suitable fonts

* src/xfaces.c (syms_of_xfaces)<face-font-lax-matched-attributes>:
Change the default value to t.  Update doc string.
(realize_gui_face): When 'Vface_font_lax_matched_attributes' is t,
reset the 3 default font attributes efficiently.  Call
'font_maybe_unset_attribute' only if the value is neither nil nor
t.  (Bug#59347)

21 months ago; * lisp/progmodes/gdb-mi.el (gdb-locals-table-row-config): fix type
Mattias Engdegård [Tue, 13 Dec 2022 15:10:34 +0000 (16:10 +0100)]
; * lisp/progmodes/gdb-mi.el (gdb-locals-table-row-config): fix type

21 months ago; Improve recently installed documentation
Eli Zaretskii [Tue, 13 Dec 2022 14:24:09 +0000 (16:24 +0200)]
; Improve recently installed documentation

* lisp/progmodes/prog-mode.el (prog-fill-reindent-defun): Fix
wording of the doc string.
* doc/emacs/programs.texi (Multi-line Indent): Improve wording of
the description of 'prog-fill-reindent-defun' and related
variables.

21 months ago; Fix typos in xterm.c
Eli Zaretskii [Tue, 13 Dec 2022 14:10:23 +0000 (16:10 +0200)]
; Fix typos in xterm.c

* src/xterm.c (syms_of_xterm) <x-lax-frame-positioning>: Fix typos
in the name and doc string of the variable.

21 months ago; Fix typos in doc strings
Eli Zaretskii [Tue, 13 Dec 2022 14:01:13 +0000 (16:01 +0200)]
; Fix typos in doc strings

* lisp/treesit.el (treesit-defun-tactic)
(treesit-default-defun-skipper): Fix typos in doc strings.

21 months ago; * src/xterm.c: Improve commentary. Describe error handling.
Po Lu [Tue, 13 Dec 2022 13:49:41 +0000 (21:49 +0800)]
; * src/xterm.c: Improve commentary.  Describe error handling.

21 months ago; * lisp/bs.el (bs-attributes-list): Doc fix
Juanma Barranquero [Tue, 13 Dec 2022 13:45:58 +0000 (14:45 +0100)]
; * lisp/bs.el (bs-attributes-list): Doc fix

21 months ago; * src/xterm.c (x_send_scroll_bar_event): Minor clean up.
Po Lu [Tue, 13 Dec 2022 12:02:46 +0000 (20:02 +0800)]
; * src/xterm.c (x_send_scroll_bar_event): Minor clean up.

21 months agoAdd lexical-binding to example package header
Stefan Kangas [Tue, 13 Dec 2022 06:27:16 +0000 (07:27 +0100)]
Add lexical-binding to example package header

* doc/lispref/package.texi (Simple Packages): Add lexical-binding
cookie to example package header.

21 months agoAdd improved tree-sitter navigation
Yuan Fu [Tue, 13 Dec 2022 04:25:53 +0000 (20:25 -0800)]
Add improved tree-sitter navigation

This new set of functions (and tests) should eliminate
defun-navigation bugs and limitations we currently have.  This commit
doesn't change any existing bahavior: treesit-beginning/end-of-defun
and friends are unchanged.  The plan is to later switch gear and
replace the current functions with the new ones introduced in this
change.

This is a relatively big change, but I've setup a comprehensive test,
and it should fix current bugs, so I think it's ok to put it on the
release branch.

The gist of the new navigation is to use treesit--defuns-around to
find the previous sibling defun, next sibling defun, and the parent
defun, then use this information to move to previous/next
beginning/end of defun in treesit--navigate-defun.

I also added comprehensive testing that tests all four possible
operations (prev-beg, next-beg, prev-end, next-end) starting at all
possible positions (between two sibling defuns, inside a sibling
defun, etc).

* lisp/treesit.el (treesit-defun-type-regexp): Expand definition to
allow (REGEXP . FILTER).  Old functions don't support this, but it
should be fine since we are soon replacing them.

(treesit-defun-tactic)
(treesit-defun-skipper): New variables.

(treesit-default-defun-skipper)
(treesit--defuns-around)
(treesit--top-level-defun)
(treesit--navigate-defun): New functions.

* test/src/treesit-tests.el (treesit--ert-insert-and-parse-marker)
(treesit--ert-collect-positions)
(treesit--ert-test-defun-navigation): New helper functions.

(treesit--ert-defun-navigation-python-program)
(treesit--ert-defun-navigation-js-program)
(treesit--ert-defun-navigation-bash-program)
(treesit--ert-defun-navigation-nested-master): New variables.

(treesit-defun-navigation-nested-1)
(treesit-defun-navigation-nested-2)
(treesit-defun-navigation-nested-3)
(treesit-defun-navigation-top-level): New tests.

21 months ago; * test/src/treesit-tests.el: Add outline headers.
Yuan Fu [Tue, 13 Dec 2022 02:14:30 +0000 (18:14 -0800)]
; * test/src/treesit-tests.el: Add outline headers.

21 months agoAdd cross-reference to flush-lines
Stefan Kangas [Tue, 13 Dec 2022 00:43:48 +0000 (01:43 +0100)]
Add cross-reference to flush-lines

* lisp/replace.el (flush-lines, kill-matching-lines): Add
cross-references between commands, using the names
'(kill|delete)-matching-lines' for symmetry.  (Bug#59934)

21 months agoUse font-lock-number-face for numeric values in csharp-mode
Jostein Kjønigsen [Mon, 12 Dec 2022 11:50:22 +0000 (12:50 +0100)]
Use font-lock-number-face for numeric values in csharp-mode

(bug#60004)

* lisp/progmodes/csharp-mode.el: update fontification code.

21 months agoMake treesit-query-validate create a read-only buffer
Jostein Kjønigsen [Mon, 12 Dec 2022 07:42:33 +0000 (08:42 +0100)]
Make treesit-query-validate create a read-only buffer

* lisp/treesit.el: use view-mode for generated validation buffer.

21 months agoImprove dockerfile-ts-mode imenu generation (Bug#59979)
Randy Taylor [Mon, 12 Dec 2022 01:50:54 +0000 (20:50 -0500)]
Improve dockerfile-ts-mode imenu generation (Bug#59979)

* lisp/progmodes/dockerfile-ts-mode.el (treesit-node-child-by-field-name):
Declare.
(dockerfile-ts-mode--imenu-1): Use stage name if available.

21 months agoAdd "->" to python--treesit-operators (bug#59968)
Daniel Martín [Sun, 11 Dec 2022 16:33:13 +0000 (17:33 +0100)]
Add "->" to python--treesit-operators (bug#59968)

* lisp/progmodes/python.el (python--treesit-operators): Add "->", used
to specify the return types of functions in Python.

21 months ago; * admin/notes/tree-sitter/build-module/build.sh: Add -fPIC.
lu4nx [Sun, 11 Dec 2022 15:33:33 +0000 (23:33 +0800)]
; * admin/notes/tree-sitter/build-module/build.sh: Add -fPIC.

(bug#59967)

21 months agoAlign C++ access specifiers to their enclosing class/struct/union
Daniel Martín [Sun, 11 Dec 2022 14:57:43 +0000 (15:57 +0100)]
Align C++ access specifiers to their enclosing class/struct/union

(bug#59966)

The default style in c++-mode aligns access specifiers like "private",
"public" or "protected" to their enclosing class, struct, or union.
The "ellemtel" style indents access specifiers, but this C++ style is
not supported by c++-ts-mode yet.

* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): Align access
specifiers to their enclosing class/struct/union.

21 months agoAdd cmake-ts-mode
Randy Taylor [Sun, 11 Dec 2022 02:40:25 +0000 (21:40 -0500)]
Add cmake-ts-mode

* admin/notes/tree-sitter/build-module/batch.sh:
* admin/notes/tree-sitter/build-module/build.sh: Add cmake support.
* etc/NEWS: Mention it.
* lisp/progmodes/cmake-ts-mode.el: New major mode with
tree-sitter support.
* lisp/progmodes/eglot.el (eglot-server-programs): Add it.

21 months agoTweak various ts-mode's indent and fontification (bug#59931)
Theodor Thornhill [Fri, 9 Dec 2022 21:36:03 +0000 (22:36 +0100)]
Tweak various ts-mode's indent and fontification (bug#59931)

* lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings): Add raw
string literal font-locking.
* lisp/progmodes/java-ts-mode.el (java-ts-mode--indent-rules): Add
text_block indent rule.
(java-ts-mode--font-lock-settings): Add text_block font-locking.
* lisp/progmodes/js.el (js-ts-mode): Prefer top-level navigation.
* lisp/progmodes/json-ts-mode.el (json-ts-mode--font-lock-settings):
Add comment feature.
(json-ts-mode): Use comment feature.
* lisp/progmodes/typescript-ts-mode.el (typescript-ts-base-mode):
Prefer top-level navigation.

21 months agoAdd expression for generic_name in csharp-ts-mode (bug#59897)
Theodor Thornhill [Thu, 8 Dec 2022 10:08:28 +0000 (11:08 +0100)]
Add expression for generic_name in csharp-ts-mode (bug#59897)

Given the below example, we want 'services' to be font-locked in
'font-lock-variable-name-face' in all cases.  Previously this only
worked in the first case, and the other was font-locked as
'font-lock-function-name-face'.

namespace Foo {
    void Foo() {
        services.Add();
        services.Add<MyType>();
    }
}

* lisp/progmodes/csharp-mode.el (csharp-ts-mode--font-lock-settings):
Add new query that makes the mentioned example work.

21 months ago; Adjust eglot test to recent autopep8/pycodestyle
Stefan Kangas [Mon, 12 Dec 2022 21:44:55 +0000 (22:44 +0100)]
; Adjust eglot test to recent autopep8/pycodestyle

* test/lisp/progmodes/eglot-tests.el (python-autopep-formatting):
Support more recent autopep8/pycodestyle.

21 months ago; Avoid compilation warning on MS-Windows
Eli Zaretskii [Mon, 12 Dec 2022 18:01:23 +0000 (20:01 +0200)]
; Avoid compilation warning on MS-Windows

* src/timefns.c (sys_clock): Declare, to avoid compilation
warning.

21 months ago* lisp/outline.el: Fix the value 'insert' of outline-minor-mode-use-buttons.
Juri Linkov [Mon, 12 Dec 2022 17:37:02 +0000 (19:37 +0200)]
* lisp/outline.el: Fix the value 'insert' of outline-minor-mode-use-buttons.

(outline--insert-button): Keep text properties around point
on the inserted whitespace placeholder.

* lisp/apropos.el (apropos-mode):
* lisp/progmodes/xref.el (xref--xref-buffer-mode):
Change outline-minor-mode-use-buttons from t to 'insert'.

21 months ago* lisp/minibuffer.el (completions-group-separator): Revert f7816c94b6.
Juri Linkov [Mon, 12 Dec 2022 17:30:55 +0000 (19:30 +0200)]
* lisp/minibuffer.el (completions-group-separator): Revert f7816c94b6.

Change face attribute from :underline back to :strike-through.
https://lists.gnu.org/archive/html/emacs-devel/2022-10/msg01792.html

21 months ago; Skip two eglot tests when typescript is missing
Stefan Kangas [Mon, 12 Dec 2022 10:50:38 +0000 (11:50 +0100)]
; Skip two eglot tests when typescript is missing

* test/lisp/progmodes/eglot-tests.el
(javascript-basic, project-wide-diagnostics-typescript): Skip tests
when the npm package "typescript" is not installed.

21 months ago; Remove outdated text describing overlays
Eli Zaretskii [Mon, 12 Dec 2022 13:37:49 +0000 (15:37 +0200)]
; Remove outdated text describing overlays

* doc/lispref/display.texi (Overlays): Remove outdated text.
(Bug#59996)

21 months agoAdd variable to make resizing frames sometimes faster
Po Lu [Mon, 12 Dec 2022 11:21:10 +0000 (19:21 +0800)]
Add variable to make resizing frames sometimes faster

* etc/PROBLEMS: Add documentation about new variable.
* src/xterm.c (x_set_offset, x_set_window_size_1): Respect new
variable.
(syms_of_xterm): Add a new variable to prevent Emacs from
syncing upon resize or movement.

21 months agoSkip Eglot rust-analyzer tests if 'cargo' isn't available
João Távora [Mon, 12 Dec 2022 09:39:32 +0000 (09:39 +0000)]
Skip Eglot rust-analyzer tests if 'cargo' isn't available

* test/lisp/progmodes/eglot-tests.el
(project-wide-diagnostics-rust-analyzer)
(diagnostic-tags-unnecessary-code): Skip unless "cargo" is found.

21 months agoMerge from origin/emacs-29
Stefan Kangas [Mon, 12 Dec 2022 08:05:53 +0000 (09:05 +0100)]
Merge from origin/emacs-29

06ef030f936 use-package.texi: New section "Manual installation"
f4ce6fa7d3e Revert "Revert "Improve last change to xfaces.c" (05ece1e...
b8d2ec920f3 Revert "Improve last change to xfaces.c" (05ece1eb8b)
24c8c28ae61 Do not pare arguments unnecessarily.
9c0d7bb73bb Add automated tests for Eglot
d3669cfe156 Eglot: allow skipping compile-time warnings about LSP int...
04b7e01885d ; project.el: Bump version.
f2876014adb Add customizale faces for tree-sitter explorer
3e349ee1198 Fix error message when installing non-existent package
733cdeabfb9 Don't use diff-mode buffer as a patch when it's visiting ...
87475f4af21 Fix pcase rx patterns using rx-let bindings (bug#59814)
4893a156317 Fix use-package-defaults defcustom type (bug#59941)
074b7e6f4d1 ; * lisp/use-package/bind-key.el: Remove ineffective back...
864ed9dfa1f ; * lisp/progmodes/dockerfile-ts-mode.el: use \' instead ...
9f7e5584a4f * lisp/language/indian.el: Improve Brahmi composition rul...
78ad33bb05f ; Minor cleanup of last change in xfaces.c.
2024ade271d ; Improve docs of relaxing face-font attribute match (bug...

21 months agouse-package.texi: New section "Manual installation"
Stefan Kangas [Mon, 12 Dec 2022 07:45:40 +0000 (08:45 +0100)]
use-package.texi: New section "Manual installation"

* doc/misc/use-package.texi (Manual installation): New section.
(Load path, Manual autoloads): Make into subsections of above new
section.

21 months agoRevert "Revert "Improve last change to xfaces.c" (05ece1eb8b)"
Po Lu [Mon, 12 Dec 2022 02:41:38 +0000 (10:41 +0800)]
Revert "Revert "Improve last change to xfaces.c" (05ece1eb8b)"

This reverts commit b8d2ec920f37f5d77d32440eefc97dd5e8c2c7dc.

Not only does it make debugging Emacs harder for users, that change is
unsafe for the Haiku port.

21 months agoRevert "Improve last change to xfaces.c" (05ece1eb8b)
Gregory Heytings [Mon, 12 Dec 2022 01:12:09 +0000 (02:12 +0100)]
Revert "Improve last change to xfaces.c" (05ece1eb8b)

* src/xfaces.c: Revert 05ece1eb8b.

See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59347#331.

21 months agoDo not pare arguments unnecessarily.
Gregory Heytings [Sat, 10 Dec 2022 21:40:31 +0000 (21:40 +0000)]
Do not pare arguments unnecessarily.

* lisp/pcomplete.el (pcomplete-here-using-help): Do not pare
arguments.  Fixes bug#59803.

21 months agoAdd automated tests for Eglot
João Távora [Sun, 11 Dec 2022 18:10:43 +0000 (18:10 +0000)]
Add automated tests for Eglot

Most of the tests require a specific LSP server to do their thing, and
skip themselves if this server isn't found.

This file is a modified/overhauled version of the original Eglot
automated tests that were developed in the old GitHub upstream.

* test/lisp/progmodes/eglot-tests.el: New file.

21 months agoEglot: allow skipping compile-time warnings about LSP interfaces
João Távora [Sun, 11 Dec 2022 23:16:58 +0000 (23:16 +0000)]
Eglot: allow skipping compile-time warnings about LSP interfaces

* lisp/progmodes/eglot.el (eglot-strict-mode): Add 'no-unknown-interfaces'.
(eglot--check-object): Honour new eglot-strict-mode value.

21 months ago; project.el: Bump version.
Dmitry Gutov [Sun, 11 Dec 2022 23:14:14 +0000 (01:14 +0200)]
; project.el: Bump version.

21 months agoAdd customizale faces for tree-sitter explorer
Yuan Fu [Sun, 11 Dec 2022 22:43:58 +0000 (14:43 -0800)]
Add customizale faces for tree-sitter explorer

* lisp/treesit.el (treesit-explorer-anonymous-node)
(treesit-explorer-field-name): New face.
(treesit--explorer-draw-node): Use the new faces.
(treesit-explore-mode): Change playground to explorer.

21 months agoAdd prog-fill-reindent-defun (bug#59664)
Theodor Thornhill [Fri, 9 Dec 2022 19:12:51 +0000 (20:12 +0100)]
Add prog-fill-reindent-defun (bug#59664)

Introduce a new command that aims to reindent code in a defun, or fill
a paragraph of text.  The command uses treesit.el when available,
otherwise falls back to using syntax-ppss and regexps.  Treesit.el
needs a new variable that is intended to be set by the major modes so
that this and other future functions can know what kind of node we are
looking at.

* doc/emacs/programs.texi: Mention the new command.
* etc/NEWS: Mention the new command.
* lisp/progmodes/c-ts-mode.el (c++-ts-mode): Add regexp for the new
variable.
* lisp/progmodes/csharp-mode.el (csharp-ts-mode): Add regexp for the
new variable.
* lisp/progmodes/java-ts-mode.el (java-ts-mode): Add regexp for the
new variable.
* lisp/progmodes/js.el (js-ts-mode): Add regexp for the new variable.
* list/progmodes/prog-mode.el (prog-mode-map): Bind the new command by
default.
(prog-fill-reindent-defun): New command.
* lisp/progmodes/sh-script.el (bash-ts-mode): Add regexp for the new
variable.
* lisp/progmodes/typescript-ts-mode.el (typescript-ts-base-mode): Add
regexp for the new variable.
* lisp/treesit.el (treesit-text-type-regexp): New variable.

21 months agoFix error message when installing non-existent package
Stefan Kangas [Sun, 11 Dec 2022 18:00:01 +0000 (19:00 +0100)]
Fix error message when installing non-existent package

* lisp/emacs-lisp/package.el (package-compute-transaction): Don't add
trailing dash to package name in non-existent package
error.  (Bug#59923)

21 months agoDon't use diff-mode buffer as a patch when it's visiting a file (bug#59962)
Juri Linkov [Sun, 11 Dec 2022 17:24:34 +0000 (19:24 +0200)]
Don't use diff-mode buffer as a patch when it's visiting a file (bug#59962)

* lisp/vc/vc.el (vc-deduce-fileset-1): Don't call diff-vc-deduce-fileset
for diff-mode when buffer-file-name is non-nil.  This is because in this case
a file with a diff might be committed to VCS.  So don't use it as a patch
to commit with 'C-x v v'.

21 months ago* lisp/eshell/esh-opt.el (eshell--do-opts): Demote usage-msg to `user-error`
Stefan Monnier [Sun, 11 Dec 2022 15:56:49 +0000 (10:56 -0500)]
* lisp/eshell/esh-opt.el (eshell--do-opts): Demote usage-msg to `user-error`

21 months agoFix pcase rx patterns using rx-let bindings (bug#59814)
Mattias Engdegård [Sun, 4 Dec 2022 14:20:49 +0000 (15:20 +0100)]
Fix pcase rx patterns using rx-let bindings (bug#59814)

Reported by Daniel Pittman.

* lisp/emacs-lisp/rx.el (rx): Move binding of rx--local-definitions...
(rx--to-expr): ...here.
* test/lisp/emacs-lisp/rx-tests.el (rx-let-pcase): New test.

21 months agoFix use-package-defaults defcustom type (bug#59941)
Mattias Engdegård [Sun, 11 Dec 2022 15:26:50 +0000 (16:26 +0100)]
Fix use-package-defaults defcustom type (bug#59941)

* lisp/use-package/use-package-core.el (use-package-defaults):
Enlarge type to allow for keywords such as :ensure and :pin to be
added later, remedying a failure in test-custom-opts.

21 months agoFix manual noverlay tests (again)
Basil L. Contovounesios [Fri, 25 Nov 2022 21:50:08 +0000 (22:50 +0100)]
Fix manual noverlay tests (again)

* src/itree.c (itree_iterator_start): Fix docstring typo.
* test/manual/noverlay/itree-tests.c: Stop defining unused
ITREE_DEBUG.  Replace removed names and APIs with current ones,
e.g. interval_tree_init is now called itree_init, and
itree_iterator_finish no longer exists.  Ensure preconditions of
itree API are satisfied before use, e.g. by zero-initializing
instances of itree_node before inserting them into a tree.

21 months ago; * lisp/use-package/bind-key.el: Remove ineffective backslashes.
Mattias Engdegård [Sat, 10 Dec 2022 13:13:39 +0000 (14:13 +0100)]
; * lisp/use-package/bind-key.el: Remove ineffective backslashes.