1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-11 14:01:43 -08:00
Commit graph

161654 commits

Author SHA1 Message Date
Eli Zaretskii
dcb11202ac ; * lisp/progmodes/project.el (project-buffers): Doc fix. 2022-11-04 15:56:30 +02:00
Basil L. Contovounesios
fd3f51b7c3 Fix manual noverlay tests
* test/manual/noverlay/Makefile.in: Add copyright notice.
(LIBS): Rename...
(PACKAGES): ...to this, to avoid confusion with Autoconf's LIBS.
All uses changed.
(CFLAGS): Break out -I flag...
(CPPFLAGS): ...into this new variable.
(LDFLAGS): Rename...
(LDLIBS): ...to this, which is expected to hold -l flags.
(top_builddir): New variable.
(EMACS): Define in terms of it.
(.PHONY): Add clean, distclean, and perf targets.
(have-libcheck): Remove redundant target.  All uses updated.
(itree-tests.o): Remove redundant dependency on its source file.
(itree-tests): Remove redundant (and uncompilable) rule.

* test/manual/noverlay/check-sanitize.sh: Use /usr/bin/env.  Add
copyright notice.  Enable pipefail option, to propagate itree-tests
exit status to caller.  Fix typo in usage message.  Strip less
information from Check's error messages.

* test/manual/noverlay/emacs-compat.h: Add copyright notice.
Include stdlib.h.
(emacs_abort, eassert): Consistently use EXIT_FAILURE.
(eassume): Define when necessary.

* test/manual/noverlay/itree-tests.c: Add copyright notice.  Include
standard headers before third-party ones.  Use most narrowly
applicable ck_assert* macro for the types being checked,
e.g. ck_assert_ptr_* macros for pointer values.  Replace removed
names and APIs with current ones, e.g. the itree_node field 'color'
is now called 'red'.  Ensure preconditions of itree API are
satisfied before use, e.g. itree_node otick being set appropriately
before insertion, or global iterator being initialized
before (implicit) use (bug#58976).  Make all functions static.
(DEF_TEST_SETUP): Remove all instances, replacing with...
(test_insert1_setup, test_insert2_setup, test_remove1_setup)
(test_remove2_setup): ...these new test fixtures.
(A, B, C, D, E, N_05, N_10, N_15, N_20, N_30, N_40, N_50, N_70)
(N_80, N_90, N_85, N_95): Define as static variables rather than
macros.
(test_get_tree4): Remove, inlining salient parts.
(shuffle): Move closer to users.
(test_create_tree): Accept itree_nodes as argument instead of
dynamically allocating them.  All callers changed.
(FOREACH): Remove unused macro.
(N_BEG, N_END): Define in terms of itree_node_begin and
itree_node_end, respectively.
(test_gap_insert_1, test_gap_insert_2, test_gap_insert_3)
(test_gap_insert_5, test_gap_insert_7, test_gap_insert_11): Use
test_setup_gap_node_noadvance.
(basic_suite): Group unit tests into test cases and fixtures.  Run
previously forgotten test_insert_14.
(main): Run suite as CK_ENV to allow specifying desired verbosity in
the environment.
2022-11-04 13:38:02 +02:00
Po Lu
01471b5fdf Avoid using too up-to-date values when restoring valuators
* src/xterm.c (xi_has_scroll_valuators): New function.
(xi_handle_device_changed): If the device changed event provides
scroll valuators, then use the values in there.  (bug#58980)
2022-11-04 19:23:19 +08:00
Dmitry Gutov
a248eb3d18 ; Minor rephrase 2022-11-04 12:41:00 +02:00
Eli Zaretskii
23868658a2 ; * lisp/subr.el (setq-local): Fix last doc change. 2022-11-04 09:49:48 +02:00
Juri Linkov
ca3763af5c * lisp/tab-bar.el (tab-bar-fixed-width): New user option.
(tab-bar-fixed-width-max): New user option.
(tab-bar-fixed-width-min): New variable.
(tab-bar-fixed-width-faces): New variable.
(tab-bar--fixed-width-hash): New function.
(tab-bar-make-keymap-1): Use 'tab-bar-fixed-width'.

https://lists.gnu.org/archive/html/emacs-devel/2022-10/msg02067.html
2022-11-04 09:47:59 +02:00
Juanma Barranquero
4fa8f57cc6 ; * lisp/emacs-lisp/oclosure.el: Fix typos. 2022-11-04 08:41:43 +01:00
Juanma Barranquero
116f69d741 ; * lisp/subr.el (setq-local): Doc fix. 2022-11-04 07:05:51 +01:00
Juanma Barranquero
55a31836fb ; * etc/NEWS.27, etc/NEWS.28: Fix typos. 2022-11-04 07:05:51 +01:00
Stefan Kangas
96436a125d Merge from origin/emacs-28
8cae9d8bd8 ; * doc/emacs/search.texi (Lax Search): Improve wording.  ...
e01e8a8f84 ; * lisp/dired-aux.el (dired-show-file-type): Doc fix.
2022-11-04 06:31:49 +01:00
Stefan Monnier
5e7d08ae13 itree.c: Minor tightening
* src/itree.c (iter): Initialize to NULL.
(init_itree): Make sure it's not allocated before we overwrite it.
(itree_insert_gap): Tweak the end-loop.
2022-11-03 23:16:12 -04:00
Stefan Monnier
ff679e16f8 itree: Reproduce markers's behavior more faithfully (bug#58928)
The most obvious problem was the lack of support for
`insert-before-markers`, but the behavior was also different in a few
other cases.

* src/itree.h (itree_insert_gap):
* src/itree.c (itree_insert_gap): Add `before_markers` arg.
* src/lisp.h (adjust_overlays_for_insert):
* src/buffer.c (adjust_overlays_for_insert): Add `before_markers` arg.

* src/insdel.c (adjust_markers_for_replace, adjust_markers_for_insert)
(adjust_markers_for_delete): Adjust overlays directly from here.
(insert_1_both, insert_from_string_1, insert_from_gap)
(insert_from_buffer_1, adjust_after_replace, replace_range)
(replace_range_2, del_range_2): Don't adjust overlays explicitly here
any more.

* test/src/buffer-tests.el (test-overlay-insert-before-markers-empty)
(test-overlay-insert-before-markers-non-empty): New tests.
2022-11-03 22:44:55 -04:00
Dmitry Gutov
7d47651d01 project-buffers: Describe the default implementation
* lisp/progmodes/project.el (project-buffers):
Describe what the default implementation is doing (bug#58784).
2022-11-04 03:16:36 +02:00
Dmitry Gutov
ef45bfacb2 project-kill-buffer-conditions: Skip Gnus modes as well
* lisp/progmodes/project.el (project-kill-buffer-conditions):
Skip Gnus modes as well (bug#58839).
2022-11-04 03:03:29 +02:00
Dmitry Gutov
44f23dac25 project-kill-buffer-conditions: Skip hidden ones
* lisp/progmodes/project.el (project-kill-buffer-conditions):
Make exception for "hidden" buffers (bug#58839).
2022-11-04 02:59:12 +02:00
Po Lu
8e7066babe Fix initialization of scroll valuator emacs_value
* src/xterm.c (xi_handle_device_changed): Initialize emacs_value
to 0, not DBL_MIN.  (bug#58980)
2022-11-04 08:29:13 +08:00
Jim Porter
d2a9dae400 Only strip newlines when stringifying a value for Eshell
* lisp/eshell/esh-util.el (eshell-stringify): Use 'string-trim-right'
instead of stripping the last character of the result of
'pp-to-string' (bug#58810).

* test/lisp/eshell/esh-util-tests.el: New file.
2022-11-03 11:44:41 -07:00
Paul Eggert
39f5696921 Improve suppression of bogus macOS warnings
* configure.ac: On macOS, always use -Wno-deprecated-declarations,
as the false alarms appear even if --disable-gcc-warnings is given
(Bug#58966).
2022-11-03 11:10:32 -07:00
Eli Zaretskii
8cae9d8bd8 ; * doc/emacs/search.texi (Lax Search): Improve wording. (Bug#58992) 2022-11-03 20:02:00 +02:00
Juri Linkov
651bf0a999 Fix overlays order in Flyspell (bug#58970)
Flyspell relies on the sorting order of overlays from 'overlays-in'
that returned the overlays sorted by decreased 'overlay-start'.
But after the recent merge of the noverlay branch, the order was reversed.
So need to change the order back to the expected by Flyspell.

* lisp/textmodes/flyspell.el (flyspell-auto-correct-previous-word):
Sort overlays returned from 'overlays-in' descending by 'overlay-start'.
2022-11-03 19:35:45 +02:00
Basil L. Contovounesios
a66280162f Port interval trees to --enable-checking=structs
Some names under the interval_* namespace were renamed under the
itree_* namespace in commits:

  0. f421b58db5 of 2022-10-19
  "Prefix all itree.h type names with itree_".
  1. 37a1145410 of 2022-10-19
  "Rename all exported itree.h functions with the itree_ prefix"

Further, some values still referenced in commentary were removed in
commits:

  2. 258e618364 of 2022-10-17
  "Delete the itree_null sentinel node, use NULL everywhere."
  3. 2c4a3910b3 of 2022-10-02
  "itree: Use a single iterator object"

* src/emacs.c (main): Allocate global itree iterator once and for
all.
* src/alloc.c (mark_overlay):
* src/buffer.c (set_overlays_multibyte):
* src/itree.c (itree_destroy): Update commentary.
(interval_stack_ensure_space, itree_insert_gap): Prefer
unsigned-to-unsigned comparisons over signed-to-unsigned.
(interval_stack_push_flagged, interval_tree_insert)
(interval_tree_contains, itree_iterator_start)
(itree_iterator_finish, itree_iterator_next, itree_iterator_narrow):
Improve assertions.
(itree_init): Rename...
(init_itree): ...to this, for consistency with other global init
functions.
(itree_create): Stop leaking a global iterator allocation on each
call.
(interval_tree_init): Complete renames of
interval_tree -> itree_tree and interval_tree_clear -> itree_clear.
(interval_tree_remove_fix): Fix indentation.
* src/itree.h: Declare init_itree.
(ITREE_FOREACH): Fix typo in commentary.

* src/pdumper.c [CHECK_STRUCTS]
(dump_interval_node): Use the correct name in the HASH condition
and #error message.
(dump_overlay, dump_buffer): Update HASH (bug#58975).
2022-11-03 16:49:05 +02:00
Juanma Barranquero
8b8038494c * src/gnutls.c (Fgnutls_available_p): Avoid duplicating capabilities. 2022-11-03 14:43:27 +01:00
Stefan Kangas
d8bef573d6 Prefer defvar-keymap in profiler.el
* lisp/profiler.el (profiler-report-mode-map): Prefer
defvar-keymap.
2022-11-03 14:29:11 +01:00
Jonas Bernoulli
2eb2eb0c9e ; * emoji.el (emoji--define-transient): Adapt to recent changes in transient. 2022-11-03 12:40:57 +01:00
Po Lu
eb8478c514 Further simplify valuator reset code
* src/xterm.c (xi_reset_scroll_valuators_for_device_id): Minor
style adjustments.
(handle_one_xevent): Don't check frames; reset on all XI_Enter
and XI_Leave events.
2022-11-03 19:27:29 +08:00
Eli Zaretskii
e01e8a8f84 ; * lisp/dired-aux.el (dired-show-file-type): Doc fix. 2022-11-03 11:59:30 +02:00
Gerd Möllmann
d16494cffb Suppress deprecation warnings on macOS (bug#58966)
* configure.ac (CHECK_LISP_OBJECT_TYPE): Add
-Wno-deprecated-declarations for darwin.
2022-11-03 10:42:35 +01:00
Eli Zaretskii
dffc34a2d4 Fix 'text-property-search-backward' with 1-char long properties
* lisp/emacs-lisp/text-property-search.el
(text-property--find-end-backward): Don't miss the end of
text-property value at point.  This fixes searches backward when
the property is on a single character position.  (Bug#58937)
2022-11-03 11:25:50 +02:00
dannyfreeman
1c9d7fba0a ; Fix a typo in Eglot manual
* doc/mist/eglot.texi (Customizing Eglot): 'flymake-error' face
mistakenly appears twice.  (Bug#58969)
2022-11-03 11:19:37 +02:00
Juanma Barranquero
b074c55a97 ; * doc/lispref/control.texi (Generators): Fix typo. 2022-11-03 03:49:08 +01:00
Paul Eggert
05f5d978ae Initialize child signal handling before posix_spawn too.
Problem reported by Tino Calancha (Bug#58960).
* src/callproc.c (call_process): Initialize SIGCHLD handling
before possibly creating a child with emacs_span.  This need not
be in the critical section that calls emacs_spawn, so do it
outside the critical section.
* src/process.c (child_signal_init): Now extern.
2022-11-02 13:25:11 -07:00
Juri Linkov
195f0e00d7 ; Fix typo 2022-11-02 20:36:49 +02:00
Juri Linkov
969d71d11c Add the parameter :noquery to open-network-stream (bug#58948)
* doc/lispref/processes.texi (Network): Add :noquery for open-network-stream.

* lisp/net/network-stream.el (open-network-stream): Pass the
parameter :noquery to make-network-process.  Doc fix.

* lisp/progmodes/eglot.el (eglot--connect): Pass `:noquery t' to
eglot--inferior-bootstrap to use in open-network-stream call, like
`:noquery t' is passed to make-process in other places.
2022-11-02 20:22:10 +02:00
Juanma Barranquero
62d40f27b2 ; * doc/misc/cl.texi (Mapping over Sequences): Fix typos. 2022-11-02 17:19:46 +01:00
Gregory Heytings
b035db7a31 ; * admin/git-bisect-start: Improve commentary. 2022-11-02 15:22:33 +01:00
Stefan Kangas
1f1dac9b3b * lisp/man.el (Man-mode-map): Prefer defvar-keymap. 2022-11-02 15:07:39 +01:00
Eli Zaretskii
a762cb4f8c ; * admin/git-bisect-start: Improve commentary. 2022-11-02 15:47:58 +02:00
Gregory Heytings
bec2b542c5 ; * admin/git-bisect-start: Use a full reference. 2022-11-02 14:08:27 +01:00
Po Lu
a5d4c29a7f Improve commentary in some parts of xterm.c
* src/xterm.c (x_probe_xfixes_extension): Rename to
`x_fixes_pointer_blanking_supported', as fixes is now used for
selection tracking as well.  All callers changed.
(x_focus_changed): Document where this code is used.
2022-11-02 18:27:48 +08:00
Paul Eggert
840b9eadd6 Remove unused local in simple_search
* src/search.c (simple_search): Remove unused local.
2022-11-01 23:04:00 -07:00
Stefan Monnier
8a5678906f src/buffer.c: Fix interaction between overlays & indirect buffers (bug#58928)
* src/buffer.c (adjust_overlays_for_insert)
(adjust_overlays_for_delete): Repeat for all buffers sharing the same text.

* src/itree.c (itree_insert_gap, itree_delete_gap): Allow an empty tree.

* test/src/buffer-tests.el (buffer-tests--overlays-indirect-bug58928):
New test.
2022-11-01 21:39:12 -04:00
Dmitry Gutov
835295381b project-switch-project: Avoid altering default-directory in cb
* lisp/progmodes/project.el (project-switch-project):
Avoid altering default-directory in the current buffer, even
temporarily (bug#58784).
2022-11-02 01:30:08 +02:00
Dmitry Gutov
0f5bf1dbb9 vc-svn-ignore-completion-table: Ignore empty lines
* lisp/vc/vc-svn.el (vc-svn-ignore-completion-table):
Make sure to ignore empty lines (bug#58889).
2022-11-02 00:46:21 +02:00
Gregory Heytings
208f0578d1 Add a script to ease bisecting.
* admin/git-bisect-start: New script.

* admin/notes/repo (Bisecting): Mention the script.

* admin/emake: Add a Copyright blurb.
2022-11-01 19:21:38 +01:00
Michael Albinus
22e8a77583 * lisp/net/dbus.el (dbus-debug): Declare. (Bug#58865) 2022-11-01 16:35:40 +01:00
Po Lu
e39537ea1e * src/xterm.c (x_term_init): Fix last change. 2022-11-01 19:20:15 +08:00
Po Lu
eb68c3d5a2 Fix leak on Lucid build
* src/xterm.c (x_term_init): Rectify wrong fix for bug#18403.
2022-11-01 19:20:15 +08:00
Stefan Kangas
123baf3772 Merge from origin/emacs-28
1862df834c ; * src/search.c (Fmatch_data): Doc fix.
15fc5225b1 ; * lisp/whitespace.el (whitespace-trailing): Fix a typo.
9f3c896f7c ; * doc/emacs/text.texi (Quotation Marks): Typo fix.  (Bug...

# Conflicts:
#	src/search.c
2022-11-01 10:30:09 +01:00
Gerd Möllmann
e7c105fd73 ; Mention git bisect's --first-parent in admin/notes/repo 2022-11-01 10:25:28 +01:00
Gerd Möllmann
d305eaf4ce Preven a buffer-overflow (bug#58850)
* src/print.c (print_vectorlike): Don't use sprintf.
2022-11-01 10:14:07 +01:00