1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00
Commit graph

164613 commits

Author SHA1 Message Date
Robert Pluim
cf53e62a79 Add 'process-status' to process shortdoc
* lisp/emacs-lisp/shortdoc.el (process): Add 'process-status'.
2023-02-21 16:48:18 +01:00
Andrea Corallo
68df9e5953 * lisp/emacs-lisp/comp.el (comp--trampoline-abs-filename): Improve 5d0b45cd67 2023-02-21 16:39:39 +01:00
Robert Pluim
06ba948416 Improve text about deleting windows
* doc/emacs/windows.texi (Change Window): Improve grammar around
'delete-window-choose-selected'.
2023-02-21 16:35:25 +01:00
Robert Pluim
1976ca1634 Make 'emacs-news-cycle-tag' work at all levels
* lisp/textmodes/emacs-news-mode.el (emacs-news-cycle-tag): Search for
a heading starting with 2 or more '*' rather than exactly 3.
* test/lisp/textmodes/emacs-news-mode-resources/cycle-tag.erts
(Point-Char): Add tests for 2 and 4 '*' levels.
2023-02-21 15:25:36 +01:00
Mattias Engdegård
16ca258b1f Repair mistake in a previous edmacro-sanitize-string change
* lisp/edmacro.el (edmacro-sanitize-for-string):
This condition should not have been 'repaired' but removed altogether.
Do so now, fixing bug#61647.

Reported by Eduardo Ochs.

(cherry picked from commit 4eefadad06)
2023-02-21 10:31:41 +01:00
Stefan Monnier
5a864f23eb regex-emacs.c: Reduce the use of backtracking a bit further
bug#61514 exhibited some undesirable backtracking in a case where
it's easy to avoid it by making `mutually_exclusive_p` just a bit
more careful.

* src/regex-emacs.c (mutually_exclusive_p): Handle `on_failure_jump`s.

* test/src/regex-emacs-tests.el (regexp-tests-backtrack-optimization):
Add a few tests.
2023-02-20 21:22:41 -05:00
João Távora
e83c78b8c7 Eglot: respect user's Eldoc configuration by default
This change addresses the problems reported in many Elglot reports
dating back to early 2021 at least:

  https://github.com/joaotavora/eglot/issues/648
  https://github.com/joaotavora/eglot/issues/894
  https://github.com/joaotavora/eglot/issues/920
  https://github.com/joaotavora/eglot/issues/1031
  https://github.com/joaotavora/eglot/issues/1171

In one form or another, the reports point out that the multiple pieces
of information about the "thing at point" made available by the LSP
server are not all being considered by the ElDoc system.

The reason for this is Eglot setting/trampling the variables
'eldoc-documentation-strategy' and 'eldoc-documentation-functions' in
its minor more entry function.

The reason it did that is historical and is partially described in the
issues above.  But, evidently, it never made much sense, because so
many people want to override it, which requires setting
'eldoc-documentation-strategy' to the non-default value
'eldoc-documentation-compose'.

The problem was made worse by the fact that setting it as usual in
either the Customize menu or their init file didn't work, requiring a
fairly complex Elisp snippet.  That is now solved as of this commit.

If the user does not do any setting, then Eglot works basically the
same as before (i.e. shows only one piece of information).

It is arguable that the default value for
'eldoc-documentation-strategy' should change globally to
'eldoc-documentation-compose', but that has other subtle implications
and is not part of this commit.

* lisp/progmodes/eglot.el (eglot--managed-mode): Don't set Eldoc
variables greedily.
2023-02-20 22:44:30 +00:00
Andrea Corallo
5d0b45cd67 Make the native compiler always use `make-temp-file' for temporary files
* src/comp.c (CALL4I): Define macro.
(Fcomp__compile_ctxt_to_file): Use `make-temp-file' instead of
`make-temp-file-internal'.
* lisp/emacs-lisp/comp.el (comp--trampoline-abs-filename): Likewise.
2023-02-20 21:16:04 +01:00
Eli Zaretskii
88ee92e61d ; * lisp/progmodes/rust-ts-mode.el (treesit-node-end): Declare. 2023-02-20 19:30:02 +02:00
Jonas Bernoulli
02aba20d52
Update to Transient v0.3.7-216-gfe40342 2023-02-20 16:36:16 +01:00
Daniel Martín
d7010d64b2 Add declaration_list to c-ts-common-indent-type-regexp-alist
* lisp/progmodes/c-ts-mode.el (c-ts-base-mode): Consider a
"declaration_list" a block. (Bug#61635)
* test/lisp/progmodes/c-ts-mode-resources/indent.erts (Code): Add a
test case.
2023-02-20 15:07:56 +01:00
Theodor Thornhill
19480aa30e Typescript-ts-mode: Add switch case handling
* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--indent-rules): New rules.
2023-02-20 13:41:50 +01:00
Theodor Thornhill
dfc850ca02 Fix object initializer for csharp-mode (bug#61541)
* lisp/progmodes/csharp-mode.el (csharp-guess-basic-syntax): Make sure
we check the openers as well as closers.
2023-02-20 13:41:30 +01:00
Kyle Meyer
fc4bfa76db Update to Org 9.6.1-34-geea8da 2023-02-20 00:41:31 -05:00
Yuan Fu
afbce8bb46
Improve tree-sitter indent anchor prev-adaptive-prefix (bug#61314)
Now prev-adaptive-prefix looks at the current line and checks if it
begins with a prefix itself.  If it does, prev-adaptive-prefix tries
to place the anchor before the prefix on the previous line, rather
than after it.

 - prev line
 - this line -> This line starts with a "-", i.e., begins with a
                prefix, so we place the anchor at the beginning of the
                 "-" of the previous line, rather than after it

 - prev line
   this line -> This line doesn't start with a prefix, so the anchor
                is placed after the previous line's "-".

* doc/lispref/modes.texi (Parser-based Indentation): Update manual.
* lisp/treesit.el:
(treesit-simple-indent-presets): Add local variable
this-line-has-prefix, base what anchor to return on the value of
this-line-has-prefix and whether the prev line has a prefix.
2023-02-19 12:34:19 -08:00
Theodor Thornhill
2e6093b425 Adjust jsx indentation
We can use the fact that 'treesit-indent-1' uses 'treesit-node-on'
when on a whitespace to set the actual current node as parent.  Now we
can correctly indent the 'jsx_text' nodes.  We also add some more
electric-indent-chars so that auto-indenting of jsx behaves a little
more fluently.

* lisp/progmodes/js.el (js--treesit-indent-rules): Add new rules.
(js-ts-mode): Add more indent-chars.
* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--indent-rules): Add new rules.
* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-base-mode): Add more indent-chars and layout rules.
2023-02-19 20:48:06 +01:00
Theodor Thornhill
c544df4fa3 Cleanup preproc indent for c-ts-mode (bug#61558)
* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): Make sure we
indent to great-grand-parent if inside an #ifdef...#endif block.  If
grand-parent is root node, then don't indent one step.
(c-ts-mode--preproc-offset): New helper anchor function to calculate
indent offset.
2023-02-19 20:47:05 +01:00
Theodor Thornhill
d397f3d508 Add comment style toggle for c-ts-mode (bug#61550)
* lisp/progmodes/c-ts-mode.el (c-ts-mode-toggle-comment-style): New
command.
(c-ts-base-mode-map): Add binding.
(c-ts-mode-set-modeline): New function.
(c-ts-mode): Set modeline.
(c++-ts-mode): Set modeline.
2023-02-19 20:47:05 +01:00
Juri Linkov
683961cd73 * lisp/simple.el (choose-completion): Check for completion-in-region-mode.
Don't use base-affixes when completion-use-base-affixes is non-nil
in completion-in-region-mode (bug#61535).
2023-02-19 21:30:02 +02:00
Dmitry Gutov
1ac05eac74 rust-ts-mode--font-lock-settings: Avoid the explicit 'default' face
* lisp/progmodes/rust-ts-mode.el (rust-ts-mode--fontify-scope)
(rust-ts-mode--fontify-tail): New functions.
(rust-ts-mode--font-lock-settings): Use them instead of a lot of
more complex queries (bug#61302).  Thus avoid having to create
block fontification by other features using the 'default' face.
Replace the catch-all query for 'variable' with an enumeration of
possible parent nodes.
2023-02-19 19:18:19 +02:00
Dmitry Gutov
b5bea14ca1 * lisp/progmodes/xref.el: Bump the version. 2023-02-19 19:01:33 +02:00
Dmitry Gutov
a5b5f73d88 xref--insert-xrefs: Use 'shadow' for the line number colon
* lisp/progmodes/xref.el (xref--insert-xrefs): Use face 'shadow' for
the line number colon instead of continuing it face (bug#61340).

(cherry picked from commit d6d25a3c22)
2023-02-19 19:01:33 +02:00
Juri Linkov
6b90877359 * lisp/progmodes/xref.el (xref--insert-xrefs): Remove extra space (bug#61340).
(cherry picked from commit 643a11c6e5)
2023-02-19 19:01:33 +02:00
Mattias Engdegård
25c65e6b58 Backport: Fix xref-clear-marker-stack refactoring mistake
* lisp/progmodes/xref.el (xref-clear-marker-stack):
Clear the history correctly.  Changing a lexical variable has no effect.

(cherry picked from commit dfdc0f5fb7)
2023-02-19 19:01:33 +02:00
Stefan Kangas
ad6c6a3a11 ; Merge from origin/emacs-28
The following commit was skipped:

a44d906740 ; Commit files changed by "autoreconf -i -I m4 --force"
2023-02-19 17:38:00 +01:00
Stefan Kangas
9a6f22fd0b Merge from origin/emacs-28
f5a99945b6 ; Update ChangeLog for Emacs 28.3
f7bd5ac552 Update HISTORY for Emacs 28.3

# Conflicts:
#	etc/NEWS
2023-02-19 17:37:59 +01:00
Stefan Kangas
32be128382 ; Merge from origin/emacs-28
The following commits were skipped:

ba3aba3096 Bump Emacs version to 28.3
e61d743d44 Update NEWS for Emacs 28.3
2023-02-19 17:35:20 +01:00
Stefan Kangas
1630bfb5d0 Merge from origin/emacs-28
4a77fcb147 Update ChangeLog and AUTHORS for Emacs 28.3
2023-02-19 17:35:20 +01:00
Stefan Kangas
e2ac0d416b ; Merge from origin/emacs-28
The following commits were skipped:

e339926272 Fix etags local command injection vulnerability
5d05ea803e Fixed ctags local command execute vulnerability
22fb5ff512 Fix ruby-mode.el local command injection vulnerability (b...
807d2d5b3a Fix htmlfontify.el command injection vulnerability.
ae9bfed50d Fix storing email into nnmail by Gnus
2023-02-19 17:35:20 +01:00
Stefan Kangas
068b53500e ; Improve image-dired-thumbnail-storage docstring
* lisp/image/image-dired.el (image-dired-thumbnail-storage):
Improve docstring.
2023-02-19 17:30:53 +01:00
Eli Zaretskii
497ed0fb42 ; * doc/emacs/dired.texi (Image-Dired): Fix last change. 2023-02-19 17:09:18 +02:00
Manuel Giraud
4aa397e71b More doc on image-dired-dired-* (bug#61624)
* doc/emacs/dired.texi (Image-Dired): Some fixes and more
documentation about image-dired-dired-* commands.
2023-02-19 17:05:30 +02:00
Theodor Thornhill
893ddd5903 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.
2023-02-19 11:12:48 +00:00
Stefan Kangas
871cf33a45 ; * admin/make-tarball.txt: Minor copyedit. 2023-02-19 11:37:16 +01:00
Stefan Kangas
a44d906740 ; Commit files changed by "autoreconf -i -I m4 --force"
* build-aux/config.guess:
* build-aux/config.sub: Update files changed by running "autoreconf -i
-I m4 --force".  Do not merge.
2023-02-19 11:04:58 +01:00
Stefan Kangas
f5a99945b6 ; Update ChangeLog for Emacs 28.3
* ChangeLog.3: Refresh for Emacs 28.3.
* etc/NEWS: Add more information about fixed vulnerabilities.
2023-02-19 11:04:58 +01:00
Eli Zaretskii
4faebba2fe 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)
2023-02-19 11:29:32 +02:00
Eli Zaretskii
cd05fca5f7 ; 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'.
2023-02-19 11:04:57 +02:00
Manuel Giraud
c61a30e160 Update thumbnail buffer's header more
* lisp/image/image-dired.el (image-dired-display-thumbs): Call
image-dired--update-header-line.  (Bug#61508)
2023-02-19 08:24:52 +02:00
Dmitry Gutov
4c49452cde (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.
2023-02-18 23:53:11 +02:00
Dmitry Gutov
d560dc5044 (rust-ts-mode--font-lock-settings): Highlight closure parameters
* lisp/progmodes/rust-ts-mode.el
(rust-ts-mode--font-lock-settings): Highlight closure parameters.
2023-02-18 23:53:11 +02:00
Andrea Corallo
c15bc91e1b * 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'.
2023-02-18 22:44:05 +01:00
Eli Zaretskii
774051873d 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)
2023-02-18 20:03:33 +02:00
Eli Zaretskii
7337f07250 ; Remove NEWS entry about deleted variable. 2023-02-18 19:48:22 +02:00
Eli Zaretskii
fb5299ba09 ; Fix wording of last change. 2023-02-18 19:45:33 +02:00
martin rudalics
9f508cef85 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.
2023-02-18 19:24:59 +02:00
kobarity
5190ea6259 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)
2023-02-18 18:43:11 +02:00
Omar Polo
6c0d821017 (project-try-vc): Remove unused defvar/require
* lisp/progmodes/project.el (project-try-vc):
Remove unused defvar/require (bug#61577).
2023-02-18 15:11:13 +02:00
Stefan Kangas
4f9862e435 ; Fix typo 2023-02-18 13:39:28 +01:00
Stefan Kangas
a638c79bc5 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.
2023-02-18 13:35:37 +01:00