emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master e6dae47d718: Merge from origin/emacs-29


From: Eli Zaretskii
Subject: master e6dae47d718: Merge from origin/emacs-29
Date: Sat, 17 Feb 2024 04:55:35 -0500 (EST)

branch: master
commit e6dae47d718dfd2167554a1adfe28c5c744b9b2b
Merge: d85461ac61c 45f9af61b8e
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Merge from origin/emacs-29
    
    45f9af61b8e Remove references to phst@google.com.
    7256690a3ca * BUGS: Note how to report critical security issues.
    1035669b38b Add cross-reference to ELisp manual Caveats
    61a14507627 Improve directory prompt used by package-vc-checkout
    0c7c8210cb6 Minor Tramp doc adaption
    df243f785d4 Merge branch 'emacs-29' of git.sv.gnu.org:/srv/git/emacs ...
    17a395e04c6 ;; Fix typo in the Tramp documentation
    614b244a7fa * Improve reproducibility of inferred values by native comp
    9f9da26e0dc Handle typescript ts grammar breaking change for function...
    717d8c4285f Don't quote 't' in doc strings
---
 .mailmap                             |   3 +-
 BUGS                                 |   4 +
 doc/lispref/intro.texi               |   6 +-
 doc/misc/tramp.texi                  |   6 +-
 lisp/emacs-lisp/comp-cstr.el         |   2 +
 lisp/emacs-lisp/package-vc.el        |   4 +-
 lisp/net/tramp.el                    |   6 +-
 lisp/outline.el                      |   4 +-
 lisp/progmodes/typescript-ts-mode.el | 362 ++++++++++++++++++-----------------
 9 files changed, 208 insertions(+), 189 deletions(-)

diff --git a/.mailmap b/.mailmap
index 18e55b0d1e7..5e6ab5b8878 100644
--- a/.mailmap
+++ b/.mailmap
@@ -146,8 +146,7 @@ Philip Kaludercic <philipk@posteo.net>
 Philip Kaludercic <philipk@posteo.net> <philip.kaludercic@fau.de>
 Philip Kaludercic <philipk@posteo.net> <philip@icterid>
 Philip Kaludercic <philipk@posteo.net> <philip@warpmail.net>
-Philipp Stephani <phst@google.com>
-Philipp Stephani <phst@google.com> Philipp Stephani <p.stephani2@gmail.com>
+Philipp Stephani <p.stephani2@gmail.com>
 Phillip Lord <phillip.lord@russet.org.uk> <phillip.lord@newcastle.ac.uk>
 Pierre Lorenzon <devel@pollock-nageoire.net>
 Pieter van Oostrum <pieter@vanoostrum.org> <pieter-l@vanoostrum.org>
diff --git a/BUGS b/BUGS
index ee473213c89..f23faa7c756 100644
--- a/BUGS
+++ b/BUGS
@@ -21,6 +21,10 @@ If necessary, you can read the manual without an info 
program:
 
     cat info/emacs* | more "+/^File: emacs.*,  Node: Bugs,"
 
+If you think you may have found a critical security issue that needs
+to be communicated privately, please contact the GNU Emacs maintainers
+directly.  See admin/MAINTAINERS for their contact details.
+
 
 Please first check the file etc/PROBLEMS (e.g. with C-h C-p in Emacs) to
 make sure it isn't a known issue.
diff --git a/doc/lispref/intro.texi b/doc/lispref/intro.texi
index 2062ae64866..486125acb0d 100644
--- a/doc/lispref/intro.texi
+++ b/doc/lispref/intro.texi
@@ -89,9 +89,9 @@ you are criticizing.
 
 @cindex bugs
 @cindex suggestions
-Please send comments and corrections using @kbd{M-x
-report-emacs-bug}.  If you wish to contribute new code (or send a
-patch to fix a problem), use @kbd{M-x submit-emacs-patch}.
+Please send comments and corrections using @kbd{M-x report-emacs-bug}.
+For more details, @xref{Bugs,, Reporting Bugs, emacs, The GNU Emacs
+Manual}.
 
 @node Lisp History
 @section Lisp History
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index 90824024c03..affd760730b 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -525,7 +525,7 @@ is used as the group to change to.  The default host name 
is the same.
 @cindex @option{doas} method
 
 If the @option{su}, @option{sudo} or @option{doas} option should be
-performed on another host, it can be comnbined with a leading
+performed on another host, it can be combined with a leading
 @option{ssh} or @option{plink} option.  That means that @value{tramp}
 connects first to the other host with non-administrative credentials,
 and changes to administrative credentials on that host afterwards.  In
@@ -5243,8 +5243,8 @@ the additional handshaking messages for them.  This 
requires at least
 nitrokey, or titankey.
 @c @uref{https://docs.fedoraproject.org/en-US/quick-docs/using-yubikeys/}
 
-@strong{Note} that there are reports on problems of handling yubikey
-residential keys by @command{ssh-agent}.  As workaround, you might
+@strong{Note} that there are reports on problems of handling FIDO2
+(residential) keys by @command{ssh-agent}.  As workaround, you might
 disable @command{ssh-agent} for such keys.
 
 @item
diff --git a/lisp/emacs-lisp/comp-cstr.el b/lisp/emacs-lisp/comp-cstr.el
index 2984bedb1dd..0bc97e51592 100644
--- a/lisp/emacs-lisp/comp-cstr.el
+++ b/lisp/emacs-lisp/comp-cstr.el
@@ -249,6 +249,8 @@ Return them as multiple value."
                t)
               ((and (not (symbolp x)) (symbolp y))
                nil)
+              ((or (consp x) (consp y)
+                   nil))
               (t
                (< (sxhash-equal x)
                   (sxhash-equal y)))))))
diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el
index 37980c28b02..ef056c7909b 100644
--- a/lisp/emacs-lisp/package-vc.el
+++ b/lisp/emacs-lisp/package-vc.el
@@ -939,8 +939,8 @@ for the last released version of the package."
   (interactive
    (let* ((name (package-vc--read-package-name "Fetch package source: ")))
      (list (cadr (assoc name package-archive-contents #'string=))
-           (read-file-name "Clone into new or empty directory: " nil nil t nil
-                           (lambda (dir) (or (not (file-exists-p dir))
+           (read-directory-name "Clone into new or empty directory: " nil nil
+                                (lambda (dir) (or (not (file-exists-p dir))
                                              (directory-empty-p dir))))
            (and current-prefix-arg :last-release))))
   (package-vc--archives-initialize)
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index ae59915b1e8..2efee2344d2 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -745,9 +745,8 @@ The regexp should match at end of buffer."
 
 ;; A security key requires the user physically to touch the device
 ;; with their finger.  We must tell it to the user.
-;; Added in OpenSSH 8.2.  I've tested it with yubikey.  Nitrokey and
-;; Titankey, which have also passed the tests, do not show such a
-;; message.
+;; Added in OpenSSH 8.2.  I've tested it with Nitrokey, Titankey, and
+;; Yubikey.
 (defcustom tramp-security-key-confirm-regexp
   (rx bol (* "\r") "Confirm user presence for key " (* nonl) (* (any "\r\n")))
   "Regular expression matching security key confirmation message.
@@ -770,6 +769,7 @@ The regexp should match at end of buffer."
   :version "28.1"
   :type 'regexp)
 
+;; Needed only for FIDO2 (residential) keys.  Tested with Nitrokey and Yubikey.
 (defcustom tramp-security-key-pin-regexp
   (rx bol (* "\r") (group "Enter PIN for " (* nonl)) (* (any "\r\n")))
   "Regular expression matching security key PIN prompt.
diff --git a/lisp/outline.el b/lisp/outline.el
index 5ac0f0707f1..40a75701cbf 100644
--- a/lisp/outline.el
+++ b/lisp/outline.el
@@ -318,8 +318,8 @@ Using the value `insert' is not recommended in editable
 buffers because it modifies them.
 When the value is `in-margins', then clickable buttons are
 displayed in the margins before the headings.
-When the value is `t', clickable buttons are displayed
-in the buffer before the headings.  The values `t' and
+When the value is t, clickable buttons are displayed
+in the buffer before the headings.  The values t and
 `in-margins' can be used in editing buffers because they
 don't modify the buffer."
   ;; The value `insert' is not intended to be customizable.
diff --git a/lisp/progmodes/typescript-ts-mode.el 
b/lisp/progmodes/typescript-ts-mode.el
index e9c6afff440..9ee9432e4ee 100644
--- a/lisp/progmodes/typescript-ts-mode.el
+++ b/lisp/progmodes/typescript-ts-mode.el
@@ -199,183 +199,197 @@ Argument LANGUAGE is either `typescript' or `tsx'."
              [(nested_identifier (identifier)) (identifier)]
              @typescript-ts-jsx-tag-face)))))
 
+(defun tsx-ts-mode--font-lock-compatibility-function-expression (language)
+  "Handle tree-sitter grammar breaking change for `function' expression.
+
+LANGUAGE can be `typescript' or `tsx'.  Starting from version 0.20.4 of the
+typescript/tsx grammar, `function' becomes `function_expression'."
+  (condition-case nil
+      (progn (treesit-query-capture language '((function_expression) @cap))
+             ;; New version of the grammar
+             'function_expression)
+    (treesit-query-error
+    ;; Old version of the grammar
+    'function)))
+
 (defun typescript-ts-mode--font-lock-settings (language)
   "Tree-sitter font-lock settings.
 Argument LANGUAGE is either `typescript' or `tsx'."
-  (treesit-font-lock-rules
-   :language language
-   :feature 'comment
-   `([(comment) (hash_bang_line)] @font-lock-comment-face)
-
-   :language language
-   :feature 'constant
-   `(((identifier) @font-lock-constant-face
-      (:match "\\`[A-Z_][0-9A-Z_]*\\'" @font-lock-constant-face))
-     [(true) (false) (null)] @font-lock-constant-face)
-
-   :language language
-   :feature 'keyword
-   `([,@typescript-ts-mode--keywords] @font-lock-keyword-face
-     [(this) (super)] @font-lock-keyword-face)
-
-   :language language
-   :feature 'string
-   `((regex pattern: (regex_pattern)) @font-lock-regexp-face
-     (string) @font-lock-string-face
-     (template_string) @js--fontify-template-string
-     (template_substitution ["${" "}"] @font-lock-misc-punctuation-face))
-
-   :language language
-   :override t ;; for functions assigned to variables
-   :feature 'declaration
-   `((function
-      name: (identifier) @font-lock-function-name-face)
-     (function_declaration
-      name: (identifier) @font-lock-function-name-face)
-     (function_signature
-      name: (identifier) @font-lock-function-name-face)
-
-     (method_definition
-      name: (property_identifier) @font-lock-function-name-face)
-     (method_signature
-      name: (property_identifier) @font-lock-function-name-face)
-     (required_parameter (identifier) @font-lock-variable-name-face)
-     (optional_parameter (identifier) @font-lock-variable-name-face)
-
-     (variable_declarator
-      name: (identifier) @font-lock-function-name-face
-      value: [(function) (arrow_function)])
-
-     (variable_declarator
-      name: (identifier) @font-lock-variable-name-face)
-
-     (enum_declaration (identifier) @font-lock-type-face)
-
-     (extends_clause value: (identifier) @font-lock-type-face)
-     ;; extends React.Component<T>
-     (extends_clause value: (member_expression
-                             object: (identifier) @font-lock-type-face
-                             property: (property_identifier) 
@font-lock-type-face))
-
-     (arrow_function
-      parameter: (identifier) @font-lock-variable-name-face)
-
-     (variable_declarator
-      name: (array_pattern
-             (identifier)
-             (identifier) @font-lock-function-name-face)
-      value: (array (number) (function)))
-
-     (catch_clause
-      parameter: (identifier) @font-lock-variable-name-face)
-
-     ;; full module imports
-     (import_clause (identifier) @font-lock-variable-name-face)
-     ;; named imports with aliasing
-     (import_clause (named_imports (import_specifier
-                                    alias: (identifier) 
@font-lock-variable-name-face)))
-     ;; named imports without aliasing
-     (import_clause (named_imports (import_specifier
-                                    !alias
-                                    name: (identifier) 
@font-lock-variable-name-face)))
-
-     ;; full namespace import (* as alias)
-     (import_clause (namespace_import (identifier) 
@font-lock-variable-name-face)))
-
-   :language language
-   :feature 'identifier
-   `((nested_type_identifier
-      module: (identifier) @font-lock-type-face)
-
-     (type_identifier) @font-lock-type-face
-
-     (predefined_type) @font-lock-type-face
-
-     (new_expression
-      constructor: (identifier) @font-lock-type-face)
-
-     (enum_body (property_identifier) @font-lock-type-face)
-
-     (enum_assignment name: (property_identifier) @font-lock-type-face)
-
-     (variable_declarator
-      name: (identifier) @font-lock-variable-name-face)
-
-     (for_in_statement
-      left: (identifier) @font-lock-variable-name-face)
-
-     (arrow_function
-      parameters:
-      [(_ (identifier) @font-lock-variable-name-face)
-       (_ (_ (identifier) @font-lock-variable-name-face))
-       (_ (_ (_ (identifier) @font-lock-variable-name-face)))]))
-
-   :language language
-   :feature 'property
-   `((property_signature
-      name: (property_identifier) @font-lock-property-name-face)
-     (public_field_definition
-      name: (property_identifier) @font-lock-property-name-face)
-
-     (pair key: (property_identifier) @font-lock-property-use-face)
-
-     ((shorthand_property_identifier) @font-lock-property-use-face))
-
-   :language language
-   :feature 'expression
-   '((assignment_expression
-      left: [(identifier) @font-lock-function-name-face
-             (member_expression
-              property: (property_identifier) @font-lock-function-name-face)]
-      right: [(function) (arrow_function)]))
-
-   :language language
-   :feature 'function
-   '((call_expression
-      function:
-      [(identifier) @font-lock-function-call-face
-       (member_expression
-        property: (property_identifier) @font-lock-function-call-face)]))
-
-   :language language
-   :feature 'pattern
-   `((pair_pattern
-      key: (property_identifier) @font-lock-property-use-face
-      value: [(identifier) @font-lock-variable-name-face
-              (assignment_pattern left: (identifier) 
@font-lock-variable-name-face)])
-
-     (array_pattern (identifier) @font-lock-variable-name-face)
-
-     ((shorthand_property_identifier_pattern) @font-lock-variable-name-face))
-
-   :language language
-   :feature 'jsx
-   (append (tsx-ts-mode--font-lock-compatibility-bb1f97b language)
-          `((jsx_attribute (property_identifier) 
@typescript-ts-jsx-attribute-face)))
-
-   :language language
-   :feature 'number
-   `((number) @font-lock-number-face
-     ((identifier) @font-lock-number-face
-      (:match "\\`\\(?:NaN\\|Infinity\\)\\'" @font-lock-number-face)))
-
-   :language language
-   :feature 'operator
-   `([,@typescript-ts-mode--operators] @font-lock-operator-face
-     (ternary_expression ["?" ":"] @font-lock-operator-face))
-
-   :language language
-   :feature 'bracket
-   '((["(" ")" "[" "]" "{" "}"]) @font-lock-bracket-face)
-
-   :language language
-   :feature 'delimiter
-   '((["," "." ";" ":"]) @font-lock-delimiter-face)
-
-   :language language
-   :feature 'escape-sequence
-   :override t
-   '((escape_sequence) @font-lock-escape-face)))
+  (let ((func-exp (tsx-ts-mode--font-lock-compatibility-function-expression 
language)))
+    (treesit-font-lock-rules
+     :language language
+     :feature 'comment
+     `([(comment) (hash_bang_line)] @font-lock-comment-face)
+
+     :language language
+     :feature 'constant
+     `(((identifier) @font-lock-constant-face
+        (:match "\\`[A-Z_][0-9A-Z_]*\\'" @font-lock-constant-face))
+       [(true) (false) (null)] @font-lock-constant-face)
+
+     :language language
+     :feature 'keyword
+     `([,@typescript-ts-mode--keywords] @font-lock-keyword-face
+       [(this) (super)] @font-lock-keyword-face)
+
+     :language language
+     :feature 'string
+     `((regex pattern: (regex_pattern)) @font-lock-regexp-face
+       (string) @font-lock-string-face
+       (template_string) @js--fontify-template-string
+       (template_substitution ["${" "}"] @font-lock-misc-punctuation-face))
+
+     :language language
+     :override t ;; for functions assigned to variables
+     :feature 'declaration
+     `((,func-exp
+        name: (identifier) @font-lock-function-name-face)
+       (function_declaration
+        name: (identifier) @font-lock-function-name-face)
+       (function_signature
+        name: (identifier) @font-lock-function-name-face)
+
+       (method_definition
+        name: (property_identifier) @font-lock-function-name-face)
+       (method_signature
+        name: (property_identifier) @font-lock-function-name-face)
+       (required_parameter (identifier) @font-lock-variable-name-face)
+       (optional_parameter (identifier) @font-lock-variable-name-face)
+
+       (variable_declarator
+        name: (identifier) @font-lock-function-name-face
+        value: [(,func-exp) (arrow_function)])
+
+       (variable_declarator
+        name: (identifier) @font-lock-variable-name-face)
+
+       (enum_declaration (identifier) @font-lock-type-face)
+
+       (extends_clause value: (identifier) @font-lock-type-face)
+       ;; extends React.Component<T>
+       (extends_clause value: (member_expression
+                               object: (identifier) @font-lock-type-face
+                               property: (property_identifier) 
@font-lock-type-face))
+
+       (arrow_function
+        parameter: (identifier) @font-lock-variable-name-face)
+
+       (variable_declarator
+        name: (array_pattern
+               (identifier)
+               (identifier) @font-lock-function-name-face)
+        value: (array (number) (,func-exp)))
+
+       (catch_clause
+        parameter: (identifier) @font-lock-variable-name-face)
+
+       ;; full module imports
+       (import_clause (identifier) @font-lock-variable-name-face)
+       ;; named imports with aliasing
+       (import_clause (named_imports (import_specifier
+                                      alias: (identifier) 
@font-lock-variable-name-face)))
+       ;; named imports without aliasing
+       (import_clause (named_imports (import_specifier
+                                      !alias
+                                      name: (identifier) 
@font-lock-variable-name-face)))
+
+       ;; full namespace import (* as alias)
+       (import_clause (namespace_import (identifier) 
@font-lock-variable-name-face)))
+
+     :language language
+     :feature 'identifier
+     `((nested_type_identifier
+        module: (identifier) @font-lock-type-face)
+
+       (type_identifier) @font-lock-type-face
+
+       (predefined_type) @font-lock-type-face
+
+       (new_expression
+        constructor: (identifier) @font-lock-type-face)
+
+       (enum_body (property_identifier) @font-lock-type-face)
+
+       (enum_assignment name: (property_identifier) @font-lock-type-face)
+
+       (variable_declarator
+        name: (identifier) @font-lock-variable-name-face)
+
+       (for_in_statement
+        left: (identifier) @font-lock-variable-name-face)
+
+       (arrow_function
+        parameters:
+        [(_ (identifier) @font-lock-variable-name-face)
+         (_ (_ (identifier) @font-lock-variable-name-face))
+         (_ (_ (_ (identifier) @font-lock-variable-name-face)))]))
+
+     :language language
+     :feature 'property
+     `((property_signature
+        name: (property_identifier) @font-lock-property-name-face)
+       (public_field_definition
+        name: (property_identifier) @font-lock-property-name-face)
+
+       (pair key: (property_identifier) @font-lock-property-use-face)
+
+       ((shorthand_property_identifier) @font-lock-property-use-face))
+
+     :language language
+     :feature 'expression
+     `((assignment_expression
+        left: [(identifier) @font-lock-function-name-face
+               (member_expression
+                property: (property_identifier) @font-lock-function-name-face)]
+        right: [(,func-exp) (arrow_function)]))
+
+     :language language
+     :feature 'function
+     '((call_expression
+        function:
+        [(identifier) @font-lock-function-call-face
+         (member_expression
+          property: (property_identifier) @font-lock-function-call-face)]))
+
+     :language language
+     :feature 'pattern
+     `((pair_pattern
+        key: (property_identifier) @font-lock-property-use-face
+        value: [(identifier) @font-lock-variable-name-face
+                (assignment_pattern left: (identifier) 
@font-lock-variable-name-face)])
+
+       (array_pattern (identifier) @font-lock-variable-name-face)
+
+       ((shorthand_property_identifier_pattern) @font-lock-variable-name-face))
+
+     :language language
+     :feature 'jsx
+     (append (tsx-ts-mode--font-lock-compatibility-bb1f97b language)
+            `((jsx_attribute (property_identifier) 
@typescript-ts-jsx-attribute-face)))
+
+     :language language
+     :feature 'number
+     `((number) @font-lock-number-face
+       ((identifier) @font-lock-number-face
+        (:match "\\`\\(?:NaN\\|Infinity\\)\\'" @font-lock-number-face)))
+
+     :language language
+     :feature 'operator
+     `([,@typescript-ts-mode--operators] @font-lock-operator-face
+       (ternary_expression ["?" ":"] @font-lock-operator-face))
+
+     :language language
+     :feature 'bracket
+     '((["(" ")" "[" "]" "{" "}"]) @font-lock-bracket-face)
+
+     :language language
+     :feature 'delimiter
+     '((["," "." ";" ":"]) @font-lock-delimiter-face)
+
+     :language language
+     :feature 'escape-sequence
+     :override t
+     '((escape_sequence) @font-lock-escape-face))))
 
 (defvar typescript-ts-mode--sentence-nodes
   '("import_statement"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]