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

21 months agoRefresh the package quickstart file in package-vc
Matt Armstrong [Wed, 30 Nov 2022 23:58:07 +0000 (15:58 -0800)]
Refresh the package quickstart file in package-vc

* lisp/emacs-lisp/package-vc.el (package-vc--unpack-1): Call
`package--quickstart-maybe-refresh', just as
`package-install-from-buffer' does.  (bug#59728)

21 months ago; * admin/notes/tree-sitter/starter-guide (Indent): Minor fix.
Yuan Fu [Sat, 10 Dec 2022 04:55:43 +0000 (20:55 -0800)]
; * admin/notes/tree-sitter/starter-guide (Indent): Minor fix.

21 months agoMake indirect buffers use tree-sitter parsers of their base buffer
Yuan Fu [Wed, 7 Dec 2022 22:50:16 +0000 (14:50 -0800)]
Make indirect buffers use tree-sitter parsers of their base buffer

Fix the problem described in bug#59693.

* src/treesit.c (treesit_record_change): Always use the base buffer.
(Ftreesit_parser_create): Always use the base buffer.  Also change the
for loop into FOR_EACH_TAIL (stylistic change).
(Ftreesit_parser_list): Always use the base buffer.

* doc/lispref/parsing.texi (Using Parser): Update manual.
* test/src/treesit-tests.el (treesit-indirect-buffer): New test.

21 months agoFontify "this" as a keyword in c++-ts-mode (bug#59924)
Brian Leung [Fri, 9 Dec 2022 11:09:31 +0000 (03:09 -0800)]
Fontify "this" as a keyword in c++-ts-mode (bug#59924)

* lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings):
Following c++-mode, fontify as a keyword instead of a constant.

21 months agoAdd class_body indentation for typescript (bug#59680)
Theodor Thornhill [Tue, 29 Nov 2022 15:12:18 +0000 (16:12 +0100)]
Add class_body indentation for typescript (bug#59680)

* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--indent-rules): New indent rule.

21 months agoMake more granular defun-type-regexp (bug#59873)
Theodor Thornhill [Wed, 7 Dec 2022 09:07:37 +0000 (10:07 +0100)]
Make more granular defun-type-regexp (bug#59873)

We don't want to match local_variable_declaration and others to hit on
beginning-of-defun.  The fix is just to make the regexp a bit more
granular.

* lisp/progmodes/java-ts-mode.el (java-ts-mode): Use regexp-opt to
distinguish more granularly.

21 months agoAdd dockerfile-ts-mode (Bug#59894)
Randy Taylor [Thu, 8 Dec 2022 01:53:35 +0000 (20:53 -0500)]
Add dockerfile-ts-mode (Bug#59894)

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

21 months agoFix fontification of method-invocations in js-ts-mode (bug#59904)
Jostein Kjønigsen [Thu, 8 Dec 2022 14:45:00 +0000 (15:45 +0100)]
Fix fontification of method-invocations in js-ts-mode (bug#59904)

* lisp/progmodes/js.el (js--treesit-font-lock-settings): Move rules
for property in front of function names, so function names override
property.

21 months agoFix escape-sequence feature in typescript-ts-mode (bug#59906)
Theodor Thornhill [Thu, 8 Dec 2022 15:17:49 +0000 (16:17 +0100)]
Fix escape-sequence feature in typescript-ts-mode (bug#59906)

* lisp/progmodes/typescript-ts-mode.el: (typescript-ts-mode,
tsx-ts-mode): Use escape-sequence feature.

21 months agoImprove fontification in csharp-ts-mode (bug#59909)
Jostein Kjønigsen [Thu, 8 Dec 2022 19:36:49 +0000 (20:36 +0100)]
Improve fontification in csharp-ts-mode (bug#59909)

- Fontity escape sequences.
- Highlight syntax errors.

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

21 months agoUse 'project--value-in-dir' for 'project-vc-include-untracked' too
Dmitry Gutov [Fri, 9 Dec 2022 21:21:10 +0000 (23:21 +0200)]
Use 'project--value-in-dir' for 'project-vc-include-untracked' too

* lisp/progmodes/project.el (project--vc-list-files): Use
'project--value-in-dir' for 'project-vc-include-untracked' too.
So that is can be reliably set through dir-locals.

21 months agoUpdate Turkish Hello
Eli Zaretskii [Fri, 9 Dec 2022 20:02:03 +0000 (22:02 +0200)]
Update Turkish Hello

* etc/HELLO (Turkish):
* lisp/language/european.el ("Turkish"): Add a Turkish Hello.
Suggested by YUSUF ALPER ÇIKIŞIR <yusufcikisir@std.iyte.edu.tr>.

21 months agoSupport newer glib versions (Bug#59061)
Philipp Stephani [Fri, 9 Dec 2022 18:32:14 +0000 (19:32 +0100)]
Support newer glib versions (Bug#59061)

* lib-src/seccomp-filter.c (main): Allow pidfd_open system call

21 months ago; * doc/misc/use-package.texi: Fix @file.
Eli Zaretskii [Fri, 9 Dec 2022 16:21:38 +0000 (18:21 +0200)]
; * doc/misc/use-package.texi: Fix @file.

21 months agoMerge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/emacs into emacs-29
Eli Zaretskii [Fri, 9 Dec 2022 16:21:31 +0000 (18:21 +0200)]
Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/emacs into emacs-29

21 months ago; * doc/misc/use-package.texi: Fix @acronym.
Eli Zaretskii [Fri, 9 Dec 2022 16:20:04 +0000 (18:20 +0200)]
; * doc/misc/use-package.texi: Fix @acronym.

21 months agoBring back the project--value-in-dir logic
Dmitry Gutov [Fri, 9 Dec 2022 16:15:49 +0000 (18:15 +0200)]
Bring back the project--value-in-dir logic

Essentialy revert commit 2389158a31b4a12, restoring the changes
and fixing the conflicts.  Motivated by the problem brought up in
bug#59722 (behavior of project-find-files/regexp when switching
projects).  We should find other ways to improve performance.

* lisp/progmodes/project.el
(project--value-in-dir, project--vc-merge-submodules-p): Restore.
(project-try-vc, project-files, project--vc-list-files)
(project-ignores, project-buffers): Use.

* test/lisp/progmodes/project-tests.el
(project-vc-supports-project-in-different-dir): New test.

* test/lisp/progmodes/project-resources/.dir-locals.el:
* test/lisp/progmodes/project-resources/foo:
* test/lisp/progmodes/project-resources/etc: New files.

21 months agoBackport: Enable native speed 2 EMBA build and tests and disable speed 0
Andrea Corallo [Thu, 8 Dec 2022 15:40:54 +0000 (16:40 +0100)]
Backport: Enable native speed 2 EMBA build and tests and disable speed 0

* test/infra/gitlab-ci.yml (build-native-comp-speed2): Uncomment.
(build-native-comp-speed0): Comment.
(test-native-comp-speed0): Remove.
(test-native-comp-speed2): Add.

(cherry picked from commit 06bf218f69a62d5d5c8d3b3767d7db8d9fb4bb9f)

21 months ago* test/infra/test-jobs.yml: Regenerate for the new use-package subdirectory.
Michael Albinus [Fri, 9 Dec 2022 14:53:49 +0000 (15:53 +0100)]
* test/infra/test-jobs.yml: Regenerate for the new use-package subdirectory.

21 months agoAdapt manual names in emacs-news-mode
Michael Albinus [Fri, 9 Dec 2022 14:53:00 +0000 (15:53 +0100)]
Adapt manual names in emacs-news-mode

* lisp/textmodes/emacs-news-mode.el (emacs-news--buttonize):
Allow hyphen in manual names.

21 months ago; * etc/NEWS: Fix typos.
Michael Albinus [Fri, 9 Dec 2022 14:51:48 +0000 (15:51 +0100)]
; * etc/NEWS: Fix typos.

21 months ago; * doc/misc/use-package.texi: Fix indexing.
Eli Zaretskii [Fri, 9 Dec 2022 14:50:13 +0000 (16:50 +0200)]
; * doc/misc/use-package.texi: Fix indexing.

21 months ago; * lisp/erc/erc.el (erc-default-target): Fix comment.
F. Jason Park [Fri, 9 Dec 2022 14:26:13 +0000 (06:26 -0800)]
; * lisp/erc/erc.el (erc-default-target): Fix comment.

21 months agoRespect some spaces in auth-source-pass--match-regexp
F. Jason Park [Fri, 25 Nov 2022 05:03:03 +0000 (21:03 -0800)]
Respect some spaces in auth-source-pass--match-regexp

* lisp/auth-source-pass.el (auth-source-pass--match-regexp): Allow an
entry's host and user fields to contain spaces, just like other
backends do.
* lisp/erc/erc-compat.el
(erc-compat--29-auth-source-pass--retrieve-parsed): Change regexp to
allow spaces in host and user components of file names.
* test/lisp/auth-source-pass-tests.el (auth-source-pass-any-host):
Silence warning message re wildcards emitted by
`auth-source-pass-search'.
(auth-source-pass-extra-query-keywords--suffixed-user): Add spaces
to users and hosts of some example entries.  (Bug#58985.)

21 months ago; Improve the use-package manual
Eli Zaretskii [Fri, 9 Dec 2022 14:32:59 +0000 (16:32 +0200)]
; Improve the use-package manual

* doc/misc/use-package.texi (Top, Basic Concepts)
(Getting Started, Loading Packages, Loading basics)
(Deferring loading, Forcing loading, Conditional loading)
(Loading sequentially, Load dependencies, Load path)
(Manual autoloads, Configuring Packages, Lisp Configuration)
(Preface keyword, Init keyword, Best practices, Key bindings)
(Global keybindings, Binding in keymaps, Binding to a keymap)
(Binding to repeat-maps, Displaying keybindings)
(Modes and interpreters, Magic handlers, User options, Faces)
(Delight, Diminish, Install package, Pinning packages)
(Other package managers, Byte-compiling, Troubleshooting)
(Troubleshooting Options, Gathering Statistics)
(Disabling a package, Keyword extensions)
(use-package-ensure-system-package, Creating an extension): Fix
wording, punctuation, typos, and markup; add indexing.  Add
@group..@end group in code examples.

21 months ago; Prefer HTTPS to HTTP in some URLs
Stefan Kangas [Fri, 9 Dec 2022 14:31:41 +0000 (15:31 +0100)]
; Prefer HTTPS to HTTP in some URLs

21 months agoEglot: Handle LSP progress with Emacs progress reporters (bug#59149)
dannyfreeman [Fri, 9 Dec 2022 12:49:26 +0000 (12:49 +0000)]
Eglot: Handle LSP progress with Emacs progress reporters (bug#59149)

Co-authored-by: João Távora <joaotavora@gmail.com>
* lisp/progmodes/eglot.el (eglot-report-progress): New custom variable.
(eglot-lsp-server): New slot for tracking active progress reporters.
(eglot-handle-notification (eql $/progress)): New method.

The LSP spec describes methods for reporting progress on long running
jobs to the client:

https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#progress
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#workDoneProgress

This change reports those notifications in the minibuffer as they come
in.  It shows a percent indicator (if the server provides theme), or a
spinner.

This change could open the door for writing a "cancel long running
request" command, which are identified by these progress
notifications.  See
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#window_workDoneProgress_cancel

* doc/misc/eglot.texi (Customizing Eglot): Describe new variable.

21 months agoEglot: cleanup whitespace and indentation
dannyfreeman [Fri, 9 Dec 2022 11:40:53 +0000 (11:40 +0000)]
Eglot: cleanup whitespace and indentation

Co-authored-by: João Távora <joaotavora@gmail.com>
* lisp/progmodes/eglot: Misc whitespace fixes.

21 months agoBetter test-custom-opts diagnostics
Mattias Engdegård [Fri, 9 Dec 2022 11:04:01 +0000 (12:04 +0100)]
Better test-custom-opts diagnostics

Make it easier to understand errors from the test-custom-opts test by
reporting variable values and types that didn't match.

* admin/cus-test.el (cus-test-errors): Richer contents.
(cus-test--format-error): New.
(cus-test-apropos, cus-test-errors-display, cus-test-opts):
Use new format.

21 months ago; Fix groff warnings in man pages
Stefan Kangas [Sun, 27 Nov 2022 23:00:11 +0000 (00:00 +0100)]
; Fix groff warnings in man pages

This fixes check-man-pages warnings such as:
troff: doc/man/etags.1:203: warning: escape character ignored before '='

* doc/man/etags.1: Fix groff warnings.

21 months agoNew script admin/check-man-pages
Stefan Kangas [Sun, 27 Nov 2022 17:37:37 +0000 (18:37 +0100)]
New script admin/check-man-pages

* admin/check-man-pages: New file with script used to check man pages
for errors.  (Bug#59631)
* admin/make-tarball.txt: Document when to use the above script.