1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-05 22:20:24 -08:00
Commit graph

178108 commits

Author SHA1 Message Date
Gerd Möllmann
38892c66d5 DO_MARKERS -> Pip's FOR_EACH_MARKER
* src/marker-vector.h (DO_MARKERS_OF_VECTOR, DO_MARKERS): Remove.
(build_for_each_marker_data, next_marker_entry):
(FOR_EACH_MARKER_OF_VECTOR, FOR_EACH_MARKER): New.

* .clang-format (IndentPPDirectives): Add new FOR_EACH_ macros.

* src/alloc.c (unchain_dead_markers):
* src/buffer.c (Fkill_buffer, Fbuffer_swap_text)
(Fset_buffer_multibyte):
* src/coding.c (decode_coding_object, encode_coding_object):
* src/editfns.c (transpose_markers):
* src/marker-vector.c (check_marker_vector, marker_vector_reset)
(marker_vector_adjust_for_insert)
(marker_vector_adjust_for_replace):
* src/undo.c (record_marker_adjustments): Use FOR_EACH_MARKER.
2025-05-08 06:54:03 +02:00
Gerd Möllmann
3aa95eddac Change some comments 2025-05-07 14:12:56 +02:00
Gerd Möllmann
a3bfc238c0 ; * src/text-index.c (bytepos_forward_to_charpos): Fix an eassert. 2025-05-04 17:05:25 +02:00
Gerd Möllmann
c38027f0b8 Don't optimize prematurely in text_index_charpos_to_bytepos
* src/text-index.c (text_index_bytepos_to_charpos): Add a const.
(bytepos_of_head): Removed.
(text_index_charpos_to_bytepos): Don't be clever about choosing
to scan forward or backward.
(bytepos_forward_to_charpos): Use char_start_bytepos.
2025-04-27 04:51:18 +02:00
Stefan Monnier
d4879b59a2 (buf_bytepos_to_charpos): Fix performance bug
* src/text-index.c (buf_bytepos_to_charpos): New function.
(buf_charpos_to_bytepos): Use it to avoid scanning backward from next
to prev.
2025-04-26 01:27:07 -04:00
Gerd Möllmann
7d8c849ea4 Fix marker_vector_reset
* src/marker-vector.c (marker_vector_remove): Remove a comment.
(marker_vector_reset): Remember old charpos.
2025-04-24 13:35:31 +02:00
Gerd Möllmann
19152aa59a Marker last position
* src/lisp.h (struct Lisp_Marker): Extend comment.
* src/marker-vector.c (marker_vector_remove): Store marker
position in marker's entry.
(marker_vector_last_charpos): New function.
* src/marker-vector.h: Add prototype.
* src/marker.c (Fmarker_last_position): Use
marker_vector_last_position.
2025-04-24 11:55:10 +02:00
Stefan Monnier
a57c107ab5 (marker_vector_adjust_for_delete): Delete function
* src/marker-vector.c (marker_vector_adjust_for_delete): Delete function.
* src/marker-vector.h (marker_vector_adjust_for_delete): Delete declaration.
* src/insdel.c (adjust_markers_for_delete): Use
`marker_vector_adjust_for_replace` instead.
(adjust_markers_for_replace): Move call to`text_index_invalidate` so we
don't do it redundantly.
2025-04-23 01:54:39 -04:00
Stefan Monnier
c8beb5f023 text-index.c: Skip the byte scan when it's all ASCII
* src/text-index.c (is_close_enough_charpos): Remove unused arg `ti`.
(narrow_bytepos_bounds_1, narrow_charpos_bounds_1)
(narrow_bytepos_bounds, narrow_charpos_bounds):
Don't short-circuit if a known point is exactly equal to what we're
looking for, thus don't return value.
(text_index_bytepos_to_charpos, text_index_charpos_to_bytepos):
Short-circuit here instead after narrowing.
Make the two functions more alike.  Short-circuit also when the text
remaining to scan is all ASCII.
2025-04-23 01:42:58 -04:00
Stefan Monnier
0b780f8619 textconv.c: Adjust calls to build_marker
* src/textconv.c (record_buffer_change, really_set_composing_text)
(locate_and_save_position_in_field): Adjust calls to `build_marker`.
2025-04-23 01:42:58 -04:00
Gerd Möllmann
f6b3071a50 text-index.c: Avoid binary search in charpos->bytepos conversion
* src/text-index.c (z_pos, is_close_enough_charpos): New functions.
(buf_charpos_to_bytepos): Skip the binary search if the interval to
scan is already small enough after `narrow_charpos_bounds`.
2025-04-23 01:42:58 -04:00
Stefan Kangas
109bd2ac2b ; src/marker-vector: Fix typos and punctuation 2025-04-23 01:42:58 -04:00
Gerd Möllmann
89ad510b2e marker-vector.c: Move marker's position info to the array
Remove bytepos information from markers since the new text-index
makes this information redundant.
Also move the charpos information out of the Lisp_Marker objects
themselves into the marker-vector: instead of having each entry
of the vector contain only a pointer to the marker, it contains both
the pointer to the marker and the bytepos of the marker.
The benefit being that we can now zip through the charpos
of all markers of a buffer without chasing any pointer since
they are all in the same contiguous vector.

* src/lisp.h (struct Lisp_Marker): Delete `charpos` and `bytepos` fields.
(set_marker_both, set_marker_restricted_both, build_marker):
Remove `bytepos` arg.

* src/pdumper.c (dump_marker): Don't dump `bytepos` and `charpos`.
* src/alloc.c (Fmake_marker): Don't set `bytepos` and `charpos`.
(build_marker): Remove `bytepos` arg.  Use `marker_vector_set_charpos`.

* src/marker.c (Fmarker_position, Fmarker_last_position):
(attach_marker, set_marker_internal, marker_byte_position):
Use `marker_vector_charpos` and `marker_vector_set_charpos`.
(set_marker_both, set_marker_restricted_both): Remove `bytepos` arg.

* src/marker-vector.c (marker_vector_charpos, marker_vector_set_charpos)
(marker_vector_bytepos, marker_vector_adjust_for_delete)
(marker_vector_adjust_for_insert, marker_vector_adjust_for_replace):
New functions.
* src/marker-vector.h (marker_vector_charpos, marker_vector_set_charpos)
(marker_vector_bytepos, marker_vector_adjust_for_delete)
(marker_vector_adjust_for_insert, marker_vector_adjust_for_replace):
New declarations.

* src/insdel.c (adjust_suspend_auto_hscroll):
* src/fns.c (internal_equal_1, value_cmp, sxhash_obj):
Use `marker_vector_charpos`.
(adjust_markers_for_delete): Use `marker_vector_adjust_for_delete`.
(adjust_markers_for_insert): Use `marker_vector_adjust_for_insert`.
(adjust_markers_for_replace): Use `marker_vector_adjust_for_replace`.
(count_bytes): Delete function.
(adjust_markers_bytepos): Delete most of the contents of the function.

* src/editfns.c (Fpoint_marker, Fpoint_min_marker, Fpoint_max_marker)
(save_restriction_save_1, save_restriction_restore_1, transpose_markers):
* src/xdisp.c (Fbuffer_text_pixel_size, message_dolog)
(with_echo_area_buffer, unwind_with_echo_area_buffer)
(resize_mini_window, format_mode_line_unwind_data, redisplay_window)
(try_window):
* src/window.c (select_window_1, window_point)
(Fdelete_other_windows_internal, set_window_buffer)
(temp_output_buffer_show, Fsplit_window_internal)
(window_scroll_for_long_lines, window_scroll_pixel_based)
(window_scroll_line_based, scroll_command, Frecenter)
(Fmove_to_window_line, Fset_window_configuration, save_window_save):
* src/buffer.c (clone_per_buffer_values, record_buffer_markers):
(Fmake_indirect_buffer, Fset_buffer_multibyte):
* src/undo.c (record_marker_adjustments):
* src/lread.c (readchar, unreadchar):
* src/coding.c (decode_coding_object, encode_coding_object):
* src/process.c (update_process_mark, read_process_output_after_insert)
(Finternal_default_process_sentinel):
* src/print.c (print_finish):
* src/indent.c (check_display_width, restore_window_buffer)
(Fvertical_motion):
* src/dispextern.h (SET_MARKER_FROM_TEXT_POS):
* src/callint.c (Fcall_interactively):
* src/composite.c (autocmp_chars): Adjust calls to `build_marker`,
`set_marker_both`, and `set_marker_restricted_both`, and use
`marker_vector_charpos` and `marker_vector_set_charpos`.
2025-04-23 01:42:49 -04:00
Gerd Möllmann
d0a9025fc6 marker.c: Keep markers in arrays rather than linked lists
* src/marker.c (attach_marker): Use `marker_vector_add`.
(unchain_marker): Rewrite.

* src/pdumper.c (dump_marker): Handle new field `entry`.
(dump_buffer): Adjust code for `markers` field.

* src/lisp.h (gc_vsize): New function.
(gc_asize): Use it.
(struct Lisp_Marker): Delete `next` field, add field `entry` instead.

* src/alloc.c (Fmake_marker): Don't initialize `next`.
* src/undo.c (record_marker_adjustments):
* src/insdel.c (adjust_markers_for_delete, adjust_markers_for_insert)
(adjust_markers_for_replace, adjust_markers_bytepos):
* src/coding.c (decode_coding_object, encode_coding_object):
* src/editfns.c (transpose_markers): Use `DO_MARKERS`.

* src/buffer.h (struct buffer_text): Change type of `markers` field.
2025-04-23 00:45:32 -04:00
Gerd Möllmann
b45ae4c021 text-index.c: New implementation of bytepos<->charpos conversion
* test/src/text-index-tests.el: New file.
* src/text-index.c, src/text-index.h: New files.
* src/Makefile.in (base_obj): Add it.

* src/marker.c (cached_charpos, cached_bytepos, cached_buffer)
(cached_modiff): Delete vars.
(clear_charpos_cache): Delete function.
(CONSIDER): Delete macro.
(BYTECHAR_DISTANCE_INITIAL, BYTECHAR_DISTANCE_INCREMENT): Delete consts.
(buf_charpos_to_bytepos, buf_bytepos_to_charpos): Delete functions,
rewritten now in `text-indent.c`.

* src/insdel.c (adjust_markers_for_delete, adjust_markers_for_insert)
(adjust_markers_for_replace): Call `text_index_invalidate`.
(adjust_markers_bytepos): Don't call `clear_charpos_cache`.

* src/lisp.h (clear_charpos_cache): Delete declaration.
(buf_charpos_to_bytepos, buf_bytepos_to_charpos):
Move declarations to `text-indent.h`.

* src/buffer.h: Include `text-index.h`.
(struct buffer_text): New field `index`.
* src/buffer.c (Fget_buffer_create, Fmake_indirect_buffer): Initialize it.
(Fkill_buffer): Free it; don't call `clear_charpos_cache`.
(Fset_buffer_multibyte): Remove hack now that `BYTE_TO_CHAR` never
creates markers; don't call `clear_charpos_cache`.
* src/pdumper.c (dump_buffer): Initialize new field.
* src/emacs.c: (main): Call `syms_of_text_index`.
2025-04-23 00:39:11 -04: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
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