Merge from origin/emacs-29

128a999bfe Make project-current not error out inside non-existent dirs
194bc97879 Improve documentation of 'shell-command-dont-erase-buffer'
00629c0396 Fix errors in fontification of JavaScript import-statemen...
fd145499bb Fix fontification TypeScript of import-statements (bug#61...
752c526585 ; Fix typos
This commit is contained in:
Stefan Kangas 2023-01-28 06:30:25 +01:00
commit cd42244fca
9 changed files with 52 additions and 8 deletions

View file

@ -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.

View file

@ -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

View file

@ -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.

View file

@ -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

View file

@ -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

View file

@ -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)

View file

@ -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

View file

@ -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.

View file

@ -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