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

164379 commits

Author SHA1 Message Date
Eli Zaretskii
4d3428e95a Fix docstring fontification of CL's 'defstruct'
* lisp/emacs-lisp/lisp-mode.el (defstruct): Set 'doc-string'
property.  Patch by Nicolas Martyanoff <nicolas@n16f.net>.

Copyright-paperwork-exempt: yes
2023-02-02 20:12:02 +02:00
Eli Zaretskii
1c125baa3f Teach 'hs-minor-mode' about tree-sitter based modes
* lisp/progmodes/hideshow.el (hs-special-modes-alist): Teach
'hs-minor-mode' about tree-sitter based modes.  (Bug#61232)
2023-02-02 19:41:09 +02:00
Eli Zaretskii
2de0ab5cbd ; Doc fixes in keymap.el
* lisp/keymap.el (key-valid-p, key-translate, keymap-lookup)
(define-keymap): Doc fixes.
2023-02-02 16:14:15 +02:00
Eli Zaretskii
c6660a6d6d Improve documentation of 'repeat-mode' and related variables
* lisp/bindings.el (next-error-repeat-map)
(page-navigation-repeat-map, undo-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): Mention repeatable commands in the doc
strings.
* lisp/repeat.el (repeat-exit-timeout, repeat-check-key)
(repeat-echo-function, repeat-mode, repeat-check-key)
(repeat-check-map, repeat-echo-message-string)
(repeat-echo-message, repeat-echo-mode-line)
(describe-repeat-maps): Improve wording of doc strings.
(describe-repeat-maps): Improve wording of the heading line.
(Bug#61183)

* doc/emacs/basic.texi (Repeating): Clarify and improve wording of
'repeat-mode' documentation.
2023-02-02 15:34:58 +02:00
Eli Zaretskii
be304bb328 ; * etc/NEWS: Mention the 'utf-8-auto' bugfix (bug#60750). 2023-02-02 12:35:16 +02:00
Nicolas Martyanoff
9715715ac1 (eshell--complete-commands-list): Fix regression in fix to bug#48995
Copyright-Paperwork-Exempt: Yes

* lisp/eshell/em-cmpl.el (eshell--complete-commands-list):
Fix misuse of `completion-table-dynamic` when completing a file name.
2023-02-01 22:17:57 -05:00
Juri Linkov
ea1bb26315 * doc/emacs/basic.texi (Repeating): Mention describe-repeat-maps (bug#61183).
* lisp/repeat.el (describe-repeat-maps): Add more explanation to
the docstring.  Suggested by Robert Pluim <rpluim@gmail.com>.
2023-02-01 20:05:52 +02:00
Eli Zaretskii
f91bf9df89 Unbreak the MS-Windows build
* src/treesit.c (ts_query_pattern_count) [WINDOWSNT]: Load from
the library and define as macro.
2023-02-01 14:13:54 +02:00
Stefan Kangas
f7fcc62b78 ; Auto-commit of loaddefs files. 2023-02-01 05:08:25 +01:00
Dmitry Gutov
66aa9cb450 ; (Ftreesit_query_capture): Fix typo 2023-02-01 03:53:38 +02:00
Dmitry Gutov
f711f4e99f (Ftreesit_query_capture): Cache list of predicates for given pattern index
* src/treesit.c (Ftreesit_query_capture):
Cache list of predicates for given pattern index (bug#60953).
2023-02-01 03:45:55 +02:00
Robert Pluim
47ab9ba55d * lisp/keymap.el (keymap-global-unset): Correct prompt 2023-01-31 18:18:50 +01:00
Eli Zaretskii
49b6140558 Fix cursor-in-echo-area on TTY frames
* src/dispnew.c (update_frame_1): Fix off-by-one error when
positioning the cursor in the echo-area.  (Bug#61184)
2023-01-31 18:03:28 +02:00
Jonas Bernoulli
1684e254a3
Update to Transient v0.3.7-196-gb91f509 2023-01-30 22:39:38 +01:00
Alan Mackenzie
327941b211 CC Mode: Fix a coding bug in c-make-keywords-re. This should fix bug #61135
* lisp/progmodes/cc-defs.el (c-make-keywords-re): Generate "\>" components in
result regexp when argument ADORN is `appendable'.  This fully fixes a bug
which was half-fixed on 2019-01-22.
2023-01-30 20:02:36 +00:00
Juri Linkov
2f3683cd4d * lisp/isearch.el (isearch-emoji-by-name): Disable derived emoji (bug#60740).
Let-bind emoji--derived to nil to avoid the subsequent selection
of derived emoji that fails in transient.el.
2023-01-30 19:39:33 +02:00
Eli Zaretskii
86b03046c0 Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/emacs into emacs-29 2023-01-30 15:45:54 +02:00
Eli Zaretskii
e866490a07 Fix keymap inheritance in descendants of 'c-ts-base-mode'
* lisp/progmodes/c-ts-mode.el (c-ts-base-mode-map): Rename from
'c-ts-mode-map'.
(c-ts-base-mode): Adjust accordingly.  (Bug#60983)
2023-01-30 15:42:06 +02:00
Robert Pluim
f67a9a12b7 Fix interactive use of keymap-local-set' and keymap-global-set'
* lisp/keymap.el (keymap-global-set, keymap-local-set): Convert the
read key sequence to a string when called interactively.  Based on a
patch from Stephen Berman <stephen.berman@gmx.net>.  (Bug#61149)
2023-01-30 13:44:39 +01:00
Eli Zaretskii
dda4baa58b ; Fix build and startup without tree-sitter
* lisp/treesit.el (treesit--font-lock-level-setter): Don't loop
over all the buffers if tree-sitter is not built-in, or else
initialization of defcustom will fail.  (Bug#61155)
* lisp/progmodes/rust-ts-mode.el (treesit-node-parent):
* lisp/progmodes/c-ts-common.el (treesit-node-parent): Declare, to
* avoid byte-compilation warnings.
2023-01-30 14:22:19 +02:00
Michael Albinus
99e40959f4 Fix password prompt in Tramp (do not merge)
* lisp/net/tramp.el (tramp-password-prompt-regexp):
Allow alternative trailing colons.  (Bug#61168)
2023-01-30 11:43:04 +01:00
Kyle Meyer
8360e12f0e Update to Org 9.6.1-23-gc45a05 2023-01-29 21:42:17 -05:00
Eli Zaretskii
9058601308 ; * doc/emacs/misc.texi (Document View): Remove @footnote (bug#61152). 2023-01-29 19:00:59 +02:00
Eli Zaretskii
197f994384 Document tree-sitter features in the user manual
* lisp/progmodes/c-ts-mode.el (c-ts-mode-map): Bind "C-c .", for
consistency with CC mode.
* lisp/treesit.el (treesit-font-lock-level): Doc fix.

* doc/emacs/programs.texi (C Indent, Custom C Indent): Document
the indentation features of 'c-ts-mode'.
(Moving by Defuns): Document 'treesit-defun-tactic'.
* doc/emacs/files.texi (Visiting): Document
'treesit-max-buffer-size'.
* doc/emacs/display.texi (Traditional Font Lock)
(Parser-based Font Lock): New subsections.
* doc/emacs/emacs.texi (Top): Update top-level menu.
2023-01-29 15:22:20 +02:00
Yuan Fu
b73539832d
; Remove treesit--font-lock-fast-mode-grace-count
* lisp/treesit.el:
(treesit--font-lock-fast-mode-grace-count): Remove. Should've been
removed in the last change.
2023-01-29 00:30:53 -08:00
Randy Taylor
64fee21d5f
Fix dockerfile-ts-mode line continuation indentation (bug#61131)
Without this rule, line continuations are only indented after entering
the contents for the line and hitting TAB or RET.

For example:
```
EXPOSE 1 \
```

After hitting RET to go to the next line, point would end up at BOL
instead of lining up with the previous entry, like so:
```
EXPOSE 1 \
2
```

The new rule will indent it as so:
```
EXPOSE 1 \
       2
```

* lisp/progmodes/dockerfile-ts-mode.el:
(dockerfile-ts-mode--indent-rules): New rule.
(dockerfile-ts-mode--line-continuation-p)
(dockerfile-ts-mode--line-continuation-anchor): New functions.
2023-01-29 00:28:48 -08:00
Yuan Fu
1970726e26
Use treesit-subtree-stat to determine treesit--font-lock-fast-mode
* lisp/treesit.el:
(treesit--children-covering-range-recurse): Return nil if LIMIT is
exceeded.
(treesit--font-lock-fast-mode): Change to a ternary value.
(treesit-font-lock-fontify-region): Enable fast mode based on the
result of treesit-subtree-stat.
2023-01-29 00:12:57 -08:00
Yuan Fu
382e018856
Add treesit-subtree-stat
* src/treesit.c (Ftreesit_subtree_stat): New function.
* lisp/treesit.el (treesit): Add to shortdoc.
2023-01-29 00:12:57 -08:00
Yuan Fu
a3003492ac
Move c-ts-mode--statement-offset to c-ts-common.el
Now it can be used by other C-like languages.

* lisp/progmodes/c-ts-common.el (c-ts-common-indent-offset):
(c-ts-common-indent-block-type-regexp):
(c-ts-common-indent-bracketless-type-regexp): New variables.
(c-ts-common-statement-offset):
(c-ts-mode--fix-bracketless-indent):
(c-ts-mode--close-bracket-offset): New functions.

* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): Change
c-ts-mode--statement-offset to c-ts-common-statement-offset.
The (parent-is "if_statement") rules are now handled by (node-is
"compound_statement").

(c-ts-mode--statement-offset-post-processr):
(c-ts-mode--statement-offset):
(c-ts-mode--fix-bracketless-indent): Move to c-ts-common.el.

(c-ts-base-mode): Setup c-ts-common stuff.

* test/lisp/progmodes/c-ts-mode-resources/indent.erts: Make the test
more challenging.
2023-01-29 00:12:56 -08:00
Yuan Fu
4b1714571c
; Fix byte-compile warnings in c-ts-mode.el
* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--get-indent-style): Move down.
(c-ts-mode-set-style): Add docstring.
2023-01-29 00:12:56 -08:00
Yuan Fu
f50cb7d7c4
; Improve docstring of c-ts-mode--indent-style-setter
* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--indent-style-setter): Improve docstring.
2023-01-29 00:12:56 -08:00
Yuan Fu
1c3ca3bb64
Fix <> syntax in rust-ts-mode
Similar to bug#60351, the angle brackets in rust-ts-mode are not
recognized as pairs when they should be.  This change copies the
function used by c++-ts-mode and adapts it to rust-ts-mode.

* lisp/progmodes/rust-ts-mode.el:
(rust-ts-mode--syntax-propertize): New function.
(rust-ts-mode): Set up syntax-propertize-function.
2023-01-29 00:12:56 -08:00
Eli Zaretskii
56e8607dc9 Fix spurious errors on Windows when deleting temporary *.eln files
* lisp/emacs-lisp/comp.el (comp--native-compile): On MS-Windows,
ignore errors when deleting a temporary .eln file.  (Bug#60996)
2023-01-29 09:44:53 +02:00
Theodor Thornhill
2bd0b94753 Fix java class member without access modifier (bug#61115)
This

```
public class T {
    @Autowired
        String a;
}
```

Should be indented as:

```
public class T {
    @Autowired
    String a;
}
````

* lisp/progmodes/java-ts-mode.el (java-ts-mode--indent-rules): Add new
rule to match edge case of field_declaration indentation.
2023-01-28 19:51:08 +01:00
Theodor Thornhill
1de6ebf287 Make treesit-font-lock-level a defcustom
* lisp/treesit.el (treesit--font-lock-level-setter): Setter for the
new defcustom.
(treesit-font-lock-level): Turn it into a defcustom.
2023-01-28 19:40:04 +01:00
Theodor Thornhill
6e50ee8bbb Add c-ts-mode-set-style and :set for c-ts-mode-indent-style
* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-style-setter): New
setter for the indent style defcustom.
(c-ts-mode-indent-style): Don't quote the values and refer to the
setter.
(c-ts-mode-set-style): New command to interactively set the indent
style.
(c-ts-mode--get-indent-style): New function renamed from
'c-ts-mode--set-indent-style'.
2023-01-28 19:39:23 +01:00
Juri Linkov
450db0587a Minor documentation improvements for outline-minor-mode (bug#61062)
* doc/emacs/text.texi (Outline Minor Mode, Outline Minor Mode):
Add pxrefs to "Icons" and "Outline Visibility".

* etc/NEWS: Mention outline-minor-mode for two modes.
2023-01-28 19:59:22 +02:00
Eli Zaretskii
578e892671 ; * doc/lispref/variables.texi (File Local Variables): Improve indexing. 2023-01-28 16:59:17 +02:00
Eli Zaretskii
bc5ee2b7bf ; * src/comp.c: Remove Local Variables section to avoid warnings. 2023-01-28 16:52:44 +02:00
Brian Leung
362678d90e python.el: Use correct regexp when enabling python-ts-mode
* lisp/progmodes/python.el: Use "python[0-9.]*" regexp for
'interpreter-mode-alist', and not 'auto-mode-alist'.  (Bug#61090)
2023-01-28 13:26:53 +02:00
Eli Zaretskii
76bb46db9d ; * doc/emacs/frames.texi (Mouse References): Improve indexing. 2023-01-28 09:49:53 +02:00
Dmitry Gutov
128a999bfe Make project-current not error out inside non-existent dirs
* lisp/progmodes/project.el (project-try-vc):
Use condition-case to catch 'file-missing' (bug#61107).

* test/lisp/progmodes/project-tests.el
(project-vc-nonexistent-directory-no-error): New test.
2023-01-28 03:20:29 +02:00
Eli Zaretskii
194bc97879 Improve documentation of 'shell-command-dont-erase-buffer'
* doc/emacs/misc.texi (Single Shell):
* lisp/simple.el (shell-command, shell-command-on-region):
Document that non-nil value of 'shell-command-dont-erase-buffer'
affects what is displayed in the echo area after the command.
(Bug#61100)
2023-01-27 19:01:49 +02:00
Jostein Kjønigsen
00629c0396 Fix errors in fontification of JavaScript import-statements (bug#61083)
Currently js-ts-mode handles imports with aliases incorrectly. To be
consistent with how we otherwise do things, we should only highlight
the variable which is new and/or introduced, in this case "someAlias".

Attached is a patch which fontifies import-declarations somewhat more
correctly.

The following cases have been tested and all fontify properly:

import gnu from "fsf";              // highlights gnu
import { gnu2 } from "fsf2";        // highlights gnu2
import { gnu as gnu3 } from "fsf3"; // highlights gnu3
import * as gnu4 from "fsf4";       // highlights gnu4

* lisp/progmodes/js.el (js--treesit-font-lock-settings): Add new
import_clause rules that adhere to the comment above.
2023-01-27 13:50:13 +01:00
Jostein Kjønigsen
fd145499bb Fix fontification TypeScript of import-statements (bug#61081)
Currently typescript-ts-mode and tsx-ts-mode handles imports with
aliases incorrectly.

Consider the following case:

import { someFunc as someAlias } from "module";

In this case the entire import ("someFunc as someAlias") will be
highlighted as a variable name. "as" is also highlighted as a
variable, rather than a reserved keyword.

To be consistent with how we otherwise do things, we should only
highlight the variable which is new and/or introduced, in this case
"someAlias".

Attached is a patch which fontifies import-declarations somewhat more
correctly.

The following cases have been tested and all fontify properly:

import gnu from "fsf";              // highlights gnu
import { gnu2 } from "fsf2";        // highlights gnu2
import { gnu as gnu3 } from "fsf3"; // highlights gnu3
import * as gnu4 from "fsf4";       // highlights gnu4

* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--font-lock-settings): Tweak import_clause rules to
adhere to the comment above.
2023-01-27 13:50:13 +01:00
Stefan Kangas
752c526585 ; Fix typos 2023-01-27 11:33:35 +01:00
Stefan Kangas
5859413df2 ; * lisp/progmodes/cc-engine.el: Delete trailing whitespace.
This was holding up the automatic merges due to commit hooks.
2023-01-27 11:25:08 +01:00
Basil L. Contovounesios
f72a394716 Work around package.el transitive dependency bug
Eglot already depends transitively on Xref 1.4.0 via Project,
but package.el doesn't pick up on this in Emacs 28
(which has Xref 1.3.0).

* lisp/progmodes/eglot.el (Version): Bump to 1.11.
(Package-Requires): Explicitly require Xref 1.4.0, which is
the version already required by Project, for the benefit of
Emacs 28 (bug#61048).
2023-01-27 00:36:55 +00:00
Philip Kaludercic
3766a666b5 ; Fix issues with processing out-of-order IRC messages
* lisp/net/rcirc.el (rcirc-print): Always move to the beginning of the
line, before setting any markers.
2023-01-26 19:41:25 +01:00
Eli Zaretskii
f8c95d1a76 Fix xt-mouse on terminals that report UTF-8 encoded coordinates
* lisp/xt-mouse.el (xterm-mouse--read-coordinate): Fix conversion
of mouse coordinates in rxvt-unicode.  Patches by Vladimir
Panteleev <git@cy.md> and Jared Finder <jared@finder.org>.
(Bug#61022)
2023-01-26 10:54:43 +02:00