1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-11 09:20:51 +00:00
Commit Graph

163891 Commits

Author SHA1 Message Date
Eli Zaretskii
265b91d891 Revert "; Bump minimum supported Windows version for MinGW64 to Windows 10."
This reverts commit 75155e4586.
Evidently, some MSYS2/MinGW64 folks still think Windows 8.1
is the minimum supported version, even though MinGW-w64 switched
to Windows 10 as the default target in January 2022.
2022-12-24 21:39:26 +02:00
Eli Zaretskii
75155e4586 ; Bump minimum supported Windows version for MinGW64 to Windows 10. 2022-12-24 20:45:08 +02:00
Eli Zaretskii
677f6c79eb ; Update minimum requirements of MinGW-w64
* etc/PROBLEMS (Dumping):
* nt/INSTALL.W64: Update the minimum OS version supported by
MinGW-w64.
2022-12-24 18:46:58 +02:00
Mattias Engdegård
7723af5e4a ; * lisp/progmodes/c-ts-mode.el: quote literal string in regexp 2022-12-24 17:01:36 +01:00
Eli Zaretskii
38866510c7 ; * src/xdisp.c (redisplay_internal): Reinstate the FRAME_LIVE_P test. 2022-12-24 12:27:17 +02:00
Eli Zaretskii
a825aa0b13 Fix definition of CNS 11643-15 charset
* lisp/international/mule-conf.el (chinese-cns11643-15): Fix
:code-offset value.  (Bug#60275)
* lisp/international/characters.el: Add chinese-cns11643-15 to
charsets whose characters have categories c and C.
2022-12-24 12:08:43 +02:00
Yuan Fu
a42b20dd95
; * lisp/progmodes/c-ts-mode.el: Add outline section headers. 2022-12-24 00:33:17 -08:00
Yuan Fu
e4e3634539
Improve c-ts-mode block comment indent (bug#60270)
Now it handles stuff like

/**
 * @some_func:
 * @arg1:
 */

* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): Use new
matcher and anchor.
(c-ts-mode--looking-at-star): New matcher.
(c-ts-mode--comment-start-after-first-star): New anchor.
2022-12-24 00:33:17 -08:00
Yuan Fu
e30621caa2
; Add treesit_recursion_limit
* src/treesit.c (treesit_recursion_limit): New constant.
(treesit_cursor_helper)
(Ftreesit_search_subtree)
(Ftreesit_induce_sparse_tree): Use the new constant.
2022-12-24 00:33:17 -08:00
Yuan Fu
6a43af5880
Fix block comment indent and filling for c-ts-mode (bug#59763)
Now indent and filling works like in c-mode.  The only noticeable
missing piece is that the "*/" is not attached to the last sentence
when filling.  c-mode does it by replacing whitespaces between the
"*/" and the end of the last sentence with xxx, fill it, then change
the xxx back. I don't know if we should do that in c-ts-mode's filling.

* doc/lispref/modes.texi (Parser-based Indentation): Add new preset.
* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): Add new
indent rule.
(c-ts-mode--fill-paragraph): New function.
(c-ts-base-mode): Setup paragraph-start, adaptive-fill, etc.
* lisp/treesit.el (treesit-simple-indent-presets): Add new preset.
2022-12-24 00:33:17 -08:00
Yuan Fu
e492c21e81
Fix treesit_cursor_helper (bug#60267)
The cause of that bug is that in a particular parse tree, the node
treesit_cursor_helper tries to go to is a missing node, not only is it
a missing node, it is the first node of a subtree.  So when
treesit_cursor_helper follows the algorithm and goes down the tree, it
goes down the previous subtree (because that subtree's end = end_pos,
because the target node has zero width).

    o
    |
 o--+-o
 |    |
 +-+  +-+-+
 | |  | | |
 o x  t o o

(We ended up in x when the target is t, because t has zero width.)

One way to solve it is to go back up the tree if we are at a leaf node
and still haven't matched the target node.  That's too ugly and
finicky so I resorted to recursion.  Now one more functions will
return give up (treesit_node_parent) if we are in a werid parse tree
that is super deep.  But since we already kind of give up on this kind
of parse trees (bug#59426), it doesn't really hurt.

* src/treesit.c (treesit_cursor_helper_1): New function.
(treesit_cursor_helper): Use the new function.  Change return type to
bool, and accept a cursor pointer.

(Ftreesit_node_parent)
(Ftreesit_search_subtree)
(Ftreesit_search_forward)
(Ftreesit_induce_sparse_tree): Use the new signature.
2022-12-24 00:33:16 -08:00
Paul Eggert
4437dbedf7 Fix restart-emacs alarms (Bug#60220)
* src/emacs.c (Fkill_emacs): Turn timers off before execing,
so that the re-execed Emacs doesn’t get a timer alarm.
2022-12-24 00:23:02 -08:00
Florian Weimer
121a9ff9f6 Fix alternate stack test in configure
* configure.ac (emacs_cv_alternate_stack): Include <stdlib.h>
for 'malloc's prototype.
2022-12-24 10:03:23 +02:00
Xi Lu
84888080ee Add more functions to "string" shortdoc
* lisp/emacs-lisp/shortdoc.el: Add 'string-or-null-p',
'char-or-string-p', 'char-uppercase-p'.  (Bug#60279)
2022-12-24 09:55:22 +02:00
Yaraslau Tamashevich
c90f97d4e5 Make the Contour terminal an alias of xterm-256color
* lisp/faces.el (term-file-aliases): Make the Contour terminal an
alias of xterm-256color.  (Bug#60278)

Copyright-paperwork-exempt: yes
2022-12-24 09:50:51 +02:00
Eli Zaretskii
c3fac9465f ; Fix punctuation in last change. 2022-12-24 09:40:56 +02:00
glacials
756bb422a4 Correct wrong info in (info)Go to node
The node (info)Go to node in the Info manual states that 'g'
does not allow the use of abbreviations, however it does.
To test this, type 'gt' from this node and see that it takes
you to (info)Top, then type 'ggo<RET>' and see that it takes
you back to (info)Go to node.  Tested on emacs 28.2.
* doc/misc/info.texi (Go to node): Fix inaccurate information.
(Bug#60263)

Copyright-paperwork-exempt: yes
2022-12-24 09:37:50 +02:00
Eli Zaretskii
a8c3424d28 Fix typo in TUTORIAL.fr (bug#60261)
* etc/tutorials/TUTORIAL.fr: Fix typo.  Reported by
Clément Escude--Cotinat <clement.escudecotinat@yahoo.fr>.
2022-12-24 09:32:08 +02:00
Daniel Martín
24cd2f0daf Add some diff-fixup-modifs tests
* test/lisp/vc/diff-mode-tests.el (diff-mode-test-fixups-added-lines):
Test that diff-mode fixes patches with added lines correctly.
* test/lisp/vc/diff-mode-tests.el (diff-mode-test-fixups-empty-hunks):
Ditto for patches with empty hunks.  (Bug#60259)
2022-12-24 09:27:07 +02:00
Ulrich Müller
d32091199a Fix quoted argument in emacsclient-mail.desktop Exec key
Apparently the emacsclient-mail.desktop file doesn't conform to the
Desktop Entry Specification at
https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#exec-variables
which says about the Exec key:

| Field codes must not be used inside a quoted argument, the result of
| field code expansion inside a quoted argument is undefined.

However, the %u field code is used inside a quoted argument of the
Exec key in both the [Desktop Entry] and [Desktop Action new-window]
sections.
* etc/emacsclient-mail.desktop (Exec): The Desktop Entry
Specification does not allow field codes like %u inside a quoted
argument. Work around it by passing %u as first parameter ($1)
to the shell wrapper.
* etc/emacsclient.desktop (Exec): Use `sh` rather than `placeholder`
as the command name of the shell wrapper.  (Bug#60204)
2022-12-24 09:19:40 +02:00
Richard Hansen
286c48137f ert-x: Move window selection logic to its own macro
* lisp/emacs-lisp/ert-x.el (ert-with-buffer-selected): New macro to
temporarily display a buffer in a selected window and evaluate a body.
(ert-with-test-buffer-selected): Use the new macro.
* test/lisp/whitespace-tests.el
(ert-test-with-buffer-selected/current)
(ert-test-with-buffer-selected/selected)
(ert-test-with-buffer-selected/nil-buffer)
(ert-test-with-buffer-selected/modification-hooks)
(ert-test-with-buffer-selected/read-only)
(ert-test-with-buffer-selected/return-value): Add tests.
(Bug#60189)
2022-12-24 09:14:23 +02:00
Richard Hansen
823c49cea8 ; ert-x: Simplify `ert-with-test-buffer-selected'
* lisp/emacs-lisp/ert-x.el (ert-with-test-buffer-selected):
Simplify using 'ert-with-test-buffer'.  (Bug#60189)
2022-12-24 09:12:12 +02:00
Richard Hansen
38c6abe4d0 ; ert-x: Add test for buffer read-only state
This test should have been included with commit
29b7d74000.
* test/lisp/emacs-lisp/ert-x-tests.el
(ert-test-with-test-buffer-selected/read-only): New test.
(Bug#60189)
2022-12-24 09:10:36 +02:00
Po Lu
0e39ad6fa5 Fix crash after X error
* src/xdisp.c (redisplay_internal): Catch another crash if
gcscrollbars after an X error.
2022-12-24 14:15:04 +08:00
Xi Lu
9a3b08061f Fix ruby-mode.el local command injection vulnerability (bug#60268)
* lisp/progmodes/ruby-mode.el
(ruby-find-library-file): Fix local command injection vulnerability.
2022-12-24 01:42:42 +02:00
Michael Albinus
4b44a395b3 ; * etc/NEWS: Fix typos. 2022-12-23 19:29:37 +01:00
Michael Albinus
458e175270 Merge branch 'emacs-29' of git.sv.gnu.org:/srv/git/emacs into emacs-29 2022-12-23 18:36:08 +01:00
Eli Zaretskii
eccb813a94 Fix "C-h k" in recursive minibuffers
* lisp/subr.el (event--posn-at-point): Leave POSN alone if it
doesn't have at least 6 members.  This follows more faithfully
what 'event-start' and 'event-end' did before they started using
this function, see commit c1cead89f5.  Call posn-at-point with
the minibuffer-window when in the minibuffer.  (Bug#60252)
2022-12-23 16:41:08 +02:00
Eli Zaretskii
6dda2106ec ; Improve documentation of "C-x @"
* doc/emacs/custom.texi (Modifier Keys): Document how to enter
Shift, Control, and Meta using "C-x @".

* lisp/simple.el (function-key-map): Add commentary to "C-x @"
bindings to make them easier to discover.
2022-12-23 14:37:04 +02:00
Eli Zaretskii
a0738e8ad1 ; * etc/NEWS: Announce the new behavior of 'C-h f'. (Bug#60252) 2022-12-23 13:32:18 +02:00
Sean Whitton
5a34e7c86c ; * admin/notes/git-workflow: Adding "Backport:" is optional. 2022-12-22 13:38:58 -07:00
Sean Whitton
baaa9f42e5 vc-git-checkin: Don't try to apply an empty patch
* lisp/vc/vc-git.el (vc-git-checkin): Don't try to apply an empty
patch to the index, because in that case 'git apply' fails.

(cherry picked from commit 1424342225)
2022-12-22 13:37:12 -07:00
Ikumi Keita
0754173c92 ; Fix docstring
* lisp/textmodes/reftex-vars.el
(reftex-allow-detached-macro-args): Fix macro name in docstring.
2022-12-22 18:23:34 +01:00
Michael Albinus
86b11981b0 Update Tramp version (don't merge with master)
* doc/misc/trampver.texi:
* lisp/net/trampver.el: Change version to "2.6.0.29.1".
(customize-package-emacs-version-alist):
Adapt Tramp version integrated in Emacs 29.1.
2022-12-22 16:46:00 +01:00
João Távora
014232d384 Eglot: eglot--servers-by-xrefed-file doesn't need to be value-weak
* lisp/progmodes/eglot.el (eglot--servers-by-xrefed-file): Doesn't
need to be weak.
2022-12-22 15:44:11 +00:00
João Távora
bbe35c280c Prevent stale servers when using eglot-extend-to-xref
A weak-valued hash-table is not enough to guarantee that a reference
to a zombie server in eglot--servers-by-xrefed-file variable won't
survive long enough to confuse the next call to eglot--current-server
in some buffers.

So, before this fix it was common to get "Process EGLOT ... not
running" errors if some xref-extended buffers (like system libraries)
were open and M-x eglot-reconnect was issued.  This should be
prevented now.

Note however, that even after this the eglot-extend-to-xref logic is
still flawed.  For example, if a buffer for the xref-extended buffer
happens to be already visited by the time M-. is issued to navigate to
it, Eglot won't be activated.  A half-decent workaround is to kill the
buffer and re-visit it.

* lisp/progmodes/eglot.el (eglot--servers-by-xrefed-file): Move
up.
(eglot--on-shutdown): Make sure to cleanup
eglot--servers-by-xrefed-file.
2022-12-22 11:30:19 +00:00
Eli Zaretskii
9bf13a3fb9 ; * src/alloc.c (Fmemory_info): Doc fix. 2022-12-22 13:02:45 +02:00
Xi Lu
baa33a5c05 * etc/tutorials/TUTORIAL.cn: Fix typos. (Bug#60221) 2022-12-22 11:19:15 +02:00
Eli Zaretskii
98d7f76b45 Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/emacs into emacs-29 2022-12-22 11:00:41 +02:00
Benson Chu
a488a6870a Add alias for removed font-lock function
As part of 18947103fa,
`font-lock-fontify-syntactically-region' was renamed to
`font-lock-default-fontify-sytactically'.

* lisp/font-lock.el (font-lock-fontify-syntactically-region): Add
obsolete alias for the renamed function.

Copyright-paperwork-exempt: yes
2022-12-22 10:57:34 +02:00
Yuan Fu
02e046566e
Set beginning/end-of-defun-function in treesit-major-mode-setup
* lisp/treesit.el (treesit-major-mode-setup): Set them.
2022-12-22 00:42:49 -08:00
Yuan Fu
7dea58b88d
Add treesit-defun-at-point and fix c-ts-mode-indent-defun
* lisp/treesit.el (treesit-defun-at-point): New function.
* lisp/progmodes/c-ts-mode.el (c-ts-mode-indent-defun): Implement with
treesit-defun-at-point.
2022-12-22 00:42:49 -08:00
Yuan Fu
69123d4aa4
; Fix treesit--defuns-around
Now it doesn't move point.

* lisp/treesit.el (treesit--defuns-around): Wrap some code with
save-excursion.
2022-12-22 00:42:49 -08:00
Juri Linkov
05d8310fb5 Use the new keyword ':repeat' in repeatable keymaps.
* lisp/bindings.el (undo-repeat-map)
(buffer-navigation-repeat-map, next-error-repeat-map)
(page-navigation-repeat-map):
* lisp/comint.el (comint-repeat-map):
* lisp/dired.el (dired-jump-map):
* lisp/outline.el (outline-navigation-repeat-map)
(outline-editing-repeat-map):
* lisp/shell.el (shell-repeat-map):
* lisp/tab-bar.el (tab-bar-switch-repeat-map)
(tab-bar-move-repeat-map):
* lisp/window.el (other-window-repeat-map)
(resize-window-repeat-map):
* lisp/winner.el (winner-repeat-map):
* lisp/eshell/em-prompt.el (eshell-prompt-repeat-map):
* lisp/eshell/esh-mode.el (eshell-command-repeat-map):
Add the keyword ':repeat' to 'defvar-keymap' instead of
setting the symbol property 'repeat-map' explicitly.

* lisp/keymap.el (defvar-keymap): Check for 'props'
that is used in 'defvar-form'.
2022-12-22 10:03:09 +02:00
Jim Porter
d6c8d5dbc9 When redirecting in Eshell, check for "/dev/null" specifically
This is so that users can type "cmd ... > /dev/null" in Eshell no
matter what their system's null device is called.  (Users can still
use their system's null device name when redirecting, too.  Eshell
doesn't need to do anything special to support that.)  This partially
reverts 67a8bdb90c.  See bug#59545.

Do not merge to master.

* lisp/eshell/esh-io.el (eshell-set-output-handle): Use "/dev/null"
literally.
2022-12-21 17:14:41 -08:00
Andrea Corallo
e59216d3be * Invoke spawed Emacs processes with '-Q' when native compiling (bug#60208)
* lisp/emacs-lisp/comp.el (comp-final): Invoke spawned Emacs with '-Q'.
(comp-run-async-workers): Likewise.
2022-12-21 23:29:33 +01:00
montag451
777b383dd0 Fix Eshell electric slash when used from the root directory of a remote host
* lisp/eshell/em-elecslash.el (eshell-electric-forward-slash): Insert
the remote prefix as determined by 'file-remote-p'.

Copyright-paperwork-exempt: Yes
2022-12-21 14:21:20 -08:00
Eli Zaretskii
c088cdad9e Fix the --without-all build with tree-sitter
* configure.ac (HAVE_TREE_SITTER): Set NEED_DYNLIB=yes, since
tree-sitter support requires dynlib.o.  (Bug#60061)
2022-12-21 21:53:03 +02:00
Eli Zaretskii
ec9fbad908 Fix write-region to null device on MS-Windows
* src/fileio.c (write_region) [WINDOWSNT]: Ignore EBADF errors
from fsync -- this means fsync is not supported for this file.
Happens, for example, with the null device.  (Bug#59545)
2022-12-21 21:23:51 +02:00
Alexander Adolf
f35da11199 message: Do not default to eudc-capf-complete yet
* lisp/gnus/message.el (message-mode): No longer add
eudc-capf-complete to the buffer-local value of
completion-at-point-functions.  (Bug#59314)
2022-12-21 12:36:30 -05:00