]> git.eshelyaron.com Git - emacs.git/log
emacs.git
22 months agoMerge from origin/emacs-28
Stefan Kangas [Sun, 19 Feb 2023 16:35:20 +0000 (17:35 +0100)]
Merge from origin/emacs-28

4a77fcb1478 Update ChangeLog and AUTHORS for Emacs 28.3

22 months ago; Merge from origin/emacs-28
Stefan Kangas [Sun, 19 Feb 2023 16:35:20 +0000 (17:35 +0100)]
; Merge from origin/emacs-28

The following commits were skipped:

e339926272a Fix etags local command injection vulnerability
5d05ea803e9 Fixed ctags local command execute vulnerability
22fb5ff5126 Fix ruby-mode.el local command injection vulnerability (b...
807d2d5b3a7 Fix htmlfontify.el command injection vulnerability.
ae9bfed50db Fix storing email into nnmail by Gnus

22 months ago; Improve image-dired-thumbnail-storage docstring
Stefan Kangas [Sun, 19 Feb 2023 16:27:19 +0000 (17:27 +0100)]
; Improve image-dired-thumbnail-storage docstring

* lisp/image/image-dired.el (image-dired-thumbnail-storage):
Improve docstring.

22 months ago; * doc/emacs/dired.texi (Image-Dired): Fix last change.
Eli Zaretskii [Sun, 19 Feb 2023 15:09:18 +0000 (17:09 +0200)]
; * doc/emacs/dired.texi (Image-Dired): Fix last change.

22 months agoMore doc on image-dired-dired-* (bug#61624)
Manuel Giraud [Sun, 19 Feb 2023 11:19:02 +0000 (12:19 +0100)]
More doc on image-dired-dired-* (bug#61624)

* doc/emacs/dired.texi (Image-Dired): Some fixes and more
documentation about image-dired-dired-* commands.

22 months agoEglot: improve treatment of completion items without :sortText (bug#61532)
Theodor Thornhill [Sun, 19 Feb 2023 11:11:13 +0000 (11:11 +0000)]
Eglot: improve treatment of completion items without :sortText (bug#61532)

Previously, defaulting to the empty string put candidates without
:sortText to the top of the list.  since string-lessp is safe with nil
arguments, this makes them sort to the end instead.

* lisp/progmodes/eglot.el (eglot-completion-at-point): Simplify.

22 months ago; * admin/make-tarball.txt: Minor copyedit.
Stefan Kangas [Sun, 19 Feb 2023 10:35:31 +0000 (11:35 +0100)]
; * admin/make-tarball.txt: Minor copyedit.

22 months agoFix invocation of File->Close from the menu bar
Eli Zaretskii [Sun, 19 Feb 2023 09:29:32 +0000 (11:29 +0200)]
Fix invocation of File->Close from the menu bar

* lisp/simple.el (kill-buffer--possibly-save): Don't request
LONG-FORM from 'read-multiple-choice' if GUI dialog should be
used.
* lisp/emacs-lisp/rmc.el (read-multiple-choice): Doc fix.
(read-multiple-choice--short-answers): Don't append "?" to
CHOICES and don't display the prompt in the echo area if GUI
dialog is used.  Use 'use-dialog-box-p'.  (Bug#61553)

22 months ago; Improve documentation of 'native-comp-enable-subr-trampolines'
Eli Zaretskii [Sun, 19 Feb 2023 09:04:57 +0000 (11:04 +0200)]
; Improve documentation of 'native-comp-enable-subr-trampolines'

* doc/lispref/compile.texi (Native-Compilation Variables):
Document the interpretation of non-absolute directory names that
are the value of 'native-comp-enable-subr-trampolines'.

22 months agoUpdate thumbnail buffer's header more
Manuel Giraud [Tue, 14 Feb 2023 14:08:17 +0000 (15:08 +0100)]
Update thumbnail buffer's header more

* lisp/image/image-dired.el (image-dired-display-thumbs): Call
image-dired--update-header-line.  (Bug#61508)

22 months ago(treesit-query-validate): Fix reusing the output buffer
Dmitry Gutov [Sat, 18 Feb 2023 21:52:47 +0000 (23:52 +0200)]
(treesit-query-validate): Fix reusing the output buffer

* lisp/treesit.el (treesit-query-validate): Fix the "Buffer is
read-only" error when an output buffer already exists.

22 months ago(rust-ts-mode--font-lock-settings): Highlight closure parameters
Dmitry Gutov [Sat, 18 Feb 2023 21:51:17 +0000 (23:51 +0200)]
(rust-ts-mode--font-lock-settings): Highlight closure parameters

* lisp/progmodes/rust-ts-mode.el
(rust-ts-mode--font-lock-settings): Highlight closure parameters.

22 months ago* Fix `native-comp-enable-subr-trampolines' semantic
Andrea Corallo [Sat, 18 Feb 2023 21:44:05 +0000 (22:44 +0100)]
* Fix `native-comp-enable-subr-trampolines' semantic

* lisp/emacs-lisp/comp.el (comp--trampoline-abs-filename): Interpret
`native-comp-enable-subr-trampolines' relative to
`invocation-directory'.

22 months agoFix documentation of 'just-one-space' and 'delete-horizontal-space'
Eli Zaretskii [Sat, 18 Feb 2023 18:03:33 +0000 (20:03 +0200)]
Fix documentation of 'just-one-space' and 'delete-horizontal-space'

* lisp/simple.el (just-one-space, delete-horizontal-space):
Mention the effect of prefix argument.  (Bug#61609)

22 months ago; Remove NEWS entry about deleted variable.
Eli Zaretskii [Sat, 18 Feb 2023 17:48:22 +0000 (19:48 +0200)]
; Remove NEWS entry about deleted variable.

22 months ago; Fix wording of last change.
Eli Zaretskii [Sat, 18 Feb 2023 17:45:33 +0000 (19:45 +0200)]
; Fix wording of last change.

22 months agoFix 'display-buffer-use-least-recent-window'
martin rudalics [Sun, 12 Feb 2023 09:33:11 +0000 (10:33 +0100)]
Fix 'display-buffer-use-least-recent-window'

* src/window.c (Fwindow_use_time): Doc fix.
(Fwindow_bump_use_time): Bump use time of the seleceted window as
well.  Doc fix.

* lisp/window.el (display-buffer-avoid-small-windows): Remove.
All users changed.
(window--display-buffer): Bump window use time when requested.
(display-buffer--lru-window): New function.
(display-buffer-use-some-window): Use it.
(display-buffer-use-least-recent-window): Rewrite and enhance doc
string.

* doc/lispref/windows.texi (Selecting Windows)
(Buffer Display Action Functions, Buffer Display Action Alists)
(The Zen of Buffer Display): Improve and update documentation of
window selection and display facilities.

22 months agoFix point moving when calling python-shell-send-region
kobarity [Mon, 13 Feb 2023 15:30:15 +0000 (00:30 +0900)]
Fix point moving when calling python-shell-send-region

* lisp/progmodes/python.el (python-shell-buffer-substring): Add
`save-excursion' to prevent the point from moving.
* test/lisp/progmodes/python-tests.el (python-tests-should-not-move):
New helper function to assert that point does not move while calling a
function.
(python-shell-buffer-substring-*): Use
`python-tests-should-not-move'. (Bug#61463)

22 months ago(project-try-vc): Remove unused defvar/require
Omar Polo [Sat, 18 Feb 2023 13:10:57 +0000 (15:10 +0200)]
(project-try-vc): Remove unused defvar/require

* lisp/progmodes/project.el (project-try-vc):
Remove unused defvar/require (bug#61577).

22 months ago; Fix typo
Stefan Kangas [Sat, 18 Feb 2023 12:39:14 +0000 (13:39 +0100)]
; Fix typo

22 months agoDelete redundant question from Gnus FAQ
Stefan Kangas [Sat, 18 Feb 2023 12:35:37 +0000 (13:35 +0100)]
Delete redundant question from Gnus FAQ

* doc/misc/gnus-faq.texi (FAQ 1-2): Delete redundant question.
(FAQ 1-1, FAQ 1-3): Adjust accordingly.

22 months agoSlightly improve hashcash documentation
Stefan Kangas [Sat, 18 Feb 2023 12:00:04 +0000 (13:00 +0100)]
Slightly improve hashcash documentation

* lisp/mail/hashcash.el: Improve Commentary.
(hashcash-program):
* lisp/gnus/message.el (message-generate-hashcash): Improve
docstring.

22 months agoFix cursor motion when there's line-prefix and display string at BOL
Eli Zaretskii [Sat, 18 Feb 2023 11:40:56 +0000 (13:40 +0200)]
Fix cursor motion when there's line-prefix and display string at BOL

* src/xdisp.c (move_it_in_display_line_to): Handle 'line-prefix' and
'wrap-prefix' when the screen line has a display string at its
beginning.  (Bug#61580)

22 months agoFix comment in treesit_record_change (bug#61369)
Yuan Fu [Sat, 18 Feb 2023 10:20:12 +0000 (02:20 -0800)]
Fix comment in treesit_record_change (bug#61369)

Turns out the previous commit message and comment is not entirely
correct: the old behavior is in fact wrong, not just "correct but has
problems".

Here is why the old code is wrong:

|visible range|     -> markup for visible range

updated range       -> markup for updated range
-------------

First we have some text

|aaaaaa|

Now we insert something at the beginning, because we clip
new_end_offset to visible_end, out of eight b's inserted, only the
first six are known to tree-sitter.

|bbbbbbbbaaaa|aa  start: 0, old_end: 0, new_end: 6
 ------

In treesit_sync_visible_region, we sync up visible region, but the two
missing b's are not in the updated range.

|bbbbbbbbaaaaaa|  start: 12, old_end: 12, new_end: 14
             --

The old behavior not only is wrong, but also doesn't make much sense.

* src/treesit.c (treesit_record_change): Update comment.

22 months agoSpell out RPN abbreviation in Calc manual intro
Stefan Kangas [Sat, 18 Feb 2023 09:57:27 +0000 (10:57 +0100)]
Spell out RPN abbreviation in Calc manual intro

* doc/misc/calc.texi (What is Calc, Demonstration of Calc)
(RPN Tutorial): Spell out "Reverse Polish notation" abbreviation.

22 months agoFix some uses of 'use-dialog-box'
Eli Zaretskii [Sat, 18 Feb 2023 08:58:00 +0000 (10:58 +0200)]
Fix some uses of 'use-dialog-box'

* lisp/frame.el (display-mouse-p): Fix return value on MS-Windows
in batch invocations.
* lisp/hi-lock.el (hi-lock-unface-buffer): Don't consider
'last-nonmenu-event' being nil as a mouse event, for the purpose
of using dialog boxes.

22 months agoFix hi-lock-tests when 'use-dialog-box' is non-nil
Eli Zaretskii [Sat, 18 Feb 2023 08:45:12 +0000 (10:45 +0200)]
Fix hi-lock-tests when 'use-dialog-box' is non-nil

* test/lisp/hi-lock-tests.el (hi-lock-case-fold)
(hi-lock-unhighlight): Bind 'use-dialog-box' to nil.

22 months agoFix regression due to change in face sort order by 'face-list'
Eli Zaretskii [Sat, 18 Feb 2023 07:37:34 +0000 (09:37 +0200)]
Fix regression due to change in face sort order by 'face-list'

* lisp/faces.el (x-create-frame-with-faces): Undo reversing of
the face list, which is no longer necessary, since 'face-list's
sorting order has been reversed recently.  (Bug#61521)

22 months ago* lisp/files.el (file-equal-p): Work around Haiku stat bug.
Po Lu [Sat, 18 Feb 2023 03:03:07 +0000 (11:03 +0800)]
* lisp/files.el (file-equal-p): Work around Haiku stat bug.

22 months ago; * src/treesit.c: Improve sectioning.
Po Lu [Sat, 11 Feb 2023 01:26:11 +0000 (09:26 +0800)]
; * src/treesit.c: Improve sectioning.

22 months ago(project-vc-backend-markers-alist): Add entry for vc-got
Dmitry Gutov [Fri, 17 Feb 2023 22:54:02 +0000 (00:54 +0200)]
(project-vc-backend-markers-alist): Add entry for vc-got

* lisp/progmodes/project.el (project-vc-backend-markers-alist):
Add entry for vc-got (bug#61577).  Bump the version.

22 months agoproject.el: Extract backend->marker association for a defvar
Dmitry Gutov [Fri, 17 Feb 2023 22:50:29 +0000 (00:50 +0200)]
project.el: Extract backend->marker association for a defvar

* lisp/progmodes/project.el (project-vc-backend-markers-alist):
Extract from 'project-try-vc'.
(project-try-vc): Update accordingly (bug#61577).

22 months agoDon't completely clip into visible range in treesit_record_change
Yuan Fu [Fri, 17 Feb 2023 22:21:49 +0000 (14:21 -0800)]
Don't completely clip into visible range in treesit_record_change

(Bug#61369)

From
    min (visible_end, max (visible_beg, new_end_byte)) - visible_beg
to
    max (visible_beg, new_end_byte) - visible_beg

* src/treesit.c (treesit_record_change): We don't clip the new end
into the visible range anymore.  If you think of it, when inserting in
a narrowed region, the visible region is always extended to
accommodate more text, rather than pushing text at the end to keep the
size of the visible region.

22 months ago* lisp/treesit.el (treesit-node-at): Update docstring (bug#61529).
Dmitry Gutov [Fri, 17 Feb 2023 15:06:53 +0000 (17:06 +0200)]
* lisp/treesit.el (treesit-node-at): Update docstring (bug#61529).

22 months ago; Minor copyedit of NEWS wrt *-ts-modes
Eli Zaretskii [Fri, 17 Feb 2023 14:57:09 +0000 (16:57 +0200)]
; Minor copyedit of NEWS wrt *-ts-modes

* etc/NEWS: Add desktop.el caveat for when restarting after trying
the *-ts-modes.  Suggested by Alan Mackenzie <acm@muc.de>.

22 months ago* lisp/calc/calc.el (calc-mode): Improve docstring.
Stefan Kangas [Fri, 17 Feb 2023 14:23:19 +0000 (15:23 +0100)]
* lisp/calc/calc.el (calc-mode): Improve docstring.

22 months ago; Improve and update documentation of native compilation
Eli Zaretskii [Fri, 17 Feb 2023 14:15:51 +0000 (16:15 +0200)]
; Improve and update documentation of native compilation

* src/comp.c (syms_of_comp) <native-comp-enable-subr-trampolines>
<native-comp-eln-load-path>: Doc fixes.

* lisp/emacs-lisp/comp.el (native-comp-never-optimize-functions):
Doc fix.

* doc/lispref/compile.texi (Native-Compilation Variables):
Document 'native-comp-jit-compilation' and
'native-comp-enable-subr-trampolines'.

22 months agoUpdate ChangeLog and AUTHORS for Emacs 28.3
Stefan Kangas [Fri, 17 Feb 2023 09:43:58 +0000 (10:43 +0100)]
Update ChangeLog and AUTHORS for Emacs 28.3

* ChangeLog.3:
* etc/AUTHORS: Update for Emacs 28.3.

22 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)

(cherry picked from commit 01a4035c869b91c153af9a9132c87adb7669ea1c)

22 months agoFixed ctags local command execute vulnerability
lu4nx [Fri, 25 Nov 2022 06:38:29 +0000 (14:38 +0800)]
Fixed ctags local command execute vulnerability

* lib-src/etags.c:

(clean_matched_file_tag): New function
(do_move_file): New function
(readline_internal):
Add `leave_cr` parameter, if true, include the \r character

* test/manual/etags/CTAGS.good_crlf: New file
* test/manual/etags/CTAGS.good_update: New file
* test/manual/etags/crlf: New file
* test/manual/etags/Makefile: Add `ctags -u` test cases

(cherry picked from commit d48bb4874bc6cd3e69c7a15fc3c91cc141025c51)

22 months agoFix ruby-mode.el local command injection vulnerability (bug#60268)
Xi Lu [Fri, 23 Dec 2022 04:52:48 +0000 (12:52 +0800)]
Fix ruby-mode.el local command injection vulnerability (bug#60268)

* lisp/progmodes/ruby-mode.el
(ruby-find-library-file): Fix local command injection vulnerability.

(cherry picked from commit 9a3b08061feea14d6f37685ca1ab8801758bfd1c)

22 months agoFix htmlfontify.el command injection vulnerability.
Xi Lu [Sat, 24 Dec 2022 08:28:54 +0000 (16:28 +0800)]
Fix htmlfontify.el command injection vulnerability.

* lisp/htmlfontify.el (hfy-text-p): Fix command injection
vulnerability.  (Bug#60295)

(cherry picked from commit 1b4dc4691c1f87fc970fbe568b43869a15ad0d4c)

22 months agoMerge 'emacs-29' into 'feature/inhibit-native-comp-cleanup'
Andrea Corallo [Fri, 17 Feb 2023 10:14:38 +0000 (11:14 +0100)]
Merge 'emacs-29' into 'feature/inhibit-native-comp-cleanup'

22 months agoFix order of faces in 'face-list'
Eli Zaretskii [Fri, 17 Feb 2023 08:27:39 +0000 (10:27 +0200)]
Fix order of faces in 'face-list'

* lisp/faces.el (frame-face-alist, face-list): Sort faces in
decreasing order of face IDs.  Patch by Brennan Vincent
<brennan@umanwizard.com>.  (Bug#61521)

Copyright-paperwork-exempt: yes

22 months agoAllow 'icon-title-format' to have the value t
Eli Zaretskii [Fri, 17 Feb 2023 07:40:32 +0000 (09:40 +0200)]
Allow 'icon-title-format' to have the value t

* src/xdisp.c (gui_consider_frame_title, syms_of_xdisp): If the
value of 'icon-title-format' is t, use 'frame-title-format'
instead.  (Bug#61496)

* etc/NEWS:
* doc/lispref/frames.texi (Frame Titles): Document the new
handling of the value t.
(Basic Parameters): Fix the documentation of the 'title' and
'name' frame parameters.

22 months agoAdd electric indent for preproc directives
Theodor Thornhill [Wed, 15 Feb 2023 20:05:37 +0000 (21:05 +0100)]
Add electric indent for preproc directives

It looks like there are few if no other cases where we get this
particular error in the AST than with insertion of '#'.

Consider:

```
int
main()
{
  |
}
```

If we only add '#' the AST yields (ERROR (ERROR)), which we can
exploit to hook onto electric indent.  The end result should be the
hashtag anchored to column 0.

* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): New rule.
(c-ts-base-mode): Add # to electric-indent-chars.

22 months agoRename 'emacs-news-toggle-tag' to 'emacs-news-cycle-tag'
Robert Pluim [Thu, 16 Feb 2023 12:04:53 +0000 (13:04 +0100)]
Rename 'emacs-news-toggle-tag' to 'emacs-news-cycle-tag'

* lisp/textmodes/emacs-news-mode.el (emacs-news-cycle-tag): Renamed
from 'emacs-news-toggle-tag'.
(emacs-news-mode-map, emacs-news-mode-menu): Use new name.
* test/lisp/textmodes/emacs-news-mode-resources/cycle-tag.erts:
Renamed from "toggle-tag.erts".
* test/lisp/textmodes/emacs-news-mode-tests.el (emacs-news-cycle-tag):
Rename test from 'emacs-news-toggle-tag', and call
'emacs-news-cycle-tag' with new resource file name.

22 months agoAdd menu to news-mode
Robert Pluim [Thu, 16 Feb 2023 09:40:40 +0000 (10:40 +0100)]
Add menu to news-mode

* lisp/textmodes/emacs-news-mode.el (emacs-news-mode-map): Add binding
for 'emacs-news-delete-temporary-markers'.
(emacs-news-mode-menu): Add menu for common actions.

22 months ago; Avoid installing VC package dependencies multiple times
Philip Kaludercic [Thu, 16 Feb 2023 10:38:51 +0000 (11:38 +0100)]
; Avoid installing VC package dependencies multiple times

* lisp/emacs-lisp/package-vc.el (package-vc-install-dependencies):
Check if two package names are eq, instead checking the structural
equality of package-desc objects.

22 months agoAttempt to recognise if a VC package has no Elisp files
Philip Kaludercic [Thu, 16 Feb 2023 10:11:23 +0000 (11:11 +0100)]
Attempt to recognise if a VC package has no Elisp files

* lisp/emacs-lisp/package-vc.el (package-vc-non-code-file-names): Add
new variable used to avoid false-positives.
(package-vc--unpack): Recursively search for .el files excluding the
ones listed in 'package-vc-non-code-file-names', offering to abort the
installation if none are found.

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* Generate trampolines in a temporary directory if no other option is viable feature/inhibit-native-comp-cleanup
Andrea Corallo [Tue, 14 Feb 2023 10:21:45 +0000 (11:21 +0100)]
* Generate trampolines in a temporary directory if no other option is viable

* lisp/emacs-lisp/comp.el (comp--trampoline-abs-filename): Use
temporary file if no other option is viable.

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* Fix previous change
Andrea Corallo [Mon, 13 Feb 2023 16:00:31 +0000 (17:00 +0100)]
* Fix previous change

* lisp/emacs-lisp/generate-lisp-file.el (generate-lisp-file-trailer):
Fix previous change b6e2799aa1c.

22 months agoRename native-comp-deferred-compilation-deny-list
Andrea Corallo [Mon, 13 Feb 2023 15:40:02 +0000 (16:40 +0100)]
Rename native-comp-deferred-compilation-deny-list

* lisp/emacs-lisp/comp.el (native-comp-jit-compilation-deny-list)
(native-compile-async-skip-p): Rename
native-comp-deferred-compilation-deny-list into
native-comp-jit-compilation-deny-list.
(native-comp-deferred-compilation-deny-list): Mark it obsolete.

22 months agoRename native-comp-deferred-compilation into native-comp-jit-compilation
Andrea Corallo [Mon, 13 Feb 2023 15:37:43 +0000 (16:37 +0100)]
Rename native-comp-deferred-compilation into native-comp-jit-compilation

* src/comp.c (maybe_defer_native_compilation, syms_of_comp):
Rename native-comp-deferred-compilation into
native-comp-jit-compilation.

* lisp/subr.el (native-comp-deferred-compilation): Mark
native-comp-deferred-compilation as obsolete.

* lisp/startup.el (native-comp-deferred-compilation)
(normal-top-level): Rename native-comp-deferred-compilation into
native-comp-jit-compilation.

* lisp/progmodes/elisp-mode.el
(emacs-lisp-native-compile-and-load): Likewise.

* lisp/emacs-lisp/generate-lisp-file.el
(generate-lisp-file-trailer): Likewise.

22 months agoRename comp-enable-subr-trampolines into native-comp-enable-subr-trampolines
Andrea Corallo [Mon, 13 Feb 2023 15:33:40 +0000 (16:33 +0100)]
Rename comp-enable-subr-trampolines into native-comp-enable-subr-trampolines

* src/data.c (Ffset): Rename comp-enable-subr-trampolines into
native-comp-enable-subr-trampolines.

* src/comp.c (syms_of_comp): Likewise.

* lisp/subr.el (comp-enable-subr-trampolines): Make
comp-enable-subr-trampolines obsolete.

* lisp/startup.el (native-comp-enable-subr-trampolines)
(normal-top-level): Rename comp-enable-subr-trampolines into
native-comp-enable-subr-trampolines.

* lisp/loadup.el (dump-mode): Likewise.

* lisp/emacs-lisp/comp.el (comp-subr-trampoline-install)
(comp--trampoline-abs-filename): Likewise.

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* lisp/emacs-lisp/comp.el (native-comp-never-optimize-functions): Improve doc
Andrea Corallo [Mon, 13 Feb 2023 10:56:02 +0000 (11:56 +0100)]
* lisp/emacs-lisp/comp.el (native-comp-never-optimize-functions): Improve doc

22 months agoSupport `comp-enable-subr-trampolines' as string value
Andrea Corallo [Mon, 13 Feb 2023 10:09:46 +0000 (11:09 +0100)]
Support `comp-enable-subr-trampolines' as string value

* src/comp.c (syms_of_comp): Update `comp-enable-subr-trampolines'.

* lisp/emacs-lisp/comp.el (native-comp-never-optimize-functions)
(comp--trampoline-abs-filename): Support
`comp-enable-subr-trampolines' string value.

* src/data.c (Ffset): Use Vcomp_enable_subr_trampolines now.

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 ago* Some more `inhibit-native-compile' clean-up
Andrea Corallo [Mon, 13 Feb 2023 09:26:03 +0000 (10:26 +0100)]
* Some more `inhibit-native-compile' clean-up

* lisp/emacs-lisp/generate-lisp-file.el (generate-lisp-file-trailer):
Use `native-comp-deferred-compilation'.

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 agoRevert "Add new variable 'inhibit-native-compilation'"
Andrea Corallo [Mon, 13 Feb 2023 09:19:31 +0000 (10:19 +0100)]
Revert "Add new variable 'inhibit-native-compilation'"

This reverts commit 5fec9182dbeffa88cef6651d8c798ef9665d6681.

22 months agoRevert "Rename to inhibit-automatic-native-compilation"
Andrea Corallo [Mon, 13 Feb 2023 09:15:33 +0000 (10:15 +0100)]
Revert "Rename to inhibit-automatic-native-compilation"

This reverts commit f97993ee667f9be7589825f3a4fbc095d6944ec6.

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)