1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-27 07:37:33 +00:00
Commit Graph

164338 Commits

Author SHA1 Message Date
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
Randy Taylor
4bf7cb71ed 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.
2023-01-26 10:29:07 +02:00
Eli Zaretskii
ff9498624f ; * src/insdel.c (insert_from_buffer): Fix assertions. 2023-01-26 10:23:58 +02:00
Eli Zaretskii
41f497c8be Fix doc strings of window-splitting commands
* lisp/window.el (split-window-below, split-window-right): Doc
fixes.  (Bug#60886)
2023-01-26 09:59:58 +02:00
Yuan Fu
cdf74254ff
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.
2023-01-25 23:47:27 -08:00
Yuan Fu
4bd06ce2a9
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.
2023-01-25 23:14:35 -08:00
Randy Taylor
00675aa724
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.
2023-01-25 23:14:35 -08:00
Michael Albinus
af28191b04 * lisp/net/tramp.el (tramp-wrong-passwd-regexp): Fix regexp. 2023-01-25 20:14:12 +01:00
Juri Linkov
42e02480c2 * 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).
2023-01-25 20:19:44 +02:00
Juri Linkov
37c1c92466 ; * etc/NEWS: Minor reordering.
Move Exif section closer to Image changes, define-keymap/defvar-keymap
and lookup-key closer to Keymaps section.
2023-01-25 19:38:01 +02:00
Dmitry Gutov
cfb180329b 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).
2023-01-25 17:22:31 +02:00
Dmitry Gutov
abb3becb9f 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).
2023-01-25 17:22:31 +02:00
Basil L. Contovounesios
c6613403e5 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).
2023-01-25 14:32:42 +00:00
Basil L. Contovounesios
37454de0c8 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).
2023-01-25 14:32:42 +00:00
Michael Albinus
9a21cb1075 ; * etc/NEWS: Fix typos. 2023-01-25 15:31:33 +01:00
Robert Pluim
f30a4f51fe Announce outline.el keymaps
* etc/NEWS: Announce new keymaps.
2023-01-25 14:23:44 +01:00
Arash Esbati
8198803f66 ; 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)
2023-01-25 15:09:10 +02:00
Jostein Kjønigsen
8a1498c01f 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.
2023-01-25 13:04:49 +01:00
Theodor Thornhill
cfe26f3189 Add new java indent rules
* lisp/progmodes/java-ts-mode.el (java-ts-mode--indent-rules): Check
for enum_body_declarations and switch_label.
2023-01-25 13:04:49 +01:00
F. Jason Park
987e53f3e2 ; * doc/misc/erc.texi: Improve Local Modules section. 2023-01-24 20:19:28 -08:00
F. Jason Park
3846e79c93 ; 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.
2023-01-24 20:15:18 -08:00
Juri Linkov
ecf500b5e3 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).
2023-01-24 20:48:20 +02:00
Robert Pluim
695e9f71c3 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.
2023-01-24 20:37:56 +02:00
Juri Linkov
e31a562396 * 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).
2023-01-24 20:27:07 +02:00
Michael Albinus
deee3a9262 ; Fix last change in etc/NEWS 2023-01-24 18:27:57 +01:00
Michael Albinus
bc78285e68 ; * etc/NEWS: Fix typos. 2023-01-24 09:27:17 +01:00
Alan Mackenzie
c15c0f7f01 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.
2023-01-23 21:28:32 +00:00
Jim Porter
7f438ff543 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.
2023-01-23 09:48:09 -08:00
Eli Zaretskii
cb9628373a * lisp/startup.el (command-line): Fix warning message. (Bug#61014) 2023-01-23 15:09:07 +02:00
Juri Linkov
e6c5f32e77 * 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.
2023-01-23 09:56:13 +02:00
Kyle Meyer
647cc9c65e Update to Org 9.6.1-16-ge37e9b 2023-01-22 21:53:39 -05:00
Dmitry Gutov
b3814b43f6 (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.
2023-01-22 20:51:21 +02:00
Juri Linkov
db02cbdfe0 * lisp/find-dired.el (find-dired-with-command): Quote find-command-history. 2023-01-22 19:51:51 +02:00
Juri Linkov
2343a067c3 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.
2023-01-22 19:27:10 +02:00
Benjamin Riefenstahl
846838dbab 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.
2023-01-22 16:06:39 +02:00
Benjamin Riefenstahl
0fb90f524d 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.
2023-01-22 16:05:39 +02:00
Eli Zaretskii
c854ef7a18 ; Fix last change (bug#60556). 2023-01-22 15:12:05 +02:00
Eli Zaretskii
8e83604dfe 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)
2023-01-22 15:09:21 +02:00
Theodor Thornhill
808e101fab 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.
2023-01-22 11:14:00 +01:00
Theodor Thornhill
204519a2e7 Fix typo of exposed symbol name
* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): Remove
double hyphen.
2023-01-22 10:58:31 +01:00
Theodor Thornhill
9296e0c649 Fix typo after move to common lib (bug#61001)
* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): Use correct
preset.
2023-01-22 10:48:43 +01:00
Dmitry Gutov
e74ba72a6a 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.
2023-01-22 04:55:13 +02:00