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

21 months 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.

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

21 months 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.

21 months 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

21 months 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.

21 months agoClarify :after keyword in use-package docstring
Stefan Kangas [Fri, 9 Dec 2022 04:12:03 +0000 (05:12 +0100)]
Clarify :after keyword in use-package docstring

* lisp/use-package/use-package-core.el (use-package): Clarify the
effect of :after in docstring.

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

21 months agoAdd conditional loading examples to use-package manual
Stefan Kangas [Fri, 9 Dec 2022 03:15:32 +0000 (04:15 +0100)]
Add conditional loading examples to use-package manual

* doc/misc/use-package.texi (Conditional loading): Expand section with
examples.

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

21 months agoRevert "; * src/emacs.c (main): Improvements to last change."
Po Lu [Fri, 9 Dec 2022 01:25:42 +0000 (09:25 +0800)]
Revert "; * src/emacs.c (main): Improvements to last change."

This reverts commit c774e83e36784ab96539c5c083b3bcb6d0158a8c.  It
causes crashes on GNU/Linux systems using libgmp, as there a shared
library initializer is used to set the malloc functions on startup, so
they are not dumped.

21 months agoserver-eval-at: Don't call server--file-name
Sean Whitton [Thu, 8 Dec 2022 23:29:44 +0000 (16:29 -0700)]
server-eval-at: Don't call server--file-name

* lisp/server.el (server-eval-at): Revert to old code for determining
the server file.  The recent change to call server--file-name meant
that the SERVER argument to server-eval-at was ignored.

21 months ago; Improve use-package Commentary sections
Stefan Kangas [Thu, 8 Dec 2022 23:24:15 +0000 (00:24 +0100)]
; Improve use-package Commentary sections

* lisp/use-package/bind-key.el:
* lisp/use-package/use-package-bind-key.el:
* lisp/use-package/use-package-core.el:
* lisp/use-package/use-package-ensure-system-package.el:
* lisp/use-package/use-package-ensure.el:
* lisp/use-package/use-package.el: Improve Commentary sections.

21 months ago; Don't say to require bind-key in use-package manual
Stefan Kangas [Thu, 8 Dec 2022 23:18:49 +0000 (00:18 +0100)]
; Don't say to require bind-key in use-package manual

* doc/misc/use-package.texi (Getting Started): Remove instruction to
require 'bind-key'; it is already required by 'use-package' and the
entry points are autoloaded.

21 months ago; Normalize GPLv3 license statements in new files
Stefan Kangas [Thu, 8 Dec 2022 22:56:24 +0000 (23:56 +0100)]
; Normalize GPLv3 license statements in new files

21 months agoMerge branch 'feature/use-package' into emacs-29
Stefan Kangas [Thu, 8 Dec 2022 17:01:30 +0000 (18:01 +0100)]
Merge branch 'feature/use-package' into emacs-29

21 months ago* etc/USE-PACKAGE-NEWS: Delete file. feature/use-package
Stefan Kangas [Thu, 8 Dec 2022 17:00:19 +0000 (18:00 +0100)]
* etc/USE-PACKAGE-NEWS: Delete file.

Ref: https://lists.gnu.org/r/emacs-devel/2022-11/msg01535.html

21 months ago* admin/git-bisect-start: Prune use-package merge commits.
Stefan Kangas [Thu, 8 Dec 2022 16:49:30 +0000 (17:49 +0100)]
* admin/git-bisect-start: Prune use-package merge commits.

21 months ago; Minor doc fixes in bind-key.el
Stefan Kangas [Thu, 8 Dec 2022 16:14:31 +0000 (17:14 +0100)]
; Minor doc fixes in bind-key.el

* lisp/use-package/bind-key.el (bind-key-segregation-regexp)
(bind-key): Minor doc fixes.

21 months agoUpdate use-package defgroups
Stefan Kangas [Thu, 8 Dec 2022 16:10:47 +0000 (17:10 +0100)]
Update use-package defgroups

* lisp/use-package/bind-key.el (bind-key):
* lisp/use-package/use-package-core.el (use-package):
* lisp/use-package/use-package-ensure.el (use-package-ensure): Add
:link, :version and :group to defgroups.

21 months agoDrop key-chord.el support from use-package
Stefan Kangas [Thu, 8 Dec 2022 00:12:02 +0000 (01:12 +0100)]
Drop key-chord.el support from use-package

* lisp/use-package/bind-chord.el:
* lisp/use-package/use-package-chords.el:
* test/lisp/use-package/use-package-chords-tests.el: Delete files.
* doc/misc/use-package.texi (use-package-chords): Delete section.
Ref: https://lists.gnu.org/r/emacs-devel/2022-12/msg00052.html

21 months ago; lisp/progmodes/java-ts-mode.el: Fix more typos.
Stefan Kangas [Thu, 8 Dec 2022 15:51:59 +0000 (16:51 +0100)]
; lisp/progmodes/java-ts-mode.el: Fix more typos.

21 months ago; * lisp/progmodes/java-ts-mode.el (java-ts-mode--keywords): Fix typo.
Eli Zaretskii [Thu, 8 Dec 2022 15:49:55 +0000 (17:49 +0200)]
; * lisp/progmodes/java-ts-mode.el (java-ts-mode--keywords): Fix typo.

21 months agoRemove unneeded (require 'edebug) from which-func.el
Juanma Barranquero [Thu, 8 Dec 2022 12:00:34 +0000 (13:00 +0100)]
Remove unneeded (require 'edebug) from which-func.el

* lisp/progmodes/which-func.el: Don't require edebug.  This is
code from an attempted fix to bug#49592, installed in 55cc8b040b
(2022-08-08) and left behind after 48b0f2606b (2022-08-23).

21 months agoChange use-package custom :group to `initialization`
Stefan Kangas [Thu, 8 Dec 2022 07:48:24 +0000 (08:48 +0100)]
Change use-package custom :group to `initialization`

* lisp/use-package/use-package-core.el (use-package): Move
defgroup to custom :group 'initialization'.

21 months ago; Fix typos
Stefan Kangas [Tue, 6 Dec 2022 15:55:39 +0000 (16:55 +0100)]
; Fix typos

21 months agoTreat escaped newlines in Eshell as the empty string
Jim Porter [Sat, 26 Nov 2022 19:52:18 +0000 (11:52 -0800)]
Treat escaped newlines in Eshell as the empty string

This fixes a regression introduced during Emacs 29's development.

* lisp/eshell/esh-arg.el (eshell-parse-argument): Handle
'eshell-empty-token' as the result of an argument-parsing hook.
(eshell-parse-argument-hook): Document 'eshell-empty-token'.
(eshell-parse-backslash): Return 'eshell-empty-token' when
encountering an escaped newline.

* test/lisp/eshell/eshell-tests.el (eshell-test/escape-nonspecial)
(eshell-test/escape-nonspecial-unicode)
(eshell-test/escape-nonspecial-quoted)
(eshell-test/escape-special-quoted): Move from here...

* test/lisp/eshell/esh-arg-tests.el (esh-arg-test/escape/nonspecial)
(esh-arg-test/escape/nonspecial-unicode)
(esh-arg-test/escape-quoted/nonspecial)
(esh-arg-test/escape-quoted/special): ... to here.
(esh-arg-test/escape/special, esh-arg-test/escape/newline)
(esh-arg-test/escape-quoted/newline): New tests.

* doc/misc/eshell.texi (Arguments): Explain escaping logic in more
detail (bug#59622).

21 months ago; Document use-package-reset-statistics
Stefan Kangas [Thu, 8 Dec 2022 05:36:44 +0000 (06:36 +0100)]
; Document use-package-reset-statistics

* doc/misc/use-package.texi (Gathering Statistics): Document
use-package-reset-statistics.

21 months ago; use-package: Improve :ensure-system-package docstrings
Stefan Kangas [Thu, 8 Dec 2022 05:27:22 +0000 (06:27 +0100)]
; use-package: Improve :ensure-system-package docstrings

* lisp/use-package/use-package-ensure-system-package.el
(use-package-ensure-system-package--custom-packages)
(use-package-ensure-system-package-consify)
(use-package-ensure-system-package-update-custom-packages)
(use-package-normalize/:ensure-system-package)
(use-package-ensure-system-package-exists?): Improve docstrings.

21 months agouse-package: Improve :mode keyword documentation
Stefan Kangas [Thu, 8 Dec 2022 01:25:53 +0000 (02:25 +0100)]
use-package: Improve :mode keyword documentation

* doc/misc/use-package.texi (Modes and interpreters): Improve
section and document the use of a list of regexps.

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

21 months agoImprove bind-keys* and override-global-mode docstrings
Stefan Kangas [Thu, 8 Dec 2022 01:00:13 +0000 (02:00 +0100)]
Improve bind-keys* and override-global-mode docstrings

* lisp/use-package/bind-key.el (bind-keys*): Add docstring.
(override-global-mode) Improve docstring.

21 months ago; * src/emacs.c (main): Improvements to last change.
Po Lu [Thu, 8 Dec 2022 00:55:36 +0000 (08:55 +0800)]
; * src/emacs.c (main): Improvements to last change.

21 months agoFix crash on Windows 9X
Po Lu [Tue, 6 Dec 2022 01:30:00 +0000 (09:30 +0800)]
Fix crash on Windows 9X

* src/emacs.c (main): Call init_bignum before init_window_once.

21 months ago; * doc/misc/use-package.texi: Improve indexing.
Stefan Kangas [Thu, 8 Dec 2022 00:49:04 +0000 (01:49 +0100)]
; * doc/misc/use-package.texi: Improve indexing.

21 months agoAdd recursion limit to treesit--children-covering-range-recurse
Yuan Fu [Thu, 8 Dec 2022 00:36:07 +0000 (16:36 -0800)]
Add recursion limit to treesit--children-covering-range-recurse

* lisp/treesit.el (treesit--children-covering-range-recurse): Add
limit.

21 months agoImprove tree-sitter fontification in edge-cases (bug#59738)
Yuan Fu [Thu, 8 Dec 2022 00:02:53 +0000 (16:02 -0800)]
Improve tree-sitter fontification in edge-cases (bug#59738)

* lisp/treesit.el (treesit-font-lock-fontify-region): Use
treesit--children-covering-range-recurse.

21 months agoAdd new use-package manual
Stefan Kangas [Wed, 7 Dec 2022 23:47:04 +0000 (00:47 +0100)]
Add new use-package manual

* doc/misc/use-package.texi: Rewrite manual.

21 months agoAdd c-ts-mode-indent-defun (bug#59662)
Theodor Thornhill [Fri, 2 Dec 2022 15:05:35 +0000 (16:05 +0100)]
Add c-ts-mode-indent-defun (bug#59662)

Add in this function to mimic 'c-indent-defun'.

* lisp/progmodes/c-ts-mode.el (c-ts-mode-indent-defun): New function.
(c-ts-mode-map): New mode map that uses said function.

21 months agoFix syntax-table for tree-sitter modes
Theodor Thornhill [Mon, 5 Dec 2022 12:37:58 +0000 (13:37 +0100)]
Fix syntax-table for tree-sitter modes

When adapting the 'c-populate-syntax-table' for tree-sitter, I misread
the code, and thus some crucial entries were missing.  For the
relevant modes we use the same table as specified in the
non-tree-sitter major mode.

* lisp/progmodes/c-ts-mode.el (c-ts-mode--syntax-table): Add new
entries.
* lisp/progmodes/csharp-mode.el (csharp-ts-mode): Add new entries.
* lisp/progmodes/java-ts-mode.el (java-ts-mode--syntax-table): Add new
entries.
* lisp/progmodes/json-ts-mode.el (json-ts-mode--syntax-table): Add new
entries.
* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--syntax-table): Add new entries.
* lisp/textmodes/css-mode.el (css-ts-mode): Add new entries.

21 months agoc++-ts-mode: Highlight nullptr as a constant
Brian Leung [Wed, 7 Dec 2022 10:12:05 +0000 (02:12 -0800)]
c++-ts-mode: Highlight nullptr as a constant

* lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings): Add
nullptr.

21 months agoImprove parameter checking in tree-sitter functions
Yuan Fu [Wed, 7 Dec 2022 03:56:25 +0000 (19:56 -0800)]
Improve parameter checking in tree-sitter functions

* src/treesit.c (treesit_check_position): Extract out new function.
(Ftreesit_node_first_child_for_pos)
(Ftreesit_node_descendant_for_range): Replace code with the new
function.
(Ftreesit_query_capture): Add missing check for node and parser.  Add
check for range for BEG and END.  Move treesit_initialize to the
beginning of the function.

* test/src/treesit-tests.el (treesit-node-api)
(treesit-query-api): Add tests for out-of-range error.

21 months ago; * test/lisp/comint-tests.el (w32-application-type): Fix typo.
Eli Zaretskii [Wed, 7 Dec 2022 19:52:00 +0000 (21:52 +0200)]
; * test/lisp/comint-tests.el (w32-application-type): Fix typo.

21 months agoFix comint-tests on MS-Windows
Eli Zaretskii [Wed, 7 Dec 2022 19:23:42 +0000 (21:23 +0200)]
Fix comint-tests on MS-Windows

* test/lisp/comint-tests.el (comint-tests/test-password-function):
On MS-Windows, call 'w32-native-executable-find' instead of
'executable-find', to find the native version of the 'cat'
program.
(w32-native-executable-p, w32-native-executable-find): New
functions.

21 months agoUse new external-completion.el in Eglot
João Távora [Wed, 7 Dec 2022 10:59:30 +0000 (10:59 +0000)]
Use new external-completion.el in Eglot

This refactor simplifies Eglot's source code.

* lisp/progmodes/eglot.el:
(Package-Requires): Require external-completion.
(external-completion): Require it.
(xref-backend-identifier-completion-table): Use external-completion-table.
(completion-category-overrides): No longer set it.
("Backend Completion"): Delete section.

21 months agoDon't override completion-category-defaults in fido-mode
João Távora [Wed, 7 Dec 2022 10:43:59 +0000 (10:43 +0000)]
Don't override completion-category-defaults in fido-mode

To more closely emulate ido-mode, fido-mode and fido-vertical-mode
strongly lean to the 'flex completion style.  But overriding
completion-category-defaults is not the correct way to do it, since
sometimes even the 'flex style isn't possible.

* lisp/icomplete.el (icomplete--fido-mode-setup): Don't set
completion-category-defaults here.

21 months agoAdd lisp/external-completion.el for completions from external tools
João Távora [Fri, 25 Nov 2022 13:03:45 +0000 (13:03 +0000)]
Add lisp/external-completion.el for completions from external tools

This table uses a new 'external' completion style which has been in
use in Eglot and other third-party extensions for a long time.  It's
meant for libraries that interface with an external tool which
provides completions, such as a shell utility, an inferior process, an
http server.

The new file lisp/external-completion.el provides a helper function,
external-completion-table which is given an interfacing function to
the external tool and returns a "programmed completion" table that is
bound to the 'external' completion style.  That table can then be used
with completing-read or any other facility expecting a completion
table.

When the 'external' is in use, the usual styles configured by the user
or other in 'completion-styles' are completely overriden.  This
relatively minor inconvenience is the price to pay for responsive
completion where the full set of completion candidates doesn't need to
be transfered into Emacs's address space.

* lisp/external-completion.el: New file.

* etc/NEWS: (Lisp Changes in Emacs 29.1): Mention
  external-completion-table.

21 months agoEglot: fix setting of flymake-list-only-diagnostics (bug#59824)
João Távora [Wed, 7 Dec 2022 11:30:34 +0000 (11:30 +0000)]
Eglot: fix setting of flymake-list-only-diagnostics (bug#59824)

When Eglot receives diagnostics for a file not yet visited in Emacs,
it stores them in flymake-list-only-diagnostics, which feed M-x
flymake-show-project-diagnostics.  If the file is eventually visited
in a buffer and Eglot starts receibing diagnostics for it, the
flymake-list-only-diagnostics database has to be updated accordingly,
since the previous diagnostics are now stale.

* lisp/progmodes/eglot.el (eglot-handle-notification): Reset
flymake-list-only-diagnostics

21 months ago* test/src/sqlite-tests.el (sqlite-version): Declare.
Mattias Engdegård [Tue, 6 Dec 2022 21:21:00 +0000 (22:21 +0100)]
* test/src/sqlite-tests.el (sqlite-version): Declare.

21 months agoEUDC: Outline deprecation plans in NEWS
Thomas Fitzsimmons [Wed, 7 Dec 2022 02:41:51 +0000 (21:41 -0500)]
EUDC: Outline deprecation plans in NEWS

* etc/NEWS (EUDC): Mention deprecation plans.

21 months agoFix admin/notes/tree-sitter/build-module/build.sh (bug#59789)
Yuan Fu [Tue, 6 Dec 2022 23:55:14 +0000 (15:55 -0800)]
Fix admin/notes/tree-sitter/build-module/build.sh (bug#59789)

Besides the problem mentioned by Juri, which is fixed by removing

-cp tree-sitter-lang.in "tree-sitter-${lang}/src"
-cp emacs-module.h "tree-sitter-${lang}/src"

(we removed those files in an earlier commit, because they are not
used anymore.)

Now it also more parameterized and builds typescript and tsx
separately.

* admin/notes/tree-sitter/build-module/build.sh (topdir)
(repo, sourcedir, grammardir): New variables.
(Build): Make it parametric.
(Copy out): Use absolute path.

* admin/notes/tree-sitter/build-module/batch.sh (languages): Add tsx.

21 months ago* doc/misc/eww.texi (Overview): Improve introduction.
Stefan Kangas [Wed, 7 Dec 2022 00:02:48 +0000 (01:02 +0100)]
* doc/misc/eww.texi (Overview): Improve introduction.

21 months agoConsistent fontification of using-directives in csharp-ts-mode
Jostein Kjønigsen [Tue, 6 Dec 2022 08:40:03 +0000 (09:40 +0100)]
Consistent fontification of using-directives in csharp-ts-mode

* lisp/progmodes/csharp-mode.el (csharp-ts-mode--font-lock-settings):
New rules.

21 months ago; Rename c-ts-fontify-error to c-ts-mode--fontify-error
Yuan Fu [Tue, 6 Dec 2022 08:26:51 +0000 (00:26 -0800)]
; Rename c-ts-fontify-error to c-ts-mode--fontify-error

* lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings)
(c-ts-fontify-error): Rename.

21 months ago; Improve docstring of c-ts-mode--fontify-variable
Yuan Fu [Tue, 6 Dec 2022 08:17:04 +0000 (00:17 -0800)]
; Improve docstring of c-ts-mode--fontify-variable

* lisp/progmodes/c-ts-mode.el (c-ts-mode--fontify-variable): Improve
docstring.

21 months agoFontify some keywords in type face in c-ts-mode
Yuan Fu [Tue, 6 Dec 2022 08:15:30 +0000 (00:15 -0800)]
Fontify some keywords in type face in c-ts-mode

* lisp/progmodes/c-ts-mode.el (c-ts-mode--keywords): Remove some keywords.
(c-ts-mode--type-keywords): New variables.
(c-ts-mode--font-lock-settings): New rule.

21 months ago; Minor cleanup in treesit.c
Eli Zaretskii [Tue, 6 Dec 2022 17:28:02 +0000 (19:28 +0200)]
; Minor cleanup in treesit.c

* src/treesit.c (Ftreesit_query_capture)
(Ftreesit_parser_set_included_ranges): Minor cleanups.

21 months ago; * lib-src/etags.c (escape_shell_arg_string): Minor doc fix.
Stefan Kangas [Tue, 6 Dec 2022 17:05:08 +0000 (18:05 +0100)]
; * lib-src/etags.c (escape_shell_arg_string): Minor doc fix.

21 months agoFix etags builds on non-Windows non-MS-DOS machines
Mattias Engdegård [Tue, 6 Dec 2022 16:37:22 +0000 (17:37 +0100)]
Fix etags builds on non-Windows non-MS-DOS machines

* lib-src/etags.c: In this file, MSDOS is always defined but can be
either `true` or `false`, so don't used `defined MSDOS` as a condition.

21 months ago; Fix last change in etags.c.
Eli Zaretskii [Tue, 6 Dec 2022 16:13:41 +0000 (18:13 +0200)]
; Fix last change in etags.c.

21 months agoFix etags local command injection vulnerability
lu4nx [Tue, 6 Dec 2022 07:42:40 +0000 (15:42 +0800)]
Fix etags local command injection vulnerability

* lib-src/etags.c: (escape_shell_arg_string): New function.
(process_file_name): Use it to quote file names passed to the
shell.  (Bug#59817)

21 months agoAvoid crashes in a build --without-modules
Eli Zaretskii [Tue, 6 Dec 2022 15:15:35 +0000 (17:15 +0200)]
Avoid crashes in a build --without-modules

* src/lread.c (syms_of_lread): Move the definitions of
'dynamic-library-suffixes' outside of the HAVE_MODULES
conditional.  (Bug#59832)

21 months agoFix 'add-display-text-property' when OBJECT is non-nil
Eli Zaretskii [Tue, 6 Dec 2022 12:41:36 +0000 (14:41 +0200)]
Fix 'add-display-text-property' when OBJECT is non-nil

* lisp/emacs-lisp/subr-x.el (add-display-text-property): Fix the
case where OBJECT is not nil.  (Bug#59857)

* test/lisp/emacs-lisp/subr-x-tests.el
(subr-x-test-add-display-text-property): Add test for this case.

21 months agoDo not run slow tests on EMBA
Michael Albinus [Tue, 6 Dec 2022 11:36:15 +0000 (12:36 +0100)]
Do not run slow tests on EMBA

* test/infra/gitlab-ci.yml (.filenotify-gio-template): Do not run
scheduled.
(build-native-comp-speed1, build-native-comp-speed2): Comment out.

* test/lisp/international/ucs-normalize-tests.el
(ucs-normalize-part1): Skip also on EMBA.

21 months agoLisp reader undefined behaviour excision
Mattias Engdegård [Tue, 6 Dec 2022 11:13:18 +0000 (12:13 +0100)]
Lisp reader undefined behaviour excision

* src/lread.c (read_bool_vector, skip_lazy_string):
Replace `|` with `||` to explicitly introduce sequence points since
the variables, `length` and `nskip`, are mutated more than once.

The `|` was just a weak attempt at micro-optimisation in any case;
sorry about that.

21 months ago; Fix typo in js--treesit-imenu
Randy Taylor [Tue, 6 Dec 2022 01:30:56 +0000 (20:30 -0500)]
; Fix typo in js--treesit-imenu

* lisp/progmodes/js.el (js--treesit-imenu): Fix a typo.  (Bug#59849)

21 months agoFix treesit-query-capture
Yuan Fu [Tue, 6 Dec 2022 02:37:47 +0000 (18:37 -0800)]
Fix treesit-query-capture

Before this change Ftreesit_query_capture doesn't convert character
position to byte position for BEG and END parameters.  I observed
fontification issue in css files but couldn't figure out why, now I
know :-)

I decide to keep treesit--font-lock-query-expand-range, since it might
provide a escape hatch for problems we discover in the future, and it
should be very cheap so no downside of keeping it.

* lisp/textmodes/css-mode.el (css-ts-mode): Stop setting
treesit--font-lock-query-expand-range.
* lisp/treesit.el (treesit--font-lock-query-expand-range): Update
docstring.
* src/treesit.c (Ftreesit_query_capture): Convert BEG and END to byte
position.  Also added parentheses wround "beg_byte - visible_beg" in
the call to ts_query_cursor_set_byte_range (i.e., style change).

21 months agoImprove fontification of typescript-ts-mode (bug#59831)
Jostein Kjønigsen [Mon, 5 Dec 2022 08:31:58 +0000 (09:31 +0100)]
Improve fontification of typescript-ts-mode (bug#59831)

- Highlight property and field definitions in class declaration.
- Highlight property-keys in object initializaters.
- Highlight variable-names in function/method return-statements.

* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--font-lock-settings): Add fontification rules.

21 months agoAdd back pair feature in json-ts-mode fontification (bug#59833)
Theodor Thornhill [Mon, 5 Dec 2022 14:59:41 +0000 (15:59 +0100)]
Add back pair feature in json-ts-mode fontification (bug#59833)

* lisp/progmodes/json-ts-mode.el (json-ts-mode--font-lock-settings):
Add back in removed pair feature.  Also alphabetize features.
(json-ts-mode): Use the new feature.

21 months agoFix mouse clicks on a non-selected frame
Eli Zaretskii [Mon, 5 Dec 2022 19:55:25 +0000 (21:55 +0200)]
Fix mouse clicks on a non-selected frame

* lisp/mouse-drag.el (mouse-drag-drag): Skip switch-frame events
while tracking mouse.  (Bug#59785)

21 months ago; Clarify description of display on the margins
Eli Zaretskii [Mon, 5 Dec 2022 19:45:01 +0000 (21:45 +0200)]
; Clarify description of display on the margins

* doc/lispref/display.texi (Display Margins): More accurate
explanation of how to show text in the display margin without
concealing buffer text.  (Bug#59841)

21 months agoImprove treesit-fontify-with-override
Yuan Fu [Sun, 4 Dec 2022 08:22:28 +0000 (00:22 -0800)]
Improve treesit-fontify-with-override

This also fixes fontification problem with c-ts-mode--fontify-defun.

Now treesit-fontify-with-override clips the fontification region for
the user, so no need for (max start node-start) shenanigans anymore.
More importantly it doesn't fontify unless the region between
node-start and node-end intersects with the region between start and
end, which fixes the problem with c-ts-mode--fontify-defun.

* lisp/treesit.el (treesit-fontify-with-override): Add optional
parameter BOUND-START and BOUND-END.  Wrap the function body in a
when-form.
* lisp/progmodes/c-ts-mode.el (c-ts-mode--fontify-declarator)
(c-ts-mode--fontify-variable)
(c-ts-mode--fontify-defun)
(c-ts-fontify-error)
* lisp/progmodes/js.el (js--fontify-template-string)
* lisp/progmodes/python.el (python--treesit-fontify-string): Use the
new signature.

21 months agoMake killing a non-last client work the same no matter the auto-stop setting
Jim Porter [Fri, 2 Dec 2022 20:14:50 +0000 (12:14 -0800)]
Make killing a non-last client work the same no matter the auto-stop setting

Previously, if 'server-stop-automatically' was configured for
'kill-terminal' or 'delete-frame', killing a client via
'save-buffers-kill-terminal' wouldn't prompt about the saving files in
the client's buffer list (as it does when not using those settings).
This change ensures that those settings only apply when killing the
last client, as described in the manual (bug#51993).

* lisp/server.el (server-save-buffers-kill-terminal): Handle
'server-stop-automatically' behavior in this function, rather than
calling 'server-stop-automatically--handle-delete-frame'.

21 months agoUse the function 'window-system' on the tab-bar/tab-line (bug#59620)
Juri Linkov [Sun, 4 Dec 2022 19:30:34 +0000 (21:30 +0200)]
Use the function 'window-system' on the tab-bar/tab-line (bug#59620)

* lisp/tab-bar.el (tab-bar-separator)
(tab-bar-format-align-right, tab-bar-auto-width):
* lisp/tab-line.el (tab-line-format-template): Replace the variable
'window-system' with the function call '(window-system)'.

21 months agoRestore font-lock-type-face for lisp mode &symbols
Tom Gillespie [Sun, 4 Dec 2022 06:41:15 +0000 (22:41 -0800)]
Restore font-lock-type-face for lisp mode &symbols

* lisp/emacs-lisp/lisp-mode.el (lisp-cl-font-lock-keywords-2)
(lisp-el-font-lock-keywords-2): Restore use of type face instead of
builtin face for &symbol keywords.  This fixes what appears to be
a copy paste error that changed the face for common lisp and emacs
lisp &symbol style keywords that was introduced in commit
a498e5f83 by restoring the type face to font-lock-type-face as
consistent with the comments.

21 months agoPrevent a segfault when deleting a fullscreen frame on NextStep.
Kai Ma [Sat, 3 Dec 2022 10:17:26 +0000 (18:17 +0800)]
Prevent a segfault when deleting a fullscreen frame on NextStep.

* nsterm.m ([EmacsView resetCursorRects:]): Be defensive when
accessing FRAME_OUTPUT_DATA.  [resetCursorRects:] can be called
from the event loop after the frame is deleted.  When this
happens, emacsframe is NULL.  This means there is an underlying
leak of the EmacsView object!  (Bug#59794)
Do not merge to master.

Copyright-paperwork-exempt: yes

21 months ago; * lisp/pcomplete.el (pcomplete-allow-modifications): Fix a typo.
Eli Zaretskii [Sun, 4 Dec 2022 12:42:07 +0000 (14:42 +0200)]
; * lisp/pcomplete.el (pcomplete-allow-modifications): Fix a typo.

21 months agoFix markup in ERC manual
Eli Zaretskii [Sun, 4 Dec 2022 12:31:50 +0000 (14:31 +0200)]
Fix markup in ERC manual

* doc/misc/erc.texi (SASL): Use @table instead of simulating it
with @indentedblock.  Fix markup.  (Bug#59815)

21 months agoFix comment-start-skip in tree-sitter modes (bug#59690)
Yuan Fu [Sat, 3 Dec 2022 01:03:21 +0000 (17:03 -0800)]
Fix comment-start-skip in tree-sitter modes (bug#59690)

* lisp/progmodes/c-ts-mode.el (c-ts-mode)
(c++-ts-mode)
* lisp/progmodes/csharp-mode.el (csharp-ts-mode)
* lisp/progmodes/java-ts-mode.el (java-ts-mode)
* lisp/progmodes/js.el (js-ts-mode)
* lisp/progmodes/typescript-ts-mode.el (tsx-ts-mode): Remove the group
from the regexp.

21 months ago; * lisp/treesit.el (treesit-end-of-defun): Guard against nil value.
Yuan Fu [Fri, 2 Dec 2022 05:19:14 +0000 (21:19 -0800)]
; * lisp/treesit.el (treesit-end-of-defun): Guard against nil value.

21 months ago; * lisp/subr.el (posn-col-row): Revert inadvertent change.
Eli Zaretskii [Sat, 3 Dec 2022 20:09:16 +0000 (22:09 +0200)]
; * lisp/subr.el (posn-col-row): Revert inadvertent change.

21 months ago; Remove debugging leftover message
Eli Zaretskii [Sat, 3 Dec 2022 20:06:34 +0000 (22:06 +0200)]
; Remove debugging leftover message

* lisp/emacs-lisp/comp.el (comp--native-compile): Remove
unnecessary call to 'message'.  (Bug#59766)

21 months agoSpeed up Unicode normalisation tests by a factor of 5
Mattias Engdegård [Sat, 3 Dec 2022 18:19:28 +0000 (19:19 +0100)]
Speed up Unicode normalisation tests by a factor of 5

After this change, ucs-normalize-tests are still very slow but
somewhat less disastrously so (from 100 to 20 min on this machine).

* test/lisp/international/ucs-normalize-tests.el
(ucs-normalize-tests--normalization-equal-p)
(ucs-normalize-tests--normalization-chareq-p)
(ucs-normalize-tests--rule1-holds-p)
(ucs-normalize-tests--rule2-holds-p)
(ucs-normalize-tests--part1-rule2):
Run only over the Unicode code space.
Hoist `with-current-buffer` to reduce overhead.

21 months agoFix "C-h k" when clicking on another frame
Eli Zaretskii [Sat, 3 Dec 2022 19:43:36 +0000 (21:43 +0200)]
Fix "C-h k" when clicking on another frame

* lisp/help.el (help--analyze-key): Don't barf if the key sequence
includes a switch-frame event.  (Bug#59785)

21 months ago; Fix typos
Stefan Kangas [Sat, 3 Dec 2022 14:31:07 +0000 (15:31 +0100)]
; Fix typos

21 months agoFix and expand tests broken by commit 2772ebe366 of 2022-11-28
Juanma Barranquero [Sat, 3 Dec 2022 11:01:10 +0000 (12:01 +0100)]
Fix and expand tests broken by commit 2772ebe366 of 2022-11-28

* test/lisp/emacs-lisp/comp-tests.el
(with-test-native-compile-prune-cache)
(test-native-compile-prune-cache)
(test-native-compile-prune-cache/delete-only-eln)
(test-native-compile-prune-cache/dont-delete-in-parent-of-cache):
Check that the last directory in `native-comp-eln-load-path' is
not affected by `native-compile-prune-cache'.

21 months ago; Add cross-reference to string-equal docstring
Stefan Kangas [Sat, 3 Dec 2022 10:29:37 +0000 (11:29 +0100)]
; Add cross-reference to string-equal docstring

* lisp/subr.el (string-equal-ignore-case):
* src/fns.c (Fstring_equal): Doc fix; add cross-references.

21 months agoFix handling of relative directories in "--init-directory=DIR"
Eli Zaretskii [Sat, 3 Dec 2022 10:21:00 +0000 (12:21 +0200)]
Fix handling of relative directories in "--init-directory=DIR"

* lisp/startup.el (command-line): Interpret non-absolute file
names in '--init-directory' relative to the directory from
which Emacs is started.  (Bug#59795)

21 months agoMake sure 'user-emacs-directory' ends in a slash
Eli Zaretskii [Sat, 3 Dec 2022 10:03:13 +0000 (12:03 +0200)]
Make sure 'user-emacs-directory' ends in a slash

* lisp/startup.el (command-line): Make sure 'user-emacs-directory'
has the form of a directory.

21 months agoFix gud-minor-mode-menu
Eli Zaretskii [Sat, 3 Dec 2022 09:32:00 +0000 (11:32 +0200)]
Fix gud-minor-mode-menu

* lisp/emacs-lisp/easy-mmode.el (define-minor-mode)
(easy-mmode-define-keymap): Don't declare obsolete, since we are
still using it in gud.el.  (Bug#59769)  (Bug#59605)
Do not merge to master.