]> git.eshelyaron.com Git - emacs.git/log
emacs.git
22 months ago; * lisp/progmodes/gud.el (gud-tooltip-modes): Add ts- modes.
Yuan Fu [Sun, 8 Jan 2023 00:54:43 +0000 (16:54 -0800)]
; * lisp/progmodes/gud.el (gud-tooltip-modes): Add ts- modes.

Prompted by bug#60463.

22 months ago; * lisp/align.el (align-c++-modes): Add c/c++-ts-mode.
Yuan Fu [Sun, 8 Jan 2023 00:52:17 +0000 (16:52 -0800)]
; * lisp/align.el (align-c++-modes): Add c/c++-ts-mode.

This fixes bug#60463.

22 months agoAdd documentation for c/c++-ts-mode (bug#60443)
Yuan Fu [Sun, 8 Jan 2023 00:32:46 +0000 (16:32 -0800)]
Add documentation for c/c++-ts-mode (bug#60443)

Explain that tree-sitter c modes and cc-mode c modes don't share
config variables.

* lisp/progmodes/c-ts-mode.el (c-ts-mode)
(c++-ts-mode): Update docstring.

22 months ago(ruby-ts--font-lock-settings): Improve highlighting in patterns
Dmitry Gutov [Sun, 8 Jan 2023 01:56:32 +0000 (03:56 +0200)]
(ruby-ts--font-lock-settings): Improve highlighting in patterns

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--font-lock-settings):
Improve highlighting in patterns: highlight values not keys as
variable in the usual case; highlight keys when no value;
highlight the "as pattern" variable.

22 months agoOptionally include the namespace in c-ts-mode--declarator-identifier
Yuan Fu [Sun, 8 Jan 2023 00:03:37 +0000 (16:03 -0800)]
Optionally include the namespace in c-ts-mode--declarator-identifier

This is an additional fix for bug#60397.

* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--declarator-identifier): New parameter QUALIFIED.
(c-ts-mode--defun-name): Use qualified identifier.

22 months agoSupport namespaces in c++-ts-mode (bug#60397)
Yuan Fu [Sat, 7 Jan 2023 23:45:05 +0000 (15:45 -0800)]
Support namespaces in c++-ts-mode (bug#60397)

Not a complete fix.  See the next commit.

* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): Add rules.
(c-ts-mode--defun-name): Add namespace_definition.
(c-ts-base-mode): Add namespace_definition to
treesit-defun-type-regexp.

22 months agoFix c-ts-mode--looking-at-star
Yuan Fu [Sat, 7 Jan 2023 23:26:56 +0000 (15:26 -0800)]
Fix c-ts-mode--looking-at-star

Not the topic of bug#60270 but reported in one of the replies.

* lisp/progmodes/c-ts-mode.el (c-ts-mode--looking-at-star): Check not
the character after point but character after BOL. Otherwise
indentation is wrong when point is not at BOL.

22 months agoAdd c-or-c++-ts-mode (bug#59613)
Yuan Fu [Sat, 7 Jan 2023 22:58:37 +0000 (14:58 -0800)]
Add c-or-c++-ts-mode (bug#59613)

* lisp/progmodes/c-ts-mode.el
(c-ts-mode--c-or-c++-regexp): New variable.
(c-or-c++-ts-mode): New mode.
* etc/NEWS: Mention c-or-c++-ts-mode.

22 months agoDocument the 'definition-name' property.
Eli Zaretskii [Sat, 7 Jan 2023 17:57:30 +0000 (19:57 +0200)]
Document the 'definition-name' property.

* doc/lispref/symbols.texi (Standard Properties): Document
'definition-name'.
* doc/lispref/functions.texi (Defining Functions): Describe how to
use 'definition-name' when generating function definitions at run
time.  (Bug#60568)

22 months ago; Fix description of etc/DOC
Eli Zaretskii [Sat, 7 Jan 2023 17:16:47 +0000 (19:16 +0200)]
; Fix description of etc/DOC

* doc/lispref/help.texi (Accessing Documentation): Doc strings of
preloaded symbols are no longer in etc/DOC.

22 months ago; Fix documentation of etc/DOC
Eli Zaretskii [Sat, 7 Jan 2023 13:25:11 +0000 (15:25 +0200)]
; Fix documentation of etc/DOC

* doc/lispref/help.texi (Documentation Basics): Doc strings of
preloaded symbols are no longer in etc/DOC.

22 months ago(treesit-simple-indent-presets): Do that for 'or' as well.
Dmitry Gutov [Sat, 7 Jan 2023 11:16:56 +0000 (13:16 +0200)]
(treesit-simple-indent-presets): Do that for 'or' as well.

* lisp/treesit.el
(treesit-simple-indent-presets): Do that for 'or' as well.

22 months ago; Minor rewording of tree-sitter terminology
Eli Zaretskii [Sat, 7 Jan 2023 09:25:52 +0000 (11:25 +0200)]
; Minor rewording of tree-sitter terminology

* doc/lispref/parsing.texi (Retrieving Nodes): Minor rewording.
(Bug#60555)

22 months agoFix 'python-shell-buffer-substring' when START is in middle of 1st line
kobarity [Sun, 1 Jan 2023 12:09:10 +0000 (21:09 +0900)]
Fix 'python-shell-buffer-substring' when START is in middle of 1st line

* lisp/progmodes/python.el (python-shell-buffer-substring): Instead
of checking whether START is point-min, check whether START is in
the first line.  (Bug#60466)
* test/lisp/progmodes/python-tests.el
(python-shell-buffer-substring-18): New test.

22 months ago; Fix last change
Eli Zaretskii [Sat, 7 Jan 2023 08:47:44 +0000 (10:47 +0200)]
; Fix last change

* doc/emacs/misc.texi (Saving Emacs Sessions): Minor rewording and
rearrangements.  (Bug#60600)

22 months agoRearrange the "Saving Emacs Sessions" section of the user manual
Manuel Giraud [Fri, 6 Jan 2023 10:29:20 +0000 (11:29 +0100)]
Rearrange the "Saving Emacs Sessions" section of the user manual

* doc/emacs/misc.texi (Saving Emacs Sessions): Organize this
node more logically with main behavior and important features
near the top.   (Bug#60600)

22 months ago(treesit-simple-indent-presets): Ensure 'and' works for anchors too
Dmitry Gutov [Sat, 7 Jan 2023 01:28:38 +0000 (03:28 +0200)]
(treesit-simple-indent-presets): Ensure 'and' works for anchors too

* lisp/treesit.el (treesit-simple-indent-presets):
Rewrite to return the last successful evaluation, not just t.

22 months ago(treesit--indent-rules-optimize): Optimize 'and' and 'or' matcher forms
Dmitry Gutov [Sat, 7 Jan 2023 00:44:07 +0000 (02:44 +0200)]
(treesit--indent-rules-optimize): Optimize 'and' and 'or' matcher forms

* lisp/treesit.el (treesit--indent-rules-optimize):
Optimize 'and' and 'or' matcher forms.  When 'and' has a 'query'
matcher inside (as is the case in ruby-ts--indent-rules, many
times over), this yields a significant performance boost.

22 months ago(treesit-simple-indent-presets): Short-circuit 'and' and 'or'
Dmitry Gutov [Sat, 7 Jan 2023 00:02:25 +0000 (02:02 +0200)]
(treesit-simple-indent-presets): Short-circuit 'and' and 'or'

* lisp/treesit.el (treesit-simple-indent-presets):
Short-circuit the 'and' and 'or' matchers.  To avoid calling all
fns after one returned nil or truthy value, respectively.

22 months ago(font-lock-regexp-face): New face
Dmitry Gutov [Fri, 6 Jan 2023 17:56:20 +0000 (19:56 +0200)]
(font-lock-regexp-face): New face

* lisp/font-lock.el (font-lock-regexp-face): New face.

* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--font-lock-settings):
* lisp/progmodes/ruby-ts-mode.el (ruby-ts--font-lock-settings):
* lisp/progmodes/js.el (js--treesit-font-lock-settings):
Use it for regexps.

* etc/NEWS: Mention the addition.

22 months agoUnify the string interpolation delimiters face across ts modes
Dmitry Gutov [Fri, 6 Jan 2023 14:17:50 +0000 (16:17 +0200)]
Unify the string interpolation delimiters face across ts modes

* lisp/progmodes/js.el (js--treesit-font-lock-settings):
* lisp/progmodes/ruby-ts-mode.el (ruby-ts--font-lock-settings):
* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--font-lock-settings):
Use font-lock-misc-punctuation-face for string interpolation
delimiters.

22 months agoruby-ts-mode: Highlight more kinds of parameters
Dmitry Gutov [Fri, 6 Jan 2023 13:38:00 +0000 (15:38 +0200)]
ruby-ts-mode: Highlight more kinds of parameters

* lisp/progmodes/ruby-ts-mode.el
(ruby-ts--font-lock-settings): Highlight destructured parameters,
lambda parameters, identifiers in pattern matching clauses
(array/hash) and exception variables.
Move the 'symbol' matchers lower to make 'hash_key_symbol' lower
priority than hash keys in match patterns.

22 months agoFix `pr-interface'
Robert Pluim [Fri, 6 Jan 2023 08:00:00 +0000 (09:00 +0100)]
Fix `pr-interface'

`pr-interface' specifies `inline' for its menu items, which is not
necessary, but it causes `widget-choice-value-create' to bug
out.  (Bug#60501)

* lisp/wid-edit.el (widget-choice-value-create): Allow the value to be
a non-list.
* test/lisp/wid-edit-tests.el (widget-test-handle-spurious-inline):
Add test to ensure that unnecessary :inline is allowed.

22 months agoFurther generic-related improvements in csharp-ts-mode (bug#60376)
Jostein Kjønigsen [Sun, 1 Jan 2023 19:46:02 +0000 (20:46 +0100)]
Further generic-related improvements in csharp-ts-mode (bug#60376)

This is an additional patch for bug#60376.

* lisp/progmodes/csharp-mode.el (csharp-ts-mode--font-lock-settings):
New rules.

22 months agoruby-ts-mode: Highlight method and block parameters
Dmitry Gutov [Fri, 6 Jan 2023 02:48:35 +0000 (04:48 +0200)]
ruby-ts-mode: Highlight method and block parameters

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--font-lock-settings):
Add rules for method and block parameters.
(ruby-ts-mode): Add corresponding feature.

22 months agoruby-ts-mode: Highlight variable assignments
Perry Smith [Fri, 6 Jan 2023 02:20:02 +0000 (04:20 +0200)]
ruby-ts-mode: Highlight variable assignments

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--font-lock-settings):
Bring back the 'assignment' feature.
(ruby-ts-mode): Replace the unused 'variable' with 'assignment'.  Use
the level 3 for consistency with other ts modes.
Update the Commentary as well.

22 months agoruby-ts-mode: Move 'self' and 'super' from constants to keywords
Dmitry Gutov [Fri, 6 Jan 2023 01:31:41 +0000 (03:31 +0200)]
ruby-ts-mode: Move 'self' and 'super' from constants to keywords

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--font-lock-settings):
Move 'self' and 'super' from constants to keywords.

22 months ago(ruby-ts-mode): Split font-lock feature 'builtin' into two
Dmitry Gutov [Fri, 6 Jan 2023 01:12:20 +0000 (03:12 +0200)]
(ruby-ts-mode): Split font-lock feature 'builtin' into two

* lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode):
Split the 'builtin' feature in two: 'builtin-constant' and
'builtin-variable'.
(ruby-ts-highlight-predefined-constants):
Drop the user option, the highlighting granularity can be chosen
using treesit-font-lock-recompute-features.
(ruby-ts--font-lock-settings): Update accordingly.
(ruby-ts--predefined-constants, ruby-ts--predefined-variables):
Fix docstrings.

22 months agoAvoid assertion violation due to fill-column indicator face
Eli Zaretskii [Thu, 5 Jan 2023 20:33:51 +0000 (22:33 +0200)]
Avoid assertion violation due to fill-column indicator face

* src/xdisp.c (extend_face_to_end_of_line): Use the original
iterator metrics for the stretch glyph, the one unaffected by the
'fill-column-indicator' face.  (Bug#60580)

22 months agoMerge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/emacs into emacs-29
Eli Zaretskii [Thu, 5 Jan 2023 20:32:17 +0000 (22:32 +0200)]
Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/emacs into emacs-29

22 months ago; Another review of etc/NEWS
Michael Albinus [Thu, 5 Jan 2023 19:53:25 +0000 (20:53 +0100)]
; Another review of etc/NEWS

22 months ago; * src/gnutls.c (Fgnutls_deinit): Fix typo in doc string (bug#60579).
Eli Zaretskii [Thu, 5 Jan 2023 18:39:14 +0000 (20:39 +0200)]
; * src/gnutls.c (Fgnutls_deinit): Fix typo in doc string (bug#60579).

22 months ago* lisp/cedet/semantic/symref/grep.el: Support ts-modes (bug#60525)
Juri Linkov [Thu, 5 Jan 2023 18:18:11 +0000 (20:18 +0200)]
* lisp/cedet/semantic/symref/grep.el: Support ts-modes (bug#60525)

(semantic-symref-filepattern-alist): Duplicate entries
c-mode -> c-ts-mode, c++-mode -> c++-ts-mode, ruby-mode -> ruby-ts-mode,
python-mode -> python-ts-mode.

22 months ago; Another fix for doc strings of 2 treesit.el functions
Eli Zaretskii [Thu, 5 Jan 2023 07:34:02 +0000 (09:34 +0200)]
; Another fix for doc strings of 2 treesit.el functions

* lisp/treesit.el (treesit-parent-while): Clarify "closest" and
"furthest" in the doc string.  (Bug#60531)

22 months ago; Fix the doc strings of 2 treesit.el functions
Eli Zaretskii [Thu, 5 Jan 2023 07:20:02 +0000 (09:20 +0200)]
; Fix the doc strings of 2 treesit.el functions

* lisp/treesit.el (treesit-parent-until, treesit-parent-while):
Doc fixes.  (Bug#60531)

22 months agoMake 'toml-ts-mode' optional
Eli Zaretskii [Thu, 5 Jan 2023 06:40:07 +0000 (08:40 +0200)]
Make 'toml-ts-mode' optional

* etc/NEWS: Reflect the fact that 'toml-ts-mode' is optional.

* lisp/textmodes/toml-ts-mode.el (auto-mode-alist): Don't autoload
the addition of 'toml-ts-mode'.  (Bug#60559)

22 months ago; * etc/NEWS: Fix wording in last change.
Eli Zaretskii [Wed, 4 Jan 2023 18:52:41 +0000 (20:52 +0200)]
; * etc/NEWS: Fix wording in last change.

22 months ago; * etc/NEWS: Instructions for builds without tree-sitter (bug#60559)
Eli Zaretskii [Wed, 4 Jan 2023 18:51:04 +0000 (20:51 +0200)]
; * etc/NEWS: Instructions for builds without tree-sitter (bug#60559)

22 months ago; Fix documentation of y-or-n-p/yes-or-no-p
Eli Zaretskii [Wed, 4 Jan 2023 17:25:47 +0000 (19:25 +0200)]
; Fix documentation of y-or-n-p/yes-or-no-p

* lisp/subr.el (y-or-n-p):
* src/fns.c (Fyes_or_no_p): Doc fix.

22 months agoFix bug in Tramp multi-hop
Michael Albinus [Wed, 4 Jan 2023 17:12:02 +0000 (18:12 +0100)]
Fix bug in Tramp multi-hop

* lisp/net/tramp.el (tramp-compute-multi-hops): Make check for
host name more robust.  (Bug#60499)

22 months ago* lisp/files.el (find-sibling-rules): Fix docstring.
Michael Albinus [Wed, 4 Jan 2023 17:11:31 +0000 (18:11 +0100)]
* lisp/files.el (find-sibling-rules): Fix docstring.

22 months agoTree-sitter doc fixes (bug#60524)
Juri Linkov [Wed, 4 Jan 2023 07:57:06 +0000 (09:57 +0200)]
Tree-sitter doc fixes (bug#60524)

* doc/lispref/modes.texi (Parser-based Font Lock):
Replace :lang with :language.

* doc/lispref/parsing.texi (Language Grammar): Replace
treesit-load-suffixes with dynamic-library-suffixes.
(Retrieving Nodes): Fix function names.
(Tree-sitter Major Modes): Fix treesit-ready-p args.
Fix pxref to Parser-based Indentation.
(Tree-sitter C API): Fix function names.

* lisp/treesit.el (treesit--simple-indent-eval): Remove cond BODY
duplicated from CONDITION.
(treesit)<define-short-documentation-group>: Fix function names.

22 months ago; Fix function reference in comment in c-ts-mode.el (bug#60514)
Daniel Martín [Tue, 3 Jan 2023 12:49:08 +0000 (13:49 +0100)]
; Fix function reference in comment in c-ts-mode.el (bug#60514)

* lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings): Fix
reference.

22 months agoFontify C++ function definitions in c-ts-mode (bug#60529)
Daniel Martín [Tue, 3 Jan 2023 21:08:13 +0000 (22:08 +0100)]
Fontify C++ function definitions in c-ts-mode (bug#60529)

* lisp/progmodes/c-ts-mode.el (c-ts-mode--declarator-identifier):
Teach the code how to extract the declarator of a node of type
"qualified_identifier".
(c-ts-mode--fontify-declarator): Consider the case where the
identifier in a function declarator is buried inside
"qualifier_identifier" nodes.

22 months ago(ruby-ts-add-log-current-function): Fix when between two methods
Dmitry Gutov [Tue, 3 Jan 2023 22:37:43 +0000 (00:37 +0200)]
(ruby-ts-add-log-current-function): Fix when between two methods

* lisp/progmodes/ruby-ts-mode.el
(ruby-ts-add-log-current-function): Fix the case when point is
between two methods.  'treesit-node-at' returs the 'def' node of
the method after point in such case, so it behaved like point was
inside the method below.

* test/lisp/progmodes/ruby-ts-mode-tests.el
(ruby-ts-add-log-current-method-outside-of-method):
Update the test case.

* test/lisp/progmodes/ruby-mode-tests.el
(ruby-add-log-current-method-outside-of-method):
Mirror that change.

22 months ago; * doc/lispref/positions.texi (List Motion): Minor wording fix.
Eli Zaretskii [Tue, 3 Jan 2023 13:16:42 +0000 (15:16 +0200)]
; * doc/lispref/positions.texi (List Motion): Minor wording fix.

22 months ago; Improve documentation of 'treesit-language-source-alist'
Eli Zaretskii [Tue, 3 Jan 2023 13:12:48 +0000 (15:12 +0200)]
; Improve documentation of 'treesit-language-source-alist'

* lisp/treesit.el (treesit--install-language-grammar-build-recipe)
(treesit-install-language-grammar):  Doc fixes.
(treesit-install-language-grammar): Autoload it.

* etc/NEWS: Improve wording of the
'treesit-install-language-grammar' documentation.

22 months ago; * etc/NEWS: Mention treesit-install-language-grammar.
Yuan Fu [Tue, 3 Jan 2023 06:52:42 +0000 (22:52 -0800)]
; * etc/NEWS: Mention treesit-install-language-grammar.

22 months ago* lisp/vc/vc-git.el (vc-git-checkin): Pass vc-git-diff-switches.
Sean Whitton [Tue, 3 Jan 2023 06:08:39 +0000 (23:08 -0700)]
* lisp/vc/vc-git.el (vc-git-checkin): Pass vc-git-diff-switches.

22 months agoExtract common code into ruby-base-mode to derive from
Dmitry Gutov [Tue, 3 Jan 2023 01:10:49 +0000 (03:10 +0200)]
Extract common code into ruby-base-mode to derive from

* lisp/progmodes/ruby-mode.el (ruby-base-mode):
New major base mode, to set up common vars and hooks.
(ruby-mode-variables): Delete.  Move most code to ruby-base-mode.
And some -- to ruby-mode body.
(ruby-mode): Derive from ruby-base-mode.  Also move some setup
to there.

* lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode):
Derive from ruby-base-mode.  Remove duplicating settings.

22 months agoruby-ts-mode: Indentation fixes
Dmitry Gutov [Tue, 3 Jan 2023 00:26:00 +0000 (02:26 +0200)]
ruby-ts-mode: Indentation fixes

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--align-keywords):
Fix for 'def' (which was misread as 'method' in the check).
(ruby-ts--indent-rules): Indent the curly block closer the same
way as the 'do ... end' closer.

22 months agoruby-ts--font-lock-settings: Use more standard faces
Dmitry Gutov [Mon, 2 Jan 2023 22:41:25 +0000 (00:41 +0200)]
ruby-ts--font-lock-settings: Use more standard faces

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--font-lock-settings):
Use more standard faces for regexp literals and string
interpolation delimiters (following js-ts-mode).

22 months agoruby-ts-mode: Standardize the string literal highlights
Dmitry Gutov [Mon, 2 Jan 2023 21:26:39 +0000 (23:26 +0200)]
ruby-ts-mode: Standardize the string literal highlights

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--font-lock-settings):
Use font-lock-string-face for %w() and `...`.
Use font-lock-constant-face (just like we do for symbol literals)
for symbol array literals, %i().
Combine the matchers for string content and heredocs.

22 months agoImprove fontification in java-ts-mode (bug#60492)
Theodor Thornhill [Mon, 2 Jan 2023 12:46:25 +0000 (13:46 +0100)]
Improve fontification in java-ts-mode (bug#60492)

* lisp/progmodes/java-ts-mode.el (java-ts-mode--font-lock-settings):
Add expression_statement with only identifier support.

22 months agoFontification improvements in typescript-ts-mode (bug#60500)
Jostein Kjønigsen [Mon, 2 Jan 2023 19:56:41 +0000 (20:56 +0100)]
Fontification improvements in typescript-ts-mode (bug#60500)

- highlight method-definitins in interfaces.
- only highlight variable-declarations, not variables
  everywhere (consistency with other modes).
- move highlighting of method invocations to level 4

* lisp/progmodes/typescript-ts-mode.el:
(typescript-ts-mode--font-lock-settings): Update rules.
(typescript-ts-mode, tsx-ts-mode): Update feature list.

22 months agoImprove fontification consistency in js-ts-mode (bug#60503)
Jostein Kjønigsen [Mon, 2 Jan 2023 20:26:36 +0000 (21:26 +0100)]
Improve fontification consistency in js-ts-mode (bug#60503)

* lisp/progmodes/js.el (js--treesit-font-lock-settings): Highlight
declared parameters in functions, methods and arrow-expressions as
variables.

22 months ago; Update tree-sitter manual
Yuan Fu [Mon, 2 Jan 2023 22:15:36 +0000 (14:15 -0800)]
; Update tree-sitter manual

* doc/lispref/positions.texi (List Motion): Replace
treesit-defun-prefer-top-level with treesit-defun-tactic.

22 months ago; Fix tree-sitter manual title case
Yuan Fu [Mon, 2 Jan 2023 22:15:05 +0000 (14:15 -0800)]
; Fix tree-sitter manual title case

* doc/lispref/elisp.texi:
* doc/lispref/modes.texi:
* doc/lispref/parsing.texi: Change to title case.

22 months ago; nt/INSTALL: Update for Emacs 29.
Eli Zaretskii [Mon, 2 Jan 2023 18:56:52 +0000 (20:56 +0200)]
; nt/INSTALL: Update for Emacs 29.

22 months ago; Update copyright notice in tramp-sh.el
Michael Albinus [Mon, 2 Jan 2023 18:50:07 +0000 (19:50 +0100)]
; Update copyright notice in tramp-sh.el

* lisp/net/tramp-sh.el (tramp-perl-encode, tramp-perl-decode):
Remove copyright notice, Tramp is copyrighted by FSF anyway.

22 months ago(typescript/tsx-ts-mode): Split font-lock feature list into 4 values
Dmitry Gutov [Mon, 2 Jan 2023 18:42:52 +0000 (20:42 +0200)]
(typescript/tsx-ts-mode): Split font-lock feature list into 4 values

* lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode)
(tsx-ts-mode): Split font-lock feature list into 4 values.

22 months agojs-ts-mode: Move 'string-interpolation' to font-lock level 3
Dmitry Gutov [Mon, 2 Jan 2023 17:59:50 +0000 (19:59 +0200)]
js-ts-mode: Move 'string-interpolation' to font-lock level 3

* lisp/progmodes/js.el (js-ts-mode):
Move 'string-interpolation' to font-lock level 3.

22 months agoFix shrinking of the tab-bar
Eli Zaretskii [Mon, 2 Jan 2023 15:02:05 +0000 (17:02 +0200)]
Fix shrinking of the tab-bar

* src/haikufns.c (haiku_change_tab_bar_height):
* src/pgtkfns.c (pgtk_change_tab_bar_height):
* src/nsfns.m (ns_change_tab_bar_height):
* src/w32fns.c (w32_change_tab_bar_height):
* src/xfns.c (x_change_tab_bar_height): Don't let the number of
tab-bar lines degenerate to zero due to integer division.
(Bug#60210)

22 months ago; Fix typos in ruby-ts-mode.el
Stefan Kangas [Mon, 2 Jan 2023 14:17:59 +0000 (15:17 +0100)]
; Fix typos in ruby-ts-mode.el

22 months ago; Skip ruby-ts tests if grammar is not available
Stefan Kangas [Mon, 2 Jan 2023 13:58:37 +0000 (14:58 +0100)]
; Skip ruby-ts tests if grammar is not available

* test/lisp/progmodes/ruby-ts-mode-tests.el: Properly skip tests if
there is no grammar for ruby.

22 months agoFix default-port regression in erc-select-read-args
F. Jason Park [Thu, 29 Dec 2022 14:43:19 +0000 (06:43 -0800)]
Fix default-port regression in erc-select-read-args

* lisp/erc/erc.el (erc--warn-unencrypted): New function, likely
temporary, to warn new users connecting interactively to the default
server, "irc.libara.chat", via the default non-TLS port, 6667.
(erc-select-read-args): Remove stray code from incomplete feature
introduced by bug#56514.  Ensure connecting always works with default
port, which is non-TLS.  Respect `erc-prompt-for-password' when user
pastes URL containing password component into "server" prompt.  Maybe
add `erc--warn-unencrypted' as one-off hook for impending connection.
* test/lisp/erc/erc-tests.el (erc-select-read-args): Always expect
password prompt and sometimes a non-TLS port when `erc' called
interactively.  (Bug#60428.)

22 months ago; Clarify doc strings of 'call-process' and 'call-process-region'
Eli Zaretskii [Mon, 2 Jan 2023 11:52:25 +0000 (13:52 +0200)]
; Clarify doc strings of 'call-process' and 'call-process-region'

* src/callproc.c (Fcall_process, Fcall_process_region): Document
that the destination buffer can be specified by its name.
(Bug#60477)

22 months ago; * admin/git-bisect-start: Update failing commits
Gregory Heytings [Mon, 2 Jan 2023 09:58:23 +0000 (09:58 +0000)]
; * admin/git-bisect-start: Update failing commits

22 months agoUpdate to Org 9.6-81-g563a43
Kyle Meyer [Mon, 2 Jan 2023 03:24:28 +0000 (22:24 -0500)]
Update to Org 9.6-81-g563a43

22 months agoruby-ts-mode: Remove some currently unused functions
Dmitry Gutov [Mon, 2 Jan 2023 01:51:11 +0000 (03:51 +0200)]
ruby-ts-mode: Remove some currently unused functions

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--grand-parent-is)
(ruby-ts--ancestor-start, ruby-ts--ancestor-is):
Remove some currently unused functions.

22 months agoruby-ts-mode: Highlight singleton method definitions and setters
Dmitry Gutov [Mon, 2 Jan 2023 01:29:15 +0000 (03:29 +0200)]
ruby-ts-mode: Highlight singleton method definitions and setters

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--font-lock-settings):
Highlight singleton method definitions and setters.

22 months agoAdd ruby-ts-mode
Perry Smith [Mon, 2 Jan 2023 00:57:38 +0000 (02:57 +0200)]
Add ruby-ts-mode

* etc/NEWS: Mention the new mode.

* lisp/progmodes/ruby-ts-mode.el: New file.

* test/lisp/progmodes/ruby-ts-mode-tests.el: New file.

* lisp/progmodes/eglot.el (eglot-server-programs):
Add ruby-ts-mode to the Ruby entry.

Co-authored-by: Dmitry Gutov <dgutov@yandex.ru>
22 months agoFix fontification of C++ reference return types (bug#60441)
Daniel Martín [Sat, 31 Dec 2022 00:45:27 +0000 (01:45 +0100)]
Fix fontification of C++ reference return types (bug#60441)

* lisp/progmodes/c-ts-mode.el (c-ts-fontify-error): Treat
reference_declarator nodes the same as pointer_declarator nodes when
calculating the identifier to fontify.

22 months ago; Minor fix for treesit--install-language-grammar-1 (bug#60465)
Yuan Fu [Mon, 2 Jan 2023 00:15:02 +0000 (16:15 -0800)]
; Minor fix for treesit--install-language-grammar-1 (bug#60465)

* lisp/treesit.el (treesit--install-language-grammar-1): Fix.

22 months agoAdjust function-call fontification in csharp-ts-mode (bug#60376)
Jostein Kjønigsen [Sun, 1 Jan 2023 16:27:06 +0000 (17:27 +0100)]
Adjust function-call fontification in csharp-ts-mode (bug#60376)

- Ensure method-invocations are highlighted only on level 4.
- Ensure consistent fontification of variable declarations
  (don't highlight usage of all variables).
- Fix issues with highlighting types in new() expressions.
- Fix issues with generic types in variable-declarations not using "var".
- Use fewer, more general queries for function-invocations. simplify code.

* lisp/progmodes/csharp-mode.el (csharp-ts-mode--font-lock-settings):
Change rules.
(csharp-ts-mode): Update feature list.

22 months ago; Fix NEWS.
Eli Zaretskii [Sun, 1 Jan 2023 17:38:24 +0000 (19:38 +0200)]
; Fix NEWS.

22 months agoRewrite Antinews in ELisp manual for Emacs 29
Eli Zaretskii [Sun, 1 Jan 2023 17:37:22 +0000 (19:37 +0200)]
Rewrite Antinews in ELisp manual for Emacs 29

* doc/lispref/anti.texi (Antinews): Rewrite for Emacs 29.
* doc/lispref/elisp.texi (Top): Update the top-level menu for
Antinews.

22 months ago; * lisp/simple.el (primitive-undo): Clarify error message (bug#60467)
Eli Zaretskii [Sun, 1 Jan 2023 15:49:10 +0000 (17:49 +0200)]
; * lisp/simple.el (primitive-undo): Clarify error message (bug#60467)

22 months agoUpdate Antinews in the user manual for Emacs 29
Eli Zaretskii [Sun, 1 Jan 2023 15:38:23 +0000 (17:38 +0200)]
Update Antinews in the user manual for Emacs 29

* doc/emacs/anti.texi (Antinews): Rewrite for Emacs 29.
* doc/emacs/emacs.texi (Top): Adjust the top-level menu.

22 months ago; * test/lisp/emacs-lisp/copyright-tests.el: Fix and future-safe.
Mattias Engdegård [Sun, 1 Jan 2023 12:18:50 +0000 (13:18 +0100)]
; * test/lisp/emacs-lisp/copyright-tests.el: Fix and future-safe.

22 months agoFix shortdoc-tests failure with respect to regexp-opt-charset
Mattias Engdegård [Sun, 1 Jan 2023 11:52:47 +0000 (12:52 +0100)]
Fix shortdoc-tests failure with respect to regexp-opt-charset

* test/lisp/emacs-lisp/shortdoc-tests.el (regexp-opt): Require.
`regexp-opt-charset` is not autoloaded, and whether `regexp-opt` is
preloaded is configuration-dependent.

22 months ago; Fix copyright years in 2 more files.
Eli Zaretskii [Sun, 1 Jan 2023 11:08:15 +0000 (13:08 +0200)]
; Fix copyright years in 2 more files.

22 months ago; Add 2023 to copyright years.
Eli Zaretskii [Sun, 1 Jan 2023 10:31:12 +0000 (05:31 -0500)]
; Add 2023 to copyright years.

22 months agoImprove documentation of 'isearch-open-overlay-temporary'
Eli Zaretskii [Sun, 1 Jan 2023 09:04:22 +0000 (11:04 +0200)]
Improve documentation of 'isearch-open-overlay-temporary'

* lisp/isearch.el (isearch-open-overlay-temporary): Document that
the overlay passed to the 'isearch-open-invisible-temporary'
function cannot be deleted too early.  (Bug#60399)

22 months agoDocument 'use-package' in the 2 main manuals
Eli Zaretskii [Sun, 1 Jan 2023 08:38:11 +0000 (10:38 +0200)]
Document 'use-package' in the 2 main manuals

* doc/emacs/custom.texi (Init Examples):
* doc/lispref/loading.texi (Named Features): Document 'use-package'
and its most important features.

22 months ago; Auto-commit of loaddefs files.
Stefan Kangas [Sun, 1 Jan 2023 04:08:26 +0000 (05:08 +0100)]
; Auto-commit of loaddefs files.

22 months ago; * lisp/treesit.el (treesit-simple-indent-presets): Fix typo.
Yuan Fu [Sun, 1 Jan 2023 01:10:50 +0000 (17:10 -0800)]
; * lisp/treesit.el (treesit-simple-indent-presets): Fix typo.

Well it's sort of a typo :-)

22 months agoBuild recipe interactively in treesit-install-language-grammar
Yuan Fu [Sat, 31 Dec 2022 23:13:50 +0000 (15:13 -0800)]
Build recipe interactively in treesit-install-language-grammar

If there is not existing recipe for a language, prompt to build the
recipe interactively.

* lisp/treesit.el (treesit--install-language-grammar-build-recipe):
New functions.
(treesit-install-language-grammar): Use the new function.

22 months ago; Add REVISION to treesit-language-source-alist
Yuan Fu [Sat, 31 Dec 2022 22:55:10 +0000 (14:55 -0800)]
; Add REVISION to treesit-language-source-alist

This allows users to install a particular version or branch.  Prompted
by bug#60427 and bug#60223.

* lisp/treesit.el (treesit-language-source-alist)
(treesit--install-language-grammar-1): Add REVISION.

22 months ago; Remove GRAMMAR-DIR from treesit-language-source-alist
Yuan Fu [Sat, 31 Dec 2022 22:27:51 +0000 (14:27 -0800)]
; Remove GRAMMAR-DIR from treesit-language-source-alist

Removing it doesn't affect building all the language grammars in
batch.sh, so it must be an artifact I added for something else and
later forgot to remove.

* lisp/treesit.el (treesit-language-source-alist)
(treesit--install-language-grammar-1): Remove GRAMMAR-DIR.

22 months agoTweak csharp-mode font-lock-settings (bug#60376)
Theodor Thornhill [Fri, 30 Dec 2022 19:26:09 +0000 (20:26 +0100)]
Tweak csharp-mode font-lock-settings (bug#60376)

* lisp/progmodes/csharp-mode.el (csharp-ts-mode--font-lock-settings):
Rearrange features.
(csharp-ts-mode): Rearrange features.

22 months ago; * doc/lispref/tips.texi (Documentation Tips): Add indexing.
Eli Zaretskii [Sat, 31 Dec 2022 16:47:51 +0000 (18:47 +0200)]
; * doc/lispref/tips.texi (Documentation Tips): Add indexing.

22 months agoRevert a recent change which causes errors
Eli Zaretskii [Sat, 31 Dec 2022 16:32:54 +0000 (18:32 +0200)]
Revert a recent change which causes errors

* lisp/subr.el (buffer-match-p): Undo last change, as it causes an
error in a timer function of show-paren-mode.

22 months ago; More fixes for documentation of 'defalias'
Eli Zaretskii [Sat, 31 Dec 2022 15:01:22 +0000 (17:01 +0200)]
; More fixes for documentation of 'defalias'

* doc/lispref/functions.texi (Defining Functions): Document
other possible values of DEFINITION in a defalias.
(Bug#60432)

22 months ago; Fix handling of 'not' by 'buffer-match-p'
Philip Kaludercic [Sat, 31 Dec 2022 14:04:18 +0000 (15:04 +0100)]
; Fix handling of 'not' by 'buffer-match-p'

* lisp/subr.el (buffer-match-p): Look up the cadr instead of the cdr
for the negation in 'not'.
* doc/lispref/buffers.texi (Buffer List): Update documentation.
(Bug#58951)

22 months ago; Fix typos
Stefan Kangas [Mon, 26 Dec 2022 09:43:57 +0000 (10:43 +0100)]
; Fix typos

22 months agoFix misspelled functions in shortdoc groups
Stefan Kangas [Sat, 31 Dec 2022 11:31:13 +0000 (12:31 +0100)]
Fix misspelled functions in shortdoc groups

* lisp/emacs-lisp/shortdoc.el (file, list): Fix misspelled function
names: 'file-writable-p' and 'seq-reduce'.
* test/lisp/emacs-lisp/shortdoc-tests.el (subr-x): Require.
(shortdoc-all-functions-fboundp): New test.

22 months agoSimplify introduction of use-package manual
Kévin Le Gouguec [Tue, 27 Dec 2022 14:40:43 +0000 (15:40 +0100)]
Simplify introduction of use-package manual

* doc/misc/use-package.texi (Getting Started): Do not advise requiring
the package, since the macro is autoloaded; also correct the macro's
name.  (Bug#60366)

22 months ago; Fix documentation of 'defalias'
Eli Zaretskii [Sat, 31 Dec 2022 08:44:53 +0000 (10:44 +0200)]
; Fix documentation of 'defalias'

* doc/lispref/functions.texi (Defining Functions): Document that a
defalias's DEFINITION can be a macro.  (Bug#60432)

22 months agoFix python-shell-buffer-substring when retrieving a single statement
kobarity [Thu, 22 Dec 2022 14:08:40 +0000 (23:08 +0900)]
Fix python-shell-buffer-substring when retrieving a single statement

* lisp/progmodes/python.el (python-shell-buffer-substring): Do not add
"if True:" line when retrieving a single statement.
(python-shell-send-region): Add a reference to
`python-shell-buffer-substring' in docstring.
* test/lisp/progmodes/python-tests.el (python-shell-buffer-substring-13)
(python-shell-buffer-substring-14, python-shell-buffer-substring-15)
(python-shell-buffer-substring-16, python-shell-buffer-substring-17):
New tests. (Bug#60142)