emacs-diffs
[Top][All Lists]
Advanced

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

master cd42244fca8: Merge from origin/emacs-29


From: Stefan Kangas
Subject: master cd42244fca8: Merge from origin/emacs-29
Date: Sat, 28 Jan 2023 00:45:50 -0500 (EST)

branch: master
commit cd42244fca8785fb57c25c731afcf3227c2ad14b
Merge: 5642bf0b972 128a999bfe7
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>

    Merge from origin/emacs-29
    
    128a999bfe7 Make project-current not error out inside non-existent dirs
    194bc97879d Improve documentation of 'shell-command-dont-erase-buffer'
    00629c03964 Fix errors in fontification of JavaScript import-statemen...
    fd145499bbd Fix fontification TypeScript of import-statements (bug#61...
    752c526585f ; Fix typos
---
 doc/emacs/misc.texi                  |  6 ++++++
 lisp/net/tramp.el                    |  2 +-
 lisp/org/ChangeLog.1                 |  2 +-
 lisp/progmodes/c-ts-mode.el          |  2 +-
 lisp/progmodes/js.el                 | 13 +++++++++++--
 lisp/progmodes/project.el            |  7 +++++--
 lisp/progmodes/typescript-ts-mode.el | 12 +++++++++++-
 lisp/simple.el                       |  6 ++++++
 test/lisp/progmodes/project-tests.el | 10 ++++++++++
 9 files changed, 52 insertions(+), 8 deletions(-)

diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi
index 88d4188d144..3ee8ee5ee39 100644
--- a/doc/emacs/misc.texi
+++ b/doc/emacs/misc.texi
@@ -751,6 +751,8 @@ Command Output*"} (@code{shell-command-buffer-name}) buffer 
(if the
 output is long).  The variables @code{resize-mini-windows} and
 @code{max-mini-window-height} (@pxref{Minibuffer Edit}) control when
 Emacs should consider the output to be too long for the echo area.
+Note that customizing @code{shell-command-dont-erase-buffer},
+described below, can affect what is displayed in the echo area.
 
   For instance, one way to decompress a file named @file{foo.gz} is to
 type @kbd{M-! gunzip foo.gz @key{RET}}.  That shell command normally
@@ -867,6 +869,10 @@ Restores the position of point as it was before inserting 
the
 shell-command output.
 @end table
 
+Note that if this option is non-@code{nil}, the output shown in the
+echo area could be from more than just the last command, since the
+echo area just displays a portion of the output buffer.
+
 In case the output buffer is not the current buffer, shell command
 output is appended at the end of this buffer.
 
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 6dca53dcbcf..f38e570700e 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -4938,7 +4938,7 @@ substitution.  SPEC-LIST is a list of char/value pairs 
used for
                :command (append `(,login-program) login-args command)
                :coding coding :noquery noquery :connection-type connection-type
                :sentinel sentinel :stderr stderr))
-           ;; Set filter.  Prior Emacs 29.1, it doesn't work reliable
+           ;; Set filter.  Prior Emacs 29.1, it doesn't work reliably
            ;; to provide it as `make-process' argument when filter is
            ;; t.  See Bug#51177.
            (when filter
diff --git a/lisp/org/ChangeLog.1 b/lisp/org/ChangeLog.1
index eb126df6334..a4eae350d98 100644
--- a/lisp/org/ChangeLog.1
+++ b/lisp/org/ChangeLog.1
@@ -30500,7 +30500,7 @@
 
        * org.el (org-make-tags-matcher): Never use IDO for completing the
        tags matcher match string.
-       (org-completing-read): Also remove the special biding for "?".
+       (org-completing-read): Also remove the special binding for "?".
 
        * org-attach.el (org-attach-allow-inheritance): New option.
        (org-attach-inherited): New variable.
diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el
index 1f22a2b2a64..76ac92ed82d 100644
--- a/lisp/progmodes/c-ts-mode.el
+++ b/lisp/progmodes/c-ts-mode.el
@@ -319,7 +319,7 @@ PARENT is NODE's parent."
         (save-excursion
           (goto-char (treesit-node-start node))
           ;; Add an extra level if the opening bracket is on its own
-          ;; line, except (1) it's at top-level, or (2) it's immedate
+          ;; line, except (1) it's at top-level, or (2) it's immediate
           ;; parent is another block.
           (cond ((bolp) nil) ; Case (1).
                 ((let ((parent-type (treesit-node-type
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index dca93c856fc..6ae325c0657 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -3546,9 +3546,18 @@ This function is intended for use in 
`after-change-functions'."
              (identifier)
              @font-lock-function-name-face)
       value: (array (number) (function)))
+     ;; full module imports
      (import_clause (identifier) @font-lock-variable-name-face)
-     (import_clause (named_imports (import_specifier (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 'javascript
    :feature 'property
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 59270070484..2343adf4698 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -1,7 +1,7 @@
 ;;; project.el --- Operations on the current project  -*- lexical-binding: t; 
-*-
 
 ;; Copyright (C) 2015-2023 Free Software Foundation, Inc.
-;; Version: 0.9.5
+;; Version: 0.9.6
 ;; Package-Requires: ((emacs "26.1") (xref "1.4.0"))
 
 ;; This is a GNU ELPA :core package.  Avoid using functionality that
@@ -530,7 +530,10 @@ project backend implementation of 
`project-external-roots'.")
                dir
                (lambda (d)
                  ;; Maybe limit count to 100 when we can drop Emacs < 28.
-                 (setq last-matches (directory-files d nil marker-re t)))))
+                 (setq last-matches
+                       (condition-case nil
+                           (directory-files d nil marker-re t)
+                         (file-missing nil))))))
              (backend
               (cl-find-if
                (lambda (b)
diff --git a/lisp/progmodes/typescript-ts-mode.el 
b/lisp/progmodes/typescript-ts-mode.el
index 9c4f49efd5e..3437ea43505 100644
--- a/lisp/progmodes/typescript-ts-mode.el
+++ b/lisp/progmodes/typescript-ts-mode.el
@@ -196,8 +196,18 @@ Argument LANGUAGE is either `typescript' or `tsx'."
      (catch_clause
       parameter: (identifier) @font-lock-variable-name-face)
 
+     ;; full module imports
      (import_clause (identifier) @font-lock-variable-name-face)
-     (import_clause (named_imports (import_specifier (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
diff --git a/lisp/simple.el b/lisp/simple.el
index 561c7b568ab..7bda368d85d 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -4554,6 +4554,9 @@ If the output is short enough to display in the echo area
 \(determined by the variable `max-mini-window-height' if
 `resize-mini-windows' is non-nil), it is shown there.
 Otherwise, the buffer containing the output is displayed.
+Note that if `shell-command-dont-erase-buffer' is non-nil,
+the echo area could display more than just the output of the
+last command.
 
 If there is output and an error, and you did not specify \"insert it
 in the current buffer\", a message about the error goes at the end
@@ -4848,6 +4851,9 @@ If the output is short enough to display in the echo area
 `resize-mini-windows' is non-nil), it is shown there.
 Otherwise it is displayed in the buffer named by `shell-command-buffer-name'.
 The output is available in that buffer in both cases.
+Note that if `shell-command-dont-erase-buffer' is non-nil,
+the echo area could display more than just the output of the
+last command.
 
 If there is output and an error, a message about the error
 appears at the end of the output.
diff --git a/test/lisp/progmodes/project-tests.el 
b/test/lisp/progmodes/project-tests.el
index aea0666629d..5a206b67db1 100644
--- a/test/lisp/progmodes/project-tests.el
+++ b/test/lisp/progmodes/project-tests.el
@@ -152,4 +152,14 @@ When `project-ignores' includes a name matching project 
dir."
     (should (equal '(".dir-locals.el" "foo")
                    (mapcar #'file-name-nondirectory (project-files 
project))))))
 
+(ert-deftest project-vc-nonexistent-directory-no-error ()
+  "Check that is doesn't error out when the current dir does not exist."
+  (skip-unless (eq (vc-responsible-backend default-directory) 'Git))
+  (let* ((dir (expand-file-name "foo-456/bar/" (ert-resource-directory)))
+         (_ (vc-file-clearprops dir))
+         (project-vc-extra-root-markers '(".dir-locals.el"))
+         (project (project-current nil dir)))
+    (should-not (null project))
+    (should (string-match-p "/test/lisp/progmodes/project-resources/\\'" 
(project-root project)))))
+
 ;;; project-tests.el ends here



reply via email to

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