Eli Zaretskii [Sun, 29 Jan 2023 07:44:53 +0000 (09:44 +0200)]
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)
Theodor Thornhill [Sat, 28 Jan 2023 18:51:08 +0000 (19:51 +0100)]
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.
Theodor Thornhill [Sat, 28 Jan 2023 12:57:01 +0000 (13:57 +0100)]
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.
Theodor Thornhill [Wed, 25 Jan 2023 20:04:00 +0000 (21:04 +0100)]
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'.
Juri Linkov [Sat, 28 Jan 2023 17:59:22 +0000 (19:59 +0200)]
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.
Eli Zaretskii [Sat, 28 Jan 2023 14:59:17 +0000 (16:59 +0200)]
; * doc/lispref/variables.texi (File Local Variables): Improve indexing.
Eli Zaretskii [Sat, 28 Jan 2023 14:52:44 +0000 (16:52 +0200)]
; * src/comp.c: Remove Local Variables section to avoid warnings.
Brian Leung [Fri, 27 Jan 2023 01:36:42 +0000 (17:36 -0800)]
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)
Eli Zaretskii [Sat, 28 Jan 2023 07:49:53 +0000 (09:49 +0200)]
; * doc/emacs/frames.texi (Mouse References): Improve indexing.
Dmitry Gutov [Sat, 28 Jan 2023 01:17:39 +0000 (03:17 +0200)]
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.
Eli Zaretskii [Fri, 27 Jan 2023 17:01:49 +0000 (19:01 +0200)]
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)
Jostein Kjønigsen [Thu, 26 Jan 2023 19:32:18 +0000 (20:32 +0100)]
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.
Jostein Kjønigsen [Thu, 26 Jan 2023 18:54:27 +0000 (19:54 +0100)]
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.
Stefan Kangas [Mon, 23 Jan 2023 01:27:15 +0000 (02:27 +0100)]
; Fix typos
Stefan Kangas [Fri, 27 Jan 2023 10:25:08 +0000 (11:25 +0100)]
; * lisp/progmodes/cc-engine.el: Delete trailing whitespace.
This was holding up the automatic merges due to commit hooks.
Basil L. Contovounesios [Fri, 27 Jan 2023 00:27:26 +0000 (00:27 +0000)]
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).
Philip Kaludercic [Thu, 26 Jan 2023 18:39:16 +0000 (19:39 +0100)]
; 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.
Eli Zaretskii [Thu, 26 Jan 2023 08:54:43 +0000 (10:54 +0200)]
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)
Randy Taylor [Wed, 25 Jan 2023 02:20:48 +0000 (21:20 -0500)]
Fix go-ts-mode indentation and set indent offset to 8 (Bug#61006)
* lisp/progmodes/go-ts-mode.el (go-ts-mode-indent-offset): Change
default value to 8.
(go-ts-mode--indent-rules): Add indentation for parameters and
interfaces.
Eli Zaretskii [Thu, 26 Jan 2023 08:23:58 +0000 (10:23 +0200)]
; * src/insdel.c (insert_from_buffer): Fix assertions.
Eli Zaretskii [Thu, 26 Jan 2023 07:59:58 +0000 (09:59 +0200)]
Fix doc strings of window-splitting commands
* lisp/window.el (split-window-below, split-window-right): Doc
fixes. (Bug#60886)
Yuan Fu [Thu, 26 Jan 2023 07:47:27 +0000 (23:47 -0800)]
Fix indentation for c-ts-mode (bug#61026)
Fix indentation for things like
while (true)
if (true)
{
puts ("Hello");
}
Note that the outer while loop omits brackets.
* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--statement-offset-post-processr): New variable.
(c-ts-mode--statement-offset): Use the new function.
(c-ts-mode--fix-bracketless-indent): New function.
(c-ts-base-mode): Use the new function.
* test/lisp/progmodes/c-ts-mode-resources/indent.erts: New tests.
Yuan Fu [Thu, 26 Jan 2023 07:12:41 +0000 (23:12 -0800)]
Fix call to treesit_record_change in insdel.c
The start position of the change shouldn't be PT_BYTE, IIUC PT_BYTE is
actually the end position.
* src/insdel.c (insert_from_buffer): Move to here.
(insert_from_buffer_1): Remove call to treesit_record_change.
Randy Taylor [Thu, 19 Jan 2023 14:16:55 +0000 (09:16 -0500)]
Add support for building tree-sitter modules with MinGW
* admin/notes/tree-sitter/build-module/build.sh: Add support for
building tree-sitter modules with MinGW.
Michael Albinus [Wed, 25 Jan 2023 19:14:12 +0000 (20:14 +0100)]
* lisp/net/tramp.el (tramp-wrong-passwd-regexp): Fix regexp.
Juri Linkov [Wed, 25 Jan 2023 18:19:44 +0000 (20:19 +0200)]
* doc/emacs/text.texi (Outline Minor Mode): New node split from "Outline Mode"
(Outline Mode): Move all outline-minor-mode related information to the
new node "Outline Minor Mode" (bug#61062).
Juri Linkov [Wed, 25 Jan 2023 17:38:01 +0000 (19:38 +0200)]
; * etc/NEWS: Minor reordering.
Move Exif section closer to Image changes, define-keymap/defvar-keymap
and lookup-key closer to Keymaps section.
Dmitry Gutov [Wed, 25 Jan 2023 15:21:49 +0000 (17:21 +0200)]
ruby-ts-mode: Don't reindent when "class" or "def" is under "ERROR"
* lisp/progmodes/ruby-ts-mode.el (ruby-ts--indent-rules):
Don't reindent when "class" or "def" is under "ERROR" (bug#61017).
Dmitry Gutov [Wed, 25 Jan 2023 15:01:28 +0000 (17:01 +0200)]
treesit-install-language-grammar: Provide default repo url
* lisp/treesit.el (treesit--check-repo-url): New function.
(treesit--install-language-grammar-build-recipe): Use it (bug#61051).
Basil L. Contovounesios [Wed, 25 Jan 2023 14:24:39 +0000 (14:24 +0000)]
Fix Dired face for directory symlinks
* lisp/dired.el (dired-font-lock-keywords): Fontify directory
symlinks with the value of dired-directory-face rather than its name
as a (nonexistent) face (bug#60977).
Basil L. Contovounesios [Wed, 25 Jan 2023 01:02:30 +0000 (01:02 +0000)]
Pacify --without-x unused function warning
* src/xfaces.c (font_maybe_unset_attribute): Move definition...
[HAVE_WINDOW_SYSTEM] (font_maybe_unset_attribute): ...to here, since
the function is used only when we HAVE_WINDOW_SYSTEM (bug#61049).
Michael Albinus [Wed, 25 Jan 2023 14:31:33 +0000 (15:31 +0100)]
; * etc/NEWS: Fix typos.
Robert Pluim [Wed, 25 Jan 2023 13:23:44 +0000 (14:23 +0100)]
Announce outline.el keymaps
* etc/NEWS: Announce new keymaps.
Arash Esbati [Wed, 25 Jan 2023 10:02:24 +0000 (11:02 +0100)]
; Don't mention in the Gnus manual user options that were removed
* doc/misc/gnus.texi (HTML): Delete entries for custom variables
removed in commit
2c8b2fc8d5. (Bug#61054)
Jostein Kjønigsen [Wed, 25 Jan 2023 09:38:09 +0000 (10:38 +0100)]
Fix fontification of function-valued variables (bug#61053)
* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--font-lock-settings): Remove overrides and reorder
the variable_declarator rule.
Theodor Thornhill [Wed, 25 Jan 2023 12:00:33 +0000 (13:00 +0100)]
Add new java indent rules
* lisp/progmodes/java-ts-mode.el (java-ts-mode--indent-rules): Check
for enum_body_declarations and switch_label.
F. Jason Park [Wed, 25 Jan 2023 03:49:02 +0000 (19:49 -0800)]
; * doc/misc/erc.texi: Improve Local Modules section.
F. Jason Park [Tue, 24 Jan 2023 10:34:29 +0000 (02:34 -0800)]
; Fix filename mismatches in prop lines of ERC tests
* test/lisp/erc/erc-scenarios-base-compat-rename-bouncer.el: Fix file
name in prop line and footer.
* test/lisp/erc/erc-scenarios-base-local-modules.el: Fix file name in
prop line and footer.
* test/lisp/erc/erc-scenarios-base-netid-samenet.el: Fix file name in
prop line and footer.
* test/lisp/erc/erc-scenarios-base-upstream-recon-soju.el: Fix file
name in prop line and footer.
* test/lisp/erc/erc-scenarios-base-upstream-recon-znc.el: Fix file
name in prop line and footer.
Juri Linkov [Tue, 24 Jan 2023 18:48:20 +0000 (20:48 +0200)]
Handle relative file names in vc-resynch-window and vc-resynch-buffer
* lisp/vc/vc-dispatcher.el (vc-resynch-window, vc-resynch-buffer):
While comparing with `buffer-file-name' if `file' is not absolute
use `expand-file-name' in `vc-root-dir'. This fixes the case of
refreshing the buffers after typing `C-x v = C-x v u' (bug#60897).
Robert Pluim [Tue, 24 Jan 2023 18:37:56 +0000 (20:37 +0200)]
Use named keymaps for outline buttons
https://lists.gnu.org/archive/html/emacs-devel/2023-01/msg00334.html
* lisp/outline.el (outline-button-icon-map)
(outline-overlay-button-map, outline-inserted-button-map):
Keymaps refactored from outline--create-button-icons and
outline--insert-button.
(outline--create-button-icons, outline--insert-button): Move
keymaps to separate variables.
Juri Linkov [Tue, 24 Jan 2023 18:24:15 +0000 (20:24 +0200)]
* lisp/vc/vc-bzr.el (vc-bzr--pushpull): Return buffer's process.
* lisp/vc/vc-git.el (vc-git--pushpull): Add comment.
* lisp/vc/vc.el (vc-pull-and-push): Expand docstring about
prerequisites for backend to support this command (bug#60569).
Michael Albinus [Tue, 24 Jan 2023 17:27:57 +0000 (18:27 +0100)]
; Fix last change in etc/NEWS
Michael Albinus [Tue, 24 Jan 2023 08:27:17 +0000 (09:27 +0100)]
; * etc/NEWS: Fix typos.
Alan Mackenzie [Mon, 23 Jan 2023 21:28:32 +0000 (21:28 +0000)]
CC Mode: Change the default value of objc-font-lock-extra-types to nil
This fixes bug #59234, in which random identifiers in a .m file were getting
fontified as types.
* lisp/progmodes/cc-vars.el (objc-font-lock-extra-types): Change the default
value to nil.
* etc/NEWS: Mention the change in default value of objc-font-lock-extra-types,
and how to get the old behavior back.
Jim Porter [Mon, 23 Jan 2023 06:54:53 +0000 (22:54 -0800)]
Don't try to make a pipe process for remote processes in Eshell
Tramp currently isn't able to handle this, so the result will just
produce an error (bug#61024).
* lisp/eshell/esh-proc.el (eshell-gather-process-output): Check for a
remote 'default-directory' before trying to make a pipe process.
* test/lisp/eshell/esh-proc-tests.el
(esh-var-test/output/remote-redirect): New test.
Eli Zaretskii [Mon, 23 Jan 2023 13:09:07 +0000 (15:09 +0200)]
* lisp/startup.el (command-line): Fix warning message. (Bug#61014)
Juri Linkov [Mon, 23 Jan 2023 07:55:29 +0000 (09:55 +0200)]
* lisp/find-dired.el (find-dired): Fix bug where M-p skips first history item.
Don't apply "skip first duplicate history item" trick when find-args
used as initial input is nil.
Kyle Meyer [Mon, 23 Jan 2023 02:53:39 +0000 (21:53 -0500)]
Update to Org 9.6.1-16-ge37e9b
Dmitry Gutov [Sun, 22 Jan 2023 18:50:54 +0000 (20:50 +0200)]
(ruby-ts--predefined-variables): Fix the $` and $' entries
* lisp/progmodes/ruby-ts-mode.el (ruby-ts--predefined-variables):
Fix the $` and $' entries, somehow replaced by curly quote.
Reported by Mattias Engdegård.
Juri Linkov [Sun, 22 Jan 2023 17:51:51 +0000 (19:51 +0200)]
* lisp/find-dired.el (find-dired-with-command): Quote find-command-history.
Juri Linkov [Sun, 22 Jan 2023 17:27:10 +0000 (19:27 +0200)]
Generalize vc-pull-and-push to support more backends (bug#60569)
* lisp/vc/vc-git.el (vc-git-pull-and-push): Remove and move its logic to
vc-pull-and-push.
* lisp/vc/vc.el (vc-pull-and-push): Add code from vc-git-pull-and-push.
Benjamin Riefenstahl [Tue, 17 Jan 2023 18:13:39 +0000 (20:13 +0200)]
Add test suite for sgml-html-meta-auto-coding-function
* test/lisp/international/mule-tests.el (sgml-html-meta-pre)
(sgml-html-meta-post, sgml-html-meta-run, sgml-html-meta-utf-8)
(sgml-html-meta-windows-hebrew, sgml-html-meta-none)
(sgml-html-meta-unknown-coding, sgml-html-meta-no-pre)
(sgml-html-meta-no-post-less-than-10lines)
(sgml-html-meta-no-post-10lines, sgml-html-meta-utf-8-with-bom): Add.
Benjamin Riefenstahl [Tue, 17 Jan 2023 18:08:15 +0000 (20:08 +0200)]
Fix decoding HTML files from archives
* lisp/international/mule.el (sgml-xml-auto-coding-function): Avoid
signaling an error from coding-system-equal when the XML encoding tag
specifies an encoding whose type is 'charset'. (Bug#61005)
This is the same fix as in #
df7ed10e for
sgml-xml-auto-coding-function.
Eli Zaretskii [Sun, 22 Jan 2023 13:12:05 +0000 (15:12 +0200)]
; Fix last change (bug#60556).
Eli Zaretskii [Sun, 22 Jan 2023 13:07:55 +0000 (15:07 +0200)]
Avoid crashes in batch Emacs sub-processes on MS-Windows
* src/w32.c (shutdown_handler): When run in a separate thread,
don't call functions that only the main (a.k.a. "Lisp") thread can
call; instead, arrange for maybe_quit to kill Emacs.
* src/w32fns.c (emacs_abort): Don't show GUI Abort dialogs in
non-interactive sessions. (Bug#60556)
Theodor Thornhill [Sun, 22 Jan 2023 10:14:00 +0000 (11:14 +0100)]
Tweak BSD style indentation (bug#60984)
* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): Simplify
rules.
* test/lisp/progmodes/c-ts-mode-resources/indent-bsd.erts: New
testfile with bsd style indentation examples.
* test/lisp/progmodes/c-ts-mode-tests.el
(c-ts-mode-test-indentation-bsd): Add a test for the new style.
Theodor Thornhill [Sun, 22 Jan 2023 09:58:31 +0000 (10:58 +0100)]
Fix typo of exposed symbol name
* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): Remove
double hyphen.
Theodor Thornhill [Sun, 22 Jan 2023 09:46:08 +0000 (10:46 +0100)]
Fix typo after move to common lib (bug#61001)
* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): Use correct
preset.
Dmitry Gutov [Sun, 22 Jan 2023 02:55:13 +0000 (04:55 +0200)]
ruby-ts-mode: Fix two additional cases with ruby-method-call-indent=nil
* lisp/progmodes/ruby-ts-mode.el (ruby-ts--indent-rules):
Fix two additional cases with ruby-method-call-indent=nil.
* test/lisp/progmodes/ruby-mode-resources/ruby-method-call-indent.rb:
Add examples.
Dmitry Gutov [Sun, 22 Jan 2023 02:40:40 +0000 (04:40 +0200)]
ruby-mode.el: Expand some docstrings with examples
* lisp/progmodes/ruby-mode.el (ruby-align-chained-calls)
(ruby-method-params-indent): Expand docstrings with examples.
Po Lu [Sun, 22 Jan 2023 00:37:06 +0000 (08:37 +0800)]
Minor fixes for Haiku
* lisp/frame.el (display-symbol-keys-p):
* lisp/simple.el (normal-erase-is-backspace-setup-frame): Add
support for Haiku.
Theodor Thornhill [Sat, 21 Jan 2023 11:24:55 +0000 (12:24 +0100)]
Move c-like common utils into own library (bug#60961)
* lisp/progmodes/c-ts-common.el: New file.
* lisp/progmodes/c-ts-mode.el (treesit-induce-sparse-tree): Remove
unused declaration.
(c-ts-mode--indent-styles): Refer to the new library.
(c-ts-mode--looking-at-star,
c-ts-mode--comment-start-after-first-star,
c-ts-mode--comment-2nd-line-matcher,
c-ts-mode--comment-2nd-line-anchor, c-ts-mode--comment-regexp,
c-ts-mode--fill-paragraph, c-ts-mode--fill-block-comment): Move to
c-ts-common and expose as public.
(c-ts-mode-comment-setup): Move to c-ts-common.
* lisp/progmodes/csharp-mode.el (c-ts-common): Require new library.
(csharp-ts-mode--indent-rules): Refer to the new symbols.
(csharp-ts-mode): Use new function.
* lisp/progmodes/java-ts-mode.el (c-ts-common): Require new library.
(java-ts-mode--indent-rules): Refer to the new symbols.
(java-ts-mode): Use new function.
* lisp/progmodes/js.el (c-ts-common): Require new library.
(js--treesit-indent-rules): Refer to the new symbols.
(js-ts-mode): Use new function.
* lisp/progmodes/rust-ts-mode.el (c-ts-common): Require new library.
(rust-ts-mode--indent-rules): Refer to the new symbols.
(rust-ts-mode): Use new function.
* lisp/progmodes/typescript-ts-mode.el (c-ts-common): Require new
library.
(typescript-ts-mode--indent-rules): Refer to the new symbols.
(typescript-ts-base-mode): Use new function.
Philip Kaludercic [Sat, 21 Jan 2023 17:56:47 +0000 (18:56 +0100)]
; Actually use dummy package descriptor
* lisp/emacs-lisp/package-vc.el (package-vc--unpack): Set pkg-desc if
nil.
This revises the changes from
70947da708c8e06e31a2930520b38bafe43dba39.
Michael Albinus [Sat, 21 Jan 2023 11:04:50 +0000 (12:04 +0100)]
Fix file-regular-p in Tramp
* test/lisp/net/tramp-archive-tests.el
(tramp-archive-test18-file-attributes)
(tramp-archive-test21-file-links):
* test/lisp/net/tramp-tests.el (tramp-test18-file-attributes)
(tramp-test21-file-links): Adapt tests.
* lisp/net/tramp.el (tramp-handle-file-regular-p): Fix symlink
case. (Bug#60943)
Eli Zaretskii [Sat, 21 Jan 2023 07:51:34 +0000 (09:51 +0200)]
Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/emacs into emacs-29
Eli Zaretskii [Sat, 21 Jan 2023 07:50:59 +0000 (09:50 +0200)]
; * doc/emacs/custom.texi (Init Rebinding): Fix wording in last change.
Panagiotis Koutsourakis [Tue, 17 Jan 2023 18:57:41 +0000 (20:57 +0200)]
; Reword user documentation on binding keys in Lisp
* doc/emacs/custom.texi (Init Rebinding): Move the description of
'kbd' farther down. (Bug#60859)
Theodor Thornhill [Fri, 20 Jan 2023 21:16:25 +0000 (22:16 +0100)]
Fix typo in c-ts-mode (bug#60932)
* lisp/progmodes/c-ts-mode.el (c-ts-mode-indent-block-type-regexp):
enumerator, not enumeratior.
Mike Kupfer [Mon, 16 Jan 2023 21:50:49 +0000 (13:50 -0800)]
MH-E: handle removal of mhparam libdir from nmh 1.8
* lisp/mh-e/mh-e.el (mh-variant-nmh-info): If "libdir" doesn't
work, try "libexecdir" (Bug#60952) (SF#491).
Theodor Thornhill [Fri, 20 Jan 2023 21:37:47 +0000 (22:37 +0100)]
Use point-min to anchor top-level constructs (bug#60602)
* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): New anchor.
* lisp/progmodes/java-ts-mode.el (java-ts-mode--indent-rules): New
anchor.
* lisp/progmodes/ruby-ts-mode.el (ruby-ts--indent-rules): New anchor.
* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--indent-rules): New anchor.
Dmitry Gutov [Fri, 20 Jan 2023 21:32:21 +0000 (23:32 +0200)]
* lisp/org/ob-ruby.el: Fix outdated comments.
Dmitry Gutov [Fri, 20 Jan 2023 17:25:12 +0000 (19:25 +0200)]
; ruby-ts-mode: Add a Version tag
Dmitry Gutov [Fri, 20 Jan 2023 17:08:22 +0000 (19:08 +0200)]
; ruby-ts-mode: Update font-lock features list in Commentary
Dmitry Gutov [Fri, 20 Jan 2023 16:43:56 +0000 (18:43 +0200)]
(project-try-vc): Add string-start and string-end anchors to marker-re
* lisp/progmodes/project.el (project-try-vc):
Add string-start and string-end anchors to marker-re (bug#60956).
Robert Pluim [Thu, 19 Jan 2023 15:05:45 +0000 (16:05 +0100)]
Make `keymap-set-after' work for menus
It still doesn't work for an AFTER that's a key, though, since
`key-parse' produces vectors, and keymaps contain integers.
* lisp/keymap.el (keymap-set-after): Only parse AFTER as a key if it's
a string. For consistency, use `key-parse' on the definition if it's
a string, just like `keymap-set'.
* test/src/keymap-tests.el (keymap-tests--command-3): New dummy command.
(keymap-set-after-menus): New test. Check that we can insert a menu
item after a specific entry.
Robert Pluim [Thu, 19 Jan 2023 14:58:51 +0000 (15:58 +0100)]
Use `key-parse' in `keymap-lookup'
It's stricter than `kbd', and doesn't try to do anything with key
sequences that look like macros.
* lisp/keymap.el (keymap-lookup): Use `key-parse' instead of `kbd'.
* test/src/keymap-tests.el (keymap-set-after-menus): Test the
`keymap-set-after' API.
Robert Pluim [Thu, 19 Jan 2023 14:56:21 +0000 (15:56 +0100)]
Improve `keymap-set-after' documentation
* doc/lispref/keymaps.texi (Changing Key Bindings): Mention `key-valid-p'
(Modifying Menus): Correct description of KEY arg.
Robert Pluim [Thu, 19 Jan 2023 13:34:10 +0000 (14:34 +0100)]
Handle after arg correctly in `keymap-set-after'
* lisp/keymap.el (keymap-set-after): AFTER: t means the same as nil,
so just change it to nil. (Bug#60867)
F. Jason Park [Fri, 20 Jan 2023 04:19:40 +0000 (20:19 -0800)]
Don't load erc-goodies atop erc.el
* lisp/erc/erc.el: Commit
c2d657e7c4fd9685591f2120007eabf78745919d
"Move ERC's core dependencies to a separate file" ironed out ERC's
interwoven dependencies for the better but didn't cleanly sidestep the
goodies interdependency, specifically with regard to custom options.
This reverts the tiny portion impacting this aspect by once again
requiring `erc-goodies' at the very end of ERC's main library. Special
thanks to Libera.Chat user jrm for reporting this bug.
Michael Albinus [Fri, 20 Jan 2023 11:20:08 +0000 (12:20 +0100)]
; * etc/NEWS: Fix typos.
Eli Zaretskii [Fri, 20 Jan 2023 08:28:26 +0000 (10:28 +0200)]
Make tree-sitter based modes optional
* lisp/progmodes/c-ts-mode.el: Update Commentary. Make
'auto-mode-alist' update conditional on the tree-sitter and
grammar libraries being available.
* lisp/progmodes/cmake-ts-mode.el:
* lisp/progmodes/csharp-mode.el:
* lisp/progmodes/dockerfile-ts-mode.el:
* lisp/progmodes/go-ts-mode.el:
* lisp/progmodes/java-ts-mode.el:
* lisp/progmodes/js.el:
* lisp/progmodes/json-ts-mode.el:
* lisp/progmodes/python.el:
* lisp/progmodes/ruby-ts-mode.el:
* lisp/progmodes/typescript-ts-mode.el:
* lisp/textmodes/css-mode.el:
* lisp/textmodes/toml-ts-mode.el:
* lisp/textmodes/yaml-ts-mode.el: Make 'auto-mode-alist' update
for tree-sitter based modes be conditional on the tree-sitter and
grammar libraries being available. (Bug#60559)
Dmitry Gutov [Fri, 20 Jan 2023 03:41:39 +0000 (05:41 +0200)]
; (ruby-ts--predefined-variables): Make it a little shorter
Dmitry Gutov [Fri, 20 Jan 2023 03:35:12 +0000 (05:35 +0200)]
ruby-ts-mode: Claw back half of the performance drop from last change
* lisp/progmodes/ruby-ts-mode.el (ruby-ts--builtin-method-p):
New function.
(ruby-ts--font-lock-settings): Use it instead of :match.
Dmitry Gutov [Fri, 20 Jan 2023 02:14:38 +0000 (04:14 +0200)]
(ruby-ts-mode): Rename 'builtin-functions' to 'builtin-function'
* lisp/progmodes/ruby-ts-mode.el (ruby-ts--font-lock-settings)
(ruby-ts-mode): Rename 'builtin-functions' to 'builtin-function',
for consistency with similar features.
Dmitry Gutov [Fri, 20 Jan 2023 01:56:44 +0000 (03:56 +0200)]
ruby-ts-mode: Highlight builtin methods
* lisp/progmodes/ruby-mode.el (ruby-builtin-methods-with-reqs)
(ruby-builtin-methods-no-reqs): New constants, extracted.
(ruby-font-lock-keywords): Replace values with references.
* lisp/progmodes/ruby-ts-mode.el (ruby-ts--builtin-methods): New
variable. Construct regexp from aforementioned constants' values.
* lisp/progmodes/ruby-ts-mode.el (ruby-ts--font-lock-settings):
Use it.
* lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode):
Add new font-lock feature: builtin-functions.
* lisp/progmodes/ruby-ts-mode.el (ruby-ts--predefined-constants)
(ruby-ts--predefined-variables): Unrelated to the rest of the
patch, add string-start and string-end anchors.
Dmitry Gutov [Fri, 20 Jan 2023 01:54:36 +0000 (03:54 +0200)]
; ruby-ts-mode.el: Add customize-group mention to commentary
Yuan Fu [Thu, 19 Jan 2023 22:46:17 +0000 (14:46 -0800)]
Fix c-ts-mode indent (bug#60873)
* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--statement-offset): Handle the edge case.
* test/lisp/progmodes/c-ts-mode-resources/indent.erts: Add a test.
Yuan Fu [Thu, 19 Jan 2023 22:22:56 +0000 (14:22 -0800)]
Fix various problems in treesit-explore-mode (bug#60800)
* lisp/treesit.el:
(treesit--explorer-kill-explorer-buffer): New function.
(treesit-explore-mode):
1. Move prompt for language earlier, and terminate early if language
not available.
2. Make sure desktop-save doesn't save the explorer buffer.
3. Kill the explorer buffer when the source buffer is killed.
Yuan Fu [Thu, 19 Jan 2023 19:53:14 +0000 (11:53 -0800)]
; * lisp/treesit.el (treesit-font-lock-fontify-region): Minor fix.
The check for treesit--font-lock-fast-mode is not really necessary,
but anyway.
Yuan Fu [Wed, 18 Jan 2023 23:45:29 +0000 (15:45 -0800)]
; Update tree-sitter major mode manual
* doc/lispref/parsing.texi (Tree-sitter Major Modes): Update.
Yuan Fu [Wed, 18 Jan 2023 23:32:12 +0000 (15:32 -0800)]
; Add commentary and dostring in c-ts-mode
* lisp/progmodes/c-ts-mode.el: Add commentary.
(c-ts-mode, c++-ts-mode): Add docstring.
Michael Heerdegen [Wed, 18 Jan 2023 11:32:05 +0000 (12:32 +0100)]
Fix an oversight in advice.el
This fixes an oversight from
77c3c464a16: "* lisp/emacs-lisp/advice.el
(ad-advised-functions): Make it a plain list" that caused an issue as
reported in Bug#60893.
* lisp/emacs-lisp/advice.el (ad-read-advised-function): Adjust to
handle the new type of elements of `ad-advised-functions'.
Eli Zaretskii [Thu, 19 Jan 2023 18:13:54 +0000 (20:13 +0200)]
; * etc/NEWS: Rearrange instructions for building tree-sitter grammars.
Dmitry Gutov [Thu, 19 Jan 2023 17:43:19 +0000 (19:43 +0200)]
(treesit-simple-indent-presets): Have n-p-gp check for grandparent's presence
* lisp/treesit.el (treesit-simple-indent-presets): Have n-p-gp
check for grandparent's presence before checking its type.
Dmitry Gutov [Thu, 19 Jan 2023 16:31:57 +0000 (18:31 +0200)]
; ruby-ts--indent-rules: Minor cleanup
* lisp/progmodes/ruby-ts-mode.el (ruby-ts--indent-rules): Remove
the (match "begin" "assignment") rule. The catch-all has the same
effect. Update a comment referring to rules removed previously.
Dmitry Gutov [Thu, 19 Jan 2023 15:42:05 +0000 (17:42 +0200)]
ruby-toggle-block: Fix in ruby-ts-mode
* lisp/progmodes/ruby-mode.el (ruby-toggle-block): Make it work
with ruby-ts-mode. ruby-forward-sexp checks ruby-use-smie.
Dmitry Gutov [Thu, 19 Jan 2023 15:31:43 +0000 (17:31 +0200)]
(ruby-ts--indent-rules): Indent inside empty parens properly
* lisp/progmodes/ruby-ts-mode.el (ruby-ts--indent-rules):
Consider the case when there are no arguments inside the call yet.
* test/lisp/progmodes/ruby-ts-mode-tests.el
(ruby-ts-indent-call-no-args): Add test.
Eli Zaretskii [Thu, 19 Jan 2023 14:15:13 +0000 (16:15 +0200)]
; * doc/emacs/modes.texi (Choosing Modes): Add index entries.
Kai Tetzlaff [Thu, 19 Jan 2023 02:16:14 +0000 (03:16 +0100)]
Fix bug in 'sieve-manage--append-to-log'
* lisp/net/sieve-manage.el (sieve-manage--append-to-log): Fix
log buffer creation. (Bug#54154) Do not merge to master.
Alan Mackenzie [Thu, 19 Jan 2023 10:59:10 +0000 (10:59 +0000)]
CC Mode: Prevent two classes of "type" prematurely entering c-found-types
This fixes bug #60769. The two classes of "type" are foo and bar in
"foo d(bar () ...)", where the d could be a mistyped C-M-d.
* list/progmodes/cc-engine.el (c-forward-decl-or-cast-1): New local variable
got-arglist. Refactor a sequence of enclosed `if' forms into a `cond' form.
Set got-arglist when needed. In CASE 2, set unsafe-maybe to inhibit foo
being entered into c-found-types. In CASE 19, likewise set unsafe-maybe, to
inhibit bar entering c-found-types.