1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

Merge from origin/emacs-30

b68b9f291c ; * lisp/progmodes/csharp-mode.el (treesit-query-compile)...
688201ef18 ; * lisp/window.el (switch-to-prev-buffer-skip-regexp): D...
ba44fc9a44 Restore comment/string check for 'electric-layout-mode'
5a462948e1 Update Arni Magnusson's email address
6b1271b169 Fix python-ts-mode-map docstring
aaaafddc94 Normalize "Commentary" section in eudc.el
d656be9794 Expand email abbrevs in X-Debbugs-Cc header.
e9dcf0c57d Fix 'list-tags' when invoked from a non-file buffer
51ef05f684 count-windows: Fix reference to walk-windows
5eaf0c784b * lisp/info-look.el (mapc): Add use-package manual's index.
705a5a1a9e ; * ChangeLog.4: Fix attribution of one change.
bf26ff0dc8 Update csharp-ts-mode font-lock (bug#73369)
4c866abab9 ; * doc/lispref/variables.texi (Creating Buffer-Local): F...
d42d7d474f ; * lisp/doc-view.el (doc-view-svg-face): Copy-edit docst...
f46f476bb8 ; * admin/MAINTAINERS: Take VC subsystem, add note about ...
d68e6d2689 ; rcirc-update-activity-string: Justify some existing beh...
e6a37869c8 Fix inconsistency in value of rcirc-activity-string
108b3179bd Revert "; Minor clarification in variables.texi"
44156c2140 ; Minor clarification in variables.texi
63058e1153 Tag interactive commands in 'lua-ts-mode'
84bea20eba ; * lisp/info-look.el: Add two more links.
96b87ad536 Mention LSP acronym in eglot defgroup docstring
9c904e8cea Change :group of 'eglot' defgroup to 'tools'
fd1a1b0780 Remove out-of-date documentation from python.el
11e3e0cadd Fix executing commands in Eshell using "env" with no loca...
c0ef8a9a1b Fix a typo in the calendar manual
36ff7138fe ; Fix a thinko in sieve-manage.el
7abecbcd63 ; * nt/INSTALL: Update MinGW notes URL.  (Bug#73528)

# Conflicts:
#	admin/MAINTAINERS
This commit is contained in:
Eli Zaretskii 2024-10-05 07:41:22 -04:00
commit 7949452350
28 changed files with 245 additions and 119 deletions

View file

@ -26,6 +26,7 @@ Andrew G Cohen <cohen@andy.bu.edu>
Andrew G Cohen <cohen@andy.bu.edu> <cohen@bu.edu> Andrew G Cohen <cohen@andy.bu.edu> <cohen@bu.edu>
Arash Esbati <arash@gnu.org> <arash.esbati@gmail.com> Arash Esbati <arash@gnu.org> <arash.esbati@gmail.com>
Arash Esbati <arash@gnu.org> <esbati@gmx.de> Arash Esbati <arash@gnu.org> <esbati@gmx.de>
Arni Magnusson <thisisarni@gmail.com> <arnima@hafro.is>
Artur Malabarba <bruce.connor.am@gmail.com> <am12548@it055607.users.bris.ac.uk> Artur Malabarba <bruce.connor.am@gmail.com> <am12548@it055607.users.bris.ac.uk>
Artur Malabarba <bruce.connor.am@gmail.com> Artur Malabarba <address@hidden> Artur Malabarba <bruce.connor.am@gmail.com> Artur Malabarba <address@hidden>
Basil L. Contovounesios <basil@contovou.net> <contovob@tcd.ie> Basil L. Contovounesios <basil@contovou.net> <contovob@tcd.ie>

View file

@ -11433,7 +11433,7 @@
* etc/NEWS: Update announcement. * etc/NEWS: Update announcement.
2024-05-15 Sean Whitton <spwhitton@spwhitton.name> 2024-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
(eglot--managed-mode): Avoid calling track-changes unregistered (eglot--managed-mode): Avoid calling track-changes unregistered

View file

@ -238,9 +238,22 @@ Yuan Fu
lisp/treesit.el lisp/treesit.el
lisp/progmodes/c-ts-common.el lisp/progmodes/c-ts-common.el
Sean Whitton
VC
lisp/vc/*
doc/emacs/files.texi (Diff Mode)
doc/emacs/maintaining.texi (Version Control)
doc/emacs/vc*-xtra.texi
doc/emacs/emerge-xtra.texi
doc/misc/ediff.texi
test/lisp/vc/*
============================================================================== ==============================================================================
2. Areas that someone is willing to maintain, although he would not 2. Areas that someone is willing to maintain, although he would not
necessarily mind if someone else was the official maintainer. necessarily mind if someone else was the official maintainer.
This list also includes people who are in the process of handing over
maintainership to someone listed above, but who want to continue to be
CC'd as though they were still the primary maintainer, in the meantime.
============================================================================== ==============================================================================
Kelvin White Kelvin White

View file

@ -106,7 +106,7 @@ commands for moving by characters and by lines. Just as @kbd{C-n}
usually moves to the same column in the following line, in Calendar usually moves to the same column in the following line, in Calendar
mode it is bound to @code{calendar-forward-week}, which moves to the mode it is bound to @code{calendar-forward-week}, which moves to the
same day in the following week. And @kbd{C-p} same day in the following week. And @kbd{C-p}
(@code{calendar-backward-week} moves to the same day in the previous (@code{calendar-backward-week}) moves to the same day in the previous
week. @kbd{C-f} (@code{calendar-forward-day}) and @kbd{C-b} week. @kbd{C-f} (@code{calendar-forward-day}) and @kbd{C-b}
(@code{calendar-backward-day}) move forward and back by days. (@code{calendar-backward-day}) move forward and back by days.

View file

@ -2673,14 +2673,13 @@ loaded, this command can use it to generate completion candidates.
@xref{Symbol Completion}. @xref{Symbol Completion}.
@findex list-tags @findex list-tags
@kbd{M-x list-tags} reads the name of one of the files covered by @kbd{M-x list-tags} reads the name of one of the files covered by the
the selected tags table, and displays a list of tags defined in that selected tags table, with completion, and displays the list of tags
file. Do not include a directory as part of the file name unless the defined in that file; it offers the current buffer's file name as the
file name recorded in the tags table includes a directory. This default file whose tags to list. Do not include a directory as part of
command works only with the etags backend, and requires a tags table the file name unless the file name recorded in the tags table includes a
for the project to be available. @xref{Tags Tables}. If used directory. This command works only with the etags backend, and requires
interactively, the default tag is file name of the current buffer if a tags table for the project to be available. @xref{Tags Tables}.
used interactively.
@findex tags-next-file @findex tags-next-file
@kbd{M-x tags-next-file} visits files covered by the selected tags table. @kbd{M-x tags-next-file} visits files covered by the selected tags table.

View file

@ -5551,7 +5551,7 @@
* loading.texi (Hooks for Loading): Document after-load-functions. * loading.texi (Hooks for Loading): Document after-load-functions.
Copyedits. Copyedits.
2010-03-24 Arni Magnusson <arnima@hafro.is> (tiny change) 2010-03-24 Arni Magnusson <thisisarni@gmail.com> (tiny change)
* frames.texi (Cursor Parameters): Fix typo. (Bug#5760) * frames.texi (Cursor Parameters): Fix typo. (Bug#5760)

View file

@ -1732,11 +1732,11 @@ buffer-local variables interactively.
@defun kill-all-local-variables &optional kill-permanent @defun kill-all-local-variables &optional kill-permanent
This function eliminates all the buffer-local variable bindings of the This function eliminates all the buffer-local variable bindings of the
current buffer. As a result, the buffer will see the default values current buffer. As a result, the buffer will see the default values
of most variables. By default, for variables marked as permanent and of most variables. By default, variables marked as permanent and
local hook functions that have a non-@code{nil} local hook functions that have a non-@code{nil}
@code{permanent-local-hook} property (@pxref{Setting Hooks}) won't be @code{permanent-local-hook} property (@pxref{Setting Hooks}) won't be
killed, but if the optional @var{kill-permanent} argument is killed, but if the optional @var{kill-permanent} argument is
non-@code{nil}, even these variables will be killed. non-@code{nil}, even those variables will be killed.
This function also resets certain other information pertaining to the This function also resets certain other information pertaining to the
buffer: it sets the local keymap to @code{nil}, the syntax table to the buffer: it sets the local keymap to @code{nil}, the syntax table to the

View file

@ -6407,7 +6407,7 @@
* epa.texi (Mail-mode integration): Mention the way to do * epa.texi (Mail-mode integration): Mention the way to do
"encrypt-to-self". (Bug#1807) "encrypt-to-self". (Bug#1807)
2009-02-05 Arni Magnusson <arnima@hafro.is> (tiny change) 2009-02-05 Arni Magnusson <thisisarni@gmail.com> (tiny change)
* ada-mode.texi (No project files): Fix typo. (Bug#2214) * ada-mode.texi (No project files): Fix typo. (Bug#2214)

View file

@ -25198,7 +25198,7 @@
* emacs-lisp/package-x.el (package-upload-buffer-internal): * emacs-lisp/package-x.el (package-upload-buffer-internal):
Use `equal' for upload base check. Use `equal' for upload base check.
2011-03-08 Arni Magnusson <arnima@hafro.is> (tiny change) 2011-03-08 Arni Magnusson <thisisarni@gmail.com> (tiny change)
* textmodes/texinfo.el (texinfo-environments): * textmodes/texinfo.el (texinfo-environments):
Add deftypecv, deftypeivar, deftypemethod, deftypeop, html. (Bug#2783) Add deftypecv, deftypeivar, deftypemethod, deftypeop, html. (Bug#2783)

View file

@ -6706,7 +6706,7 @@
2014-10-12 Stefan Monnier <monnier@iro.umontreal.ca> 2014-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
* progmodes/bat-mode.el (bat-font-lock-keywords): Fix \\<_ typo * progmodes/bat-mode.el (bat-font-lock-keywords): Fix \\<_ typo
(bug#18622). Reported by Arni Magnusson <arnima@hafro.is>. (bug#18622). Reported by Arni Magnusson <thisisarni@gmail.com>.
* progmodes/prolog.el (prolog-electric--underscore): Same. * progmodes/prolog.el (prolog-electric--underscore): Same.
2014-10-12 Michael Albinus <michael.albinus@gmx.de> 2014-10-12 Michael Albinus <michael.albinus@gmx.de>
@ -20214,7 +20214,7 @@
(dos-mode-syntax-table): Don't use "w" for symbol chars. (dos-mode-syntax-table): Don't use "w" for symbol chars.
(dos-font-lock-keywords): Try to adjust font-lock rules accordingly. (dos-font-lock-keywords): Try to adjust font-lock rules accordingly.
2013-08-07 Arni Magnusson <arnima@hafro.is> 2013-08-07 Arni Magnusson <thisisarni@gmail.com>
* progmodes/dos.el: New file. * progmodes/dos.el: New file.
* generic-x.el (bat-generic-mode): Redefine as an obsolete alias to * generic-x.el (bat-generic-mode): Redefine as an obsolete alias to

View file

@ -260,7 +260,7 @@ showing only titles and no page number."
See `doc-view-mupdf-use-svg'. See `doc-view-mupdf-use-svg'.
Only background and foreground colors are used as the SVG image's Only background and foreground colors are used as the SVG image's
descriptors, see (info \"(elisp) SVG Images\"). Non-standard values may descriptors; see (info \"(elisp) SVG Images\"). Custom values may
cause low-contrast issues with certain documents." cause low-contrast issues with certain documents."
:version "30.1") :version "30.1")

View file

@ -385,6 +385,9 @@ If multiple rules match, only first one is executed.")
(defvar electric-layout-allow-duplicate-newlines nil (defvar electric-layout-allow-duplicate-newlines nil
"If non-nil, allow duplication of `before' newlines.") "If non-nil, allow duplication of `before' newlines.")
(defvar electric-layout-allow-in-comment-or-string nil
"If non-nil, allow inserting newlines inside a comment or string.")
(defun electric-layout-post-self-insert-function () (defun electric-layout-post-self-insert-function ()
(when electric-layout-mode (when electric-layout-mode
(electric-layout-post-self-insert-function-1))) (electric-layout-post-self-insert-function-1)))
@ -409,7 +412,10 @@ If multiple rules match, only first one is executed.")
(goto-char pos) (goto-char pos)
(funcall probe last-command-event)))) (funcall probe last-command-event))))
(when res (throw 'done res)))))))))) (when res (throw 'done res))))))))))
(when rule (when (and rule
(or electric-layout-allow-in-comment-or-string
;; Not in a comment or string.
(not (nth 8 (save-excursion (syntax-ppss pos))))))
(goto-char pos) (goto-char pos)
(when (functionp rule) (setq rule (funcall rule))) (when (functionp rule) (setq rule (funcall rule)))
(dolist (sym (if (symbolp rule) (list rule) rule)) (dolist (sym (if (symbolp rule) (list rule) rule))

View file

@ -436,7 +436,8 @@ the values of nil for each."
:usage "[NAME=VALUE]... [COMMAND]...") :usage "[NAME=VALUE]... [COMMAND]...")
(if args (if args
(or (eshell-parse-local-variables args) (or (eshell-parse-local-variables args)
(eshell-named-command (car args) (cdr args))) (throw 'eshell-replace-command
`(eshell-named-command ,(car args) ',(cdr args))))
(eshell-with-buffered-print (eshell-with-buffered-print
(dolist (setting (sort (eshell-environment-variables) 'string-lessp)) (dolist (setting (sort (eshell-environment-variables) 'string-lessp))
(eshell-buffered-print setting "\n")))))) (eshell-buffered-print setting "\n"))))))

View file

@ -30,6 +30,8 @@
;; Scheme: https://groups.csail.mit.edu/mac/ftpdir/scm/r5rs.info.tar.gz ;; Scheme: https://groups.csail.mit.edu/mac/ftpdir/scm/r5rs.info.tar.gz
;; LaTeX: https://mirrors.ctan.org/info/latex2e-help-texinfo/latex2e.texi ;; LaTeX: https://mirrors.ctan.org/info/latex2e-help-texinfo/latex2e.texi
;; (or CTAN mirrors) ;; (or CTAN mirrors)
;; Python: https://www.python.org/ftp/python/doc/
;; SICP: https://github.com/webframp/sicp-info
;; Traditionally, makeinfo quoted `like this', but version 5 and later ;; Traditionally, makeinfo quoted `like this', but version 5 and later
;; quotes 'like this' or like this. Doc specs with patterns ;; quotes 'like this' or like this. Doc specs with patterns
@ -1082,6 +1084,7 @@ Return nil if there is nothing appropriate in the buffer near point."
("srecode" "Index") ("srecode" "Index")
("tramp" "Variable Index" "Function Index") ("tramp" "Variable Index" "Function Index")
("url" "Variable Index" "Function Index") ("url" "Variable Index" "Function Index")
("use-package" "Index")
("vhdl" "(vhdl-mode)Variable Index" "(vhdl-mode)Command Index") ("vhdl" "(vhdl-mode)Variable Index" "(vhdl-mode)Command Index")
("viper" "Variable Index" "Function Index") ("viper" "Variable Index" "Function Index")
("vtable" "Index") ("vtable" "Index")

View file

@ -410,7 +410,7 @@ with a space."
;;; Syntax tables and abbrev-expansion ;;; Syntax tables and abbrev-expansion
(defcustom mail-abbrev-mode-regexp (defcustom mail-abbrev-mode-regexp
"^\\(Resent-\\)?\\(To\\|From\\|Cc\\|Bcc\\|Reply-To\\):" "^\\(Resent-\\)?\\(To\\|From\\|Cc\\|Bcc\\|Reply-To\\|X-Debbugs-Cc\\):"
"Regexp matching mail headers in which mail abbrevs should be expanded. "Regexp matching mail headers in which mail abbrevs should be expanded.
This string will be handed to `looking-at' with point at the beginning This string will be handed to `looking-at' with point at the beginning
of the current line; if it matches, abbrev mode will be turned on, otherwise of the current line; if it matches, abbrev mode will be turned on, otherwise

View file

@ -50,7 +50,7 @@
When t this still needs to be initialized.") When t this still needs to be initialized.")
(defvar mail-address-field-regexp (defvar mail-address-field-regexp
"^\\(Resent-\\)?\\(To\\|From\\|Cc\\|Bcc\\|Reply-To\\):") "^\\(Resent-\\)?\\(To\\|From\\|Cc\\|Bcc\\|Reply-To\\|X-Debbugs-Cc\\):")
;; `pattern' is bound dynamically before evaluating the forms in ;; `pattern' is bound dynamically before evaluating the forms in
;; `mail-complete-alist' and may be part of user customizations of ;; `mail-complete-alist' and may be part of user customizations of
@ -61,7 +61,7 @@ When t this still needs to be initialized.")
(defcustom mail-complete-alist (defcustom mail-complete-alist
;; Don't refer to mail-address-field-regexp here; ;; Don't refer to mail-address-field-regexp here;
;; that confuses some things such as cus-dep.el. ;; that confuses some things such as cus-dep.el.
'(("^\\(Resent-\\)?\\(To\\|From\\|Cc\\|Bcc\\|Reply-To\\):" '(("^\\(Resent-\\)?\\(To\\|From\\|Cc\\|Bcc\\|Reply-To\\|X-Debbugs-Cc\\):"
. (mail-get-names pattern)) . (mail-get-names pattern))
("Newsgroups:" . (if (boundp 'gnus-active-hashtb) ("Newsgroups:" . (if (boundp 'gnus-active-hashtb)
gnus-active-hashtb gnus-active-hashtb

View file

@ -23,25 +23,27 @@
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. ;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary: ;;; Commentary:
;; This package provides a common interface to query directory servers using
;; different protocols such as LDAP, CCSO PH/QI or BBDB. Queries can be
;; made through an interactive form or inline. Inline query strings in
;; buffers are expanded with appropriately formatted query results
;; (especially used to expand email addresses in message buffers). EUDC
;; also interfaces with the BBDB package to let you register query results
;; into your own BBDB database.
;;; Usage: ;; This package provides a common interface to query directory servers using
;; EUDC comes with an extensive documentation, please refer to it. ;; different protocols such as LDAP, CCSO PH/QI or BBDB. Queries can be
;; made through an interactive form or inline. Inline query strings in
;; buffers are expanded with appropriately formatted query results
;; (especially used to expand email addresses in message buffers). EUDC
;; also interfaces with the BBDB package to let you register query results
;; into your own BBDB database.
;; ;;
;; The main entry points of EUDC are: ;; Usage:
;; `eudc-query-form': Query a directory server from a query form ;;
;; `eudc-expand-inline': Query a directory server for the e-mail address ;; EUDC comes with extensive documentation, please refer to it.
;; of the name before cursor and insert it in the ;;
;; buffer ;; The main entry points of EUDC are:
;; `eudc-get-phone': Get a phone number from a directory server ;; `eudc-query-form': Query a directory server from a query form
;; `eudc-get-email': Get an e-mail address from a directory server ;; `eudc-expand-inline': Query a directory server for the e-mail address
;; `eudc-customize': Customize various aspects of EUDC ;; of the name before cursor and insert it in the
;; buffer
;; `eudc-get-phone': Get a phone number from a directory server
;; `eudc-get-email': Get an e-mail address from a directory server
;; `eudc-customize': Customize various aspects of EUDC
;;; Code: ;;; Code:

View file

@ -2537,9 +2537,25 @@ activity. Only run if the buffer is not visible and
(rcirc-activity-string lopri) (rcirc-activity-string lopri)
")")) ")"))
(and hipri "]"))) (and hipri "]")))
;; Consistently don't display anything if there aren't
;; any IRC connections. Otherwise, whether we display
;; "[]" or not depends on whether or not this function
;; happens to have been called in this session yet.
;;
;; Consistently display nothing, rather than
;; consistently displaying "[]", for the sake of the
;; following sort of case: the user has enabled
;; `rcirc-track-minor-mode' using the customization
;; system, but also starts up Emacs instances that
;; aren't used for IRC. Due to the use of easy
;; customization, `rcirc-track-minor-mode' will be
;; turned on for every instance of Emacs. But we don't
;; want to take up valuable mode line space when, say,
;; Emacs is started up as the value of EDITOR/VISUAL.
((not (null (rcirc-process-list))) ((not (null (rcirc-process-list)))
"[]") "[]")
(t "[]"))) (t
"")))
(run-hooks 'rcirc-update-activity-string-hook) (run-hooks 'rcirc-update-activity-string-hook)
(force-mode-line-update t))) (force-mode-line-update t)))

View file

@ -178,7 +178,8 @@ If it is nil, logging is disabled."
(with-current-buffer (with-current-buffer
(get-buffer-create sieve-manage-log) (get-buffer-create sieve-manage-log)
(set-buffer-multibyte nil) (set-buffer-multibyte nil)
(buffer-disable-undo))) (buffer-disable-undo)
(current-buffer)))
(goto-char (point-max)) (goto-char (point-max))
(apply #'insert args)))) (apply #'insert args))))

View file

@ -1,8 +1,8 @@
;;; bat-mode.el --- Major mode for editing DOS/Windows scripts -*- lexical-binding: t -*- ;;; bat-mode.el --- Major mode for editing DOS/Windows scripts -*- lexical-binding: t -*-
;; Copyright (C) 2003, 2008-2024 Free Software Foundation, Inc. ;; Copyright (C) 2003-2024 Free Software Foundation, Inc.
;; Author: Arni Magnusson <arnima@hafro.is> ;; Author: Arni Magnusson <thisisarni@gmail.com>
;; Keywords: languages ;; Keywords: languages
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.

View file

@ -46,6 +46,7 @@
(declare-function treesit-node-type "treesit.c") (declare-function treesit-node-type "treesit.c")
(declare-function treesit-node-child-by-field-name "treesit.c") (declare-function treesit-node-child-by-field-name "treesit.c")
(declare-function treesit-query-capture "treesit.c") (declare-function treesit-query-capture "treesit.c")
(declare-function treesit-query-compile "treesit.c")
(defgroup csharp nil (defgroup csharp nil
"Major mode for editing C# code." "Major mode for editing C# code."
@ -730,6 +731,52 @@ compilation and evaluation time conflicts."
"readonly" "unmanaged") "readonly" "unmanaged")
"C# keywords for tree-sitter font-locking.") "C# keywords for tree-sitter font-locking.")
(defun csharp-ts-mode--test-this-expression ()
"Return non-nil if (this_expression) is named in csharp grammar."
(ignore-errors
(treesit-query-compile 'c-sharp "(this_expression)" t)
t))
(defun csharp-ts-mode--test-interpolated-string-text ()
"Return non-nil if (interpolated_string_text) is in the grammar."
(ignore-errors
(treesit-query-compile 'c-sharp "(interpolated_string_text)" t)
t))
(defun csharp-ts-mode--test-type-constraint ()
"Return non-nil if (type_constraint) is in the grammar."
(ignore-errors
(treesit-query-compile 'c-sharp "(type_constraint)" t)
t))
(defun csharp-ts-mode--test-type-of-expression ()
"Return non-nil if (type_of_expression) is in the grammar."
(ignore-errors
(treesit-query-compile 'c-sharp "(type_of_expression)" t)
t))
(defun csharp-ts-mode--test-name-equals ()
"Return non-nil if (name_equals) is in the grammar."
(ignore-errors
(treesit-query-compile 'c-sharp "(name_equals)" t)
t))
(defun csharp-ts-mode--test-if-directive ()
"Return non-nil if (if_directive) is in the grammar."
(ignore-errors
(treesit-query-compile 'c-sharp "(if_directive)" t)
t))
(defun csharp-ts-mode--test-method-declaration-type-field ()
"Return non-nil if (method_declaration) has a type field."
(ignore-errors
(treesit-query-compile 'c-sharp "(method_declaration type: (_))" t)
t))
(defvar csharp-ts-mode--type-field
(if (csharp-ts-mode--test-method-declaration-type-field)
'type: 'returns:))
(defvar csharp-ts-mode--font-lock-settings (defvar csharp-ts-mode--font-lock-settings
(treesit-font-lock-rules (treesit-font-lock-rules
:language 'c-sharp :language 'c-sharp
@ -760,7 +807,9 @@ compilation and evaluation time conflicts."
:feature 'keyword :feature 'keyword
`([,@csharp-ts-mode--keywords] @font-lock-keyword-face `([,@csharp-ts-mode--keywords] @font-lock-keyword-face
(modifier) @font-lock-keyword-face (modifier) @font-lock-keyword-face
(this_expression) @font-lock-keyword-face) ,@(if (csharp-ts-mode--test-this-expression)
'((this_expression) @font-lock-keyword-face)
'("this" @font-lock-keyword-face)))
:language 'c-sharp :language 'c-sharp
:override t :override t
@ -786,18 +835,23 @@ compilation and evaluation time conflicts."
:feature 'string :feature 'string
`([(string_literal) `([(string_literal)
(verbatim_string_literal) (verbatim_string_literal)
(interpolated_string_text) ,@(if (csharp-ts-mode--test-interpolated-string-text)
(interpolated_verbatim_string_text) '((interpolated_string_text)
(character_literal) (interpolated_verbatim_string_text)
"\"" (character_literal)
"$\"" "\""
"@$\"" "$\""
"$@\""] @font-lock-string-face) "@$\""
"$@\"")
'((interpolated_string_expression)
(interpolation_start)
(interpolation_quote)))]
@font-lock-string-face)
:language 'c-sharp :language 'c-sharp
:override t :override t
:feature 'type :feature 'type
'((predefined_type) @font-lock-type-face `((predefined_type) @font-lock-type-face
(implicit_type) @font-lock-type-face (implicit_type) @font-lock-type-face
(nullable_type) @font-lock-type-face (nullable_type) @font-lock-type-face
(type_parameter (type_parameter
@ -816,10 +870,17 @@ compilation and evaluation time conflicts."
(cast_expression (generic_name (identifier) @font-lock-type-face)) (cast_expression (generic_name (identifier) @font-lock-type-face))
["operator"] @font-lock-type-face ["operator"] @font-lock-type-face
(type_parameter_constraints_clause (type_parameter_constraints_clause
target: (identifier) @font-lock-type-face) (identifier) @font-lock-type-face)
(type_constraint type: (identifier) @font-lock-type-face) ,@(if (csharp-ts-mode--test-type-constraint)
(type_constraint type: (generic_name (identifier) @font-lock-type-face)) '((type_constraint type: (identifier) @font-lock-type-face)
(type_of_expression (identifier) @font-lock-type-face) (type_constraint type: (generic_name (identifier) @font-lock-type-face)))
'((type_parameter_constraint (type type: (identifier) @font-lock-type-face))
(type_parameter_constraint (type type: (generic_name (identifier) @font-lock-type-face)))))
,@(when (csharp-ts-mode--test-type-of-expression)
'((type_of_expression (identifier) @font-lock-type-face))
'((typeof_expression (identifier) @font-lock-type-face)))
(object_creation_expression (object_creation_expression
type: (identifier) @font-lock-type-face) type: (identifier) @font-lock-type-face)
(object_creation_expression (object_creation_expression
@ -832,8 +893,9 @@ compilation and evaluation time conflicts."
:override t :override t
`((qualified_name (identifier) @font-lock-type-face) `((qualified_name (identifier) @font-lock-type-face)
(using_directive (identifier) @font-lock-type-face) (using_directive (identifier) @font-lock-type-face)
(using_directive (name_equals ,@(when (csharp-ts-mode--test-name-equals)
(identifier) @font-lock-type-face)) '((using_directive (name_equals
(identifier) @font-lock-type-face))))
(enum_declaration (identifier) @font-lock-type-face) (enum_declaration (identifier) @font-lock-type-face)
(enum_member_declaration (identifier) @font-lock-variable-name-face) (enum_member_declaration (identifier) @font-lock-variable-name-face)
@ -861,10 +923,10 @@ compilation and evaluation time conflicts."
;;; Check if keyword void_keyword is available, then return the correct rule." ;;; Check if keyword void_keyword is available, then return the correct rule."
,@(condition-case nil ,@(condition-case nil
(progn (treesit-query-capture 'csharp '((void_keyword) @capture)) (progn (treesit-query-capture 'csharp '((void_keyword) @capture))
`((method_declaration type: [(identifier) (void_keyword)] @font-lock-type-face))) `((method_declaration ,csharp-ts-mode--type-field [(identifier) (void_keyword)] @font-lock-type-face)))
(error (error
`((method_declaration type: [(identifier) (predefined_type)] @font-lock-type-face)))) `((method_declaration ,csharp-ts-mode--type-field [(identifier) (predefined_type)] @font-lock-type-face))))
(method_declaration type: (generic_name (identifier) @font-lock-type-face)) (method_declaration ,csharp-ts-mode--type-field (generic_name (identifier) @font-lock-type-face))
(method_declaration name: (_) @font-lock-function-name-face) (method_declaration name: (_) @font-lock-function-name-face)
(catch_declaration (catch_declaration
@ -907,25 +969,45 @@ compilation and evaluation time conflicts."
:language 'c-sharp :language 'c-sharp
:feature 'directives :feature 'directives
:override t :override t
'((if_directive (if (csharp-ts-mode--test-if-directive)
"if" @font-lock-preprocessor-face '((if_directive
(identifier) @font-lock-variable-use-face) "if" @font-lock-preprocessor-face
(elif_directive (identifier) @font-lock-variable-use-face)
"elif" @font-lock-preprocessor-face (elif_directive
(identifier) @font-lock-variable-use-face) "elif" @font-lock-preprocessor-face
(else_directive) @font-lock-preprocessor-face (identifier) @font-lock-variable-use-face)
(endif_directive) @font-lock-preprocessor-face (else_directive) @font-lock-preprocessor-face
(define_directive (endif_directive) @font-lock-preprocessor-face
"define" @font-lock-preprocessor-face (define_directive
(identifier) @font-lock-variable-use-face) "define" @font-lock-preprocessor-face
(nullable_directive) @font-lock-preprocessor-face (identifier) @font-lock-variable-use-face)
(pragma_directive) @font-lock-preprocessor-face (nullable_directive) @font-lock-preprocessor-face
(region_directive) @font-lock-preprocessor-face (pragma_directive) @font-lock-preprocessor-face
(endregion_directive) @font-lock-preprocessor-face (region_directive) @font-lock-preprocessor-face
(region_directive (endregion_directive) @font-lock-preprocessor-face
(preproc_message) @font-lock-variable-use-face) (region_directive
(endregion_directive (preproc_message) @font-lock-variable-use-face)
(preproc_message) @font-lock-variable-use-face)))) (endregion_directive
(preproc_message) @font-lock-variable-use-face))
'((preproc_if
"#if" @font-lock-preprocessor-face
(identifier) @font-lock-variable-use-face)
(preproc_elif
"#elif" @font-lock-preprocessor-face
(identifier) @font-lock-variable-use-face)
(preproc_else) @font-lock-preprocessor-face
"#endif" @font-lock-preprocessor-face
(preproc_define
"#define" @font-lock-preprocessor-face
(preproc_arg) @font-lock-variable-use-face)
(preproc_nullable) @font-lock-preprocessor-face
(preproc_pragma) @font-lock-preprocessor-face
(preproc_region) @font-lock-preprocessor-face
(preproc_endregion) @font-lock-preprocessor-face
(preproc_region
(preproc_arg) @font-lock-variable-use-face)
(preproc_endregion
(preproc_arg) @font-lock-variable-use-face)))))
;;;###autoload ;;;###autoload
(add-to-list 'auto-mode-alist '("\\.cs\\'" . csharp-mode)) (add-to-list 'auto-mode-alist '("\\.cs\\'" . csharp-mode))

View file

@ -178,9 +178,9 @@
;;; User tweakable stuff ;;; User tweakable stuff
(defgroup eglot nil (defgroup eglot nil
"Interaction with Language Server Protocol servers." "Interaction with Language Server Protocol (LSP) servers."
:prefix "eglot-" :prefix "eglot-"
:group 'applications) :group 'tools)
(defun eglot-alternatives (alternatives) (defun eglot-alternatives (alternatives)
"Compute server-choosing function for `eglot-server-programs'. "Compute server-choosing function for `eglot-server-programs'.

View file

@ -1894,27 +1894,40 @@ description of the arguments."
(try-completion string (tags-table-files) predicate)))) (try-completion string (tags-table-files) predicate))))
(defun tags--get-current-buffer-name-in-tags-file () (defun tags--get-current-buffer-name-in-tags-file ()
"Get the file name that the current buffer corresponds in the tags file." "Return file name that corresponds to the current buffer in the tags table.
(let ((tag-dir This returns the file name which corresponds to the current buffer relative
(save-excursion to the directory of the current tags table (see `visit-tags-table-buffer').
(visit-tags-table-buffer) If no file is associated with the current buffer, this function returns nil."
(file-name-directory (buffer-file-name))))) (let ((buf-fname (buffer-file-name)))
(file-relative-name (buffer-file-name) tag-dir))) ;; FIXME: Are there interesting cases where 'buffer-file-name'
;; returns nil, but there's some file we expect to find in TAGS that
;; is associated with the buffer? The obvious cases of Dired and
;; Info buffers are not interesting for TAGS, but are there any
;; others?
(if buf-fname
(let ((tag-dir
(save-excursion
(visit-tags-table-buffer)
(file-name-directory buf-fname))))
(file-relative-name buf-fname tag-dir)))))
;;;###autoload ;;;###autoload
(defun list-tags (file &optional _next-match) (defun list-tags (file &optional _next-match)
"Display list of tags in file FILE. "Display list of tags in file FILE.
This searches only the first table in the list, and no included Interactively, prompt for FILE, with completion, offering the current
tables. FILE should be as it appeared in the `etags' command, buffer's file name as the defaul.
usually without a directory specification. If called This command searches only the first table in the list of tags tables,
interactively, FILE defaults to the file name of the current and does not search included tables.
buffer." FILE should be as it was submitted to the `etags' command, which usually
means relative to the directory of the tags table file."
(interactive (list (completing-read (interactive (list (completing-read
"List tags in file: " "List tags in file: "
'tags-complete-tags-table-file 'tags-complete-tags-table-file
nil t nil t
;; Default FILE to the current buffer. ;; Default FILE to the current buffer's file.
(tags--get-current-buffer-name-in-tags-file)))) (tags--get-current-buffer-name-in-tags-file))))
(if (string-empty-p file)
(user-error "You must specify a file name"))
(with-output-to-temp-buffer "*Tags List*" (with-output-to-temp-buffer "*Tags List*"
(princ (substitute-command-keys "Tags in file `")) (princ (substitute-command-keys "Tags in file `"))
(tags-with-face 'highlight (princ file)) (tags-with-face 'highlight (princ file))

View file

@ -676,19 +676,19 @@ Calls REPORT-FN directly."
(defun lua-ts-send-buffer () (defun lua-ts-send-buffer ()
"Send current buffer to the inferior Lua process." "Send current buffer to the inferior Lua process."
(interactive) (interactive nil lua-ts-mode)
(lua-ts-send-region (point-min) (point-max))) (lua-ts-send-region (point-min) (point-max)))
(defun lua-ts-send-file (file) (defun lua-ts-send-file (file)
"Send contents of FILE to the inferior Lua process." "Send contents of FILE to the inferior Lua process."
(interactive "f") (interactive "f" lua-ts-mode)
(with-temp-buffer (with-temp-buffer
(insert-file-contents-literally file) (insert-file-contents-literally file)
(lua-ts-send-region (point-min) (point-max)))) (lua-ts-send-region (point-min) (point-max))))
(defun lua-ts-send-region (beg end) (defun lua-ts-send-region (beg end)
"Send region between BEG and END to the inferior Lua process." "Send region between BEG and END to the inferior Lua process."
(interactive "r") (interactive "r" lua-ts-mode)
(let ((string (buffer-substring-no-properties beg end)) (let ((string (buffer-substring-no-properties beg end))
(proc-buffer (lua-ts-inferior-lua))) (proc-buffer (lua-ts-inferior-lua)))
(comint-send-string proc-buffer "print()") ; Prevent output from (comint-send-string proc-buffer "print()") ; Prevent output from

View file

@ -233,23 +233,6 @@
;; `python-imenu-format-parent-item-jump-label-function' variables for ;; `python-imenu-format-parent-item-jump-label-function' variables for
;; changing the way labels are formatted in the tree version. ;; changing the way labels are formatted in the tree version.
;; If you used python-mode.el you may miss auto-indentation when
;; inserting newlines. To achieve the same behavior you have two
;; options:
;; 1) Enable the minor-mode `electric-indent-mode' (enabled by
;; default) and use RET. If this mode is disabled use
;; `newline-and-indent', bound to C-j.
;; 2) Add the following hook in your .emacs:
;; (add-hook 'python-mode-hook
;; (lambda ()
;; (define-key python-mode-map "\C-m" 'newline-and-indent)))
;; I'd recommend the first one since you'll get the same behavior for
;; all modes out-of-the-box.
;; Flymake: A Flymake backend, using the pyflakes program by default, ;; Flymake: A Flymake backend, using the pyflakes program by default,
;; is provided. You can also use flake8 or pylint by customizing ;; is provided. You can also use flake8 or pylint by customizing
;; `python-flymake-command'. ;; `python-flymake-command'.
@ -440,7 +423,7 @@ To customize the Python interpreter for interactive use, modify
:help "Toggle subword movement and editing mode"]))) :help "Toggle subword movement and editing mode"])))
(defvar python-ts-mode-map (copy-keymap python-mode-map) (defvar python-ts-mode-map (copy-keymap python-mode-map)
"Keymap for `(copy-keymap python-mode-map)'.") "Keymap for `python-ts-mode'.")
;;; Python specialized rx ;;; Python specialized rx

View file

@ -2661,7 +2661,7 @@ window is included in the count.
If ALL-FRAMES is non-nil, count the windows in all frames instead If ALL-FRAMES is non-nil, count the windows in all frames instead
just the selected frame. just the selected frame.
See `walk-windows' for the precise meaning of this argument." See `walk-windows' for the precise meaning of these arguments."
(length (window-list-1 nil minibuf all-frames))) (length (window-list-1 nil minibuf all-frames)))
;;; Resizing windows. ;;; Resizing windows.
@ -4661,7 +4661,8 @@ Also see `switch-to-prev-buffer-skip-regexp'."
"Buffers that `switch-to-prev-buffer' and `switch-to-next-buffer' should skip. "Buffers that `switch-to-prev-buffer' and `switch-to-next-buffer' should skip.
The value can either be a regexp or a list of regexps. Buffers whose The value can either be a regexp or a list of regexps. Buffers whose
names match these regexps are skipped by `switch-to-prev-buffer' names match these regexps are skipped by `switch-to-prev-buffer'
and `switch-to-next-buffer'. and `switch-to-next-buffer', unless there's no other buffer to
switch to.
Also see `switch-to-prev-buffer-skip'." Also see `switch-to-prev-buffer-skip'."
:type '(choice regexp :type '(choice regexp

View file

@ -157,7 +157,7 @@ build should run on Windows 9X and newer systems).
When the installation ends, perform the post-installation steps When the installation ends, perform the post-installation steps
described on this page of the MinGW site: described on this page of the MinGW site:
http://www.mingw.org/wiki/Getting_Started https://web.archive.org/web/20210106033223/http://www.mingw.org/wiki/Getting_Started
in the "After Installing You Should ..." section. These steps are in the "After Installing You Should ..." section. These steps are
important for making your installation complete, and in particular important for making your installation complete, and in particular

View file

@ -669,6 +669,11 @@ nil, use FUNCTION instead."
(eshell-match-command-output "env VAR=hello env" "VAR=hello\n") (eshell-match-command-output "env VAR=hello env" "VAR=hello\n")
(should (equal (getenv "VAR") "value")))) (should (equal (getenv "VAR") "value"))))
(ert-deftest esh-var-test/local-variables/env/no-locals ()
"Test that \"env command\" works like \"command\"."
(with-temp-eshell
(eshell-match-command-output "env echo hi" "\\`hi\n")))
;; Variable aliases ;; Variable aliases