diff --git a/.mailmap b/.mailmap index 9647749940f..bbfe4bceba1 100644 --- a/.mailmap +++ b/.mailmap @@ -26,6 +26,7 @@ Andrew G Cohen Andrew G Cohen Arash Esbati Arash Esbati +Arni Magnusson Artur Malabarba Artur Malabarba Artur Malabarba Basil L. Contovounesios diff --git a/ChangeLog.4 b/ChangeLog.4 index 4bd583818ef..975750f40cd 100644 --- a/ChangeLog.4 +++ b/ChangeLog.4 @@ -11433,7 +11433,7 @@ * etc/NEWS: Update announcement. -2024-05-15 Sean Whitton +2024-05-15 Stefan Monnier (eglot--managed-mode): Avoid calling track-changes unregistered diff --git a/admin/MAINTAINERS b/admin/MAINTAINERS index be21a28b759..413a587d398 100644 --- a/admin/MAINTAINERS +++ b/admin/MAINTAINERS @@ -238,9 +238,22 @@ Yuan Fu lisp/treesit.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 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 diff --git a/doc/emacs/calendar.texi b/doc/emacs/calendar.texi index f511b789796..f6de2e77135 100644 --- a/doc/emacs/calendar.texi +++ b/doc/emacs/calendar.texi @@ -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 mode it is bound to @code{calendar-forward-week}, which moves to the 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} (@code{calendar-backward-day}) move forward and back by days. diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index 0ec2385860b..4ac751a71af 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -2673,14 +2673,13 @@ loaded, this command can use it to generate completion candidates. @xref{Symbol Completion}. @findex list-tags - @kbd{M-x list-tags} reads the name of one of the files covered by -the selected tags table, and displays a list of tags defined in that -file. Do not include a directory as part of the file name unless the -file name recorded in the tags table includes a directory. This -command works only with the etags backend, and requires a tags table -for the project to be available. @xref{Tags Tables}. If used -interactively, the default tag is file name of the current buffer if -used interactively. + @kbd{M-x list-tags} reads the name of one of the files covered by the +selected tags table, with completion, and displays the list of tags +defined in that file; it offers the current buffer's file name as the +default file whose tags to list. Do not include a directory as part of +the file name unless the file name recorded in the tags table includes a +directory. This command works only with the etags backend, and requires +a tags table for the project to be available. @xref{Tags Tables}. @findex tags-next-file @kbd{M-x tags-next-file} visits files covered by the selected tags table. diff --git a/doc/lispref/ChangeLog.1 b/doc/lispref/ChangeLog.1 index e2d4c019b4a..a508ad9f28b 100644 --- a/doc/lispref/ChangeLog.1 +++ b/doc/lispref/ChangeLog.1 @@ -5551,7 +5551,7 @@ * loading.texi (Hooks for Loading): Document after-load-functions. Copyedits. -2010-03-24 Arni Magnusson (tiny change) +2010-03-24 Arni Magnusson (tiny change) * frames.texi (Cursor Parameters): Fix typo. (Bug#5760) diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi index 76f15b2595c..af11e498d86 100644 --- a/doc/lispref/variables.texi +++ b/doc/lispref/variables.texi @@ -1732,11 +1732,11 @@ buffer-local variables interactively. @defun kill-all-local-variables &optional kill-permanent This function eliminates all the buffer-local variable bindings of the 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} @code{permanent-local-hook} property (@pxref{Setting Hooks}) won't be 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 buffer: it sets the local keymap to @code{nil}, the syntax table to the diff --git a/doc/misc/ChangeLog.1 b/doc/misc/ChangeLog.1 index 37b304c2dca..14570bb174f 100644 --- a/doc/misc/ChangeLog.1 +++ b/doc/misc/ChangeLog.1 @@ -6407,7 +6407,7 @@ * epa.texi (Mail-mode integration): Mention the way to do "encrypt-to-self". (Bug#1807) -2009-02-05 Arni Magnusson (tiny change) +2009-02-05 Arni Magnusson (tiny change) * ada-mode.texi (No project files): Fix typo. (Bug#2214) diff --git a/lisp/ChangeLog.16 b/lisp/ChangeLog.16 index fa956ac8784..6d807fbd44d 100644 --- a/lisp/ChangeLog.16 +++ b/lisp/ChangeLog.16 @@ -25198,7 +25198,7 @@ * emacs-lisp/package-x.el (package-upload-buffer-internal): Use `equal' for upload base check. -2011-03-08 Arni Magnusson (tiny change) +2011-03-08 Arni Magnusson (tiny change) * textmodes/texinfo.el (texinfo-environments): Add deftypecv, deftypeivar, deftypemethod, deftypeop, html. (Bug#2783) diff --git a/lisp/ChangeLog.17 b/lisp/ChangeLog.17 index 3eec2da2038..e6c35f63a20 100644 --- a/lisp/ChangeLog.17 +++ b/lisp/ChangeLog.17 @@ -6706,7 +6706,7 @@ 2014-10-12 Stefan Monnier * progmodes/bat-mode.el (bat-font-lock-keywords): Fix \\<_ typo - (bug#18622). Reported by Arni Magnusson . + (bug#18622). Reported by Arni Magnusson . * progmodes/prolog.el (prolog-electric--underscore): Same. 2014-10-12 Michael Albinus @@ -20214,7 +20214,7 @@ (dos-mode-syntax-table): Don't use "w" for symbol chars. (dos-font-lock-keywords): Try to adjust font-lock rules accordingly. -2013-08-07 Arni Magnusson +2013-08-07 Arni Magnusson * progmodes/dos.el: New file. * generic-x.el (bat-generic-mode): Redefine as an obsolete alias to diff --git a/lisp/doc-view.el b/lisp/doc-view.el index 78dc472ddc3..446beeafd9f 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el @@ -260,7 +260,7 @@ showing only titles and no page number." See `doc-view-mupdf-use-svg'. 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." :version "30.1") diff --git a/lisp/electric.el b/lisp/electric.el index d02bcb4735b..d84faf5433f 100644 --- a/lisp/electric.el +++ b/lisp/electric.el @@ -385,6 +385,9 @@ If multiple rules match, only first one is executed.") (defvar electric-layout-allow-duplicate-newlines nil "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 () (when electric-layout-mode (electric-layout-post-self-insert-function-1))) @@ -409,7 +412,10 @@ If multiple rules match, only first one is executed.") (goto-char pos) (funcall probe last-command-event)))) (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) (when (functionp rule) (setq rule (funcall rule))) (dolist (sym (if (symbolp rule) (list rule) rule)) diff --git a/lisp/eshell/esh-var.el b/lisp/eshell/esh-var.el index 0e6c01d2774..5d7ea1c3664 100644 --- a/lisp/eshell/esh-var.el +++ b/lisp/eshell/esh-var.el @@ -436,7 +436,8 @@ the values of nil for each." :usage "[NAME=VALUE]... [COMMAND]...") (if 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 (dolist (setting (sort (eshell-environment-variables) 'string-lessp)) (eshell-buffered-print setting "\n")))))) diff --git a/lisp/info-look.el b/lisp/info-look.el index 3066bc1d75d..a84026ac8b9 100644 --- a/lisp/info-look.el +++ b/lisp/info-look.el @@ -30,6 +30,8 @@ ;; Scheme: https://groups.csail.mit.edu/mac/ftpdir/scm/r5rs.info.tar.gz ;; LaTeX: https://mirrors.ctan.org/info/latex2e-help-texinfo/latex2e.texi ;; (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 ;; 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") ("tramp" "Variable Index" "Function Index") ("url" "Variable Index" "Function Index") + ("use-package" "Index") ("vhdl" "(vhdl-mode)Variable Index" "(vhdl-mode)Command Index") ("viper" "Variable Index" "Function Index") ("vtable" "Index") diff --git a/lisp/mail/mailabbrev.el b/lisp/mail/mailabbrev.el index c8006294a7d..16e9d6f1bea 100644 --- a/lisp/mail/mailabbrev.el +++ b/lisp/mail/mailabbrev.el @@ -410,7 +410,7 @@ with a space." ;;; Syntax tables and abbrev-expansion (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. 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 diff --git a/lisp/mail/mailalias.el b/lisp/mail/mailalias.el index cce2fcb104d..ca4ff67a6ac 100644 --- a/lisp/mail/mailalias.el +++ b/lisp/mail/mailalias.el @@ -50,7 +50,7 @@ When t this still needs to be initialized.") (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 ;; `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 ;; Don't refer to mail-address-field-regexp here; ;; 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)) ("Newsgroups:" . (if (boundp 'gnus-active-hashtb) gnus-active-hashtb diff --git a/lisp/net/eudc.el b/lisp/net/eudc.el index da8955d52c9..9e640768285 100644 --- a/lisp/net/eudc.el +++ b/lisp/net/eudc.el @@ -23,25 +23,27 @@ ;; along with GNU Emacs. If not, see . ;;; 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: -;; EUDC comes with an extensive documentation, please refer to it. +;; 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. ;; -;; The main entry points of EUDC are: -;; `eudc-query-form': Query a directory server from a query form -;; `eudc-expand-inline': Query a directory server for the e-mail address -;; 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 +;; Usage: +;; +;; EUDC comes with extensive documentation, please refer to it. +;; +;; The main entry points of EUDC are: +;; `eudc-query-form': Query a directory server from a query form +;; `eudc-expand-inline': Query a directory server for the e-mail address +;; 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: diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index 659035d4acb..2a713de83c2 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el @@ -2537,9 +2537,25 @@ activity. Only run if the buffer is not visible and (rcirc-activity-string lopri) ")")) (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))) "[]") - (t "[]"))) + (t + ""))) (run-hooks 'rcirc-update-activity-string-hook) (force-mode-line-update t))) diff --git a/lisp/net/sieve-manage.el b/lisp/net/sieve-manage.el index 0faeb02bcfd..da2167cd231 100644 --- a/lisp/net/sieve-manage.el +++ b/lisp/net/sieve-manage.el @@ -178,7 +178,8 @@ If it is nil, logging is disabled." (with-current-buffer (get-buffer-create sieve-manage-log) (set-buffer-multibyte nil) - (buffer-disable-undo))) + (buffer-disable-undo) + (current-buffer))) (goto-char (point-max)) (apply #'insert args)))) diff --git a/lisp/progmodes/bat-mode.el b/lisp/progmodes/bat-mode.el index 0687a0c9f32..613de34eb7e 100644 --- a/lisp/progmodes/bat-mode.el +++ b/lisp/progmodes/bat-mode.el @@ -1,8 +1,8 @@ ;;; 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 +;; Author: Arni Magnusson ;; Keywords: languages ;; This file is part of GNU Emacs. diff --git a/lisp/progmodes/csharp-mode.el b/lisp/progmodes/csharp-mode.el index 29325ab9632..1f86527191a 100644 --- a/lisp/progmodes/csharp-mode.el +++ b/lisp/progmodes/csharp-mode.el @@ -46,6 +46,7 @@ (declare-function treesit-node-type "treesit.c") (declare-function treesit-node-child-by-field-name "treesit.c") (declare-function treesit-query-capture "treesit.c") +(declare-function treesit-query-compile "treesit.c") (defgroup csharp nil "Major mode for editing C# code." @@ -730,6 +731,52 @@ compilation and evaluation time conflicts." "readonly" "unmanaged") "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 (treesit-font-lock-rules :language 'c-sharp @@ -760,7 +807,9 @@ compilation and evaluation time conflicts." :feature 'keyword `([,@csharp-ts-mode--keywords] @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 :override t @@ -786,18 +835,23 @@ compilation and evaluation time conflicts." :feature 'string `([(string_literal) (verbatim_string_literal) - (interpolated_string_text) - (interpolated_verbatim_string_text) - (character_literal) - "\"" - "$\"" - "@$\"" - "$@\""] @font-lock-string-face) + ,@(if (csharp-ts-mode--test-interpolated-string-text) + '((interpolated_string_text) + (interpolated_verbatim_string_text) + (character_literal) + "\"" + "$\"" + "@$\"" + "$@\"") + '((interpolated_string_expression) + (interpolation_start) + (interpolation_quote)))] + @font-lock-string-face) :language 'c-sharp :override t :feature 'type - '((predefined_type) @font-lock-type-face + `((predefined_type) @font-lock-type-face (implicit_type) @font-lock-type-face (nullable_type) @font-lock-type-face (type_parameter @@ -816,10 +870,17 @@ compilation and evaluation time conflicts." (cast_expression (generic_name (identifier) @font-lock-type-face)) ["operator"] @font-lock-type-face (type_parameter_constraints_clause - target: (identifier) @font-lock-type-face) - (type_constraint type: (identifier) @font-lock-type-face) - (type_constraint type: (generic_name (identifier) @font-lock-type-face)) - (type_of_expression (identifier) @font-lock-type-face) + (identifier) @font-lock-type-face) + ,@(if (csharp-ts-mode--test-type-constraint) + '((type_constraint type: (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 type: (identifier) @font-lock-type-face) (object_creation_expression @@ -832,8 +893,9 @@ compilation and evaluation time conflicts." :override t `((qualified_name (identifier) @font-lock-type-face) (using_directive (identifier) @font-lock-type-face) - (using_directive (name_equals - (identifier) @font-lock-type-face)) + ,@(when (csharp-ts-mode--test-name-equals) + '((using_directive (name_equals + (identifier) @font-lock-type-face)))) (enum_declaration (identifier) @font-lock-type-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." ,@(condition-case nil (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 - `((method_declaration type: [(identifier) (predefined_type)] @font-lock-type-face)))) - (method_declaration type: (generic_name (identifier) @font-lock-type-face)) + `((method_declaration ,csharp-ts-mode--type-field [(identifier) (predefined_type)] @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) (catch_declaration @@ -907,25 +969,45 @@ compilation and evaluation time conflicts." :language 'c-sharp :feature 'directives :override t - '((if_directive - "if" @font-lock-preprocessor-face - (identifier) @font-lock-variable-use-face) - (elif_directive - "elif" @font-lock-preprocessor-face - (identifier) @font-lock-variable-use-face) - (else_directive) @font-lock-preprocessor-face - (endif_directive) @font-lock-preprocessor-face - (define_directive - "define" @font-lock-preprocessor-face - (identifier) @font-lock-variable-use-face) - (nullable_directive) @font-lock-preprocessor-face - (pragma_directive) @font-lock-preprocessor-face - (region_directive) @font-lock-preprocessor-face - (endregion_directive) @font-lock-preprocessor-face - (region_directive - (preproc_message) @font-lock-variable-use-face) - (endregion_directive - (preproc_message) @font-lock-variable-use-face)))) + (if (csharp-ts-mode--test-if-directive) + '((if_directive + "if" @font-lock-preprocessor-face + (identifier) @font-lock-variable-use-face) + (elif_directive + "elif" @font-lock-preprocessor-face + (identifier) @font-lock-variable-use-face) + (else_directive) @font-lock-preprocessor-face + (endif_directive) @font-lock-preprocessor-face + (define_directive + "define" @font-lock-preprocessor-face + (identifier) @font-lock-variable-use-face) + (nullable_directive) @font-lock-preprocessor-face + (pragma_directive) @font-lock-preprocessor-face + (region_directive) @font-lock-preprocessor-face + (endregion_directive) @font-lock-preprocessor-face + (region_directive + (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 (add-to-list 'auto-mode-alist '("\\.cs\\'" . csharp-mode)) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 5f2f66c5384..3c0c23f1c45 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -178,9 +178,9 @@ ;;; User tweakable stuff (defgroup eglot nil - "Interaction with Language Server Protocol servers." + "Interaction with Language Server Protocol (LSP) servers." :prefix "eglot-" - :group 'applications) + :group 'tools) (defun eglot-alternatives (alternatives) "Compute server-choosing function for `eglot-server-programs'. diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index d3eb0d46e9b..35dc0215046 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el @@ -1894,27 +1894,40 @@ description of the arguments." (try-completion string (tags-table-files) predicate)))) (defun tags--get-current-buffer-name-in-tags-file () - "Get the file name that the current buffer corresponds in the tags file." - (let ((tag-dir - (save-excursion - (visit-tags-table-buffer) - (file-name-directory (buffer-file-name))))) - (file-relative-name (buffer-file-name) tag-dir))) + "Return file name that corresponds to the current buffer in the tags table. +This returns the file name which corresponds to the current buffer relative +to the directory of the current tags table (see `visit-tags-table-buffer'). +If no file is associated with the current buffer, this function returns nil." + (let ((buf-fname (buffer-file-name))) + ;; 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 (defun list-tags (file &optional _next-match) "Display list of tags in file FILE. -This searches only the first table in the list, and no included -tables. FILE should be as it appeared in the `etags' command, -usually without a directory specification. If called -interactively, FILE defaults to the file name of the current -buffer." +Interactively, prompt for FILE, with completion, offering the current +buffer's file name as the defaul. +This command searches only the first table in the list of tags tables, +and does not search included tables. +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 "List tags in file: " 'tags-complete-tags-table-file nil t - ;; Default FILE to the current buffer. + ;; Default FILE to the current buffer's 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*" (princ (substitute-command-keys "Tags in file `")) (tags-with-face 'highlight (princ file)) diff --git a/lisp/progmodes/lua-ts-mode.el b/lisp/progmodes/lua-ts-mode.el index d167215326c..a1dae0628d4 100644 --- a/lisp/progmodes/lua-ts-mode.el +++ b/lisp/progmodes/lua-ts-mode.el @@ -676,19 +676,19 @@ Calls REPORT-FN directly." (defun lua-ts-send-buffer () "Send current buffer to the inferior Lua process." - (interactive) + (interactive nil lua-ts-mode) (lua-ts-send-region (point-min) (point-max))) (defun lua-ts-send-file (file) "Send contents of FILE to the inferior Lua process." - (interactive "f") + (interactive "f" lua-ts-mode) (with-temp-buffer (insert-file-contents-literally file) (lua-ts-send-region (point-min) (point-max)))) (defun lua-ts-send-region (beg end) "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)) (proc-buffer (lua-ts-inferior-lua))) (comint-send-string proc-buffer "print()") ; Prevent output from diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 5532d5f6ce1..812e28268c2 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -233,23 +233,6 @@ ;; `python-imenu-format-parent-item-jump-label-function' variables for ;; 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, ;; is provided. You can also use flake8 or pylint by customizing ;; `python-flymake-command'. @@ -440,7 +423,7 @@ To customize the Python interpreter for interactive use, modify :help "Toggle subword movement and editing mode"]))) (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 diff --git a/lisp/window.el b/lisp/window.el index 07ea9584908..5822947f2fe 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -2661,7 +2661,7 @@ window is included in the count. If ALL-FRAMES is non-nil, count the windows in all frames instead 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))) ;;; 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. 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' -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'." :type '(choice regexp diff --git a/nt/INSTALL b/nt/INSTALL index 6167365169b..b959ce362f7 100644 --- a/nt/INSTALL +++ b/nt/INSTALL @@ -157,7 +157,7 @@ build should run on Windows 9X and newer systems). When the installation ends, perform the post-installation steps 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 important for making your installation complete, and in particular diff --git a/test/lisp/eshell/esh-var-tests.el b/test/lisp/eshell/esh-var-tests.el index 6b0e225f05f..7b29e4a21db 100644 --- a/test/lisp/eshell/esh-var-tests.el +++ b/test/lisp/eshell/esh-var-tests.el @@ -669,6 +669,11 @@ nil, use FUNCTION instead." (eshell-match-command-output "env VAR=hello env" "VAR=hello\n") (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