]> git.eshelyaron.com Git - emacs.git/log
emacs.git
9 months agoPrefer -I to -isystem
Paul Eggert [Tue, 16 Jul 2024 02:25:44 +0000 (19:25 -0700)]
Prefer -I to -isystem

* configure.ac: Simplify configuration by using -I instead of
-isystem, as -isystem is no longer helpful for suppressing
diagnostics (and likely has not been helpful for years).
Do not suppress -Wsystem-headers, as Gnulib no longer enables it.

(cherry picked from commit a86c25c91f39a25a93d18c9267e024822c1bc43e)

9 months agoSimplify time form analysis
Paul Eggert [Mon, 15 Jul 2024 00:00:56 +0000 (01:00 +0100)]
Simplify time form analysis

This does not change behavior; it merely refactors the code
for simplicity.
* src/timefns.c (enum timeform, struct form_time):
Remove.  All uses removed.
(decode_time_components): Accept HZ instead of FORM.
This saves a switch.  All uses changed.
(decode_lisp_time): Return union c_time instead of struct form_time.
All uses changed.
(lisp_time_cform): Remove.  All uses changed to just use
decode_lisp_time.
(time_arith, Ftime_convert): Check (TICKS . HZ) form directly
using CONSP, instead of using the old struct form_time.
That's fast enough here.

(cherry picked from commit e1089cc9b6d7abfe468175eb92b146c884e00374)

9 months agoTest !FASTER_TIMEFNS with builtin resolutions
Paul Eggert [Sun, 14 Jul 2024 16:36:01 +0000 (17:36 +0100)]
Test !FASTER_TIMEFNS with builtin resolutions

* src/timefns.c (timespec_hz, trillion, ztrillion):
If !FASTER_TIMEFNS, do not optimize the calculations of
these variables.  This gives better test coverage of the
slow-path code, when compiling with -DFASTER_TIMEFNS=0.
(NEED_ZTRILLION_INIT): Move up, to simplify #ifdefery.
Now defined or not defined, instead of being 1 or not defined,
since it is used only via #ifdef.

(cherry picked from commit d10c1796c99637d847fa78e3fcb438d03774a00b)

9 months agoMake ztrillion static
Paul Eggert [Sun, 14 Jul 2024 14:59:20 +0000 (15:59 +0100)]
Make ztrillion static

* src/timefns.c (ztrillion): Now static, when it is a variable,
since no other module uses it.

(cherry picked from commit 51d096ec07dc3bc053965096cd768847020c240d)

9 months agoFix buffer size problem in print_bool_vector
Paul Eggert [Sun, 14 Jul 2024 22:45:31 +0000 (23:45 +0100)]
Fix buffer size problem in print_bool_vector

* src/print.c (print_bool_vector): Don’t assume SIZE fits
into ptrdiff_t, since it is an EMACS_INT.  This
pacifies gcc -Wformat-overflow on i686 --with-wide-int.

(cherry picked from commit a53fd69fe21ea057cd257e663219a33399545949)

9 months agoalloc.c: ckd_add, not by-hand checks
Paul Eggert [Sun, 14 Jul 2024 22:37:50 +0000 (23:37 +0100)]
alloc.c: ckd_add, not by-hand checks

* src/alloc.c (lmalloc, lrealloc): Prefer ckd_add to
by-hand checks for integer addition overflow.

(cherry picked from commit b77abd2bfeb13ae046b1f8c6157bd5a497665657)

9 months agoFix get_conversion_field --with-wide-wint overflow
Paul Eggert [Sun, 14 Jul 2024 22:24:21 +0000 (23:24 +0100)]
Fix get_conversion_field --with-wide-wint overflow

* src/textconv.c (get_conversion_field): Set max value to
PTRDIFF_MAX, not MOST_POSITIVE_FIXNUM, since the variable is
ptrdiff_t, not EMACS_INT.  Problem caught by gcc -Woverflow on a
32-bit platform with --with-wide-int.

(cherry picked from commit b4050ab75e896dd0df51624c956e0dd412dde2cc)

9 months agoPacify -Wmissing-variable-declarations for lisp_malloc_user
Paul Eggert [Sun, 14 Jul 2024 22:03:05 +0000 (23:03 +0100)]
Pacify -Wmissing-variable-declarations for lisp_malloc_user

* src/alloc.c (lisp_malloc_user) [!USE_LSB_TAG]:
Provide extern decl.

(cherry picked from commit a4bafce01e605ddcfff7a4de018b50ad96ea6f8a)

9 months agoPacify 32-bit GCC 14.1.1 in timer_check_2
Paul Eggert [Sun, 14 Jul 2024 19:53:28 +0000 (20:53 +0100)]
Pacify 32-bit GCC 14.1.1 in timer_check_2

* src/keyboard.c (timer_check_2): Refactor to make flow control
more obvious, to pacify -Wanalyzer-use-of-uninitialized-value with
gcc 14.1.1 20240607 (Red Hat 14.1.1-5) on i686.

(cherry picked from commit 31517e81d0d8562e222d4b0de399915df956099f)

9 months agoUse Gnulib workaround for Android strnlen bug
Paul Eggert [Fri, 12 Jul 2024 16:23:30 +0000 (17:23 +0100)]
Use Gnulib workaround for Android strnlen bug

The workaround for the Android 5.0 (API 21) strnlen bug
is now done in m4/strnlen.m4, taken from Gnulib, so
there is no need for Emacs to have its own workaround.
* configure.ac (ORIGINAL_AC_FUNC_STRNLEN, AC_FUNC_STRNLEN):
Remove.

(cherry picked from commit 2067c255e677f77eaf27dc992400111d8ac59bfd)

9 months agoUpdate from Gnulib by running admin/merge-gnulib
Paul Eggert [Tue, 16 Jul 2024 02:03:17 +0000 (19:03 -0700)]
Update from Gnulib by running admin/merge-gnulib

(cherry picked from commit f5dbdedcc53d2c57b9ddecbe9248c90ef0fa08d6)

9 months ago; Skip commit 7d8ff5a56c52ed8917d9f45f2b113cfd3de7d497
Eshel Yaron [Wed, 17 Jul 2024 21:51:37 +0000 (23:51 +0200)]
; Skip commit 7d8ff5a56c52ed8917d9f45f2b113cfd3de7d497

9 months agoMake error messages adhere to our standards
Stefan Kangas [Tue, 16 Jul 2024 02:53:38 +0000 (04:53 +0200)]
Make error messages adhere to our standards

* src/cygw32.c (chdir_to_default_directory):
* src/fns.c (secure_hash):
* src/keyboard.c (Finternal_handle_focus_in):
* src/keymap.c (store_in_keymap):
* src/pgtkfns.c (pgtk_set_scroll_bar_foreground)
(pgtk_set_scroll_bar_background, Fx_export_frames)
(Fpgtk_set_monitor_scale_factor, pgtk_get_defaults_value)
(pgtk_set_defaults_value, Fpgtk_print_frames_dialog)
(pgtk_get_monitor_scale_factor):
* src/pgtkterm.c (pgtk_set_parent_frame):
* src/process.c (network_interface_info, send_process):
* src/w32.c (w32_read_registry):
* src/w32fns.c (Fw32_read_registry):
* src/window.c (Frecenter):
* src/xfns.c (Fx_export_frames, Fx_print_frames_dialog)
(x_set_mouse_color): Make 'error' message strings follow our guidelines.
More specifically, they should not end in a period, and normally also be
capitalized.  See '(elisp) Programming Tips'.

(cherry picked from commit 970409916e0dff9cd4d542f16f7d570149bdeeb1)

9 months agoDelete commented out code from `signal_or_quit`
Stefan Kangas [Tue, 16 Jul 2024 00:00:52 +0000 (02:00 +0200)]
Delete commented out code from `signal_or_quit`

* src/eval.c (signal_or_quit): Delete code commented out since 2001.

(cherry picked from commit 72c8e0df87b0776451f9065f3432a8ebecee974d)

9 months agoPrefer `memcpy` to `strcpy` in image.c
Stefan Kangas [Mon, 15 Jul 2024 13:17:16 +0000 (15:17 +0200)]
Prefer `memcpy` to `strcpy` in image.c

* src/image.c (lookup_image, xpm_cache_color)
(imagemagick_create_cache): Prefer 'memcpy' to 'strcpy'.

(cherry picked from commit fcb4d89aaa7bf3ed77aaa4d6d5047a0ec2ed9225)

9 months agoRestrict loop variable scope in `xpm_str_to_color_key`
Stefan Kangas [Fri, 12 Jul 2024 00:16:47 +0000 (02:16 +0200)]
Restrict loop variable scope in `xpm_str_to_color_key`

* src/image.c (xpm_str_to_color_key): Restrict scope of
loop variable.

(cherry picked from commit 72ba45e2749df8561fe93bafdefbdc8eca56571f)

9 months agoAdd project argument to project-kill-buffers
Spencer Baugh [Tue, 9 Jul 2024 18:30:27 +0000 (14:30 -0400)]
Add project argument to project-kill-buffers

Previously, project-kill-buffers always called (project-current t).  A
Lisp program could change what project project-kill-buffers operated
on by binding project-current-directory-override.  However, in some
edge cases (for example, if the project was deleted between looking it
up and calling project-kill-buffers) this might fail to detect a
project, and so (project-current t) would prompt the user.

To avoid this, accept the project to kill buffers for as an argument.

* lisp/progmodes/project.el (project-kill-buffers): Take project as an
optional argument (bug#72019).

(cherry picked from commit 6b2f51633e0f508d393516d6624e1a4ddaca31d1)

9 months agoFix intermittent failure of dired-test-bug27243-02
Peter Oliver [Mon, 15 Jul 2024 11:03:47 +0000 (12:03 +0100)]
Fix intermittent failure of dired-test-bug27243-02

* test/lisp/dired-tests.el (dired-test-bug27243-02): Exclude free disk
space from dired listing in this test, in case it changes while it's
running and confuses the result.  (Bug#72120)

(cherry picked from commit a7b68c25640de8214bc759d20180373c2dbcfa16)

9 months ago* etc/TODO: Refer to Bug#72127 for Magit assignments.
Stefan Kangas [Mon, 15 Jul 2024 20:59:50 +0000 (22:59 +0200)]
* etc/TODO: Refer to Bug#72127 for Magit assignments.

(cherry picked from commit fc25b4d8370a7c3d24b4c1335babfa1a66fe45dd)

9 months agoRename treesitter test
Michael Albinus [Mon, 15 Jul 2024 17:25:42 +0000 (19:25 +0200)]
Rename treesitter test

* test/lisp/align-tests.el (align-ts-lua): Rename test in order to
fit to treesitter tests on EMBA.

(cherry picked from commit 17c62c1242faeab030d4b0d05dc00cc8c3d8ae5f)

9 months agoAdapt tressitter tests on EMBA
Michael Albinus [Mon, 15 Jul 2024 17:24:56 +0000 (19:24 +0200)]
Adapt tressitter tests on EMBA

* test/infra/Makefile.in (TREE-SITTER-FILES): Simplify.

* test/infra/test-jobs.yml: Regenerate.

(cherry picked from commit 684e96a30d95b2ed5f2be6b85cfba3f8481707d1)

9 months agoSupport passing signals like 'SIGCODE' to 'tramp-signal-process'
Jim Porter [Sun, 14 Jul 2024 22:07:28 +0000 (15:07 -0700)]
Support passing signals like 'SIGCODE' to 'tramp-signal-process'

POSIX specifies that "kill" should take signal names without the "SIG"
prefix.

* lisp/net/tramp.el (tramp-signal-process): Strip the "SIG" prefix when
present.

(cherry picked from commit 68b7806c319f282c0882fa9167752d1ac385163d)

9 months ago; Replace quotes with @code{...} in texinfo files
Steven Allen [Mon, 15 Jul 2024 16:20:24 +0000 (18:20 +0200)]
; Replace quotes with @code{...} in texinfo files

* doc/misc/cc-mode.texi:
* doc/misc/cl.texi: Replace quotes with @code{...}

(cherry picked from commit fe28ba5d55b5a2f8b2d1cfb9109a68c1df2b88ed)

9 months ago; Replace (non-)nil with (non-)@code{nil} in texinfo files
Steven Allen [Mon, 15 Jul 2024 16:16:41 +0000 (18:16 +0200)]
; Replace (non-)nil with (non-)@code{nil} in texinfo files

* doc/lispref/functions.texi:
* doc/lispref/keymaps.texi:
* doc/lispref/strings.texi:
* doc/misc/cl.texi:
* doc/misc/dbus.texi:
* doc/misc/eshell.texi:
* doc/misc/message.texi:
* doc/misc/ses.texi:
* doc/misc/vtable.texi: Replace (non-)nil with (non-)@code{nil}.

(cherry picked from commit ecc8516d9ca17c70b4407296fa1140bb5e2b822c)

9 months agoDon't save to history from 'eshell-command' when aborting
Jim Porter [Sat, 13 Jul 2024 18:43:42 +0000 (11:43 -0700)]
Don't save to history from 'eshell-command' when aborting

* lisp/eshell/eshell.el (eshell-add-input-to-history)
(eshell--save-history): Declare.
(eshell-command-mode-exit): New function...
(eshell-command-mode): ... use it.

* lisp/eshell/em-hist.el (eshell-hist-initialize): Don't handle
minibuffer logic here.  Always read history file (this ensures that
'eshell-command' can see the history, too).
(eshell-add-command-to-history): Remove.

(cherry picked from commit 3407e274999ce80582932332b108d84fba69d107)

9 months agoImprove support for Tifinagh
Eli Zaretskii [Sun, 14 Jul 2024 18:20:42 +0000 (21:20 +0300)]
Improve support for Tifinagh

* lisp/international/fontset.el (script-representative-chars)
(setup-default-fontset): Add support for Tifinagh.

(cherry picked from commit 1fea9adf52019cb3f5ba89a402cf791164a94cbb)

9 months agoUpdate to Org 9.7.7-2-gf308d3
Kyle Meyer [Sun, 14 Jul 2024 16:30:50 +0000 (12:30 -0400)]
Update to Org 9.7.7-2-gf308d3

(cherry picked from commit 5ec73eca57c09ad1a33c56dc4cd5b965cfaef063)

9 months agoFurther time decoding tidying
Mattias Engdegård [Sun, 14 Jul 2024 11:01:57 +0000 (13:01 +0200)]
Further time decoding tidying

* src/timefns.c (enum timeform): Reorder.
(decode_time_components, decode_lisp_time): Simplify and clean up.

(cherry picked from commit a44376432de78374017c2009163a9242acbf6355)

9 months agoMinor improvement in 'rmail-redecode-body'
Eli Zaretskii [Sun, 14 Jul 2024 08:41:30 +0000 (11:41 +0300)]
Minor improvement in 'rmail-redecode-body'

* lisp/mail/rmail.el (rmail-redecode-body): Signal user-error if
'rmail-enable-mime' is non-nil; doc fix.

(cherry picked from commit 159f3f59b1d6ca57cff6f0628458908b62639e30)

9 months agoFix decoding 'display' properties with SVG images in Enriched mode
Eli Zaretskii [Sun, 14 Jul 2024 06:06:55 +0000 (09:06 +0300)]
Fix decoding 'display' properties with SVG images in Enriched mode

* lisp/textmodes/enriched.el (enriched-next-annotation): Reject
matches of 'enriched-annotation-regexp' inside strings.  Reported
by Christopher Howard <christopher@librehacker.com> in
https://lists.gnu.org/archive/html/help-gnu-emacs/2024-06/msg00178.html.

(cherry picked from commit 33ba72f52fd2138a7c2d6c065236fd459b8c659d)

9 months ago* configure.ac (D8): Fix typo.
Pip Cet [Sun, 14 Jul 2024 05:41:17 +0000 (05:41 +0000)]
* configure.ac (D8): Fix typo.

(cherry picked from commit 174a0b7642bd2d8bc397a73afc647a799e873e20)

9 months agoMinor renaming in timefns.c
Paul Eggert [Sun, 14 Jul 2024 05:16:26 +0000 (22:16 -0700)]
Minor renaming in timefns.c

* src/timefns.c (current_time_in_cform): Rename this static
function from current_time_in_form, since this is about enum cform
not enum timeform.  Use changed.

(cherry picked from commit 62fdcfd4842693f436acd5b729d20934d12ca708)

9 months ago; * src/android.c (setEmacsParams): Delete unused variable.
Po Lu [Sun, 14 Jul 2024 04:51:48 +0000 (12:51 +0800)]
; * src/android.c (setEmacsParams): Delete unused variable.

(cherry picked from commit c56e837a10eb34cbe04da8f2c16ebcae7f70704b)

9 months agoDo not set LD_LIBRARY_PATH during Android initialization
Po Lu [Sun, 14 Jul 2024 04:46:23 +0000 (12:46 +0800)]
Do not set LD_LIBRARY_PATH during Android initialization

* doc/emacs/android.texi (Android Environment): Adjust
documentation to match.

* java/org/gnu/emacs/EmacsNoninteractive.java (main1): New
function.  Remove initialization of EmacsNative hither.
(main): Acquire an ApplicationInfo or LoadedApk, as the case may
be on the host system, derive a ClassLoader from the result, and
load and call `main1' from within this class loader.

* src/android-emacs.c (main):

* src/android.c (setEmacsParams): Do not override
LD_LIBRARY_PATH or set EMACS_LD_LIBRARY_PATH.  This enables
Emacs to execute subprocesses in certain "fortified" Android
systems, amongst other things.

(cherry picked from commit b00fc31dd1d4543f8b017e8d7fef7686cd430bcc)

9 months ago; Set Transient's version
Jonas Bernoulli [Sat, 13 Jul 2024 19:59:20 +0000 (21:59 +0200)]
; Set Transient's version

(cherry picked from commit 04bf3172f03497eef6985311c90fd6557ace42b2)

9 months ago; Fix typos in 'which-key-mode' (bug#72093)
john muhl [Wed, 10 Jul 2024 22:13:58 +0000 (17:13 -0500)]
; Fix typos in 'which-key-mode' (bug#72093)

* lisp/which-key.el (which-key-preserve-window-configuration):
Correct spelling of "taken".
(which-key--create-pages): Correct spelling of "widths".
(which-key--start-paging-timer): Correct spelling of
"secondary".

(cherry picked from commit e6f78485aa66ff762376702fc97a14a4dfe9b258)

9 months agoFix 'customize-group' minibuffer action
Eshel Yaron [Wed, 17 Jul 2024 15:47:18 +0000 (17:47 +0200)]
Fix 'customize-group' minibuffer action

9 months agorefactor.el: Fix typos
Eshel Yaron [Tue, 16 Jul 2024 17:53:54 +0000 (19:53 +0200)]
refactor.el: Fix typos

9 months agoFix some minibuffer bindings
Eshel Yaron [Tue, 16 Jul 2024 17:27:37 +0000 (19:27 +0200)]
Fix some minibuffer bindings

9 months agoAdd minibuffer alternative actions for 'C-h f' and 'C-h v'
Eshel Yaron [Tue, 16 Jul 2024 17:27:16 +0000 (19:27 +0200)]
Add minibuffer alternative actions for 'C-h f' and 'C-h v'

9 months agoNew function 'completing-read-case-insensitive'
Eshel Yaron [Mon, 15 Jul 2024 18:48:11 +0000 (20:48 +0200)]
New function 'completing-read-case-insensitive'

9 months agoCease copying 'completion-ignore-case' buffer-local value
Eshel Yaron [Mon, 15 Jul 2024 17:40:06 +0000 (19:40 +0200)]
Cease copying 'completion-ignore-case' buffer-local value

9 months agoRemove 'completion-tab-width'
Eshel Yaron [Mon, 15 Jul 2024 17:38:23 +0000 (19:38 +0200)]
Remove 'completion-tab-width'

Manually align annotations in only place this variable is used.

9 months agoSimplify 'xref-etags-mode'
Eshel Yaron [Mon, 15 Jul 2024 17:36:04 +0000 (19:36 +0200)]
Simplify 'xref-etags-mode'

9 months ago; Fix bug#72080
Eshel Yaron [Sun, 14 Jul 2024 15:38:53 +0000 (17:38 +0200)]
; Fix bug#72080

9 months ago(ispell-lookup-words): Cease emitting message
Eshel Yaron [Sun, 14 Jul 2024 12:57:43 +0000 (14:57 +0200)]
(ispell-lookup-words): Cease emitting message

9 months agoImprove '[un]trace-function'
Eshel Yaron [Sun, 14 Jul 2024 12:55:07 +0000 (14:55 +0200)]
Improve '[un]trace-function'

9 months agoOptionally group imenu completions when flattened
Eshel Yaron [Sun, 14 Jul 2024 10:14:33 +0000 (12:14 +0200)]
Optionally group imenu completions when flattened

9 months ago(flymake-go-to-diagnostic): Add 'export-function'
Eshel Yaron [Sun, 14 Jul 2024 08:48:18 +0000 (10:48 +0200)]
(flymake-go-to-diagnostic): Add 'export-function'

9 months ago; Update ldefs-boot.el
Eshel Yaron [Sun, 14 Jul 2024 05:56:23 +0000 (07:56 +0200)]
; Update ldefs-boot.el

9 months ago; Fix bootstrap
Eshel Yaron [Sat, 13 Jul 2024 20:56:23 +0000 (22:56 +0200)]
; Fix bootstrap

9 months agoTreat SVG images like other image types in 'shr-put-image'
Jim Porter [Thu, 11 Jul 2024 23:29:37 +0000 (16:29 -0700)]
Treat SVG images like other image types in 'shr-put-image'

For both SVG and no-SVG builds, this works as expected (in the no-SVG
case, it would raise an error which subsequently gets ignored).
However, compared to the previous implementation, this lets users resize
SVG images just like every other image type (bug#71913).

* lisp/net/shr.el (shr-put-image): Don't special-case SVGs.

(cherry picked from commit f38c42d1c7a8413f63b1e56261850d3dbe8abef8)

9 months agoFix renaming symlinks on MS-Windows
Eli Zaretskii [Sat, 13 Jul 2024 12:52:38 +0000 (15:52 +0300)]
Fix renaming symlinks on MS-Windows

* src/w32.c (sys_rename_replace): Handle renames of a symlink.
This makes 'wdired-tests' succeed on MS-Windows.

(cherry picked from commit 5389b6a856b39427846e38b06fa398bafc04836a)

9 months ago; * src/w32fns.c (Fw32_notification_close): Fix typo (bug#72091).
Raffael Stocker [Sat, 13 Jul 2024 11:26:23 +0000 (13:26 +0200)]
; * src/w32fns.c (Fw32_notification_close): Fix typo (bug#72091).

(cherry picked from commit a6c78ccf5f297e612ff0f2159a7bed3a70637168)

9 months ago* test/lisp/wdired-tests.el (wdired-test-bug34915): Fix for MS-Windows.
Eli Zaretskii [Sat, 13 Jul 2024 12:06:43 +0000 (15:06 +0300)]
* test/lisp/wdired-tests.el (wdired-test-bug34915): Fix for MS-Windows.

(cherry picked from commit febafe37884823d5ac6a63a57c7500f4a0a8a792)

9 months agoFix 'wdired-test-unfinished-edit-01'
Peter Oliver [Fri, 12 Jul 2024 09:52:23 +0000 (10:52 +0100)]
Fix 'wdired-test-unfinished-edit-01'

* test/lisp/wdired-tests.el (wdired-test-unfinished-edit-01):
Don't modify the random directory name if, by chance, it happens
to contain the substring "foo" anywhere but immediately after the
slash.  (Bug#72073)

(cherry picked from commit 846b79b6d02faf188f0131c57a49a60bb8f71d64)

9 months ago; * src/search.c (Fre_search_forward): Clarify doc string (bug#71879).
Eli Zaretskii [Sat, 13 Jul 2024 10:22:01 +0000 (13:22 +0300)]
; * src/search.c (Fre_search_forward): Clarify doc string (bug#71879).

(cherry picked from commit bc154cba13024d2c159f6cadd324a8ef3f6dddcc)

9 months ago; Fix last change
Eli Zaretskii [Sat, 13 Jul 2024 10:16:42 +0000 (13:16 +0300)]
; Fix last change

* lisp/progmodes/java-ts-mode.el (java-ts-mode):
* lisp/progmodes/c-ts-mode.el (c-ts-mode, c++-ts-mode): Load the
Doxygen grammar quietly, so that if it isn't available, the user
is not annoyed.  (Bug#71874)

(cherry picked from commit 3a26a51c69b064546fd4647a94cdfc2656b201ec)

9 months agoFontify doxygen support to 'c-ts-mode', 'c++-ts-mode' and 'java-ts-mode'
Vincenzo Pupillo [Mon, 1 Jul 2024 10:34:01 +0000 (12:34 +0200)]
Fontify doxygen support to 'c-ts-mode', 'c++-ts-mode' and 'java-ts-mode'

Add doxygen support to 'c-ts-mode', 'c++-ts-mode' and
'java-ts-mode' using tree-sitter-doxygen from
github.com/tree-sitter-grammars.
* lisp/progmodes/c-ts-common.el
(c-ts-mode-doxygen-comment-font-lock-settings): Add font locking
rules for doxygen comment.

* lisp/progmodes/c-ts-mode.el (c-ts-mode--feature-list): Add
'document' feature.
(c-ts-mode--doxygen-comment-regex): New regular expression for
doxygen comments.
(c-ts-mode, c++-ts-mode): Add support for doxygen parser.
* lisp/progmodes/java-ts-mode.el (java-ts-mode): Add support for
doxygen parser.  (Bug#71874)

(cherry picked from commit c77a9b934bc1120c7726d271bbd4ada178cf8c2d)

9 months agoFontify destructor in c++-ts-mode
Vincenzo Pupillo [Mon, 1 Jul 2024 09:52:18 +0000 (11:52 +0200)]
Fontify destructor in c++-ts-mode

* lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings):
Add a rule for destructors.  (Bug#71872)

(cherry picked from commit 53291e3d46ee81b2b0fb7594496d938eab61bc0f)

9 months agoSimplify timestamp decoding
Mattias Engdegård [Fri, 12 Jul 2024 10:16:22 +0000 (12:16 +0200)]
Simplify timestamp decoding

* src/timefns.c (current_time_in_form, time_spec_invalid): New.
(enum timeform): Remove TIMEFORM_INVALID.
(decode_time_components): Move handling of TIMEFORM_INVALID,
TIMEFORM_TICKS_HZ and TIMEFORM_NIL...
(decode_lisp_time): ...here, avoiding the detour.

(cherry picked from commit b23ab371756b5f77f62020cdfda5fe7b6fb04470)

9 months agoFix invalid defcustom type for erc-buffers option
F. Jason Park [Fri, 12 Jul 2024 21:41:54 +0000 (14:41 -0700)]
Fix invalid defcustom type for erc-buffers option

* lisp/erc/erc.el (erc-ensure-target-buffer-on-privmsg): Change
invalid inner `choice' to a `const' for the third-state `status'
variant, which is new in ERC 5.6 and Emacs 30.  Thanks to Mattias
Engdegård for catching this.

(cherry picked from commit d77f8a347500da4c1ce7553332a481c5507412fc)

9 months agoFix infloop in 'shell-resync-dirs'
Eli Zaretskii [Fri, 12 Jul 2024 06:58:53 +0000 (09:58 +0300)]
Fix infloop in 'shell-resync-dirs'

* lisp/shell.el (shell-eval-command): Fix detection of newline
after last output line.  (Bug#71896)
(shell-resync-dirs): Make sure the inner loop never infloops.
Suggested by Troy Hinckley <troyhinckley@dabrev.com>.

(cherry picked from commit 8b1a0f8695a43e74daa5275559267e96c14aba03)

9 months ago; * src/image.c (free_image_cache): Add assertion. (Bug#71929)
Eli Zaretskii [Fri, 12 Jul 2024 06:39:39 +0000 (09:39 +0300)]
; * src/image.c (free_image_cache): Add assertion.  (Bug#71929)

(cherry picked from commit ce13eee5ab73e73ffd5d8e67a1dd21fc667ab7e1)

9 months agoNew command 'search-from-isearch'
Eshel Yaron [Sat, 13 Jul 2024 19:41:23 +0000 (21:41 +0200)]
New command 'search-from-isearch'

9 months ago* lisp/mode-face.el: New file.
Eshel Yaron [Sat, 13 Jul 2024 19:21:47 +0000 (21:21 +0200)]
* lisp/mode-face.el: New file.

9 months ago* lisp/rainbow-delimiters.el: New file.
Eshel Yaron [Sat, 13 Jul 2024 19:10:04 +0000 (21:10 +0200)]
* lisp/rainbow-delimiters.el: New file.

From https://github.com/Fanael/rainbow-delimiters

9 months ago* lisp/rainbow.el: New file.
Eshel Yaron [Sat, 13 Jul 2024 18:46:26 +0000 (20:46 +0200)]
* lisp/rainbow.el: New file.

Extracted from https://github.com/emacsmirror/rainbow-mode

9 months agoFurther integrate minibuffer alternative actions
Eshel Yaron [Sat, 13 Jul 2024 17:19:11 +0000 (19:19 +0200)]
Further integrate minibuffer alternative actions

9 months agoIndicate completion strictness in minibuffer prompt
Eshel Yaron [Sat, 13 Jul 2024 16:16:43 +0000 (18:16 +0200)]
Indicate completion strictness in minibuffer prompt

9 months ago(minibuffer-add-completion-predicate): Add minibuffer action
Eshel Yaron [Sat, 13 Jul 2024 16:03:09 +0000 (18:03 +0200)]
(minibuffer-add-completion-predicate): Add minibuffer action

9 months ago* lisp/bindings.el (search-map): Bind 'search', 'search-lines'
Eshel Yaron [Sat, 13 Jul 2024 15:53:32 +0000 (17:53 +0200)]
* lisp/bindings.el (search-map): Bind 'search', 'search-lines'

9 months agocus-edit: Add minibuffer actions, and mark mode-specific commands
Eshel Yaron [Sat, 13 Jul 2024 15:50:51 +0000 (17:50 +0200)]
cus-edit: Add minibuffer actions, and mark mode-specific commands

9 months ago(completion-pcm-word-delimiters): Add parentheses
Eshel Yaron [Sat, 13 Jul 2024 14:26:05 +0000 (16:26 +0200)]
(completion-pcm-word-delimiters): Add parentheses

9 months ago(search-read-target): Fix off-by-one in group-function
Eshel Yaron [Sat, 13 Jul 2024 14:22:54 +0000 (16:22 +0200)]
(search-read-target): Fix off-by-one in group-function

9 months agoNew command 'flymake-go-to-diagnostic'
Eshel Yaron [Sat, 13 Jul 2024 14:22:12 +0000 (16:22 +0200)]
New command 'flymake-go-to-diagnostic'

9 months agoImprove some docstrings in minibuffer.el
Eshel Yaron [Sat, 13 Jul 2024 11:24:44 +0000 (13:24 +0200)]
Improve some docstrings in minibuffer.el

9 months ago(minibuffer-read-predicate-description): Add completion category
Eshel Yaron [Sat, 13 Jul 2024 11:01:27 +0000 (13:01 +0200)]
(minibuffer-read-predicate-description): Add completion category

9 months agoFix 'minibuffer-read-predicate-description' with sole candidate
Eshel Yaron [Sat, 13 Jul 2024 10:53:07 +0000 (12:53 +0200)]
Fix 'minibuffer-read-predicate-description' with sole candidate

9 months ago* lisp/minibuffer.el (minibuffer-message): Be async.
Eshel Yaron [Fri, 12 Jul 2024 18:43:50 +0000 (20:43 +0200)]
* lisp/minibuffer.el (minibuffer-message): Be async.

9 months ago* lisp/gnus/mm-uu.el (mm-uu-type-alist): Fix end-regexp of git-format-patch.
Juri Linkov [Fri, 12 Jul 2024 17:54:53 +0000 (20:54 +0300)]
* lisp/gnus/mm-uu.el (mm-uu-type-alist): Fix end-regexp of git-format-patch.

Replace git-format-patch end-regexp "^-- " with "^$".
The regexp "^-- " was intended to mark the end
of the git-formatted patch.  However, git-format-patch
can produce patches without a signature.  Also often
patches are just copy-pasted from the output of 'C-x v d'.
Therefore, now an empty line marks the end of the patch
since properly formatted patches don't contain an empty line
and properly configured MUAs don't strip whitespace from patches.
Suggested by Luis Henriques <henrix@camandro.org> and
Kévin Le Gouguec <kevin.legouguec@gmail.com> in bug#72059.

(cherry picked from commit 900f135b68b4e9830eac5d7500b3175f160f6c34)

9 months agoRender more Android functions safe to execute in a batch session
Po Lu [Fri, 12 Jul 2024 06:31:33 +0000 (14:31 +0800)]
Render more Android functions safe to execute in a batch session

* src/androidfns.c (Fx_display_mm_width, Fx_display_mm_height)
(Fandroid_display_monitor_attributes_list)
(Fandroid_external_storage_available_p)
(Fandroid_request_storage_access): Verify that a display
connection or service object is available.

* src/androidselect.c (Fandroid_get_clipboard)
(Fandroid_browse_url_internal, Fandroid_get_clipboard_targets)
(Fandroid_get_clipboard_data, Fandroid_notifications_notify):
Moderate tone of error messages.

(cherry picked from commit b22ab99f0a85f73a1aec582f7aba0e6b5101b953)

9 months agoDocument means of executing Emacs from unrelated Android applications
Po Lu [Fri, 12 Jul 2024 03:59:09 +0000 (11:59 +0800)]
Document means of executing Emacs from unrelated Android applications

* doc/emacs/android.texi (Android Environment): Document
significance, effect and purpose of EMACS_CLASS_PATH and
EMACS_LD_LIBRARY_PATH, and the utility of `pm path
org.gnu.emacs'.

(cherry picked from commit a5ef9e25680d490e2a453e5ed518aba8f4560b2d)

9 months agoDon't emit a prompt in Eshell when a background command is killed
Jim Porter [Tue, 9 Jul 2024 17:45:35 +0000 (10:45 -0700)]
Don't emit a prompt in Eshell when a background command is killed

* lisp/eshell/esh-cmd.el (eshell-resume-command): Check for
background-ness before resetting the prompt.

* test/lisp/eshell/esh-cmd-tests.el
(esh-cmd-test/background/simple-command): Make the regexp a bit
stricter.
(esh-cmd-test/background/kill): New test.

(cherry picked from commit 0de0056fd6b3b70dde54884db5d9ffc013c49efc)

9 months agoFix reference from buffer-stale-function docstring
Daniel Martín [Wed, 10 Jul 2024 23:22:04 +0000 (01:22 +0200)]
Fix reference from buffer-stale-function docstring

* lisp/files.el (buffer-stale-function): Fix reference to a
non-existent Info node in doc string.  (Bug#72049)

(cherry picked from commit ec1e300a215504bb9905a31145924d7f3d2cb9ab)

9 months agoOnly say that minor mode function is interactive if it is so
Eshel Yaron [Fri, 12 Jul 2024 17:57:45 +0000 (19:57 +0200)]
Only say that minor mode function is interactive if it is so

9 months agoAllow replacing 'search' matches via minibuffer alt action
Eshel Yaron [Fri, 12 Jul 2024 14:31:39 +0000 (16:31 +0200)]
Allow replacing 'search' matches via minibuffer alt action

9 months agoAdd minibuffer alternative actions
Eshel Yaron [Fri, 12 Jul 2024 17:48:35 +0000 (19:48 +0200)]
Add minibuffer alternative actions

9 months ago(completion-all-sorted-completions): Sync with *Completions*
Eshel Yaron [Fri, 12 Jul 2024 17:46:07 +0000 (19:46 +0200)]
(completion-all-sorted-completions): Sync with *Completions*

9 months agoMore improvements for new search commands
Eshel Yaron [Fri, 12 Jul 2024 10:43:46 +0000 (12:43 +0200)]
More improvements for new search commands

9 months agoImprovements for new search commands
Eshel Yaron [Fri, 12 Jul 2024 08:30:08 +0000 (10:30 +0200)]
Improvements for new search commands

9 months ago* lisp/search.el: New file.
Eshel Yaron [Fri, 12 Jul 2024 06:27:10 +0000 (08:27 +0200)]
* lisp/search.el: New file.

9 months agoAdd a type-check--optim test
Andrea Corallo [Wed, 10 Jul 2024 21:50:18 +0000 (23:50 +0200)]
Add a type-check--optim test

* test/src/comp-tests.el (comp-tests-type-branch-optim-checker): New function.
(comp-tests-type-branch-optim): Add new test.

(cherry picked from commit dc8cde2b6f3e7c55a85439c771284df2b4fa0e37)

9 months agoSome clean-up in comp-tests.el
Andrea Corallo [Wed, 10 Jul 2024 21:48:19 +0000 (23:48 +0200)]
Some clean-up in comp-tests.el

* test/src/comp-tests.el (comp-tests-cond-rw-checked-function)
(comp-tests-cond-rw-checker-val)
(comp-tests-cond-rw-expected-type)
(comp-tests-cond-rw-checker-type): Remove.

(cherry picked from commit ffaf1cb235c8b399cd9fb704f9b5879db2f5d6a6)

9 months agoFix 'comp--type-check-optim-block' it using 'comp-cstr-type-p'
Andrea Corallo [Fri, 31 May 2024 08:24:11 +0000 (10:24 +0200)]
Fix 'comp--type-check-optim-block' it using 'comp-cstr-type-p'

* lisp/emacs-lisp/comp.el (comp--type-check-optim-block): Better
condition.

(cherry picked from commit baf74968f9704b6354fff7a254172f72f0ebb747)

9 months agoGeneralize 'comp-cstr-symbol-p'
Andrea Corallo [Fri, 31 May 2024 08:08:18 +0000 (10:08 +0200)]
Generalize 'comp-cstr-symbol-p'

* lisp/emacs-lisp/comp-cstr.el (comp-cstr-symbol-p): Make use of
'comp-cstr-type-p'.

(cherry picked from commit 0d6f3f134e4e9e41df86e015ea5cfc0a990b62e5)

9 months agoAdd 'comp-type-check-optim' pass
Andrea Corallo [Tue, 23 May 2023 09:18:07 +0000 (11:18 +0200)]
Add 'comp-type-check-optim' pass

* lisp/emacs-lisp/comp.el (comp-passes): Add 'comp--type-check-optim'.
(comp--type-check-optim-block, comp--type-check-optim): New functions.

(cherry picked from commit a1775552cef5a8bc0ba13e802ecf343423a53364)

9 months agoSplit 'comp--ssa' code
Andrea Corallo [Sun, 7 Apr 2024 12:35:53 +0000 (14:35 +0200)]
Split 'comp--ssa' code

* lisp/emacs-lisp/comp.el (comp--ssa-function): New function.
(comp--ssa): Update.

(cherry picked from commit 8538a281f53107b69ed4a4b0d21f237cd79de400)

9 months agoRename timefns static function lisp_time_struct
Paul Eggert [Thu, 11 Jul 2024 13:40:47 +0000 (15:40 +0200)]
Rename timefns static function lisp_time_struct

* src/timefns.c (lisp_time_cform): Rename from lisp_time_struct,
since it no longer returns a struct, and now accepts CFORM.
All uses changed.

(cherry picked from commit c3e6923b0043711a688a677edb52b31fa1640f0e)

9 months agoAvoid mpz for some common timestamp cases
Paul Eggert [Thu, 11 Jul 2024 13:28:58 +0000 (15:28 +0200)]
Avoid mpz for some common timestamp cases

Performance problem reported by Gerd Möllmann and Mattias Engdegård in:
https://lists.gnu.org/r/emacs-devel/2024-06/msg00530.html
https://lists.gnu.org/r/emacs-devel/2024-06/msg00539.html
* src/timefns.c (CFORM_SECS_ONLY): The exact tv_nsec value is now
ignored if nonnegative (i.e., the only thing that matters is that
it’s nonnegative).
(decode_time_components): Use intmax_t instead of mpz arithmetic
if the tick count fits.  Add another ‘default: eassume (false);’
so that the revised code pacifies --enable-gcc-warnings with GCC
11.4.0 on x86-64.

(cherry picked from commit e30706fd12bce459b56123ad36a4e8c1c9d374e1)