1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 18:40:39 -08:00
Commit graph

178085 commits

Author SHA1 Message Date
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
Juri Linkov
4151a44f60 ; * test/infra/Dockerfile.emba: Add cmake/markdown/php/phpdoc/toml/yaml. 2025-04-20 20:43:53 +03:00
Juri Linkov
2585462533 Fix indentation test failure for elixir-ts--indent-rules
* lisp/progmodes/elixir-ts-mode.el (elixir-ts--indent-rules):
Add query for Elixir embedded in Heex (bug#76788).

* lisp/progmodes/heex-ts-mode.el (heex-ts-mode): Append
treesit-simple-indent-rules to elixir-ts--indent-rules.
2025-04-20 20:39:41 +03:00
Michael Albinus
8c04396b19 Fix emerge.el for remote files
* lisp/vc/emerge.el (emerge-make-diff-list)
(emerge-make-diff3-list): Set proper `default-directory' in order
to support remote files.  (Bug#6850, Bug#74352)

* test/lisp/vc/emerge-tests.el: New file.
2025-04-20 18:16:14 +02:00
Stefan Monnier
2f2fbae882 (savehist-minibuffer-hook): Exclude uninterned history vars
* lisp/savehist.el (savehist--reload): Don't bother merging the value
of vars that were not changed.
(savehist-minibuffer-hook): Exclude uninterned history vars.
2025-04-20 10:10:17 -04:00
Gerd Möllmann
6fb2a4691f ; Pacify free variable warning in vc-git.el
* lisp/vc/vc-git.el (log-edit-font-lock-keywords): Defvar.
2025-04-20 15:06:13 +02:00
Po Lu
57966a3350 Temporary fix for compilation on Android API levels <= 13
* lib/getloadavg.c (getloadavg): Don't use sysinfo on Android
API levels <= 13.  This will be resolved in Gnulib shortly, with
any luck.
2025-04-20 20:49:24 +08:00
Vincenzo Pupillo
4428077c2b Fix indentation of "{" on a new line of a function declaration
* lisp/progmodes/js.el (js--treesit-switch-body-helper): New
anchor helper function for the switch_body.
(js--treesit-member-chained-expression-helper): New anchor
helper function for chained calls in member_expression.
(js--treesit-arrow-function-helper): New anchor helper
function for arrow_function.
(js--treesit-indent-rules): Fix rule for the indentation of
"{" when of a new line of a function declaration.  (Bug#76704)
Fix the indentation of the parent of arrow_function, member_expression,
switch_body, ternary_expression and sequence_expression.
2025-04-20 09:14:29 +03:00
Paul Eggert
372ce97180 Omit trailing white space in one line
* oldXMenu/Recomp.c: Omit trailing spaces in C source code line.
This was the only such line found by this command:
grep '[	 ]$' $(git ls-files | grep '\.[chmy]$')
2025-04-19 22:54:34 -07:00
Paul Eggert
589f596c96 Use -Wtrailing-whitespace when warning
* configure.ac: When enabling GCC warnings, enable GCC 15’s new
-Wtrailing-whitespace option if available, as that’s the Emacs style.
2025-04-19 19:31:27 -07:00
Paul Eggert
e2fb12a40c Pacify GCC 15 -Wunterminated-string-initialization
* src/fns.c (hexbuf_digest):
* src/json.c (json_out_string):
Add ATTRIBUTE_NONSTRING to character arrays that are not strings.
2025-04-19 19:31:26 -07:00
Paul Eggert
67ae179008 Pacify GCC 15 -Wanalyzer-null-dereference
* src/emacs.c (find_emacs_executable): Add an eassume.
This pacifies -Wanalyzer-null-dereference with gcc (GCC) 15.0.1
20250329 (Red Hat 15.0.1-0).
2025-04-19 19:31:26 -07:00
Paul Eggert
c8eed90eb4 Avoid name clashes with static GnuTLS
Work around a bug in GnuTLS 3.7.11 and earlier: when built
statically, its mistakenly exports symbols hash_lookup and
hash_string, which collide with Emacs symbols of the same name,
preventing temacs from linking statically.  Problem reported by
Greg A. Woods (Bug#77476).

Because GnuTLS never uses hash_lookup or hash_string this issue
ordinarily doesn’t seem to prevent temacs from linking to GnuTLS
on GNU/Linux, as it’s linked dynamically and the dynamic linker
never needs to resolve references to either symbol.  However, I
suppose a clash or bug could occur even with dynamic linking if
Emacs later loads a module that uses either symbol.

Although GnuTLS should be fixed, Emacs should link statically to
current and older GnuTLS versions in the meantime, and it should
avoid potential problems with dynamic linking.  Renaming the two
clashing names is an easy way to do this.  For consistency with
the new name for hash_lookup, also rename hash_lookup_with_hash
and hash_lookup_get_hash.

* src/fns.c (hash_find_with_hash): Rename from hash_lookup_with_hash.
(hash_find): Rename from hash_lookup.
(hash_find_get_hash): Rename from hash_lookup_get_hash.
(hash_char_array): Rename from hash_string.
All uses changed.
2025-04-19 19:31:26 -07:00
Paul Eggert
71ee484cac Update from Gnulib by running admin/merge-gnulib 2025-04-19 19:31:25 -07:00
Paul Eggert
30335bb734 Don’t use Gnulib’s locale-h module
* admin/merge-gnulib (AVOIDED_MODULES):
Add locale-h, as Emacs should’t need this Gnulib module.
This change is needed for when we next run admin/merge-gnulib,
as some Gnulib dependencies changed recently.
2025-04-19 19:31:25 -07:00
Paul Eggert
4fa10b5760 Pacify "statement not reached" in value_cmp
Problem found by Oracle Developer Studio 12.6.
* src/fns.c (value_cmp): Omit unnecessary goto.
2025-04-19 19:31:24 -07:00
Paul Eggert
03a1df3799 Fix libsrc assumption in src/Makefile.in
* src/Makefile.in (ETAGS): Don’t assume $(libsrc) = ../lib-src.
2025-04-19 19:31:24 -07:00
Sean Whitton
45232485ae vc-user-edit-command: Add trailing space to initial input
* lisp/vc/vc-dispatcher.el (vc-user-edit-command): Add trailing
space to initial input to ease adding additional flags.
2025-04-20 09:40:36 +08:00
Werner Fink
8abd2ee052 Fix seccomp-filter for newer Linux kernels
* lib-src/seccomp-filter.c (MAP_DROPPABLE): Define if undefined.
(main): Use MAP_DROPPABLE flag.  Allow `tcgetattr' call of glibc
on physical terminal devices.  (Bug#77232)
2025-04-19 18:07:19 +03:00
Kazuhiro Ito
2cf545f47d Fix 'rfc6068-parse-mailto-url' with 'inhibit-eol-conversion'
* lisp/mail/rfc6068.el (rfc6068-parse-mailto-url): Fix EOL type to
CRLF and never inhibit EOL conversion in decoding.  (Bug#77776)
2025-04-19 17:20:27 +03:00
shipmints
6b901a8e85 Strip text properties on recentf entries, when saved (bug#77140)
Text properties are added by common completion frameworks, and
serve no purpose when stored in 'recentf-save-file', waste
space, and slow loading the file.

* lisp/recentf.el (recentf-dump-variable): Process string values
through 'substring-no-properties'.
2025-04-19 17:09:04 +03:00
Peter Oliver
fe8e88a1df Provide Open Age Ratings Service metadata
* etc/emacs.metainfo.xml: Add a <content_rating/> section.
(Bug#77492), this and the preceding 2 commits.
2025-04-19 16:43:23 +03:00
Peter Oliver
b3fb93e0e8 Tweak AppStream metadata to satisfy `appstream-util validate'
* etc/emacs.metainfo.xml: `appstream-util validate' suggests that
screenshot height and width attributes should match the actual size of
the image, and that captions be no longer than 50 chars and do not end
in `.'.  Follow those rules.
2025-04-19 16:42:32 +03:00
Peter Oliver
4f3188a88c Add AppStream metadata about supported and recommended hardware
* etc/emacs.metainfo.xml: Note that Emacs is best with a keyboard, but
other forms of input are possible.  Also note that Emacs can access the
Internet.  A modestly sized display is sufficient.
2025-04-19 16:42:18 +03:00
Stefan Kangas
87d615e26c ; Fix failing diff-mode tests
* test/lisp/vc/diff-mode-resources/git.patch: Delete file, moving
its contents to...
* test/lisp/vc/diff-mode-tests.el (diff-mode-tests--git-patch):
...this new variable.  Git merges kept deleting a trailing
whitespace in the patch signature, so let's do this instead.
(diff-mode-test-git-patch)
(diff-mode-test-git-patch/before-first-hunk)
(diff-mode-test-git-patch/signature): Use above new variable.
2025-04-19 10:39:05 +02:00
Stefan Kangas
fa4e686148 ; Delete superfluous comments explaining config.h
* src/pgtkfns.c:
* src/pgtkim.c:
* src/pgtkmenu.c:
* src/pgtkselect.c:
* src/pgtkterm.c:
* src/termcap.c:
* src/tparam.c: Delete superfluous comments explaining config.h.
2025-04-19 10:39:05 +02:00
Stefan Kangas
177accc53d xterm.c: Move GTK3-specific variables into narrower scopes
Avoid declaring GTK3-specific variables in larger-than-necessary scopes,
especially under #ifdefs.  Instead, declare them where used.  This improves
readability and reduces #ifdef clutter without changing behavior.

* src/xterm.c: [HAVE_GTK3] (x_update_opaque_region):
(XTframe_up_to_date, x_new_focus_frame, handle_one_xevent)
(x_ignore_errors_for_next_request, x_stop_ignoring_errors): Clean up
variable declarations.
2025-04-19 10:39:05 +02:00
Michael Albinus
9ea9c5a73e Merge from origin/emacs-30
2a45f0bceb * lisp/progmodes/heex-ts-mode.el (heex-ts): Fix :group name.
9750333dde Fix typescript-ts-mode indentation (bug#77803)
2025-04-19 10:00:04 +02:00
Michael Albinus
2a45f0bceb * lisp/progmodes/heex-ts-mode.el (heex-ts): Fix :group name. 2025-04-19 09:41:58 +02:00
Eli Zaretskii
37b2c2fcdd ; Improve the documentation of a recent commit
* etc/NEWS:
* doc/lispref/frames.texi (Deleting Frames): Improve documentation
of 'frame-deletable-p'.
2025-04-19 09:11:57 +03:00
Eli Zaretskii
f200b3c910 ; Fix typos in last change. 2025-04-19 08:59:06 +03:00
Eli Zaretskii
5ec6613f13 Rename 'treesit-auto-install' to 'treesit-auto-install-grammar'
* etc/NEWS:
* lisp/treesit.el (treesit-auto-install-grammar): Rename from
'treesit-auto-install'; all users changed.  Doc fix.
(treesit-ensure-installed): Doc fix.
2025-04-19 08:56:21 +03:00
Konstantin Kharlamov
9750333dde
Fix typescript-ts-mode indentation (bug#77803)
Don't align variable names to their declaratory expression.

Before this commit in code like:

    const a = 1,
          b = 2;

the b would get indented to `const'.  Similarly for `var' and
`let'. The expected behavior instead is getting indented to
`typescript-ts-mode-indent-offset'.

* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--indent-rules): Indent identifiers declarations to
`typescript-ts-mode-indent-offset'.
* test/lisp/progmodes/typescript-ts-mode-resources/indent.erts
(Lexical and variable declarations): Update test accordingly.
2025-04-18 16:40:06 -07:00
Yuan Fu
6430654b4d
Merge from savannah/emacs-30
ef8bfe90b7 Handle offset in treesit--update-ranges-local (bug#77848)

# Conflicts:
#	lisp/treesit.el
2025-04-18 16:31:22 -07:00