Commit graph

178118 commits

Author SHA1 Message Date
Jonas Bernoulli
7bb648eb80 mode-line-modes-delimiters: New option 2025-04-26 10:22:00 +02:00
Michael Albinus
a4bff57551 * etc/NEWS: Presentational fixes and improvements. 2025-04-26 09:46:16 +02:00
Eli Zaretskii
52b68f6054 ; * etc/NEWS: Fix a typo (bug#78068). 2025-04-26 09:55:39 +03:00
Sean Whitton
bacde21fde ; typescript-ts-mode-multivar-indent-style: Add missing group. 2025-04-26 11:47:23 +08:00
Sean Whitton
94d8f5b94f ; typescript-ts-mode-multivar-indent-style: Use different example.
This prevents it becoming a hyperlink in *Help* buffers.
2025-04-26 11:46:18 +08:00
Sean Whitton
5a043bf3df ; typescript-ts-mode-multivar-indent-style: Fix use of apostrophes. 2025-04-26 11:43:49 +08:00
Yuan Fu
3393644b71
Add multivar indent style in typescript-ts-mode (bug#77803)
* lisp/progmodes/typescript-ts-mode.el:
(typescript-ts-mode-multivar-indent-style): New option.
(typescript-ts-mode--indent-rules): Support both styles.
2025-04-25 17:39:55 -07:00
Roi Martin
3098d34bfd * Fix missing lexical-binding cookie warning on async compilation (bug#77918)
* lisp/emacs-lisp/comp-run.el (comp--run-async-workers): Fix missing
lexical-binding cookie warning on async compilation.
2025-04-25 22:36:06 +02:00
Stefan Monnier
48940a5d48 lisp/auth-source.el (authinfo--keywords): Avoid obsolete font-lock face vars 2025-04-25 16:35:04 -04:00
Sean Whitton
648453c04d ; Change let* to just let in last change. 2025-04-25 09:27:00 +08:00
Sean Whitton
a6829a0c35 comment-indent: Handle BOL already within a multiline comment
* lisp/newcomment.el (comment-indent): Newly handle the case
that BOL is already within a multiline comment (bug#78003).
Thanks to Stefan Monnier for review and reworking the control
flow.
2025-04-25 09:12:57 +08:00
Eli Zaretskii
e38401e71b ; * test/lisp/arc-mode-tests.el ("7z"): Fix 7z entry. 2025-04-24 16:22:13 +03:00
Jens Schmidt
d74cbf0519 Detect more types of split zip archives
* lisp/arc-mode.el (archive-find-type): Detect more types of
split zip archives.
* test/lisp/arc-mode-tests.el (arc-mode-test-make-file)
(arc-mode-test-make-archive): Factor out functions from ...
(arc-mode-test-zip-ensure-ext): ... this test.
(define-arc-mode-test-on-type): Add macro to test function
`archive-find-type' and use the macro to test detection of
various archive types.  (Bug 77898)
2025-04-24 16:05:03 +03:00
Eli Zaretskii
eb6531ba94 Allow to disable 'lexical-binding'
* lisp/progmodes/elisp-mode.el (elisp-enable-lexical-binding):
Optionally, allow to disable 'lexical-binding'.
2025-04-24 15:56:23 +03:00
Sean Whitton
3a95e1ede8 ; * etc/NEWS: Document deletion of block comment variables. 2025-04-24 20:19:32 +08:00
Eli Zaretskii
ccfb40a13d ; Improve documentation of last change
* etc/NEWS: Add entry about 'Custom-dirlocals-mode'.

* lisp/cus-edit.el (Custom-dirlocals-mode): Doc fix.  (Bug#77228)
2025-04-24 15:07:34 +03:00
Elías Gabriel Pérez
6414ed0d11 Create major mode for customize-dirlocals (bug#77228)
* lisp/cus-edit.el (Custom-dirlocals-mode): New major mode.
(custom-dirlocals-with-buffer): Move settings to
`Custom-dirlocals-mode'.
2025-04-24 15:02:15 +03:00
Po Lu
4b7816fc80 ; * src/w32dwrite.c: Minor coding style adjustments. 2025-04-24 09:04:33 +08:00
Juri Linkov
261a965ff1 Add the keyword ':copy-queries' to 'treesit-language-source-alist'.
* lisp/treesit-x.el (define-treesit-generic-mode): Add keyword
':copy-queries t' to the end of 'source'.

* lisp/treesit.el (treesit-language-source-alist):
Document the keyword ':copy-queries'.
(treesit--install-language-grammar-1): Add &rest args.
Process the keyword args.  Call 'treesit--copy-queries'
when :copy-queries is non-nil.
(treesit--copy-queries): Add arg 'source-dir'.  Copy queries
from source-dir as well.  Copy only the file "highlights.scm".
2025-04-23 20:17:46 +03:00
Eli Zaretskii
d3f1f4923f ; * src/w32dwrite.c (text_extents_internal): Fix typos in comments. 2025-04-23 17:29:20 +03:00
Cecilio Pardo
0548059289 w32: change the way text is measured when using DirectWrite
Now the glyph outline is inspected directly to get its real size,
as the direct measuring functions give generic values for some
fonts.
* src/w32dwrite.c (data structures): Added data structures from
header files that are not present in the 32bit MinGW build
environment.
(text_extents_internal): Call GetGlyphRunOutline to get exact
glyph vertical bounds.  Add new parameter to make this optional
if case that information is not required.
(w32_dwrite_text_extents, w32_initialize_direct_write)
(w32_dwrite_draw): New parameter for 'text_extents_internal'.
(Bug#77171)
2025-04-23 17:22:14 +03:00
João Távora
01f97fabfe Eglot: require bug-fixed Flymake 1.4.1 (bug#77856)
* lisp/progmodes/eglot.el (Package-Requires) Require Flymake 1.4.1.
2025-04-23 08:35:30 +01:00
João Távora
79cef45a12 Flymake: more concise flymake--tabulated-list-format-base
* lisp/progmodes/flymake.el (flymake--tabulated-list-format-base): Tweak
2025-04-23 08:35:30 +01:00
João Távora
a25fc9a518 Flymake: fix flymake-make-diagnostic for numeric code (bug#77856)
* lisp/progmodes/flymake.el (flymake-make-diagnostic): Tighten up
type requirements.
(Version): Bump to 1.4.1
2025-04-23 08:35:30 +01:00
Juri Linkov
89b7e726f1 * lisp/desktop.el: Fix the recent cleanup.
(desktop-read): Use 'file-name-directory' on the file name
returned by 'locate-file'.
2025-04-23 09:51:34 +03:00
Juri Linkov
add8bf000a Replace some 'treesit-query-compile' with 'treesit-query-valid-p'.
* admin/tree-sitter/treesit-admin.el
(treesit-admin--verify-major-mode-queries)
(treesit-admin--validate-mode-lang):
* lisp/progmodes/csharp-mode.el
(csharp-ts-mode--test-this-expression)
(csharp-ts-mode--test-interpolated-string-text)
(csharp-ts-mode--test-string-content)
(csharp-ts-mode--test-type-constraint)
(csharp-ts-mode--test-type-of-expression)
(csharp-ts-mode--test-typeof-expression)
(csharp-ts-mode--test-name-equals)
(csharp-ts-mode--test-if-directive)
(csharp-ts-mode--test-method-declaration-type-field):
* lisp/progmodes/php-ts-mode.el
(php-ts-mode--test-namespace-name-as-prefix-p)
(php-ts-mode--test-namespace-aliasing-clause-p)
(php-ts-mode--test-namespace-use-group-clause-p)
(php-ts-mode--test-visibility-modifier-operation-clause-p)
(php-ts-mode--test-property-hook-clause-p):
* lisp/progmodes/typescript-ts-mode.el
(tsx-ts-mode--font-lock-compatibility-bb1f97b):
Use the newer equivalent 'treesit-query-valid-p'
instead of 'treesit-query-compile' with 'ignore-errors'.
2025-04-22 21:01:28 +03:00
Juri Linkov
573a2c09b9 * lisp/treesit.el (treesit-show-paren-data--categorize): Add docstring.
(bug#77906)
2025-04-22 20:35:53 +03:00
Juri Linkov
a7f35dc177 * lisp/treesit-x.el: Quote :parent in define-treesit-generic-mode.
(define-treesit-generic-mode): Support quoted symbol for parent.
(liquid-generic-ts-mode): Quote :parent like quoted all other properties.
2025-04-22 19:53:32 +03:00
Juri Linkov
426c98bd96 * lisp/treesit-x.el: Use 'treesit-ensure-installed'.
(define-treesit-generic-mode): Append new item
to 'treesit-language-source-alist' instead of prepending.
(treesit-generic-mode-setup): Remove 'source' arg.
Use 'treesit-ensure-installed'.
(liquid-generic-ts-mode): Use 'treesit-ensure-installed'.
(alpinejs-generic-ts-setup): Run setup hook.
(treesit-generic-mode-font-lock-map): Add more mappings.
2025-04-22 19:48:30 +03:00
Juri Linkov
8fb45fcaed Fix all issues for the case when tree-sitter is disabled.
* lisp/treesit.el (treesit-declare-unavailable-functions):
Declare 'treesit-language-abi-version' and 'treesit-library-abi-version'.

* lisp/progmodes/elixir-ts-mode.el (elixir-ts--range-rules):
* lisp/progmodes/heex-ts-mode.el (heex-ts--range-rules):
* lisp/progmodes/rust-ts-mode.el (treesit-language-source-alist):
Guard with 'treesit-available-p'.
2025-04-22 19:32:36 +03:00
Stefan Monnier
2bf3790f37 desktop.el: Janitorial cleanup
* lisp/desktop.el: Remove redundant `:group` arguments.
Prefer #' to quote function names.
(desktop-var-serdes-funs): Improve docstring markup.
(desktop-clear, desktop-create-buffer): Use lexical-binding.
(desktop--v2s): Avoid (ab)use of ,@ which doesn't splice a list.
(desktop-outvar): Strength-reduce `eval` => `symbol-value`.
(desktop-create-buffer): Don't assume point-min==1.
(desktop-buffer): Belatedly mark as obsolete.
(desktop-read): Use `locate-file`.
2025-04-22 11:52:15 -04:00
Po Lu
057e990fba * src/androidfns.c (Fx_display_grayscale_p): Fix value on color displays. 2025-04-22 20:56:48 +08:00
Sean Whitton
b2a77b6e01 Delete unused block-comment-start and block-comment-end
* lisp/newcomment.el (block-comment-start)
(block-comment-end): Delete.
(comment-indent):
* lisp/cedet/semantic/doc.el
(semantic-doc-snarf-comment-for-tag):
Remove use of the now-deleted variables.
2025-04-22 20:48:45 +08:00
Sean Whitton
4808f785cc Revert addition of electric-block-comment-mode & follow-up commits
As presently under discussion in bug#77823, the intended new
functionality is not really about comments at all.
Remove it for now to allow us to redesign from a clean slate,
and to deal with the regression reported in bug#77823.

This reverts the following three changesets:

Author:     Elías Gabriel Pérez <eg642616@gmail.com>
AuthorDate: Mon Mar 17 12:56:52 2025 -0600

  New minor mode: `electric-block-comment-mode'

Author:     Elías Gabriel Pérez <eg642616@gmail.com>
AuthorDate: Mon Mar 31 17:58:16 2025 -0600

  Add block-comment-start and block-comment-end to supported modes

Author:     Elías Gabriel Pérez <eg642616@gmail.com>
AuthorDate: Sun Apr 13 12:26:08 2025 -0600

  Add block-comment variables to cc-mode
2025-04-22 20:47:56 +08:00
Gerd Möllmann
871ec9615a Realloc less often in adjust_glyph_matrix (bug#77961)
* src/dispnew.c (adjust_glyph_matrix): Only xnrealloc when the
glyph matrix got wider or taller.
2025-04-22 11:38:04 +02:00
Juri Linkov
6f30b9584f Fix tree-sitter ABI version incompatibility in rust-ts-mode
* lisp/progmodes/rust-ts-mode.el (treesit-language-source-alist):
For ABI version 15 add the recommended version "v0.24.0".
2025-04-22 09:49:48 +03:00
Michael Albinus
fc5e905dc9 Make `man' more portable
* lisp/man.el (Man-init-defvars): Use [:cntrl:].  Character ranges
with octal numbers aren't portable enough.  (Bug#77944)
2025-04-22 08:45:34 +02:00
Stefan Kangas
45e849bddc ; Fix thinko in recent commit 2025-04-22 05:53:35 +02:00
Eli Zaretskii
649bb9dcd9 ; * etc/NEWS: Fix wording of a recent addition. 2025-04-21 14:13:41 +03:00
Stefan Monnier
23583bb3a1 (text-clone--maintain): Don't modify the buf from the after-change hook
* lisp/subr.el (text-clone--pending-overlays): New var.
(text-clone--maintain-overlays): New function, extracted from
`text-clone--maintain`.
(text-clone--maintain): Use it.
2025-04-20 23:21:30 -04:00
Po Lu
a84a934a44 Render lib/getloadavg.c patches more permanent
* admin/gnulib-patches/lib/getloadavg.c.diff: New file.

* admin/merge-gnulib (GNULIB_TOOL_FLAGS): Set --local-dir to
admin/gnulib-patches.

* lib/gnulib.mk.in: Update from Gnulib.
2025-04-21 09:37:59 +08:00
João Távora
7ac6b33560 Eglot: use richer diagnostic-making capability of Flymake 1.4.0
* lisp/progmodes/eglot.el (Package-Requires): Require Flymake
1.4.0.
(eglot-handle-notification): Tweak.
2025-04-20 23:20:33 +01:00
João Távora
64f4fbde8a Flymake: bump package version to 1.4.0
* lisp/progmodes/flymake.el (Version): Bump to 1.4.0.

* etc/NEWS: Add entries for recent Flymake improvements.
2025-04-20 23:20:33 +01:00
João Távora
3001d50d9a Flymake: rework, simplify and address problems of recent change (bug#75841)
Various problems were addressed:

- Unbreak Flymake for Emacs 26.3.  Due to use of some Elisp constructs,
  the change completely broke compatibility to Emacs < 29.1.  That
  violated Flymake's status as a :core package as highlighted in its
  description, which has implications for packages depending on it (such
  as Eglot);

- No new two commands are needed (they weren't documented in the manual
  anyway).  The new functionality was integrated in the existing
  flymake-show-buffer-diagnostics;

- Some helper functions aren't needed at all (they weren't marked
  internal anyway);

- The new hook called only when a particular function is called
  non-interactively in a particular way is not useful.  A case for the
  usefulness (if any) of this hook must be made separately.  Such a hook
  should be documented in the manual;

- Added missing recentering after revealing diagnostic in buffer;

- The menu entry "List all problems" was never intended to direct the
  user the user to any particular problem at point;

- The useful new functionality is called out in the manual and NEWS.

* lisp/progmodes/flymake.el (flymake--indicator-overlay-spec):
Use flymake-show-buffer-diagnostics-at-mouse.
(flymake-mode-map): Recover old definition.
(flymake-after-show-buffer-diagnostics-hook): Remove hook.
(flymake-show-buffer-diagnostics): Rework.
(flymake-show-diagnostic, flymake-goto-diagnostic): Rework
docstring.
(flymake-show-buffer-diagnostics-at-event-position)
(flymake-show-buffer-diagnostics-at-event-line): Delete undocumented commands.
(flymake-diagnostics-at-mouse-event)
(flymake-pulse-momentary-highlight-region): Delete non-helpful
helper.

* doc/misc/flymake.texi (listing diagnostics): Mention new
  functionality.
2025-04-20 23:20:33 +01:00
João Távora
77cd3a406b Flymake: address some compatibility problems with older Emacsen
Can't use with-supressed-warnings, introduced in Emacs 27.1.  Also can't
use multi-arg setq-local, probably introduced around the same time.

This commit by itself still doesn't allow Flymake to be loaded in Emacs
< 29.  That fix will come in a later commit.

* lisp/progmodes/flymake.el (flymake--mode-line-counter-map):
Use with-no-warnings.

* lisp/progmodes/flymake.el (flymake--resize-margins): Use setq,
setq-local not needed.
2025-04-20 23:20:33 +01:00
João Távora
53d732d775 Flymake: dynamically resize and layout diagnostic listings
Since 'origin' and 'code' are new separate optional attributes of each
diagnostic, it becomes important to not waste space in these listings
when these are absent.  When a specific column isn't used by any line,
omit it.  Also spare just enough horizontal space to hold the largest
element in each column.

* lisp/progmodes/flymake.el
(flymake--tabulated-setup): New helper.
(flymake-diagnostics-buffer-mode)
(flymake-project-diagnostics-mode): Use flymake--setup-tabulated-listing.
(flymake--fit-diagnostics-window): New helper.
(flymake--tabulated-list-format-base): Rename from
flymake--diagnostics-base-tabulated-list-format.
(flymake--tabulated-setup-1): Rename and rework from
flymake--tabulated-entries-1.
(flymake--diagnostics-buffer-entries): Remove.
(flymake-diagnostics-buffer-mode)
(flymake-project-diagnostics-mode): Simplify.
(flymake--project-diagnostics-entries): Remove.
2025-04-20 23:20:33 +01:00
João Távora
ed1311a62a Flymake: new flymake-diagnostic-format-alist (bug#77439, bug#77480)
* lisp/progmodes/flymake.el (flymake-diagnostic-text): Overhaul.
(flymake-diagnostic-format-alist): New defcustom.
(flymake--diagnostic-format): New util.
(flymake--eol-overlay-summary)
(flymake--highlight-line)
(flymake-eldoc-function): Use flymake--diagnostic-format.
(flymake--tabulated-diagnostic-origin): New helper.
(flymake--tabulated-entries-1): Use flymake--tabulated-diagnostic-origin.
(flymake--diagnostics-base-tabulated-list-format): "Backend" -> "Origin"

* doc/misc/flymake.texi (Customizable variable): Mention new variable.
2025-04-20 23:20:33 +01:00
João Távora
0fe05a920a Flymake: more powerful flymake-make-diagnostic and rework manual
Flymake backends may now explicitly specify an origin and a code for a
diagnostic in addition to the textual description.  This change lays
groundwork for richer diagnostic listings and user options for
summarizing diagnostics, addressing bug#77439 and bug#77480.

* doc/misc/flymake.texi (Flymake API): Rename from "Extending
Flymake".  Rework.
(Inspecting diagnostics): New section.

* lisp/progmodes/flymake.el (flymake--diag): Add origin, code and
message.  Remove text.
(flymake-make-diagnostic): Support new origin, code and message.
(flymake-diagnostic-text): Rework.
2025-04-20 23:20:33 +01:00
Juri Linkov
b38fd553eb * lisp/treesit.el (treesit-show-paren-data--categorize): Fix off-by-one error.
(bug#77906)
2025-04-20 21:29:36 +03:00
Juri Linkov
d7b56fc2ee * lisp/treesit.el (treesit-cycle-sexp-type): Add optional arg 'interactive'.
Display the message only for interactive usage.
2025-04-20 20:46:31 +03:00