1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-19 01:10:57 -08:00
Commit graph

165932 commits

Author SHA1 Message Date
Eli Zaretskii
ccf46acefd ; Fix last change. 2023-12-26 14:51:37 +02:00
Eli Zaretskii
c86b039dff ; * etc/DEBUG: Improve advice for debugging native-compilation (bug#67900). 2023-12-26 14:49:50 +02:00
Stefan Kangas
9afba605bb Explain status "r" in epa-list-keys
* lisp/epa.el (epa-list-keys): Add revoked status to description.
Suggested by CHENG Gao <chenggao@icloud.com>.
2023-12-25 16:05:27 +01:00
Eli Zaretskii
6271422196 ; * lisp/dired.el (dired--make-directory-clickable): Reformat comment. 2023-12-25 15:07:21 +02:00
Jared Finder
fcbb004489 Fix mouse clicks on directory line in Dired
The option 'dired-kill-when-opening-new-dired-buffer' should be
also honored when clicking the mouse to kill prev buffer.
* lisp/dired.el (dired--make-directory-clickable): Call
'dired--find-possibly-alternative-file' instead of 'dired', in
the click callback.  (Bug#67856)
2023-12-25 15:02:34 +02:00
Eli Zaretskii
be8a7155b4 Fix 'split-root-window-right' and 'split-root-window-below'
* lisp/window.el (split-root-window-right)
(split-root-window-below): Fix the 'interactive' spec to avoid
misbehaving when invoked with no prefix argument.  (Bug#67452)
2023-12-25 14:59:26 +02:00
Stefan Kangas
eb19984c4d Mark icalendar.el as maintained by emacs-devel
* lisp/calendar/icalendar.el: Mark emacs-devel as the maintainer.
Ref: https://debbugs.gnu.org/34315#152
2023-12-24 15:02:55 +01:00
Eli Zaretskii
03dc914fd3 ; Fix footnotes in ELisp Intro manual 2023-12-24 10:46:04 +02:00
Xiyue Deng
ceacf75395 Fix usage of `setq-default' and offer more suggestions
cd61af0 changed from default-major-mode to major-mode in the first
code sample but didn't change the rest.  This patch fixes this and add
some explanations of why use `setq-default' instead of `setq'.  In
addition, it gives background on suggesting using text-mode as default
mode and suggest other alternatives.

* doc/lispintro/emacs-lisp-intro.texi (Text and Auto-fill): Fix usage
of `setq-default' and offer more suggestions.  (Bug#67848)
2023-12-24 10:38:46 +02:00
Yuan Fu
2701da0eee
Fix python-ts-mode triple quote syntax (bug#67262)
* lisp/progmodes/python.el (python--treesit-syntax-propertize): New function.
(python-ts-mode): Activate python--treesit-syntax-propertize.
2023-12-23 19:08:56 -08:00
Yuan Fu
683c7c9687
Increment parser timestamp when narrowing changes (bug#67977)
When narrowing changes, parse reparses, so the timestamp should
definitely increment, just like in ts_record_changes.

Failing to increment this timestamp, outdated nodes would think they
are still up-to-date, and try to print their type name.  Printing
their type name involves accessing the old parse tree, which is
already freed during the last reparse.

I also found that we don't increment timestamp when changing parser
ranges and fixed that as well.

* src/treesit.c (treesit_sync_visible_region):
(Ftreesit_parser_set_included_ranges): Increment timestamp.
* src/treesit.h (Lisp_TS_Parser): Add some comments.
2023-12-23 18:43:51 -08:00
Dmitry Gutov
8ae42c825e ruby-ts-mode: Fix indentation for string_array closer
* lisp/progmodes/ruby-ts-mode.el (ruby-ts--indent-rules):
Fix indentation for string_array closer.
2023-12-24 04:22:34 +02:00
Dmitry Gutov
9cfa498e0a treesit-major-mode-setup: Use 'treesit--syntax-propertize-notifier'
* lisp/treesit.el (treesit-major-mode-setup): Make sure
'treesit--syntax-propertize-notifier' is used (bug#66732)
2023-12-24 04:07:15 +02:00
Dmitry Gutov
da2e440462 ruby-ts-mode: Fix an out-of-bounds error with heredoc at eob
* lisp/progmodes/ruby-ts-mode.el (ruby-ts--syntax-propertize):
Fix an out-of-bounds error with heredoc at eob.
2023-12-24 03:58:49 +02:00
Yuan Fu
6ea507296a
Correctly refontify changed region in tree-sitter modes (bug#66732)
We already have treesit--font-lock-notifier that should mark changed
regions to be refontified, but it's called too late in the redsiplay &
fontification pipeline.  Here we add treesit--pre-redisplay that
forces reparse and calls notifier functions in
pre-redisplay-functions, which is early enough for the marking to take
effect.

Similarly, we force reparse in
syntax-propertize-extend-region-functions so syntax-ppss will have the
up-to-date syntax information when it scans the buffer text.  We also
record the lowest start position of the affected regions, and make
sure next syntex-propertize starts from that position.

* lisp/treesit.el (treesit--pre-redisplay-tick):
(treesit--syntax-propertize-start): New variable.
(treesit--syntax-propertize-notifier):
(treesit--pre-redisplay):
(treesit--pre-syntax-ppss): New functions.
(treesit-major-mode-setup): Add hooks.

* lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode): Remove notifier.
(ruby-ts--parser-after-change): Remove notifier function.
2023-12-23 15:03:26 -08:00
Michael Albinus
a475165738 * doc/man/emacsclient.1: Fix --tramp option. 2023-12-23 12:04:37 +01:00
Peter Oliver
1e5357d3d1 * doc/man/emacsclient.1: Add missing sections (bug#66598)
Copyright-paperwork-exempt: yes
2023-12-23 11:45:22 +02:00
Xiyue Deng
fba7b9db39 Add explanation for extra parentheses in ELisp Introduction
* doc/lispintro/emacs-lisp-intro.texi (fwd-para while): Add
a note to explain the extra parentheses.  (Bug#67820)
2023-12-23 11:35:33 +02:00
Xiyue Deng
7723282682 Add sample code to the "let*" section in "forward-paragraph"
* doc/lispintro/emacs-lisp-intro.texi (fwd-para let): Add code
sample.  (Bug#67817)
2023-12-23 10:48:06 +02:00
Denis Zubarev
7a00ca92c1
Fix treesit test (bug#67117)
* test/src/treesit-tests.el (treesit-search-subtree-forward-1):
(treesit-search-subtree-backward-1): Replace treesit--thing-at with
treesit-query-capture (treesit--thing-at isn't available in Emacs 29).
2023-12-22 22:59:30 -08:00
Yuan Fu
d220893216
Fix c++-ts-mode indentation (bug#67975)
* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): Make indent
rule match precise so it doesn't match declaration_list.
2023-12-22 21:25:45 -08:00
Stefan Kangas
d386a8aa43 Recommend customizing eglot for python-base-mode
* doc/misc/eglot.texi (Project-specific configuration): Recommend
setting directory local variables for 'python-base-mode' instead of
'python-mode'.  This makes any customizations effective also for
'python-ts-mode'.
2023-12-22 22:39:55 +01:00
Eli Zaretskii
bd0c758971 Improve documentation of new native-compilation commands
* lisp/progmodes/elisp-mode.el (emacs-lisp-mode-menu)
(emacs-lisp-native-compile, emacs-lisp-native-compile-and-load):
Doc fixes.

* doc/lispref/compile.texi (Native-Compilation Functions):
Document 'emacs-lisp-native-compile' and
'emacs-lisp-native-compile-and-load'.
2023-12-22 16:49:49 +02:00
Stefan Kangas
1ad126c0f2 ; Fix typo 2023-12-22 11:45:40 +01:00
Stefan Monnier
77678244b8 doc/lispintro: Don't mention set (bug#67734)
* doc/lispintro/emacs-lisp-intro.texi (Using set): Delete.
(Using setq): Adjust accordingly.
(setq): Rename from "set & setq" and don't refer to `set` any more.
(Review): Don't mention `set` any more.
2023-12-21 10:24:29 -05:00
Eli Zaretskii
cb3684e9df Fix script for some characters
* lisp/international/characters.el (char-script-table): Fix script
for 2 characters.

* admin/unidata/blocks.awk: Fix script for Yijing Hexagram
Symbols.  (Bug#67924)
2023-12-20 15:55:41 +02:00
Eli Zaretskii
2922d683b7 ; * src/treesit.c (treesit_traverse_child_helper): Fix comment. 2023-12-19 18:53:18 +02:00
Denis Zubarev
7b315e8a5c
Fix an issue when searching subtree backward (bug#67117)
* src/treesit.c (treesit_traverse_child_helper):
Do not call treesit_traverse_sibling_helper when the named node is
required and the last child is the named node.
Otherwise treesit_traverse_sibling_helper will move cursor to the
previous sibling and last node will be skipped.
* test/src/treesit-tests.el (treesit-search-subtree-forward-1):
(treesit-search-subtree-backward-1):
Add tests.
2023-12-18 18:25:26 -08:00
Christophe Deleuze
03625c2fef Fix passive mode for tnftp client in ange-ftp.el.
* lisp/net/ange-ftp.el (ange-ftp-passive-mode): Fix passive mode
result string for tnftp client.  (Bug#67865)

Copyright-paperwork-exempt: yes
2023-12-18 11:13:30 +01:00
Eli Zaretskii
b6429b1c1c ; Improve documentation of ispell.el's dictionary database
* lisp/textmodes/ispell.el (ispell-dictionary-base-alist)
(ispell-dictionary-alist): Doc fixes.  (Bug#67857)
2023-12-17 09:07:11 +02:00
Eli Zaretskii
75cc159341 ; * etc/PROBLEMS: Update the "GnuPG hangs" entry. 2023-12-17 08:09:22 +02:00
Stefan Kangas
67d9af1c07 Fix using disabled command without a docstring
* lisp/novice.el (disabled-command-function): Fix error when the
disable command has no docstring.  (Bug#67835)
2023-12-16 20:37:37 +01:00
Eli Zaretskii
f68f350023 Improve documentation of text properties handling when yanking
* doc/lispref/text.texi (Text Properties): Mention special
handling of text properties while yanking.
2023-12-16 21:21:33 +02:00
skykanin
06c399914f Eglot: Add Uiua language server
* lisp/progmodes/eglot.el (eglot-server-programs): Add Uiua language
server.  (Bug#67850)

Copyright-paperwork-exempt: yes
2023-12-16 19:35:53 +01:00
Eli Zaretskii
bf4ccb0be0 ; * lisp/term.el (term--xterm-paste): Fix last change. 2023-12-16 16:08:52 +02:00
Eli Zaretskii
0d9e2e448d ; * doc/lispref/functions.texi (Function Documentation): Fix @itemize. 2023-12-16 16:06:29 +02:00
Eli Zaretskii
791cc5065d Fix shaping of Sinhala text
* lisp/language/sinhala.el (composition-function-table): Allow
U+200D U+0DCA as well as U+0DCA U+200D between consonants.
Suggested by Richard Wordingham <richard.wordingham@ntlworld.com>.
(Bug#67828)
2023-12-16 15:33:02 +02:00
Jeremy Bryant
efcbf0b5ab Add use cases of (fn) documentation facility.
* doc/lispref/functions.texi (Function Documentation):  Add examples.
(Bug#67499)

Co-authored-by: Eli Zaretskii <eliz@gnu.org>
2023-12-16 14:57:06 +02:00
Eli Zaretskii
c3331cb365 Fix pasting into terminal-mode on term.el
* lisp/term.el (term--xterm-paste): Read pasted text from the
input event.  Suggested by Jared Finder <jared@finder.org>.
(Bug#49253)
2023-12-16 14:44:32 +02:00
Eli Zaretskii
5be94e2bce Fix opening directory trees from Filesets menu
In bug#976, the code was fixed, but the cautious condition in
the original author's code, which catered to invoking
'filelists-open' from the menu-bar menu, was omitted, which made
that invocation, which did work before, broken.
* lisp/filesets.el (filesets-get-filelist): Fix opening directory
trees from the Filesets menu-bar menu.  (Bug#67658)
2023-12-16 13:25:58 +02:00
Niall Dooley
6b6e770a1f Eglot: Add ruff-lsp as an alternative Python server
ruff-lsp [1] is an LSP server for Ruff [2], [3], a fast Python linter
and code formatter.

It supports surfacing Ruff diagnostics and providing Code Actions to
fix them, but is intended to be used alongside another Python LSP in
order to support features like navigation and autocompletion.

[1]: https://github.com/astral-sh/ruff-lsp
[2]: https://github.com/astral-sh/ruff
[3]: https://docs.astral.sh/ruff/

* lisp/progmodes/eglot.el (eglot-server-programs): Add ruff-lsp.

Copyright-paperwork-exempt: yes
2023-12-16 12:10:22 +01:00
Adam Porter
ed8a8a5ba1 Fix symbol name in Multisession Variables examples
* doc/lispref/variables.texi (Multisession Variables): Fix symbol
name.  (Bug#67823)
2023-12-15 01:54:35 +01:00
Dmitry Gutov
400ef15bdc js-ts-mode: Fix font-lock rules conflict
* lisp/progmodes/js.el (js--treesit-font-lock-settings): Move
'property' to after 'jsx'.  Stop using predicate (bug#67684).
(js--treesit-property-not-function-p): Delete.
2023-12-13 00:00:38 +02:00
Noah Peart
c165247c30 Add indentation rules for bracketless statements in js-ts-mode
* lisp/progmodes/js.el (js--treesit-indent-rules): Add indentation
rules to handle bracketless statements (bug#67758).
* test/lisp/progmodes/js-tests.el (js-ts-mode-test-indentation):
New test for js-ts-mode indentation.
* test/lisp/progmodes/js-resources/js-ts-indents.erts: New file
with indentation tests for js-ts-mode.
2023-12-12 03:13:12 +02:00
Yuan Fu
7f1bd69cd1
Fix c-ts-mode bracketless indentation for BSD style (bug#66152)
* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--indent-styles): Make sure the BSD rules only apply to
opening bracket (compound_statement), then bracketless statements will
fallback to common rules.
* test/lisp/progmodes/c-ts-mode-resources/indent-bsd.erts: Copy the
bracketless test from indent.erts to here.
2023-12-10 18:24:27 -08:00
Augustin Chéneau
e23068cb9a
Add missing indent rules in c-ts-mode (bug#66152)
Example:

    static myttype *
    variable_name;

* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): Add rules.
2023-12-10 17:51:48 -08:00
Yuan Fu
d2c4b926ac
Fix treesit-default-defun-skipper (bug#66711)
* lisp/treesit.el:
(treesit-default-defun-skipper): Add bol to the rx pattern.
2023-12-10 17:40:39 -08:00
Yuan Fu
9874561f39
Fix treesit-node-field-name and friends (bug#66674)
So turns out ts_node_field_name_for_child takes a named node index,
but we were passing it normal index that counts both named and
anonymous nodes.  That's what makes the field name all wrong in
treesit explorer.

* doc/lispref/parsing.texi:
(Accessing Node Information): Update docstring.
* lisp/treesit.el (treesit-node-index): Add some unrelated comment.
(treesit-node-field-name): Get named node index rather than all node
index.
* src/treesit.c (Ftreesit_node_field_name_for_child): Update
docstring, use ts_node_named_child_count.
2023-12-10 16:28:21 -08:00
Maciej Kalandyk
eace9e1122 python-ts-mode: Highlight default parameters
* lisp/progmodes/python.el (python--treesit-settings):
Highlight default parameters (bug#67703).
2023-12-11 01:34:41 +02:00
Kyle Meyer
23c06c7c30 Update to Org 9.6.13 2023-12-10 11:16:58 -05:00