]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years agoUse Gnulib module alignasof instead of stdalign
Paul Eggert [Sat, 4 Feb 2023 22:55:12 +0000 (14:55 -0800)]
Use Gnulib module alignasof instead of stdalign

* admin/merge-gnulib (GNULIB_MODULES):
Replace obsolescent Gnulib module stdalign with alignasof.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lib/stdalign.in.h: Remove; no longer needed.

2 years agoUpdate from Gnulib by running admin/merge-gnulib
Paul Eggert [Sat, 4 Feb 2023 22:45:11 +0000 (14:45 -0800)]
Update from Gnulib by running admin/merge-gnulib

2 years agoPrefer https: to git: URIs
Paul Eggert [Sat, 4 Feb 2023 22:24:37 +0000 (14:24 -0800)]
Prefer https: to git: URIs

Prefer https: to git: URIs on Savannah.
The idea is to avoid some adversary-in-the-middle attacks
on developers.

2 years agonadvice: Fix bug#61179
Stefan Monnier [Sat, 4 Feb 2023 16:23:31 +0000 (11:23 -0500)]
nadvice: Fix bug#61179

Advising interactive forms relies on the ability to distinguish
interactive forms that do nothing else than return a function.
So, be careful to preserve this info.
Furthermore, interactive forms are expected to be evaluated in
the lexical context captured by the closure to which they belong,
so be careful to preserve that context when manipulating those forms.

* lisp/emacs-lisp/cconv.el (cconv-convert, cconv-analyze-form) <lambda>:
Preserve the info that an interactive form does nothing else than
return a function.

* lisp/emacs-lisp/nadvice.el (advice--interactive-form-1): New function.
(advice--interactive-form): Use it.
(advice--make-interactive-form): Refine to also accept function values
quoted with `quote`.  Remove obsolete TODO.

* test/lisp/emacs-lisp/nadvice-tests.el: Don't disallow byte-compilation.
(advice-test-bug61179): New test.

* lisp/emacs-lisp/oclosure.el (cconv--interactive-helper): Allow
the `if` arg to be a form.
* lisp/simple.el (oclosure-interactive-form): Adjust accordingly.

2 years agoAdd test for java indentation (bug#61115)
Theodor Thornhill [Fri, 3 Feb 2023 08:09:49 +0000 (09:09 +0100)]
Add test for java indentation (bug#61115)

* test/lisp/progmodes/java-ts-mode-resources/indent.erts: Add new test
case.

2 years agoCC Mode: Fontify a certain foo * bar class by the asymmetric space heuristic
Alan Mackenzie [Fri, 3 Feb 2023 20:55:59 +0000 (20:55 +0000)]
CC Mode: Fontify a certain foo * bar class by the asymmetric space heuristic

This fixes bug #61144.  If the space around the * is "symmetric" we leave foo
* bar unfontified, a multiplication operation.  If it is "asymmetric" we
fontify it as a pointer declaration.

* lisp/progmodes/cc-engine.el (c-fdoc-assymetric-space-about-asterisk): New
macro, extracted from c-forward-decl-or-cast-1.
(c-forward-decl-or-cast-1): Invoke the new macro twice, in CASE 16 (new) and
CASE 17.5 (the source of the macro).  In CASE 16, additionally set
unsafe-maybe when appropriate.

2 years agoMerge from origin/emacs-29
Stefan Kangas [Fri, 3 Feb 2023 05:30:24 +0000 (06:30 +0100)]
Merge from origin/emacs-29

96ea27278b4 ; Fix c-ts-mode indent test
d963a8f1355 Make c-ts-mode indent tests side-effect-free
8a6bdf88b4b Call treesit_record_change in insert_from_gap_1
a2b77c79dcc Use c-ts-common-statement-offset for closing brackets too
74e715cb729 ; Go back to original point when filling comments in c-ts...
b8009bbf2d8 ; Fix error where we pass t to treesit-node-type in c-ts-...
88ccf78b206 ; * src/treesit.c (treesit_predicate_match): Simplify las...
20454128b8b Minor improvements in sqlite.c
3b3c47d977b (treesit_predicate_match): Match node text against regexp...
e8334781c9f Improve documentation of gdb-mi's dedicated windows
c4988840598 Avoid spurious pause in kill-ring-save (Bug#60841)
382ab516cef Change the default of 'treesit-defun-tactic' for 'c-ts-mode'
4d3428e95a9 Fix docstring fontification of CL's 'defstruct'
1c125baa3f0 Teach 'hs-minor-mode' about tree-sitter based modes
2de0ab5cbd3 ; Doc fixes in keymap.el
c6660a6d6de Improve documentation of 'repeat-mode' and related variables
be304bb3286 ; * etc/NEWS: Mention the 'utf-8-auto' bugfix (bug#60750).

# Conflicts:
# etc/NEWS

2 years ago; Fix c-ts-mode indent test
Yuan Fu [Fri, 3 Feb 2023 02:30:11 +0000 (18:30 -0800)]
; Fix c-ts-mode indent test

* test/lisp/progmodes/c-ts-mode-resources/indent.erts: Move the linux
style test case down.

2 years agoMake c-ts-mode indent tests side-effect-free
Yuan Fu [Fri, 3 Feb 2023 02:23:21 +0000 (18:23 -0800)]
Make c-ts-mode indent tests side-effect-free

Running indent tests changes the global value of
c-ts-mode-indent-style.  That's not good.  This change fixes that.

I also refactored the indent style functions a bit.

* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--prompt-for-style): New function.
(c-ts-mode-set-local-style): New function.
(c-ts-mode-set-style): Use c-ts-mode--prompt-for-style.  Use
derived-mode-p when testing for major mode.  Remove check of current
buffer's major mode since it doesn't matter.

* test/lisp/progmodes/c-ts-mode-resources/indent-bsd.erts:
* test/lisp/progmodes/c-ts-mode-resources/indent.erts: Use
c-ts-mode-set-local-style to set the indent style locally.

2 years agoCall treesit_record_change in insert_from_gap_1
Yuan Fu [Fri, 3 Feb 2023 01:22:22 +0000 (17:22 -0800)]
Call treesit_record_change in insert_from_gap_1

Before this change, insert_from_gap calls treesit_record_change but
insert_from_gap_1 doesn't.  However, insert_from_gap_1 is a public
function and is called in many other places outside of insdel.c.  This
could lead to tree-sitter's parse tree becoming out-of-sync with the
buffer content.

This change might fix bug#60650.

* src/insdel.c (insert_from_gap_1): Call treesit_record_change.
(insert_from_gap): Remove call to treesit_record_change.

* admin/notes/tree-sitter/treesit_record_change: New file.

2 years agoUse c-ts-common-statement-offset for closing brackets too
Yuan Fu [Thu, 2 Feb 2023 22:57:41 +0000 (14:57 -0800)]
Use c-ts-common-statement-offset for closing brackets too

Merge c-ts-mode--close-bracket-offset into
c-ts-common-statement-offset.

* lisp/progmodes/c-ts-common.el:
(c-ts-common-statement-offset): Handle closing brackets too.
(c-ts-mode--close-bracket-offset): Remove function.
* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): Use
c-ts-common-statement-offset for closing brackets.

2 years ago; Go back to original point when filling comments in c-ts-mode
Yuan Fu [Thu, 2 Feb 2023 22:48:22 +0000 (14:48 -0800)]
; Go back to original point when filling comments in c-ts-mode

* lisp/progmodes/c-ts-common.el:
(c-ts-common--fill-block-comment): Go to original point.

2 years ago; Fix error where we pass t to treesit-node-type in c-ts-common.el
Yuan Fu [Thu, 2 Feb 2023 22:42:42 +0000 (14:42 -0800)]
; Fix error where we pass t to treesit-node-type in c-ts-common.el

* lisp/progmodes/c-ts-common.el:
(c-ts-common-statement-offset): Move the form that sets node to t
down, also add a check for node’s nullness.

2 years ago; * src/treesit.c (treesit_predicate_match): Simplify last change.
Eli Zaretskii [Thu, 2 Feb 2023 19:54:15 +0000 (21:54 +0200)]
; * src/treesit.c (treesit_predicate_match): Simplify last change.

2 years agoMinor improvements in sqlite.c
Eli Zaretskii [Thu, 2 Feb 2023 19:45:44 +0000 (21:45 +0200)]
Minor improvements in sqlite.c

* src/sqlite.c (Fsqlite_next): Doc fix.  Return nil if SQLITE_DONE
was once seen for this statement.  (Bug#61151)
(row_to_value): Cons the value in reverse, to avoid the Fnreverse
call.  Patch by Helmut Eller <eller.helmut@gmail.com>.
(Bug#61165)

2 years ago(treesit_predicate_match): Match node text against regexp without consing
Dmitry Gutov [Thu, 2 Feb 2023 11:32:41 +0000 (13:32 +0200)]
(treesit_predicate_match): Match node text against regexp without consing

* src/treesit.c (treesit_predicate_match): Match node text against
regexp without creating a new string object (bug#60953).

* src/search.c (search_buffer): Make not static.
Delete declaration near the beginning of the file.

* src/lisp.h: Declare it here.

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--builtin-method-p):
Remove function.
(ruby-ts--font-lock-settings): Use the regexp with :match directly.

2 years agoImprove documentation of gdb-mi's dedicated windows
Eli Zaretskii [Thu, 2 Feb 2023 18:49:15 +0000 (20:49 +0200)]
Improve documentation of gdb-mi's dedicated windows

* doc/emacs/building.texi (Other GDB Buffers): Describe the I/O
buffer and commands to show individual specialized windows.
Improve indexing.

2 years agoAvoid spurious pause in kill-ring-save (Bug#60841)
Kévin Le Gouguec [Sun, 29 Jan 2023 10:23:01 +0000 (11:23 +0100)]
Avoid spurious pause in kill-ring-save (Bug#60841)

'indicate-copied-region' checks whether the region is "highlighted"
and if not, briefly moves point to mark to give a visual cue of the
extent of text that was saved to the kill ring.

The region is considered "highlighted" if (a) it is active and (b) its
face specifies a :background.  That latter condition does not account
for the multiple ways in which the face can make the region "visually
distinct" from the default face, so switch to the more extensive
predicate face-differs-from-default-p.

The patch also fixes a couple of issues with the predicate's
implementation, and introduces a new user option in case anyone
happened to enjoy unconditional blinking.

* lisp/faces.el (face-differs-from-default-p): Filter out :extend; add
rationale for the attributes we ignore.
* lisp/simple.el (copy-region-blink-predicate): Add option to let
users explicitly opt into or out of blinking point and mark.
(region-indistinguishable-p): New function to detect
"if there is currently no active region highlighting", leveraging
face-differs-from-default-p.
(indicate-copied-region): Use it.
* src/xfaces.c (merge_face_ref): Allow :stipple to be nil, since it is
a documented valid value for that attribute.
* etc/NEWS: Announce user option.

2 years agoChange the default of 'treesit-defun-tactic' for 'c-ts-mode'
Eli Zaretskii [Thu, 2 Feb 2023 18:21:02 +0000 (20:21 +0200)]
Change the default of 'treesit-defun-tactic' for 'c-ts-mode'

* lisp/progmodes/c-ts-mode.el (c-ts-mode): Set
'treesit-defun-tactic' as appropriate for C.  (Bug#61208)

2 years agoFix docstring fontification of CL's 'defstruct'
Eli Zaretskii [Thu, 2 Feb 2023 18:12:02 +0000 (20:12 +0200)]
Fix docstring fontification of CL's 'defstruct'

* lisp/emacs-lisp/lisp-mode.el (defstruct): Set 'doc-string'
property.  Patch by Nicolas Martyanoff <nicolas@n16f.net>.

Copyright-paperwork-exempt: yes

2 years agoTeach 'hs-minor-mode' about tree-sitter based modes
Eli Zaretskii [Thu, 2 Feb 2023 17:41:09 +0000 (19:41 +0200)]
Teach 'hs-minor-mode' about tree-sitter based modes

* lisp/progmodes/hideshow.el (hs-special-modes-alist): Teach
'hs-minor-mode' about tree-sitter based modes.  (Bug#61232)

2 years ago; Doc fixes in keymap.el
Eli Zaretskii [Thu, 2 Feb 2023 14:14:15 +0000 (16:14 +0200)]
; Doc fixes in keymap.el

* lisp/keymap.el (key-valid-p, key-translate, keymap-lookup)
(define-keymap): Doc fixes.

2 years agoLAP peephole optimisation improvements
Mattias Engdegård [Wed, 18 Jan 2023 17:36:29 +0000 (18:36 +0100)]
LAP peephole optimisation improvements

- Since discardN-preserve-tos(1) and stack-set(1) have the same
  effect, treat them as equivalent in all transformations.

- Move the rule

        discardN-preserve-tos(X) discardN-preserve-tos(Y)
    --> discardN-preserve-tos(X+Y)

  from the final pass to the main iteration since it may enable
  further optimisations.

- Don't apply the rule

    goto(X) ... X: DISCARD --> DISCARD goto(Y) ... X: DISCARD Y:

  when DISCARD could be merged or deleted instead, which is even better.

- Add the rule

    OP const return -> <deleted> const return

  where OP is effect-free.

- Generalise the push-pop annihilation rule to

    PUSH(K) discard(N) -> discard(N-K), N>K
    PUSH(K) discard(N) -> <deleted>,    N=K

  to any N, not just N=1.

- Add the rule

    OP goto(X) Y: OP X: -> <deleted> Y: OP X:

  for any operation OP.

* lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode):
Make the changes described above.

2 years agoClean up LAP peephole logging
Mattias Engdegård [Tue, 31 Jan 2023 10:15:13 +0000 (11:15 +0100)]
Clean up LAP peephole logging

Make `byte-compile-log-lap` more robust and produce nicer output.
This is of interest for Elisp compiler maintainers only.

* lisp/emacs-lisp/byte-opt.el (bytecomp--log-lap-arg): New.
(byte-compile-log-lap-1): Extract argument conversion and rewrite
in a more modern way, fixing bugs.  In particular, tags are now
displayed as "X:" where X is the tag number, and that tag number
is shown as argument to goto-like ops.
(byte-optimize-lapcode): Clean up and simplify logging, producing
useful information when `byte-optimize-log` is `byte` as intended.

2 years agoImprove documentation of 'repeat-mode' and related variables
Eli Zaretskii [Thu, 2 Feb 2023 13:34:58 +0000 (15:34 +0200)]
Improve documentation of 'repeat-mode' and related variables

* lisp/bindings.el (next-error-repeat-map)
(page-navigation-repeat-map, undo-repeat-map):
* lisp/tab-bar.el (tab-bar-switch-repeat-map)
(tab-bar-move-repeat-map):
* lisp/window.el (other-window-repeat-map)
(resize-window-repeat-map): Mention repeatable commands in the doc
strings.
* lisp/repeat.el (repeat-exit-timeout, repeat-check-key)
(repeat-echo-function, repeat-mode, repeat-check-key)
(repeat-check-map, repeat-echo-message-string)
(repeat-echo-message, repeat-echo-mode-line)
(describe-repeat-maps): Improve wording of doc strings.
(describe-repeat-maps): Improve wording of the heading line.
(Bug#61183)

* doc/emacs/basic.texi (Repeating): Clarify and improve wording of
'repeat-mode' documentation.

2 years ago; * etc/NEWS: Mention the 'utf-8-auto' bugfix (bug#60750).
Eli Zaretskii [Thu, 2 Feb 2023 10:35:16 +0000 (12:35 +0200)]
; * etc/NEWS: Mention the 'utf-8-auto' bugfix (bug#60750).

2 years agoMerge from origin/emacs-29
Stefan Kangas [Thu, 2 Feb 2023 05:30:28 +0000 (06:30 +0100)]
Merge from origin/emacs-29

9715715ac16 (eshell--complete-commands-list): Fix regression in fix t...
ea1bb263153 * doc/emacs/basic.texi (Repeating): Mention describe-repe...
f91bf9df892 Unbreak the MS-Windows build

2 years ago(eshell--complete-commands-list): Fix regression in fix to bug#48995
Nicolas Martyanoff [Thu, 2 Feb 2023 03:17:57 +0000 (22:17 -0500)]
(eshell--complete-commands-list): Fix regression in fix to bug#48995

Copyright-Paperwork-Exempt: Yes

* lisp/eshell/em-cmpl.el (eshell--complete-commands-list):
Fix misuse of `completion-table-dynamic` when completing a file name.

2 years ago* lisp/progmodes/ruby-ts-mode.el: Extend treesit-sexp-type-regexp.
Juri Linkov [Wed, 1 Feb 2023 18:14:06 +0000 (20:14 +0200)]
* lisp/progmodes/ruby-ts-mode.el: Extend treesit-sexp-type-regexp.

(ruby-ts-mode): Add more node types to treesit-sexp-type-regexp.

2 years ago* doc/emacs/basic.texi (Repeating): Mention describe-repeat-maps (bug#61183).
Juri Linkov [Wed, 1 Feb 2023 18:05:52 +0000 (20:05 +0200)]
* doc/emacs/basic.texi (Repeating): Mention describe-repeat-maps (bug#61183).

* lisp/repeat.el (describe-repeat-maps): Add more explanation to
the docstring.  Suggested by Robert Pluim <rpluim@gmail.com>.

2 years agoHandle large process output strings for Tramp
Michael Albinus [Wed, 1 Feb 2023 17:40:11 +0000 (18:40 +0100)]
Handle large process output strings for Tramp

* lisp/net/tramp-sh.el (tramp-sh-handle-make-process):
Improve handling of connection-type `pipe'.

* test/lisp/tramp-tests.el (tramp-test29-start-file-process)
(tramp-test30-make-process): Extend tests.

2 years agoUnbreak the MS-Windows build
Eli Zaretskii [Wed, 1 Feb 2023 12:13:54 +0000 (14:13 +0200)]
Unbreak the MS-Windows build

* src/treesit.c (ts_query_pattern_count) [WINDOWSNT]: Load from
the library and define as macro.

2 years ago; Merge from origin/emacs-29
Stefan Kangas [Wed, 1 Feb 2023 05:30:39 +0000 (06:30 +0100)]
; Merge from origin/emacs-29

The following commit was skipped:

f7fcc62b78a ; Auto-commit of loaddefs files.

2 years agoMerge from origin/emacs-29
Stefan Kangas [Wed, 1 Feb 2023 05:30:39 +0000 (06:30 +0100)]
Merge from origin/emacs-29

66aa9cb450a ; (Ftreesit_query_capture): Fix typo
f711f4e99f7 (Ftreesit_query_capture): Cache list of predicates for gi...
47ab9ba55d7 * lisp/keymap.el (keymap-global-unset): Correct prompt
49b61405582 Fix cursor-in-echo-area on TTY frames

2 years ago; Auto-commit of loaddefs files.
Stefan Kangas [Wed, 1 Feb 2023 04:08:57 +0000 (05:08 +0100)]
; Auto-commit of loaddefs files.

2 years ago; Auto-commit of loaddefs files.
Stefan Kangas [Wed, 1 Feb 2023 04:08:25 +0000 (05:08 +0100)]
; Auto-commit of loaddefs files.

2 years ago; (Ftreesit_query_capture): Fix typo
Dmitry Gutov [Wed, 1 Feb 2023 01:53:38 +0000 (03:53 +0200)]
; (Ftreesit_query_capture): Fix typo

2 years ago(Ftreesit_query_capture): Cache list of predicates for given pattern index
Dmitry Gutov [Wed, 1 Feb 2023 01:45:55 +0000 (03:45 +0200)]
(Ftreesit_query_capture): Cache list of predicates for given pattern index

* src/treesit.c (Ftreesit_query_capture):
Cache list of predicates for given pattern index (bug#60953).

2 years ago* lisp/keymap.el (keymap-global-unset): Correct prompt
Robert Pluim [Tue, 31 Jan 2023 17:17:41 +0000 (18:17 +0100)]
* lisp/keymap.el (keymap-global-unset): Correct prompt

2 years agoFix cursor-in-echo-area on TTY frames
Eli Zaretskii [Tue, 31 Jan 2023 16:03:28 +0000 (18:03 +0200)]
Fix cursor-in-echo-area on TTY frames

* src/dispnew.c (update_frame_1): Fix off-by-one error when
positioning the cursor in the echo-area.  (Bug#61184)

2 years agoMerge from origin/emacs-29
Stefan Kangas [Tue, 31 Jan 2023 05:30:26 +0000 (06:30 +0100)]
Merge from origin/emacs-29

1684e254a3b Update to Transient v0.3.7-196-gb91f509
327941b2112 CC Mode: Fix a coding bug in c-make-keywords-re.  This sh...
2f3683cd4dc * lisp/isearch.el (isearch-emoji-by-name): Disable derive...
86b03046c00 Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/...
e866490a077 Fix keymap inheritance in descendants of 'c-ts-base-mode'
f67a9a12b7b Fix interactive use of `keymap-local-set' and `keymap-glo...

2 years agoDuring completion, convert all Eshell arguments to strings
Jim Porter [Sun, 22 Jan 2023 21:20:46 +0000 (13:20 -0800)]
During completion, convert all Eshell arguments to strings

Eshell was already converting some types (numbers, nil) to strings, as
well as fixing up multiple-dot forms like ".../", so this way is more
consistent and should produce fewer problems for Pcomplete functions.

* lisp/eshell/em-cmpl.el (eshell-complete-parse-arguments): Always
convert parsed arguments to strings.

* test/lisp/eshell/em-cmpl-tests.el (eshell-arguments-equal,
eshell-arguments-equal--equal-explainer): New functions.
(em-cmpl-test/parse-arguments/pipeline)
(em-cmpl-test/parse-arguments/multiple-dots)
(em-cmpl-test/parse-arguments/variable/numeric)
(em-cmpl-test/parse-arguments/variable/nil)
(em-cmpl-test/parse-arguments/variable/list)
(em-cmpl-test/parse-arguments/variable/splice): Use
'eshell-arguments-equal'.

2 years agoProperly parse Eshell variable splices for interactive completion
Jim Porter [Mon, 16 Jan 2023 00:44:23 +0000 (16:44 -0800)]
Properly parse Eshell variable splices for interactive completion

Previously, the code simply ignored the splice operator, which usually
worked, but isn't actually correct.

* lisp/eshell/em-cmpl.el (eshell-complete-eval-argument-form): New
function.
(eshell-complete-parse-arguments): Properly parse variable splices.

* test/lisp/eshell/em-cmpl-tests.el
(em-cmpl-test/parse-arguments/variable/splice): New test.

2 years agoAdd regression tests for Eshell completions
Jim Porter [Mon, 16 Jan 2023 00:44:17 +0000 (16:44 -0800)]
Add regression tests for Eshell completions

* lisp/eshell/esh-cmd.el (eshell-complete-lisp-symbols): Fix
docstring.

* test/lisp/eshell/em-cmpl-tests.el: New file.

2 years agoUpdate to Transient v0.3.7-196-gb91f509
Jonas Bernoulli [Mon, 30 Jan 2023 21:39:38 +0000 (22:39 +0100)]
Update to Transient v0.3.7-196-gb91f509

2 years agoCC Mode: Fix a coding bug in c-make-keywords-re. This should fix bug #61135
Alan Mackenzie [Mon, 30 Jan 2023 20:02:36 +0000 (20:02 +0000)]
CC Mode: Fix a coding bug in c-make-keywords-re.  This should fix bug #61135

* lisp/progmodes/cc-defs.el (c-make-keywords-re): Generate "\>" components in
result regexp when argument ADORN is `appendable'.  This fully fixes a bug
which was half-fixed on 2019-01-22.

2 years agoRevert "Fix incremental build failures with tree-sitter"
Eli Zaretskii [Mon, 30 Jan 2023 18:25:59 +0000 (20:25 +0200)]
Revert "Fix incremental build failures with tree-sitter"

This reverts commit 176830fe2bb1c80ee128e515f6223cddc8b0a2ca.
That commit isn't needed, since the problem was fixed
in another way, in the defcustom's :set function.

2 years agoGnus nnimap date search string must use C locale
Eric Abrahamsen [Mon, 30 Jan 2023 17:55:40 +0000 (09:55 -0800)]
Gnus nnimap date search string must use C locale

* lisp/gnus/gnus-search.el (gnus-search-imap-handle-date): The %b
needs to be the English month name for IMAP search.

2 years ago* lisp/isearch.el (isearch-emoji-by-name): Disable derived emoji (bug#60740).
Juri Linkov [Mon, 30 Jan 2023 17:39:33 +0000 (19:39 +0200)]
* lisp/isearch.el (isearch-emoji-by-name): Disable derived emoji (bug#60740).

Let-bind emoji--derived to nil to avoid the subsequent selection
of derived emoji that fails in transient.el.

2 years agoMerge from origin/emacs-29
Po Lu [Mon, 30 Jan 2023 13:47:39 +0000 (21:47 +0800)]
Merge from origin/emacs-29

f67a9a12b7b Fix interactive use of `keymap-local-set' and `keymap-glo...
dda4baa58b7 ; Fix build and startup without tree-sitter

2 years ago; Merge from origin/emacs-29
Po Lu [Mon, 30 Jan 2023 13:47:39 +0000 (21:47 +0800)]
; Merge from origin/emacs-29

The following commit was skipped:

99e40959f40 Fix password prompt in Tramp (do not merge)

2 years agoMerge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/emacs into emacs-29
Eli Zaretskii [Mon, 30 Jan 2023 13:45:54 +0000 (15:45 +0200)]
Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/emacs into emacs-29

2 years agoFix keymap inheritance in descendants of 'c-ts-base-mode'
Eli Zaretskii [Mon, 30 Jan 2023 13:42:06 +0000 (15:42 +0200)]
Fix keymap inheritance in descendants of 'c-ts-base-mode'

* lisp/progmodes/c-ts-mode.el (c-ts-base-mode-map): Rename from
'c-ts-mode-map'.
(c-ts-base-mode): Adjust accordingly.  (Bug#60983)

2 years agoFix incremental build failures with tree-sitter
Po Lu [Mon, 30 Jan 2023 13:33:27 +0000 (21:33 +0800)]
Fix incremental build failures with tree-sitter

* lisp/treesit.el (treesit-subtree-stat): Declare missing
function.
(treesit-buffer-root-node): Return nil if tree-sitter not
present.

2 years agoFix interactive use of `keymap-local-set' and `keymap-global-set'
Robert Pluim [Mon, 30 Jan 2023 09:51:30 +0000 (10:51 +0100)]
Fix interactive use of `keymap-local-set' and `keymap-global-set'

* lisp/keymap.el (keymap-global-set, keymap-local-set): Convert the
read key sequence to a string when called interactively.  Based on a
patch from Stephen Berman <stephen.berman@gmx.net>.  (Bug#61149)

2 years ago; Fix build and startup without tree-sitter
Eli Zaretskii [Mon, 30 Jan 2023 12:22:19 +0000 (14:22 +0200)]
; Fix build and startup without tree-sitter

* lisp/treesit.el (treesit--font-lock-level-setter): Don't loop
over all the buffers if tree-sitter is not built-in, or else
initialization of defcustom will fail.  (Bug#61155)
* lisp/progmodes/rust-ts-mode.el (treesit-node-parent):
* lisp/progmodes/c-ts-common.el (treesit-node-parent): Declare, to
* avoid byte-compilation warnings.

2 years agoFix password prompt in Tramp
Michael Albinus [Mon, 30 Jan 2023 10:55:23 +0000 (11:55 +0100)]
Fix password prompt in Tramp

* lisp/net/tramp.el (tramp-password-prompt-regexp):
Allow alternative trailing colons.  (Bug#61168)

2 years agoFix password prompt in Tramp (do not merge)
Michael Albinus [Mon, 30 Jan 2023 10:43:04 +0000 (11:43 +0100)]
Fix password prompt in Tramp (do not merge)

* lisp/net/tramp.el (tramp-password-prompt-regexp):
Allow alternative trailing colons.  (Bug#61168)

2 years agoMerge from origin/emacs-29
Stefan Kangas [Mon, 30 Jan 2023 06:19:43 +0000 (07:19 +0100)]
Merge from origin/emacs-29

8360e12f0ea Update to Org 9.6.1-23-gc45a05
9058601308d ; * doc/emacs/misc.texi (Document View): Remove @footnote...
197f994384c Document tree-sitter features in the user manual
b73539832d9 ; Remove treesit--font-lock-fast-mode-grace-count
64fee21d5f8 Fix dockerfile-ts-mode line continuation indentation (bug...
1970726e26a Use treesit-subtree-stat to determine treesit--font-lock-...
382e018856a Add treesit-subtree-stat
a3003492ace Move c-ts-mode--statement-offset to c-ts-common.el
4b1714571c8 ; Fix byte-compile warnings in c-ts-mode.el
f50cb7d7c4b ; Improve docstring of c-ts-mode--indent-style-setter
1c3ca3bb649 Fix <> syntax in rust-ts-mode
56e8607dc99 Fix spurious errors on Windows when deleting temporary *....
2bd0b947538 Fix java class member without access modifier (bug#61115)
1de6ebf2878 Make treesit-font-lock-level a defcustom
6e50ee8bbb5 Add c-ts-mode-set-style and :set for c-ts-mode-indent-style
450db0587a9 Minor documentation improvements for outline-minor-mode (...
578e8926713 ; * doc/lispref/variables.texi (File Local Variables): Im...
bc5ee2b7bf0 ; * src/comp.c: Remove Local Variables section to avoid w...
362678d90e1 python.el: Use correct regexp when enabling python-ts-mode
76bb46db9df ; * doc/emacs/frames.texi (Mouse References): Improve ind...

# Conflicts:
# doc/emacs/programs.texi
# etc/NEWS
# lisp/progmodes/c-ts-mode.el

2 years agoUpdate to Org 9.6.1-23-gc45a05
Kyle Meyer [Mon, 30 Jan 2023 02:42:17 +0000 (21:42 -0500)]
Update to Org 9.6.1-23-gc45a05

2 years ago; * doc/emacs/misc.texi (Document View): Remove @footnote (bug#61152).
Eli Zaretskii [Sun, 29 Jan 2023 17:00:59 +0000 (19:00 +0200)]
; * doc/emacs/misc.texi (Document View): Remove @footnote (bug#61152).

2 years agoDocument tree-sitter features in the user manual
Eli Zaretskii [Sun, 29 Jan 2023 13:22:20 +0000 (15:22 +0200)]
Document tree-sitter features in the user manual

* lisp/progmodes/c-ts-mode.el (c-ts-mode-map): Bind "C-c .", for
consistency with CC mode.
* lisp/treesit.el (treesit-font-lock-level): Doc fix.

* doc/emacs/programs.texi (C Indent, Custom C Indent): Document
the indentation features of 'c-ts-mode'.
(Moving by Defuns): Document 'treesit-defun-tactic'.
* doc/emacs/files.texi (Visiting): Document
'treesit-max-buffer-size'.
* doc/emacs/display.texi (Traditional Font Lock)
(Parser-based Font Lock): New subsections.
* doc/emacs/emacs.texi (Top): Update top-level menu.

2 years agoBetter commutative binary numerical op codegen
Mattias Engdegård [Sun, 29 Jan 2023 12:34:48 +0000 (13:34 +0100)]
Better commutative binary numerical op codegen

* lisp/emacs-lisp/bytecomp.el (byte-compile-variadic-numeric):
Put a constant argument last for better LAP code opportunities.
This applies to commutative binary operations (+ and *).
`min` and `max` are not included being not quite commutative.

2 years agoBetter compilation of n-ary comparisons
Mattias Engdegård [Sat, 28 Jan 2023 15:26:37 +0000 (16:26 +0100)]
Better compilation of n-ary comparisons

Transform n-ary comparisons to a chain of binary comparisons in the
Lisp optimiser instead of in codegen, to allow for subsequent
optimisations.  This generalises the transform, so that

   (< 1 X 10)  ->  (let ((x X)) (and (< 1 x) (< x 10)))

where (< 1 x) is then flipped to (> x 1) in codegen since it's
slightly more efficient to have the constant argument last.  Arguments
that are neither constants nor variables are given temporary bindings.

This results in about 2× speedup for 3-ary comparisons of fixnums with
nontrivial arguments, and also improves the code slightly for binary
comparisons with a constant first argument.

* lisp/emacs-lisp/byte-opt.el (byte-opt--nary-comparison): New,
set as the `byte-optimizer` property for =, <, <=, >, and >=.
* lisp/emacs-lisp/bytecomp.el (byte-compile-and-folded):
Rename to...
(byte-compile-cmp): ...and rewrite.

2 years agoFix host name completion for Tramp "podman" method
Michael Albinus [Sun, 29 Jan 2023 09:33:43 +0000 (10:33 +0100)]
Fix host name completion for Tramp "podman" method

* lisp/net/tramp-container.el (tramp-container--completion-function):
Rename from `tramp-docker--completion-function'.  Add argument
PROGRAM.  Use it for "docker" and "podman" host name completion.

* lisp/net/tramp.el (tramp-set-completion-function): Check, that
cdr of FUNCTION-LIST entries is a string.

2 years ago; Remove treesit--font-lock-fast-mode-grace-count
Yuan Fu [Sun, 29 Jan 2023 08:30:53 +0000 (00:30 -0800)]
; Remove treesit--font-lock-fast-mode-grace-count

* lisp/treesit.el:
(treesit--font-lock-fast-mode-grace-count): Remove. Should've been
removed in the last change.

2 years agoFix dockerfile-ts-mode line continuation indentation (bug#61131)
Randy Taylor [Sun, 29 Jan 2023 02:21:29 +0000 (21:21 -0500)]
Fix dockerfile-ts-mode line continuation indentation (bug#61131)

Without this rule, line continuations are only indented after entering
the contents for the line and hitting TAB or RET.

For example:
```
EXPOSE 1 \
```

After hitting RET to go to the next line, point would end up at BOL
instead of lining up with the previous entry, like so:
```
EXPOSE 1 \
2
```

The new rule will indent it as so:
```
EXPOSE 1 \
       2
```

* lisp/progmodes/dockerfile-ts-mode.el:
(dockerfile-ts-mode--indent-rules): New rule.
(dockerfile-ts-mode--line-continuation-p)
(dockerfile-ts-mode--line-continuation-anchor): New functions.

2 years agoUse treesit-subtree-stat to determine treesit--font-lock-fast-mode
Yuan Fu [Sun, 29 Jan 2023 08:07:46 +0000 (00:07 -0800)]
Use treesit-subtree-stat to determine treesit--font-lock-fast-mode

* lisp/treesit.el:
(treesit--children-covering-range-recurse): Return nil if LIMIT is
exceeded.
(treesit--font-lock-fast-mode): Change to a ternary value.
(treesit-font-lock-fontify-region): Enable fast mode based on the
result of treesit-subtree-stat.

2 years agoAdd treesit-subtree-stat
Yuan Fu [Sun, 29 Jan 2023 08:06:09 +0000 (00:06 -0800)]
Add treesit-subtree-stat

* src/treesit.c (Ftreesit_subtree_stat): New function.
* lisp/treesit.el (treesit): Add to shortdoc.

2 years agoMove c-ts-mode--statement-offset to c-ts-common.el
Yuan Fu [Sun, 29 Jan 2023 01:08:53 +0000 (17:08 -0800)]
Move c-ts-mode--statement-offset to c-ts-common.el

Now it can be used by other C-like languages.

* lisp/progmodes/c-ts-common.el (c-ts-common-indent-offset):
(c-ts-common-indent-block-type-regexp):
(c-ts-common-indent-bracketless-type-regexp): New variables.
(c-ts-common-statement-offset):
(c-ts-mode--fix-bracketless-indent):
(c-ts-mode--close-bracket-offset): New functions.

* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): Change
c-ts-mode--statement-offset to c-ts-common-statement-offset.
The (parent-is "if_statement") rules are now handled by (node-is
"compound_statement").

(c-ts-mode--statement-offset-post-processr):
(c-ts-mode--statement-offset):
(c-ts-mode--fix-bracketless-indent): Move to c-ts-common.el.

(c-ts-base-mode): Setup c-ts-common stuff.

* test/lisp/progmodes/c-ts-mode-resources/indent.erts: Make the test
more challenging.

2 years ago; Fix byte-compile warnings in c-ts-mode.el
Yuan Fu [Sun, 29 Jan 2023 00:25:23 +0000 (16:25 -0800)]
; Fix byte-compile warnings in c-ts-mode.el

* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--get-indent-style): Move down.
(c-ts-mode-set-style): Add docstring.

2 years ago; Improve docstring of c-ts-mode--indent-style-setter
Yuan Fu [Sun, 29 Jan 2023 00:20:29 +0000 (16:20 -0800)]
; Improve docstring of c-ts-mode--indent-style-setter

* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--indent-style-setter): Improve docstring.

2 years agoFix <> syntax in rust-ts-mode
Yuan Fu [Fri, 27 Jan 2023 01:49:45 +0000 (17:49 -0800)]
Fix <> syntax in rust-ts-mode

Similar to bug#60351, the angle brackets in rust-ts-mode are not
recognized as pairs when they should be.  This change copies the
function used by c++-ts-mode and adapts it to rust-ts-mode.

* lisp/progmodes/rust-ts-mode.el:
(rust-ts-mode--syntax-propertize): New function.
(rust-ts-mode): Set up syntax-propertize-function.

2 years agoFix spurious errors on Windows when deleting temporary *.eln files
Eli Zaretskii [Sun, 29 Jan 2023 07:44:53 +0000 (09:44 +0200)]
Fix spurious errors on Windows when deleting temporary *.eln files

* lisp/emacs-lisp/comp.el (comp--native-compile): On MS-Windows,
ignore errors when deleting a temporary .eln file.  (Bug#60996)

2 years ago* src/comp.c (F_RELOC_MAX_SIZE): Bump to 1600 (bug#60996).
Eli Zaretskii [Sun, 29 Jan 2023 07:28:31 +0000 (09:28 +0200)]
* src/comp.c (F_RELOC_MAX_SIZE): Bump to 1600 (bug#60996).

2 years agoFix java class member without access modifier (bug#61115)
Theodor Thornhill [Sat, 28 Jan 2023 18:51:08 +0000 (19:51 +0100)]
Fix java class member without access modifier (bug#61115)

This

```
public class T {
    @Autowired
        String a;
}
```

Should be indented as:

```
public class T {
    @Autowired
    String a;
}
````

* lisp/progmodes/java-ts-mode.el (java-ts-mode--indent-rules): Add new
rule to match edge case of field_declaration indentation.

2 years agoMake treesit-font-lock-level a defcustom
Theodor Thornhill [Sat, 28 Jan 2023 12:57:01 +0000 (13:57 +0100)]
Make treesit-font-lock-level a defcustom

* lisp/treesit.el (treesit--font-lock-level-setter): Setter for the
new defcustom.
(treesit-font-lock-level): Turn it into a defcustom.

2 years agoAdd c-ts-mode-set-style and :set for c-ts-mode-indent-style
Theodor Thornhill [Wed, 25 Jan 2023 20:04:00 +0000 (21:04 +0100)]
Add c-ts-mode-set-style and :set for c-ts-mode-indent-style

* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-style-setter): New
setter for the indent style defcustom.
(c-ts-mode-indent-style): Don't quote the values and refer to the
setter.
(c-ts-mode-set-style): New command to interactively set the indent
style.
(c-ts-mode--get-indent-style): New function renamed from
'c-ts-mode--set-indent-style'.

2 years agoMinor documentation improvements for outline-minor-mode (bug#61062)
Juri Linkov [Sat, 28 Jan 2023 17:59:22 +0000 (19:59 +0200)]
Minor documentation improvements for outline-minor-mode (bug#61062)

* doc/emacs/text.texi (Outline Minor Mode, Outline Minor Mode):
Add pxrefs to "Icons" and "Outline Visibility".

* etc/NEWS: Mention outline-minor-mode for two modes.

2 years ago; * lisp/emacs-lisp/range.el: Fix some typos
Michael Heerdegen [Wed, 11 Jan 2023 15:47:01 +0000 (16:47 +0100)]
; * lisp/emacs-lisp/range.el: Fix some typos

In some places, range elements are still called "article" (as in the
original Gnus code).
Replace these occurrences with the word "number" as used in the rest
of the file.

2 years ago; * doc/lispref/variables.texi (File Local Variables): Improve indexing.
Eli Zaretskii [Sat, 28 Jan 2023 14:59:17 +0000 (16:59 +0200)]
; * doc/lispref/variables.texi (File Local Variables): Improve indexing.

2 years ago; * src/comp.c: Remove Local Variables section to avoid warnings.
Eli Zaretskii [Sat, 28 Jan 2023 14:52:44 +0000 (16:52 +0200)]
; * src/comp.c: Remove Local Variables section to avoid warnings.

2 years ago; * lisp/progmodes/go-ts-mode.el (treesit-node-end): Avoid warning.
Eli Zaretskii [Sat, 28 Jan 2023 13:42:57 +0000 (15:42 +0200)]
; * lisp/progmodes/go-ts-mode.el (treesit-node-end): Avoid warning.

2 years agopython.el: Use correct regexp when enabling python-ts-mode
Brian Leung [Fri, 27 Jan 2023 01:36:42 +0000 (17:36 -0800)]
python.el: Use correct regexp when enabling python-ts-mode

* lisp/progmodes/python.el: Use "python[0-9.]*" regexp for
'interpreter-mode-alist', and not 'auto-mode-alist'.  (Bug#61090)

2 years agoTramp cleanup from recent test campaign
Michael Albinus [Sat, 28 Jan 2023 09:26:44 +0000 (10:26 +0100)]
Tramp cleanup from recent test campaign

* lisp/net/tramp.el (tramp-barf-if-file-missing): Fix docstring.
(tramp-handle-file-directory-p): Don't suppress errors.
(tramp-handle-shell-command):
* lisp/net/tramp-adb.el (tramp-adb-handle-make-process):
Make insertion of a stderr file more robust.

* lisp/net/tramp-archive.el (tramp-archive-handle-directory-files):
Use `tramp-barf-if-file-missing'.

* lisp/net/tramp-sudoedit.el
(tramp-sudoedit-handle-file-name-all-completions): Protect against
errors from `file-directory-p'.

* lisp/net/tramp.el (tramp-wrong-passwd-regexp):
* lisp/net/tramp-adb.el (tramp-adb-prompt):
* lisp/net/tramp-sh.el (tramp-sh-inotifywait-process-filter):
* lisp/net/tramp-smb.el (tramp-smb-maybe-open-connection): Unify regexps.

* test/lisp/net/tramp-tests.el (tramp-test48-auto-load)
(tramp-test48-delay-load): Unify regexps.

2 years ago; * doc/emacs/frames.texi (Mouse References): Improve indexing.
Eli Zaretskii [Sat, 28 Jan 2023 07:49:53 +0000 (09:49 +0200)]
; * doc/emacs/frames.texi (Mouse References): Improve indexing.

2 years agoMerge from origin/emacs-29
Stefan Kangas [Sat, 28 Jan 2023 05:30:25 +0000 (06:30 +0100)]
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

2 years agoMake 'eshell-number-regexp' into a regular defvar
Jim Porter [Thu, 26 Jan 2023 21:11:15 +0000 (13:11 -0800)]
Make 'eshell-number-regexp' into a regular defvar

This isn't a very useful thing to customize, since it needs to detect
numbers that can successfully be parsed by 'string-to-number'.
Changes to this variable would therefore likely requiring adjusting
'eshell-convert-to-number' as well.

* lisp/eshell/esh-util.el (eshell-number-regexp): Make into a defvar
and improve the regexp to support more numbers (including infinity and
NaN).

* test/lisp/eshell/esh-util-tests.el
(esh-util-test/eshell-convert-to-number/floating-point)
(esh-util-test/eshell-convert-to-number/floating-point-exponent)
(esh-util-test/eshell-convert-to-number/non-numeric)
(esh-util-test/eshell-convert-to-number/no-convert): New tests.

2 years agoAdd support for negative indices and index ranges in Eshell
Jim Porter [Fri, 20 Jan 2023 21:54:20 +0000 (13:54 -0800)]
Add support for negative indices and index ranges in Eshell

* lisp/eshell/esh-util.el (eshell-integer-regexp): New defvar.

* lisp/eshell/esh-var.el (eshell-parse-indices): Expand docstring.
(eshell-parse-index): New function.
(eshell-apply-indices): Use 'eshell-parse-index' to determine whether
to treat the first index as a regexp.  Simplify the implementation a
bit.
(eshell-index-range): New pcase macro...
(eshell-index-value): ... use it, and restructure the implementation.

* test/lisp/eshell/esh-var-tests.el (esh-var-test/interp-var-indices):
New function...
(esh-var-test/interp-var-indices/list)
(esh-var-test/interp-var-indices/vector)
(esh-var-test/interp-var-indices/ring)
(esh-var-test/interp-var-indices/split): ... use it.
(esh-var-test/interp-var-string-split-indices)
(esh-var-test/interp-var-regexp-split-indices)
(esh-var-test/interp-var-assoc): Expand tests to cover things that
look like numbers or ranges, but aren't.

* doc/misc/eshell.texi (Variables): Describe how to get all arguments
of the last command.
(Dollars Expansion): Explain negative indices and index ranges.
(Bugs and ideas): Remove now-implemented ideas.

* etc/NEWS: Announce this change.

2 years agoMake project-current not error out inside non-existent dirs
Dmitry Gutov [Sat, 28 Jan 2023 01:17:39 +0000 (03:17 +0200)]
Make project-current not error out inside non-existent dirs

* lisp/progmodes/project.el (project-try-vc):
Use condition-case to catch 'file-missing' (bug#61107).

* test/lisp/progmodes/project-tests.el
(project-vc-nonexistent-directory-no-error): New test.

2 years agoImprove documentation of 'shell-command-dont-erase-buffer'
Eli Zaretskii [Fri, 27 Jan 2023 17:01:49 +0000 (19:01 +0200)]
Improve documentation of 'shell-command-dont-erase-buffer'

* doc/emacs/misc.texi (Single Shell):
* lisp/simple.el (shell-command, shell-command-on-region):
Document that non-nil value of 'shell-command-dont-erase-buffer'
affects what is displayed in the echo area after the command.
(Bug#61100)

2 years agoRepair hideif regexp problems
Mattias Engdegård [Fri, 27 Jan 2023 16:21:28 +0000 (17:21 +0100)]
Repair hideif regexp problems

* lisp/progmodes/hideif.el (hif-white-regexp, hif-tokenize):
Avoid superlinear backtracking behaviour by rewriting regexps
to avoid nested repetitions and make positive progress each time.
Use lazy matching of the innards of /*...*/ comments to avoid
matching too much.

2 years agoDon't inhibit LAP-level DCE when switch ops are present
Mattias Engdegård [Tue, 17 Jan 2023 16:57:25 +0000 (17:57 +0100)]
Don't inhibit LAP-level DCE when switch ops are present

* lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode):
Allow removal of unreachable basic blocks in the LAP peephole
optimiser even when switch ops are present.  The origins of
this apparently unnecessary condition are unclear.

2 years agoFix errors in fontification of JavaScript import-statements (bug#61083)
Jostein Kjønigsen [Thu, 26 Jan 2023 19:32:18 +0000 (20:32 +0100)]
Fix errors in fontification of JavaScript import-statements (bug#61083)

Currently js-ts-mode handles imports with aliases incorrectly. To be
consistent with how we otherwise do things, we should only highlight
the variable which is new and/or introduced, in this case "someAlias".

Attached is a patch which fontifies import-declarations somewhat more
correctly.

The following cases have been tested and all fontify properly:

import gnu from "fsf";              // highlights gnu
import { gnu2 } from "fsf2";        // highlights gnu2
import { gnu as gnu3 } from "fsf3"; // highlights gnu3
import * as gnu4 from "fsf4";       // highlights gnu4

* lisp/progmodes/js.el (js--treesit-font-lock-settings): Add new
import_clause rules that adhere to the comment above.

2 years agoFix fontification TypeScript of import-statements (bug#61081)
Jostein Kjønigsen [Thu, 26 Jan 2023 18:54:27 +0000 (19:54 +0100)]
Fix fontification TypeScript of import-statements (bug#61081)

Currently typescript-ts-mode and tsx-ts-mode handles imports with
aliases incorrectly.

Consider the following case:

import { someFunc as someAlias } from "module";

In this case the entire import ("someFunc as someAlias") will be
highlighted as a variable name. "as" is also highlighted as a
variable, rather than a reserved keyword.

To be consistent with how we otherwise do things, we should only
highlight the variable which is new and/or introduced, in this case
"someAlias".

Attached is a patch which fontifies import-declarations somewhat more
correctly.

The following cases have been tested and all fontify properly:

import gnu from "fsf";              // highlights gnu
import { gnu2 } from "fsf2";        // highlights gnu2
import { gnu as gnu3 } from "fsf3"; // highlights gnu3
import * as gnu4 from "fsf4";       // highlights gnu4

* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--font-lock-settings): Tweak import_clause rules to
adhere to the comment above.

2 years ago; Fix typos
Stefan Kangas [Mon, 23 Jan 2023 01:27:15 +0000 (02:27 +0100)]
; Fix typos

2 years agoMerge from origin/emacs-29
Stefan Kangas [Fri, 27 Jan 2023 10:30:38 +0000 (11:30 +0100)]
Merge from origin/emacs-29

5859413df23 ; * lisp/progmodes/cc-engine.el: Delete trailing whitespace.
f72a394716f Work around package.el transitive dependency bug

2 years ago; Merge from origin/emacs-29
Stefan Kangas [Fri, 27 Jan 2023 10:30:38 +0000 (11:30 +0100)]
; Merge from origin/emacs-29

The following commit was skipped:

3766a666b55 ; Fix issues with processing out-of-order IRC messages

2 years agoMerge from origin/emacs-29
Stefan Kangas [Fri, 27 Jan 2023 10:30:38 +0000 (11:30 +0100)]
Merge from origin/emacs-29

f8c95d1a768 Fix xt-mouse on terminals that report UTF-8 encoded coord...
4bf7cb71edc Fix go-ts-mode indentation and set indent offset to 8 (Bu...
ff9498624fc ; * src/insdel.c (insert_from_buffer): Fix assertions.
41f497c8bee Fix doc strings of window-splitting commands
cdf74254ffa Fix indentation for c-ts-mode (bug#61026)
4bd06ce2a9f Fix call to treesit_record_change in insdel.c
00675aa724a Add support for building tree-sitter modules with MinGW
af28191b04f * lisp/net/tramp.el (tramp-wrong-passwd-regexp): Fix regexp.
42e02480c2b * doc/emacs/text.texi (Outline Minor Mode): New node spli...
37c1c924666 ; * etc/NEWS: Minor reordering.
cfb180329b5 ruby-ts-mode: Don't reindent when "class" or "def" is und...
abb3becb9fb treesit-install-language-grammar: Provide default repo url
c6613403e5c Fix Dired face for directory symlinks
37454de0c8f Pacify --without-x unused function warning
9a21cb10751 ; * etc/NEWS: Fix typos.
f30a4f51fef Announce outline.el keymaps
8198803f660 ; Don't mention in the Gnus manual user options that were...
8a1498c01f7 Fix fontification of function-valued variables (bug#61053)
cfe26f31893 Add new java indent rules
987e53f3e2d ; * doc/misc/erc.texi: Improve Local Modules section.
3846e79c93b ; Fix filename mismatches in prop lines of ERC tests
ecf500b5e34 Handle relative file names in vc-resynch-window and vc-re...
695e9f71c3f Use named keymaps for outline buttons
e31a5623965 * lisp/vc/vc-bzr.el (vc-bzr--pushpull): Return buffer's p...
deee3a92623 ; Fix last change in etc/NEWS
bc78285e686 ; * etc/NEWS: Fix typos.
c15c0f7f018 CC Mode: Change the default value of objc-font-lock-extra...
7f438ff543b Don't try to make a pipe process for remote processes in ...
cb9628373a8 * lisp/startup.el (command-line): Fix warning message.  (...
e6c5f32e77d * lisp/find-dired.el (find-dired): Fix bug where M-p skip...

# Conflicts:
# etc/NEWS

2 years ago; * lisp/progmodes/cc-engine.el: Delete trailing whitespace.
Stefan Kangas [Fri, 27 Jan 2023 10:29:47 +0000 (11:29 +0100)]
; * lisp/progmodes/cc-engine.el: Delete trailing whitespace.

This was holding up the automatic merges due to commit hooks.