]> git.eshelyaron.com Git - emacs.git/log
emacs.git
22 months agoFix mule-tests under en_US.UTF-8 locale
Eli Zaretskii [Wed, 15 Feb 2023 19:00:54 +0000 (21:00 +0200)]
Fix mule-tests under en_US.UTF-8 locale

* test/lisp/international/mule-tests.el (sgml-html-meta-utf-8):
Accept also utf-8-unix/dos/whatever.  (Bug#61534)

* lisp/international/mule.el
(sgml-html-meta-auto-coding-function): Fix comparison when
buffer-file-coding-system is of type 'charset'.

22 months agoMove block closer above declaration_list rule (bug#61531)
Theodor Thornhill [Wed, 15 Feb 2023 18:21:50 +0000 (19:21 +0100)]
Move block closer above declaration_list rule (bug#61531)

* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): Move rule
above the previous rule.

22 months agoMinor improvements in c-ts-mode and docs
Eli Zaretskii [Wed, 15 Feb 2023 18:01:40 +0000 (20:01 +0200)]
Minor improvements in c-ts-mode and docs

* lisp/progmodes/c-ts-mode.el (c-ts-base-mode-map): Add a binding
for comment-region.

* doc/emacs/programs.texi (C Indent): Mention "C-u TAB".

22 months agoAdd super node as a keyword
Theodor Thornhill [Wed, 15 Feb 2023 17:54:46 +0000 (18:54 +0100)]
Add super node as a keyword

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

22 months ago; Prevent ERC-induced false positive in JUnit report
F. Jason Park [Tue, 14 Feb 2023 15:29:25 +0000 (07:29 -0800)]
; Prevent ERC-induced false positive in JUnit report

* test/lisp/erc/erc-scenarios-internal.el: Mimic other test files,
like perl-mode-tests.el, in setting `ert-load-file-name' globally.
This file formerly caused a false positive in the error detection
logic of `ert-write-junit-test-summary-report'.  It affected all
scheduled pipelines, including those for the release branch, Emacs 29.

22 months agoDelete perplexing paragraph from Gnus manual
Stefan Kangas [Wed, 15 Feb 2023 15:16:00 +0000 (16:16 +0100)]
Delete perplexing paragraph from Gnus manual

* doc/misc/gnus.texi (Exiting Gnus): Delete a confusing paragraph,
that may or may not have been intended as a joke.  (Bug#61325)

22 months ago; Fix typo
Stefan Kangas [Wed, 15 Feb 2023 14:21:43 +0000 (15:21 +0100)]
; Fix typo

22 months ago; Auto-commit of loaddefs files.
Stefan Kangas [Wed, 15 Feb 2023 04:08:01 +0000 (05:08 +0100)]
; Auto-commit of loaddefs files.

22 months agoEglot: check server capability before sending didSave (bug#61478)
~kby [Tue, 14 Feb 2023 23:25:05 +0000 (23:25 +0000)]
Eglot: check server capability before sending didSave (bug#61478)

* lisp/progmodes/eglot.el (eglot--signal-textDocument/didSave): check
server capability.

Copyright-paperwork-exempt: Yes

22 months agoFix rust-ts-mode type and module highlighting (Bug#61302)
Randy Taylor [Thu, 9 Feb 2023 02:43:04 +0000 (21:43 -0500)]
Fix rust-ts-mode type and module highlighting (Bug#61302)

* lisp/progmodes/rust-ts-mode.el (rust-ts-mode--font-lock-settings):
Specify import queries to avoid clashing with scoped identifiers in
the code.  Highlight attributes with font-lock-preprocessor-face.

22 months agorust-ts-mode: Highlight variable reassignments
Dmitry Gutov [Tue, 14 Feb 2023 17:29:30 +0000 (19:29 +0200)]
rust-ts-mode: Highlight variable reassignments

* lisp/progmodes/rust-ts-mode.el (rust-ts-mode):
New treesit font-lock feature: 'assignment' (bug#61302).
(rust-ts-mode--fontify-pattern): Remove the node lookup step.
(rust-ts-mode--font-lock-settings): Update variable declaration
queries to match the 'pattern' child node right away.  Add
highlights for 'assignment.

22 months agoImprove backward compatibility of save-restriction
Gregory Heytings [Tue, 14 Feb 2023 20:22:50 +0000 (20:22 +0000)]
Improve backward compatibility of save-restriction

* src/editfns.c (save_restriction_save_1): Renamed from
'save_restrictions_save'.  Make it static.
(save_restriction_restore_1): Renamed from
'save_restriction_restore'.  Make it static.
(save_restriction_restore): New function, combining
'save_restriction_save_1' and 'narrowing_locks_save'.
(save_restriction_save): New function, combining
'save_restriction_restore_1' and 'narrowing_locks_restore'.
(Fsave_restriction): Restore the previous code.
(narrowing_locks_save, narrowing_locks_restore): Make them static.

* src/lisp.h: Remove two functions that are not externally visible
anymore.

* src/comp.c (helper_save_restriction): Restore the previous code.

* src/bytecode.c (exec_byte_code): Restore the previous code.

* lisp/emacs-lisp/bytecomp.el (byte-compile-save-restriction):
Decrement unbinding count.

22 months agoDon't indent template_string contents (bug#61503)
Theodor Thornhill [Tue, 14 Feb 2023 19:53:55 +0000 (20:53 +0100)]
Don't indent template_string contents (bug#61503)

* lisp/progmodes/js.el (js--treesit-indent-rules): Add new rule.
* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--indent-rules): Add new rule.

22 months agocsharp-ts-mode: fontify compiler directives (bug#61512)
Jostein Kjønigsen [Tue, 14 Feb 2023 19:04:19 +0000 (20:04 +0100)]
csharp-ts-mode: fontify compiler directives (bug#61512)

lisp/progmodes/csharp-mode.el: Add tree-sitter-queries for known C#
compiler-directives.

22 months agoUpdate to Transient v0.3.7-209-gdab1dfa
Jonas Bernoulli [Tue, 14 Feb 2023 19:40:55 +0000 (20:40 +0100)]
Update to Transient v0.3.7-209-gdab1dfa

22 months ago; Raise an error if a VC package checkout is empty
Philip Kaludercic [Tue, 14 Feb 2023 18:49:51 +0000 (19:49 +0100)]
; Raise an error if a VC package checkout is empty

* lisp/emacs-lisp/package-vc.el (package-vc--unpack): Check if PKG-DIR
is empty before proceeding with the installation.

22 months ago; Fix the installation of dependencies for VC packages
Philip Kaludercic [Tue, 14 Feb 2023 18:48:01 +0000 (19:48 +0100)]
; Fix the installation of dependencies for VC packages

* lisp/emacs-lisp/package-vc.el (package-vc-install-dependencies):
Work with package-desc objects instead of (PACKAGE-NAME VERSION)
pairs.

22 months ago; Prepare to update ERC version to 5.5
F. Jason Park [Wed, 30 Nov 2022 06:53:44 +0000 (22:53 -0800)]
; Prepare to update ERC version to 5.5

* doc/misc/erc.texi: Mention in various places that ERC is also
available from GNU ELPA.
* etc/ERC-NEWS: Mention Compat dependency and shorten title for
auth-source section.
* lisp/erc/erc-backend.el: (erc-server-reconnect-function,
erc-tags-format): Update package version to 5.5.
(erc--parse-message-tags): Downcase warning "type" to remain
consistent with all other ERC warnings.
* lisp/erc/erc-button.el: (erc-button-alist): Change package-version
to 5.5.
* lisp/erc/erc-match.el (erc-match-quote-when-adding): Update package
version to 5.5.
* lisp/erc/erc-sasl.el: Mention actual info node in Commentary.
(erc-sasl): Update package version to 5.5.
(erc-sasl-password): Reword doc string.
(erc-sasl-auth-source-function): Capitalize "info" in doc string.
* lisp/erc/erc-services.el (erc-auth-source-services-function): Update
package version to 5.5.  Capitalize "info" in doc string.  Change
choice type from const to function-item.
* lisp/erc/erc.el (erc-password): Capitalize "info" in doc string.
(erc-inhibit-multiline-input, erc-ask-about-multiline-input,
erc-prompt-hidden, erc-hide-prompt, erc-unhide-query-prompt,
erc-join-buffer, erc-reconnect-display, erc-kill-server-hook,
erc-kill-channel-hook, erc-kill-buffer-hook,
erc-url-connect-function): Update package version to 5.5.
(erc-auth-source-server-function, erc-auth-source-join-function):
Update package version to 5.5.  Change choice type from const to
function-item.  Capitalize "info" in doc string.
(erc-tls): Capitalize "info" in doc string.

22 months ago; Remove failing erc-reuse-buffers test
F. Jason Park [Tue, 14 Feb 2023 15:47:06 +0000 (07:47 -0800)]
; Remove failing erc-reuse-buffers test

* test/lisp/erc/erc-scenarios-base-reuse-buffers.el
(erc-scenarios-base-reuse-buffers-server-buffers--enabled): Delete
test.

22 months ago; Minor docs copyedits
Eli Zaretskii [Mon, 13 Feb 2023 18:37:15 +0000 (20:37 +0200)]
; Minor docs copyedits

* etc/NEWS: Add text about adapting to long-line optimizations.

* doc/lispref/positions.texi (Narrowing): Improve documentation of
labeled narrowing.

22 months agoMerge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/emacs into emacs-29
Eli Zaretskii [Mon, 13 Feb 2023 18:12:32 +0000 (20:12 +0200)]
Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/emacs into emacs-29

22 months agoRename with/without-narrowing to with/without-restriction
Eli Zaretskii [Mon, 13 Feb 2023 18:11:28 +0000 (20:11 +0200)]
Rename with/without-narrowing to with/without-restriction

* doc/lispref/commands.texi:
* doc/lispref/display.texi:
* doc/lispref/positions.texi:
* etc/NEWS:
* lisp/subr.el:
* src/buffer.c:
* src/editfns.c:
* src/keyboard.c:
* src/xdisp.c:
* test/src/buffer-tests.el: Rename with-narrowing and
without-narrowing to with-restriction and without-restriction.
Likewise with internal--with-narrowing and
internal--without-narrowing.  All callers and documentation
changed.

22 months ago* lisp/repeat.el: Rename internal function and variable (bug#60980)
Juri Linkov [Mon, 13 Feb 2023 17:46:22 +0000 (19:46 +0200)]
* lisp/repeat.el: Rename internal function and variable (bug#60980)

(repeat--transient-exitfun): Rename internal variable from
'repeat-exit-function'.
(repeat--clear-prev): Rename internal function from
'repeat--exit'.

22 months ago; * etc/NEWS: Fix typos.
Michael Albinus [Mon, 13 Feb 2023 15:44:57 +0000 (16:44 +0100)]
; * etc/NEWS: Fix typos.

22 months ago; * lisp/calendar/lunar.el: Add comments. (bug#61460)
Ulrich Müller [Mon, 13 Feb 2023 14:50:47 +0000 (15:50 +0100)]
; * lisp/calendar/lunar.el: Add comments. (bug#61460)

22 months ago; * lisp/progmodes/c-ts-mode.el (c-ts-base-mode): delete duplicate
Mattias Engdegård [Mon, 13 Feb 2023 13:53:48 +0000 (14:53 +0100)]
; * lisp/progmodes/c-ts-mode.el (c-ts-base-mode): delete duplicate

22 months ago; * admin/git-bisect-start: Update failing commits
Gregory Heytings [Mon, 13 Feb 2023 10:50:28 +0000 (11:50 +0100)]
; * admin/git-bisect-start: Update failing commits

22 months agoMerge branch 'scratch/fix-locked-narrowing'
Gregory Heytings [Mon, 13 Feb 2023 10:44:37 +0000 (11:44 +0100)]
Merge branch 'scratch/fix-locked-narrowing'

22 months agoMinor improvements to labeled narrowing
Gregory Heytings [Mon, 13 Feb 2023 10:23:39 +0000 (10:23 +0000)]
Minor improvements to labeled narrowing

* lisp/subr.el (internal--with-narrowing):
(internal--without-narrowing): Remove unnecessary 'progn'.

* etc/NEWS: Mention 'with-narrowing' in the entry about long
lines.

* doc/lispref/positions.texi (Narrowing): Fix typo.

* doc/lispref/display.texi (Auto Faces): Use @pxref.

* doc/lispref/commands.texi (Command Overview): Use @pxref.

22 months agoFix spurious display of eclipses in Calendar
Ulrich Müller [Sun, 12 Feb 2023 19:57:49 +0000 (20:57 +0100)]
Fix spurious display of eclipses in Calendar

* lisp/calendar/lunar.el (eclipse-check): Don't show an eclipse
unless the phase is new moon or full moon. (bug#61460)
* test/lisp/calendar/lunar-tests.el (lunar-test-eclipse-check)
(lunar-test-phase-list): Update tests.

22 months agoFix indentation for closing bracket in c-ts-mode (bug#61398)
Yuan Fu [Mon, 13 Feb 2023 03:49:47 +0000 (19:49 -0800)]
Fix indentation for closing bracket in c-ts-mode (bug#61398)

* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--indent-styles): Move the rule earlier.
(c-ts-base-mode): Add move block type.
* test/lisp/progmodes/c-ts-mode-resources/indent.erts: New tests.

22 months ago; * src/pdumper.c (dump_buffer): Update hash.
Basil L. Contovounesios [Sun, 12 Feb 2023 21:07:45 +0000 (21:07 +0000)]
; * src/pdumper.c (dump_buffer): Update hash.

This follows commit 8f3091defb3 of 2023-02-12
"; Fix typo in buffer.h".

22 months agoUpdate to Org 9.6.1-31-gaf1bb1
Kyle Meyer [Sun, 12 Feb 2023 20:43:07 +0000 (15:43 -0500)]
Update to Org 9.6.1-31-gaf1bb1

22 months ago* src/.gdbinit (nextcons): Amend $.u.cdr to $.u.s.u.cdr (bug#61453).
Alan Mackenzie [Sun, 12 Feb 2023 19:06:50 +0000 (19:06 +0000)]
* src/.gdbinit (nextcons): Amend $.u.cdr to $.u.s.u.cdr (bug#61453).

(cherry picked from commit dde023b63ab82c38d33815409de5552f5bf349d1)

22 months agoAdd lambda_expression to c-ts-common-indent-type-regexp-alist
Theodor Thornhill [Sun, 12 Feb 2023 17:57:40 +0000 (18:57 +0100)]
Add lambda_expression to c-ts-common-indent-type-regexp-alist

* lisp/progmodes/java-ts-mode.el (java-ts-mode): Tweak regexp.

22 months ago; Use the right name when specifying VC packages
Philip Kaludercic [Sun, 12 Feb 2023 13:29:26 +0000 (14:29 +0100)]
; Use the right name when specifying VC packages

* lisp/emacs-lisp/package-vc.el
(package-vc-install-selected-packages): Generate dummy package
descriptors in here, if necessary.
(package-vc--unpack): Remove dummy-descriptor generation.

22 months agoTolerate missing elpa-packages.eld files
Philip Kaludercic [Sun, 12 Feb 2023 12:25:54 +0000 (13:25 +0100)]
Tolerate missing elpa-packages.eld files

* lisp/emacs-lisp/package-vc.el
(package-vc--download-and-read-archives): Replace
'condition-case-unless-debug' with a regular 'condition-case'.

It appears a few people using third-party archives that don't serve
package specifications have been having issues with package-vc, when
toggle-on-error is enabled.  In their case, package-vc would raise an
error in its first invocation, but it would go on working normally
afterwards.  As this behaviour is confusing and the user can't do much
about a missing elpa-packages.eld to begin with, we satisfy ourselves
with printing out a message and continuing on.

22 months agoAvoid warning about 'load-path' in non-interactive sessions
Eli Zaretskii [Sun, 12 Feb 2023 12:20:48 +0000 (14:20 +0200)]
Avoid warning about 'load-path' in non-interactive sessions

* lisp/startup.el (command-line): Emit the warning about
'user-emacs-directory' in 'load-path' only in interactive
sessions.  (Bug#61014)

22 months ago; Fix installation of dependencies for VC packages
Philip Kaludercic [Sun, 12 Feb 2023 12:10:04 +0000 (13:10 +0100)]
; Fix installation of dependencies for VC packages

* lisp/emacs-lisp/package-vc.el (package-vc-install-dependencies):
Maintain a list of package-desc objects instead of package names to
install.

22 months ago; Mention Hunspell private-dictionary misfeature in doc strings
Eli Zaretskii [Sun, 12 Feb 2023 12:05:44 +0000 (14:05 +0200)]
; Mention Hunspell private-dictionary misfeature in doc strings

* lisp/textmodes/ispell.el (ispell-personal-dictionary)
(ispell-local-pdict): Mention Hunspell misfeatures in doc
strings.  (Bug#61190)

22 months agoSupport webkit2gtk-4.1
Ulrich Müller [Thu, 9 Feb 2023 09:58:48 +0000 (10:58 +0100)]
Support webkit2gtk-4.1

* configure.ac: Check for webkit2gtk API version 4.1 first, then
fall back to 4.0.

22 months ago; Fix typo
Stefan Kangas [Sun, 12 Feb 2023 06:47:09 +0000 (07:47 +0100)]
; Fix typo

22 months ago; Fix typo in buffer.h
Daniel Martín [Sun, 12 Feb 2023 00:32:20 +0000 (01:32 +0100)]
; Fix typo in buffer.h

22 months ago; Fix typos
Stefan Kangas [Sun, 12 Feb 2023 02:23:13 +0000 (03:23 +0100)]
; Fix typos

22 months ago; Fix doc strings in lisp/image/ directory
Eli Zaretskii [Sat, 11 Feb 2023 14:49:54 +0000 (16:49 +0200)]
; Fix doc strings in lisp/image/ directory

* lisp/image/wallpaper.el (wallpaper-setter)
(wallpaper--find-command, wallpaper--x-monitor-name)
(wallpaper--format-arg):
* lisp/image/image-dired-util.el
(image-dired-associated-dired-buffer)
(image-dired--with-dired-buffer):
* lisp/image/image-dired-tags.el (image-dired--with-db-file)
(image-dired-remove-tag, image-dired-list-tags)
(image-dired-tag-files, image-dired-write-comments)
(image-dired-update-property):
* lisp/image/image-dired-external.el (image-dired-cmd-pngnq-options)
(image-dired-cmd-pngcrush-program)
(image-dired-cmd-pngcrush-options)
(image-dired-cmd-optipng-options)
(image-dired-cmd-create-standard-thumbnail-options)
(image-dired-cmd-rotate-original-program)
(image-dired-cmd-rotate-original-options)
(image-dired-cmd-write-exif-data-options, image-dired-queue)
(image-dired-queue-active-limit, image-dired-pngnq-thumb)
(image-dired-pngcrush-thumb, image-dired-optipng-thumb)
(image-dired-thumb-queue-run, image-dired-get-exif-file-name)
(image-dired-thumbnail-set-image-description):
* lisp/image/image-dired.el (image-dired-thumbnail-storage)
(image-dired-tags-db-file)
(image-dired-rotate-original-ask-before-overwrite)
(image-dired-line-up-method, image-dired-track-movement)
(image-dired-display-properties-format)
(image-dired-external-viewer)
(image-dired-show-all-from-dir-max-files)
(image-dired-insert-image)
(image-dired-dired-with-window-configuration)
(image-dired-restore-window-configuration)
(image-dired-track-original-file)
(image-dired-toggle-movement-tracking)
(image-dired-format-properties-string)
(image-dired--on-file-in-dired-buffer)
(image-dired-thumbnail-display-external)
(image-dired-display-image, image-dired-copy-filename-as-kill):
* lisp/image/image-dired-dired.el
(image-dired-dired-toggle-marked-thumbs)
(image-dired-dired-after-readin-hook)
(image-dired-next-line-and-display)
(image-dired-previous-line-and-display)
(image-dired-mark-and-display-next, image-dired-track-thumbnail)
(image-dired-dired-next-line, image-dired-dired-previous-line)
(image-dired-dired-display-external)
(image-dired-copy-with-exif-file-name)
(image-dired-mark-tagged-files)
(image-dired-dired-display-properties):
* lisp/image/image-crop.el (image-crop-exif-rotate)
(image-crop-resize-command, image-crop-cut-command)
(image-crop-crop-command, image-crop-rotate-command)
(image-crop-buffer-text-function, image-cut-color):
* lisp/image/image-converter.el (image-converter)
(image-convert-to-format, image-converter-regexp)
(image-converter--converters, image-convert-p, image-convert)
(image-converter--value, image-converter--probe)
(image-converter--find-converter, image-converter--convert)
(image-converter-add-handler):
* lisp/image/exif.el (exif-parse-buffer, exif-field)
(exif-orientation, exif--direct-ascii-value)
(exif--process-value, exif--read-chunk, exif--read-number-be)
(exif--read-number-le, exif--read-number): Fix doc strings.

22 months ago; Improve documentation of hash functions.
Eli Zaretskii [Sat, 11 Feb 2023 10:28:43 +0000 (12:28 +0200)]
; Improve documentation of hash functions.

* src/fns.c (Fsecure_hash, Fmd5): Document the length of the
return values.

* lisp/subr.el (sha1): Describe the return value in more detail.

* doc/lispref/text.texi (Checksum/Hash): Document 'sha1'.
Document the length of the strings returned by each hashing
algorithm.

22 months ago; Remove extraneous local variables from image-dired-*.el files
Eli Zaretskii [Sat, 11 Feb 2023 09:48:48 +0000 (11:48 +0200)]
; Remove extraneous local variables from image-dired-*.el files

These cause annoying prompts when visiting these files, and evidently
belong to a third-party package.
* lisp/image/image-dired-external.el:
* lisp/image/image-dired-tags.el:
* lisp/image/image-dired-dired.el:
* lisp/image/image-dired-util.el: Remove unsafe local-variables.

22 months agoSave and restore the absence of narrowing locks
Gregory Heytings [Fri, 10 Feb 2023 20:55:47 +0000 (20:55 +0000)]
Save and restore the absence of narrowing locks

* src/editfns.c (narrowing_locks_save): Return the buffer with a
empty locks list when the current buffer has no narrowing locks.
(narrowing_locks_restore): Remove the narrowing locks if the
buffer had no narrowing locks.

22 months agobug-reference: prevent match-data clobbering (bug#61395)
Tassilo Horn [Fri, 10 Feb 2023 18:22:56 +0000 (19:22 +0100)]
bug-reference: prevent match-data clobbering (bug#61395)

* lisp/progmodes/bug-reference.el (bug-reference-fontify): Wrap call
to syntax-ppss in save-match-data since it can clobber our
match-data (bug#61395).

22 months ago; * admin/notes/tree-sitter/starter-guide: Typos.
Basil L. Contovounesios [Fri, 10 Feb 2023 15:24:45 +0000 (15:24 +0000)]
; * admin/notes/tree-sitter/starter-guide: Typos.

Reported by Romanos Skiadas <rom.skiad@gmail.com>.

22 months ago; Fix recent changes in treesit docs
Eli Zaretskii [Fri, 10 Feb 2023 12:14:05 +0000 (14:14 +0200)]
; Fix recent changes in treesit docs

* doc/lispref/parsing.texi (Accessing Node Information): Fix
wording and indexing, and add cross-reference.

22 months agoRename LIMIT to DEPTH in tree-sitter functions (bug#61231)
Yuan Fu [Fri, 10 Feb 2023 07:25:57 +0000 (23:25 -0800)]
Rename LIMIT to DEPTH in tree-sitter functions (bug#61231)

I only changed the Lisp functions, internal functions are left
unchanged.

* doc/lispref/parsing.texi (Retrieving Nodes): Update manual.
* src/treesit.c (Ftreesit_search_subtree)
(Ftreesit_induce_sparse_tree): Change LIMIT to DEPTH.

22 months ago; Fix incorrect function name in treesit manual
Simon Pugnet [Thu, 9 Feb 2023 11:33:31 +0000 (11:33 +0000)]
; Fix incorrect function name in treesit manual

An example in the documentation uses the function
'treesit-get-parser-create' which does not exist.  Replace this with
'treesit-parser-create'.

* admin/notes/tree-sitter/html-manual/Multiple-Languages.html:
* doc/lispref/parsing.texi (Multiple Languages):
Change example.

Copyright-paperwork-exempt: yes

22 months agoAdd 'live' property to treesit-node-check (bug#61235)
Yuan Fu [Mon, 6 Feb 2023 04:22:52 +0000 (20:22 -0800)]
Add 'live' property to treesit-node-check (bug#61235)

* doc/lispref/parsing.texi (Accessing Node Information): Document.
* src/treesit.c (treesit_parser_live_p): New function.
(Ftreesit_node_check): Add 'live' property.
* test/src/treesit-tests.el (treesit-node-api): Add tests.

22 months agoUpdate to Transient v0.3.7-205-gb8ad0da
Jonas Bernoulli [Thu, 9 Feb 2023 22:53:33 +0000 (23:53 +0100)]
Update to Transient v0.3.7-205-gb8ad0da

22 months agoFix 'rmail-summary-output'
Eli Zaretskii [Thu, 9 Feb 2023 15:34:19 +0000 (17:34 +0200)]
Fix 'rmail-summary-output'

* lisp/mail/rmailsum.el (rmail-summary-output): Fix deletion of
messages when 'rmail-output-reset-deleted-flag' is non-nil.
(Bug#61380)

22 months agolisp-mode: add docstring recognition for more common lisp symbols
Nicolas Martyanoff [Thu, 9 Feb 2023 10:39:14 +0000 (11:39 +0100)]
lisp-mode: add docstring recognition for more common lisp symbols

* lisp/emacs-lisp/lisp-mode.el (define-compiler-macro)
(define-setf-expander, deftype): Add the 'doc-string-elt'
property for proper docstring highlighting in Common Lisp.

22 months ago; Improve discoverability of empty file names handling
Eli Zaretskii [Thu, 9 Feb 2023 14:06:55 +0000 (16:06 +0200)]
; Improve discoverability of empty file names handling

* doc/lispref/files.texi (Relative File Names)
(Testing Accessibility, File Name Expansion): Document and index
the behavior with empty strings as file names.

22 months agoUpdate to Transient v0.3.7-204-gecff8c2
Jonas Bernoulli [Thu, 9 Feb 2023 12:28:05 +0000 (13:28 +0100)]
Update to Transient v0.3.7-204-gecff8c2

22 months agoFix Scala entry in Eglot's DB of LSP servers
Eli Zaretskii [Thu, 9 Feb 2023 10:17:18 +0000 (12:17 +0200)]
Fix Scala entry in Eglot's DB of LSP servers

* lisp/progmodes/eglot.el (eglot-server-programs): Support Scala
LSP named "metals", in addition to "metals-emacs".  (Bug#61312)

22 months agoruby-ts-mode: Also don't reindent 'identifier' when inside ERROR
Dmitry Gutov [Thu, 9 Feb 2023 02:48:25 +0000 (04:48 +0200)]
ruby-ts-mode: Also don't reindent 'identifier' when inside ERROR

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--indent-rules):
Also don't reindent 'identifier' when inside ERROR.

22 months agoruby-ts-mode: Fix indentation inside empty if/unless/case/def
Dmitry Gutov [Thu, 9 Feb 2023 02:15:41 +0000 (04:15 +0200)]
ruby-ts-mode: Fix indentation inside empty if/unless/case/def

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--indent-rules):
Add new rule.

* test/lisp/progmodes/ruby-ts-mode-tests.el
(ruby-ts-indent-empty-if-else): New test.

22 months agoAdd an extensive test for labeled (locked) narrowing
Gregory Heytings [Thu, 9 Feb 2023 01:09:10 +0000 (01:09 +0000)]
Add an extensive test for labeled (locked) narrowing

* test/src/buffer-tests.el (test-labeled-narrowing): New test.

22 months agoUpdate the documentation about labeled (locked) narrowing
Gregory Heytings [Thu, 9 Feb 2023 01:09:10 +0000 (01:09 +0000)]
Update the documentation about labeled (locked) narrowing

* src/xdisp.c (syms_of_xdisp) <fontification-functions>: Update
docstring.

* src/keyboard.c (syms_of_keyboard) <pre-command-hook>:
(syms_of_keyboard) <post-command-hook>: Update docstring.

* src/editfns.c:
(narrowing_locks): Explain why an alist is used instead of a
buffer-local variable.
(reset_outermost_narrowings): Point to recipes that demonstrate
why it is necessary to restore the user narrowing bounds when
redisplay starts.
(Fwiden): Update docstring.
(Fnarrow_to_region): Update docstring.
(Finternal__lock_narrowing): Update docstring.
(Finternal__unlock_narrowing): Update docstring.
(Fsave_restriction): Update docstring.

* src/buffer.c (syms_of_buffer)
<long-line-optimizations-region-size>: Update docstring.
(syms_of_buffer) <long-line-optimizations-bol-search-limit>:
Update docstring.

* lisp/subr.el (with-narrowing): Update docstring.
(without-narrowing): Update docstring.

* etc/NEWS: Mention the 'long-line-optimizations-region-size' and
'long-line-optimizations-bol-search-limit' options.
Announce the 'with-narrowing' and 'without-narrowing' forms.

* doc/lispref/positions.texi (Narrowing): Update the documentation
of 'narrow-to-region', 'widen' and 'save-restriction'.  Document
the 'with-narrowing' and 'without-narrowing' special forms.

* doc/lispref/display.texi (Auto Faces): Update the documentation.

* doc/lispref/commands.texi (Command Overview): Document the fact
that the buffer is narrowed around 'pre-command-hook' and
'post-command-hook' when the buffer text includes very long lines.

22 months agoRename two long line optimizations variables
Gregory Heytings [Thu, 9 Feb 2023 01:09:10 +0000 (01:09 +0000)]
Rename two long line optimizations variables

* src/buffer.c (syms_of_buffer): Rename two variables.

* src/xdisp.c (get_locked_narrowing_begv):
(get_locked_narrowing_zv):
(handle_fontified_prop): Use the new names.

* src/keyboard.c (safe_run_hooks_maybe_narrowed): Use the new
names.

22 months agoAdd specific symbols for narrowings
Gregory Heytings [Thu, 9 Feb 2023 01:09:10 +0000 (01:09 +0000)]
Add specific symbols for narrowings

* src/xdisp.c (syms_of_xdisp): Define symbol.
(handle_fontified_prop): Use it.

* src/keyboard.c (syms_of_keyboard): Define symbol.
(safe_run_hooks_maybe_narrowed): Use it.

22 months agoAdd 'without-narrowing' macro
Gregory Heytings [Thu, 9 Feb 2023 01:09:10 +0000 (01:09 +0000)]
Add 'without-narrowing' macro

* lisp/subr.el (without-narrowing): New macro, companion (and
almost identical) to 'with-narrowing'.

22 months agoMake 'narrowing-lock' and 'narrowing-unlock' internal
Gregory Heytings [Thu, 9 Feb 2023 01:09:10 +0000 (01:09 +0000)]
Make 'narrowing-lock' and 'narrowing-unlock' internal

* src/editfns.c (Finternal__lock_narrowing): Renamed from
'narrowing-lock'.
(Finternal__unlock_narrowing): Renamed from 'narrowing-unlock'.
(unwind_narrow_to_region_locked):
(narrow_to_region_locked):
(syms_of_editfns): Use the new names.

* lisp/subr.el (internal--with-narrowing): Use the new name.

22 months agoFix 'save-restriction' for narrowing locks
Gregory Heytings [Thu, 9 Feb 2023 01:09:10 +0000 (01:09 +0000)]
Fix 'save-restriction' for narrowing locks

* src/editfns.c (narrowing_locks_save):
(narrowing_locks_restore): Make them non-static.

* src/lisp.h: Make them externally visible.

* src/bytecode.c (exec_byte_code): Save and restore narrowing
locks.

* lisp/emacs-lisp/bytecomp.el (byte-compile-save-restriction):
Increment unbinding count.

* src/comp.c (helper_save_restriction): Save and restore narrowing
locks.

22 months ago* lisp/iimage.el (iimage-mode-buffer): Handle multiple regexps.
LensPlaysGames [Wed, 8 Feb 2023 18:56:48 +0000 (20:56 +0200)]
* lisp/iimage.el (iimage-mode-buffer): Handle multiple regexps.

Go to the beginning of the buffer before searching every regexp in
iimage-mode-image-regex-alist.

Copyright-paperwork-exempt: yes

22 months ago; Fix memory leak in treesit.c
Eli Zaretskii [Wed, 8 Feb 2023 16:40:50 +0000 (18:40 +0200)]
; Fix memory leak in treesit.c

* src/treesit.c (treesit_load_language): Fix a memory leak.
Reported by Eric Gillespie <epg@pretzelnet.org>.

22 months ago* lisp/edmacro.el (edit-kbd-macro): Fix thinko (bug#61333)
Stefan Monnier [Tue, 7 Feb 2023 23:10:33 +0000 (18:10 -0500)]
* lisp/edmacro.el (edit-kbd-macro): Fix thinko (bug#61333)

Backported from commit 2273cdb40e1939f7c29a669f6a64e6a27738c1a5.

22 months ago; Fix doc strings in iimage.el
Eli Zaretskii [Wed, 8 Feb 2023 12:56:42 +0000 (14:56 +0200)]
; Fix doc strings in iimage.el

* lisp/iimage.el (iimage-mode-image-regex-alist)
(iimage-modification-hook): Doc fixes.

22 months agoFix crashes inside 'xfree' called from treesit.c
Eli Zaretskii [Tue, 7 Feb 2023 19:53:05 +0000 (21:53 +0200)]
Fix crashes inside 'xfree' called from treesit.c

* src/treesit.c (treesit_load_language): Always xstrdup 'c_name',
to avoid crashes inside xfree.  (Bug#61351)

22 months agoMake java-ts-mode use the c-ts-common-indent-type-regexp-alist
Yuan Fu [Tue, 7 Feb 2023 02:48:04 +0000 (18:48 -0800)]
Make java-ts-mode use the c-ts-common-indent-type-regexp-alist

* lisp/progmodes/java-ts-mode.el:
(java-ts-mode): Setup c-ts-common-indent-type-regexp-alist.

22 months agoFix c-ts-mode indentation
Yuan Fu [Mon, 6 Feb 2023 03:32:24 +0000 (19:32 -0800)]
Fix c-ts-mode indentation

Sign, ok, there's another edge case: else if statements.  Because
"else if" is usually implemented as just another if statement nested
in the else branch, this creates additional levels that indentation
needs to ignore.

I converted c-ts-common-indent-block-type-regexp +
c-ts-common-indent-bracketless-type-regexp into a new, more flexible
variable, c-ts-common-indent-type-regexp-alist, to avoid adding yet
more variables in order to recognize else and if statements.

* lisp/progmodes/c-ts-common.el:
(c-ts-common-indent-type-regexp-alist): New variable.
(c-ts-common-indent-block-type-regexp)
(c-ts-common-indent-bracketless-type-regexp): Remove variables.
(c-ts-common--node-is): New function.
(c-ts-common-statement-offset): Use the new variable, and add the
"else if" special case.  Also merge the code of
c-ts-mode--fix-bracketless-indent, because now the code is much more
succinct.
(c-ts-mode--fix-bracketless-indent): Merge into
c-ts-common-statement-offset.

* lisp/progmodes/c-ts-mode.el:
(c-ts-base-mode): Setup c-ts-common-indent-type-regexp-alist.

* test/lisp/progmodes/c-ts-mode-resources/indent.erts: New test.

22 months agoFix c-ts-mode indentation
Yuan Fu [Mon, 6 Feb 2023 01:05:21 +0000 (17:05 -0800)]
Fix c-ts-mode indentation

Turns out I shouldn't have removed the explicit rules.  Anyway, now it
indents properly.

* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): Add rules.
* test/lisp/progmodes/c-ts-mode-resources/indent.erts: Add tests

22 months agoFix c-ts-mode indentation (bug#61291)
Yuan Fu [Sun, 5 Feb 2023 23:20:52 +0000 (15:20 -0800)]
Fix c-ts-mode indentation (bug#61291)

Fix indentation for the semicolon in

while (str_a[i++] == str_b[j++])
  ;

* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): New rule.
* test/lisp/progmodes/c-ts-mode-resources/indent.erts: New test.

22 months ago(eglot-completion-at-point): Return correct values in :company-kind
Dmitry Gutov [Mon, 6 Feb 2023 22:28:25 +0000 (00:28 +0200)]
(eglot-completion-at-point): Return correct values in :company-kind

* lisp/progmodes/eglot.el (eglot-completion-at-point): Return the
correct values in :company-kind for "EnumMember" and "TypeParameter".
The convention is to use kebab case rather than plain downcasing.
Reported in https://github.com/company-mode/company-mode/issues/1370.

22 months agoTighten and simplify typescript compilation-mode regexps (bug#61104)
Mattias Engdegård [Mon, 6 Feb 2023 10:45:33 +0000 (11:45 +0100)]
Tighten and simplify typescript compilation-mode regexps (bug#61104)

* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist):
Tighten regexps and simplify.  Translate to rx.
* etc/compilation.txt: Add examples.

In collaboration with Jostein Kjønigsen.

22 months ago; * lisp/progmodes/c-ts-common.el (treesit-node-prev-sibling): Declare.
Eli Zaretskii [Mon, 6 Feb 2023 16:34:39 +0000 (18:34 +0200)]
; * lisp/progmodes/c-ts-common.el (treesit-node-prev-sibling): Declare.

22 months agoClarify bug-reference-auto-setup-functions docstring.
Tassilo Horn [Mon, 6 Feb 2023 16:09:40 +0000 (17:09 +0100)]
Clarify bug-reference-auto-setup-functions docstring.

* lisp/progmodes/bug-reference.el (bug-reference-auto-setup-functions):
Add clarification to docstring that this variable is for packages, not
for users.

22 months ago* lisp/treesit.el (treesit): Fix shortdoc example form (bug#61318).
Aleksandr Vityazev [Mon, 6 Feb 2023 10:39:10 +0000 (13:39 +0300)]
* lisp/treesit.el (treesit): Fix shortdoc example form (bug#61318).

22 months agoUse c-ts-common-statement-offset in java-ts-mode (bug#61142)
Theodor Thornhill [Sun, 5 Feb 2023 07:49:08 +0000 (08:49 +0100)]
Use c-ts-common-statement-offset in java-ts-mode (bug#61142)

* lisp/progmodes/java-ts-mode.el (java-ts-mode--indent-rules): Add new
matchers to enable c-ts-common machinery.
(java-ts-mode): Add regexps.
* lisp/progmodes/c-ts-common.el (c-ts-common-statement-offset): Fix
typo in documentation and use the new if statement helpers.
(c-ts-common-if-statement-regexp): New defvar.
(c-ts-common-nestable-if-statement-p): New defvar.
(c-ts-common--fix-nestable-if-statement): New helper.
* test/lisp/progmodes/c-ts-mode-resources/indent.erts: Add test for
complicated bracket matching indentation.
* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): Add indent
rules for bracketless statements.

22 months agoAdd array_initializer to java-ts-mode
Theodor Thornhill [Sun, 5 Feb 2023 07:24:14 +0000 (08:24 +0100)]
Add array_initializer to java-ts-mode

Indent strings inside arrray_initializer one step:

public class Java {
    void foo() {
        return new String[]{
            "foo", // These
            "bar"
        }
    }
}

* lisp/progmodes/java-ts-mode.el (java-ts-mode--indent-rules): New
matcher.

22 months agogo-ts-mode: Highlight variable declarations
Dmitry Gutov [Mon, 6 Feb 2023 02:42:12 +0000 (04:42 +0200)]
go-ts-mode: Highlight variable declarations

* lisp/progmodes/go-ts-mode.el (go-ts-mode--font-lock-settings):
Highlight variable declarations in 'definition' feature.

22 months agogo-ts-mode: Fix highlighting of function name in call_expression
Dmitry Gutov [Mon, 6 Feb 2023 02:12:25 +0000 (04:12 +0200)]
go-ts-mode: Fix highlighting of function name in call_expression

* lisp/progmodes/go-ts-mode.el (go-ts-mode--font-lock-settings):
Remove :override from the 'property' rules and move them above
'variable' (bug#61302).  Just like in rust-ts-mode.

22 months agoc-ts-mode: Highlight "property functions" as functions
Dmitry Gutov [Mon, 6 Feb 2023 02:05:19 +0000 (04:05 +0200)]
c-ts-mode: Highlight "property functions" as functions

* lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings):
Highlight "property functions" as functions (bug#61302).

22 months agorust-ts-mode: Fix highlighting of function name in call_expression
Dmitry Gutov [Sun, 5 Feb 2023 21:42:18 +0000 (23:42 +0200)]
rust-ts-mode: Fix highlighting of function name in call_expression

* lisp/progmodes/rust-ts-mode.el (rust-ts-mode--font-lock-settings):
Remove :override from the 'property' rules and move them above
'variable' (bug#61302).

22 months agorust-ts-mode--font-lock-settings: Improve consistency
Dmitry Gutov [Sun, 5 Feb 2023 19:34:12 +0000 (21:34 +0200)]
rust-ts-mode--font-lock-settings: Improve consistency

* lisp/progmodes/rust-ts-mode.el (rust-ts-mode--font-lock-settings):
Remove the rule that highlighted scope identifier in a function call
as type.  The existing rules will handle it when it does look like a
type (capitalized).

22 months agoMake sure 'M-x show-paren-local-mode' turns on right away
Dmitry Gutov [Sun, 5 Feb 2023 19:07:45 +0000 (21:07 +0200)]
Make sure 'M-x show-paren-local-mode' turns on right away

* lisp/paren.el (show-paren--enabled-p): Extract from
'show-paren-function'.
(show-paren-local-mode): Use it in the :variable getter (bug#61098).

22 months agoAdd to bug-reference-auto-setup-functions after its declaring defvar
Tassilo Horn [Sun, 5 Feb 2023 18:54:17 +0000 (19:54 +0100)]
Add to bug-reference-auto-setup-functions after its declaring defvar

If it's the init-value of the defvar, add-hook from a third-party
package will suppress the default functions if it takes place before
bug-reference is loaded.

* lisp/progmodes/bug-reference.el (bug-reference-auto-setup-functions):
Add to bug-reference-auto-setup-functions after its declaring defvar.

22 months ago* lisp/vc/vc.el (vc-find-revision-no-save): Fix parens (bug#61256).
Juri Linkov [Sun, 5 Feb 2023 18:23:57 +0000 (20:23 +0200)]
* lisp/vc/vc.el (vc-find-revision-no-save): Fix parens (bug#61256).

Move '(setq failed nil)' from UNWINDFORMS of 'unwind-protect' to BODYFORM.

22 months ago; Fix byte-compilation warning
Eli Zaretskii [Sun, 5 Feb 2023 17:10:39 +0000 (19:10 +0200)]
; Fix byte-compilation warning

* lisp/progmodes/rust-ts-mode.el (treesit-query-compile): Avoid
byte-compilation warning.

22 months agoFix inability to turn show-paren-local-mode on manually (bug#61098)
Dmitry Gutov [Sun, 5 Feb 2023 17:06:47 +0000 (19:06 +0200)]
Fix inability to turn show-paren-local-mode on manually (bug#61098)

* lisp/paren.el (show-paren-local-mode): Don't kill the local
value when both local and global are t.  Because the
show-paren-predicate check in show-paren-function also checks
whether a local (non-nil) value of this variable exists.

22 months ago; go-ts-mode--indent-rules: Indent to 0 at top level
Dmitry Gutov [Sun, 5 Feb 2023 16:52:57 +0000 (18:52 +0200)]
; go-ts-mode--indent-rules: Indent to 0 at top level

22 months agoMerge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/emacs into emacs-29
Eli Zaretskii [Sun, 5 Feb 2023 16:53:36 +0000 (18:53 +0200)]
Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/emacs into emacs-29

22 months ago; Fix whitespace of last change
Eli Zaretskii [Sun, 5 Feb 2023 16:52:59 +0000 (18:52 +0200)]
; Fix whitespace of last change

22 months ago; Fix trivial mistake in emoji--choose-emoji
Jonas Bernoulli [Sun, 5 Feb 2023 16:50:10 +0000 (17:50 +0100)]
; Fix trivial mistake in emoji--choose-emoji

* lisp/international/emoji.el (emoji--choose-emoji): The derived
versions are in the cdr not cadr.

22 months ago; * lisp/isearch.el (emoji--read-emoji): Avoid compilation warning.
Eli Zaretskii [Sun, 5 Feb 2023 16:51:11 +0000 (18:51 +0200)]
; * lisp/isearch.el (emoji--read-emoji): Avoid compilation warning.