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

2 years 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.

2 years 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.

2 years 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.

2 years 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.

2 years 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.

2 years 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.

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

2 years 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.

2 years 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.

2 years 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)

2 years 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'.

2 years 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`

2 years 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.

2 years 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.

2 years 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.

2 years 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.

2 years 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 $

2 years 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)

2 years 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.

2 years 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.

2 years 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.

2 years 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.

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

2 years 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

2 years 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.

2 years 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

2 years 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.

2 years 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

2 years 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...

2 years 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

2 years 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...

2 years 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

2 years 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.

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

2 years 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

2 years 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.

2 years 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.

2 years 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.

2 years 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'.

2 years 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

2 years 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.

2 years 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.

2 years 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.

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

2 years 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.

2 years 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).

2 years 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)

2 years 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.

2 years 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.

2 years 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.

2 years 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

2 years 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)

2 years 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.

2 years 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.

2 years 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.

2 years 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'.

2 years 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.

2 years 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)

2 years 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.

2 years 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.

2 years 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.

2 years 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.

2 years 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.

2 years 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.

2 years 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.

2 years 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.

2 years 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.

2 years 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

2 years 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.

2 years 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>.

2 years 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

2 years 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.

2 years 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

2 years 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.

2 years 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.

2 years ago* admin/notes/git-workflow: Replace emacs-28 by emacs-29 branch.
Michael Albinus [Fri, 9 Dec 2022 15:14:56 +0000 (16:14 +0100)]
* admin/notes/git-workflow: Replace emacs-28 by emacs-29 branch.

2 years 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)

2 years 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.

2 years 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.

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

2 years 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.

2 years 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.

2 years 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.)

2 years 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.

2 years 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

2 years 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.

2 years 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.

2 years 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.

2 years agoImprove some behavior when the X server does not trust Emacs
Po Lu [Fri, 9 Dec 2022 10:28:42 +0000 (18:28 +0800)]
Improve some behavior when the X server does not trust Emacs

* src/xterm.c (x_dnd_begin_drag_and_drop): Display error when
Emacs is untrusted instead of hanging indefinitely.
(x_focus_frame): Simply return instead of wasting time when
Emacs is untrusted.

2 years ago; * src/xterm.h: Fix minor copyedits
Po Lu [Fri, 9 Dec 2022 10:22:41 +0000 (18:22 +0800)]
; * src/xterm.h: Fix minor copyedits

2 years 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.

2 years 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.

2 years ago; Mention flush-lines in kill-matching-lines docstring
Stefan Kangas [Fri, 9 Dec 2022 10:05:34 +0000 (11:05 +0100)]
; Mention flush-lines in kill-matching-lines docstring

* lisp/replace.el (kill-matching-lines): Add cross-reference to
flush-lines.

2 years ago; Fix typos
Stefan Kangas [Fri, 9 Dec 2022 09:18:00 +0000 (10:18 +0100)]
; Fix typos

2 years ago; Improve use-package-autoload-keymap docstring
Stefan Kangas [Fri, 9 Dec 2022 05:55:48 +0000 (06:55 +0100)]
; Improve use-package-autoload-keymap docstring

* lisp/use-package/use-package-bind-key.el
(use-package-autoload-keymap): Improve docstring.

2 years agoMake eshell-read-aliases-list an interactive command
Sean Whitton [Fri, 9 Dec 2022 05:54:58 +0000 (22:54 -0700)]
Make eshell-read-aliases-list an interactive command

* lisp/eshell/em-alias.el (eshell-read-aliases-list): Add interactive
specification.  Note in docstring that the command is useful after
manually editing eshell-aliases-file.
* etc/NEWS:
* doc/misc/eshell.texi (Aliases): Document the change.

2 years agoMerge from origin/emacs-29
Stefan Kangas [Fri, 9 Dec 2022 05:30:26 +0000 (06:30 +0100)]
Merge from origin/emacs-29

5b640f0abd3 Improve :delight keyword example in use-package manual
c417fe4df3b ; Refer to the manual in use-package docstring
0b3116971af Clarify :after keyword in use-package docstring
a17a6036dd4 Add conditional loading examples to use-package manual

2 years agoImprove :delight keyword example in use-package manual
Stefan Kangas [Fri, 9 Dec 2022 05:27:33 +0000 (06:27 +0100)]
Improve :delight keyword example in use-package manual

* use-package.texi (Diminish, Delight): Clarify what happens if the
pre-requisite packages are not installed.  Change an example with
performance issues to one without any.

Resolves https://github.com/jwiegley/use-package/issues/835

2 years ago; Refer to the manual in use-package docstring
Stefan Kangas [Fri, 9 Dec 2022 04:12:51 +0000 (05:12 +0100)]
; Refer to the manual in use-package docstring

* lisp/use-package/use-package-core.el (use-package): Refer to manual.