]> git.eshelyaron.com Git - emacs.git/log
emacs.git
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/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 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.

21 months ago; * lisp/progmodes/dockerfile-ts-mode.el: use \' instead of $
Mattias Engdegård [Sat, 10 Dec 2022 13:11:34 +0000 (14:11 +0100)]
; * lisp/progmodes/dockerfile-ts-mode.el: use \' instead of $

21 months ago* lisp/language/indian.el: Improve Brahmi composition rules. (bug#58957)
समीर सिंह Sameer Singh [Wed, 2 Nov 2022 02:35:44 +0000 (08:05 +0530)]
* lisp/language/indian.el: Improve Brahmi composition rules. (bug#58957)

21 months ago; Minor cleanup of last change in xfaces.c.
Eli Zaretskii [Sun, 11 Dec 2022 09:59:04 +0000 (11:59 +0200)]
; Minor cleanup of last change in xfaces.c.

21 months ago; Improve docs of relaxing face-font attribute match (bug#59347)
Eli Zaretskii [Sun, 11 Dec 2022 09:49:29 +0000 (11:49 +0200)]
; Improve docs of relaxing face-font attribute match (bug#59347)

* src/xfaces.c (realize_gui_face): Fix typo and coding style.
(syms_of_xfaces) <face-font-lax-matched-attributes>: A better name.

21 months agoMerge from origin/emacs-29
Stefan Kangas [Sun, 11 Dec 2022 05:30:22 +0000 (06:30 +0100)]
Merge from origin/emacs-29

f221105723d ; * doc/misc/use-package.texi: Prepare for GNU ELPA.

21 months ago; * doc/misc/use-package.texi: Prepare for GNU ELPA.
Stefan Kangas [Sun, 11 Dec 2022 00:43:25 +0000 (01:43 +0100)]
; * doc/misc/use-package.texi: Prepare for GNU ELPA.

21 months ago; Auto-commit of loaddefs files.
Stefan Kangas [Sun, 11 Dec 2022 02:09:18 +0000 (03:09 +0100)]
; Auto-commit of loaddefs files.

21 months agoMerge from origin/emacs-29
Stefan Kangas [Sun, 11 Dec 2022 01:58:00 +0000 (02:58 +0100)]
Merge from origin/emacs-29

80122cde3db ; Unbreak bootstrap

# Conflicts:
# lisp/ldefs-boot.el

21 months ago; Unbreak bootstrap
Stefan Kangas [Sun, 11 Dec 2022 01:32:21 +0000 (02:32 +0100)]
; Unbreak bootstrap

* lisp/progmodes/dockerfile-ts-mode.el (auto-mode-alist): Wrap
autoloaded definition using the rx macro in eval-and-compile.

21 months agoMerge from origin/emacs-29
Po Lu [Sun, 11 Dec 2022 01:34:03 +0000 (09:34 +0800)]
Merge from origin/emacs-29

05ece1eb8b7 Improve last change to xfaces.c

21 months ago; Merge from origin/emacs-29
Po Lu [Sun, 11 Dec 2022 01:34:03 +0000 (09:34 +0800)]
; Merge from origin/emacs-29

The following commit was skipped:

7013b0179cb ; Auto-commit of loaddefs files.

21 months agoMerge from origin/emacs-29
Po Lu [Sun, 11 Dec 2022 01:34:03 +0000 (09:34 +0800)]
Merge from origin/emacs-29

79659416f95 ; * admin/git-bisect-start: Fix commit hash
a9037aa8e81 ; Fix use-package-ensure-system-package macOS footnote
7d787564c08 Actually improve detection of long lines
118465f6fed ; Improve checkdoc.el commentary section
30e3cb21351 Unset the weight/slant/width in the spec when realizing a...
01154166057 Update to Org 9.6-31-g954a95
26a8644a587 ; tabulated-list.el: Remove duplicate obsolete declaration
29b9aeae32a ; * doc/misc/use-package.texi: Fix misplaced @end group.
3c5a41b2008 ; * doc/lispref/keymaps.texi (Searching Keymaps): Fix a t...
1753da24cd4 Fix infloop in 'shell-resync-dirs' with tcsh
2f1269c3331 ; Fix some minor issues in use-package.texi

21 months ago; Merge from origin/emacs-29
Po Lu [Sun, 11 Dec 2022 01:34:03 +0000 (09:34 +0800)]
; Merge from origin/emacs-29

The following commit was skipped:

1b7ece20956 ; Fix a failure when running server-tests via the command...

21 months agoMerge from origin/emacs-29
Po Lu [Sun, 11 Dec 2022 01:34:03 +0000 (09:34 +0800)]
Merge from origin/emacs-29

44c5f361497 ; Fix two byte-compiler warnings
a8ee046fb50 Ensure 'package-vc--version' always returns a version
022ab1061b2 Ensure 'package-vc--main-file' always returns an existing...
357fe91996b Check if package already exists before installing from ch...
5e8bc79f6b2 ; Fix reference in docstring to 'package-vc-install-from-...
af88b00b19c Refresh the package quickstart file in package-vc
5a092c8e461 ; * admin/notes/tree-sitter/starter-guide (Indent): Minor...
ebef8905b0d Make indirect buffers use tree-sitter parsers of their ba...
8f53fa10d94 Fontify "this" as a keyword in c++-ts-mode (bug#59924)
8de8f1dc051 Add class_body indentation for typescript (bug#59680)
839341d7370 Make more granular defun-type-regexp (bug#59873)
8f49137c9bf Add dockerfile-ts-mode (Bug#59894)
1014bcc8e32 Fix fontification of method-invocations in js-ts-mode (bu...
7141920c6af Fix escape-sequence feature in typescript-ts-mode (bug#59...
4df35e3491c Improve fontification in csharp-ts-mode (bug#59909)
33a8415eb7e Use 'project--value-in-dir' for 'project-vc-include-untra...
594267395d5 Update Turkish Hello
940d9070e97 Support newer glib versions (Bug#59061)
0bd26abf7fb ; * doc/misc/use-package.texi: Fix @file.
bcf235acd58 Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/...
2ea7a357fd1 ; * doc/misc/use-package.texi: Fix @acronym.
d268ab1c5d7 Bring back the project--value-in-dir logic

21 months ago; Merge from origin/emacs-29
Po Lu [Sun, 11 Dec 2022 01:34:03 +0000 (09:34 +0800)]
; Merge from origin/emacs-29

The following commits were skipped:

fa36b5ddf58 Backport: Enable native speed 2 EMBA build and tests and ...
6a9e38f22c6 * test/infra/test-jobs.yml: Regenerate for the new use-pa...

21 months agoMerge from origin/emacs-29
Po Lu [Sun, 11 Dec 2022 01:34:02 +0000 (09:34 +0800)]
Merge from origin/emacs-29

5fbd12ff494 Adapt manual names in emacs-news-mode
b36bc692671 ; * etc/NEWS: Fix typos.
f626b9f3856 ; * doc/misc/use-package.texi: Fix indexing.
56a6712bd6f ; * lisp/erc/erc.el (erc-default-target): Fix comment.
dcf69a1da4a Respect some spaces in auth-source-pass--match-regexp
acd462b0306 ; Improve the use-package manual
801c1c22de8 ; Prefer HTTPS to HTTP in some URLs
74a009dd96a Eglot: Handle LSP progress with Emacs progress reporters ...
0cfeb1c2bc9 Eglot: cleanup whitespace and indentation
465a9e78b96 Better test-custom-opts diagnostics
bdbb7099784 ; Fix groff warnings in man pages
d3d9676bf88 New script admin/check-man-pages
c2aea9d1323 ; Mention flush-lines in kill-matching-lines docstring
f5c3585e4dd ; Fix typos
58a483960dd ; Improve use-package-autoload-keymap docstring

# Conflicts:
# etc/NEWS

21 months agoImprove last change to xfaces.c
Po Lu [Sun, 11 Dec 2022 01:32:20 +0000 (09:32 +0800)]
Improve last change to xfaces.c

* src/xfaces.c (font_unset_attribute): New function.
(realize_gui_face): Improve commentary and use list instead of
bitmask.
(syms_of_xfaces): Get rid of bitmask.  Replace it by a list,
there is no reason any user should have to think about bitmasks
in Emacs lisp.

21 months ago; Auto-commit of loaddefs files.
Stefan Kangas [Sun, 11 Dec 2022 01:15:56 +0000 (02:15 +0100)]
; Auto-commit of loaddefs files.

21 months ago; * admin/git-bisect-start: Fix commit hash
Gregory Heytings [Sat, 10 Dec 2022 23:31:30 +0000 (23:31 +0000)]
; * admin/git-bisect-start: Fix commit hash

21 months ago; Fix use-package-ensure-system-package macOS footnote
Stefan Kangas [Sat, 10 Dec 2022 23:30:28 +0000 (00:30 +0100)]
; Fix use-package-ensure-system-package macOS footnote

* doc/misc/use-package.texi (use-package-ensure-system-package): Fix
macOS footnote.

21 months agoActually improve detection of long lines
Gregory Heytings [Sat, 10 Dec 2022 23:04:10 +0000 (23:04 +0000)]
Actually improve detection of long lines

* src/xdisp.c (redisplay_window): Update condition.

* src/xdisp.c (mark_window_display_accurate_1):
* src/pdumper.c (dump_buffer):
* src/buffer.h (BUF_CHARS_UNCHANGED_MODIFIED):
(struct buffer_text):
* src/buffer.c (Fget_buffer_create):
Revert 1c837c42c2, which was misguided.

21 months ago; Improve checkdoc.el commentary section
Stefan Kangas [Sat, 10 Dec 2022 22:45:25 +0000 (23:45 +0100)]
; Improve checkdoc.el commentary section

* lisp/emacs-lisp/checkdoc.el: Improve wording of Commentary.
(checkdoc): Link commentary from defgroup.

21 months agoUnset the weight/slant/width in the spec when realizing a font
Gregory Heytings [Sat, 10 Dec 2022 22:13:58 +0000 (22:13 +0000)]
Unset the weight/slant/width in the spec when realizing a font

Between commits bf0d3f76dc (2014) and 6b1ed2f2c9 (2022),
realize_gui_face called font_load_for_lface with an empty or
partly emptied font spec, i.e. it ignored a part of its attrs
argument.  The rationale given in bug#17973, which led to
bf0d3f76dc, is not clear.  However, 6b1ed2f2c9, which passes
the full font spec to font_load_for_lface and
font_find_for_lface, leads to suboptimal font choices, for
example when the font chosen for the default face has a
weight, slant or width that is not supported by other
available fonts on the system, such as 'medium' or 'heavy'.

If these attributes are not unset here, the call to
font_list_entities in font_find_for_lface arbitrarily limits
the candidate font list to those that are perfect matches for
these attributes, which means that the scoring mechanism is
bypassed.  Note that the size attribute in spec is also unset,
in font_find_for_lface.

Also allow unsetting the other attributes, for debugging purposes.

* src/xfaces.c (realize_gui_face): Unset the weight, slant and
width of the font spec.  Fixes bug#57555 and bug#59347.
(syms_of_xfaces): New variable
'realize-gui-face-ignored-spec-attributes'.

21 months agoUpdate to Org 9.6-31-g954a95
Kyle Meyer [Sat, 10 Dec 2022 21:59:46 +0000 (16:59 -0500)]
Update to Org 9.6-31-g954a95

21 months ago; tabulated-list.el: Remove duplicate obsolete declaration
Juanma Barranquero [Sat, 10 Dec 2022 20:31:59 +0000 (21:31 +0100)]
; tabulated-list.el: Remove duplicate obsolete declaration

* lisp/emacs-lisp/tabulated-list.el
(tabulated-list-line-number-width): Remove second
`define-obsolete-function-alias' for the same function.

21 months ago; * doc/misc/use-package.texi: Fix misplaced @end group.
Stefan Kangas [Sat, 10 Dec 2022 20:25:04 +0000 (21:25 +0100)]
; * doc/misc/use-package.texi: Fix misplaced @end group.

21 months agoFix GDB save history (bug#59838)
Manuel Giraud [Mon, 5 Dec 2022 16:48:15 +0000 (17:48 +0100)]
Fix GDB save history (bug#59838)

* lisp/progmodes/gdb-mi.el (gdb-reset): Save GDB comint history.
(gdb-delchar-or-quit): Remove useless progn and add comment.

21 months ago; * etc/NEWS: Fix last change.
Eli Zaretskii [Sat, 10 Dec 2022 13:32:41 +0000 (15:32 +0200)]
; * etc/NEWS: Fix last change.

21 months agogdb-mi.el: Configure variable order and length in local-vars window
Gustaf Waldemarson [Tue, 29 Nov 2022 22:40:23 +0000 (23:40 +0100)]
gdb-mi.el: Configure variable order and length in local-vars window

This changes allows users to configure the order of various properties
as well as truncating their length.  The full description of each
property is available as a help-text (tooltip).
* lisp/progmodes/gdb-mi.el (gdb-locals-table-row-config): New user
option.
(gdb-locals-value-filter): Don't limit the values here.
(gdb-locals-table-columns-list): New function.
(gdb-locals-handler-custom): Call it.  (Bug#59730)

* etc/NEWS: Announce the change.

21 months ago; * doc/lispref/keymaps.texi (Searching Keymaps): Fix a typo (bug#59886).
Eli Zaretskii [Sat, 10 Dec 2022 13:06:27 +0000 (15:06 +0200)]
; * doc/lispref/keymaps.texi (Searching Keymaps): Fix a typo (bug#59886).

21 months agoFix infloop in 'shell-resync-dirs' with tcsh
Eli Zaretskii [Sat, 10 Dec 2022 12:55:01 +0000 (14:55 +0200)]
Fix infloop in 'shell-resync-dirs' with tcsh

* lisp/shell.el (shell-resync-dirs): Remove trailing slash from
output of 'dirs', for csh/tcsh's sake.  (Bug#59804)

21 months ago; Fix some minor issues in use-package.texi
Stefan Kangas [Sat, 10 Dec 2022 11:59:30 +0000 (12:59 +0100)]
; Fix some minor issues in use-package.texi

* doc/misc/use-package.texi: Fix some minor issues.

21 months ago; * src/xterm.c (x_connection_closed): Fix typo in change.
Po Lu [Sat, 10 Dec 2022 11:29:02 +0000 (19:29 +0800)]
; * src/xterm.c (x_connection_closed): Fix typo in change.

21 months agoImprove X error messages
Po Lu [Sat, 10 Dec 2022 11:26:54 +0000 (19:26 +0800)]
Improve X error messages

* src/xterm.c (x_connection_closed): Don't print handler blurb
if nothing is there to be printed.

21 months agoResurrect changes omitted by a recent merge from emacs-29 (bug#59921)
Eli Zaretskii [Sat, 10 Dec 2022 11:22:48 +0000 (13:22 +0200)]
Resurrect changes omitted by a recent merge from emacs-29 (bug#59921)

This includes the changes for the following commits:

  670daa8b
  b429e524
  c83c95634e7
  6479691cf07
  b710ca62c00
  d31a2539834
  a669d5fae54
  f7262b8f81e
  fef17557365
  bf81df86e52
  bfc00f1c120
  d2411615e8b
  dcf69a1d

21 months ago; Fix a failure when running server-tests via the command line
Jim Porter [Sat, 10 Dec 2022 06:56:24 +0000 (22:56 -0800)]
; Fix a failure when running server-tests via the command line

* test/lisp/server-tests.el
(server-tests/server-force-stop/keeps-frames): Delete every new frame
created during the test.  On some systems, 'delete-terminal' will
delete the frames for us, so this ensures that if there are no new
frames, nothing happens.

(cherry picked from commit 3785fe52e4692ffef14c0a1e50361c22d66fabe8)

21 months ago; Fix two byte-compiler warnings
Stefan Kangas [Sat, 10 Dec 2022 09:48:28 +0000 (10:48 +0100)]
; Fix two byte-compiler warnings

* lisp/gnus/gnus-icalendar.el (gnus-icalendar--show-org-event):
* test/lisp/progmodes/project-tests.el (project/quoted-directory):
Fix warnings.

21 months agoEnsure 'package-vc--version' always returns a version
Philip Kaludercic [Sat, 10 Dec 2022 08:47:42 +0000 (09:47 +0100)]
Ensure 'package-vc--version' always returns a version

* lisp/emacs-lisp/package-vc.el (package-vc--version): Return "0" even
if the main file exists, but lacks version headers.

21 months agoEnsure 'package-vc--main-file' always returns an existing file
Philip Kaludercic [Sat, 10 Dec 2022 08:43:22 +0000 (09:43 +0100)]
Ensure 'package-vc--main-file' always returns an existing file

* lisp/emacs-lisp/package-vc.el (require): Explicitly require cl-lib.
(package-vc--main-file): If the expected file name is missing, try and
find the closest match.

21 months agoCheck if package already exists before installing from checkout
Philip Kaludercic [Fri, 9 Dec 2022 18:54:25 +0000 (19:54 +0100)]
Check if package already exists before installing from checkout

* lisp/emacs-lisp/package-vc.el (package-vc-install-from-checkout):
Copy check from 'package-vc--unpack'.

21 months ago; Fix reference in docstring to 'package-vc-install-from-checkout'
Philip Kaludercic [Fri, 9 Dec 2022 18:49:44 +0000 (19:49 +0100)]
; Fix reference in docstring to 'package-vc-install-from-checkout'

* lisp/emacs-lisp/package-vc.el (package-vc-checkout): Fix reference.