emacs.git
2 years ago; Fix typo
Stefan Kangas [Sat, 16 Dec 2023 23:14:43 +0000 (00:14 +0100)]
; Fix typo

* java/org/gnu/emacs/EmacsSafThread.java
(cacheDirectoryFromCursor): Fix typo.

2 years agoUsing remap for binding of log-edit-beginning-of-line.
Jared Finder [Sat, 16 Dec 2023 17:06:22 +0000 (09:06 -0800)]
Using remap for binding of log-edit-beginning-of-line.

* lisp/vc/log-edit.el (log-edit-mode-map): Change binding.

2 years agoMerge branch 'same-frame'
Stefan Monnier [Sat, 16 Dec 2023 18:13:23 +0000 (13:13 -0500)]
Merge branch 'same-frame'

2 years ago(display-buffer): New `pop-up-frames` action alist entry
Stefan Monnier [Sat, 9 Dec 2023 23:38:35 +0000 (18:38 -0500)]
(display-buffer): New `pop-up-frames` action alist entry

Allow overriding the `pop-up-frames` variable from `display-buffer-alist`
so as to provide a worthy replacement for the old `same-frame`
parameter of `special-display-*` (bug#67249).

* lisp/window.el (special-display-popup-frame): Declare obsolete;
that was apparently forgotten back when `special-display-*` variables
were declared obsolete.
Use the new `pop-up-frames` action alist entry instead of the variable.
(display-buffer): Document new alist entry.
(window--pop-up-frames): New function.
(display-buffer--maybe-pop-up-frame, display-buffer-in-previous-window)
(display-buffer-reuse-window, display-buffer-reuse-mode-window): Use it.

* doc/lispref/windows.texi (Choosing Window Options): Mention that
`pop-up-frames` is also an action alist entry.
(Buffer Display Action Alists): Add `pop-up-frames` entry.

2 years ago* lisp/subr.el (derived-mode-p): Disable warnings for old convention
Stefan Monnier [Sat, 16 Dec 2023 18:03:46 +0000 (13:03 -0500)]
* lisp/subr.el (derived-mode-p): Disable warnings for old convention

2 years ago; * lisp/startup.el (normal-top-level): Avoid byte-compiler warning.
Eli Zaretskii [Sat, 16 Dec 2023 14:26:26 +0000 (16:26 +0200)]
; * lisp/startup.el (normal-top-level): Avoid byte-compiler warning.

2 years agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 16 Dec 2023 14:17:51 +0000 (09:17 -0500)]
Merge from origin/emacs-29

bf4ccb0be07 ; * lisp/term.el (term--xterm-paste): Fix last change.
0d9e2e448d9 ; * doc/lispref/functions.texi (Function Documentation): ...
791cc5065da Fix shaping of Sinhala text
efcbf0b5abf Add use cases of (fn) documentation facility.
c3331cb3659 Fix pasting into terminal-mode on term.el
5be94e2bce5 Fix opening directory trees from Filesets menu
6b6e770a1f5 Eglot: Add ruff-lsp as an alternative Python server
ed8a8a5ba16 Fix symbol name in Multisession Variables examples
400ef15bdc3 js-ts-mode: Fix font-lock rules conflict
c165247c300 Add indentation rules for bracketless statements in js-ts...
7f1bd69cd19 Fix c-ts-mode bracketless indentation for BSD style (bug#...
e23068cb9a1 Add missing indent rules in c-ts-mode (bug#66152)
d2c4b926ac2 Fix treesit-default-defun-skipper (bug#66711)
9874561f39e Fix treesit-node-field-name and friends (bug#66674)
eace9e11226 python-ts-mode: Highlight default parameters
23c06c7c308 Update to Org 9.6.13

2 years ago; * lisp/term.el (term--xterm-paste): Fix last change.
Eli Zaretskii [Sat, 16 Dec 2023 14:08:52 +0000 (16:08 +0200)]
; * lisp/term.el (term--xterm-paste): Fix last change.

2 years ago; * doc/lispref/functions.texi (Function Documentation): Fix @itemize.
Eli Zaretskii [Sat, 16 Dec 2023 14:06:29 +0000 (16:06 +0200)]
; * doc/lispref/functions.texi (Function Documentation): Fix @itemize.

2 years agoFix shaping of Sinhala text
Eli Zaretskii [Sat, 16 Dec 2023 13:33:02 +0000 (15:33 +0200)]
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)

2 years ago; Move preload of rmc to a more appropriate place
Jens Schmidt [Thu, 14 Dec 2023 19:47:22 +0000 (20:47 +0100)]
; Move preload of rmc to a more appropriate place

See discussion on
https://lists.gnu.org/archive/html/emacs-devel/2023-12/msg00309.html.

* lisp/loadup.el ("emacs-lisp/rmc"): Move preload to a more
appropriate place.

2 years agoAdd use cases of (fn) documentation facility.
Jeremy Bryant [Sun, 3 Dec 2023 21:32:01 +0000 (21:32 +0000)]
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>
2 years ago; * lisp/net/shr.el (shr-put-image): No more need to test for nil ALT.
Eli Zaretskii [Sat, 16 Dec 2023 12:52:36 +0000 (14:52 +0200)]
; * lisp/net/shr.el (shr-put-image): No more need to test for nil ALT.

2 years agoFix 'shr-put-image' with nil value for ALT
Visuwesh [Mon, 11 Dec 2023 11:39:03 +0000 (17:09 +0530)]
Fix 'shr-put-image' with nil value for ALT

* lisp/net/shr.el (shr-put-image): Account for nil value for ALT.
(Bug#67764)

2 years agoFix pasting into terminal-mode on term.el
Eli Zaretskii [Sat, 16 Dec 2023 12:44:32 +0000 (14:44 +0200)]
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)

2 years ago; * doc/emacs/android.texi (Android Environment): Fix node name.
Eli Zaretskii [Sat, 16 Dec 2023 12:38:21 +0000 (14:38 +0200)]
; * doc/emacs/android.texi (Android Environment): Fix node name.

2 years agoOffer to show diff against auto-save in recover-file
Visuwesh [Wed, 6 Dec 2023 08:15:03 +0000 (13:45 +0530)]
Offer to show diff against auto-save in recover-file

* lisp/files.el (recover-file): Show diff against the selected auto
save file.  (Bug#52242)

* doc/emacs/files.texi (Recover): Document the new feature.

* etc/NEWS: Announce the new feature.

2 years agoFix opening directory trees from Filesets menu
Eli Zaretskii [Sat, 16 Dec 2023 11:25:58 +0000 (13:25 +0200)]
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)

2 years agoEglot: Add ruff-lsp as an alternative Python server
Niall Dooley [Fri, 24 Nov 2023 15:52:36 +0000 (16:52 +0100)]
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

2 years agoFix comint-next/previous-prompt in lua-ts-mode
john muhl [Mon, 4 Dec 2023 18:03:34 +0000 (12:03 -0600)]
Fix comint-next/previous-prompt in lua-ts-mode

* lisp/progmodes/lua-ts-mode.el (lua-ts-inferior-lua): Don't set
'comint-use-prompt-regexp'.  (Bug#67616)

2 years agoFix: add comint hook locally in lua-ts-inferior-lua
nverno [Mon, 4 Dec 2023 03:21:04 +0000 (19:21 -0800)]
Fix: add comint hook locally in lua-ts-inferior-lua

* lisp/progmodes/lua-ts-mode.el (lua-ts-inferior-lua): Add
'comint-preoutput-filter-functions' hook locally.  (Bug#67616)

2 years ago; * src/androidfns.c (syms_of_androidfns) <android-os-language>: Doc fix.
Eli Zaretskii [Sat, 16 Dec 2023 09:13:33 +0000 (11:13 +0200)]
; * src/androidfns.c (syms_of_androidfns) <android-os-language>: Doc fix.

2 years ago; * lisp/vc/vc-git.el (vc-git-print-log-follow): Doc fix.
Eli Zaretskii [Sat, 16 Dec 2023 09:04:24 +0000 (11:04 +0200)]
; * lisp/vc/vc-git.el (vc-git-print-log-follow): Doc fix.

2 years agoruby-syntax-methods-before-regexp: Drop this whitelist
Dmitry Gutov [Sat, 16 Dec 2023 02:57:44 +0000 (04:57 +0200)]
ruby-syntax-methods-before-regexp: Drop this whitelist

* lisp/progmodes/ruby-mode.el (ruby-syntax-before-regexp-re):
Match only based on keywords and operators.
(ruby-syntax-methods-before-regexp): Delete.
(ruby-syntax-propertize): Use the new heuristic based on spaces
instead of checking for method names before (bug#67569).

* test/lisp/progmodes/ruby-mode-tests.el
(ruby-regexp-not-division-when-only-space-before):
Use non-whitelisted method name.

* test/lisp/progmodes/ruby-mode-resources/ruby.rb:
Adjust two examples.

2 years agoProvide for Num Lock and Scroll Lock on Android
Po Lu [Sat, 16 Dec 2023 02:55:18 +0000 (10:55 +0800)]
Provide for Num Lock and Scroll Lock on Android

* java/org/gnu/emacs/EmacsWindow.java (onKeyDown, onKeyUp):
Retain META_NUM_LOCK_ON and META_SCROLL_LOCK_ON while filtering
meta state.

2 years ago; vc-print-log-setup-buttons: Update a TODO comment
Dmitry Gutov [Sat, 16 Dec 2023 00:34:34 +0000 (02:34 +0200)]
; vc-print-log-setup-buttons: Update a TODO comment

2 years ago(vc-print-log-setup-buttons): Start "previous" history with specified revision
Dmitry Gutov [Fri, 15 Dec 2023 23:48:29 +0000 (01:48 +0200)]
(vc-print-log-setup-buttons): Start "previous" history with specified revision

* lisp/vc/vc-git.el (vc-git-file-name-changes-switches): Remove
the comment above the option.  Seems unnecessary now.

* lisp/vc/vc.el (vc-print-log-setup-buttons): Start the "previous"
change history buffer with the specified revision, rather than
have the sentinel jump to it.  Apparently in some cases the
history of the old name can't be found.  In others, the log just
shows faster.  But note the caveat described in the second new
comment (bug#55871).

2 years agoShow buttons below vc-log even when REVISION is specified
Dmitry Gutov [Fri, 15 Dec 2023 23:36:47 +0000 (01:36 +0200)]
Show buttons below vc-log even when REVISION is specified

E.g. in the vc-print-branch-log which specifies start revision.

* lisp/vc/vc.el (vc-print-log-internal): Remove outdated comment.
(vc-print-log-setup-buttons): Only special-case non-nil
IS-START-REVISION when LIMIT=1.  We often do need buttons for logs
that start with a particular revision, because those are still limited
by vc-log-show-limit.

2 years agoSupport viewing VC change history across renames (Git, Hg)
Dmitry Gutov [Fri, 15 Dec 2023 20:26:59 +0000 (22:26 +0200)]
Support viewing VC change history across renames (Git, Hg)

* lisp/vc/vc.el (vc-print-log-setup-buttons):
When the log ends at a rename, add a button to jump to the
previous names.  Use the new backend action 'file-name-changes'.

* lisp/vc/vc-git.el (vc-git-print-log-follow): New option.
(vc-git-file-name-changes): Implementation (bug#55871, bug#39044).
(vc-git-print-log-follow): Update docstring.

* lisp/vc/log-view.el (log-view-find-revision)
(log-view-annotate-version): Pass the log's VC backend explicitly.

* lisp/vc/vc-hg.el (vc-hg-file-name-changes):
Add Hg implementation (bug#13004).

* etc/NEWS: Mention the changes.

2 years agoSupport case-sensitive register names
Eli Zaretskii [Fri, 15 Dec 2023 13:32:22 +0000 (15:32 +0200)]
Support case-sensitive register names

* lisp/register.el (register-read-with-preview): Make register
names case-sensitive.  (Bug#66394)

2 years ago; * doc/emacs/android.texi (Android Environment): Wording fixes.
Po Lu [Fri, 15 Dec 2023 11:55:30 +0000 (19:55 +0800)]
; * doc/emacs/android.texi (Android Environment): Wording fixes.

2 years agoFix symbol name in Multisession Variables examples
Adam Porter [Fri, 15 Dec 2023 00:28:53 +0000 (18:28 -0600)]
Fix symbol name in Multisession Variables examples

* doc/lispref/variables.texi (Multisession Variables): Fix symbol
name.  (Bug#67823)

2 years agoEglot: use new jsonrpc-autoport-bootstrap
João Távora [Thu, 14 Dec 2023 23:53:07 +0000 (23:53 +0000)]
Eglot: use new jsonrpc-autoport-bootstrap

* lisp/progmodes/eglot.el (eglot-lsp-server): Delete slot
inferior-process.
(eglot--on-shutdown): Simplify.
(eglot--inferior-bootstrap): Delete.
(eglot--connect): Call jsonrpc-autoport-bootstrap.

2 years agoJsonrpc: add new jsonrpc-autoport-bootstrap helper
João Távora [Thu, 14 Dec 2023 22:56:33 +0000 (22:56 +0000)]
Jsonrpc: add new jsonrpc-autoport-bootstrap helper

This will help Eglot and some other extensions connect to network
servers that are started with a call to a local program.

* lisp/jsonrpc.el (jsonrpc--process-sentinel): Also delete inferior.
(jsonrpc-process-connection): Add -autoport-inferior slot.
(initialize-instance jsonrpc-process-connection): Check
process-creating function arity.  Use jsonrpc-forwarding-buffer
(jsonrpc-autoport-bootstrap): New helper.
(Version): Bump to 1.0.20.

2 years agoEglot: beware activation in fundamental-mode
João Távora [Thu, 14 Dec 2023 16:32:54 +0000 (16:32 +0000)]
Eglot: beware activation in fundamental-mode

In the specific situation of visiting a buffer via M-. with
eglot-extend-to-xref set to t, it was found that buffer was first
visited in fundamental mode, running after-change-major-mode-hook, and
then again in the proper major mode for the file.  The call to
eglot-current-server of the first visit returned non-nil which cause
two didOpen notifications to be issued for the same file.

Furthermore, in the first call, eglot--languageId to returned nil,
prompting an error from servers such as rust-analyzer.

See also: https://github.com/joaotavora/eglot/discussions/1330

* lisp/progmodes/eglot.el (eglot-current-server): Watch out for
fundamental-mode.

2 years ago; * src/androidfns.c (syms_of_androidfns_for_pdumper): Fix crash.
Po Lu [Thu, 14 Dec 2023 05:57:59 +0000 (13:57 +0800)]
; * src/androidfns.c (syms_of_androidfns_for_pdumper): Fix crash.

2 years agoMerge remote-tracking branch 'savannah/master' into master-android-1
Po Lu [Thu, 14 Dec 2023 05:25:40 +0000 (13:25 +0800)]
Merge remote-tracking branch 'savannah/master' into master-android-1

2 years agoRespect Language & Input preferences under Android
Po Lu [Thu, 14 Dec 2023 05:24:42 +0000 (13:24 +0800)]
Respect Language & Input preferences under Android

* doc/emacs/android.texi (Android Environment):

* doc/emacs/cmdargs.texi (General Variables): Mention the manner
in which the default language environment is selected on
Android.

* lisp/startup.el (normal-top-level): If android and
initial-window-system, call android-locale-for-system-language
for the default locale name.

* lisp/term/android-win.el (android-locale-for-system-language):
New function.

* src/androidfns.c (syms_of_androidfns_for_pdumper): New
function.
(syms_of_androidfns) <Vandroid_os_language>: New variable.
Call syms_of_androidfns_for_pdumper both now and after
loading the dump image.

2 years agoJsonrpc: support some JSONesque non-JSONRPC protocols, like DAP
João Távora [Wed, 8 Nov 2023 14:36:04 +0000 (08:36 -0600)]
Jsonrpc: support some JSONesque non-JSONRPC protocols, like DAP

* lisp/jsonrpc.el (jsonrpc-convert-to-endpoint)
(jsonrpc-convert-from-endpoint): New generics.
(jsonrpc-connection-send): Call jsonrpc-convert-to-endpoint.
Rework logging.
(jsonrpc-connection-receive): Call jsonrpc-convert-from-endpoint.
Rework logging. jsonrpc--reply with METHOD.
(jsonrpc--log-event): Take subtype.
(Version): Bump to 1.0.19

* test/lisp/progmodes/eglot-tests.el (eglot--sniffing): Adapt
to new protocol of jsonrpc--log-event.

* doc/lispref/text.texi (JSONRPC Overview): Rework.

2 years agoJsonrpc: rework fix for bug#60088
João Távora [Mon, 11 Dec 2023 00:01:03 +0000 (00:01 +0000)]
Jsonrpc: rework fix for bug#60088

Try to decouple receiving text and processing messages in the event
loop.  This should allow for requests within requests in both Eglot
and the Dape extension (https://github.com/svaante/dape).

jsonrpc-connection-receive is now called from timers after the process
filter finished.  Because of this, a detail is that any serialization
errors are now thrown from timers instead of the synchronous process
filter, and there's no good way to test this in ert, so a test has
been deleted.

* lisp/jsonrpc.el (jsonrpc--process-filter): Rework.

* test/lisp/jsonrpc-tests.el (json-el-cant-serialize-this): Delete test.

2 years agoJsonrpc: better initforms in jsonrpc-connection
João Távora [Sat, 9 Dec 2023 20:13:39 +0000 (20:13 +0000)]
Jsonrpc: better initforms in jsonrpc-connection

* lisp/jsonrpc.el (jsonrpc-connection): Better initforms

2 years agoJsonrpc: allow method identifiers to be simply strings
João Távora [Wed, 8 Nov 2023 14:22:23 +0000 (08:22 -0600)]
Jsonrpc: allow method identifiers to be simply strings

* lisp/jsonrpc.el (jsonrpc-connection-send): Support string methods.

2 years agoImprove tramp-compat-connection-local-p
Michael Albinus [Wed, 13 Dec 2023 12:20:43 +0000 (13:20 +0100)]
Improve tramp-compat-connection-local-p

* lisp/net/tramp-compat.el (tramp-compat-connection-local-p):
Make it compatible with Emacs 27.

2 years ago* configure.ac: Fix '--without-all' if libgccjit installed (bug#67799)
Andrea Corallo [Wed, 13 Dec 2023 11:22:39 +0000 (12:22 +0100)]
* configure.ac: Fix '--without-all' if libgccjit installed (bug#67799)

2 years agojs-ts-mode: Fix font-lock rules conflict
Dmitry Gutov [Tue, 12 Dec 2023 22:00:38 +0000 (00:00 +0200)]
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.

2 years agoProvide option to forward Gnus messages with all (most) headers
Eric Abrahamsen [Fri, 8 Dec 2023 17:39:58 +0000 (09:39 -0800)]
Provide option to forward Gnus messages with all (most) headers

Bug#67520

* lisp/gnus/gnus-msg.el (gnus-summary-mail-forward): Accept symbolic
prefix to let-bind message-forward-included-headers to nil, which will
include most original message headers in the forwarded copy.
(gnus-summary-post-forward): Corresponding arglist update.

2 years agoNew macro connection-local-p
Michael Albinus [Tue, 12 Dec 2023 16:39:51 +0000 (17:39 +0100)]
New macro connection-local-p

* doc/lispref/variables.texi (Applying Connection Local Variables):
Add macro 'connection-local-p'.

* etc/NEWS: Add macro `connection-local-p'.

* lisp/files-x.el (connection-local-p): New macro.
(connection-local-value): Add debug declaration.

* lisp/net/tramp-compat.el (tramp-compat-connection-local-p): New macro.

* lisp/net/tramp-crypt.el (tramp-crypt-cleanup-connection):
Bind `tramp-crypt-enabled'.

* test/lisp/files-x-tests.el (files-x-test-connection-local-value):
* test/lisp/net/tramp-tests.el (tramp-test18-file-attributes)
(tramp-test35-remote-path): Adapt tests.

2 years agoAdd indentation rules for bracketless statements in js-ts-mode
Noah Peart [Sun, 10 Dec 2023 22:58:31 +0000 (14:58 -0800)]
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.

2 years agoFix typo in commit 3c093148958d56e0ed8e12a8e00ced1ef052259a
Juri Linkov [Mon, 11 Dec 2023 17:16:37 +0000 (19:16 +0200)]
Fix typo in commit 3c093148958d56e0ed8e12a8e00ced1ef052259a

* lisp/minibuffer.el (minibuffer-completion-help):
Set t to LOCAL arg of add-hook for after-change-functions.

2 years agoIntroduce menus beneath new chapters in the Transient menu
Po Lu [Mon, 11 Dec 2023 03:39:00 +0000 (11:39 +0800)]
Introduce menus beneath new chapters in the Transient menu

* doc/misc/transient.texi (Usage)
(Modifying Existing Transients): Insert menus from which Texinfo
4.13 can infer Prev and Next nodes.

2 years agoCorrect implementation of UTP
Po Lu [Mon, 11 Dec 2023 03:28:34 +0000 (11:28 +0800)]
Correct implementation of UTP

* src/sfnt.c (sfnt_interpret_utp): Derive which flags to reset
from the freedom vector.

2 years agoFix c-ts-mode bracketless indentation for BSD style (bug#66152)
Yuan Fu [Mon, 11 Dec 2023 02:24:27 +0000 (18:24 -0800)]
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.

2 years agoAdd missing indent rules in c-ts-mode (bug#66152)
Augustin Chéneau [Wed, 20 Sep 2023 10:23:06 +0000 (12:23 +0200)]
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.

2 years agoFix treesit-default-defun-skipper (bug#66711)
Yuan Fu [Mon, 11 Dec 2023 01:40:39 +0000 (17:40 -0800)]
Fix treesit-default-defun-skipper (bug#66711)

* lisp/treesit.el:
(treesit-default-defun-skipper): Add bol to the rx pattern.

2 years agoproject-any-command: Use 'project-aware'
Dmitry Gutov [Mon, 11 Dec 2023 01:19:11 +0000 (03:19 +0200)]
project-any-command: Use 'project-aware'

* lisp/progmodes/project.el (project-any-command): Change the
symbol it's looking for to 'project-aware'.  Seems to convey the
semantics best.

2 years agoFix treesit-node-field-name and friends (bug#66674)
Yuan Fu [Mon, 11 Dec 2023 00:23:44 +0000 (16:23 -0800)]
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.

2 years agopython-ts-mode: Highlight default parameters
Maciej Kalandyk [Sun, 10 Dec 2023 23:15:34 +0000 (01:15 +0200)]
python-ts-mode: Highlight default parameters

* lisp/progmodes/python.el (python--treesit-settings):
Highlight default parameters (bug#67703).

2 years agoMark `;#@` as :safe for asm-comment-char
Stefan Kangas [Sun, 10 Dec 2023 21:06:54 +0000 (22:06 +0100)]
Mark `;#@` as :safe for asm-comment-char

* lisp/progmodes/asm-mode.el (asm--safe-comment-char-p): New function
that returns true for characters #, @, and ;.
(asm-comment-char): Use new function as :safe predicate.

2 years ago; Use ?c instead of integer in local variables
Stefan Kangas [Sun, 10 Dec 2023 21:04:51 +0000 (22:04 +0100)]
; Use ?c instead of integer in local variables

* exec/loader-armeabi.s (timespec):
* exec/loader-mips64el.s (__start):
* exec/loader-mipsel.s (__start): Use ?c instead of integer in local
variables.

2 years agoUpdate to Org 9.6.13
Kyle Meyer [Sun, 10 Dec 2023 16:16:58 +0000 (11:16 -0500)]
Update to Org 9.6.13

2 years agoMerge from origin/emacs-29
Eli Zaretskii [Sun, 10 Dec 2023 15:35:54 +0000 (10:35 -0500)]
Merge from origin/emacs-29

2773cf9e013 ; Fix typos
020aff95fa3 ; Fix typos in ChangeLog files
5e03a621efc ; * lisp/progmodes/c-ts-mode.el (c-ts-mode--else-heuristi...
f0734e1c0d1 Fix c-ts-mode indent heuristic (bug#67417)
08fc6bace20 Fix c-ts-mode indentation (bug#67357)
71bc2815ccd Add font-locking for hash-bang lines in typescript-ts-mode.
db8347c8c87 Add font-locking for hash-bang lines in js-ts-mode
91f2ade57bb ruby-mode: Better detect regexp vs division (bug#67569)

2 years ago; Fix error in my last commit
Michael Albinus [Sun, 10 Dec 2023 14:15:12 +0000 (15:15 +0100)]
; Fix error in my last commit

* lisp/files-x.el (hack-connection-local-variables): Autoload.
(connection-local-value): Revert previous fix.

2 years ago* lisp/files-x.el (connection-local-value): Fix Dired crash.
Po Lu [Sun, 10 Dec 2023 14:05:09 +0000 (22:05 +0800)]
* lisp/files-x.el (connection-local-value): Fix Dired crash.

2 years agoUpdate publicsuffix.txt from upstream
Stefan Kangas [Sun, 10 Dec 2023 13:44:41 +0000 (14:44 +0100)]
Update publicsuffix.txt from upstream

* etc/publicsuffix.txt: Update from
https://publicsuffix.org/list/public_suffix_list.dat
dated 2023-12-06 20:17:45 UTC.

2 years ago; Fix a few more typos
Stefan Kangas [Sun, 10 Dec 2023 13:05:34 +0000 (14:05 +0100)]
; Fix a few more typos

2 years ago; Fix typos
Stefan Kangas [Sun, 10 Dec 2023 12:22:04 +0000 (13:22 +0100)]
; Fix typos

2 years ago; Fix typos
Stefan Kangas [Sun, 10 Dec 2023 11:39:54 +0000 (12:39 +0100)]
; Fix typos

2 years ago; Fix typos in ChangeLog files
Stefan Kangas [Sun, 10 Dec 2023 11:38:19 +0000 (12:38 +0100)]
; Fix typos in ChangeLog files

2 years agodired-listing-switches handles connection-local values if exist
Michael Albinus [Sun, 10 Dec 2023 11:26:38 +0000 (12:26 +0100)]
dired-listing-switches handles connection-local values if exist

* doc/emacs/dired.texi (Dired Enter):
* doc/misc/tramp.texi (Frequently Asked Questions):
* etc/NEWS: 'dired-listing-switches' handles connection-local
values if exist.

* doc/lispref/variables.texi (Applying Connection Local Variables):
Fix decription of connection-local-default-application.

* lisp/dired.el (dired-listing-switches): Adapt docstring.
(dired-internal-noselect, dired-mode):
* lisp/dired-x.el (dired-virtual):
* lisp/files.el (recover-file, recover-session):
* lisp/net/ange-ftp.el (ange-ftp-get-files): Use connection-local
value of `dired-listing-switches'.

* lisp/files-x.el (connection-local-value): Adapt docstring.

* lisp/man.el (Man-shell-file-name): Use `connection-local-value'.

2 years ago; * lisp/progmodes/c-ts-mode.el (c-ts-mode--else-heuristic): Doc fix.
Eli Zaretskii [Sun, 10 Dec 2023 09:41:35 +0000 (11:41 +0200)]
; * lisp/progmodes/c-ts-mode.el (c-ts-mode--else-heuristic): Doc fix.

2 years agoFix c-ts-mode indent heuristic (bug#67417)
Yuan Fu [Sun, 10 Dec 2023 09:24:25 +0000 (01:24 -0800)]
Fix c-ts-mode indent heuristic (bug#67417)

This is a continuation of the first two patches for bug#67417.  The
c-ts-mode--prev-line-match heuristic we added is too broad, so for now
we are just adding a very specific heuristic for the else case.

* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--prev-line-match): Remove function.
(c-ts-mode--else-heuristic): New function.
(c-ts-mode--indent-styles): Use c-ts-mode--else-heuristic.

2 years agoFix c-ts-mode indentation (bug#67357)
nverno [Wed, 22 Nov 2023 00:33:04 +0000 (16:33 -0800)]
Fix c-ts-mode indentation (bug#67357)

1. In a compund_statement, we indent the first sibling against the
parent, and the rest siblings against their previous sibling.  But
this strategy falls apart when the first sibling is not on its own
line.  We should regard the first sibling that is on its own line as
the "first sibling"", and indent it against the parent.

2. In linux style, in a do-while statement, if the do-body is
bracket-less, the "while" keyword is indented to the same level as the
do-body.  It should be indented to align with the "do" keyword
instead.

* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--no-prev-standalone-sibling): New function.
(c-ts-mode--indent-styles): Use
c-ts-mode--no-prev-standalone-sibling. Add while keyword indent rule.
* test/lisp/progmodes/c-ts-mode-resources/indent.erts: New tests.

2 years agoAdd font-locking for hash-bang lines in typescript-ts-mode.
nverno [Sat, 9 Dec 2023 19:35:44 +0000 (11:35 -0800)]
Add font-locking for hash-bang lines in typescript-ts-mode.

* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--font-lock-settings):
Add font-lock for hash bang line.

2 years agoAdd font-locking for hash-bang lines in js-ts-mode
nverno [Sat, 9 Dec 2023 19:28:15 +0000 (11:28 -0800)]
Add font-locking for hash-bang lines in js-ts-mode

* lisp/progmodes/js.el (js--treesit-font-lock-settings):
Add font-lock for hash bang line.

2 years agoTweak doc of `analyze-text-conversion` vs `post-self-insert-hook`
Stefan Monnier [Sat, 9 Dec 2023 23:03:48 +0000 (18:03 -0500)]
Tweak doc of `analyze-text-conversion` vs `post-self-insert-hook`

* lisp/simple.el (analyze-text-conversion): Fix typo.

* lisp/progmodes/cc-mode.el (c-initialize-cc-mode): Add comment about
`post-text-conversion-hook`.

2 years agoruby-mode: Better detect regexp vs division (bug#67569)
Dmitry Gutov [Sat, 9 Dec 2023 17:04:55 +0000 (19:04 +0200)]
ruby-mode: Better detect regexp vs division (bug#67569)

* lisp/progmodes/ruby-mode.el (ruby-syntax-before-regexp-re):
Add grouping around methods from the whitelist.
(ruby-syntax-propertize): Also look for spaces around the slash.

2 years agoFix desktop-save for dired buffers (bug#66697)
Manuel Giraud [Sat, 9 Dec 2023 12:02:19 +0000 (13:02 +0100)]
Fix desktop-save for dired buffers (bug#66697)

* lisp/dired.el (dired-desktop-save-p): Move all logic here.  Carry on
when 'desktop-files-not-to-save' is nil.
(dired-desktop-buffer-misc-data): Use it.

2 years ago; Auto-commit of loaddefs files.
Eli Zaretskii [Sat, 9 Dec 2023 12:59:08 +0000 (07:59 -0500)]
; Auto-commit of loaddefs files.

2 years ago; * lisp/progmodes/gud.el (lldb): Fix trailing whitespace.
Eli Zaretskii [Sat, 9 Dec 2023 12:57:35 +0000 (07:57 -0500)]
; * lisp/progmodes/gud.el (lldb): Fix trailing whitespace.

2 years ago; * doc/misc/modus-themes.org: Fix merge snafu.
Eli Zaretskii [Sat, 9 Dec 2023 12:46:45 +0000 (07:46 -0500)]
; * doc/misc/modus-themes.org: Fix merge snafu.

2 years agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 9 Dec 2023 12:25:21 +0000 (07:25 -0500)]
Merge from origin/emacs-29

0f361cc985d ; Minor copyedits in description of ':box' face property
46fe7a17f53 Fix dragging mode line on text terminals with a mouse (bu...
12daf386f37 ; * doc/lispref/processes.texi (Network): Fix wording and...
037d858dc1a (rust-ts-mode): Set electric-indent-chars
dc9b733ab88 js-ts-mode: Highlight function parameters inside destruct...
4a72f13bdfb js-ts-mode: Highlight property shorthands in assignments
83ed9018ede (js--treesit-font-lock-settings): Highlight parameters in...
ad0f87bb4c3 (js--treesit-font-lock-settings): Remove some duplicates
71c5f3694fd ; Another fix of doc string of 'message-mail-user-agent' ...
04a39353bae ; * lisp/gnus/message.el (message-mail-user-agent): Doc f...
82ddcf37ec6 ; * doc/lispref/files.texi (Changing Files): Fix last cha...
89068516b3e Don't claim to signal an error when deleting a nonexistin...
4fd254e1830 * lisp/indent.el (indent-rigidly): Improve prompt (bug#67...
5f923ff1a6a ; Fix typos
a1f88963f5d rust-ts-mode--comment-docstring: Handle block doc comments
a547b0e2e83 rust-ts-mode--comment-docstring: Fix/improve the previous...

2 years ago; Minor copyedits in description of ':box' face property
Eli Zaretskii [Sat, 9 Dec 2023 11:05:07 +0000 (13:05 +0200)]
; Minor copyedits in description of ':box' face property

* doc/lispref/display.texi (Face Attributes): Rearrange
description of ':box' attributes.  Suggested by Arash Esbati
<arash@gnu.org>.  (Bug#67713)

2 years ago; Fix documentation of register-preview changes
Eli Zaretskii [Sat, 9 Dec 2023 10:02:48 +0000 (12:02 +0200)]
; Fix documentation of register-preview changes

* etc/NEWS: Fix wording of 'register-use-preview' entry.

* lisp/register.el (register-use-preview): Doc fix.  Add ':version'.

2 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Michael Albinus [Sat, 9 Dec 2023 09:25:58 +0000 (10:25 +0100)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

2 years agoDocument ert-font-lock
Vladimir Kazanov [Sat, 9 Dec 2023 09:25:26 +0000 (10:25 +0100)]
Document ert-font-lock

* doc/misc/ert.texi: Expand the manual.

* etc/NEWS: Mention ert-font-lock.

2 years agoNew macro connection-local-value
Michael Albinus [Sat, 9 Dec 2023 09:13:14 +0000 (10:13 +0100)]
New macro connection-local-value

* doc/lispref/variables.texi (Applying Connection Local Variables):
Add macro 'connection-local-value'.

* etc/NEWS: Add macro 'connection-local-value'.

* lisp/files-x.el (connection-local-value): New macro.
(path-separator, null-device): Use it.

* test/lisp/files-x-tests.el
(files-x-test-connection-local-value): New test.

2 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Sat, 9 Dec 2023 09:07:22 +0000 (11:07 +0200)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

2 years ago; Hide completion preview when switching windows
Eshel Yaron [Tue, 5 Dec 2023 20:04:43 +0000 (21:04 +0100)]
; Hide completion preview when switching windows

* lisp/completion-preview.el
(completion-preview--window-selection-change): New function.
(completion-preview-active-mode): Add it to
'window-selection-change-functions'.  (Bug#67650)

2 years ago; * etc/NEWS: Fix typos.
Michael Albinus [Sat, 9 Dec 2023 09:05:20 +0000 (10:05 +0100)]
; * etc/NEWS: Fix typos.

2 years agoRemove old VC packages from 'package-alist' after installing
Philip Kaludercic [Sat, 9 Dec 2023 09:03:37 +0000 (10:03 +0100)]
Remove old VC packages from 'package-alist' after installing

* lisp/emacs-lisp/package-vc.el (package-vc--unpack-1): Wait for all
system operations to have been completed, before proceeding to remove
old package descriptors from 'package-alist'.  This avoids loosing a
package if an error occurs during upgrades.

2 years ago; Fix documentation of 'minibuffer-sort-by-history'
Eli Zaretskii [Sat, 9 Dec 2023 09:04:13 +0000 (11:04 +0200)]
; Fix documentation of 'minibuffer-sort-by-history'

* etc/NEWS:
* lisp/minibuffer.el (completions-sort): Doc fix.

2 years agoAdd font-lock tests for lua-ts-mode (bug#67605)
john muhl [Sun, 3 Dec 2023 16:56:04 +0000 (10:56 -0600)]
Add font-lock tests for lua-ts-mode (bug#67605)

* test/lisp/progmodes/lua-ts-mode-tests.el (lua-ts-test-font-lock):
Add ert-font-lock tests.
(lua-ts-mode-test-indentation):
(lua-ts-test-indentation):
(lua-ts-mode-test-movement):
(lua-ts-test-movement): Rename for consistency.
* test/lisp/progmodes/lua-ts-mode-resources/font-lock.lua: New
file.

2 years ago; Fix documentation of 'dired-do-open'
Eli Zaretskii [Sat, 9 Dec 2023 08:54:07 +0000 (10:54 +0200)]
; Fix documentation of 'dired-do-open'

* lisp/dired-aux.el (dired-do-open):
* etc/NEWS: Fix documentation of 'dired-do-open'.  (Bug#18132)

2 years agoFix dragging mode line on text terminals with a mouse (bug#67457)
Jared Finder [Sat, 9 Dec 2023 08:17:05 +0000 (10:17 +0200)]
Fix dragging mode line on text terminals with a mouse (bug#67457)

* lisp/xt-mouse.el (xterm-mouse-translate-1): Fix the 'event-kind'
property of mouse-movement symbols emitted by xt-mouse.
* lisp/term/linux.el (terminal-init-linux): Call 'gpm-mouse-mode'
to set up the terminal for the mouse, if needed.

2 years ago; * doc/lispref/processes.texi (Network): Fix wording and punctuation.
Eli Zaretskii [Sat, 9 Dec 2023 07:48:40 +0000 (09:48 +0200)]
; * doc/lispref/processes.texi (Network): Fix wording and punctuation.

2 years agoCorrect phantom point generation and MDAP
Po Lu [Sat, 9 Dec 2023 03:49:04 +0000 (11:49 +0800)]
Correct phantom point generation and MDAP

* src/sfnt.c (sfnt_interpret_mdrp): Cease applying cvt
cut in, as this is contrary to the specification.
(sfnt_interpret_simple_glyph): Correct typo.
(main): Revise tests.

2 years ago; * lisp/progmodes/project.el (project-any-command): Fix last change
Sean Whitton [Fri, 8 Dec 2023 22:37:06 +0000 (22:37 +0000)]
; * lisp/progmodes/project.el (project-any-command): Fix last change

2 years agoproject-any-command: Change the method for passing project root
Dmitry Gutov [Fri, 8 Dec 2023 20:30:48 +0000 (22:30 +0200)]
project-any-command: Change the method for passing project root

* lisp/progmodes/project.el (project-any-command): Change the
check which decides whether 'project-current-directory-override'
should be used.  Instead of looking in project-prefix-map, see
whether the command's name starts with 'project-', or the symbol
has the property 'project-command' (bug#67171).

2 years ago(rust-ts-mode): Set electric-indent-chars
Christophe TROESTLER [Fri, 8 Dec 2023 19:39:31 +0000 (21:39 +0200)]
(rust-ts-mode): Set electric-indent-chars

* lisp/progmodes/rust-ts-mode.el (rust-ts-mode):
Set electric-indent-chars (bug#67701).

2 years agoEglot: unbreak <host>:<port> spec in C-u M-x eglot (bug#67682)
João Távora [Fri, 8 Dec 2023 19:13:55 +0000 (19:13 +0000)]
Eglot: unbreak <host>:<port> spec in C-u M-x eglot (bug#67682)

* lisp/progmodes/eglot.el (eglot--guess-contact): Fix.